@particle-academy/gmail-inbox-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/history-list.ts","../src/actions/label-list.ts","../src/actions/mailbox-stop.ts","../src/actions/mailbox-watch.ts","../src/actions/message-get.ts","../src/actions/message-list.ts","../src/actions/thread-get.ts","../src/triggers/message-received.ts"],"names":["callConnector"],"mappings":";;;AAyBA,SAAS,eAAA,CAAgB,EAAE,MAAA,EAAQ,IAAA,EAAK,EAAyB;AAC/D,EAAA,OAAO;AAAA,IACL,SAAA,EAAW;AAAA,MACT;AAAA,QACE,IAAA,EAAM,YAAA;AAAA,QACN,eAAA,EAAiB;AAAA,UACf;AAAA,YACE,SAAA,EAAW;AAAA,cACT,IAAA,EAAM,IAAA,CAAK,GAAA,CAAI,EAAE,CAAA;AAAA,cACjB,UAAA,EAAY,IAAA,CAAK,GAAA,CAAI,EAAE,CAAA;AAAA,cACvB,UAAA,EAAY;AAAA,gBACV,OAAA;AAAA,gBACA;AAAA;AACF;AACF;AACF;AACF;AACF,KACF;AAAA,IACA,WAAA,EAAa;AAAA,GACf;AACF;AAEA,SAAS,aAAA,CAAc,EAAE,MAAA,EAAQ,IAAA,EAAK,EAAyB;AAC7D,EAAA,OAAO;AAAA,IACL,QAAA,EAAU;AAAA,MACR;AAAA,QACE,IAAA,EAAM,OAAA;AAAA,QACN,MAAA,EAAQ,OAAA;AAAA,QACR,MAAA,EAAQ;AAAA,OACV;AAAA,MACA;AAAA,QACE,IAAA,EAAM,QAAA;AAAA,QACN,MAAA,EAAQ,QAAA;AAAA,QACR,MAAA,EAAQ;AAAA,OACV;AAAA,MACA;AAAA,QACE,IAAA,EAAM,WAAA;AAAA,QACN,MAAA,EAAQ,WAAA;AAAA,QACR,MAAA,EAAQ,QAAA;AAAA,QACR,eAAA,EAAiB,GAAA;A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AAA,EAA8B,QAAA,EAAU,MAAA,EAAW,GAAA,EAAK;AAAA,IAC5E,MAAM,QAAA,CAAS,IAAA;AAAA,IACf,QAAA,EAAU,SAAS,YAAA,IAAgB,IAAA;AAAA,IACnC,SAAA,EAAW,SAAS,kBAAA,IAAsB;AAAA,GAC3C,CAAA;AACH;AAWO,SAAS,yBAAyB,GAAA,EAAmC;AAC1E,EAAA,OAAO,cAAA,CAAe,qCAAqC,GAAG,CAAA;AAChE","file":"chunk-2PSRTESV.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 -- gmail_inbox\n */\n\n/**\n * The Gmail Inbox faker.\n *\n * Shapes, not behaviour: the goal is that a downstream node sees the field\n * NAMES Gmail Inbox actually publishes, so an author can wire {{ $json.data.id\n * }} against a fake and have it keep working against the real 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 fakeHistoryList({ config, fake }: FakeRequest): unknown {\n return {\n \"history\": [\n {\n \"id\": \"1234567891\",\n \"messagesAdded\": [\n {\n \"message\": {\n \"id\": fake.hex(16),\n \"threadId\": fake.hex(16),\n \"labelIds\": [\n \"INBOX\",\n \"UNREAD\",\n ],\n },\n },\n ],\n },\n ],\n \"historyId\": \"1234567891\",\n };\n}\n\nfunction fakeLabelList({ config, fake }: FakeRequest): unknown {\n return {\n \"labels\": [\n {\n \"id\": \"INBOX\",\n \"name\": \"INBOX\",\n \"type\": \"system\",\n },\n {\n \"id\": \"UNREAD\",\n \"name\": \"UNREAD\",\n \"type\": \"system\",\n },\n {\n \"id\": \"IMPORTANT\",\n \"name\": \"IMPORTANT\",\n \"type\": \"system\",\n \"messagesTotal\": 412,\n \"messagesUnread\": 18,\n \"threadsTotal\": 203,\n \"threadsUnread\": 11,\n },\n {\n \"id\": fake.id(\"Label\"),\n \"name\": \"Design Reviews\",\n \"type\": \"user\",\n \"messageListVisibility\": \"show\",\n \"labelListVisibility\": \"labelShow\",\n \"messagesTotal\": 27,\n \"messagesUnread\": 2,\n \"threadsTotal\": 9,\n \"threadsUnread\": 1,\n },\n ],\n };\n}\n\nfunction fakeMailboxStop({ config, fake }: FakeRequest): unknown {\n return {};\n}\n\nfunction fakeMailboxWatch({ config, fake }: FakeRequest): unknown {\n return {\n \"historyId\": \"1234567890\",\n \"expiration\": \"1767312000000\",\n };\n}\n\nfunction fakeMessageGet({ config, fake }: FakeRequest): unknown {\n return {\n \"id\": (config.id !== undefined && config.id !== null && config.id !== \"\" ? String(config.id) : fake.hex(16)),\n \"threadId\": fake.hex(16),\n \"labelIds\": [\n \"INBOX\",\n \"UNREAD\",\n \"IMPORTANT\",\n ],\n \"snippet\": \"Hi Ada, just confirming the design review is still on for Thursday at 2pm. Let me know if...\",\n \"internalDate\": \"1790712000000\",\n \"payload\": {\n \"mimeType\": \"text/plain\",\n \"headers\": [\n {\n \"name\": \"From\",\n \"value\": \"Grace Hopper <grace@example.test>\",\n },\n {\n \"name\": \"To\",\n \"value\": \"Ada Lovelace <ada@example.test>\",\n },\n {\n \"name\": \"Subject\",\n \"value\": \"Re: Design review Thursday\",\n },\n {\n \"name\": \"Date\",\n \"value\": \"Tue, 29 Sep 2026 14:03:00 -0400\",\n },\n ],\n \"body\": {\n \"size\": 612,\n \"data\": fake.id(\"base64url_body\"),\n },\n },\n };\n}\n\nfunction fakeMessageList({ config, fake }: FakeRequest): unknown {\n return {\n \"messages\": [\n {\n \"id\": fake.hex(16),\n \"threadId\": fake.hex(16),\n },\n {\n \"id\": fake.hex(16),\n \"threadId\": fake.hex(16),\n },\n ],\n \"resultSizeEstimate\": 2,\n };\n}\n\nfunction fakeThreadGet({ config, fake }: FakeRequest): unknown {\n return {\n \"id\": (config.id !== undefined && config.id !== null && config.id !== \"\" ? String(config.id) : fake.hex(16)),\n \"historyId\": Array.from({ length: 10 }, () => fake.int(0, 9)).join(\"\"),\n \"messages\": [\n {\n \"id\": fake.hex(16),\n \"labelIds\": [\n \"INBOX\",\n \"IMPORTANT\",\n ],\n \"snippet\": \"Hey team, scheduling the Q3 design review for Thursday at 2pm. Conference room B...\",\n \"internalDate\": \"1790625600000\",\n \"payload\": {\n \"mimeType\": \"text/plain\",\n \"headers\": [\n {\n \"name\": \"From\",\n \"value\": \"Ada Lovelace <ada@example.test>\",\n },\n {\n \"name\": \"To\",\n \"value\": \"Grace Hopper <grace@example.test>\",\n },\n {\n \"name\": \"Subject\",\n \"value\": \"Design review Thursday\",\n },\n {\n \"name\": \"Date\",\n \"value\": \"Mon, 28 Sep 2026 09:00:00 -0400\",\n },\n ],\n \"body\": {\n \"size\": 540,\n \"data\": fake.id(\"base64url_body\"),\n },\n },\n },\n {\n \"id\": fake.hex(16),\n \"labelIds\": [\n \"INBOX\",\n \"UNREAD\",\n \"IMPORTANT\",\n ],\n \"snippet\": \"Hi Ada, just confirming the design review is still on for Thursday at 2pm. Let me know if...\",\n \"internalDate\": \"1790712000000\",\n \"payload\": {\n \"mimeType\": \"text/plain\",\n \"headers\": [\n {\n \"name\": \"From\",\n \"value\": \"Grace Hopper <grace@example.test>\",\n },\n {\n \"name\": \"To\",\n \"value\": \"Ada Lovelace <ada@example.test>\",\n },\n {\n \"name\": \"Subject\",\n \"value\": \"Re: Design review Thursday\",\n },\n {\n \"name\": \"Date\",\n \"value\": \"Tue, 29 Sep 2026 14:03:00 -0400\",\n },\n ],\n \"body\": {\n \"size\": 612,\n \"data\": fake.id(\"base64url_body\"),\n },\n },\n },\n ],\n };\n}\n\nfunction fakeMessageReceived({ config, fake }: FakeRequest): unknown {\n return {\n \"subscription\": \"projects/my-project/subscriptions/gmail-push\",\n \"messageId\": Array.from({ length: 16 }, () => fake.int(0, 9)).join(\"\"),\n \"publishTime\": \"2026-11-08T09:00:00.000Z\",\n \"attributes\": {},\n \"deliveryAttempt\": null,\n \"data\": {\n \"emailAddress\": \"user@example.test\",\n \"historyId\": 1234567891,\n },\n };\n}\n\nexport const gmailInboxFaker: ConnectorFaker = (operation, request) => {\n switch (operation) {\n case \"history_list\":\n return fakeHistoryList(request);\n\n case \"label_list\":\n return fakeLabelList(request);\n\n case \"mailbox_stop\":\n return fakeMailboxStop(request);\n\n case \"mailbox_watch\":\n return fakeMailboxWatch(request);\n\n case \"message_get\":\n return fakeMessageGet(request);\n\n case \"message_list\":\n return fakeMessageList(request);\n\n case \"thread_get\":\n return fakeThreadGet(request);\n\n case \"message_received\":\n return fakeMessageReceived(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 `gmail_inbox: 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 -- gmail_inbox\n */\n\n/**\n * Gmail Inbox, as one service descriptor shared by every Gmail Inbox\n * operation.\n *\n * @particle-academy/fancy-connector-core carries what is true of ALL\n * connectors. This carries what is true of Gmail Inbox: its base URL, its auth\n * scheme, its idempotency header, and its faker.\n *\n * ## The sandbox trap, written down where it is used\n *\n * Gmail has no sandbox. Every read reaches the connected account's real mail.\n * The faker is the only way to develop against it without touching a real\n * mailbox.\n */\n\nimport type { ConnectorMode, PreparedRequest, ServiceDescriptor } from \"@particle-academy/fancy-connector-core\";\n\nimport { gmailInboxFaker } 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 GMAIL_INBOX_BASE_URLS = {\n \"live\": \"https://gmail.googleapis.com\"\n} as const;\n\n/** Credential keys a remote call cannot proceed without. */\nexport const GMAIL_INBOX_REQUIRES = [\n \"accessToken\",\n \"refreshToken\",\n \"clientId\",\n \"clientSecret\"\n] as const;\n\n/**\n * Apply Gmail Inbox'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 gmailInboxAuthorize(\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 Gmail Inbox service, for the TypeScript runtime. */\nexport const GMAIL_INBOX: ServiceDescriptor = {\n service: \"gmail_inbox\",\n title: \"Gmail Inbox\",\n sandbox: \"none\",\n baseUrls: { ...GMAIL_INBOX_BASE_URLS },\n requires: [...GMAIL_INBOX_REQUIRES],\n authorize: gmailInboxAuthorize,\n faker: gmailInboxFaker,\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/history-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/history-list.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail_inbox\n */\n\n/**\n * List what changed in a mailbox since a history id: messages added or\n * deleted, labels added or removed.\n *\n * GET /gmail/v1/users/{userId}/history —\n * https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.history/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 Gmail Inbox 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 { GMAIL_INBOX } from \"../service.js\";\n\nexport const HISTORY_LIST_OPERATION = \"history_list\";\n\nexport type HistoryListOptions = {\n /** The node's resolved config. Keys: userId, startHistoryId, historyTypes, labelId, maxResults, pageToken. */\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 gmailInboxHistoryList(options: HistoryListOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.userId === undefined || config.userId === null || config.userId === \"\") {\n throw new Error(`history_list: \"userId\" is required (Mailbox).`);\n }\n\n if (config.startHistoryId === undefined || config.startHistoryId === null || config.startHistoryId === \"\") {\n throw new Error(`history_list: \"startHistoryId\" is required (Start history 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 <= 500)) {\n throw new Error(\n `history_list: \"maxResults\" must be a integer, got ${JSON.stringify(config.maxResults)}.`,\n );\n }\n }\n\n return callConnector(GMAIL_INBOX, {\n operation: HISTORY_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: `/gmail/v1/users/${encodeURIComponent(String(config.userId))}/history`,\n query: {\n \"startHistoryId\": String(config.startHistoryId),\n ...(config.historyTypes !== undefined && config.historyTypes !== null && config.historyTypes !== \"\" ? { \"historyTypes\": String(config.historyTypes) } : {}),\n ...(config.labelId !== undefined && config.labelId !== null && config.labelId !== \"\" ? { \"labelId\": String(config.labelId) } : {}),\n \"maxResults\": config.maxResults !== undefined && config.maxResults !== null && config.maxResults !== \"\" ? Math.trunc(Number(config.maxResults)) : 100,\n ...(config.pageToken !== undefined && config.pageToken !== null && config.pageToken !== \"\" ? { \"pageToken\": String(config.pageToken) } : {}),\n },\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/label-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/label-list.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail_inbox\n */\n\n/**\n * List every label on the mailbox, system and user-created.\n *\n * GET /gmail/v1/users/{userId}/labels —\n * https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.labels/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 Gmail Inbox 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 { GMAIL_INBOX } from \"../service.js\";\n\nexport const LABEL_LIST_OPERATION = \"label_list\";\n\nexport type LabelListOptions = {\n /** The node's resolved config. Keys: userId. */\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 gmailInboxLabelList(options: LabelListOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.userId === undefined || config.userId === null || config.userId === \"\") {\n throw new Error(`label_list: \"userId\" is required (Mailbox).`);\n }\n\n return callConnector(GMAIL_INBOX, {\n operation: LABEL_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: `/gmail/v1/users/${encodeURIComponent(String(config.userId))}/labels`,\n query: {},\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/mailbox-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/mailbox-stop.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail_inbox\n */\n\n/**\n * Turn off push notifications for a mailbox.\n *\n * POST /gmail/v1/users/{userId}/stop —\n * https://developers.google.com/workspace/gmail/api/reference/rest/v1/users/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 Gmail Inbox 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 { GMAIL_INBOX } from \"../service.js\";\n\nexport const MAILBOX_STOP_OPERATION = \"mailbox_stop\";\n\nexport type MailboxStopOptions = {\n /** The node's resolved config. Keys: userId. */\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 gmailInboxMailboxStop(options: MailboxStopOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.userId === undefined || config.userId === null || config.userId === \"\") {\n throw new Error(`mailbox_stop: \"userId\" is required (Mailbox).`);\n }\n\n return callConnector(GMAIL_INBOX, {\n operation: MAILBOX_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: `/gmail/v1/users/${encodeURIComponent(String(config.userId))}/stop`,\n json: {},\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/mailbox-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/mailbox-watch.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail_inbox\n */\n\n/**\n * Start (or renew) push notifications for a mailbox to a Cloud Pub/Sub topic.\n *\n * POST /gmail/v1/users/{userId}/watch —\n * https://developers.google.com/workspace/gmail/api/reference/rest/v1/users/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 Gmail Inbox 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 { GMAIL_INBOX } from \"../service.js\";\n\nexport const MAILBOX_WATCH_OPERATION = \"mailbox_watch\";\n\nexport type MailboxWatchOptions = {\n /** The node's resolved config. Keys: userId, topicName, labelIds, labelFilterBehavior. */\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 gmailInboxMailboxWatch(options: MailboxWatchOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.userId === undefined || config.userId === null || config.userId === \"\") {\n throw new Error(`mailbox_watch: \"userId\" is required (Mailbox).`);\n }\n\n if (config.topicName === undefined || config.topicName === null || config.topicName === \"\") {\n throw new Error(`mailbox_watch: \"topicName\" is required (Pub/Sub topic).`);\n }\n\n return callConnector(GMAIL_INBOX, {\n operation: MAILBOX_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: `/gmail/v1/users/${encodeURIComponent(String(config.userId))}/watch`,\n json: {\n \"topicName\": String(config.topicName).trim(),\n ...(config.labelIds !== undefined && config.labelIds !== null && config.labelIds !== \"\" ? { \"labelIds\": labelidsList(config.labelIds) } : {}),\n ...(config.labelFilterBehavior !== undefined && config.labelFilterBehavior !== null && config.labelFilterBehavior !== \"\" ? { \"labelFilterBehavior\": String(config.labelFilterBehavior) } : {}),\n },\n },\n });\n}\n\n/** One value, a \",\"-separated string, or an array — all end up a list. */\nfunction labelidsList(value: unknown): string[] {\n const items = Array.isArray(value)\n ? value.map(String)\n : typeof value === \"string\"\n ? value.split(\",\")\n : [];\n\n return items.map((item) => item.trim()).filter(Boolean);\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/message-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/message-get.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail_inbox\n */\n\n/**\n * Read one message's headers and preview. The body's plain/HTML text is NOT\n * decoded -- see the raw payload for that.\n *\n * GET /gmail/v1/users/{userId}/messages/{id} —\n * https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/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 Gmail Inbox 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 { GMAIL_INBOX } from \"../service.js\";\n\nexport const MESSAGE_GET_OPERATION = \"message_get\";\n\nexport type MessageGetOptions = {\n /** The node's resolved config. Keys: userId, id. */\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 gmailInboxMessageGet(options: MessageGetOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.userId === undefined || config.userId === null || config.userId === \"\") {\n throw new Error(`message_get: \"userId\" is required (Mailbox).`);\n }\n\n if (config.id === undefined || config.id === null || config.id === \"\") {\n throw new Error(`message_get: \"id\" is required (Message ID).`);\n }\n\n return callConnector(GMAIL_INBOX, {\n operation: MESSAGE_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: `/gmail/v1/users/${encodeURIComponent(String(config.userId))}/messages/${encodeURIComponent(String(config.id))}`,\n query: {\n \"format\": \"full\",\n },\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/message-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/message-list.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail_inbox\n */\n\n/**\n * List message ids matching a search, newest first.\n *\n * GET /gmail/v1/users/{userId}/messages —\n * https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/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 Gmail Inbox 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 { GMAIL_INBOX } from \"../service.js\";\n\nexport const MESSAGE_LIST_OPERATION = \"message_list\";\n\nexport type MessageListOptions = {\n /** The node's resolved config. Keys: userId, q, labelId, includeSpamTrash, maxResults, pageToken. */\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 gmailInboxMessageList(options: MessageListOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.userId === undefined || config.userId === null || config.userId === \"\") {\n throw new Error(`message_list: \"userId\" is required (Mailbox).`);\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 <= 500)) {\n throw new Error(\n `message_list: \"maxResults\" must be a integer, got ${JSON.stringify(config.maxResults)}.`,\n );\n }\n }\n\n return callConnector(GMAIL_INBOX, {\n operation: MESSAGE_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: `/gmail/v1/users/${encodeURIComponent(String(config.userId))}/messages`,\n query: {\n ...(config.q !== undefined && config.q !== null && config.q !== \"\" ? { \"q\": String(config.q) } : {}),\n ...(config.labelId !== undefined && config.labelId !== null && config.labelId !== \"\" ? { \"labelIds\": String(config.labelId) } : {}),\n ...(config.includeSpamTrash !== undefined && config.includeSpamTrash !== null && config.includeSpamTrash !== \"\" ? { \"includeSpamTrash\": Boolean(config.includeSpamTrash) } : {}),\n \"maxResults\": config.maxResults !== undefined && config.maxResults !== null && config.maxResults !== \"\" ? Math.trunc(Number(config.maxResults)) : 100,\n ...(config.pageToken !== undefined && config.pageToken !== null && config.pageToken !== \"\" ? { \"pageToken\": String(config.pageToken) } : {}),\n },\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/thread-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/thread-get.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail_inbox\n */\n\n/**\n * Read every message in a conversation thread, oldest first.\n *\n * GET /gmail/v1/users/{userId}/threads/{id} —\n * https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.threads/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 Gmail Inbox 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 { GMAIL_INBOX } from \"../service.js\";\n\nexport const THREAD_GET_OPERATION = \"thread_get\";\n\nexport type ThreadGetOptions = {\n /** The node's resolved config. Keys: userId, id. */\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 gmailInboxThreadGet(options: ThreadGetOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.userId === undefined || config.userId === null || config.userId === \"\") {\n throw new Error(`thread_get: \"userId\" is required (Mailbox).`);\n }\n\n if (config.id === undefined || config.id === null || config.id === \"\") {\n throw new Error(`thread_get: \"id\" is required (Thread ID).`);\n }\n\n return callConnector(GMAIL_INBOX, {\n operation: THREAD_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: `/gmail/v1/users/${encodeURIComponent(String(config.userId))}/threads/${encodeURIComponent(String(config.id))}`,\n query: {\n \"format\": \"full\",\n },\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/triggers/message-received.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/message-received.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail_inbox\n */\n\n/**\n * Gmail Inbox'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 GMAIL INBOX. Two Gmail Inbox\n * triggers must not be able to disagree about how a delivery is verified.\n *\n * A SUBSCRIPTION: Gmail Inbox 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 { decodeDelivery, verifyDelivery, type DeliveryDecode, type InboundDelivery, type Jwk, type LeaseDeclaration, type OidcJwtScheme, readWithCursor, type CursorReadSpec, type Transport, type TriggerDescriptor, type WebhookVerification } from \"@particle-academy/fancy-connector-core\";\nimport { gmailInboxFaker } from \"../faker.js\";\nimport { gmailInboxHistoryList } from \"../actions/history-list.js\";\n\n/**\n * How Gmail Inbox's push is authenticated: a bearer token in `Authorization`,\n * signed by the provider, whose issuer must be one of these and whose\n * principal claim must EQUAL the service account the host configured. The\n * keys, the audience and the principal are the HOST's, passed to verify.\n */\nexport const GMAIL_INBOX_MESSAGE_RECEIVED_OIDC_SCHEME: OidcJwtScheme = {\n kind: \"oidc-jwt\",\n header: \"Authorization\",\n issuers: [\"https://accounts.google.com\", \"accounts.google.com\"],\n principalClaim: \"email\",\n verifiedClaim: \"email_verified\",\n};\n\n/**\n * The lease this subscription carries: where the provider's expiry sits in the\n * `mailbox_watch` response (`expiration`, epoch-ms), how early the host\n * renews, and what it calls when the lease is due. The host builds the value\n * with the core's `leaseFromResponse` and runs one scheduler for every\n * expiring trigger.\n */\nexport const GMAIL_INBOX_MESSAGE_RECEIVED_LEASE: LeaseDeclaration = {\n expiresAtFrom: \"expiration\",\n expiresAtUnit: \"epoch-ms\",\n renewBeforeSeconds: 86400,\n renewOperation: \"mailbox_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 GMAIL_INBOX_MESSAGE_RECEIVED_SUBSCRIPTION = { create: \"mailbox_watch\", renew: \"mailbox_watch\", stop: \"mailbox_stop\" } as const;\n\nexport const GMAIL_INBOX_MESSAGE_RECEIVED_DECODE: DeliveryDecode = {\n kind: \"pubsub-push\",\n};\n\nexport const GMAIL_INBOX_MESSAGE_RECEIVED: TriggerDescriptor = {\n service: \"gmail_inbox\",\n operation: \"message_received\",\n delivery: \"subscription\",\n setup:\n \"In YOUR app's Google Cloud project (the one owning the OAuth client): create a Pub/Sub topic, grant publish on it to gmail-api-push@system.gserviceaccount.com, and create a PUSH subscription to the route your host mounts for this trigger, with authentication on (a service account you choose; the endpoint URL as the audience). Put that audience and service account on the connection as pushAudience and pushServiceAccount, and fetch Google's signing keys for verification. Then call mailbox_watch with the topic for each mailbox and store its historyId as the trigger's cursor (startHistoryId); renew the watch daily. ONE topic serves every mailbox: route each push by its emailAddress, and only after the token verifies, to a mailbox you watched; drop an unmapped address with a 2xx. Persist cursor.next when a run succeeds. On cursor-expired or cursor-overflow, watch again for a fresh historyId FIRST, then list with message_list using the resyncQuery, and match it against the mail you already handled. This trigger never changes read state.\",\n subscriptionTtl: 604800,\n lease: GMAIL_INBOX_MESSAGE_RECEIVED_LEASE,\n verification: {\n scheme: GMAIL_INBOX_MESSAGE_RECEIVED_OIDC_SCHEME,\n },\n decode: GMAIL_INBOX_MESSAGE_RECEIVED_DECODE,\n route: { by: \"emailAddress\", path: \"data.emailAddress\" },\n faker: gmailInboxFaker,\n};\n\n/**\n * Where the follow-up read's cursor goes and comes from. The HOST stores it:\n * seeded from the `mailbox_watch` response's `historyId`, advanced to\n * `cursor.next` after each successful run, and filled into this trigger's\n * config on every run.\n */\nexport const GMAIL_INBOX_MESSAGE_RECEIVED_CURSOR: CursorReadSpec = {\n param: \"startHistoryId\",\n advanceFrom: \"historyId\",\n page: { param: \"pageToken\", from: \"nextPageToken\", collect: \"history\", maxPages: 20 },\n expiredStatus: 404,\n};\n\n/**\n * Read what changed since the HOST's stored cursor: `history_list` from\n * `config.startHistoryId`, every page, `history` concatenated, published under\n * `history` with `cursor: {used, next}`. Persist `cursor.next` once the run\n * succeeds. A lapsed cursor (cursor-expired) or too many pages\n * (cursor-overflow) is refused BY NAME with the bounded resync query, and a\n * missing one (cursor-missing) calls nothing. In fake mode with no stored\n * cursor the read is faked from a placeholder, so the node runs on a canvas.\n */\nexport async function readGmailInboxMessageReceivedAfter(\n event: unknown,\n config: Record<string, unknown>,\n options: { credentials?: Record<string, string | undefined>; transport?: Transport } = {},\n): Promise<Record<string, unknown>> {\n const stored = config.startHistoryId ?? (config.mode === \"fake\" ? \"1\" : undefined);\n const read = await readWithCursor(\n GMAIL_INBOX_MESSAGE_RECEIVED_CURSOR,\n stored,\n async (params) => {\n const result = await gmailInboxHistoryList({\n config: {\n userId: \"me\",\n maxResults: 100,\n ...(config.connection === undefined || config.connection === null ? {} : { connection: config.connection }),\n ...(config.mode === undefined || config.mode === null ? {} : { mode: config.mode }),\n labelId: config.labelId ?? \"INBOX\",\n historyTypes: config.historyTypes ?? \"messageAdded\",\n ...params,\n },\n input: event,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n });\n\n return result.data;\n },\n { resyncQuery: `newer_than:${String(config.resyncWindowDays ?? 7)}d` },\n );\n\n return {\n ...(event !== null && typeof event === \"object\" ? (event as Record<string, unknown>) : {}),\n history: read.data,\n cursor: read.cursor,\n };\n}\n\n/**\n * Verify one inbound Gmail Inbox delivery.\n *\n * The host calls this BEFORE starting a run. The body proves nothing here: the\n * delivery is authenticated by the bearer token in its header. `keys` are the\n * provider's signing keys (its JWKS `keys`), fetched and cached by the HOST;\n * nothing in this package fetches them. `pushAudience` and\n * `pushServiceAccount` are the connection's, and both are REQUIRED: an\n * unchecked audience accepts every token the provider signs for anyone, and an\n * unchecked principal accepts a stranger's subscription aimed at your URL. Any\n * of the three missing refuses every delivery.\n */\nexport function verifyGmailInboxDelivery(\n delivery: InboundDelivery,\n expected: { keys: readonly Jwk[]; pushAudience: string | undefined; pushServiceAccount: string | undefined },\n now?: number,\n): Promise<WebhookVerification> {\n return verifyDelivery(GMAIL_INBOX_MESSAGE_RECEIVED, delivery, undefined, now, {\n keys: expected.keys,\n audience: expected.pushAudience ?? null,\n principal: expected.pushServiceAccount ?? null,\n });\n}\n\n/**\n * Read one VERIFIED Gmail Inbox delivery.\n *\n * The body is not plain JSON: it is pubsub-push, the provider's envelope,\n * unwrapped to the message it carries. The host calls this AFTER\n * `verifyGmailInboxDelivery` has accepted the delivery, with the SAME raw\n * bytes, and starts the run with what it returns. A body that cannot be read\n * is refused by name, never passed on.\n */\nexport function decodeGmailInboxDelivery(raw: Uint8Array | string): unknown {\n return decodeDelivery(GMAIL_INBOX_MESSAGE_RECEIVED_DECODE, raw);\n}\n"]}