@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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/faker.ts","../src/service.ts","../src/actions/channel-stop.ts","../src/actions/channel-watch.ts","../src/actions/event-create.ts","../src/actions/event-delete.ts","../src/actions/event-get.ts","../src/actions/event-list.ts","../src/actions/event-update.ts","../src/triggers/events-changed.ts"],"names":["callConnector","nestFields"],"mappings":";;;AA0BA,SAAS,eAAA,CAAgB,EAAE,MAAA,EAAQ,IAAA,EAAK,EAAyB;AAC/D,EAAA,OAAO,EAAC;AACV;AAEA,SAAS,gBAAA,CAAiB,EAAE,MAAA,EAAQ,IAAA,EAAK,EAAyB;AAChE,EAAA,MAAM,iBAAkB,MAAA,CAAO,SAAA,KAAc,MAAA,IAAa,MAAA,CAAO,cAAc,IAAA,IAAQ,MAAA,CAAO,SAAA,KAAc,EAAA,GAAK,OAAO,MAAA,CAAO,SAAS,IAAI,CAAA,EAAG,IAAA,CAAK,IAAI,CAAC,CAAC,CAAA,CAAA,EAAI,IAAA,CAAK,IAAI,CAAC,CAAC,CAAA,CAAA,EAAI,IAAA,CAAK,IAAI,CAAC,CAAC,CAAA,CAAA,EAAI,IAAA,CAAK,IAAI,CAAC,CAAC,IAAI,IAAA,CAAK,GAAA,CAAI,EAAE,CAAC,CAAA,CAAA;AACvN,EAAA,MAAM,aAAc,MAAA,CAAO,KAAA,KAAU,MAAA,IAAa,MAAA,CAAO,UAAU,IAAA,IAAQ,MAAA,CAAO,KAAA,KAAU,EAAA,GAAK,OAAO,MAAA,CAAO,KAAK,CAAA,GAAI,IAAA,CAAK,GAAG,KAAK,CAAA;AAErI,EAAA,OAAO;AAAA,IACL,MAAA,EAAQ,aAAA;AAAA,IACR,IAAA,EAAM,cAAA;AAAA,IACN,YAAA,EAAc,IAAA,CAAK,EAAA,CAAG,gBAAgB,CAAA;AAA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AAM,8CAAiE,EAAE,IAAA,EAAM,gBAAgB,EAAA,EAAI,QAAA,EAAU,MAAM,sBAAA;AASnH,IAAM,oCAAA,GAAyD;AAAA,EACpE,aAAA,EAAe,YAAA;AAAA,EACf,aAAA,EAAe,UAAA;AAAA,EACf,kBAAA,EAAoB,KAAA;AAAA,EACpB,cAAA,EAAgB;AAClB;AAQO,IAAM,8CAA8C,EAAE,MAAA,EAAQ,iBAAiB,KAAA,EAAO,IAAA,EAAM,MAAM,cAAA;AAElG,IAAM,8BAAA,GAAoD;AAAA,EAC/D,OAAA,EAAS,iBAAA;AAAA,EACT,SAAA,EAAW,gBAAA;AAAA,EACX,QAAA,EAAU,cAAA;AAAA,EACV,KAAA,EACE,6sBAAA;AAAA,EACF,eAAA,EAAiB,MAAA;AAAA,EACjB,KAAA,EAAO,oCAAA;AAAA,EACP,YAAA,EAAc;AAAA,IACZ,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,KAAA,EAAO;AACT;AAYO,SAAS,4BAAA,CACd,QAAA,EACA,YAAA,EACA,GAAA,EAC8B;AAC9B,EAAA,OAAO,cAAA,CAAe,8BAAA,EAAgC,QAAA,EAAU,YAAA,EAAc,GAAG,CAAA;AACnF","file":"chunk-7CMSUBWQ.js","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/fixtures/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/fixtures/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_calendar\n */\n\n/**\n * The Google Calendar faker.\n *\n * Shapes, not behaviour: the goal is that a downstream node sees the field\n * NAMES Google Calendar actually publishes, so an author can wire {{\n * $json.data.id }} against a fake and have it keep working against the real\n * thing.\n *\n * Deterministic — same inputs, same output. A faker returning a fresh uuid\n * every call cannot be asserted on, so its fixtures degrade to \"it did not\n * throw\", which is the assertion that catches nothing.\n */\n\nimport type { ConnectorFaker, FakeRequest } from \"@particle-academy/fancy-connector-core\";\n\nfunction fakeChannelStop({ config, fake }: FakeRequest): unknown {\n return {};\n}\n\nfunction fakeChannelWatch({ config, fake }: FakeRequest): unknown {\n const boundChannelid = (config.channelId !== undefined && config.channelId !== null && config.channelId !== \"\" ? String(config.channelId) : `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`);\n const boundToken = (config.token !== undefined && config.token !== null && config.token !== \"\" ? String(config.token) : fake.id(\"tok\"));\n\n return {\n \"kind\": \"api#channel\",\n \"id\": boundChannelid,\n \"resourceId\": fake.id(\"o3hgv1538sdjfh\"),\n \"resourceUri\": \"https://www.googleapis.com/calendar/v3/calendars/primary/events?alt=json\",\n \"token\": boundToken,\n \"expiration\": \"1789430400000\",\n };\n}\n\nfunction fakeEventCreate({ config, fake }: FakeRequest): unknown {\n return {\n \"kind\": \"calendar#event\",\n \"etag\": \"\\\"3456789012345679\\\"\",\n \"id\": fake.id(\"evt\"),\n \"status\": (config.status !== undefined && config.status !== null && config.status !== \"\" ? String(config.status) : \"confirmed\"),\n \"htmlLink\": \"https://www.google.com/calendar/event?eid=ZmFrZQ\",\n \"created\": \"2026-09-30T09:00:00.000Z\",\n \"updated\": \"2026-09-30T09:00:00.000Z\",\n \"summary\": (config.summary !== undefined && config.summary !== null && config.summary !== \"\" ? String(config.summary) : \"Design review\"),\n \"description\": (config.description !== undefined && config.description !== null && config.description !== \"\" ? String(config.description) : \"\"),\n \"location\": (config.location !== undefined && config.location !== null && config.location !== \"\" ? String(config.location) : \"\"),\n \"creator\": {\n \"email\": \"ada@example.test\",\n },\n \"organizer\": {\n \"email\": \"ada@example.test\",\n },\n \"start\": {\n \"dateTime\": (config.startDateTime !== undefined && config.startDateTime !== null && config.startDateTime !== \"\" ? String(config.startDateTime) : \"2026-10-01T14:00:00Z\"),\n \"timeZone\": (config.startTimeZone !== undefined && config.startTimeZone !== null && config.startTimeZone !== \"\" ? String(config.startTimeZone) : \"UTC\"),\n },\n \"end\": {\n \"dateTime\": (config.endDateTime !== undefined && config.endDateTime !== null && config.endDateTime !== \"\" ? String(config.endDateTime) : \"2026-10-01T15:00:00Z\"),\n \"timeZone\": (config.endTimeZone !== undefined && config.endTimeZone !== null && config.endTimeZone !== \"\" ? String(config.endTimeZone) : \"UTC\"),\n },\n \"iCalUID\": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,\n \"sequence\": 0,\n \"reminders\": {\n \"useDefault\": true,\n },\n \"eventType\": \"default\",\n };\n}\n\nfunction fakeEventDelete({ config, fake }: FakeRequest): unknown {\n return {};\n}\n\nfunction fakeEventGet({ config, fake }: FakeRequest): unknown {\n const boundEventid = (config.eventId !== undefined && config.eventId !== null && config.eventId !== \"\" ? String(config.eventId) : fake.id(\"evt\"));\n\n return {\n \"kind\": \"calendar#event\",\n \"etag\": \"\\\"3456789012345678\\\"\",\n \"id\": boundEventid,\n \"status\": \"confirmed\",\n \"htmlLink\": \"https://www.google.com/calendar/event?eid=ZmFrZQ\",\n \"created\": \"2026-09-01T09:00:00.000Z\",\n \"updated\": \"2026-09-10T15:30:00.000Z\",\n \"summary\": \"Design review\",\n \"description\": \"Quarterly design review with the platform team.\",\n \"creator\": {\n \"email\": \"ada@example.test\",\n },\n \"organizer\": {\n \"email\": \"ada@example.test\",\n },\n \"start\": {\n \"dateTime\": \"2026-09-22T14:00:00+00:00\",\n \"timeZone\": \"UTC\",\n },\n \"end\": {\n \"dateTime\": \"2026-09-22T15:00:00+00:00\",\n \"timeZone\": \"UTC\",\n },\n \"iCalUID\": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,\n \"sequence\": 0,\n \"attendees\": [\n {\n \"email\": \"ada@example.test\",\n \"organizer\": true,\n \"responseStatus\": \"accepted\",\n },\n {\n \"email\": \"grace@example.test\",\n \"responseStatus\": \"needsAction\",\n },\n ],\n \"reminders\": {\n \"useDefault\": true,\n },\n \"eventType\": \"default\",\n };\n}\n\nfunction fakeEventList({ config, fake }: FakeRequest): unknown {\n return {\n \"kind\": \"calendar#events\",\n \"etag\": \"\\\"p33cd9r3ab8ne20g\\\"\",\n \"summary\": \"ada@example.test\",\n \"updated\": \"2026-09-10T15:30:00.000Z\",\n \"timeZone\": \"UTC\",\n \"accessRole\": \"owner\",\n \"defaultReminders\": [\n {\n \"method\": \"popup\",\n \"minutes\": 10,\n },\n ],\n \"nextSyncToken\": fake.id(\"CPDSyncToken\"),\n \"items\": [\n {\n \"kind\": \"calendar#event\",\n \"etag\": \"\\\"3456789012345678\\\"\",\n \"id\": fake.id(\"evt\"),\n \"status\": \"confirmed\",\n \"htmlLink\": \"https://www.google.com/calendar/event?eid=ZmFrZQ\",\n \"created\": \"2026-09-01T09:00:00.000Z\",\n \"updated\": \"2026-09-10T15:30:00.000Z\",\n \"summary\": \"Design review\",\n \"creator\": {\n \"email\": \"ada@example.test\",\n },\n \"organizer\": {\n \"email\": \"ada@example.test\",\n },\n \"start\": {\n \"dateTime\": \"2026-09-22T14:00:00+00:00\",\n \"timeZone\": \"UTC\",\n },\n \"end\": {\n \"dateTime\": \"2026-09-22T15:00:00+00:00\",\n \"timeZone\": \"UTC\",\n },\n \"iCalUID\": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,\n \"sequence\": 0,\n \"reminders\": {\n \"useDefault\": true,\n },\n \"eventType\": \"default\",\n },\n ],\n };\n}\n\nfunction fakeEventUpdate({ config, fake }: FakeRequest): unknown {\n return {\n \"kind\": \"calendar#event\",\n \"etag\": \"\\\"3456789012345680\\\"\",\n \"id\": (config.eventId !== undefined && config.eventId !== null && config.eventId !== \"\" ? String(config.eventId) : fake.id(\"evt\")),\n \"status\": (config.status !== undefined && config.status !== null && config.status !== \"\" ? String(config.status) : \"confirmed\"),\n \"htmlLink\": \"https://www.google.com/calendar/event?eid=ZmFrZQ\",\n \"created\": \"2026-09-01T09:00:00.000Z\",\n \"updated\": \"2026-09-30T09:15:00.000Z\",\n \"summary\": (config.summary !== undefined && config.summary !== null && config.summary !== \"\" ? String(config.summary) : \"Design review\"),\n \"description\": (config.description !== undefined && config.description !== null && config.description !== \"\" ? String(config.description) : \"\"),\n \"location\": (config.location !== undefined && config.location !== null && config.location !== \"\" ? String(config.location) : \"\"),\n \"creator\": {\n \"email\": \"ada@example.test\",\n },\n \"organizer\": {\n \"email\": \"ada@example.test\",\n },\n \"start\": {\n \"dateTime\": (config.startDateTime !== undefined && config.startDateTime !== null && config.startDateTime !== \"\" ? String(config.startDateTime) : \"2026-10-01T14:00:00Z\"),\n \"timeZone\": (config.startTimeZone !== undefined && config.startTimeZone !== null && config.startTimeZone !== \"\" ? String(config.startTimeZone) : \"UTC\"),\n },\n \"end\": {\n \"dateTime\": (config.endDateTime !== undefined && config.endDateTime !== null && config.endDateTime !== \"\" ? String(config.endDateTime) : \"2026-10-01T15:00:00Z\"),\n \"timeZone\": (config.endTimeZone !== undefined && config.endTimeZone !== null && config.endTimeZone !== \"\" ? String(config.endTimeZone) : \"UTC\"),\n },\n \"iCalUID\": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,\n \"sequence\": 1,\n \"reminders\": {\n \"useDefault\": true,\n },\n \"eventType\": \"default\",\n };\n}\n\nfunction fakeEventsChanged({ config, fake }: FakeRequest): unknown {\n const boundChannelid = `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`;\n\n return {\n \"channelId\": boundChannelid,\n \"messageNumber\": \"2\",\n \"resourceId\": fake.id(\"o3hgv1538sdjfh\"),\n \"resourceState\": (config.sample !== undefined && config.sample !== null && config.sample !== \"\" ? String(config.sample) : \"exists\"),\n \"resourceUri\": \"https://www.googleapis.com/calendar/v3/calendars/primary/events?alt=json\",\n \"channelExpiration\": \"Tue, 15 Sep 2026 00:00:00 GMT\",\n };\n}\n\nexport const googleCalendarFaker: ConnectorFaker = (operation, request) => {\n switch (operation) {\n case \"channel_stop\":\n return fakeChannelStop(request);\n\n case \"channel_watch\":\n return fakeChannelWatch(request);\n\n case \"event_create\":\n return fakeEventCreate(request);\n\n case \"event_delete\":\n return fakeEventDelete(request);\n\n case \"event_get\":\n return fakeEventGet(request);\n\n case \"event_list\":\n return fakeEventList(request);\n\n case \"event_update\":\n return fakeEventUpdate(request);\n\n case \"events_changed\":\n return fakeEventsChanged(request);\n\n default:\n // A faker asked for an operation it has no shape for must SAY so. Making\n // something up would produce a green run whose output silently has none\n // of the fields the author is about to reference.\n throw new Error(\n `google_calendar: no fake response is defined for \"${operation}\". ` +\n \"Add a fixture under provider/fixtures/ and regenerate — a connector without a faker \" +\n \"cannot be developed against, tested, or demonstrated.\",\n );\n }\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_calendar\n */\n\n/**\n * Google Calendar, as one service descriptor shared by every Google Calendar\n * operation.\n *\n * @particle-academy/fancy-connector-core carries what is true of ALL\n * connectors. This carries what is true of Google Calendar: its base URL, its\n * auth scheme, its idempotency header, and its faker.\n *\n * ## The sandbox trap, written down where it is used\n *\n * Google has no sandbox for Calendar. A test calendar is a real one in a real\n * account, so every watch and every read is real -- point this at a scratch\n * calendar, not a production one. The faker is the only way to develop against\n * it without touching an account.\n */\n\nimport type { ConnectorMode, PreparedRequest, ServiceDescriptor } from \"@particle-academy/fancy-connector-core\";\n\nimport { googleCalendarFaker } from \"./faker.js\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported. An imported constant lets an upgrade rewrite the\n * very claim it exists to detect, after which the copy agrees with itself\n * forever.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\nexport const GOOGLE_CALENDAR_BASE_URLS = {\n \"live\": \"https://www.googleapis.com\"\n} as const;\n\n/** Credential keys a remote call cannot proceed without. */\nexport const GOOGLE_CALENDAR_REQUIRES = [\n \"accessToken\",\n \"refreshToken\",\n \"clientId\",\n \"clientSecret\"\n] as const;\n\n/**\n * Apply Google Calendar's auth scheme to an outgoing request.\n *\n *\n *\n * The mode is passed in because for some providers auth and estate are the\n * same decision expressed in the URL; here it is unused, and saying so is\n * cheaper than wondering later whether it was forgotten.\n */\nexport function googleCalendarAuthorize(\n credentials: Record<string, string | undefined>,\n request: PreparedRequest,\n _mode: ConnectorMode,\n): void {\n request.headers.Authorization = `Bearer ${credentials.accessToken ?? \"\"}`;\n}\n\n/** The Google Calendar service, for the TypeScript runtime. */\nexport const GOOGLE_CALENDAR: ServiceDescriptor = {\n service: \"google_calendar\",\n title: \"Google Calendar\",\n sandbox: \"none\",\n baseUrls: { ...GOOGLE_CALENDAR_BASE_URLS },\n requires: [...GOOGLE_CALENDAR_REQUIRES],\n authorize: googleCalendarAuthorize,\n faker: googleCalendarFaker,\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/channel-stop.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/channel-stop.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_calendar\n */\n\n/**\n * Close a push-notification channel. The host's subscription machinery calls\n * this before re-creating a channel and when a trigger is removed.\n *\n * POST /calendar/v3/channels/stop —\n * https://developers.google.com/workspace/calendar/api/v3/reference/channels/stop\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Google Calendar or calls the\n * faker.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { GOOGLE_CALENDAR } from \"../service.js\";\n\nexport const CHANNEL_STOP_OPERATION = \"channel_stop\";\n\nexport type ChannelStopOptions = {\n /** The node's resolved config. Keys: channelId, resourceId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function googleCalendarChannelStop(options: ChannelStopOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.channelId === undefined || config.channelId === null || config.channelId === \"\") {\n throw new Error(`channel_stop: \"channelId\" is required (Channel ID).`);\n }\n\n if (config.resourceId === undefined || config.resourceId === null || config.resourceId === \"\") {\n throw new Error(`channel_stop: \"resourceId\" is required (Resource ID).`);\n }\n\n return callConnector(GOOGLE_CALENDAR, {\n operation: CHANNEL_STOP_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"POST\",\n path: \"/calendar/v3/channels/stop\",\n json: {\n \"id\": String(config.channelId),\n \"resourceId\": String(config.resourceId),\n },\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/channel-watch.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/channel-watch.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_calendar\n */\n\n/**\n * Open a push-notification channel on a calendar's events. The host's\n * subscription machinery calls this; it is not a node most workflows need.\n *\n * POST /calendar/v3/calendars/{calendarId}/events/watch —\n * https://developers.google.com/workspace/calendar/api/v3/reference/events/watch\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Google Calendar or calls the\n * faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { GOOGLE_CALENDAR } from \"../service.js\";\n\nexport const CHANNEL_WATCH_OPERATION = \"channel_watch\";\n\nexport type ChannelWatchOptions = {\n /** The node's resolved config. Keys: calendarId, channelId, address, token, ttlSeconds. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function googleCalendarChannelWatch(options: ChannelWatchOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.calendarId === undefined || config.calendarId === null || config.calendarId === \"\") {\n throw new Error(`channel_watch: \"calendarId\" is required (Calendar ID).`);\n }\n\n if (config.channelId === undefined || config.channelId === null || config.channelId === \"\") {\n throw new Error(`channel_watch: \"channelId\" is required (Channel ID).`);\n }\n\n if (config.address === undefined || config.address === null || config.address === \"\") {\n throw new Error(`channel_watch: \"address\" is required (Notification URL).`);\n }\n\n if (config.token === undefined || config.token === null || config.token === \"\") {\n throw new Error(`channel_watch: \"token\" is required (Channel token).`);\n }\n\n if (config.ttlSeconds === undefined || config.ttlSeconds === null || config.ttlSeconds === \"\") {\n throw new Error(`channel_watch: \"ttlSeconds\" is required (Lifetime (seconds)).`);\n }\n\n return callConnector(GOOGLE_CALENDAR, {\n operation: CHANNEL_WATCH_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"POST\",\n path: `/calendar/v3/calendars/${encodeURIComponent(String(config.calendarId))}/events/watch`,\n json: nestFields({\n \"id\": String(config.channelId),\n \"address\": String(config.address),\n \"token\": String(config.token),\n \"params.ttl\": String(config.ttlSeconds),\n \"type\": \"web_hook\",\n }),\n },\n });\n}\n\n/**\n * `{\"properties.email\": x}` -> `{properties: {email: x}}`.\n *\n * A dotted `as` means NESTING, and only a JSON body can nest. The validator\n * refuses that spelling anywhere else, because in a form body it already means\n * something different — a literal dotted key.\n */\nfunction nestFields(flat: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n\n for (const [path, value] of Object.entries(flat)) {\n const parts = path.split(\".\");\n let node = out;\n\n while (parts.length > 1) {\n const key = parts.shift() as string;\n // A NUMERIC segment is an array index: `dateRanges.0.startDate` has to\n // become `[{startDate}]`, not `{\"0\": {startDate}}`. PHP produced the\n // array by accident (its integer-keyed arrays serialise as JSON lists)\n // and the other two produced an object, which the provider rejects as\n // the wrong type. The parity suite is what caught the disagreement.\n const wantsArray = /^\\d+$/.test(parts[0] ?? \"\");\n\n if (typeof node[key] !== \"object\" || node[key] === null) node[key] = wantsArray ? [] : {};\n node = node[key] as Record<string, unknown>;\n }\n\n node[parts[0] as string] = value;\n }\n\n return out;\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/event-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/event-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_calendar\n */\n\n/**\n * Create a timed event on a Google Calendar.\n *\n * POST /calendar/v3/calendars/{calendarId}/events —\n * https://developers.google.com/workspace/calendar/api/v3/reference/events/insert\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Google Calendar or calls the\n * faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { GOOGLE_CALENDAR } from \"../service.js\";\n\nexport const EVENT_CREATE_OPERATION = \"event_create\";\n\nexport type EventCreateOptions = {\n /** The node's resolved config. Keys: calendarId, summary, description, location, startDateTime, startTimeZone, endDateTime, endTimeZone, status, visibility, transparency, colorId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function googleCalendarEventCreate(options: EventCreateOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.calendarId === undefined || config.calendarId === null || config.calendarId === \"\") {\n throw new Error(`event_create: \"calendarId\" is required (Calendar ID).`);\n }\n\n if (config.summary === undefined || config.summary === null || config.summary === \"\") {\n throw new Error(`event_create: \"summary\" is required (Title).`);\n }\n\n if (config.startDateTime === undefined || config.startDateTime === null || config.startDateTime === \"\") {\n throw new Error(`event_create: \"startDateTime\" is required (Start).`);\n }\n\n if (config.endDateTime === undefined || config.endDateTime === null || config.endDateTime === \"\") {\n throw new Error(`event_create: \"endDateTime\" is required (End).`);\n }\n\n return callConnector(GOOGLE_CALENDAR, {\n operation: EVENT_CREATE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"POST\",\n path: `/calendar/v3/calendars/${encodeURIComponent(String(config.calendarId))}/events`,\n json: nestFields({\n \"summary\": String(config.summary),\n ...(config.description !== undefined && config.description !== null && config.description !== \"\" ? { \"description\": String(config.description) } : {}),\n ...(config.location !== undefined && config.location !== null && config.location !== \"\" ? { \"location\": String(config.location) } : {}),\n \"start.dateTime\": String(config.startDateTime),\n ...(config.startTimeZone !== undefined && config.startTimeZone !== null && config.startTimeZone !== \"\" ? { \"start.timeZone\": String(config.startTimeZone) } : {}),\n \"end.dateTime\": String(config.endDateTime),\n ...(config.endTimeZone !== undefined && config.endTimeZone !== null && config.endTimeZone !== \"\" ? { \"end.timeZone\": String(config.endTimeZone) } : {}),\n ...(config.status !== undefined && config.status !== null && config.status !== \"\" ? { \"status\": String(config.status) } : {}),\n ...(config.visibility !== undefined && config.visibility !== null && config.visibility !== \"\" ? { \"visibility\": String(config.visibility) } : {}),\n ...(config.transparency !== undefined && config.transparency !== null && config.transparency !== \"\" ? { \"transparency\": String(config.transparency) } : {}),\n ...(config.colorId !== undefined && config.colorId !== null && config.colorId !== \"\" ? { \"colorId\": String(config.colorId) } : {}),\n }),\n },\n });\n}\n\n/**\n * `{\"properties.email\": x}` -> `{properties: {email: x}}`.\n *\n * A dotted `as` means NESTING, and only a JSON body can nest. The validator\n * refuses that spelling anywhere else, because in a form body it already means\n * something different — a literal dotted key.\n */\nfunction nestFields(flat: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n\n for (const [path, value] of Object.entries(flat)) {\n const parts = path.split(\".\");\n let node = out;\n\n while (parts.length > 1) {\n const key = parts.shift() as string;\n // A NUMERIC segment is an array index: `dateRanges.0.startDate` has to\n // become `[{startDate}]`, not `{\"0\": {startDate}}`. PHP produced the\n // array by accident (its integer-keyed arrays serialise as JSON lists)\n // and the other two produced an object, which the provider rejects as\n // the wrong type. The parity suite is what caught the disagreement.\n const wantsArray = /^\\d+$/.test(parts[0] ?? \"\");\n\n if (typeof node[key] !== \"object\" || node[key] === null) node[key] = wantsArray ? [] : {};\n node = node[key] as Record<string, unknown>;\n }\n\n node[parts[0] as string] = value;\n }\n\n return out;\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/event-delete.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/event-delete.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_calendar\n */\n\n/**\n * Remove an event from a Google Calendar.\n *\n * DELETE /calendar/v3/calendars/{calendarId}/events/{eventId} —\n * https://developers.google.com/workspace/calendar/api/v3/reference/events/delete\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Google Calendar or calls the\n * faker.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { GOOGLE_CALENDAR } from \"../service.js\";\n\nexport const EVENT_DELETE_OPERATION = \"event_delete\";\n\nexport type EventDeleteOptions = {\n /** The node's resolved config. Keys: calendarId, eventId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function googleCalendarEventDelete(options: EventDeleteOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.calendarId === undefined || config.calendarId === null || config.calendarId === \"\") {\n throw new Error(`event_delete: \"calendarId\" is required (Calendar ID).`);\n }\n\n if (config.eventId === undefined || config.eventId === null || config.eventId === \"\") {\n throw new Error(`event_delete: \"eventId\" is required (Event ID).`);\n }\n\n return callConnector(GOOGLE_CALENDAR, {\n operation: EVENT_DELETE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"DELETE\",\n path: `/calendar/v3/calendars/${encodeURIComponent(String(config.calendarId))}/events/${encodeURIComponent(String(config.eventId))}`,\n query: {},\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/event-get.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/event-get.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_calendar\n */\n\n/**\n * Read one event from a Google Calendar.\n *\n * GET /calendar/v3/calendars/{calendarId}/events/{eventId} —\n * https://developers.google.com/workspace/calendar/api/v3/reference/events/get\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Google Calendar or calls the\n * faker.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { GOOGLE_CALENDAR } from \"../service.js\";\n\nexport const EVENT_GET_OPERATION = \"event_get\";\n\nexport type EventGetOptions = {\n /** The node's resolved config. Keys: calendarId, eventId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function googleCalendarEventGet(options: EventGetOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.calendarId === undefined || config.calendarId === null || config.calendarId === \"\") {\n throw new Error(`event_get: \"calendarId\" is required (Calendar ID).`);\n }\n\n if (config.eventId === undefined || config.eventId === null || config.eventId === \"\") {\n throw new Error(`event_get: \"eventId\" is required (Event ID).`);\n }\n\n return callConnector(GOOGLE_CALENDAR, {\n operation: EVENT_GET_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"GET\",\n path: `/calendar/v3/calendars/${encodeURIComponent(String(config.calendarId))}/events/${encodeURIComponent(String(config.eventId))}`,\n query: {},\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/event-list.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/event-list.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_calendar\n */\n\n/**\n * List events from a Google Calendar, in full or incrementally with a sync\n * token.\n *\n * GET /calendar/v3/calendars/{calendarId}/events —\n * https://developers.google.com/workspace/calendar/api/v3/reference/events/list\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Google Calendar or calls the\n * faker.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { GOOGLE_CALENDAR } from \"../service.js\";\n\nexport const EVENT_LIST_OPERATION = \"event_list\";\n\nexport type EventListOptions = {\n /** The node's resolved config. Keys: calendarId, syncToken, timeMin, timeMax, maxResults, pageToken, singleEvents. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function googleCalendarEventList(options: EventListOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.calendarId === undefined || config.calendarId === null || config.calendarId === \"\") {\n throw new Error(`event_list: \"calendarId\" is required (Calendar ID).`);\n }\n\n {\n const n = Number(config.maxResults);\n const given = config.maxResults !== undefined && config.maxResults !== null && config.maxResults !== \"\";\n if (given && !(Number.isInteger(n) && n >= 1 && n <= 2500)) {\n throw new Error(\n `event_list: \"maxResults\" must be a integer, got ${JSON.stringify(config.maxResults)}.`,\n );\n }\n }\n\n return callConnector(GOOGLE_CALENDAR, {\n operation: EVENT_LIST_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"GET\",\n path: `/calendar/v3/calendars/${encodeURIComponent(String(config.calendarId))}/events`,\n query: {\n ...(config.syncToken !== undefined && config.syncToken !== null && config.syncToken !== \"\" ? { \"syncToken\": String(config.syncToken) } : {}),\n ...(config.timeMin !== undefined && config.timeMin !== null && config.timeMin !== \"\" ? { \"timeMin\": String(config.timeMin) } : {}),\n ...(config.timeMax !== undefined && config.timeMax !== null && config.timeMax !== \"\" ? { \"timeMax\": String(config.timeMax) } : {}),\n \"maxResults\": config.maxResults !== undefined && config.maxResults !== null && config.maxResults !== \"\" ? Math.trunc(Number(config.maxResults)) : 250,\n ...(config.pageToken !== undefined && config.pageToken !== null && config.pageToken !== \"\" ? { \"pageToken\": String(config.pageToken) } : {}),\n ...(config.singleEvents !== undefined && config.singleEvents !== null && config.singleEvents !== \"\" ? { \"singleEvents\": Boolean(config.singleEvents) } : {}),\n },\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/event-update.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/event-update.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_calendar\n */\n\n/**\n * Change one or more fields of an existing event. Only the fields provided are\n * touched.\n *\n * PATCH /calendar/v3/calendars/{calendarId}/events/{eventId} —\n * https://developers.google.com/workspace/calendar/api/v3/reference/events/patch\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Google Calendar or calls the\n * faker.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { GOOGLE_CALENDAR } from \"../service.js\";\n\nexport const EVENT_UPDATE_OPERATION = \"event_update\";\n\nexport type EventUpdateOptions = {\n /** The node's resolved config. Keys: calendarId, eventId, summary, description, location, startDateTime, startTimeZone, endDateTime, endTimeZone, status, visibility, transparency, colorId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function googleCalendarEventUpdate(options: EventUpdateOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.calendarId === undefined || config.calendarId === null || config.calendarId === \"\") {\n throw new Error(`event_update: \"calendarId\" is required (Calendar ID).`);\n }\n\n if (config.eventId === undefined || config.eventId === null || config.eventId === \"\") {\n throw new Error(`event_update: \"eventId\" is required (Event ID).`);\n }\n\n return callConnector(GOOGLE_CALENDAR, {\n operation: EVENT_UPDATE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"PATCH\",\n path: `/calendar/v3/calendars/${encodeURIComponent(String(config.calendarId))}/events/${encodeURIComponent(String(config.eventId))}`,\n json: nestFields({\n ...(config.summary !== undefined && config.summary !== null && config.summary !== \"\" ? { \"summary\": String(config.summary) } : {}),\n ...(config.description !== undefined && config.description !== null && config.description !== \"\" ? { \"description\": String(config.description) } : {}),\n ...(config.location !== undefined && config.location !== null && config.location !== \"\" ? { \"location\": String(config.location) } : {}),\n ...(config.startDateTime !== undefined && config.startDateTime !== null && config.startDateTime !== \"\" ? { \"start.dateTime\": String(config.startDateTime) } : {}),\n ...(config.startTimeZone !== undefined && config.startTimeZone !== null && config.startTimeZone !== \"\" ? { \"start.timeZone\": String(config.startTimeZone) } : {}),\n ...(config.endDateTime !== undefined && config.endDateTime !== null && config.endDateTime !== \"\" ? { \"end.dateTime\": String(config.endDateTime) } : {}),\n ...(config.endTimeZone !== undefined && config.endTimeZone !== null && config.endTimeZone !== \"\" ? { \"end.timeZone\": String(config.endTimeZone) } : {}),\n ...(config.status !== undefined && config.status !== null && config.status !== \"\" ? { \"status\": String(config.status) } : {}),\n ...(config.visibility !== undefined && config.visibility !== null && config.visibility !== \"\" ? { \"visibility\": String(config.visibility) } : {}),\n ...(config.transparency !== undefined && config.transparency !== null && config.transparency !== \"\" ? { \"transparency\": String(config.transparency) } : {}),\n ...(config.colorId !== undefined && config.colorId !== null && config.colorId !== \"\" ? { \"colorId\": String(config.colorId) } : {}),\n }),\n },\n });\n}\n\n/**\n * `{\"properties.email\": x}` -> `{properties: {email: x}}`.\n *\n * A dotted `as` means NESTING, and only a JSON body can nest. The validator\n * refuses that spelling anywhere else, because in a form body it already means\n * something different — a literal dotted key.\n */\nfunction nestFields(flat: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n\n for (const [path, value] of Object.entries(flat)) {\n const parts = path.split(\".\");\n let node = out;\n\n while (parts.length > 1) {\n const key = parts.shift() as string;\n // A NUMERIC segment is an array index: `dateRanges.0.startDate` has to\n // become `[{startDate}]`, not `{\"0\": {startDate}}`. PHP produced the\n // array by accident (its integer-keyed arrays serialise as JSON lists)\n // and the other two produced an object, which the provider rejects as\n // the wrong type. The parity suite is what caught the disagreement.\n const wantsArray = /^\\d+$/.test(parts[0] ?? \"\");\n\n if (typeof node[key] !== \"object\" || node[key] === null) node[key] = wantsArray ? [] : {};\n node = node[key] as Record<string, unknown>;\n }\n\n node[parts[0] as string] = value;\n }\n\n return out;\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/triggers/events-changed.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/triggers/events-changed.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_calendar\n */\n\n/**\n * Google Calendar's subscription trigger — the delivery contract.\n *\n * Kept beside the service descriptor rather than inside a node, because the\n * way a delivery is verified is a fact about GOOGLE CALENDAR. Two Google\n * Calendar triggers must not be able to disagree about how a delivery is\n * verified.\n *\n * A SUBSCRIPTION: Google Calendar stops delivering unless somebody renews it,\n * forever, and if nobody does the workflow stops firing with no error\n * anywhere. The lease below says where the expiry is read from and how early\n * to renew; the host runs ONE renewal scheduler for every expiring trigger.\n */\n\nimport { verifyDelivery, type InboundDelivery, type LeaseDeclaration, type SharedTokenScheme, type TriggerDescriptor, type WebhookVerification } from \"@particle-academy/fancy-connector-core\";\nimport { googleCalendarFaker } from \"../faker.js\";\n\n/** Where Google Calendar echoes the token it was given when the subscription was created. */\nexport const GOOGLE_CALENDAR_EVENTS_CHANGED_TOKEN_SCHEME: SharedTokenScheme = { kind: \"shared-token\", in: \"header\", name: \"X-Goog-Channel-Token\" };\n\n/**\n * The lease this subscription carries: where the provider's expiry sits in the\n * `channel_watch` response (`expiration`, epoch-ms), how early the host\n * renews, and what it calls when the lease is due — the create again, because\n * Google Calendar cannot renew. The host builds the value with the core's\n * `leaseFromResponse` and runs one scheduler for every expiring trigger.\n */\nexport const GOOGLE_CALENDAR_EVENTS_CHANGED_LEASE: LeaseDeclaration = {\n expiresAtFrom: \"expiration\",\n expiresAtUnit: \"epoch-ms\",\n renewBeforeSeconds: 86400,\n renewOperation: \"channel_watch\",\n};\n\n/**\n * Which of this package's actions create, renew and stop the subscription.\n * `renew` is null where the provider cannot renew and the host calls create\n * again — after stopping the old one, and after re-listing, because\n * notifications during the gap are gone.\n */\nexport const GOOGLE_CALENDAR_EVENTS_CHANGED_SUBSCRIPTION = { create: \"channel_watch\", renew: null, stop: \"channel_stop\" } as const;\n\nexport const GOOGLE_CALENDAR_EVENTS_CHANGED: TriggerDescriptor = {\n service: \"google_calendar\",\n operation: \"events_changed\",\n delivery: \"subscription\",\n setup:\n \"The host mints a UUID, calls channel_watch with it, its own URL for this trigger and the connection's channelToken, and stores the returned id, resourceId and expiration. Google cannot renew a channel: 86400 seconds before it expires the host calls channel_stop and then channel_watch again. A channel that lapsed is re-listed FIRST (event_list with the stored syncToken; a 410 means list in full) and then re-created, because notifications during the gap are gone. Google delivers with an EMPTY body: the host verifies X-Goog-Channel-Token against the connection's channelToken and injects the X-Goog-* headers as the event, camel-cased as below. The first message on a new channel is `sync` and carries no change.\",\n subscriptionTtl: 604800,\n lease: GOOGLE_CALENDAR_EVENTS_CHANGED_LEASE,\n verification: {\n scheme: GOOGLE_CALENDAR_EVENTS_CHANGED_TOKEN_SCHEME,\n },\n faker: googleCalendarFaker,\n};\n\n/**\n * Verify one inbound Google Calendar delivery.\n *\n * The host calls this BEFORE starting a run, with the body exactly as\n * received. Re-serialised JSON changes key order and whitespace, and produces\n * a mismatch that looks precisely like a wrong secret — hours of debugging the\n * wrong thing.\n *\n * The secret is the connection's `channelToken`.\n */\nexport function verifyGoogleCalendarDelivery(\n delivery: InboundDelivery,\n channelToken: string | undefined,\n now?: number,\n): Promise<WebhookVerification> {\n return verifyDelivery(GOOGLE_CALENDAR_EVENTS_CHANGED, delivery, channelToken, now);\n}\n"]}