@particle-academy/gmail-ui 0.2.0 → 0.3.1
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 +61 -0
- package/README.md +52 -0
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,65 @@ The four packages share one version, because they are generated from one
|
|
|
7
7
|
`provider/` definition and a version that meant something different in each
|
|
8
8
|
would be a version nobody could reason about.
|
|
9
9
|
|
|
10
|
+
## [0.3.1] — 2026-08-24
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **`@particle-academy/gmail-js` now accepts a RANGE of `@particle-academy/gmail-ui`, not one exact version.**
|
|
15
|
+
|
|
16
|
+
It peer-depended on `@particle-academy/gmail-ui` at exactly the release it shipped with. That is the
|
|
17
|
+
strict form of the thing the kit's own rule forbids — a first-party sibling gets
|
|
18
|
+
a range — and the same block applied the rule correctly to its other two
|
|
19
|
+
dependencies. It was this one pair that slipped.
|
|
20
|
+
|
|
21
|
+
What it cost: ship `@particle-academy/gmail-ui` with a fixed help string and every consumer on the
|
|
22
|
+
previous `@particle-academy/gmail-js` had an **unmet peer**, which npm 7+ errors on. A documentation
|
|
23
|
+
patch could not be delivered without a matching runtime release, and a routine
|
|
24
|
+
`npm update` that moved the ui package alone broke the install.
|
|
25
|
+
|
|
26
|
+
The coupling is real and is not being loosened away. The ui package emits the
|
|
27
|
+
config schema and the js package implements against it, so a ui that adds a
|
|
28
|
+
field to a js that ignores it is silently wrong. But a PATCH is non-additive by
|
|
29
|
+
definition and a MINOR is where a field can appear — so `>=0.3.1 <0.4.0` is the
|
|
30
|
+
coupling that actually exists rather than the strictest one expressible.
|
|
31
|
+
|
|
32
|
+
Nothing else changed. `particle-academy/gmail-php` and `fancy-gmail` are unaffected; neither has an
|
|
33
|
+
equivalent edge.
|
|
34
|
+
|
|
35
|
+
## [0.3.0] — 2026-08-24
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- **The README now says how to SET THIS CONNECTOR UP**, in the package itself.
|
|
40
|
+
|
|
41
|
+
Until now it explained what the four packages are, what they cost and why the
|
|
42
|
+
repo is generated — and said nothing about credentials, scopes, sandboxes or
|
|
43
|
+
operations. Somebody who installed it could not learn from it which credentials
|
|
44
|
+
a connection needs, where a human GETS them, which scopes to request, or what
|
|
45
|
+
the connector can actually do. All of that was already in the definition; the
|
|
46
|
+
one document a consumer reads was the one that omitted everything actionable.
|
|
47
|
+
|
|
48
|
+
The new **Setting it up** section carries:
|
|
49
|
+
|
|
50
|
+
- every credential, with the text saying where the value comes from, whether it
|
|
51
|
+
is **per installation** or **per connected account**, and whether it is secret;
|
|
52
|
+
- the OAuth authorize and token URLs and the exact scopes, verbatim;
|
|
53
|
+
- the access-token lifetime, and where refresh tokens ROTATE, the two things a
|
|
54
|
+
host must not do — retry a failed refresh, or refresh concurrently — because a
|
|
55
|
+
replay revokes the entire grant and nothing in the failure says why;
|
|
56
|
+
- the estate in this provider's own terms, including the cases where a
|
|
57
|
+
successful-looking run reaches nobody, or reaches the real one;
|
|
58
|
+
- every action and trigger with its method, path, inputs, and whether it is safe
|
|
59
|
+
to replay;
|
|
60
|
+
- a trigger's provider-side setup, which nobody can derive from anything else.
|
|
61
|
+
|
|
62
|
+
It is **generated from `provider/manifest.json`**, so it cannot drift from what
|
|
63
|
+
the packages do — which is the point at a few hundred providers, where a
|
|
64
|
+
hand-written setup section is a few hundred documents going quietly stale.
|
|
65
|
+
|
|
66
|
+
No code changed. This release exists because a registry and an installing agent
|
|
67
|
+
read the PUBLISHED artifact, and the artifact carried the old README.
|
|
68
|
+
|
|
10
69
|
## [0.2.0] — 2026-08-24
|
|
11
70
|
|
|
12
71
|
### Changed
|
|
@@ -92,3 +151,5 @@ which is why `refreshToken` is required rather than optional.
|
|
|
92
151
|
|
|
93
152
|
[0.1.0]: https://github.com/Fancy-Friends/gmail/releases/tag/v0.1.0
|
|
94
153
|
[0.2.0]: https://github.com/Fancy-Friends/gmail/releases/tag/v0.2.0
|
|
154
|
+
[0.3.0]: https://github.com/Fancy-Friends/gmail/releases/tag/v0.3.0
|
|
155
|
+
[0.3.1]: https://github.com/Fancy-Friends/gmail/releases/tag/v0.3.1
|
package/README.md
CHANGED
|
@@ -27,6 +27,58 @@ dependencies.
|
|
|
27
27
|
subject to the kit's full approval bar, and one per provider is hundreds of
|
|
28
28
|
dependencies nobody is tracking.
|
|
29
29
|
|
|
30
|
+
## Setting it up
|
|
31
|
+
|
|
32
|
+
Everything below is generated from `provider/manifest.json`, so it cannot disagree with what the packages do.
|
|
33
|
+
|
|
34
|
+
### Credentials
|
|
35
|
+
|
|
36
|
+
A Gmail connection holds 4 values.
|
|
37
|
+
|
|
38
|
+
**Two kinds of value, and mixing them up matters.** A `provider` credential is ONE value for the whole installation — an OAuth app's client secret serves every connected account. An `account` credential is one per connected account. A host that stores the second where it stores the first lets one account's credentials reach another's.
|
|
39
|
+
|
|
40
|
+
| Field | Scope | Secret | Where it comes from |
|
|
41
|
+
|---|---|---|---|
|
|
42
|
+
| **OAuth client ID** | per installation | not secret | From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account. |
|
|
43
|
+
| **OAuth client secret** | per installation | **secret** | The client secret for the same OAuth app. One value for the whole installation. |
|
|
44
|
+
| **Access token** | per connected account | **secret** | Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token. |
|
|
45
|
+
| **Refresh token** | per connected account | **secret** | Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour. |
|
|
46
|
+
|
|
47
|
+
### Authorising
|
|
48
|
+
|
|
49
|
+
Gmail uses OAuth2 (authorization_code). The package DECLARES the exchange; the HOST performs it — a consent screen needs a browser, a redirect URI and somewhere to persist the result, and all three belong to the host.
|
|
50
|
+
|
|
51
|
+
- **Authorize URL** — https://accounts.google.com/o/oauth2/v2/auth
|
|
52
|
+
- **Token URL** — https://oauth2.googleapis.com/token
|
|
53
|
+
- **Scopes** — `https://www.googleapis.com/auth/gmail.send`
|
|
54
|
+
- **Access token lifetime** — 3600 seconds (1 hours). A host that never refreshes works all afternoon and is broken by morning.
|
|
55
|
+
|
|
56
|
+
The refresh tokens do **not** rotate: the same one is reusable, so a refresh may safely be retried and may run concurrently. Stated rather than assumed, because the opposite — a provider that spends the token and revokes the grant on a replay — looks identical until it happens.
|
|
57
|
+
|
|
58
|
+
### The estate
|
|
59
|
+
|
|
60
|
+
**Gmail has no test estate, and somebody checked.** Everything this connector does is real. Use the faker to build against it.
|
|
61
|
+
|
|
62
|
+
> Gmail has no sandbox. A send is a real email to a real address -- point this at your own inbox before pointing it at anybody else's. The faker is the only way to develop against it without delivering mail.
|
|
63
|
+
|
|
64
|
+
## What it can do
|
|
65
|
+
|
|
66
|
+
### Actions
|
|
67
|
+
|
|
68
|
+
#### `message_send` — Gmail message
|
|
69
|
+
|
|
70
|
+
Send an email from a connected Gmail account.
|
|
71
|
+
|
|
72
|
+
`POST /gmail/v1/users/{userId}/messages/send` · **unsafe to replay** — a retried durable run does it TWICE
|
|
73
|
+
|
|
74
|
+
| Input | Required | What it is |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| `userId` | yes | Whose mailbox to send from. `me` is the connected account and is almost always what you want. |
|
|
77
|
+
| `to` | yes | Recipient address. Several can be given, comma separated, exactly as an email client accepts them. |
|
|
78
|
+
| `cc` | no | Copied recipients, comma separated. Left empty the header is omitted entirely rather than sent blank. |
|
|
79
|
+
| `subject` | yes | Subject |
|
|
80
|
+
| `body` | yes | The plain-text body. It is sent as text/plain; UTF-8, so accented characters and emoji survive. |
|
|
81
|
+
|
|
30
82
|
## Run it before you have credentials
|
|
31
83
|
|
|
32
84
|
Every operation ships a **faker**, whether or not Gmail has a sandbox. Set a
|
package/dist/index.cjs
CHANGED
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/service.ts","../src/kinds/message-send.ts","../src/index.ts"],"names":["defineConnectorKind","summarize"],"mappings":";;;;;AAiCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,aAAA,GAAgB;AAAA,EAC3B,OAAA,EAAS,OAAA;AAAA,EACT,YAAA,EAAc,OAAA;AAAA,EACd,MAAA,EAAQ,OAAA;AAAA,EACR,OAAA,EAAS;AACX;AAGO,IAAM,iBAAA,GAAoB;AAAA,EAC/B;AAAA,IACE,KAAA,EAAO,UAAA;AAAA,IACP,OAAA,EAAS,iBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,KAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,qBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,aAAA;AAAA,IACP,OAAA,EAAS,cAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,eAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA;AAEZ;AAcO,IAAM,WAAA,GAAc;AAAA,EACzB,MAAA,EAAQ,oBAAA;AAAA,EACR,cAAA,EAAgB,8CAAA;AAAA,EAChB,UAAA,EAAY,qCAAA;AAAA,EACZ,QAAA,EAAU;AAAA,IACR;AAAA,GACF;AAAA,EACA,uBAAA,EAAyB,aAAA;AAAA,EACzB,wBAA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AAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,IAAA;AAAA,MACP,OAAA,EAAS,IAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,IAAA;AAAA,MACP,OAAA,EAAS,IAAA;AAAA,MACT,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,SAAA;AAAA,MACP,OAAA,EAAS,SAAA;AAAA,MACT,UAAA,EAAY;AAAA,KACd;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,UAAA;AAAA,MACR,KAAA,EAAO,MAAA;AAAA,MACP,OAAA,EAAS,SAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,aAAA,EAAe;AAAA;AACjB,GACF;AAAA,EACA,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACbC,oBAAA,CAAU,kBAAA,EAAoB,QAAmC,eAAe;AACpF,CAAC;;;AC9EM,IAAM,WAAA,GAAoC;AAAA,EAC/C;AACF","file":"index.cjs","sourcesContent":["/**\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\n */\n\n/**\n * Gmail's identity on the authoring surface, shared by every Gmail node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Gmail has no sandbox. A send is a real email to a real address -- point this\n * at your own inbox before pointing it at anybody else's. The faker is the\n * only way to develop against it without delivering mail.\n */\n\nimport type { ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\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.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GMAIL_SERVICE = {\n service: \"gmail\",\n serviceTitle: \"Gmail\",\n domain: \"email\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/** The credentials a Gmail connection holds. */\nexport const GMAIL_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app. One value for the whole installation.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Gmail requires — DECLARED here, performed by the host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n */\nexport const GMAIL_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/gmail.send\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Gmail node's connector metadata from the operation it performs. */\nexport function gmailMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GMAIL_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/message-send.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-send.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail\n */\n\n/**\n * Gmail message — Send an email from a connected Gmail account.\n *\n * https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/send\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { gmailMeta } from \"../service.js\";\n\nexport const GMAIL_MESSAGE_KIND = \"@particle-academy/gmail_message\";\nexport const GMAIL_MESSAGE_OPERATION = \"message_send\";\n\nexport const GMAIL_MESSAGE_META = gmailMeta(\"action\", \"send an email\", \"https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/send\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GMAIL_MESSAGE_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.id\",\n \"type\": \"string\",\n \"description\": \"Gmail's id for the sent message.\"\n },\n {\n \"path\": \"data.threadId\",\n \"type\": \"string\",\n \"description\": \"The thread it landed in. Gmail groups by subject and references, so a reply to an existing conversation shares this.\"\n },\n {\n \"path\": \"data.labelIds\",\n \"type\": \"array\",\n \"description\": \"Labels Gmail applied, typically SENT.\"\n }\n];\n\nexport const gmailMessageKind: NodeKindDefinition = defineConnectorKind(GMAIL_MESSAGE_META, {\n name: GMAIL_MESSAGE_KIND,\n aliases: [\"gmail_message\"],\n label: \"Gmail message\",\n description: \"Send an email from a connected Gmail account.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GMAIL_MESSAGE_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"userId\",\n \"label\": \"Send as\",\n \"required\": true,\n \"default\": \"me\",\n \"description\": \"Whose mailbox to send from. `me` is the connected account and is almost always what you want.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"to\",\n \"label\": \"To\",\n \"required\": true,\n \"description\": \"Recipient address. Several can be given, comma separated, exactly as an email client accepts them.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"cc\",\n \"label\": \"Cc\",\n \"description\": \"Copied recipients, comma separated. Left empty the header is omitted entirely rather than sent blank.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"subject\",\n \"label\": \"Subject\",\n \"required\": true\n },\n {\n \"type\": \"textarea\",\n \"key\": \"body\",\n \"label\": \"Message\",\n \"required\": true,\n \"description\": \"The plain-text body. It is sent as text/plain; UTF-8, so accented characters and emoji survive.\"\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GMAIL_MESSAGE_META, config as Record<string, unknown>, \"send an email\"),\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\n */\n\n/**\n * Gmail's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/message-send.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { gmailMessageKind } from \"./kinds/message-send.js\";\n\n/** Every Gmail kind, for a host that registers the lot. */\nexport const GMAIL_KINDS: NodeKindDefinition[] = [\n gmailMessageKind,\n];\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/service.ts","../src/kinds/message-send.ts","../src/index.ts"],"names":["defineConnectorKind","summarize"],"mappings":";;;;;AAiCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,aAAA,GAAgB;AAAA,EAC3B,OAAA,EAAS,OAAA;AAAA,EACT,YAAA,EAAc,OAAA;AAAA,EACd,MAAA,EAAQ,OAAA;AAAA,EACR,OAAA,EAAS;AACX;AA+BO,IAAM,iBAAA,GAAoB;AAAA,EAC/B;AAAA,IACE,KAAA,EAAO,UAAA;AAAA,IACP,OAAA,EAAS,iBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,KAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,qBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,aAAA;AAAA,IACP,OAAA,EAAS,cAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,eAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA;AAEZ;AAmBO,IA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;AAAA,EACb,WAAA,EAAa,oBAAA;AAAA,EACb,YAAA,EAAc;AAAA,IACZ;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,QAAA;AAAA,MACP,OAAA,EAAS,SAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,SAAA,EAAW,IAAA;AAAA,MACX,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,IAAA;AAAA,MACP,OAAA,EAAS,IAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,IAAA;AAAA,MACP,OAAA,EAAS,IAAA;AAAA,MACT,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,SAAA;AAAA,MACP,OAAA,EAAS,SAAA;AAAA,MACT,UAAA,EAAY;AAAA,KACd;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,UAAA;AAAA,MACR,KAAA,EAAO,MAAA;AAAA,MACP,OAAA,EAAS,SAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,aAAA,EAAe;AAAA;AACjB,GACF;AAAA,EACA,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACbC,oBAAA,CAAU,kBAAA,EAAoB,QAAmC,eAAe;AACpF,CAAC;;;AC9EM,IAAM,WAAA,GAAoC;AAAA,EAC/C;AACF","file":"index.cjs","sourcesContent":["/**\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\n */\n\n/**\n * Gmail's identity on the authoring surface, shared by every Gmail node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Gmail has no sandbox. A send is a real email to a real address -- point this\n * at your own inbox before pointing it at anybody else's. The faker is the\n * only way to develop against it without delivering mail.\n */\n\nimport type { ConnectorDomain, ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\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.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GMAIL_SERVICE = {\n service: \"gmail\",\n serviceTitle: \"Gmail\",\n domain: \"email\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/**\n * Every connector domain weaver knows, pinned against fancy-flow's union.\n *\n * A closed set copied into three codebases stays correct only while something\n * MAKES it: this line fails to compile the moment weaver carries a value\n * fancy-flow does not, including the values no provider uses yet.\n */\nconst WEAVER_DOMAINS: readonly ConnectorDomain[] = [\n \"payments\",\n \"commerce\",\n \"messaging\",\n \"email\",\n \"crm\",\n \"support\",\n \"storage\",\n \"calendar\",\n \"productivity\",\n \"database\",\n \"devtools\",\n \"analytics\",\n \"marketing\",\n \"ai\",\n \"forms\",\n \"hr\",\n \"geo\"\n];\nvoid WEAVER_DOMAINS;\n\n/** The credentials a Gmail connection holds. */\nexport const GMAIL_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app. One value for the whole installation.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Gmail requires — DECLARED here, performed by the host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n *\n * Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may\n * safely be retried and may run concurrently. That is stated rather than\n * assumed because the opposite — a provider that spends the token and revokes\n * the grant on a replay — looks identical until it happens.\n */\nexport const GMAIL_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/gmail.send\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Gmail node's connector metadata from the operation it performs. */\nexport function gmailMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GMAIL_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/message-send.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-send.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail\n */\n\n/**\n * Gmail message — Send an email from a connected Gmail account.\n *\n * https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/send\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { gmailMeta } from \"../service.js\";\n\nexport const GMAIL_MESSAGE_KIND = \"@particle-academy/gmail_message\";\nexport const GMAIL_MESSAGE_OPERATION = \"message_send\";\n\nexport const GMAIL_MESSAGE_META = gmailMeta(\"action\", \"send an email\", \"https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/send\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GMAIL_MESSAGE_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.id\",\n \"type\": \"string\",\n \"description\": \"Gmail's id for the sent message.\"\n },\n {\n \"path\": \"data.threadId\",\n \"type\": \"string\",\n \"description\": \"The thread it landed in. Gmail groups by subject and references, so a reply to an existing conversation shares this.\"\n },\n {\n \"path\": \"data.labelIds\",\n \"type\": \"array\",\n \"description\": \"Labels Gmail applied, typically SENT.\"\n }\n];\n\nexport const gmailMessageKind: NodeKindDefinition = defineConnectorKind(GMAIL_MESSAGE_META, {\n name: GMAIL_MESSAGE_KIND,\n aliases: [\"gmail_message\"],\n label: \"Gmail message\",\n description: \"Send an email from a connected Gmail account.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GMAIL_MESSAGE_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"userId\",\n \"label\": \"Send as\",\n \"required\": true,\n \"default\": \"me\",\n \"description\": \"Whose mailbox to send from. `me` is the connected account and is almost always what you want.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"to\",\n \"label\": \"To\",\n \"required\": true,\n \"description\": \"Recipient address. Several can be given, comma separated, exactly as an email client accepts them.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"cc\",\n \"label\": \"Cc\",\n \"description\": \"Copied recipients, comma separated. Left empty the header is omitted entirely rather than sent blank.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"subject\",\n \"label\": \"Subject\",\n \"required\": true\n },\n {\n \"type\": \"textarea\",\n \"key\": \"body\",\n \"label\": \"Message\",\n \"required\": true,\n \"description\": \"The plain-text body. It is sent as text/plain; UTF-8, so accented characters and emoji survive.\"\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GMAIL_MESSAGE_META, config as Record<string, unknown>, \"send an email\"),\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\n */\n\n/**\n * Gmail's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/message-send.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { gmailMessageKind } from \"./kinds/message-send.js\";\n\n/** Every Gmail kind, for a host that registers the lot. */\nexport const GMAIL_KINDS: NodeKindDefinition[] = [\n gmailMessageKind,\n];\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -77,6 +77,11 @@ declare const GMAIL_CREDENTIALS: readonly [{
|
|
|
77
77
|
* The access token lasts 3600 seconds. A host that never refreshes will work
|
|
78
78
|
* all afternoon and be broken by morning, which is why the lifetime is stated
|
|
79
79
|
* rather than left to be discovered.
|
|
80
|
+
*
|
|
81
|
+
* Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may
|
|
82
|
+
* safely be retried and may run concurrently. That is stated rather than
|
|
83
|
+
* assumed because the opposite — a provider that spends the token and revokes
|
|
84
|
+
* the grant on a replay — looks identical until it happens.
|
|
80
85
|
*/
|
|
81
86
|
declare const GMAIL_OAUTH: {
|
|
82
87
|
readonly flow: "authorization_code";
|
|
@@ -85,6 +90,7 @@ declare const GMAIL_OAUTH: {
|
|
|
85
90
|
readonly scopes: readonly ["https://www.googleapis.com/auth/gmail.send"];
|
|
86
91
|
readonly accessTokenCredential: "accessToken";
|
|
87
92
|
readonly refreshTokenCredential: "refreshToken";
|
|
93
|
+
readonly refreshTokenRotates: false;
|
|
88
94
|
readonly accessTokenTtlSeconds: 3600;
|
|
89
95
|
};
|
|
90
96
|
/** Build a Gmail node's connector metadata from the operation it performs. */
|
package/dist/index.d.ts
CHANGED
|
@@ -77,6 +77,11 @@ declare const GMAIL_CREDENTIALS: readonly [{
|
|
|
77
77
|
* The access token lasts 3600 seconds. A host that never refreshes will work
|
|
78
78
|
* all afternoon and be broken by morning, which is why the lifetime is stated
|
|
79
79
|
* rather than left to be discovered.
|
|
80
|
+
*
|
|
81
|
+
* Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may
|
|
82
|
+
* safely be retried and may run concurrently. That is stated rather than
|
|
83
|
+
* assumed because the opposite — a provider that spends the token and revokes
|
|
84
|
+
* the grant on a replay — looks identical until it happens.
|
|
80
85
|
*/
|
|
81
86
|
declare const GMAIL_OAUTH: {
|
|
82
87
|
readonly flow: "authorization_code";
|
|
@@ -85,6 +90,7 @@ declare const GMAIL_OAUTH: {
|
|
|
85
90
|
readonly scopes: readonly ["https://www.googleapis.com/auth/gmail.send"];
|
|
86
91
|
readonly accessTokenCredential: "accessToken";
|
|
87
92
|
readonly refreshTokenCredential: "refreshToken";
|
|
93
|
+
readonly refreshTokenRotates: false;
|
|
88
94
|
readonly accessTokenTtlSeconds: 3600;
|
|
89
95
|
};
|
|
90
96
|
/** Build a Gmail node's connector metadata from the operation it performs. */
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/service.ts","../src/kinds/message-send.ts","../src/index.ts"],"names":[],"mappings":";;;AAiCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,aAAA,GAAgB;AAAA,EAC3B,OAAA,EAAS,OAAA;AAAA,EACT,YAAA,EAAc,OAAA;AAAA,EACd,MAAA,EAAQ,OAAA;AAAA,EACR,OAAA,EAAS;AACX;AAGO,IAAM,iBAAA,GAAoB;AAAA,EAC/B;AAAA,IACE,KAAA,EAAO,UAAA;AAAA,IACP,OAAA,EAAS,iBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,KAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,qBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,aAAA;AAAA,IACP,OAAA,EAAS,cAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,eAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA;AAEZ;AAcO,IAAM,WAAA,GAAc;AAAA,EACzB,MAAA,EAAQ,oBAAA;AAAA,EACR,cAAA,EAAgB,8CAAA;AAAA,EAChB,UAAA,EAAY,qCAAA;AAAA,EACZ,QAAA,EAAU;AAAA,IACR;AAAA,GACF;AAAA,EACA,uBAAA,EAAyB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AAA,MACX,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,IAAA;AAAA,MACP,OAAA,EAAS,IAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,IAAA;AAAA,MACP,OAAA,EAAS,IAAA;AAAA,MACT,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,SAAA;AAAA,MACP,OAAA,EAAS,SAAA;AAAA,MACT,UAAA,EAAY;AAAA,KACd;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,UAAA;AAAA,MACR,KAAA,EAAO,MAAA;AAAA,MACP,OAAA,EAAS,SAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,aAAA,EAAe;AAAA;AACjB,GACF;AAAA,EACA,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACb,SAAA,CAAU,kBAAA,EAAoB,QAAmC,eAAe;AACpF,CAAC;;;AC9EM,IAAM,WAAA,GAAoC;AAAA,EAC/C;AACF","file":"index.js","sourcesContent":["/**\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\n */\n\n/**\n * Gmail's identity on the authoring surface, shared by every Gmail node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Gmail has no sandbox. A send is a real email to a real address -- point this\n * at your own inbox before pointing it at anybody else's. The faker is the\n * only way to develop against it without delivering mail.\n */\n\nimport type { ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\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.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GMAIL_SERVICE = {\n service: \"gmail\",\n serviceTitle: \"Gmail\",\n domain: \"email\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/** The credentials a Gmail connection holds. */\nexport const GMAIL_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app. One value for the whole installation.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Gmail requires — DECLARED here, performed by the host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n */\nexport const GMAIL_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/gmail.send\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Gmail node's connector metadata from the operation it performs. */\nexport function gmailMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GMAIL_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/message-send.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-send.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail\n */\n\n/**\n * Gmail message — Send an email from a connected Gmail account.\n *\n * https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/send\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { gmailMeta } from \"../service.js\";\n\nexport const GMAIL_MESSAGE_KIND = \"@particle-academy/gmail_message\";\nexport const GMAIL_MESSAGE_OPERATION = \"message_send\";\n\nexport const GMAIL_MESSAGE_META = gmailMeta(\"action\", \"send an email\", \"https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/send\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GMAIL_MESSAGE_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.id\",\n \"type\": \"string\",\n \"description\": \"Gmail's id for the sent message.\"\n },\n {\n \"path\": \"data.threadId\",\n \"type\": \"string\",\n \"description\": \"The thread it landed in. Gmail groups by subject and references, so a reply to an existing conversation shares this.\"\n },\n {\n \"path\": \"data.labelIds\",\n \"type\": \"array\",\n \"description\": \"Labels Gmail applied, typically SENT.\"\n }\n];\n\nexport const gmailMessageKind: NodeKindDefinition = defineConnectorKind(GMAIL_MESSAGE_META, {\n name: GMAIL_MESSAGE_KIND,\n aliases: [\"gmail_message\"],\n label: \"Gmail message\",\n description: \"Send an email from a connected Gmail account.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GMAIL_MESSAGE_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"userId\",\n \"label\": \"Send as\",\n \"required\": true,\n \"default\": \"me\",\n \"description\": \"Whose mailbox to send from. `me` is the connected account and is almost always what you want.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"to\",\n \"label\": \"To\",\n \"required\": true,\n \"description\": \"Recipient address. Several can be given, comma separated, exactly as an email client accepts them.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"cc\",\n \"label\": \"Cc\",\n \"description\": \"Copied recipients, comma separated. Left empty the header is omitted entirely rather than sent blank.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"subject\",\n \"label\": \"Subject\",\n \"required\": true\n },\n {\n \"type\": \"textarea\",\n \"key\": \"body\",\n \"label\": \"Message\",\n \"required\": true,\n \"description\": \"The plain-text body. It is sent as text/plain; UTF-8, so accented characters and emoji survive.\"\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GMAIL_MESSAGE_META, config as Record<string, unknown>, \"send an email\"),\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\n */\n\n/**\n * Gmail's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/message-send.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { gmailMessageKind } from \"./kinds/message-send.js\";\n\n/** Every Gmail kind, for a host that registers the lot. */\nexport const GMAIL_KINDS: NodeKindDefinition[] = [\n gmailMessageKind,\n];\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/service.ts","../src/kinds/message-send.ts","../src/index.ts"],"names":[],"mappings":";;;AAiCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,aAAA,GAAgB;AAAA,EAC3B,OAAA,EAAS,OAAA;AAAA,EACT,YAAA,EAAc,OAAA;AAAA,EACd,MAAA,EAAQ,OAAA;AAAA,EACR,OAAA,EAAS;AACX;AA+BO,IAAM,iBAAA,GAAoB;AAAA,EAC/B;AAAA,IACE,KAAA,EAAO,UAAA;AAAA,IACP,OAAA,EAAS,iBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,KAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,qBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,aAAA;AAAA,IACP,OAAA,EAAS,cAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,eAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA;AAEZ;AAmBO,IA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AAAA,EACb,WAAA,EAAa,oBAAA;AAAA,EACb,YAAA,EAAc;AAAA,IACZ;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,QAAA;AAAA,MACP,OAAA,EAAS,SAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,SAAA,EAAW,IAAA;AAAA,MACX,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,IAAA;AAAA,MACP,OAAA,EAAS,IAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,IAAA;AAAA,MACP,OAAA,EAAS,IAAA;AAAA,MACT,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,SAAA;AAAA,MACP,OAAA,EAAS,SAAA;AAAA,MACT,UAAA,EAAY;AAAA,KACd;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,UAAA;AAAA,MACR,KAAA,EAAO,MAAA;AAAA,MACP,OAAA,EAAS,SAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,aAAA,EAAe;AAAA;AACjB,GACF;AAAA,EACA,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACb,SAAA,CAAU,kBAAA,EAAoB,QAAmC,eAAe;AACpF,CAAC;;;AC9EM,IAAM,WAAA,GAAoC;AAAA,EAC/C;AACF","file":"index.js","sourcesContent":["/**\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\n */\n\n/**\n * Gmail's identity on the authoring surface, shared by every Gmail node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Gmail has no sandbox. A send is a real email to a real address -- point this\n * at your own inbox before pointing it at anybody else's. The faker is the\n * only way to develop against it without delivering mail.\n */\n\nimport type { ConnectorDomain, ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\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.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GMAIL_SERVICE = {\n service: \"gmail\",\n serviceTitle: \"Gmail\",\n domain: \"email\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/**\n * Every connector domain weaver knows, pinned against fancy-flow's union.\n *\n * A closed set copied into three codebases stays correct only while something\n * MAKES it: this line fails to compile the moment weaver carries a value\n * fancy-flow does not, including the values no provider uses yet.\n */\nconst WEAVER_DOMAINS: readonly ConnectorDomain[] = [\n \"payments\",\n \"commerce\",\n \"messaging\",\n \"email\",\n \"crm\",\n \"support\",\n \"storage\",\n \"calendar\",\n \"productivity\",\n \"database\",\n \"devtools\",\n \"analytics\",\n \"marketing\",\n \"ai\",\n \"forms\",\n \"hr\",\n \"geo\"\n];\nvoid WEAVER_DOMAINS;\n\n/** The credentials a Gmail connection holds. */\nexport const GMAIL_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app. One value for the whole installation.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Gmail requires — DECLARED here, performed by the host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n *\n * Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may\n * safely be retried and may run concurrently. That is stated rather than\n * assumed because the opposite — a provider that spends the token and revokes\n * the grant on a replay — looks identical until it happens.\n */\nexport const GMAIL_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/gmail.send\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Gmail node's connector metadata from the operation it performs. */\nexport function gmailMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GMAIL_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/message-send.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-send.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- gmail\n */\n\n/**\n * Gmail message — Send an email from a connected Gmail account.\n *\n * https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/send\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { gmailMeta } from \"../service.js\";\n\nexport const GMAIL_MESSAGE_KIND = \"@particle-academy/gmail_message\";\nexport const GMAIL_MESSAGE_OPERATION = \"message_send\";\n\nexport const GMAIL_MESSAGE_META = gmailMeta(\"action\", \"send an email\", \"https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/send\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GMAIL_MESSAGE_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.id\",\n \"type\": \"string\",\n \"description\": \"Gmail's id for the sent message.\"\n },\n {\n \"path\": \"data.threadId\",\n \"type\": \"string\",\n \"description\": \"The thread it landed in. Gmail groups by subject and references, so a reply to an existing conversation shares this.\"\n },\n {\n \"path\": \"data.labelIds\",\n \"type\": \"array\",\n \"description\": \"Labels Gmail applied, typically SENT.\"\n }\n];\n\nexport const gmailMessageKind: NodeKindDefinition = defineConnectorKind(GMAIL_MESSAGE_META, {\n name: GMAIL_MESSAGE_KIND,\n aliases: [\"gmail_message\"],\n label: \"Gmail message\",\n description: \"Send an email from a connected Gmail account.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GMAIL_MESSAGE_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"userId\",\n \"label\": \"Send as\",\n \"required\": true,\n \"default\": \"me\",\n \"description\": \"Whose mailbox to send from. `me` is the connected account and is almost always what you want.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"to\",\n \"label\": \"To\",\n \"required\": true,\n \"description\": \"Recipient address. Several can be given, comma separated, exactly as an email client accepts them.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"cc\",\n \"label\": \"Cc\",\n \"description\": \"Copied recipients, comma separated. Left empty the header is omitted entirely rather than sent blank.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"subject\",\n \"label\": \"Subject\",\n \"required\": true\n },\n {\n \"type\": \"textarea\",\n \"key\": \"body\",\n \"label\": \"Message\",\n \"required\": true,\n \"description\": \"The plain-text body. It is sent as text/plain; UTF-8, so accented characters and emoji survive.\"\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GMAIL_MESSAGE_META, config as Record<string, unknown>, \"send an email\"),\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\n */\n\n/**\n * Gmail's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/message-send.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { gmailMessageKind } from \"./kinds/message-send.js\";\n\n/** Every Gmail kind, for a host that registers the lot. */\nexport const GMAIL_KINDS: NodeKindDefinition[] = [\n gmailMessageKind,\n];\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/gmail-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Gmail's authoring surface for fancy-flow — the node kinds, their config schemas and their declared output shapes. React on every host; carries no executor.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|