@particle-academy/google-ads-ui 0.1.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,52 @@ All notable changes to `@particle-academy/google-ads-ui`,
4
4
  `@particle-academy/google-ads-js`, `particle-academy/google-ads-php` and
5
5
  `fancy-google-ads`.
6
6
 
7
+ ## [0.3.0] — 2026-11-08
8
+
9
+ ### Added
10
+
11
+ - **One Google consent grant, shared by every Google connector** (`oauth.grant:
12
+ "google"`), for an org-level Google connection: one OAuth client, one consent
13
+ and one refresh token per person, with each feature's scopes asked for when it
14
+ is first used. Declared in the manifest, the `-ui` package's OAuth constant,
15
+ the README and the registry index:
16
+ - `authorizeParams`: `access_type=offline` and `include_granted_scopes=true`.
17
+ A refresh token comes back only on the FIRST code exchange, so keep the stored
18
+ one when an exchange returns none.
19
+ - `revoke`: POST `https://oauth2.googleapis.com/revoke` with `token`, and
20
+ `scope: "grant"`. **Revoking removes the person's WHOLE Google grant, every
21
+ Google connector**, so a per-feature disconnect stops using that feature's
22
+ scopes locally and only a full Google disconnect revokes.
23
+ - `identity`: identify the account by the id_token's `sub` (request `openid`;
24
+ issuer `https://accounts.google.com` or `accounts.google.com`; audience is
25
+ the `clientId`), never by email, which Google says is neither unique nor
26
+ permanent.
27
+ `restrictedScopes` is empty: none of this connector's scopes is restricted.
28
+
29
+ Nothing a request sends has changed; this is what a host needs to run the
30
+ connection.
31
+
32
+ ## [0.2.0] — 2026-11-08
33
+
34
+ ### Added
35
+
36
+ - **Laravel integration, in this package** (`src/Laravel/`), auto-discovered
37
+ through composer's `extra.laravel`. Laravel is SUGGESTED, never required:
38
+ outside a Laravel app none of it loads.
39
+ - a service provider that merges `config/google-ads.php` under
40
+ `connectors.google-ads` (credentials from the environment, or per call for a
41
+ multi-account app);
42
+ - the `GoogleAds` facade: `GoogleAds::call('<operation>', [...])` runs any action;
43
+ - `GoogleAds::fake()`, answered from the connector's faker, with
44
+ `assertSent` / `assertNotSent` / `assertNothingSent` / `assertSentCount`;
45
+ - its own Pest test of all of it against a booted Laravel app.
46
+
47
+ ### Changed
48
+
49
+ - **Tests: Pest `^5`**, and `laravel/framework` `^13` as a DEV-ONLY test
50
+ dependency (the framework this package integrates with; nothing ships in
51
+ `require`).
52
+
7
53
  ## [0.1.3] — 2026-09-12
8
54
 
9
55
  ### Changed
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Google Ads
2
2
 
3
+ [![Fancified](art/fancified.svg)](https://particle.academy)
4
+
3
5
  Google Ads for [fancy-flow][flow] — as **four imported, versioned packages**, one
4
6
  per runtime. Not vendored source: a copy cannot be upgraded, and third-party APIs
5
7
  change.
@@ -57,6 +59,13 @@ Google Ads uses OAuth2 (authorization_code). The package DECLARES the exchange;
57
59
  - **Scopes** — `https://www.googleapis.com/auth/adwords`
58
60
  - **Access token lifetime** — 3600 seconds (1 hours). A host that never refreshes works all afternoon and is broken by morning.
59
61
 
62
+ **One consent grant, shared** (`grant: "google"`). Every connector declaring the same grant can run on ONE OAuth client, with one consent and one refresh token per person.
63
+
64
+ - **Authorize with** `access_type=offline`, `include_granted_scopes=true`. Ask for a feature's scopes when it is first used; the new token covers every scope granted before. A refresh token comes back only on the FIRST exchange, so keep the stored one when an exchange returns none.
65
+ - **Revoke** — POST https://oauth2.googleapis.com/revoke with `token`. **It removes the WHOLE grant**: every connector sharing it, not only this one. A per-feature disconnect stops using that feature's scopes locally; only a full disconnect revokes.
66
+ - **Identify the account by `sub`**: request `openid`, then verify the token response's id_token (issuer `https://accounts.google.com` or `accounts.google.com`, keys at https://www.googleapis.com/oauth2/v3/certs, audience = `clientId`). Never key a connection by email.
67
+ - **No restricted scopes** in this connector.
68
+
60
69
  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.
61
70
 
62
71
  ### The estate
@@ -0,0 +1,26 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="128" height="28" role="img" aria-label="Fancified — built with Fancy UI">
2
+ <title>Fancified · built with Fancy UI</title>
3
+ <defs>
4
+ <linearGradient id="fcdBg" x1="0" y1="0" x2="1" y2="1">
5
+ <stop offset="0" stop-color="#6d28d9"/>
6
+ <stop offset=".5" stop-color="#9333ea"/>
7
+ <stop offset="1" stop-color="#d946ef"/>
8
+ </linearGradient>
9
+ <linearGradient id="fcdGloss" x1="0" y1="0" x2="0" y2="1">
10
+ <stop offset="0" stop-color="#ffffff" stop-opacity=".30"/>
11
+ <stop offset=".55" stop-color="#ffffff" stop-opacity="0"/>
12
+ </linearGradient>
13
+ <clipPath id="fcdClip"><rect width="128" height="28" rx="7"/></clipPath>
14
+ </defs>
15
+ <g clip-path="url(#fcdClip)">
16
+ <rect width="128" height="28" fill="url(#fcdBg)"/>
17
+ <rect width="34" height="28" fill="#3b0764" fill-opacity=".5"/>
18
+ <rect width="128" height="13" fill="url(#fcdGloss)"/>
19
+ <g fill="#fff">
20
+ <path transform="translate(17 14)" d="M0 -7 C.6 -2.2 2.2 -.6 7 0 C2.2 .6 .6 2.2 0 7 C-.6 2.2 -2.2 .6 -7 0 C-2.2 -.6 -.6 -2.2 0 -7 Z"/>
21
+ <path transform="translate(25.5 7.5) scale(.34)" fill-opacity=".85" d="M0 -7 C.6 -2.2 2.2 -.6 7 0 C2.2 .6 .6 2.2 0 7 C-.6 2.2 -2.2 .6 -7 0 C-2.2 -.6 -.6 -2.2 0 -7 Z"/>
22
+ </g>
23
+ <text x="81" y="18.5" fill="#ffffff" text-anchor="middle" font-family="'Segoe UI',Verdana,'DejaVu Sans',sans-serif" font-size="12" font-weight="700" letter-spacing=".3">Fancified</text>
24
+ </g>
25
+ <rect x=".5" y=".5" width="127" height="27" rx="6.5" fill="none" stroke="#ffffff" stroke-opacity=".22"/>
26
+ </svg>
package/dist/index.cjs CHANGED
@@ -65,7 +65,28 @@ var GOOGLE_ADS_OAUTH = {
65
65
  "accessTokenCredential": "accessToken",
66
66
  "refreshTokenCredential": "refreshToken",
67
67
  "refreshTokenRotates": false,
68
- "accessTokenTtlSeconds": 3600
68
+ "accessTokenTtlSeconds": 3600,
69
+ "grant": "google",
70
+ "authorizeParams": {
71
+ "access_type": "offline",
72
+ "include_granted_scopes": "true"
73
+ },
74
+ "revoke": {
75
+ "url": "https://oauth2.googleapis.com/revoke",
76
+ "param": "token",
77
+ "scope": "grant"
78
+ },
79
+ "identity": {
80
+ "scope": "openid",
81
+ "claim": "sub",
82
+ "issuers": [
83
+ "https://accounts.google.com",
84
+ "accounts.google.com"
85
+ ],
86
+ "jwksUrl": "https://www.googleapis.com/oauth2/v3/certs",
87
+ "audienceCredential": "clientId"
88
+ },
89
+ "restrictedScopes": []
69
90
  };
70
91
  function googleAdsMeta(role, operation, docs) {
71
92
  return { ...GOOGLE_ADS_SERVICE, role, operation, docs };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/service.ts","../src/kinds/customer-list-accessible.ts","../src/index.ts"],"names":["defineConnectorKind","summarize"],"mappings":";;;;;AAmCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,kBAAA,GAAqB;AAAA,EAChC,OAAA,EAAS,YAAA;AAAA,EACT,YAAA,EAAc,YAAA;AAAA,EACd,MAAA,EAAQ,WAAA;AAAA,EACR,OAAA,EAAS;AACX;AA+BO,IAAM,sBAAA,GAAyB;AAAA,EACpC;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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,IAAM,+BAAA,GAAiD;AAAA,EAC5D;AAAA,IACE,MAAA,EAAQ,oBAAA;AAAA,IACR,MAAA,EAAQ,OAAA;AAAA,IACR,aAAA,EAAe;AAAA;AAEnB;AAEO,IAAM,yBAAA,GAAgDA,+BAAoB,6BAAA,EAA+B;AAAA,EAC9G,IAAA,EAAM,6BAAA;AAAA,EACN,OAAA,EAAS,CAAC,0BAA0B,CAAA;AAAA,EACpC,KAAA,EAAO,iCAAA;AAAA,EACP,WAAA,EAAa,mNAAA;AAAA,EACb,MAAA,EAAQ,CAAC,EAAE,EAAA,EAAI,MAAM,CAAA;AAAA,EACrB,OAAA,EAAS,CAAC,EAAE,EAAA,EAAI,OAAO,CAAA;AAAA,EACvB,WAAA,EAAa,MAAA;AAAA,EACb,WAAA,EAAa,+BAAA;AAAA,EACb,cAAc,EAAC;AAAA,EACf,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACbC,oBAAA,CAAU,6BAAA,EAA+B,QAAmC,oCAAoC;AACpH,CAAC;;;AClCM,IAAM,gBAAA,GAAyC;AAAA,EACpD;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 -- google_ads\n */\n\n/**\n * Google Ads's identity on the authoring surface, shared by every Google Ads\n * 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 * Use a dedicated Google Ads test manager and test client account. Test and\n * production hierarchies cannot interact; test ads never serve or incur cost,\n * but some features such as billing, conversion uploads and serving reports\n * cannot be exercised there.\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 GOOGLE_ADS_SERVICE = {\n service: \"google_ads\",\n serviceTitle: \"Google Ads\",\n domain: \"marketing\",\n sandbox: \"separate-account\",\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 Google Ads connection holds. */\nexport const GOOGLE_ADS_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"The Google Cloud OAuth client shared by the installation.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The matching Google Cloud OAuth client secret.\"\n },\n {\n \"key\": \"developerToken\",\n \"label\": \"Developer token\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The 22-character Google Ads API developer token from the manager account's API Center. Google says to treat it like a password; one token identifies the installed application.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"The connected Google user's one-hour OAuth access token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"The reusable offline token used to replace expired access tokens.\"\n },\n {\n \"key\": \"loginCustomerId\",\n \"label\": \"Manager customer ID\",\n \"scope\": \"account\",\n \"secret\": false,\n \"optional\": true,\n \"help\": \"Optional. The manager account's 10-digit customer ID without hyphens. Required when the OAuth user reaches a client through that manager; omit it for direct access.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Ads requires — DECLARED here, performed by the\n * 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 GOOGLE_ADS_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/adwords\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Ads node's connector metadata from the operation it performs. */\nexport function googleAdsMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_ADS_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/customer-list-accessible.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/customer-list-accessible.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_ads\n */\n\n/**\n * Accessible Google Ads customers — List Google Ads customer resource names\n * directly accessible to the authenticated user. Manager-linked client\n * accounts are not included; query the account hierarchy after choosing a\n * directly accessible manager.\n *\n * https://developers.google.com/google-ads/api/rest/reference/rest/v25/customers/listAccessibleCustomers\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleAdsMeta } from \"../service.js\";\n\nexport const GOOGLE_ADS_CUSTOMER_LIST_KIND = \"@particle-academy/google_ads_customer_list\";\nexport const GOOGLE_ADS_CUSTOMER_LIST_OPERATION = \"customer_list_accessible\";\n\nexport const GOOGLE_ADS_CUSTOMER_LIST_META = googleAdsMeta(\"action\", \"list directly accessible customers\", \"https://developers.google.com/google-ads/api/rest/reference/rest/v25/customers/listAccessibleCustomers\");\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 GOOGLE_ADS_CUSTOMER_LIST_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.resourceNames\",\n \"type\": \"array\",\n \"description\": \"Customer resource names in customers/{customer_id} form that the OAuth identity can access directly.\"\n }\n];\n\nexport const googleAdsCustomerListKind: NodeKindDefinition = defineConnectorKind(GOOGLE_ADS_CUSTOMER_LIST_META, {\n name: GOOGLE_ADS_CUSTOMER_LIST_KIND,\n aliases: [\"google_ads_customer_list\"],\n label: \"Accessible Google Ads customers\",\n description: \"List Google Ads customer resource names directly accessible to the authenticated user. Manager-linked client accounts are not included; query the account hierarchy after choosing a directly accessible manager.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"none\",\n outputShape: GOOGLE_ADS_CUSTOMER_LIST_OUTPUT,\n configSchema: [],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_ADS_CUSTOMER_LIST_META, config as Record<string, unknown>, \"list directly accessible customers\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_ads\n */\n\n/**\n * Google Ads'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/customer-list-accessible.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleAdsCustomerListKind } from \"./kinds/customer-list-accessible.js\";\n\n/** Every Google Ads kind, for a host that registers the lot. */\nexport const GOOGLE_ADS_KINDS: NodeKindDefinition[] = [\n googleAdsCustomerListKind,\n];\n"]}
1
+ {"version":3,"sources":["../src/service.ts","../src/kinds/customer-list-accessible.ts","../src/index.ts"],"names":["defineConnectorKind","summarize"],"mappings":";;;;;AAmCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,kBAAA,GAAqB;AAAA,EAChC,OAAA,EAAS,YAAA;AAAA,EACT,YAAA,EAAc,YAAA;AAAA,EACd,MAAA,EAAQ,WAAA;AAAA,EACR,OAAA,EAAS;AACX;AA+BO,IAAM,sBAAA,GAAyB;AAAA,EACpC;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,EAA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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 -- google_ads\n */\n\n/**\n * Google Ads's identity on the authoring surface, shared by every Google Ads\n * 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 * Use a dedicated Google Ads test manager and test client account. Test and\n * production hierarchies cannot interact; test ads never serve or incur cost,\n * but some features such as billing, conversion uploads and serving reports\n * cannot be exercised there.\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 GOOGLE_ADS_SERVICE = {\n service: \"google_ads\",\n serviceTitle: \"Google Ads\",\n domain: \"marketing\",\n sandbox: \"separate-account\",\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 Google Ads connection holds. */\nexport const GOOGLE_ADS_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"The Google Cloud OAuth client shared by the installation.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The matching Google Cloud OAuth client secret.\"\n },\n {\n \"key\": \"developerToken\",\n \"label\": \"Developer token\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The 22-character Google Ads API developer token from the manager account's API Center. Google says to treat it like a password; one token identifies the installed application.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"The connected Google user's one-hour OAuth access token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"The reusable offline token used to replace expired access tokens.\"\n },\n {\n \"key\": \"loginCustomerId\",\n \"label\": \"Manager customer ID\",\n \"scope\": \"account\",\n \"secret\": false,\n \"optional\": true,\n \"help\": \"Optional. The manager account's 10-digit customer ID without hyphens. Required when the OAuth user reaches a client through that manager; omit it for direct access.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Ads requires — DECLARED here, performed by the\n * 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 *\n * Its consent grant is SHARED with every connector declaring grant \"google\":\n * one OAuth client, one consent and one refresh token per person, scopes added\n * as features are first used (authorizeParams). Revoking removes the WHOLE\n * grant, so only a full disconnect revokes; a per-feature disconnect stops\n * using the scope locally. Identify the account by the id_token's sub, never\n * by email.\n */\nexport const GOOGLE_ADS_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/adwords\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600,\n \"grant\": \"google\",\n \"authorizeParams\": {\n \"access_type\": \"offline\",\n \"include_granted_scopes\": \"true\"\n },\n \"revoke\": {\n \"url\": \"https://oauth2.googleapis.com/revoke\",\n \"param\": \"token\",\n \"scope\": \"grant\"\n },\n \"identity\": {\n \"scope\": \"openid\",\n \"claim\": \"sub\",\n \"issuers\": [\n \"https://accounts.google.com\",\n \"accounts.google.com\"\n ],\n \"jwksUrl\": \"https://www.googleapis.com/oauth2/v3/certs\",\n \"audienceCredential\": \"clientId\"\n },\n \"restrictedScopes\": []\n} as const;\n\n/** Build a Google Ads node's connector metadata from the operation it performs. */\nexport function googleAdsMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_ADS_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/customer-list-accessible.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/customer-list-accessible.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_ads\n */\n\n/**\n * Accessible Google Ads customers — List Google Ads customer resource names\n * directly accessible to the authenticated user. Manager-linked client\n * accounts are not included; query the account hierarchy after choosing a\n * directly accessible manager.\n *\n * https://developers.google.com/google-ads/api/rest/reference/rest/v25/customers/listAccessibleCustomers\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleAdsMeta } from \"../service.js\";\n\nexport const GOOGLE_ADS_CUSTOMER_LIST_KIND = \"@particle-academy/google_ads_customer_list\";\nexport const GOOGLE_ADS_CUSTOMER_LIST_OPERATION = \"customer_list_accessible\";\n\nexport const GOOGLE_ADS_CUSTOMER_LIST_META = googleAdsMeta(\"action\", \"list directly accessible customers\", \"https://developers.google.com/google-ads/api/rest/reference/rest/v25/customers/listAccessibleCustomers\");\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 GOOGLE_ADS_CUSTOMER_LIST_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.resourceNames\",\n \"type\": \"array\",\n \"description\": \"Customer resource names in customers/{customer_id} form that the OAuth identity can access directly.\"\n }\n];\n\nexport const googleAdsCustomerListKind: NodeKindDefinition = defineConnectorKind(GOOGLE_ADS_CUSTOMER_LIST_META, {\n name: GOOGLE_ADS_CUSTOMER_LIST_KIND,\n aliases: [\"google_ads_customer_list\"],\n label: \"Accessible Google Ads customers\",\n description: \"List Google Ads customer resource names directly accessible to the authenticated user. Manager-linked client accounts are not included; query the account hierarchy after choosing a directly accessible manager.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"none\",\n outputShape: GOOGLE_ADS_CUSTOMER_LIST_OUTPUT,\n configSchema: [],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_ADS_CUSTOMER_LIST_META, config as Record<string, unknown>, \"list directly accessible customers\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_ads\n */\n\n/**\n * Google Ads'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/customer-list-accessible.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleAdsCustomerListKind } from \"./kinds/customer-list-accessible.js\";\n\n/** Every Google Ads kind, for a host that registers the lot. */\nexport const GOOGLE_ADS_KINDS: NodeKindDefinition[] = [\n googleAdsCustomerListKind,\n];\n"]}
package/dist/index.d.cts CHANGED
@@ -98,6 +98,13 @@ declare const GOOGLE_ADS_CREDENTIALS: readonly [{
98
98
  * safely be retried and may run concurrently. That is stated rather than
99
99
  * assumed because the opposite — a provider that spends the token and revokes
100
100
  * the grant on a replay — looks identical until it happens.
101
+ *
102
+ * Its consent grant is SHARED with every connector declaring grant "google":
103
+ * one OAuth client, one consent and one refresh token per person, scopes added
104
+ * as features are first used (authorizeParams). Revoking removes the WHOLE
105
+ * grant, so only a full disconnect revokes; a per-feature disconnect stops
106
+ * using the scope locally. Identify the account by the id_token's sub, never
107
+ * by email.
101
108
  */
102
109
  declare const GOOGLE_ADS_OAUTH: {
103
110
  readonly flow: "authorization_code";
@@ -108,6 +115,24 @@ declare const GOOGLE_ADS_OAUTH: {
108
115
  readonly refreshTokenCredential: "refreshToken";
109
116
  readonly refreshTokenRotates: false;
110
117
  readonly accessTokenTtlSeconds: 3600;
118
+ readonly grant: "google";
119
+ readonly authorizeParams: {
120
+ readonly access_type: "offline";
121
+ readonly include_granted_scopes: "true";
122
+ };
123
+ readonly revoke: {
124
+ readonly url: "https://oauth2.googleapis.com/revoke";
125
+ readonly param: "token";
126
+ readonly scope: "grant";
127
+ };
128
+ readonly identity: {
129
+ readonly scope: "openid";
130
+ readonly claim: "sub";
131
+ readonly issuers: readonly ["https://accounts.google.com", "accounts.google.com"];
132
+ readonly jwksUrl: "https://www.googleapis.com/oauth2/v3/certs";
133
+ readonly audienceCredential: "clientId";
134
+ };
135
+ readonly restrictedScopes: readonly [];
111
136
  };
112
137
  /** Build a Google Ads node's connector metadata from the operation it performs. */
113
138
  declare function googleAdsMeta(role: ConnectorMeta["role"], operation: string, docs: string): ConnectorMeta;
package/dist/index.d.ts CHANGED
@@ -98,6 +98,13 @@ declare const GOOGLE_ADS_CREDENTIALS: readonly [{
98
98
  * safely be retried and may run concurrently. That is stated rather than
99
99
  * assumed because the opposite — a provider that spends the token and revokes
100
100
  * the grant on a replay — looks identical until it happens.
101
+ *
102
+ * Its consent grant is SHARED with every connector declaring grant "google":
103
+ * one OAuth client, one consent and one refresh token per person, scopes added
104
+ * as features are first used (authorizeParams). Revoking removes the WHOLE
105
+ * grant, so only a full disconnect revokes; a per-feature disconnect stops
106
+ * using the scope locally. Identify the account by the id_token's sub, never
107
+ * by email.
101
108
  */
102
109
  declare const GOOGLE_ADS_OAUTH: {
103
110
  readonly flow: "authorization_code";
@@ -108,6 +115,24 @@ declare const GOOGLE_ADS_OAUTH: {
108
115
  readonly refreshTokenCredential: "refreshToken";
109
116
  readonly refreshTokenRotates: false;
110
117
  readonly accessTokenTtlSeconds: 3600;
118
+ readonly grant: "google";
119
+ readonly authorizeParams: {
120
+ readonly access_type: "offline";
121
+ readonly include_granted_scopes: "true";
122
+ };
123
+ readonly revoke: {
124
+ readonly url: "https://oauth2.googleapis.com/revoke";
125
+ readonly param: "token";
126
+ readonly scope: "grant";
127
+ };
128
+ readonly identity: {
129
+ readonly scope: "openid";
130
+ readonly claim: "sub";
131
+ readonly issuers: readonly ["https://accounts.google.com", "accounts.google.com"];
132
+ readonly jwksUrl: "https://www.googleapis.com/oauth2/v3/certs";
133
+ readonly audienceCredential: "clientId";
134
+ };
135
+ readonly restrictedScopes: readonly [];
111
136
  };
112
137
  /** Build a Google Ads node's connector metadata from the operation it performs. */
113
138
  declare function googleAdsMeta(role: ConnectorMeta["role"], operation: string, docs: string): ConnectorMeta;
package/dist/index.js CHANGED
@@ -63,7 +63,28 @@ var GOOGLE_ADS_OAUTH = {
63
63
  "accessTokenCredential": "accessToken",
64
64
  "refreshTokenCredential": "refreshToken",
65
65
  "refreshTokenRotates": false,
66
- "accessTokenTtlSeconds": 3600
66
+ "accessTokenTtlSeconds": 3600,
67
+ "grant": "google",
68
+ "authorizeParams": {
69
+ "access_type": "offline",
70
+ "include_granted_scopes": "true"
71
+ },
72
+ "revoke": {
73
+ "url": "https://oauth2.googleapis.com/revoke",
74
+ "param": "token",
75
+ "scope": "grant"
76
+ },
77
+ "identity": {
78
+ "scope": "openid",
79
+ "claim": "sub",
80
+ "issuers": [
81
+ "https://accounts.google.com",
82
+ "accounts.google.com"
83
+ ],
84
+ "jwksUrl": "https://www.googleapis.com/oauth2/v3/certs",
85
+ "audienceCredential": "clientId"
86
+ },
87
+ "restrictedScopes": []
67
88
  };
68
89
  function googleAdsMeta(role, operation, docs) {
69
90
  return { ...GOOGLE_ADS_SERVICE, role, operation, docs };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/service.ts","../src/kinds/customer-list-accessible.ts","../src/index.ts"],"names":[],"mappings":";;;AAmCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,kBAAA,GAAqB;AAAA,EAChC,OAAA,EAAS,YAAA;AAAA,EACT,YAAA,EAAc,YAAA;AAAA,EACd,MAAA,EAAQ,WAAA;AAAA,EACR,OAAA,EAAS;AACX;AA+BO,IAAM,sBAAA,GAAyB;AAAA,EACpC;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,EA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CAAA,GAAqC;AAE3C,IAAM,6BAAA,GAAgC,aAAA,CAAc,QAAA,EAAU,oCAAA,EAAsC,wGAAwG;AAU5M,IAAM,+BAAA,GAAiD;AAAA,EAC5D;AAAA,IACE,MAAA,EAAQ,oBAAA;AAAA,IACR,MAAA,EAAQ,OAAA;AAAA,IACR,aAAA,EAAe;AAAA;AAEnB;AAEO,IAAM,yBAAA,GAAgD,oBAAoB,6BAAA,EAA+B;AAAA,EAC9G,IAAA,EAAM,6BAAA;AAAA,EACN,OAAA,EAAS,CAAC,0BAA0B,CAAA;AAAA,EACpC,KAAA,EAAO,iCAAA;AAAA,EACP,WAAA,EAAa,mNAAA;AAAA,EACb,MAAA,EAAQ,CAAC,EAAE,EAAA,EAAI,MAAM,CAAA;AAAA,EACrB,OAAA,EAAS,CAAC,EAAE,EAAA,EAAI,OAAO,CAAA;AAAA,EACvB,WAAA,EAAa,MAAA;AAAA,EACb,WAAA,EAAa,+BAAA;AAAA,EACb,cAAc,EAAC;AAAA,EACf,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACb,SAAA,CAAU,6BAAA,EAA+B,QAAmC,oCAAoC;AACpH,CAAC;;;AClCM,IAAM,gBAAA,GAAyC;AAAA,EACpD;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 -- google_ads\n */\n\n/**\n * Google Ads's identity on the authoring surface, shared by every Google Ads\n * 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 * Use a dedicated Google Ads test manager and test client account. Test and\n * production hierarchies cannot interact; test ads never serve or incur cost,\n * but some features such as billing, conversion uploads and serving reports\n * cannot be exercised there.\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 GOOGLE_ADS_SERVICE = {\n service: \"google_ads\",\n serviceTitle: \"Google Ads\",\n domain: \"marketing\",\n sandbox: \"separate-account\",\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 Google Ads connection holds. */\nexport const GOOGLE_ADS_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"The Google Cloud OAuth client shared by the installation.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The matching Google Cloud OAuth client secret.\"\n },\n {\n \"key\": \"developerToken\",\n \"label\": \"Developer token\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The 22-character Google Ads API developer token from the manager account's API Center. Google says to treat it like a password; one token identifies the installed application.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"The connected Google user's one-hour OAuth access token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"The reusable offline token used to replace expired access tokens.\"\n },\n {\n \"key\": \"loginCustomerId\",\n \"label\": \"Manager customer ID\",\n \"scope\": \"account\",\n \"secret\": false,\n \"optional\": true,\n \"help\": \"Optional. The manager account's 10-digit customer ID without hyphens. Required when the OAuth user reaches a client through that manager; omit it for direct access.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Ads requires — DECLARED here, performed by the\n * 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 GOOGLE_ADS_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/adwords\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Ads node's connector metadata from the operation it performs. */\nexport function googleAdsMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_ADS_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/customer-list-accessible.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/customer-list-accessible.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_ads\n */\n\n/**\n * Accessible Google Ads customers — List Google Ads customer resource names\n * directly accessible to the authenticated user. Manager-linked client\n * accounts are not included; query the account hierarchy after choosing a\n * directly accessible manager.\n *\n * https://developers.google.com/google-ads/api/rest/reference/rest/v25/customers/listAccessibleCustomers\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleAdsMeta } from \"../service.js\";\n\nexport const GOOGLE_ADS_CUSTOMER_LIST_KIND = \"@particle-academy/google_ads_customer_list\";\nexport const GOOGLE_ADS_CUSTOMER_LIST_OPERATION = \"customer_list_accessible\";\n\nexport const GOOGLE_ADS_CUSTOMER_LIST_META = googleAdsMeta(\"action\", \"list directly accessible customers\", \"https://developers.google.com/google-ads/api/rest/reference/rest/v25/customers/listAccessibleCustomers\");\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 GOOGLE_ADS_CUSTOMER_LIST_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.resourceNames\",\n \"type\": \"array\",\n \"description\": \"Customer resource names in customers/{customer_id} form that the OAuth identity can access directly.\"\n }\n];\n\nexport const googleAdsCustomerListKind: NodeKindDefinition = defineConnectorKind(GOOGLE_ADS_CUSTOMER_LIST_META, {\n name: GOOGLE_ADS_CUSTOMER_LIST_KIND,\n aliases: [\"google_ads_customer_list\"],\n label: \"Accessible Google Ads customers\",\n description: \"List Google Ads customer resource names directly accessible to the authenticated user. Manager-linked client accounts are not included; query the account hierarchy after choosing a directly accessible manager.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"none\",\n outputShape: GOOGLE_ADS_CUSTOMER_LIST_OUTPUT,\n configSchema: [],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_ADS_CUSTOMER_LIST_META, config as Record<string, unknown>, \"list directly accessible customers\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_ads\n */\n\n/**\n * Google Ads'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/customer-list-accessible.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleAdsCustomerListKind } from \"./kinds/customer-list-accessible.js\";\n\n/** Every Google Ads kind, for a host that registers the lot. */\nexport const GOOGLE_ADS_KINDS: NodeKindDefinition[] = [\n googleAdsCustomerListKind,\n];\n"]}
1
+ {"version":3,"sources":["../src/service.ts","../src/kinds/customer-list-accessible.ts","../src/index.ts"],"names":[],"mappings":";;;AAmCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,kBAAA,GAAqB;AAAA,EAChC,OAAA,EAAS,YAAA;AAAA,EACT,YAAA,EAAc,YAAA;AAAA,EACd,MAAA,EAAQ,WAAA;AAAA,EACR,OAAA,EAAS;AACX;AA+BO,IAAM,sBAAA,GAAyB;AAAA,EACpC;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,IAC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AmC,oCAAoC;AACpH,CAAC;;;AClCM,IAAM,gBAAA,GAAyC;AAAA,EACpD;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 -- google_ads\n */\n\n/**\n * Google Ads's identity on the authoring surface, shared by every Google Ads\n * 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 * Use a dedicated Google Ads test manager and test client account. Test and\n * production hierarchies cannot interact; test ads never serve or incur cost,\n * but some features such as billing, conversion uploads and serving reports\n * cannot be exercised there.\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 GOOGLE_ADS_SERVICE = {\n service: \"google_ads\",\n serviceTitle: \"Google Ads\",\n domain: \"marketing\",\n sandbox: \"separate-account\",\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 Google Ads connection holds. */\nexport const GOOGLE_ADS_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"The Google Cloud OAuth client shared by the installation.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The matching Google Cloud OAuth client secret.\"\n },\n {\n \"key\": \"developerToken\",\n \"label\": \"Developer token\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The 22-character Google Ads API developer token from the manager account's API Center. Google says to treat it like a password; one token identifies the installed application.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"The connected Google user's one-hour OAuth access token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"The reusable offline token used to replace expired access tokens.\"\n },\n {\n \"key\": \"loginCustomerId\",\n \"label\": \"Manager customer ID\",\n \"scope\": \"account\",\n \"secret\": false,\n \"optional\": true,\n \"help\": \"Optional. The manager account's 10-digit customer ID without hyphens. Required when the OAuth user reaches a client through that manager; omit it for direct access.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Ads requires — DECLARED here, performed by the\n * 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 *\n * Its consent grant is SHARED with every connector declaring grant \"google\":\n * one OAuth client, one consent and one refresh token per person, scopes added\n * as features are first used (authorizeParams). Revoking removes the WHOLE\n * grant, so only a full disconnect revokes; a per-feature disconnect stops\n * using the scope locally. Identify the account by the id_token's sub, never\n * by email.\n */\nexport const GOOGLE_ADS_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/adwords\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600,\n \"grant\": \"google\",\n \"authorizeParams\": {\n \"access_type\": \"offline\",\n \"include_granted_scopes\": \"true\"\n },\n \"revoke\": {\n \"url\": \"https://oauth2.googleapis.com/revoke\",\n \"param\": \"token\",\n \"scope\": \"grant\"\n },\n \"identity\": {\n \"scope\": \"openid\",\n \"claim\": \"sub\",\n \"issuers\": [\n \"https://accounts.google.com\",\n \"accounts.google.com\"\n ],\n \"jwksUrl\": \"https://www.googleapis.com/oauth2/v3/certs\",\n \"audienceCredential\": \"clientId\"\n },\n \"restrictedScopes\": []\n} as const;\n\n/** Build a Google Ads node's connector metadata from the operation it performs. */\nexport function googleAdsMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_ADS_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/customer-list-accessible.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/customer-list-accessible.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_ads\n */\n\n/**\n * Accessible Google Ads customers — List Google Ads customer resource names\n * directly accessible to the authenticated user. Manager-linked client\n * accounts are not included; query the account hierarchy after choosing a\n * directly accessible manager.\n *\n * https://developers.google.com/google-ads/api/rest/reference/rest/v25/customers/listAccessibleCustomers\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleAdsMeta } from \"../service.js\";\n\nexport const GOOGLE_ADS_CUSTOMER_LIST_KIND = \"@particle-academy/google_ads_customer_list\";\nexport const GOOGLE_ADS_CUSTOMER_LIST_OPERATION = \"customer_list_accessible\";\n\nexport const GOOGLE_ADS_CUSTOMER_LIST_META = googleAdsMeta(\"action\", \"list directly accessible customers\", \"https://developers.google.com/google-ads/api/rest/reference/rest/v25/customers/listAccessibleCustomers\");\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 GOOGLE_ADS_CUSTOMER_LIST_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.resourceNames\",\n \"type\": \"array\",\n \"description\": \"Customer resource names in customers/{customer_id} form that the OAuth identity can access directly.\"\n }\n];\n\nexport const googleAdsCustomerListKind: NodeKindDefinition = defineConnectorKind(GOOGLE_ADS_CUSTOMER_LIST_META, {\n name: GOOGLE_ADS_CUSTOMER_LIST_KIND,\n aliases: [\"google_ads_customer_list\"],\n label: \"Accessible Google Ads customers\",\n description: \"List Google Ads customer resource names directly accessible to the authenticated user. Manager-linked client accounts are not included; query the account hierarchy after choosing a directly accessible manager.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"none\",\n outputShape: GOOGLE_ADS_CUSTOMER_LIST_OUTPUT,\n configSchema: [],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_ADS_CUSTOMER_LIST_META, config as Record<string, unknown>, \"list directly accessible customers\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_ads\n */\n\n/**\n * Google Ads'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/customer-list-accessible.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleAdsCustomerListKind } from \"./kinds/customer-list-accessible.js\";\n\n/** Every Google Ads kind, for a host that registers the lot. */\nexport const GOOGLE_ADS_KINDS: NodeKindDefinition[] = [\n googleAdsCustomerListKind,\n];\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-academy/google-ads-ui",
3
- "version": "0.1.3",
3
+ "version": "0.3.0",
4
4
  "description": "Google Ads'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",
@@ -28,6 +28,7 @@
28
28
  },
29
29
  "files": [
30
30
  "dist",
31
+ "art",
31
32
  "README.md",
32
33
  "CHANGELOG.md",
33
34
  "LICENSE"