@particle-academy/google-slides-js 0.5.0 → 0.7.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
@@ -8,6 +8,43 @@ The four packages share one version, because they are generated from one
8
8
  `provider/` definition and a version that meant something different in each
9
9
  would be a version nobody could reason about.
10
10
 
11
+ ## [0.7.0] — 2026-11-08
12
+
13
+ ### Added
14
+
15
+ - **`text_replace`**: replace every occurrence of a string in a presentation
16
+ (Google's `replaceAllText`), optionally only on the slides named in
17
+ `pageObjectIds`. Publishes `occurrencesChanged`; 0 means not found.
18
+ - **`batch_update`**: any list of Google Slides API requests, as JSON, applied
19
+ all or none.
20
+ - Both take an optional **`requiredRevisionId`**: if the presentation has
21
+ changed since you read it, Google refuses the whole batch.
22
+
23
+ ## [0.6.0] — 2026-11-08
24
+
25
+ ### Added
26
+
27
+ - **One Google consent grant, shared by every Google connector** (`oauth.grant:
28
+ "google"`), for an org-level Google connection: one OAuth client, one consent
29
+ and one refresh token per person, with each feature's scopes asked for when it
30
+ is first used. Declared in the manifest, the `-ui` package's OAuth constant,
31
+ the README and the registry index:
32
+ - `authorizeParams`: `access_type=offline` and `include_granted_scopes=true`.
33
+ A refresh token comes back only on the FIRST code exchange, so keep the stored
34
+ one when an exchange returns none.
35
+ - `revoke`: POST `https://oauth2.googleapis.com/revoke` with `token`, and
36
+ `scope: "grant"`. **Revoking removes the person's WHOLE Google grant, every
37
+ Google connector**, so a per-feature disconnect stops using that feature's
38
+ scopes locally and only a full Google disconnect revokes.
39
+ - `identity`: identify the account by the id_token's `sub` (request `openid`;
40
+ issuer `https://accounts.google.com` or `accounts.google.com`; audience is
41
+ the `clientId`), never by email, which Google says is neither unique nor
42
+ permanent.
43
+ `restrictedScopes` is empty: none of this connector's scopes is restricted.
44
+
45
+ Nothing a request sends has changed; this is what a host needs to run the
46
+ connection.
47
+
11
48
  ## [0.5.0] — 2026-11-08
12
49
 
13
50
  ### Added
package/README.md CHANGED
@@ -55,6 +55,13 @@ Google Slides uses OAuth2 (authorization_code). The package DECLARES the exchang
55
55
  - **Scopes** — `https://www.googleapis.com/auth/presentations`
56
56
  - **Access token lifetime** — 3600 seconds (1 hours). A host that never refreshes works all afternoon and is broken by morning.
57
57
 
58
+ **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.
59
+
60
+ - **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.
61
+ - **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.
62
+ - **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.
63
+ - **No restricted scopes** in this connector.
64
+
58
65
  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.
59
66
 
60
67
  ### The estate
@@ -67,6 +74,18 @@ The refresh tokens do **not** rotate: the same one is reusable, so a refresh may
67
74
 
68
75
  ### Actions
69
76
 
77
+ #### `batch_update` — Batch update a Google Slides presentation
78
+
79
+ Apply a list of Google Slides presentation API requests to a presentation, all or none.
80
+
81
+ `POST /v1/presentations/{presentationId}:batchUpdate` · **unsafe to replay** — a retried durable run does it TWICE
82
+
83
+ | Input | Required | What it is |
84
+ |---|---|---|
85
+ | `presentationId` | yes | From presentation_create's data.presentationId, or the id in the presentation's own URL. |
86
+ | `requests` | yes | Google's Request objects, in order. Example: [{"replaceAllText":{"containsText":{"text":"{{name}}","matchCase":true},"replaceText":"Ada"}}]. |
87
+ | `requiredRevisionId` | no | Optional. The presentation's revisionId as you last read it. If the presentation has changed since, Google refuses the whole batch with a 400 instead of applying it to content you have not seen. |
88
+
70
89
  #### `presentation_create` — Google Slides presentation
71
90
 
72
91
  Create a blank Google Slides presentation.
@@ -87,6 +106,21 @@ Read a presentation's slides and the objectId of every element on them -- the pr
87
106
  |---|---|---|
88
107
  | `presentationId` | yes | From presentation_create's data.presentationId, or the id in the presentation's own URL. |
89
108
 
109
+ #### `text_replace` — Replace text in a Google Slides presentation
110
+
111
+ Replace every occurrence of a string in a presentation.
112
+
113
+ `POST /v1/presentations/{presentationId}:batchUpdate` · **unsafe to replay** — a retried durable run does it TWICE
114
+
115
+ | Input | Required | What it is |
116
+ |---|---|---|
117
+ | `presentationId` | yes | From presentation_create's data.presentationId, or the id in the presentation's own URL. |
118
+ | `find` | yes | The exact text to find, e.g. {{name}}. Not a regular expression. |
119
+ | `replaceWith` | yes | Inserted in place of every match. Empty is refused: to delete text, use batch_update. |
120
+ | `matchCase` | no | Off matches case-insensitively, which is also what Google does when it is not sent. |
121
+ | `pageObjectIds` | no | Optional. Slide objectIds, comma separated (from presentation_get). Empty means every slide. |
122
+ | `requiredRevisionId` | no | Optional. The presentation's revisionId as you last read it. If the presentation has changed since, Google refuses the whole batch with a 400 instead of applying it to content you have not seen. |
123
+
90
124
  ## Run it before you have credentials
91
125
 
92
126
  Every operation ships a **faker**, whether or not Google Slides has a sandbox. Set a
@@ -0,0 +1,266 @@
1
+ import { callConnector } from '@particle-academy/fancy-connector-core';
2
+
3
+ // src/faker.ts
4
+ function fakeBatchUpdate({ config, fake }) {
5
+ return {
6
+ "presentationId": config.presentationId !== void 0 && config.presentationId !== null && config.presentationId !== "" ? String(config.presentationId) : fake.id("1Slide"),
7
+ "replies": [
8
+ {}
9
+ ],
10
+ "writeControl": {
11
+ "requiredRevisionId": fake.hex(16)
12
+ }
13
+ };
14
+ }
15
+ function fakePresentationCreate({ config, fake }) {
16
+ return {
17
+ "presentationId": fake.id("1Slide"),
18
+ "title": config.title !== void 0 && config.title !== null && config.title !== "" ? String(config.title) : "Untitled presentation"
19
+ };
20
+ }
21
+ function fakePresentationGet({ config, fake }) {
22
+ return {
23
+ "presentationId": config.presentationId !== void 0 && config.presentationId !== null && config.presentationId !== "" ? String(config.presentationId) : fake.id("1Slide"),
24
+ "title": "Untitled presentation",
25
+ "locale": "en",
26
+ "slides": [
27
+ {
28
+ "objectId": fake.id("slide"),
29
+ "pageElements": [
30
+ {
31
+ "objectId": fake.id("title"),
32
+ "shape": {
33
+ "shapeType": "TEXT_BOX",
34
+ "placeholder": {
35
+ "type": "CENTERED_TITLE"
36
+ },
37
+ "text": {
38
+ "textElements": []
39
+ }
40
+ }
41
+ },
42
+ {
43
+ "objectId": fake.id("subtitle"),
44
+ "shape": {
45
+ "shapeType": "TEXT_BOX",
46
+ "placeholder": {
47
+ "type": "SUBTITLE"
48
+ },
49
+ "text": {
50
+ "textElements": []
51
+ }
52
+ }
53
+ }
54
+ ]
55
+ }
56
+ ]
57
+ };
58
+ }
59
+ function fakeTextReplace({ config, fake }) {
60
+ return {
61
+ "presentationId": config.presentationId !== void 0 && config.presentationId !== null && config.presentationId !== "" ? String(config.presentationId) : fake.id("1Slide"),
62
+ "replies": [
63
+ {
64
+ "replaceAllText": {
65
+ "occurrencesChanged": fake.int(1, 9)
66
+ }
67
+ }
68
+ ],
69
+ "writeControl": {
70
+ "requiredRevisionId": fake.hex(16)
71
+ }
72
+ };
73
+ }
74
+ var googleSlidesFaker = (operation, request) => {
75
+ switch (operation) {
76
+ case "batch_update":
77
+ return fakeBatchUpdate(request);
78
+ case "presentation_create":
79
+ return fakePresentationCreate(request);
80
+ case "presentation_get":
81
+ return fakePresentationGet(request);
82
+ case "text_replace":
83
+ return fakeTextReplace(request);
84
+ default:
85
+ throw new Error(
86
+ `google_slides: no fake response is defined for "${operation}". Add a fixture under provider/fixtures/ and regenerate \u2014 a connector without a faker cannot be developed against, tested, or demonstrated.`
87
+ );
88
+ }
89
+ };
90
+
91
+ // src/service.ts
92
+ var CONNECTOR_API_VERSION = 1;
93
+ var GOOGLE_SLIDES_BASE_URLS = {
94
+ "live": "https://slides.googleapis.com"
95
+ };
96
+ var GOOGLE_SLIDES_REQUIRES = [
97
+ "accessToken",
98
+ "refreshToken",
99
+ "clientId",
100
+ "clientSecret"
101
+ ];
102
+ function googleSlidesAuthorize(credentials, request, _mode) {
103
+ request.headers.Authorization = `Bearer ${credentials.accessToken ?? ""}`;
104
+ }
105
+ var GOOGLE_SLIDES = {
106
+ service: "google_slides",
107
+ title: "Google Slides",
108
+ sandbox: "none",
109
+ baseUrls: { ...GOOGLE_SLIDES_BASE_URLS },
110
+ requires: [...GOOGLE_SLIDES_REQUIRES],
111
+ authorize: googleSlidesAuthorize,
112
+ faker: googleSlidesFaker
113
+ };
114
+ var BATCH_UPDATE_OPERATION = "batch_update";
115
+ async function googleSlidesBatchUpdate(options) {
116
+ const config = options.config ?? {};
117
+ if (config.presentationId === void 0 || config.presentationId === null || config.presentationId === "") {
118
+ throw new Error(`batch_update: "presentationId" is required (Presentation ID).`);
119
+ }
120
+ if (config.requests === void 0 || config.requests === null || config.requests === "") {
121
+ throw new Error(`batch_update: "requests" is required (Requests).`);
122
+ }
123
+ if (typeof config.requests === "string" && config.requests !== "") {
124
+ try {
125
+ JSON.parse(config.requests);
126
+ } catch (error) {
127
+ throw new Error(`batch_update: "requests" must be JSON: ${error.message}`);
128
+ }
129
+ }
130
+ return callConnector(GOOGLE_SLIDES, {
131
+ operation: BATCH_UPDATE_OPERATION,
132
+ config,
133
+ input: options.input,
134
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
135
+ ...options.mode === void 0 ? {} : { mode: options.mode },
136
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
137
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
138
+ ...options.transport === void 0 ? {} : { transport: options.transport },
139
+ request: {
140
+ method: "POST",
141
+ path: `/v1/presentations/${encodeURIComponent(String(config.presentationId))}:batchUpdate`,
142
+ json: nestFields({
143
+ ...config.requests !== void 0 && config.requests !== null && config.requests !== "" ? { "requests": typeof config.requests === "string" ? JSON.parse(config.requests) : config.requests } : {},
144
+ ...config.requiredRevisionId !== void 0 && config.requiredRevisionId !== null && config.requiredRevisionId !== "" ? { "writeControl.requiredRevisionId": String(config.requiredRevisionId) } : {}
145
+ })
146
+ }
147
+ });
148
+ }
149
+ function nestFields(flat) {
150
+ const out = {};
151
+ for (const [path, value] of Object.entries(flat)) {
152
+ const parts = path.split(".");
153
+ let node = out;
154
+ while (parts.length > 1) {
155
+ const key = parts.shift();
156
+ const wantsArray = /^\d+$/.test(parts[0] ?? "");
157
+ if (typeof node[key] !== "object" || node[key] === null) node[key] = wantsArray ? [] : {};
158
+ node = node[key];
159
+ }
160
+ node[parts[0]] = value;
161
+ }
162
+ return out;
163
+ }
164
+ var PRESENTATION_CREATE_OPERATION = "presentation_create";
165
+ async function googleSlidesPresentationCreate(options) {
166
+ const config = options.config ?? {};
167
+ if (config.title === void 0 || config.title === null || config.title === "") {
168
+ throw new Error(`presentation_create: "title" is required (Title).`);
169
+ }
170
+ return callConnector(GOOGLE_SLIDES, {
171
+ operation: PRESENTATION_CREATE_OPERATION,
172
+ config,
173
+ input: options.input,
174
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
175
+ ...options.mode === void 0 ? {} : { mode: options.mode },
176
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
177
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
178
+ ...options.transport === void 0 ? {} : { transport: options.transport },
179
+ request: {
180
+ method: "POST",
181
+ path: "/v1/presentations",
182
+ json: {
183
+ "title": String(config.title)
184
+ }
185
+ }
186
+ });
187
+ }
188
+ var PRESENTATION_GET_OPERATION = "presentation_get";
189
+ async function googleSlidesPresentationGet(options) {
190
+ const config = options.config ?? {};
191
+ if (config.presentationId === void 0 || config.presentationId === null || config.presentationId === "") {
192
+ throw new Error(`presentation_get: "presentationId" is required (Presentation ID).`);
193
+ }
194
+ return callConnector(GOOGLE_SLIDES, {
195
+ operation: PRESENTATION_GET_OPERATION,
196
+ config,
197
+ input: options.input,
198
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
199
+ ...options.mode === void 0 ? {} : { mode: options.mode },
200
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
201
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
202
+ ...options.transport === void 0 ? {} : { transport: options.transport },
203
+ request: {
204
+ method: "GET",
205
+ path: `/v1/presentations/${encodeURIComponent(String(config.presentationId))}`,
206
+ query: {}
207
+ }
208
+ });
209
+ }
210
+ var TEXT_REPLACE_OPERATION = "text_replace";
211
+ async function googleSlidesTextReplace(options) {
212
+ const config = options.config ?? {};
213
+ if (config.presentationId === void 0 || config.presentationId === null || config.presentationId === "") {
214
+ throw new Error(`text_replace: "presentationId" is required (Presentation ID).`);
215
+ }
216
+ if (config.find === void 0 || config.find === null || config.find === "") {
217
+ throw new Error(`text_replace: "find" is required (Find).`);
218
+ }
219
+ if (config.replaceWith === void 0 || config.replaceWith === null || config.replaceWith === "") {
220
+ throw new Error(`text_replace: "replaceWith" is required (Replace with).`);
221
+ }
222
+ return callConnector(GOOGLE_SLIDES, {
223
+ operation: TEXT_REPLACE_OPERATION,
224
+ config,
225
+ input: options.input,
226
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
227
+ ...options.mode === void 0 ? {} : { mode: options.mode },
228
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
229
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
230
+ ...options.transport === void 0 ? {} : { transport: options.transport },
231
+ request: {
232
+ method: "POST",
233
+ path: `/v1/presentations/${encodeURIComponent(String(config.presentationId))}:batchUpdate`,
234
+ json: nestFields2({
235
+ "requests.0.replaceAllText.containsText.text": String(config.find),
236
+ "requests.0.replaceAllText.replaceText": String(config.replaceWith),
237
+ ...config.matchCase !== void 0 && config.matchCase !== null && config.matchCase !== "" ? { "requests.0.replaceAllText.containsText.matchCase": Boolean(config.matchCase) } : {},
238
+ ...config.pageObjectIds !== void 0 && config.pageObjectIds !== null && config.pageObjectIds !== "" ? { "requests.0.replaceAllText.pageObjectIds": requests0ReplacealltextPageobjectidsList(config.pageObjectIds) } : {},
239
+ ...config.requiredRevisionId !== void 0 && config.requiredRevisionId !== null && config.requiredRevisionId !== "" ? { "writeControl.requiredRevisionId": String(config.requiredRevisionId) } : {}
240
+ })
241
+ }
242
+ });
243
+ }
244
+ function nestFields2(flat) {
245
+ const out = {};
246
+ for (const [path, value] of Object.entries(flat)) {
247
+ const parts = path.split(".");
248
+ let node = out;
249
+ while (parts.length > 1) {
250
+ const key = parts.shift();
251
+ const wantsArray = /^\d+$/.test(parts[0] ?? "");
252
+ if (typeof node[key] !== "object" || node[key] === null) node[key] = wantsArray ? [] : {};
253
+ node = node[key];
254
+ }
255
+ node[parts[0]] = value;
256
+ }
257
+ return out;
258
+ }
259
+ function requests0ReplacealltextPageobjectidsList(value) {
260
+ const items = Array.isArray(value) ? value.map(String) : typeof value === "string" ? value.split(",") : [];
261
+ return items.map((item) => item.trim()).filter(Boolean);
262
+ }
263
+
264
+ export { BATCH_UPDATE_OPERATION, CONNECTOR_API_VERSION, GOOGLE_SLIDES, GOOGLE_SLIDES_BASE_URLS, GOOGLE_SLIDES_REQUIRES, PRESENTATION_CREATE_OPERATION, PRESENTATION_GET_OPERATION, TEXT_REPLACE_OPERATION, googleSlidesAuthorize, googleSlidesBatchUpdate, googleSlidesFaker, googleSlidesPresentationCreate, googleSlidesPresentationGet, googleSlidesTextReplace };
265
+ //# sourceMappingURL=chunk-435KWWAB.js.map
266
+ //# sourceMappingURL=chunk-435KWWAB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/faker.ts","../src/service.ts","../src/actions/batch-update.ts","../src/actions/presentation-create.ts","../src/actions/presentation-get.ts","../src/actions/text-replace.ts"],"names":["callConnector","nestFields"],"mappings":";;;AA0BA,SAAS,eAAA,CAAgB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AA,GAAM,MAAM,KAAA,EAAM;AAMxB,MAAA,MAAM,aAAa,OAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,CAAC,KAAK,EAAE,CAAA;AAE9C,MAAA,IAAI,OAAO,IAAA,CAAK,GAAG,CAAA,KAAM,YAAY,IAAA,CAAK,GAAG,CAAA,KAAM,IAAA,OAAW,GAAG,CAAA,GAAI,UAAA,GAAa,KAAK,EAAC;AACxF,MAAA,IAAA,GAAO,KAAK,GAAG,CAAA;AAAA,IACjB;AAEA,IAAA,IAAA,CAAK,KAAA,CAAM,CAAC,CAAW,CAAA,GAAI,KAAA;AAAA,EAC7B;AAEA,EAAA,OAAO,GAAA;AACT;AAGA,SAAS,yCAAyC,KAAA,EAA0B;AAC1E,EAAA,MAAM,QAAQ,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,GAC7B,MAAM,GAAA,CAAI,MAAM,CAAA,GAChB,OAAO,UAAU,QAAA,GACf,KAAA,CAAM,KAAA,CAAM,GAAG,IACf,EAAC;AAEP,EAAA,OAAO,KAAA,CAAM,IAAI,CAAC,IAAA,KAAS,KAAK,IAAA,EAAM,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA;AACxD","file":"chunk-435KWWAB.js","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/fixtures/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/fixtures/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * The Google Slides faker.\n *\n * Shapes, not behaviour: the goal is that a downstream node sees the field\n * NAMES Google Slides actually publishes, so an author can wire {{\n * $json.data.id }} against a fake and have it keep working against the real\n * thing.\n *\n * Deterministic — same inputs, same output. A faker returning a fresh uuid\n * every call cannot be asserted on, so its fixtures degrade to \"it did not\n * throw\", which is the assertion that catches nothing.\n */\n\nimport type { ConnectorFaker, FakeRequest } from \"@particle-academy/fancy-connector-core\";\n\nfunction fakeBatchUpdate({ config, fake }: FakeRequest): unknown {\n return {\n \"presentationId\": (config.presentationId !== undefined && config.presentationId !== null && config.presentationId !== \"\" ? String(config.presentationId) : fake.id(\"1Slide\")),\n \"replies\": [\n {},\n ],\n \"writeControl\": {\n \"requiredRevisionId\": fake.hex(16),\n },\n };\n}\n\nfunction fakePresentationCreate({ config, fake }: FakeRequest): unknown {\n return {\n \"presentationId\": fake.id(\"1Slide\"),\n \"title\": (config.title !== undefined && config.title !== null && config.title !== \"\" ? String(config.title) : \"Untitled presentation\"),\n };\n}\n\nfunction fakePresentationGet({ config, fake }: FakeRequest): unknown {\n return {\n \"presentationId\": (config.presentationId !== undefined && config.presentationId !== null && config.presentationId !== \"\" ? String(config.presentationId) : fake.id(\"1Slide\")),\n \"title\": \"Untitled presentation\",\n \"locale\": \"en\",\n \"slides\": [\n {\n \"objectId\": fake.id(\"slide\"),\n \"pageElements\": [\n {\n \"objectId\": fake.id(\"title\"),\n \"shape\": {\n \"shapeType\": \"TEXT_BOX\",\n \"placeholder\": {\n \"type\": \"CENTERED_TITLE\",\n },\n \"text\": {\n \"textElements\": [],\n },\n },\n },\n {\n \"objectId\": fake.id(\"subtitle\"),\n \"shape\": {\n \"shapeType\": \"TEXT_BOX\",\n \"placeholder\": {\n \"type\": \"SUBTITLE\",\n },\n \"text\": {\n \"textElements\": [],\n },\n },\n },\n ],\n },\n ],\n };\n}\n\nfunction fakeTextReplace({ config, fake }: FakeRequest): unknown {\n return {\n \"presentationId\": (config.presentationId !== undefined && config.presentationId !== null && config.presentationId !== \"\" ? String(config.presentationId) : fake.id(\"1Slide\")),\n \"replies\": [\n {\n \"replaceAllText\": {\n \"occurrencesChanged\": fake.int(1, 9),\n },\n },\n ],\n \"writeControl\": {\n \"requiredRevisionId\": fake.hex(16),\n },\n };\n}\n\nexport const googleSlidesFaker: ConnectorFaker = (operation, request) => {\n switch (operation) {\n case \"batch_update\":\n return fakeBatchUpdate(request);\n\n case \"presentation_create\":\n return fakePresentationCreate(request);\n\n case \"presentation_get\":\n return fakePresentationGet(request);\n\n case \"text_replace\":\n return fakeTextReplace(request);\n\n default:\n // A faker asked for an operation it has no shape for must SAY so. Making\n // something up would produce a green run whose output silently has none\n // of the fields the author is about to reference.\n throw new Error(\n `google_slides: no fake response is defined for \"${operation}\". ` +\n \"Add a fixture under provider/fixtures/ and regenerate — a connector without a faker \" +\n \"cannot be developed against, tested, or demonstrated.\",\n );\n }\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * Google Slides, as one service descriptor shared by every Google Slides\n * operation.\n *\n * @particle-academy/fancy-connector-core carries what is true of ALL\n * connectors. This carries what is true of Google Slides: its base URL, its\n * auth scheme, its idempotency header, and its faker.\n *\n * ## The sandbox trap, written down where it is used\n *\n * Google has no sandbox for Slides. A test presentation is a real one in a\n * real Drive, so every create is real -- use the faker while developing and\n * clean up any live test presentations.\n */\n\nimport type { ConnectorMode, PreparedRequest, ServiceDescriptor } from \"@particle-academy/fancy-connector-core\";\n\nimport { googleSlidesFaker } from \"./faker.js\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported. An imported constant lets an upgrade rewrite the\n * very claim it exists to detect, after which the copy agrees with itself\n * forever.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\nexport const GOOGLE_SLIDES_BASE_URLS = {\n \"live\": \"https://slides.googleapis.com\"\n} as const;\n\n/** Credential keys a remote call cannot proceed without. */\nexport const GOOGLE_SLIDES_REQUIRES = [\n \"accessToken\",\n \"refreshToken\",\n \"clientId\",\n \"clientSecret\"\n] as const;\n\n/**\n * Apply Google Slides's auth scheme to an outgoing request.\n *\n *\n *\n * The mode is passed in because for some providers auth and estate are the\n * same decision expressed in the URL; here it is unused, and saying so is\n * cheaper than wondering later whether it was forgotten.\n */\nexport function googleSlidesAuthorize(\n credentials: Record<string, string | undefined>,\n request: PreparedRequest,\n _mode: ConnectorMode,\n): void {\n request.headers.Authorization = `Bearer ${credentials.accessToken ?? \"\"}`;\n}\n\n/** The Google Slides service, for the TypeScript runtime. */\nexport const GOOGLE_SLIDES: ServiceDescriptor = {\n service: \"google_slides\",\n title: \"Google Slides\",\n sandbox: \"none\",\n baseUrls: { ...GOOGLE_SLIDES_BASE_URLS },\n requires: [...GOOGLE_SLIDES_REQUIRES],\n authorize: googleSlidesAuthorize,\n faker: googleSlidesFaker,\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/batch-update.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/batch-update.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * Apply a list of Google Slides presentation API requests to a presentation,\n * all or none.\n *\n * POST /v1/presentations/{presentationId}:batchUpdate —\n * https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/batchUpdate\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Google Slides or calls the\n * faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { GOOGLE_SLIDES } from \"../service.js\";\n\nexport const BATCH_UPDATE_OPERATION = \"batch_update\";\n\nexport type BatchUpdateOptions = {\n /** The node's resolved config. Keys: presentationId, requests, requiredRevisionId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function googleSlidesBatchUpdate(options: BatchUpdateOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.presentationId === undefined || config.presentationId === null || config.presentationId === \"\") {\n throw new Error(`batch_update: \"presentationId\" is required (Presentation ID).`);\n }\n\n if (config.requests === undefined || config.requests === null || config.requests === \"\") {\n throw new Error(`batch_update: \"requests\" is required (Requests).`);\n }\n if (typeof config.requests === \"string\" && config.requests !== \"\") {\n try {\n JSON.parse(config.requests);\n } catch (error) {\n throw new Error(`batch_update: \"requests\" must be JSON: ${(error as Error).message}`);\n }\n }\n\n return callConnector(GOOGLE_SLIDES, {\n operation: BATCH_UPDATE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"POST\",\n path: `/v1/presentations/${encodeURIComponent(String(config.presentationId))}:batchUpdate`,\n json: nestFields({\n ...(config.requests !== undefined && config.requests !== null && config.requests !== \"\" ? { \"requests\": typeof config.requests === \"string\" ? JSON.parse(config.requests) : config.requests } : {}),\n ...(config.requiredRevisionId !== undefined && config.requiredRevisionId !== null && config.requiredRevisionId !== \"\" ? { \"writeControl.requiredRevisionId\": String(config.requiredRevisionId) } : {}),\n }),\n },\n });\n}\n\n/**\n * `{\"properties.email\": x}` -> `{properties: {email: x}}`.\n *\n * A dotted `as` means NESTING, and only a JSON body can nest. The validator\n * refuses that spelling anywhere else, because in a form body it already means\n * something different — a literal dotted key.\n */\nfunction nestFields(flat: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n\n for (const [path, value] of Object.entries(flat)) {\n const parts = path.split(\".\");\n let node = out;\n\n while (parts.length > 1) {\n const key = parts.shift() as string;\n // A NUMERIC segment is an array index: `dateRanges.0.startDate` has to\n // become `[{startDate}]`, not `{\"0\": {startDate}}`. PHP produced the\n // array by accident (its integer-keyed arrays serialise as JSON lists)\n // and the other two produced an object, which the provider rejects as\n // the wrong type. The parity suite is what caught the disagreement.\n const wantsArray = /^\\d+$/.test(parts[0] ?? \"\");\n\n if (typeof node[key] !== \"object\" || node[key] === null) node[key] = wantsArray ? [] : {};\n node = node[key] as Record<string, unknown>;\n }\n\n node[parts[0] as string] = value;\n }\n\n return out;\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/presentation-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/presentation-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * Create a blank Google Slides presentation.\n *\n * POST /v1/presentations —\n * https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/create\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Google Slides or calls the\n * faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { GOOGLE_SLIDES } from \"../service.js\";\n\nexport const PRESENTATION_CREATE_OPERATION = \"presentation_create\";\n\nexport type PresentationCreateOptions = {\n /** The node's resolved config. Keys: title. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function googleSlidesPresentationCreate(options: PresentationCreateOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.title === undefined || config.title === null || config.title === \"\") {\n throw new Error(`presentation_create: \"title\" is required (Title).`);\n }\n\n return callConnector(GOOGLE_SLIDES, {\n operation: PRESENTATION_CREATE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"POST\",\n path: \"/v1/presentations\",\n json: {\n \"title\": String(config.title),\n },\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/presentation-get.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/presentation-get.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * Read a presentation's slides and the objectId of every element on them --\n * the prerequisite for targeting a specific shape or placeholder with a future\n * edit.\n *\n * GET /v1/presentations/{presentationId} —\n * https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/get\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Google Slides or calls the\n * faker.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { GOOGLE_SLIDES } from \"../service.js\";\n\nexport const PRESENTATION_GET_OPERATION = \"presentation_get\";\n\nexport type PresentationGetOptions = {\n /** The node's resolved config. Keys: presentationId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function googleSlidesPresentationGet(options: PresentationGetOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.presentationId === undefined || config.presentationId === null || config.presentationId === \"\") {\n throw new Error(`presentation_get: \"presentationId\" is required (Presentation ID).`);\n }\n\n return callConnector(GOOGLE_SLIDES, {\n operation: PRESENTATION_GET_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"GET\",\n path: `/v1/presentations/${encodeURIComponent(String(config.presentationId))}`,\n query: {},\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/text-replace.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/text-replace.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * Replace every occurrence of a string in a presentation.\n *\n * POST /v1/presentations/{presentationId}:batchUpdate —\n * https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/batchUpdate\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Google Slides or calls the\n * faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { GOOGLE_SLIDES } from \"../service.js\";\n\nexport const TEXT_REPLACE_OPERATION = \"text_replace\";\n\nexport type TextReplaceOptions = {\n /** The node's resolved config. Keys: presentationId, find, replaceWith, matchCase, pageObjectIds, requiredRevisionId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function googleSlidesTextReplace(options: TextReplaceOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.presentationId === undefined || config.presentationId === null || config.presentationId === \"\") {\n throw new Error(`text_replace: \"presentationId\" is required (Presentation ID).`);\n }\n\n if (config.find === undefined || config.find === null || config.find === \"\") {\n throw new Error(`text_replace: \"find\" is required (Find).`);\n }\n\n if (config.replaceWith === undefined || config.replaceWith === null || config.replaceWith === \"\") {\n throw new Error(`text_replace: \"replaceWith\" is required (Replace with).`);\n }\n\n return callConnector(GOOGLE_SLIDES, {\n operation: TEXT_REPLACE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"POST\",\n path: `/v1/presentations/${encodeURIComponent(String(config.presentationId))}:batchUpdate`,\n json: nestFields({\n \"requests.0.replaceAllText.containsText.text\": String(config.find),\n \"requests.0.replaceAllText.replaceText\": String(config.replaceWith),\n ...(config.matchCase !== undefined && config.matchCase !== null && config.matchCase !== \"\" ? { \"requests.0.replaceAllText.containsText.matchCase\": Boolean(config.matchCase) } : {}),\n ...(config.pageObjectIds !== undefined && config.pageObjectIds !== null && config.pageObjectIds !== \"\" ? { \"requests.0.replaceAllText.pageObjectIds\": requests0ReplacealltextPageobjectidsList(config.pageObjectIds) } : {}),\n ...(config.requiredRevisionId !== undefined && config.requiredRevisionId !== null && config.requiredRevisionId !== \"\" ? { \"writeControl.requiredRevisionId\": String(config.requiredRevisionId) } : {}),\n }),\n },\n });\n}\n\n/**\n * `{\"properties.email\": x}` -> `{properties: {email: x}}`.\n *\n * A dotted `as` means NESTING, and only a JSON body can nest. The validator\n * refuses that spelling anywhere else, because in a form body it already means\n * something different — a literal dotted key.\n */\nfunction nestFields(flat: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n\n for (const [path, value] of Object.entries(flat)) {\n const parts = path.split(\".\");\n let node = out;\n\n while (parts.length > 1) {\n const key = parts.shift() as string;\n // A NUMERIC segment is an array index: `dateRanges.0.startDate` has to\n // become `[{startDate}]`, not `{\"0\": {startDate}}`. PHP produced the\n // array by accident (its integer-keyed arrays serialise as JSON lists)\n // and the other two produced an object, which the provider rejects as\n // the wrong type. The parity suite is what caught the disagreement.\n const wantsArray = /^\\d+$/.test(parts[0] ?? \"\");\n\n if (typeof node[key] !== \"object\" || node[key] === null) node[key] = wantsArray ? [] : {};\n node = node[key] as Record<string, unknown>;\n }\n\n node[parts[0] as string] = value;\n }\n\n return out;\n}\n\n/** One value, a \",\"-separated string, or an array — all end up a list. */\nfunction requests0ReplacealltextPageobjectidsList(value: unknown): string[] {\n const items = Array.isArray(value)\n ? value.map(String)\n : typeof value === \"string\"\n ? value.split(\",\")\n : [];\n\n return items.map((item) => item.trim()).filter(Boolean);\n}\n"]}
package/dist/flow.cjs CHANGED
@@ -6,6 +6,17 @@ var googleSlidesUi = require('@particle-academy/google-slides-ui');
6
6
  // src/flow.ts
7
7
 
8
8
  // src/faker.ts
9
+ function fakeBatchUpdate({ config, fake }) {
10
+ return {
11
+ "presentationId": config.presentationId !== void 0 && config.presentationId !== null && config.presentationId !== "" ? String(config.presentationId) : fake.id("1Slide"),
12
+ "replies": [
13
+ {}
14
+ ],
15
+ "writeControl": {
16
+ "requiredRevisionId": fake.hex(16)
17
+ }
18
+ };
19
+ }
9
20
  function fakePresentationCreate({ config, fake }) {
10
21
  return {
11
22
  "presentationId": fake.id("1Slide"),
@@ -50,12 +61,31 @@ function fakePresentationGet({ config, fake }) {
50
61
  ]
51
62
  };
52
63
  }
64
+ function fakeTextReplace({ config, fake }) {
65
+ return {
66
+ "presentationId": config.presentationId !== void 0 && config.presentationId !== null && config.presentationId !== "" ? String(config.presentationId) : fake.id("1Slide"),
67
+ "replies": [
68
+ {
69
+ "replaceAllText": {
70
+ "occurrencesChanged": fake.int(1, 9)
71
+ }
72
+ }
73
+ ],
74
+ "writeControl": {
75
+ "requiredRevisionId": fake.hex(16)
76
+ }
77
+ };
78
+ }
53
79
  var googleSlidesFaker = (operation, request) => {
54
80
  switch (operation) {
81
+ case "batch_update":
82
+ return fakeBatchUpdate(request);
55
83
  case "presentation_create":
56
84
  return fakePresentationCreate(request);
57
85
  case "presentation_get":
58
86
  return fakePresentationGet(request);
87
+ case "text_replace":
88
+ return fakeTextReplace(request);
59
89
  default:
60
90
  throw new Error(
61
91
  `google_slides: no fake response is defined for "${operation}". Add a fixture under provider/fixtures/ and regenerate \u2014 a connector without a faker cannot be developed against, tested, or demonstrated.`
@@ -85,6 +115,56 @@ var GOOGLE_SLIDES = {
85
115
  authorize: googleSlidesAuthorize,
86
116
  faker: googleSlidesFaker
87
117
  };
118
+ var BATCH_UPDATE_OPERATION = "batch_update";
119
+ async function googleSlidesBatchUpdate(options) {
120
+ const config = options.config ?? {};
121
+ if (config.presentationId === void 0 || config.presentationId === null || config.presentationId === "") {
122
+ throw new Error(`batch_update: "presentationId" is required (Presentation ID).`);
123
+ }
124
+ if (config.requests === void 0 || config.requests === null || config.requests === "") {
125
+ throw new Error(`batch_update: "requests" is required (Requests).`);
126
+ }
127
+ if (typeof config.requests === "string" && config.requests !== "") {
128
+ try {
129
+ JSON.parse(config.requests);
130
+ } catch (error) {
131
+ throw new Error(`batch_update: "requests" must be JSON: ${error.message}`);
132
+ }
133
+ }
134
+ return fancyConnectorCore.callConnector(GOOGLE_SLIDES, {
135
+ operation: BATCH_UPDATE_OPERATION,
136
+ config,
137
+ input: options.input,
138
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
139
+ ...options.mode === void 0 ? {} : { mode: options.mode },
140
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
141
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
142
+ ...options.transport === void 0 ? {} : { transport: options.transport },
143
+ request: {
144
+ method: "POST",
145
+ path: `/v1/presentations/${encodeURIComponent(String(config.presentationId))}:batchUpdate`,
146
+ json: nestFields({
147
+ ...config.requests !== void 0 && config.requests !== null && config.requests !== "" ? { "requests": typeof config.requests === "string" ? JSON.parse(config.requests) : config.requests } : {},
148
+ ...config.requiredRevisionId !== void 0 && config.requiredRevisionId !== null && config.requiredRevisionId !== "" ? { "writeControl.requiredRevisionId": String(config.requiredRevisionId) } : {}
149
+ })
150
+ }
151
+ });
152
+ }
153
+ function nestFields(flat) {
154
+ const out = {};
155
+ for (const [path, value] of Object.entries(flat)) {
156
+ const parts = path.split(".");
157
+ let node = out;
158
+ while (parts.length > 1) {
159
+ const key = parts.shift();
160
+ const wantsArray = /^\d+$/.test(parts[0] ?? "");
161
+ if (typeof node[key] !== "object" || node[key] === null) node[key] = wantsArray ? [] : {};
162
+ node = node[key];
163
+ }
164
+ node[parts[0]] = value;
165
+ }
166
+ return out;
167
+ }
88
168
  var PRESENTATION_CREATE_OPERATION = "presentation_create";
89
169
  async function googleSlidesPresentationCreate(options) {
90
170
  const config = options.config ?? {};
@@ -131,8 +211,75 @@ async function googleSlidesPresentationGet(options) {
131
211
  }
132
212
  });
133
213
  }
214
+ var TEXT_REPLACE_OPERATION = "text_replace";
215
+ async function googleSlidesTextReplace(options) {
216
+ const config = options.config ?? {};
217
+ if (config.presentationId === void 0 || config.presentationId === null || config.presentationId === "") {
218
+ throw new Error(`text_replace: "presentationId" is required (Presentation ID).`);
219
+ }
220
+ if (config.find === void 0 || config.find === null || config.find === "") {
221
+ throw new Error(`text_replace: "find" is required (Find).`);
222
+ }
223
+ if (config.replaceWith === void 0 || config.replaceWith === null || config.replaceWith === "") {
224
+ throw new Error(`text_replace: "replaceWith" is required (Replace with).`);
225
+ }
226
+ return fancyConnectorCore.callConnector(GOOGLE_SLIDES, {
227
+ operation: TEXT_REPLACE_OPERATION,
228
+ config,
229
+ input: options.input,
230
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
231
+ ...options.mode === void 0 ? {} : { mode: options.mode },
232
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
233
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
234
+ ...options.transport === void 0 ? {} : { transport: options.transport },
235
+ request: {
236
+ method: "POST",
237
+ path: `/v1/presentations/${encodeURIComponent(String(config.presentationId))}:batchUpdate`,
238
+ json: nestFields2({
239
+ "requests.0.replaceAllText.containsText.text": String(config.find),
240
+ "requests.0.replaceAllText.replaceText": String(config.replaceWith),
241
+ ...config.matchCase !== void 0 && config.matchCase !== null && config.matchCase !== "" ? { "requests.0.replaceAllText.containsText.matchCase": Boolean(config.matchCase) } : {},
242
+ ...config.pageObjectIds !== void 0 && config.pageObjectIds !== null && config.pageObjectIds !== "" ? { "requests.0.replaceAllText.pageObjectIds": requests0ReplacealltextPageobjectidsList(config.pageObjectIds) } : {},
243
+ ...config.requiredRevisionId !== void 0 && config.requiredRevisionId !== null && config.requiredRevisionId !== "" ? { "writeControl.requiredRevisionId": String(config.requiredRevisionId) } : {}
244
+ })
245
+ }
246
+ });
247
+ }
248
+ function nestFields2(flat) {
249
+ const out = {};
250
+ for (const [path, value] of Object.entries(flat)) {
251
+ const parts = path.split(".");
252
+ let node = out;
253
+ while (parts.length > 1) {
254
+ const key = parts.shift();
255
+ const wantsArray = /^\d+$/.test(parts[0] ?? "");
256
+ if (typeof node[key] !== "object" || node[key] === null) node[key] = wantsArray ? [] : {};
257
+ node = node[key];
258
+ }
259
+ node[parts[0]] = value;
260
+ }
261
+ return out;
262
+ }
263
+ function requests0ReplacealltextPageobjectidsList(value) {
264
+ const items = Array.isArray(value) ? value.map(String) : typeof value === "string" ? value.split(",") : [];
265
+ return items.map((item) => item.trim()).filter(Boolean);
266
+ }
134
267
 
135
268
  // src/flow.ts
269
+ var googleSlidesBatchUpdateExecutor = async (ctx) => {
270
+ const config = ctx.node.data?.config ?? {};
271
+ const result = await googleSlidesBatchUpdate({
272
+ config,
273
+ input: ctx.inputs?.in
274
+ });
275
+ ctx.emit({
276
+ type: "log",
277
+ level: "info",
278
+ nodeId: ctx.node.id,
279
+ message: `google_slides batch_update ${result.data?.id} (${result.mode})`
280
+ });
281
+ return { __port: "out", value: result };
282
+ };
136
283
  var googleSlidesPresentationExecutor = async (ctx) => {
137
284
  const config = ctx.node.data?.config ?? {};
138
285
  const result = await googleSlidesPresentationCreate({
@@ -161,13 +308,31 @@ var googleSlidesPresentationGetExecutor = async (ctx) => {
161
308
  });
162
309
  return { __port: "out", value: result };
163
310
  };
311
+ var googleSlidesTextReplaceExecutor = async (ctx) => {
312
+ const config = ctx.node.data?.config ?? {};
313
+ const result = await googleSlidesTextReplace({
314
+ config,
315
+ input: ctx.inputs?.in
316
+ });
317
+ ctx.emit({
318
+ type: "log",
319
+ level: "info",
320
+ nodeId: ctx.node.id,
321
+ message: `google_slides text_replace ${result.data?.id} (${result.mode})`
322
+ });
323
+ return { __port: "out", value: result };
324
+ };
164
325
  var GOOGLE_SLIDES_RUNNABLE_KINDS = [
326
+ { ...googleSlidesUi.googleSlidesBatchUpdateKind, executor: googleSlidesBatchUpdateExecutor },
165
327
  { ...googleSlidesUi.googleSlidesPresentationKind, executor: googleSlidesPresentationExecutor },
166
- { ...googleSlidesUi.googleSlidesPresentationGetKind, executor: googleSlidesPresentationGetExecutor }
328
+ { ...googleSlidesUi.googleSlidesPresentationGetKind, executor: googleSlidesPresentationGetExecutor },
329
+ { ...googleSlidesUi.googleSlidesTextReplaceKind, executor: googleSlidesTextReplaceExecutor }
167
330
  ];
168
331
 
169
332
  exports.GOOGLE_SLIDES_RUNNABLE_KINDS = GOOGLE_SLIDES_RUNNABLE_KINDS;
333
+ exports.googleSlidesBatchUpdateExecutor = googleSlidesBatchUpdateExecutor;
170
334
  exports.googleSlidesPresentationExecutor = googleSlidesPresentationExecutor;
171
335
  exports.googleSlidesPresentationGetExecutor = googleSlidesPresentationGetExecutor;
336
+ exports.googleSlidesTextReplaceExecutor = googleSlidesTextReplaceExecutor;
172
337
  //# sourceMappingURL=flow.cjs.map
173
338
  //# sourceMappingURL=flow.cjs.map