@particle-academy/google-ads-ui 0.1.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 +17 -0
- package/LICENSE +21 -0
- package/README.md +101 -0
- package/dist/index.cjs +116 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +150 -0
- package/dist/index.d.ts +150 -0
- package/dist/index.js +104 -0
- package/dist/index.js.map +1 -0
- package/package.json +67 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@particle-academy/google-ads-ui`,
|
|
4
|
+
`@particle-academy/google-ads-js`, `particle-academy/google-ads-php` and
|
|
5
|
+
`fancy-google-ads`.
|
|
6
|
+
|
|
7
|
+
## [0.1.0] - 2026-08-24
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- List Google Ads customers directly accessible to an OAuth identity.
|
|
12
|
+
- Send the required developer token alongside OAuth bearer authorization.
|
|
13
|
+
- Support an optional manager customer header for manager-account access.
|
|
14
|
+
- Model Google Ads' isolated test-account hierarchy.
|
|
15
|
+
- Provide a deterministic fixture matching the v25 discovery response.
|
|
16
|
+
|
|
17
|
+
[0.1.0]: https://github.com/Fancy-Friends/google-ads/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Particle Academy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Google Ads
|
|
2
|
+
|
|
3
|
+
Google Ads for [fancy-flow][flow] — as **four imported, versioned packages**, one
|
|
4
|
+
per runtime. Not vendored source: a copy cannot be upgraded, and third-party APIs
|
|
5
|
+
change.
|
|
6
|
+
|
|
7
|
+
[flow]: https://github.com/Particle-Academy/fancy-flow
|
|
8
|
+
|
|
9
|
+
| Runtime | Package | Install |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Authoring surface (every host) | `@particle-academy/google-ads-ui` | `npm install @particle-academy/google-ads-ui` |
|
|
12
|
+
| Node | `@particle-academy/google-ads-js` | `npm install @particle-academy/google-ads-js` |
|
|
13
|
+
| PHP 8.4+ | `particle-academy/google-ads-php` | `composer require particle-academy/google-ads-php` |
|
|
14
|
+
| Python 3.11+ | `fancy-google-ads` | `pip install fancy-google-ads` |
|
|
15
|
+
|
|
16
|
+
The `ui` package is the editor surface and is React on every host — a PHP or
|
|
17
|
+
Python project installs it *and* its own runtime package, and never the `js` one.
|
|
18
|
+
|
|
19
|
+
## What it costs you
|
|
20
|
+
|
|
21
|
+
One dependency: `@particle-academy/fancy-connector-core` (or
|
|
22
|
+
`particle-academy/fancy-connector-core` on Composer), which the `js` and `php`
|
|
23
|
+
packages pull in themselves. The Python package has **zero** runtime
|
|
24
|
+
dependencies.
|
|
25
|
+
|
|
26
|
+
**No Google Ads SDK.** Plain HTTP, deliberately: a vendor SDK is third-party code
|
|
27
|
+
subject to the kit's full approval bar, and one per provider is hundreds of
|
|
28
|
+
dependencies nobody is tracking.
|
|
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 Google Ads connection holds 6 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 | The Google Cloud OAuth client shared by the installation. |
|
|
43
|
+
| **OAuth client secret** | per installation | **secret** | The matching Google Cloud OAuth client secret. |
|
|
44
|
+
| **Developer token** | per installation | **secret** | 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. |
|
|
45
|
+
| **Access token** | per connected account | **secret** | The connected Google user's one-hour OAuth access token. |
|
|
46
|
+
| **Refresh token** | per connected account | **secret** | The reusable offline token used to replace expired access tokens. |
|
|
47
|
+
| **Manager customer ID** *(optional)* | per connected account | not secret | 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. |
|
|
48
|
+
|
|
49
|
+
Every request carries `developer-token` and `login-customer-id` *(when set)* alongside the primary authorization, filled from the credentials above.
|
|
50
|
+
|
|
51
|
+
### Authorising
|
|
52
|
+
|
|
53
|
+
Google Ads 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.
|
|
54
|
+
|
|
55
|
+
- **Authorize URL** — https://accounts.google.com/o/oauth2/v2/auth
|
|
56
|
+
- **Token URL** — https://oauth2.googleapis.com/token
|
|
57
|
+
- **Scopes** — `https://www.googleapis.com/auth/adwords`
|
|
58
|
+
- **Access token lifetime** — 3600 seconds (1 hours). A host that never refreshes works all afternoon and is broken by morning.
|
|
59
|
+
|
|
60
|
+
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
|
+
|
|
62
|
+
### The estate
|
|
63
|
+
|
|
64
|
+
Google Ads has a test estate on the same host, reached with credentials from a SEPARATE test account you register. Selecting sandbox mode uses those credentials.
|
|
65
|
+
|
|
66
|
+
> Use a dedicated Google Ads test manager and test client account. Test and production hierarchies cannot interact; test ads never serve or incur cost, but some features such as billing, conversion uploads and serving reports cannot be exercised there.
|
|
67
|
+
|
|
68
|
+
## What it can do
|
|
69
|
+
|
|
70
|
+
### Actions
|
|
71
|
+
|
|
72
|
+
#### `customer_list_accessible` — Accessible Google Ads customers
|
|
73
|
+
|
|
74
|
+
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.
|
|
75
|
+
|
|
76
|
+
`GET /v25/customers:listAccessibleCustomers` · reads only — safe to replay
|
|
77
|
+
|
|
78
|
+
Takes no input.
|
|
79
|
+
|
|
80
|
+
## Run it before you have credentials
|
|
81
|
+
|
|
82
|
+
Every operation ships a **faker**, whether or not Google Ads has a sandbox. Set a
|
|
83
|
+
node's mode to `fake` and it returns the shape Google Ads actually publishes — the
|
|
84
|
+
same field names, deterministically — so you can wire the downstream nodes before
|
|
85
|
+
touching an account, a key, or a network.
|
|
86
|
+
|
|
87
|
+
## This repository is generated
|
|
88
|
+
|
|
89
|
+
`provider/` is the source. Everything under `packages/` is emitted from it and
|
|
90
|
+
**must not be hand-edited** — CI regenerates and diffs on every push, and the
|
|
91
|
+
next protocol sync destroys anything it finds. See [`AGENTS.md`](AGENTS.md).
|
|
92
|
+
|
|
93
|
+
## Two namespaces, which do not match on purpose
|
|
94
|
+
|
|
95
|
+
The repo is `github.com/Fancy-Friends/google-ads`; the packages publish under
|
|
96
|
+
`particle-academy`. Nothing derives one from the other — the names come from
|
|
97
|
+
weaver's `friends.json` and nowhere else.
|
|
98
|
+
|
|
99
|
+
## Licence
|
|
100
|
+
|
|
101
|
+
MIT.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var connectors = require('@particle-academy/fancy-flow/connectors');
|
|
4
|
+
|
|
5
|
+
// src/service.ts
|
|
6
|
+
var CONNECTOR_API_VERSION = 1;
|
|
7
|
+
var GOOGLE_ADS_SERVICE = {
|
|
8
|
+
service: "google_ads",
|
|
9
|
+
serviceTitle: "Google Ads",
|
|
10
|
+
domain: "marketing",
|
|
11
|
+
sandbox: "separate-account"
|
|
12
|
+
};
|
|
13
|
+
var GOOGLE_ADS_CREDENTIALS = [
|
|
14
|
+
{
|
|
15
|
+
"key": "clientId",
|
|
16
|
+
"label": "OAuth client ID",
|
|
17
|
+
"scope": "provider",
|
|
18
|
+
"secret": false,
|
|
19
|
+
"help": "The Google Cloud OAuth client shared by the installation."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"key": "clientSecret",
|
|
23
|
+
"label": "OAuth client secret",
|
|
24
|
+
"scope": "provider",
|
|
25
|
+
"secret": true,
|
|
26
|
+
"help": "The matching Google Cloud OAuth client secret."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"key": "developerToken",
|
|
30
|
+
"label": "Developer token",
|
|
31
|
+
"scope": "provider",
|
|
32
|
+
"secret": true,
|
|
33
|
+
"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."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"key": "accessToken",
|
|
37
|
+
"label": "Access token",
|
|
38
|
+
"scope": "account",
|
|
39
|
+
"secret": true,
|
|
40
|
+
"help": "The connected Google user's one-hour OAuth access token."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"key": "refreshToken",
|
|
44
|
+
"label": "Refresh token",
|
|
45
|
+
"scope": "account",
|
|
46
|
+
"secret": true,
|
|
47
|
+
"help": "The reusable offline token used to replace expired access tokens."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"key": "loginCustomerId",
|
|
51
|
+
"label": "Manager customer ID",
|
|
52
|
+
"scope": "account",
|
|
53
|
+
"secret": false,
|
|
54
|
+
"optional": true,
|
|
55
|
+
"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."
|
|
56
|
+
}
|
|
57
|
+
];
|
|
58
|
+
var GOOGLE_ADS_OAUTH = {
|
|
59
|
+
"flow": "authorization_code",
|
|
60
|
+
"authorizeUrl": "https://accounts.google.com/o/oauth2/v2/auth",
|
|
61
|
+
"tokenUrl": "https://oauth2.googleapis.com/token",
|
|
62
|
+
"scopes": [
|
|
63
|
+
"https://www.googleapis.com/auth/adwords"
|
|
64
|
+
],
|
|
65
|
+
"accessTokenCredential": "accessToken",
|
|
66
|
+
"refreshTokenCredential": "refreshToken",
|
|
67
|
+
"refreshTokenRotates": false,
|
|
68
|
+
"accessTokenTtlSeconds": 3600
|
|
69
|
+
};
|
|
70
|
+
function googleAdsMeta(role, operation, docs) {
|
|
71
|
+
return { ...GOOGLE_ADS_SERVICE, role, operation, docs };
|
|
72
|
+
}
|
|
73
|
+
var GOOGLE_ADS_CUSTOMER_LIST_KIND = "@particle-academy/google_ads_customer_list";
|
|
74
|
+
var GOOGLE_ADS_CUSTOMER_LIST_OPERATION = "customer_list_accessible";
|
|
75
|
+
var GOOGLE_ADS_CUSTOMER_LIST_META = googleAdsMeta("action", "list directly accessible customers", "https://developers.google.com/google-ads/api/rest/reference/rest/v25/customers/listAccessibleCustomers");
|
|
76
|
+
var GOOGLE_ADS_CUSTOMER_LIST_OUTPUT = [
|
|
77
|
+
{
|
|
78
|
+
"path": "data.resourceNames",
|
|
79
|
+
"type": "array",
|
|
80
|
+
"description": "Customer resource names in customers/{customer_id} form that the OAuth identity can access directly."
|
|
81
|
+
}
|
|
82
|
+
];
|
|
83
|
+
var googleAdsCustomerListKind = connectors.defineConnectorKind(GOOGLE_ADS_CUSTOMER_LIST_META, {
|
|
84
|
+
name: GOOGLE_ADS_CUSTOMER_LIST_KIND,
|
|
85
|
+
aliases: ["google_ads_customer_list"],
|
|
86
|
+
label: "Accessible Google Ads customers",
|
|
87
|
+
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.",
|
|
88
|
+
inputs: [{ id: "in" }],
|
|
89
|
+
outputs: [{ id: "out" }],
|
|
90
|
+
sideEffects: "none",
|
|
91
|
+
outputShape: GOOGLE_ADS_CUSTOMER_LIST_OUTPUT,
|
|
92
|
+
configSchema: [],
|
|
93
|
+
defaultConfig: {
|
|
94
|
+
"mode": "auto"
|
|
95
|
+
},
|
|
96
|
+
renderBody: ({ config }) => connectors.summarize(GOOGLE_ADS_CUSTOMER_LIST_META, config, "list directly accessible customers")
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// src/index.ts
|
|
100
|
+
var GOOGLE_ADS_KINDS = [
|
|
101
|
+
googleAdsCustomerListKind
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
exports.CONNECTOR_API_VERSION = CONNECTOR_API_VERSION;
|
|
105
|
+
exports.GOOGLE_ADS_CREDENTIALS = GOOGLE_ADS_CREDENTIALS;
|
|
106
|
+
exports.GOOGLE_ADS_CUSTOMER_LIST_KIND = GOOGLE_ADS_CUSTOMER_LIST_KIND;
|
|
107
|
+
exports.GOOGLE_ADS_CUSTOMER_LIST_META = GOOGLE_ADS_CUSTOMER_LIST_META;
|
|
108
|
+
exports.GOOGLE_ADS_CUSTOMER_LIST_OPERATION = GOOGLE_ADS_CUSTOMER_LIST_OPERATION;
|
|
109
|
+
exports.GOOGLE_ADS_CUSTOMER_LIST_OUTPUT = GOOGLE_ADS_CUSTOMER_LIST_OUTPUT;
|
|
110
|
+
exports.GOOGLE_ADS_KINDS = GOOGLE_ADS_KINDS;
|
|
111
|
+
exports.GOOGLE_ADS_OAUTH = GOOGLE_ADS_OAUTH;
|
|
112
|
+
exports.GOOGLE_ADS_SERVICE = GOOGLE_ADS_SERVICE;
|
|
113
|
+
exports.googleAdsCustomerListKind = googleAdsCustomerListKind;
|
|
114
|
+
exports.googleAdsMeta = googleAdsMeta;
|
|
115
|
+
//# sourceMappingURL=index.cjs.map
|
|
116
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/service.ts","../src/kinds/customer-list-accessible.ts","../src/index.ts"],"names":["defineConnectorKind","summarize"],"mappings":"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","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"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import * as _particle_academy_fancy_flow_connectors from '@particle-academy/fancy-flow/connectors';
|
|
2
|
+
import { ConnectorMeta, OutputField } from '@particle-academy/fancy-flow/connectors';
|
|
3
|
+
import { NodeKindDefinition } from '@particle-academy/fancy-flow/engine';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* GENERATED FILE — do not edit.
|
|
7
|
+
*
|
|
8
|
+
* Emitted from provider/manifest.json by weaver's generator.
|
|
9
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
10
|
+
* being rejected, because it works until it silently does not. Fix
|
|
11
|
+
* provider/manifest.json (or weaver's template/) and regenerate:
|
|
12
|
+
*
|
|
13
|
+
* npm run provider -- google_ads
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Google Ads's identity on the authoring surface, shared by every Google Ads
|
|
17
|
+
* node.
|
|
18
|
+
*
|
|
19
|
+
* This file must import nothing from the js package: a PHP or Python project
|
|
20
|
+
* installs the ui package and never that one, and the import would be a
|
|
21
|
+
* dangling module the moment it did.
|
|
22
|
+
*
|
|
23
|
+
* ## The sandbox trap
|
|
24
|
+
*
|
|
25
|
+
* Use a dedicated Google Ads test manager and test client account. Test and
|
|
26
|
+
* production hierarchies cannot interact; test ads never serve or incur cost,
|
|
27
|
+
* but some features such as billing, conversion uploads and serving reports
|
|
28
|
+
* cannot be exercised there.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The connector API version this package was GENERATED against.
|
|
33
|
+
*
|
|
34
|
+
* A literal, never imported — an imported constant lets an upgrade rewrite the
|
|
35
|
+
* very claim it exists to detect.
|
|
36
|
+
*/
|
|
37
|
+
declare const CONNECTOR_API_VERSION = 1;
|
|
38
|
+
/** The parts of a connector's identity that belong to the SERVICE, not the node. */
|
|
39
|
+
declare const GOOGLE_ADS_SERVICE: {
|
|
40
|
+
readonly service: "google_ads";
|
|
41
|
+
readonly serviceTitle: "Google Ads";
|
|
42
|
+
readonly domain: "marketing";
|
|
43
|
+
readonly sandbox: "separate-account";
|
|
44
|
+
};
|
|
45
|
+
/** The credentials a Google Ads connection holds. */
|
|
46
|
+
declare const GOOGLE_ADS_CREDENTIALS: readonly [{
|
|
47
|
+
readonly key: "clientId";
|
|
48
|
+
readonly label: "OAuth client ID";
|
|
49
|
+
readonly scope: "provider";
|
|
50
|
+
readonly secret: false;
|
|
51
|
+
readonly help: "The Google Cloud OAuth client shared by the installation.";
|
|
52
|
+
}, {
|
|
53
|
+
readonly key: "clientSecret";
|
|
54
|
+
readonly label: "OAuth client secret";
|
|
55
|
+
readonly scope: "provider";
|
|
56
|
+
readonly secret: true;
|
|
57
|
+
readonly help: "The matching Google Cloud OAuth client secret.";
|
|
58
|
+
}, {
|
|
59
|
+
readonly key: "developerToken";
|
|
60
|
+
readonly label: "Developer token";
|
|
61
|
+
readonly scope: "provider";
|
|
62
|
+
readonly secret: true;
|
|
63
|
+
readonly 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.";
|
|
64
|
+
}, {
|
|
65
|
+
readonly key: "accessToken";
|
|
66
|
+
readonly label: "Access token";
|
|
67
|
+
readonly scope: "account";
|
|
68
|
+
readonly secret: true;
|
|
69
|
+
readonly help: "The connected Google user's one-hour OAuth access token.";
|
|
70
|
+
}, {
|
|
71
|
+
readonly key: "refreshToken";
|
|
72
|
+
readonly label: "Refresh token";
|
|
73
|
+
readonly scope: "account";
|
|
74
|
+
readonly secret: true;
|
|
75
|
+
readonly help: "The reusable offline token used to replace expired access tokens.";
|
|
76
|
+
}, {
|
|
77
|
+
readonly key: "loginCustomerId";
|
|
78
|
+
readonly label: "Manager customer ID";
|
|
79
|
+
readonly scope: "account";
|
|
80
|
+
readonly secret: false;
|
|
81
|
+
readonly optional: true;
|
|
82
|
+
readonly 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.";
|
|
83
|
+
}];
|
|
84
|
+
/**
|
|
85
|
+
* The OAuth2 exchange Google Ads requires — DECLARED here, performed by the
|
|
86
|
+
* host.
|
|
87
|
+
*
|
|
88
|
+
* A consent screen needs a browser, a redirect URI and somewhere to persist
|
|
89
|
+
* the result, and all three belong to the host; a package that ran the dance
|
|
90
|
+
* itself would have to own a web server. So this says precisely enough for a
|
|
91
|
+
* host to do it.
|
|
92
|
+
*
|
|
93
|
+
* The access token lasts 3600 seconds. A host that never refreshes will work
|
|
94
|
+
* all afternoon and be broken by morning, which is why the lifetime is stated
|
|
95
|
+
* rather than left to be discovered.
|
|
96
|
+
*
|
|
97
|
+
* Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may
|
|
98
|
+
* safely be retried and may run concurrently. That is stated rather than
|
|
99
|
+
* assumed because the opposite — a provider that spends the token and revokes
|
|
100
|
+
* the grant on a replay — looks identical until it happens.
|
|
101
|
+
*/
|
|
102
|
+
declare const GOOGLE_ADS_OAUTH: {
|
|
103
|
+
readonly flow: "authorization_code";
|
|
104
|
+
readonly authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth";
|
|
105
|
+
readonly tokenUrl: "https://oauth2.googleapis.com/token";
|
|
106
|
+
readonly scopes: readonly ["https://www.googleapis.com/auth/adwords"];
|
|
107
|
+
readonly accessTokenCredential: "accessToken";
|
|
108
|
+
readonly refreshTokenCredential: "refreshToken";
|
|
109
|
+
readonly refreshTokenRotates: false;
|
|
110
|
+
readonly accessTokenTtlSeconds: 3600;
|
|
111
|
+
};
|
|
112
|
+
/** Build a Google Ads node's connector metadata from the operation it performs. */
|
|
113
|
+
declare function googleAdsMeta(role: ConnectorMeta["role"], operation: string, docs: string): ConnectorMeta;
|
|
114
|
+
|
|
115
|
+
declare const GOOGLE_ADS_CUSTOMER_LIST_KIND = "@particle-academy/google_ads_customer_list";
|
|
116
|
+
declare const GOOGLE_ADS_CUSTOMER_LIST_OPERATION = "customer_list_accessible";
|
|
117
|
+
declare const GOOGLE_ADS_CUSTOMER_LIST_META: _particle_academy_fancy_flow_connectors.ConnectorMeta;
|
|
118
|
+
/**
|
|
119
|
+
* What this node emits — the "ingredients" a downstream node can reference.
|
|
120
|
+
*
|
|
121
|
+
* fancy-flow reads `outputShape` off the kind and offers it in the variable
|
|
122
|
+
* picker, so declaring it is the whole of the work: an author configuring the
|
|
123
|
+
* next node picks `{{ $json.data.id }}` off a list instead of typing a path
|
|
124
|
+
* and hoping.
|
|
125
|
+
*/
|
|
126
|
+
declare const GOOGLE_ADS_CUSTOMER_LIST_OUTPUT: OutputField[];
|
|
127
|
+
declare const googleAdsCustomerListKind: NodeKindDefinition;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* GENERATED FILE — do not edit.
|
|
131
|
+
*
|
|
132
|
+
* Emitted from provider/manifest.json by weaver's generator.
|
|
133
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
134
|
+
* being rejected, because it works until it silently does not. Fix
|
|
135
|
+
* provider/manifest.json (or weaver's template/) and regenerate:
|
|
136
|
+
*
|
|
137
|
+
* npm run provider -- google_ads
|
|
138
|
+
*/
|
|
139
|
+
/**
|
|
140
|
+
* Google Ads's node kinds for fancy-flow.
|
|
141
|
+
*
|
|
142
|
+
* Install this on every host. The TypeScript executors live in the js
|
|
143
|
+
* package's `./flow` subpath; PHP and Python hosts run their own and need only
|
|
144
|
+
* this.
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
/** Every Google Ads kind, for a host that registers the lot. */
|
|
148
|
+
declare const GOOGLE_ADS_KINDS: NodeKindDefinition[];
|
|
149
|
+
|
|
150
|
+
export { CONNECTOR_API_VERSION, GOOGLE_ADS_CREDENTIALS, GOOGLE_ADS_CUSTOMER_LIST_KIND, GOOGLE_ADS_CUSTOMER_LIST_META, GOOGLE_ADS_CUSTOMER_LIST_OPERATION, GOOGLE_ADS_CUSTOMER_LIST_OUTPUT, GOOGLE_ADS_KINDS, GOOGLE_ADS_OAUTH, GOOGLE_ADS_SERVICE, googleAdsCustomerListKind, googleAdsMeta };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import * as _particle_academy_fancy_flow_connectors from '@particle-academy/fancy-flow/connectors';
|
|
2
|
+
import { ConnectorMeta, OutputField } from '@particle-academy/fancy-flow/connectors';
|
|
3
|
+
import { NodeKindDefinition } from '@particle-academy/fancy-flow/engine';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* GENERATED FILE — do not edit.
|
|
7
|
+
*
|
|
8
|
+
* Emitted from provider/manifest.json by weaver's generator.
|
|
9
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
10
|
+
* being rejected, because it works until it silently does not. Fix
|
|
11
|
+
* provider/manifest.json (or weaver's template/) and regenerate:
|
|
12
|
+
*
|
|
13
|
+
* npm run provider -- google_ads
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Google Ads's identity on the authoring surface, shared by every Google Ads
|
|
17
|
+
* node.
|
|
18
|
+
*
|
|
19
|
+
* This file must import nothing from the js package: a PHP or Python project
|
|
20
|
+
* installs the ui package and never that one, and the import would be a
|
|
21
|
+
* dangling module the moment it did.
|
|
22
|
+
*
|
|
23
|
+
* ## The sandbox trap
|
|
24
|
+
*
|
|
25
|
+
* Use a dedicated Google Ads test manager and test client account. Test and
|
|
26
|
+
* production hierarchies cannot interact; test ads never serve or incur cost,
|
|
27
|
+
* but some features such as billing, conversion uploads and serving reports
|
|
28
|
+
* cannot be exercised there.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The connector API version this package was GENERATED against.
|
|
33
|
+
*
|
|
34
|
+
* A literal, never imported — an imported constant lets an upgrade rewrite the
|
|
35
|
+
* very claim it exists to detect.
|
|
36
|
+
*/
|
|
37
|
+
declare const CONNECTOR_API_VERSION = 1;
|
|
38
|
+
/** The parts of a connector's identity that belong to the SERVICE, not the node. */
|
|
39
|
+
declare const GOOGLE_ADS_SERVICE: {
|
|
40
|
+
readonly service: "google_ads";
|
|
41
|
+
readonly serviceTitle: "Google Ads";
|
|
42
|
+
readonly domain: "marketing";
|
|
43
|
+
readonly sandbox: "separate-account";
|
|
44
|
+
};
|
|
45
|
+
/** The credentials a Google Ads connection holds. */
|
|
46
|
+
declare const GOOGLE_ADS_CREDENTIALS: readonly [{
|
|
47
|
+
readonly key: "clientId";
|
|
48
|
+
readonly label: "OAuth client ID";
|
|
49
|
+
readonly scope: "provider";
|
|
50
|
+
readonly secret: false;
|
|
51
|
+
readonly help: "The Google Cloud OAuth client shared by the installation.";
|
|
52
|
+
}, {
|
|
53
|
+
readonly key: "clientSecret";
|
|
54
|
+
readonly label: "OAuth client secret";
|
|
55
|
+
readonly scope: "provider";
|
|
56
|
+
readonly secret: true;
|
|
57
|
+
readonly help: "The matching Google Cloud OAuth client secret.";
|
|
58
|
+
}, {
|
|
59
|
+
readonly key: "developerToken";
|
|
60
|
+
readonly label: "Developer token";
|
|
61
|
+
readonly scope: "provider";
|
|
62
|
+
readonly secret: true;
|
|
63
|
+
readonly 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.";
|
|
64
|
+
}, {
|
|
65
|
+
readonly key: "accessToken";
|
|
66
|
+
readonly label: "Access token";
|
|
67
|
+
readonly scope: "account";
|
|
68
|
+
readonly secret: true;
|
|
69
|
+
readonly help: "The connected Google user's one-hour OAuth access token.";
|
|
70
|
+
}, {
|
|
71
|
+
readonly key: "refreshToken";
|
|
72
|
+
readonly label: "Refresh token";
|
|
73
|
+
readonly scope: "account";
|
|
74
|
+
readonly secret: true;
|
|
75
|
+
readonly help: "The reusable offline token used to replace expired access tokens.";
|
|
76
|
+
}, {
|
|
77
|
+
readonly key: "loginCustomerId";
|
|
78
|
+
readonly label: "Manager customer ID";
|
|
79
|
+
readonly scope: "account";
|
|
80
|
+
readonly secret: false;
|
|
81
|
+
readonly optional: true;
|
|
82
|
+
readonly 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.";
|
|
83
|
+
}];
|
|
84
|
+
/**
|
|
85
|
+
* The OAuth2 exchange Google Ads requires — DECLARED here, performed by the
|
|
86
|
+
* host.
|
|
87
|
+
*
|
|
88
|
+
* A consent screen needs a browser, a redirect URI and somewhere to persist
|
|
89
|
+
* the result, and all three belong to the host; a package that ran the dance
|
|
90
|
+
* itself would have to own a web server. So this says precisely enough for a
|
|
91
|
+
* host to do it.
|
|
92
|
+
*
|
|
93
|
+
* The access token lasts 3600 seconds. A host that never refreshes will work
|
|
94
|
+
* all afternoon and be broken by morning, which is why the lifetime is stated
|
|
95
|
+
* rather than left to be discovered.
|
|
96
|
+
*
|
|
97
|
+
* Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may
|
|
98
|
+
* safely be retried and may run concurrently. That is stated rather than
|
|
99
|
+
* assumed because the opposite — a provider that spends the token and revokes
|
|
100
|
+
* the grant on a replay — looks identical until it happens.
|
|
101
|
+
*/
|
|
102
|
+
declare const GOOGLE_ADS_OAUTH: {
|
|
103
|
+
readonly flow: "authorization_code";
|
|
104
|
+
readonly authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth";
|
|
105
|
+
readonly tokenUrl: "https://oauth2.googleapis.com/token";
|
|
106
|
+
readonly scopes: readonly ["https://www.googleapis.com/auth/adwords"];
|
|
107
|
+
readonly accessTokenCredential: "accessToken";
|
|
108
|
+
readonly refreshTokenCredential: "refreshToken";
|
|
109
|
+
readonly refreshTokenRotates: false;
|
|
110
|
+
readonly accessTokenTtlSeconds: 3600;
|
|
111
|
+
};
|
|
112
|
+
/** Build a Google Ads node's connector metadata from the operation it performs. */
|
|
113
|
+
declare function googleAdsMeta(role: ConnectorMeta["role"], operation: string, docs: string): ConnectorMeta;
|
|
114
|
+
|
|
115
|
+
declare const GOOGLE_ADS_CUSTOMER_LIST_KIND = "@particle-academy/google_ads_customer_list";
|
|
116
|
+
declare const GOOGLE_ADS_CUSTOMER_LIST_OPERATION = "customer_list_accessible";
|
|
117
|
+
declare const GOOGLE_ADS_CUSTOMER_LIST_META: _particle_academy_fancy_flow_connectors.ConnectorMeta;
|
|
118
|
+
/**
|
|
119
|
+
* What this node emits — the "ingredients" a downstream node can reference.
|
|
120
|
+
*
|
|
121
|
+
* fancy-flow reads `outputShape` off the kind and offers it in the variable
|
|
122
|
+
* picker, so declaring it is the whole of the work: an author configuring the
|
|
123
|
+
* next node picks `{{ $json.data.id }}` off a list instead of typing a path
|
|
124
|
+
* and hoping.
|
|
125
|
+
*/
|
|
126
|
+
declare const GOOGLE_ADS_CUSTOMER_LIST_OUTPUT: OutputField[];
|
|
127
|
+
declare const googleAdsCustomerListKind: NodeKindDefinition;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* GENERATED FILE — do not edit.
|
|
131
|
+
*
|
|
132
|
+
* Emitted from provider/manifest.json by weaver's generator.
|
|
133
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
134
|
+
* being rejected, because it works until it silently does not. Fix
|
|
135
|
+
* provider/manifest.json (or weaver's template/) and regenerate:
|
|
136
|
+
*
|
|
137
|
+
* npm run provider -- google_ads
|
|
138
|
+
*/
|
|
139
|
+
/**
|
|
140
|
+
* Google Ads's node kinds for fancy-flow.
|
|
141
|
+
*
|
|
142
|
+
* Install this on every host. The TypeScript executors live in the js
|
|
143
|
+
* package's `./flow` subpath; PHP and Python hosts run their own and need only
|
|
144
|
+
* this.
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
/** Every Google Ads kind, for a host that registers the lot. */
|
|
148
|
+
declare const GOOGLE_ADS_KINDS: NodeKindDefinition[];
|
|
149
|
+
|
|
150
|
+
export { CONNECTOR_API_VERSION, GOOGLE_ADS_CREDENTIALS, GOOGLE_ADS_CUSTOMER_LIST_KIND, GOOGLE_ADS_CUSTOMER_LIST_META, GOOGLE_ADS_CUSTOMER_LIST_OPERATION, GOOGLE_ADS_CUSTOMER_LIST_OUTPUT, GOOGLE_ADS_KINDS, GOOGLE_ADS_OAUTH, GOOGLE_ADS_SERVICE, googleAdsCustomerListKind, googleAdsMeta };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { defineConnectorKind, summarize } from '@particle-academy/fancy-flow/connectors';
|
|
2
|
+
|
|
3
|
+
// src/service.ts
|
|
4
|
+
var CONNECTOR_API_VERSION = 1;
|
|
5
|
+
var GOOGLE_ADS_SERVICE = {
|
|
6
|
+
service: "google_ads",
|
|
7
|
+
serviceTitle: "Google Ads",
|
|
8
|
+
domain: "marketing",
|
|
9
|
+
sandbox: "separate-account"
|
|
10
|
+
};
|
|
11
|
+
var GOOGLE_ADS_CREDENTIALS = [
|
|
12
|
+
{
|
|
13
|
+
"key": "clientId",
|
|
14
|
+
"label": "OAuth client ID",
|
|
15
|
+
"scope": "provider",
|
|
16
|
+
"secret": false,
|
|
17
|
+
"help": "The Google Cloud OAuth client shared by the installation."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"key": "clientSecret",
|
|
21
|
+
"label": "OAuth client secret",
|
|
22
|
+
"scope": "provider",
|
|
23
|
+
"secret": true,
|
|
24
|
+
"help": "The matching Google Cloud OAuth client secret."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"key": "developerToken",
|
|
28
|
+
"label": "Developer token",
|
|
29
|
+
"scope": "provider",
|
|
30
|
+
"secret": true,
|
|
31
|
+
"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."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"key": "accessToken",
|
|
35
|
+
"label": "Access token",
|
|
36
|
+
"scope": "account",
|
|
37
|
+
"secret": true,
|
|
38
|
+
"help": "The connected Google user's one-hour OAuth access token."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"key": "refreshToken",
|
|
42
|
+
"label": "Refresh token",
|
|
43
|
+
"scope": "account",
|
|
44
|
+
"secret": true,
|
|
45
|
+
"help": "The reusable offline token used to replace expired access tokens."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"key": "loginCustomerId",
|
|
49
|
+
"label": "Manager customer ID",
|
|
50
|
+
"scope": "account",
|
|
51
|
+
"secret": false,
|
|
52
|
+
"optional": true,
|
|
53
|
+
"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."
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
var GOOGLE_ADS_OAUTH = {
|
|
57
|
+
"flow": "authorization_code",
|
|
58
|
+
"authorizeUrl": "https://accounts.google.com/o/oauth2/v2/auth",
|
|
59
|
+
"tokenUrl": "https://oauth2.googleapis.com/token",
|
|
60
|
+
"scopes": [
|
|
61
|
+
"https://www.googleapis.com/auth/adwords"
|
|
62
|
+
],
|
|
63
|
+
"accessTokenCredential": "accessToken",
|
|
64
|
+
"refreshTokenCredential": "refreshToken",
|
|
65
|
+
"refreshTokenRotates": false,
|
|
66
|
+
"accessTokenTtlSeconds": 3600
|
|
67
|
+
};
|
|
68
|
+
function googleAdsMeta(role, operation, docs) {
|
|
69
|
+
return { ...GOOGLE_ADS_SERVICE, role, operation, docs };
|
|
70
|
+
}
|
|
71
|
+
var GOOGLE_ADS_CUSTOMER_LIST_KIND = "@particle-academy/google_ads_customer_list";
|
|
72
|
+
var GOOGLE_ADS_CUSTOMER_LIST_OPERATION = "customer_list_accessible";
|
|
73
|
+
var GOOGLE_ADS_CUSTOMER_LIST_META = googleAdsMeta("action", "list directly accessible customers", "https://developers.google.com/google-ads/api/rest/reference/rest/v25/customers/listAccessibleCustomers");
|
|
74
|
+
var GOOGLE_ADS_CUSTOMER_LIST_OUTPUT = [
|
|
75
|
+
{
|
|
76
|
+
"path": "data.resourceNames",
|
|
77
|
+
"type": "array",
|
|
78
|
+
"description": "Customer resource names in customers/{customer_id} form that the OAuth identity can access directly."
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
var googleAdsCustomerListKind = defineConnectorKind(GOOGLE_ADS_CUSTOMER_LIST_META, {
|
|
82
|
+
name: GOOGLE_ADS_CUSTOMER_LIST_KIND,
|
|
83
|
+
aliases: ["google_ads_customer_list"],
|
|
84
|
+
label: "Accessible Google Ads customers",
|
|
85
|
+
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.",
|
|
86
|
+
inputs: [{ id: "in" }],
|
|
87
|
+
outputs: [{ id: "out" }],
|
|
88
|
+
sideEffects: "none",
|
|
89
|
+
outputShape: GOOGLE_ADS_CUSTOMER_LIST_OUTPUT,
|
|
90
|
+
configSchema: [],
|
|
91
|
+
defaultConfig: {
|
|
92
|
+
"mode": "auto"
|
|
93
|
+
},
|
|
94
|
+
renderBody: ({ config }) => summarize(GOOGLE_ADS_CUSTOMER_LIST_META, config, "list directly accessible customers")
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// src/index.ts
|
|
98
|
+
var GOOGLE_ADS_KINDS = [
|
|
99
|
+
googleAdsCustomerListKind
|
|
100
|
+
];
|
|
101
|
+
|
|
102
|
+
export { CONNECTOR_API_VERSION, GOOGLE_ADS_CREDENTIALS, GOOGLE_ADS_CUSTOMER_LIST_KIND, GOOGLE_ADS_CUSTOMER_LIST_META, GOOGLE_ADS_CUSTOMER_LIST_OPERATION, GOOGLE_ADS_CUSTOMER_LIST_OUTPUT, GOOGLE_ADS_KINDS, GOOGLE_ADS_OAUTH, GOOGLE_ADS_SERVICE, googleAdsCustomerListKind, googleAdsMeta };
|
|
103
|
+
//# sourceMappingURL=index.js.map
|
|
104
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/service.ts","../src/kinds/customer-list-accessible.ts","../src/index.ts"],"names":[],"mappings":"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","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"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@particle-academy/google-ads-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
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
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/Fancy-Friends/google-ads.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/Fancy-Friends/google-ads#readme",
|
|
10
|
+
"bugs": "https://github.com/Fancy-Friends/google-ads/issues",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "./dist/index.cjs",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"require": {
|
|
22
|
+
"types": "./dist/index.d.cts",
|
|
23
|
+
"default": "./dist/index.cjs"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"README.md",
|
|
31
|
+
"CHANGELOG.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsup",
|
|
36
|
+
"lint": "tsc --noEmit",
|
|
37
|
+
"test": "node --import tsx --test tests/*.test.ts",
|
|
38
|
+
"prepublishOnly": "tsup"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@particle-academy/fancy-flow": ">=0.48.0 <2.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@particle-academy/fancy-flow": ">=0.48.0 <2.0",
|
|
46
|
+
"@types/node": "^26.2.0",
|
|
47
|
+
"tsup": "^8.5.0",
|
|
48
|
+
"tsx": "^4.19.0",
|
|
49
|
+
"typescript": "^5.8.0"
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"keywords": [
|
|
55
|
+
"google_ads",
|
|
56
|
+
"marketing",
|
|
57
|
+
"connector",
|
|
58
|
+
"fancy-flow",
|
|
59
|
+
"fancy-ui",
|
|
60
|
+
"particle-academy"
|
|
61
|
+
],
|
|
62
|
+
"license": "MIT",
|
|
63
|
+
"sideEffects": false,
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=22"
|
|
66
|
+
}
|
|
67
|
+
}
|