@zackbart/connecta 0.34.1 → 0.35.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 +363 -0
- package/README.md +62 -106
- package/SECURITY.md +3 -2
- package/bin/connecta.mjs +41 -16
- package/bin/version.mjs +1 -1
- package/dist/access-tokens.d.ts +2 -1
- package/dist/access-tokens.js +66 -30
- package/dist/activity.d.ts +1 -1
- package/dist/activity.js +2 -0
- package/dist/agent-config.d.ts +23 -0
- package/dist/agent-config.js +59 -0
- package/dist/agent-description.js +16 -0
- package/dist/agent-identity.js +4 -4
- package/dist/agent-observation.js +39 -0
- package/dist/auth/clerk-sdk/client.d.ts +2 -0
- package/dist/auth/clerk-sdk/generated.js +554 -563
- package/dist/auth/clerk-transport.js +70 -3
- package/dist/auth/clerk.d.ts +13 -0
- package/dist/auth/clerk.js +653 -246
- package/dist/auth/cloudflare-access.js +46 -42
- package/dist/auth/downstream-client-metadata.js +2 -2
- package/dist/auth/downstream-oauth.js +2051 -1160
- package/dist/auth/downstream-revocation.js +88 -88
- package/dist/auth/native-call.js +20 -0
- package/dist/auth/native.js +184 -0
- package/dist/auth/oauth-start-reset.js +11 -5
- package/dist/auth/oauth-token-response.js +121 -102
- package/dist/auth/oauth-v2-migration.js +97 -78
- package/dist/auth/renewable-grant.js +10 -0
- package/dist/auth/static-oauth.js +663 -271
- package/dist/auth/vercel-agent.js +266 -0
- package/dist/auth-admission.js +204 -0
- package/dist/auth-elicitation.js +350 -241
- package/dist/authorization-handoff.js +164 -90
- package/dist/call-admission-context.js +3 -10
- package/dist/call-admission.js +2 -0
- package/dist/call-classification.js +9 -0
- package/dist/call-recovery.js +32 -13
- package/dist/canonical-json.js +8 -0
- package/dist/catalog-cache.js +369 -213
- package/dist/catalog-service.js +659 -530
- package/dist/catalog.js +5 -1
- package/dist/concurrency.js +0 -25
- package/dist/config-defaults.d.ts +1 -0
- package/dist/config-defaults.js +1 -0
- package/dist/config-schema.d.ts +3 -1
- package/dist/config-schema.js +13 -3
- package/dist/config.d.ts +40 -6
- package/dist/config.js +40 -26
- package/dist/connector-caller.d.ts +4 -0
- package/dist/connector-caller.js +17 -4
- package/dist/connectors/api-connector.d.ts +12 -7
- package/dist/connectors/api-connector.js +142 -56
- package/dist/connectors/guarded-fetch.d.ts +51 -17
- package/dist/connectors/guarded-fetch.js +215 -121
- package/dist/connectors/negotiation-cache.js +20 -10
- package/dist/connectors/remote-mcp.d.ts +10 -30
- package/dist/connectors/remote-mcp.js +955 -563
- package/dist/d1.js +10 -243
- package/dist/derived-context.js +5 -0
- package/dist/describe-config.d.ts +3 -1
- package/dist/describe-config.js +2 -0
- package/dist/downstream-input.js +347 -260
- package/dist/errors.d.ts +87 -6
- package/dist/errors.js +114 -4
- package/dist/execute.js +87 -50
- package/dist/executor-admission.js +3 -0
- package/dist/executors/quickjs.js +163 -112
- package/dist/guarded-transport.js +50 -0
- package/dist/guest-runtime.js +1 -1
- package/dist/http/client.js +439 -0
- package/dist/http/errors.js +558 -0
- package/dist/http/fields.js +49 -0
- package/dist/http/hatch-paging.js +318 -0
- package/dist/http/hatch.js +1279 -0
- package/dist/http/json-schema.js +267 -0
- package/dist/http/node-transport.js +241 -0
- package/dist/http/oauth.js +162 -0
- package/dist/http/paging.js +228 -0
- package/dist/http/provider.js +221 -0
- package/dist/http/safety.js +82 -0
- package/dist/http/services.js +79 -0
- package/dist/http/tools.js +383 -0
- package/dist/http/vendor-index.js +138 -0
- package/dist/http/vendor.js +448 -0
- package/dist/http/write-request.js +66 -0
- package/dist/http-policy.d.ts +11 -0
- package/dist/http-policy.js +45 -0
- package/dist/inbound-credential.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -0
- package/dist/invocation-auth.js +30 -19
- package/dist/invocation.js +218 -85
- package/dist/mcp-result.js +0 -4
- package/dist/membership.d.ts +4 -0
- package/dist/meta-output.js +1 -1
- package/dist/meta-tools.js +531 -406
- package/dist/native-recovery.js +52 -0
- package/dist/native-tools.js +382 -0
- package/dist/node.d.ts +4 -3
- package/dist/node.js +45 -8
- package/dist/oauth-handoff.js +177 -104
- package/dist/oauth-partition.js +6 -20
- package/dist/oauth-sealing.js +6 -7
- package/dist/operation-vocabulary.js +101 -0
- package/dist/operator-record.d.ts +2 -2
- package/dist/operator-record.js +17 -4
- package/dist/operator-ui/agents.d.ts +5 -4
- package/dist/operator-ui/agents.js +17 -7
- package/dist/operator-ui/config-summary.js +5 -4
- package/dist/operator-ui/connection-map.js +7 -5
- package/dist/operator-ui/contract.d.ts +7 -3
- package/dist/operator-ui/endpoints.js +4 -13
- package/dist/operator-ui/fix-prompts.d.ts +1 -1
- package/dist/operator-ui/fix-prompts.js +0 -8
- package/dist/operator-ui/generated.js +3 -3
- package/dist/operator-ui/model.d.ts +2 -3
- package/dist/operator-ui/overview.js +5 -2
- package/dist/operator-ui/setup-commands.js +0 -4
- package/dist/operator-ui/view.d.ts +2 -25
- package/dist/operator-ui/view.js +2 -76
- package/dist/program-writes.js +47 -26
- package/dist/provider-call-facts.d.ts +115 -0
- package/dist/provider-call-facts.js +182 -0
- package/dist/provider-call.d.ts +112 -0
- package/dist/provider-call.js +271 -0
- package/dist/provider.d.ts +65 -31
- package/dist/provider.js +116 -39
- package/dist/providers/_shared/google/hatch.js +91 -0
- package/dist/providers/_shared/google/kit.js +537 -0
- package/dist/providers/_shared/google/result-size.js +15 -2
- package/dist/providers/_shared/google/service-account.d.ts +2 -1
- package/dist/providers/_shared/google/service-account.js +8 -4
- package/dist/providers/_shared/google/workspace.d.ts +6 -210
- package/dist/providers/_shared/google/workspace.js +6 -425
- package/dist/providers/_shared/rest/compact-index.js +86 -0
- package/dist/providers/_shared/rest/dispatch.js +3 -23
- package/dist/providers/_shared/rest/kit.js +546 -0
- package/dist/providers/_shared/rest/operation-index.js +230 -14
- package/dist/providers/_shared/rest/response-media.js +11 -0
- package/dist/providers/_shared/rest/tools.js +101 -78
- package/dist/providers/_shared/rest/value-safety.js +353 -195
- package/dist/providers/_shared/sensitive-fields.js +27 -0
- package/dist/providers/breeze/api.js +584 -0
- package/dist/providers/breeze/index.d.ts +1 -3
- package/dist/providers/breeze/index.js +67 -1420
- package/dist/providers/breeze/openapi.generated.js +60 -0
- package/dist/providers/breeze/skill.generated.js +2 -6
- package/dist/providers/breeze/tools.js +696 -0
- package/dist/providers/ccb/api.js +496 -0
- package/dist/providers/ccb/index.d.ts +15 -37
- package/dist/providers/ccb/index.js +77 -1702
- package/dist/providers/ccb/lib/constants.d.ts +34 -0
- package/dist/providers/ccb/lib/constants.js +74 -0
- package/dist/providers/ccb/lib/guide.js +9 -0
- package/dist/providers/ccb/lib/verdicts.js +387 -0
- package/dist/providers/ccb/openapi.generated.js +397 -0
- package/dist/providers/ccb/safety.js +295 -0
- package/dist/providers/ccb/skill.generated.js +2 -6
- package/dist/providers/ccb/tools.js +853 -0
- package/dist/providers/cloudflare/api.js +1066 -0
- package/dist/providers/cloudflare/index.d.ts +5 -22
- package/dist/providers/cloudflare/index.js +79 -197
- package/dist/providers/cloudflare/lib/config.d.ts +16 -0
- package/dist/providers/cloudflare/lib/config.js +2 -0
- package/dist/providers/cloudflare/lib/discovery.js +29 -0
- package/dist/providers/cloudflare/{graphql.js → lib/graphql.js} +1 -1
- package/dist/providers/cloudflare/lib/hatch.js +103 -0
- package/dist/providers/cloudflare/lib/path-bounds.js +28 -0
- package/dist/providers/cloudflare/lib/response-media.js +75 -0
- package/dist/providers/cloudflare/openapi.generated.js +4 -3
- package/dist/providers/cloudflare/{value-safety.js → safety.js} +487 -0
- package/dist/providers/cloudflare/skill.generated.js +2 -10
- package/dist/providers/cloudflare/tools.js +360 -0
- package/dist/providers/docs/api.js +51 -0
- package/dist/providers/docs/index.d.ts +1 -12
- package/dist/providers/docs/index.js +53 -1165
- package/dist/providers/docs/lib/constants.d.ts +18 -0
- package/dist/providers/docs/lib/constants.js +18 -0
- package/dist/providers/docs/lib/discovery.js +26 -0
- package/dist/providers/docs/lib/requests.js +48 -0
- package/dist/providers/docs/lib/schemas.js +168 -0
- package/dist/providers/docs/openapi.generated.js +16 -0
- package/dist/providers/docs/safety.js +54 -0
- package/dist/providers/docs/skill.generated.js +2 -6
- package/dist/providers/docs/tools.js +802 -0
- package/dist/providers/drive/api.js +177 -0
- package/dist/providers/drive/index.d.ts +1 -12
- package/dist/providers/drive/index.js +38 -1448
- package/dist/providers/drive/lib/constants.d.ts +6 -0
- package/dist/providers/drive/lib/constants.js +6 -0
- package/dist/providers/drive/lib/contracts.js +532 -0
- package/dist/providers/drive/lib/hatch.js +197 -0
- package/dist/providers/drive/openapi.generated.js +77 -0
- package/dist/providers/drive/safety.js +90 -0
- package/dist/providers/drive/skill.generated.js +2 -6
- package/dist/providers/drive/tools.js +1290 -0
- package/dist/providers/forms/api.js +71 -0
- package/dist/providers/forms/index.d.ts +1 -12
- package/dist/providers/forms/index.js +49 -1145
- package/dist/providers/forms/lib/constants.d.ts +14 -0
- package/dist/providers/forms/lib/constants.js +19 -0
- package/dist/providers/forms/lib/hatch.js +72 -0
- package/dist/providers/forms/openapi.generated.js +23 -0
- package/dist/providers/forms/safety.js +34 -0
- package/dist/providers/forms/skill.generated.js +2 -8
- package/dist/providers/forms/tools.js +1024 -0
- package/dist/providers/github/api.js +150 -0
- package/dist/providers/github/index.d.ts +4 -5
- package/dist/providers/github/index.js +30 -87
- package/dist/providers/github/{auth.d.ts → lib/auth.d.ts} +5 -3
- package/dist/providers/github/{auth.js → lib/auth.js} +40 -43
- package/dist/providers/github/lib/discovery.js +132 -0
- package/dist/providers/github/lib/operations.js +58 -0
- package/dist/providers/github/{scope.d.ts → lib/scope.d.ts} +2 -0
- package/dist/providers/github/{scope.js → lib/scope.js} +25 -1
- package/dist/providers/github/openapi.generated.js +1216 -0
- package/dist/providers/github/safety.js +216 -0
- package/dist/providers/github/skill.generated.js +2 -5
- package/dist/providers/github/tools.js +506 -0
- package/dist/providers/gmail/api.js +114 -0
- package/dist/providers/gmail/index.d.ts +1 -12
- package/dist/providers/gmail/index.js +73 -1621
- package/dist/providers/gmail/lib/constants.d.ts +13 -0
- package/dist/providers/gmail/lib/constants.js +16 -0
- package/dist/providers/gmail/lib/index.js +173 -0
- package/dist/providers/gmail/lib/schemas.js +176 -0
- package/dist/providers/gmail/lib/threading.js +120 -0
- package/dist/providers/gmail/openapi.generated.js +92 -0
- package/dist/providers/gmail/safety.js +21 -0
- package/dist/providers/gmail/skill.generated.js +2 -6
- package/dist/providers/gmail/tools.js +1435 -0
- package/dist/providers/overflow/api.js +1008 -0
- package/dist/providers/overflow/index.d.ts +1 -17
- package/dist/providers/overflow/index.js +60 -1488
- package/dist/providers/overflow/skill.generated.js +2 -5
- package/dist/providers/overflow/tools.js +873 -0
- package/dist/providers/planning-center/api.js +467 -0
- package/dist/providers/planning-center/index.d.ts +4 -35
- package/dist/providers/planning-center/index.js +69 -2445
- package/dist/providers/planning-center/lib/constants.d.ts +58 -0
- package/dist/providers/planning-center/lib/constants.js +83 -0
- package/dist/providers/planning-center/lib/discovery.js +40 -0
- package/dist/providers/planning-center/lib/guide.js +39 -0
- package/dist/providers/planning-center/lib/json-api.js +83 -0
- package/dist/providers/planning-center/lib/verdicts.js +1758 -0
- package/dist/providers/planning-center/openapi.generated.js +1764 -0
- package/dist/providers/planning-center/safety.js +188 -0
- package/dist/providers/planning-center/skill.generated.js +2 -27
- package/dist/providers/planning-center/tools.js +1010 -0
- package/dist/providers/sheets/api.js +133 -0
- package/dist/providers/sheets/index.d.ts +4 -16
- package/dist/providers/sheets/index.js +61 -1172
- package/dist/providers/sheets/lib/constants.d.ts +14 -0
- package/dist/providers/sheets/lib/constants.js +14 -0
- package/dist/providers/sheets/lib/hatch.js +163 -0
- package/dist/providers/sheets/lib/requests.js +105 -0
- package/dist/providers/sheets/lib/schemas.js +138 -0
- package/dist/providers/sheets/openapi.generated.js +30 -0
- package/dist/providers/sheets/safety.js +27 -0
- package/dist/providers/sheets/skill.generated.js +2 -7
- package/dist/providers/sheets/tools.js +734 -0
- package/dist/providers/slides/api.js +147 -0
- package/dist/providers/slides/index.d.ts +2 -10
- package/dist/providers/slides/index.js +48 -2555
- package/dist/providers/slides/lib/constants.d.ts +11 -0
- package/dist/providers/slides/lib/constants.js +11 -0
- package/dist/providers/slides/lib/requests.js +60 -0
- package/dist/providers/slides/lib/schemas.js +565 -0
- package/dist/providers/slides/openapi.generated.js +18 -0
- package/dist/providers/slides/skill.generated.js +2 -6
- package/dist/providers/slides/tools.js +1968 -0
- package/dist/providers/stripe/api.js +401 -0
- package/dist/providers/stripe/index.d.ts +5 -27
- package/dist/providers/stripe/index.js +74 -210
- package/dist/providers/stripe/lib/config.d.ts +4 -0
- package/dist/providers/stripe/lib/config.js +2 -0
- package/dist/providers/stripe/openapi.generated.js +4 -3
- package/dist/providers/stripe/{value-safety.js → safety.js} +5 -5
- package/dist/providers/stripe/skill.generated.js +2 -11
- package/dist/providers/stripe/tools.js +77 -0
- package/dist/providers/tithely/api.js +531 -0
- package/dist/providers/tithely/index.d.ts +17 -0
- package/dist/providers/tithely/index.js +86 -965
- package/dist/providers/tithely/skill.generated.js +2 -5
- package/dist/providers/tithely/tools.js +426 -0
- package/dist/providers/vercel/api.js +551 -0
- package/dist/providers/vercel/index.d.ts +9 -25
- package/dist/providers/vercel/index.js +66 -260
- package/dist/providers/vercel/lib/config.d.ts +2 -0
- package/dist/providers/vercel/lib/config.js +2 -0
- package/dist/providers/vercel/lib/index.js +117 -0
- package/dist/providers/vercel/lib/logs.js +100 -0
- package/dist/providers/vercel/lib/pin.js +270 -0
- package/dist/providers/vercel/openapi.generated.js +10 -5
- package/dist/providers/vercel/{value-safety.js → safety.js} +247 -38
- package/dist/providers/vercel/skill.generated.js +2 -7
- package/dist/providers/vercel/tools.js +642 -0
- package/dist/redaction-identity.js +47 -0
- package/dist/redaction-marker.js +125 -0
- package/dist/registry.d.ts +21 -15
- package/dist/registry.js +409 -376
- package/dist/routes/access-tokens.js +1 -1
- package/dist/routes/actor-labels.js +1 -1
- package/dist/routes/connect.js +1 -1
- package/dist/routes/dispatch.js +103 -0
- package/dist/routes/mcp.js +170 -79
- package/dist/routes/oauth.js +3 -1
- package/dist/routes/operator.js +2 -2
- package/dist/routes/shared.d.ts +5 -4
- package/dist/routes/shared.js +244 -177
- package/dist/routes/skills.js +10 -8
- package/dist/routes/ui-config.js +27 -3
- package/dist/routes/ui-data.js +21 -20
- package/dist/routes/ui.js +1 -1
- package/dist/runtime/call-admission.js +0 -26
- package/dist/runtime/call-entry.js +30 -0
- package/dist/runtime/call.js +556 -0
- package/dist/runtime/connector-scope.js +7 -0
- package/dist/runtime/credential-probe.js +34 -0
- package/dist/runtime/executor.js +40 -0
- package/dist/runtime/native-storage.js +63 -0
- package/dist/runtime/registry.js +27 -0
- package/dist/runtime/request-scope.js +72 -0
- package/dist/runtime/run.js +15 -7
- package/dist/runtime/shared-read.js +34 -5
- package/dist/runtime/storage.js +34 -21
- package/dist/sent-secrets.d.ts +194 -37
- package/dist/sent-secrets.js +1743 -340
- package/dist/server.js +5 -56
- package/dist/skills.js +322 -222
- package/dist/sqlite.js +15 -14
- package/dist/storage/d1-copy.js +255 -0
- package/dist/storage/d1-driver.js +15 -0
- package/dist/storage/keys.js +28 -0
- package/dist/storage/sql-driver.js +88 -0
- package/dist/storage/sql-native.js +544 -0
- package/dist/storage/sql-schema.d.ts +6 -0
- package/dist/storage/sql-schema.js +15 -0
- package/dist/storage/sql.d.ts +14 -20
- package/dist/storage/sql.js +29 -535
- package/dist/timeout.js +0 -26
- package/dist/tool-safety.js +20 -10
- package/dist/types.d.ts +7 -109
- package/dist/upward.js +3 -0
- package/dist/usage-guide.js +3 -1
- package/dist/validate.d.ts +4 -2
- package/dist/validate.js +86 -9
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker.js +312 -292
- package/dist/workspace-subject.js +5 -1
- package/dist/write-outcome.js +454 -34
- package/documentation/README.md +27 -7
- package/documentation/architecture.md +2547 -226
- package/documentation/auth.md +821 -98
- package/documentation/code-mode.md +49 -16
- package/documentation/deploying.md +164 -20
- package/documentation/hosted-mcp-migration.md +460 -0
- package/documentation/integrating.md +129 -144
- package/documentation/meta-tools.md +409 -32
- package/documentation/operating.md +27 -3
- package/documentation/operator-tests.md +3 -0
- package/documentation/operator-ui.md +68 -45
- package/documentation/provider-auth-migration.md +16 -63
- package/documentation/provider-migration-0.29.md +10 -5
- package/documentation/provider-migration-0.35.md +975 -0
- package/documentation/providers.md +965 -0
- package/examples/worker/AGENTS.md +23 -9
- package/examples/worker/README.md +254 -135
- package/examples/worker/alchemy.run.ts +116 -0
- package/examples/worker/gitignore +10 -0
- package/examples/worker/src/connecta.config.ts +23 -21
- package/examples/worker/wrangler.jsonc +14 -5
- package/guides/connecting-agents.md +157 -0
- package/guides/how-it-works.md +156 -0
- package/guides/safety-and-trust.md +153 -0
- package/package.json +27 -46
- package/templates/node/.env.example +3 -0
- package/templates/node/README.md +22 -2
- package/templates/node/docker-compose.yml +1 -0
- package/templates/node/package.json +3 -2
- package/templates/node/src/connecta.config.ts +8 -0
- package/dist/catalog-drift.d.ts +0 -138
- package/dist/catalog-drift.js +0 -578
- package/dist/providers/_shared/request-token.js +0 -83
- package/dist/providers/_shared/rest/operation-index.d.ts +0 -133
- package/dist/providers/_shared/rest/tools.d.ts +0 -141
- package/dist/providers/_shared/rest/value-safety.d.ts +0 -201
- package/dist/providers/basecamp/index.d.ts +0 -45
- package/dist/providers/basecamp/index.js +0 -997
- package/dist/providers/basecamp/skill.generated.js +0 -9
- package/dist/providers/cloudflare/rest.d.ts +0 -37
- package/dist/providers/cloudflare/rest.js +0 -1097
- package/dist/providers/github/hosted.js +0 -218
- package/dist/providers/github/rest.js +0 -321
- package/dist/providers/infisical/index.d.ts +0 -7
- package/dist/providers/infisical/index.js +0 -713
- package/dist/providers/infisical/skill.generated.js +0 -8
- package/dist/providers/intercom/index.d.ts +0 -24
- package/dist/providers/intercom/index.js +0 -121
- package/dist/providers/intercom/skill.generated.js +0 -8
- package/dist/providers/linear/index.d.ts +0 -55
- package/dist/providers/linear/index.js +0 -537
- package/dist/providers/linear/skill.generated.js +0 -8
- package/dist/providers/mixpanel/index.d.ts +0 -59
- package/dist/providers/mixpanel/index.js +0 -472
- package/dist/providers/mixpanel/operations.js +0 -20
- package/dist/providers/mixpanel/rest.js +0 -603
- package/dist/providers/mixpanel/skill.generated.js +0 -10
- package/dist/providers/mixpanel/value-safety.js +0 -16
- package/dist/providers/notion/index.d.ts +0 -67
- package/dist/providers/notion/index.js +0 -368
- package/dist/providers/notion/openapi.generated.js +0 -75
- package/dist/providers/notion/rest.d.ts +0 -24
- package/dist/providers/notion/rest.js +0 -1226
- package/dist/providers/notion/skill.generated.js +0 -11
- package/dist/providers/notion/value-safety.js +0 -56
- package/dist/providers/revenuecat/index.d.ts +0 -51
- package/dist/providers/revenuecat/index.js +0 -697
- package/dist/providers/revenuecat/skill.generated.js +0 -11
- package/dist/providers/stripe/rest.d.ts +0 -14
- package/dist/providers/stripe/rest.js +0 -402
- package/dist/providers/vercel/rest.d.ts +0 -20
- package/dist/providers/vercel/rest.js +0 -1020
- package/dist/providers/wispr-flow/index.d.ts +0 -14
- package/dist/providers/wispr-flow/index.js +0 -117
- package/dist/providers/wispr-flow/skill.generated.js +0 -8
- /package/dist/providers/github/{key.js → lib/key.js} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Docs API root. Unlike Gmail there is no per-user path segment: the
|
|
3
|
+
* delegated token's subject decides which documents a request can reach.
|
|
4
|
+
*/
|
|
5
|
+
export declare const DOCS_API_BASE_URL = "https://docs.googleapis.com/v1";
|
|
6
|
+
/**
|
|
7
|
+
* Exactly the scope this connection requests, and exactly what the Admin
|
|
8
|
+
* console's domain-wide delegation entry must list for it. `documents` reads
|
|
9
|
+
* and edits Docs the user can reach; it lists nothing and touches no other
|
|
10
|
+
* Drive file type.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DOCS_SCOPES: readonly ["https://www.googleapis.com/auth/documents"];
|
|
13
|
+
/**
|
|
14
|
+
* A document with every tab, as JSON. Styles ride on every text run, so the
|
|
15
|
+
* JSON is many times the text; this admits documents near Google's own size
|
|
16
|
+
* limit without letting one exhaust a Worker.
|
|
17
|
+
*/
|
|
18
|
+
export declare const DOCS_MAX_RESPONSE_BYTES: number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Docs API root. Unlike Gmail there is no per-user path segment: the
|
|
3
|
+
* delegated token's subject decides which documents a request can reach.
|
|
4
|
+
*/
|
|
5
|
+
export const DOCS_API_BASE_URL = "https://docs.googleapis.com/v1";
|
|
6
|
+
/**
|
|
7
|
+
* Exactly the scope this connection requests, and exactly what the Admin
|
|
8
|
+
* console's domain-wide delegation entry must list for it. `documents` reads
|
|
9
|
+
* and edits Docs the user can reach; it lists nothing and touches no other
|
|
10
|
+
* Drive file type.
|
|
11
|
+
*/
|
|
12
|
+
export const DOCS_SCOPES = ["https://www.googleapis.com/auth/documents"];
|
|
13
|
+
/**
|
|
14
|
+
* A document with every tab, as JSON. Styles ride on every text run, so the
|
|
15
|
+
* JSON is many times the text; this admits documents near Google's own size
|
|
16
|
+
* limit without letting one exhaust a Worker.
|
|
17
|
+
*/
|
|
18
|
+
export const DOCS_MAX_RESPONSE_BYTES = 24 * 1024 * 1024;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OperationIndex } from "../../_shared/rest/operation-index.js";
|
|
2
|
+
import { openapi } from "../openapi.generated.js";
|
|
3
|
+
import { googleBatchGuard, googleHatchBinding } from "../../_shared/google/hatch.js";
|
|
4
|
+
import { REQUEST_KINDS } from "./requests.js";
|
|
5
|
+
export const DOCS_INDEX = new OperationIndex(openapi, {
|
|
6
|
+
vendor: "docs",
|
|
7
|
+
title: "Google Docs",
|
|
8
|
+
pathMatching: "uri-template",
|
|
9
|
+
});
|
|
10
|
+
/** Literal execution allowlist. Schema inventory alone never admits an operation. */
|
|
11
|
+
export const DOCS_VERDICTS = {
|
|
12
|
+
"GET /documents/{documentId}": "read",
|
|
13
|
+
"POST /documents": "write",
|
|
14
|
+
"POST /documents/{documentId}:batchUpdate": "destructive",
|
|
15
|
+
};
|
|
16
|
+
export function docsBinding(connection) {
|
|
17
|
+
return googleHatchBinding(connection, {
|
|
18
|
+
index: DOCS_INDEX,
|
|
19
|
+
review: "All three frozen Docs methods; batch writes require a current revision and 1–100 reviewed GA request kinds. Preview comments and suggestions are refused.",
|
|
20
|
+
refuse: (call) => call.op.path.endsWith(":batchUpdate")
|
|
21
|
+
? googleBatchGuard(call.body, { kinds: REQUEST_KINDS, revision: true, max: 100 })
|
|
22
|
+
: undefined,
|
|
23
|
+
revisionGuarded: (call) => call.op.path.endsWith(":batchUpdate") &&
|
|
24
|
+
!googleBatchGuard(call.body, { kinds: REQUEST_KINDS, revision: true, max: 100 }),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Reviewed generally available Docs Request kinds; preview comments and suggestions remain refused.
|
|
2
|
+
export const REQUEST_KINDS = [
|
|
3
|
+
"addDocumentTab",
|
|
4
|
+
"createDropdownDefinition",
|
|
5
|
+
"createFooter",
|
|
6
|
+
"createFootnote",
|
|
7
|
+
"createHeader",
|
|
8
|
+
"createNamedRange",
|
|
9
|
+
"createParagraphBullets",
|
|
10
|
+
"deleteContentRange",
|
|
11
|
+
"deleteDropdownDefinition",
|
|
12
|
+
"deleteFooter",
|
|
13
|
+
"deleteHeader",
|
|
14
|
+
"deleteNamedRange",
|
|
15
|
+
"deleteParagraphBullets",
|
|
16
|
+
"deletePositionedObject",
|
|
17
|
+
"deleteTab",
|
|
18
|
+
"deleteTableColumn",
|
|
19
|
+
"deleteTableRow",
|
|
20
|
+
"insertDate",
|
|
21
|
+
"insertDropdown",
|
|
22
|
+
"insertInlineImage",
|
|
23
|
+
"insertPageBreak",
|
|
24
|
+
"insertPerson",
|
|
25
|
+
"insertRichLink",
|
|
26
|
+
"insertSectionBreak",
|
|
27
|
+
"insertTable",
|
|
28
|
+
"insertTableColumn",
|
|
29
|
+
"insertTableRow",
|
|
30
|
+
"insertText",
|
|
31
|
+
"mergeTableCells",
|
|
32
|
+
"pinTableHeaderRows",
|
|
33
|
+
"replaceAllText",
|
|
34
|
+
"replaceImage",
|
|
35
|
+
"replaceNamedRangeContent",
|
|
36
|
+
"unmergeTableCells",
|
|
37
|
+
"updateDocumentStyle",
|
|
38
|
+
"updateDocumentTabProperties",
|
|
39
|
+
"updateDropdownDefinitionProperties",
|
|
40
|
+
"updateDropdownProperties",
|
|
41
|
+
"updateNamedStyle",
|
|
42
|
+
"updateParagraphStyle",
|
|
43
|
+
"updateSectionStyle",
|
|
44
|
+
"updateTableCellStyle",
|
|
45
|
+
"updateTableColumnProperties",
|
|
46
|
+
"updateTableRowStyle",
|
|
47
|
+
"updateTextStyle",
|
|
48
|
+
];
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// Effect declarations are the catalog and runtime decoder for every named Docs tool.
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { Integer, isMinChars, isMaxChars } from "../../../http/json-schema.js";
|
|
4
|
+
import { fieldsInput } from "../../../http/fields.js";
|
|
5
|
+
import { REQUEST_KINDS } from "./requests.js";
|
|
6
|
+
const matches = (pattern) => Schema.makeFilter((value) => new RegExp(pattern).test(value), {
|
|
7
|
+
expected: `a string matching ${pattern}`,
|
|
8
|
+
toJsonSchema: () => ({ pattern }),
|
|
9
|
+
});
|
|
10
|
+
const Request = Schema.Record(Schema.String, Schema.Record(Schema.String, Schema.Unknown)).check(Schema.makeFilter((value) => Object.keys(value).length === 1 &&
|
|
11
|
+
REQUEST_KINDS.includes(Object.keys(value)[0]), {
|
|
12
|
+
expected: "exactly one reviewed Docs request kind",
|
|
13
|
+
toJsonSchema: () => ({ minProperties: 1, maxProperties: 1, propertyNames: { enum: [...REQUEST_KINDS] } }),
|
|
14
|
+
}));
|
|
15
|
+
export const GET_DOCUMENT_INPUT = Schema.Struct({
|
|
16
|
+
"documentId": Schema.String.check(isMinChars(1), isMaxChars(256), matches("^[A-Za-z0-9_-]+$")).annotate({
|
|
17
|
+
description: "Document id: the part after /d/ in its URL, or a Drive file id for a Google Doc.",
|
|
18
|
+
}),
|
|
19
|
+
"tabId": Schema.optionalKey(Schema.String.check(isMinChars(1), isMaxChars(128), matches("^[A-Za-z0-9._-]+$")).annotate({
|
|
20
|
+
description: "Render only this tab (from a previous get_document); omit for every tab.",
|
|
21
|
+
})),
|
|
22
|
+
"maxChars": Schema.optionalKey(Integer.check(Schema.isGreaterThanOrEqualTo(0), Schema.isLessThanOrEqualTo(1000000)).annotate({
|
|
23
|
+
description: "Characters of text kept across all rendered tabs, 0 to 1000000; defaults to 20000. Connecta's cap. Longer text ends with a truncation marker. Above the default, call directly (call_tool, connecta.result to page): execute_code carries at most 256 KiB per result.",
|
|
24
|
+
})),
|
|
25
|
+
"withIndexes": Schema.optionalKey(Schema.Boolean.annotate({
|
|
26
|
+
description: "Add each tab's elements: every paragraph, table, and table of contents with UTF-16 startIndex and endIndex, 64 KiB per page (connecta's cap); page with cursor.",
|
|
27
|
+
})),
|
|
28
|
+
"cursor": Schema.optionalKey(Schema.String.check(isMinChars(1)).annotate({
|
|
29
|
+
description: "Opaque page.nextCursor from the previous indexed read; keep the same arguments and document revision.",
|
|
30
|
+
})),
|
|
31
|
+
"suggestions": Schema.optionalKey(Schema.Literals(["inline", "accepted", "rejected"]).annotate({
|
|
32
|
+
description: "How suggested edits read: inline (editors' default; the indexes edits use), or a preview with all accepted or all rejected (indexes not valid for edits).",
|
|
33
|
+
})),
|
|
34
|
+
fields: Schema.optionalKey(fieldsInput("Dot paths to keep in the result. Page and truncation metadata are always returned.")),
|
|
35
|
+
});
|
|
36
|
+
export const GET_DOCUMENT_OUTPUT = Schema.Struct({
|
|
37
|
+
"documentId": Schema.optionalKey(Schema.String),
|
|
38
|
+
"title": Schema.optionalKey(Schema.String),
|
|
39
|
+
"revisionId": Schema.optionalKey(Schema.String),
|
|
40
|
+
"url": Schema.optionalKey(Schema.String),
|
|
41
|
+
"tabs": Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
42
|
+
"tabId": Schema.optionalKey(Schema.String),
|
|
43
|
+
"title": Schema.optionalKey(Schema.String),
|
|
44
|
+
"parentTabId": Schema.optionalKey(Schema.String),
|
|
45
|
+
"nestingLevel": Schema.optionalKey(Integer),
|
|
46
|
+
"endIndex": Schema.optionalKey(Integer),
|
|
47
|
+
"text": Schema.optionalKey(Schema.String),
|
|
48
|
+
"notRendered": Schema.optionalKey(Schema.Array(Schema.Literals(["headers", "footers", "positioned_objects", "suggestion_marks", "unknown_elements"]))),
|
|
49
|
+
"elements": Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
50
|
+
"type": Schema.optionalKey(Schema.Literals(["paragraph", "table", "table_of_contents"])),
|
|
51
|
+
"startIndex": Schema.optionalKey(Integer),
|
|
52
|
+
"endIndex": Schema.optionalKey(Integer),
|
|
53
|
+
"style": Schema.optionalKey(Schema.String),
|
|
54
|
+
"row": Schema.optionalKey(Integer),
|
|
55
|
+
"column": Schema.optionalKey(Integer),
|
|
56
|
+
"text": Schema.optionalKey(Schema.String),
|
|
57
|
+
}))),
|
|
58
|
+
}))),
|
|
59
|
+
"page": Schema.optionalKey(Schema.Struct({ "hasMore": Schema.optionalKey(Schema.Boolean), "nextCursor": Schema.optionalKey(Schema.String) })),
|
|
60
|
+
"dropped": Schema.optionalKey(Schema.Array(Schema.String)),
|
|
61
|
+
"truncated": Schema.optionalKey(Schema.Array(Schema.String)),
|
|
62
|
+
});
|
|
63
|
+
export const CREATE_DOCUMENT_INPUT = Schema.Struct({
|
|
64
|
+
"title": Schema.String.check(isMinChars(1), isMaxChars(1000), matches("^[^\\r\\n]*$")).annotate({
|
|
65
|
+
description: "Document title, one line. Connecta's 1,000-character cap.",
|
|
66
|
+
}),
|
|
67
|
+
"text": Schema.optionalKey(Schema.String.check(isMinChars(1), isMaxChars(1000000)).annotate({
|
|
68
|
+
description: "Optional plain-text body; \\n starts a new paragraph.",
|
|
69
|
+
})),
|
|
70
|
+
});
|
|
71
|
+
export const CREATE_DOCUMENT_OUTPUT = Schema.Struct({
|
|
72
|
+
"documentId": Schema.String,
|
|
73
|
+
"title": Schema.optionalKey(Schema.String),
|
|
74
|
+
"revisionId": Schema.optionalKey(Schema.String),
|
|
75
|
+
"url": Schema.String,
|
|
76
|
+
"dropped": Schema.optionalKey(Schema.Array(Schema.String)),
|
|
77
|
+
"notice": Schema.optionalKey(Schema.String),
|
|
78
|
+
});
|
|
79
|
+
export const APPEND_TEXT_INPUT = Schema.Struct({
|
|
80
|
+
"documentId": Schema.String.check(isMinChars(1), isMaxChars(256), matches("^[A-Za-z0-9_-]+$")).annotate({
|
|
81
|
+
description: "Document id: the part after /d/ in its URL, or a Drive file id for a Google Doc.",
|
|
82
|
+
}),
|
|
83
|
+
"text": Schema.String.check(isMinChars(1), isMaxChars(1000000)).annotate({
|
|
84
|
+
description: "Plain text; \\n starts a new paragraph. Google caps a document near 1.02 million characters.",
|
|
85
|
+
}),
|
|
86
|
+
"tabId": Schema.optionalKey(Schema.String.check(isMinChars(1), isMaxChars(128), matches("^[A-Za-z0-9._-]+$")).annotate({
|
|
87
|
+
description: "Tab to append to; omit for the first tab.",
|
|
88
|
+
})),
|
|
89
|
+
"requiredRevisionId": Schema.optionalKey(Schema.String.check(isMinChars(1), isMaxChars(512), matches("^\\S+$")).annotate({
|
|
90
|
+
description: "revisionId from get_document or a previous edit. If the document has changed since, the edit fails conflict and nothing is applied.",
|
|
91
|
+
})),
|
|
92
|
+
});
|
|
93
|
+
export const APPEND_TEXT_OUTPUT = Schema.Struct({
|
|
94
|
+
"documentId": Schema.String,
|
|
95
|
+
"revisionId": Schema.optionalKey(Schema.String),
|
|
96
|
+
"dropped": Schema.optionalKey(Schema.Array(Schema.String)),
|
|
97
|
+
"notice": Schema.optionalKey(Schema.String),
|
|
98
|
+
});
|
|
99
|
+
export const INSERT_TEXT_INPUT = Schema.Struct({
|
|
100
|
+
"documentId": Schema.String.check(isMinChars(1), isMaxChars(256), matches("^[A-Za-z0-9_-]+$")).annotate({
|
|
101
|
+
description: "Document id: the part after /d/ in its URL, or a Drive file id for a Google Doc.",
|
|
102
|
+
}),
|
|
103
|
+
"index": Integer.check(Schema.isGreaterThanOrEqualTo(1), Schema.isLessThanOrEqualTo(10000000)).annotate({
|
|
104
|
+
description: "UTF-16 index inside an existing paragraph, from get_document withIndexes; 1 is the body's start. Not a table's start index.",
|
|
105
|
+
}),
|
|
106
|
+
"text": Schema.String.check(isMinChars(1), isMaxChars(1000000)).annotate({
|
|
107
|
+
description: "Plain text; \\n starts a new paragraph. Google caps a document near 1.02 million characters.",
|
|
108
|
+
}),
|
|
109
|
+
"tabId": Schema.optionalKey(Schema.String.check(isMinChars(1), isMaxChars(128), matches("^[A-Za-z0-9._-]+$")).annotate({
|
|
110
|
+
description: "Tab the index belongs to; omit for the first tab.",
|
|
111
|
+
})),
|
|
112
|
+
"requiredRevisionId": Schema.optionalKey(Schema.String.check(isMinChars(1), isMaxChars(512), matches("^\\S+$")).annotate({
|
|
113
|
+
description: "revisionId from get_document or a previous edit. If the document has changed since, the edit fails conflict and nothing is applied.",
|
|
114
|
+
})),
|
|
115
|
+
});
|
|
116
|
+
export const INSERT_TEXT_OUTPUT = Schema.Struct({
|
|
117
|
+
"documentId": Schema.String,
|
|
118
|
+
"revisionId": Schema.optionalKey(Schema.String),
|
|
119
|
+
"dropped": Schema.optionalKey(Schema.Array(Schema.String)),
|
|
120
|
+
"notice": Schema.optionalKey(Schema.String),
|
|
121
|
+
});
|
|
122
|
+
export const REPLACE_ALL_TEXT_INPUT = Schema.Struct({
|
|
123
|
+
"documentId": Schema.String.check(isMinChars(1), isMaxChars(256), matches("^[A-Za-z0-9_-]+$")).annotate({
|
|
124
|
+
description: "Document id: the part after /d/ in its URL, or a Drive file id for a Google Doc.",
|
|
125
|
+
}),
|
|
126
|
+
"find": Schema.String.check(isMinChars(1), isMaxChars(10000)).annotate({
|
|
127
|
+
description: "Text to find. With regex: true, a regular expression in Google's RE2 syntax.",
|
|
128
|
+
}),
|
|
129
|
+
"replaceWith": Schema.String.check(isMaxChars(1000000)).annotate({
|
|
130
|
+
description: "Replacement text; an empty string deletes every match.",
|
|
131
|
+
}),
|
|
132
|
+
"matchCase": Schema.optionalKey(Schema.Boolean.annotate({ description: "Match case exactly. Defaults to false." })),
|
|
133
|
+
"regex": Schema.optionalKey(Schema.Boolean.annotate({ description: "Treat find as an RE2 regular expression. Defaults to false." })),
|
|
134
|
+
"tabIds": Schema.optionalKey(Schema.Array(Schema.String.check(isMinChars(1), isMaxChars(128), matches("^[A-Za-z0-9._-]+$")).annotate({
|
|
135
|
+
description: "Tab id from get_document.",
|
|
136
|
+
}))
|
|
137
|
+
.check(Schema.isMinLength(1), Schema.isMaxLength(100))
|
|
138
|
+
.annotate({ description: "Only these tabs; omit for every tab." })),
|
|
139
|
+
"requiredRevisionId": Schema.optionalKey(Schema.String.check(isMinChars(1), isMaxChars(512), matches("^\\S+$")).annotate({
|
|
140
|
+
description: "revisionId from get_document or a previous edit. If the document has changed since, the edit fails conflict and nothing is applied.",
|
|
141
|
+
})),
|
|
142
|
+
});
|
|
143
|
+
export const REPLACE_ALL_TEXT_OUTPUT = Schema.Struct({
|
|
144
|
+
"documentId": Schema.String,
|
|
145
|
+
"occurrencesChanged": Integer,
|
|
146
|
+
"revisionId": Schema.optionalKey(Schema.String),
|
|
147
|
+
"dropped": Schema.optionalKey(Schema.Array(Schema.String)),
|
|
148
|
+
"notice": Schema.optionalKey(Schema.String),
|
|
149
|
+
});
|
|
150
|
+
export const BATCH_UPDATE_DOCUMENT_INPUT = Schema.Struct({
|
|
151
|
+
"documentId": Schema.String.check(isMinChars(1), isMaxChars(256), matches("^[A-Za-z0-9_-]+$")).annotate({
|
|
152
|
+
description: "Document id: the part after /d/ in its URL, or a Drive file id for a Google Doc.",
|
|
153
|
+
}),
|
|
154
|
+
"requests": Schema.Array(Request).check(Schema.isMinLength(1), Schema.isMaxLength(100)).annotate({
|
|
155
|
+
description: "Requests in order, 1 to 100 (connecta's cap). Later requests see earlier ones' index shifts.",
|
|
156
|
+
}),
|
|
157
|
+
"requiredRevisionId": Schema.String.check(isMinChars(1), isMaxChars(512), matches("^\\S+$")).annotate({
|
|
158
|
+
description: "revisionId from get_document or a previous edit; required, so raw edits are planned against what was read. If the document has changed, it fails conflict and nothing is applied.",
|
|
159
|
+
}),
|
|
160
|
+
});
|
|
161
|
+
export const BATCH_UPDATE_DOCUMENT_OUTPUT = Schema.Struct({
|
|
162
|
+
"documentId": Schema.String,
|
|
163
|
+
"revisionId": Schema.optionalKey(Schema.String),
|
|
164
|
+
"replies": Schema.Array(Schema.Record(Schema.String, Schema.Unknown)),
|
|
165
|
+
"dropped": Schema.optionalKey(Schema.Array(Schema.String)),
|
|
166
|
+
"notice": Schema.optionalKey(Schema.String),
|
|
167
|
+
"truncated": Schema.optionalKey(Schema.Array(Schema.String)),
|
|
168
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { compactOpenApi } from "../_shared/rest/compact-index.js";
|
|
2
|
+
export const openapi = compactOpenApi({
|
|
3
|
+
source: "https://docs.googleapis.com/$discovery/rest?version=v1",
|
|
4
|
+
revision: "20261019",
|
|
5
|
+
digest: "sha256:9f7c1120a3156c723bc1fc0b65332d00a22ae30dc516af131dbbb6b82b42e780",
|
|
6
|
+
version: "v1",
|
|
7
|
+
servers: ["https://docs.googleapis.com/v1"],
|
|
8
|
+
tags: ["documents"],
|
|
9
|
+
ops: [
|
|
10
|
+
["POST", "/documents", "docs.documents.create", "Create add blank document with title", 0],
|
|
11
|
+
["GET", "/documents/{documentId}", "docs.documents.get", "Get read document tabs text named ranges styles headers footers and revision", 0],
|
|
12
|
+
["POST", "/documents/{documentId}:batchUpdate", "docs.documents.batchUpdate", "Edit document: append paragraph, insert text at index, delete replace text range, format bold style, table, tab, header", 0],
|
|
13
|
+
],
|
|
14
|
+
fields: "{\"p\":[\"body\",\"commentUpdateState\",\"comments\",\"commentsViewMode\",\"comments[].anchorId\",\"comments[].commentId\",\"comments[].headPost\",\"comments[].plainTextQuote\",\"comments[].replies\",\"comments[].status\",\"documentId\",\"documentStyle\",\"footers\",\"footnotes\",\"headers\",\"inlineObjects\",\"lists\",\"namedRanges\",\"namedStyles\",\"positionedObjects\",\"replies\",\"replies[].addCommentReply\",\"replies[].addDocumentTab\",\"replies[].createDropdownDefinition\",\"replies[].createFooter\",\"replies[].createFootnote\",\"replies[].createHeader\",\"replies[].createNamedRange\",\"replies[].insertComment\",\"replies[].insertDropdown\",\"replies[].insertInlineImage\",\"replies[].insertInlineSheetsChart\",\"replies[].replaceAllText\",\"revisionId\",\"suggestedDocumentStyleChanges\",\"suggestedNamedStylesChanges\",\"suggestionResponses\",\"suggestionResponses[].acceptedSuggestionIds\",\"suggestionResponses[].createdSuggestionIds\",\"suggestionResponses[].deletedSuggestionIds\",\"suggestionResponses[].rejectedSuggestionIds\",\"suggestionResponses[].updatedSummarySuggestionIds\",\"suggestions\",\"suggestionsViewMode\",\"suggestions[].headPost\",\"suggestions[].replies\",\"suggestions[].status\",\"suggestions[].suggestionId\",\"suggestions[].summaryHtml\",\"suggestions[].summaryText\",\"tabs\",\"tabs[].childTabs\",\"tabs[].documentTab\",\"tabs[].tabProperties\",\"title\",\"writeControl\"],\"d\":[[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,33,34,35,42,43,44,45,46,47,48,49,50,51,52,53,54],[1,10,20,21,22,23,24,25,26,27,28,29,30,31,32,36,37,38,39,40,41,55]],\"o\":[0,0,1]}",
|
|
15
|
+
requestSchemas: "{\"definitions\":{\"Input_Document\":{\"description\":\"A Google Docs document.\",\"properties\":{\"title\":{\"description\":\"The title of the document.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_BatchUpdateDocumentRequest\":{\"description\":\"Request message for BatchUpdateDocument.\",\"properties\":{\"requests\":{\"description\":\"A list of updates to apply to the document.\",\"items\":{\"$ref\":\"#/$defs/Input_Request\"},\"type\":\"array\"},\"writeControl\":{\"description\":\"Provides control over how write requests are executed.\",\"$ref\":\"#/$defs/Input_WriteControl\"}},\"type\":\"object\"},\"Input_Request\":{\"description\":\"A single update to apply to a document.\",\"properties\":{\"acceptSuggestion\":{\"description\":\"Accepts a suggestion.\",\"$ref\":\"#/$defs/Input_AcceptSuggestionRequest\"},\"addCommentReply\":{\"description\":\"Adds a reply to a CommentThread or SuggestionThread.\",\"$ref\":\"#/$defs/Input_AddCommentReplyRequest\"},\"addDocumentTab\":{\"description\":\"Adds a document tab.\",\"$ref\":\"#/$defs/Input_AddDocumentTabRequest\"},\"createDropdownDefinition\":{\"description\":\"Creates a DropdownDefinition.\",\"$ref\":\"#/$defs/Input_CreateDropdownDefinitionRequest\"},\"createFooter\":{\"description\":\"Creates a footer.\",\"$ref\":\"#/$defs/Input_CreateFooterRequest\"},\"createFootnote\":{\"description\":\"Creates a footnote.\",\"$ref\":\"#/$defs/Input_CreateFootnoteRequest\"},\"createHeader\":{\"description\":\"Creates a header.\",\"$ref\":\"#/$defs/Input_CreateHeaderRequest\"},\"createNamedRange\":{\"description\":\"Creates a named range.\",\"$ref\":\"#/$defs/Input_CreateNamedRangeRequest\"},\"createParagraphBullets\":{\"description\":\"Creates bullets for paragraphs.\",\"$ref\":\"#/$defs/Input_CreateParagraphBulletsRequest\"},\"deleteComment\":{\"description\":\"Deletes a CommentThread.\",\"$ref\":\"#/$defs/Input_DeleteCommentRequest\"},\"deleteCommentReply\":{\"description\":\"Deletes a reply Post from a CommentThread or SuggestionThread.\",\"$ref\":\"#/$defs/Input_DeleteCommentReplyRequest\"},\"deleteContentRange\":{\"description\":\"Deletes content from the document.\",\"$ref\":\"#/$defs/Input_DeleteContentRangeRequest\"},\"deleteDropdownDefinition\":{\"description\":\"Deletes a DropdownDefinition.\",\"$ref\":\"#/$defs/Input_DeleteDropdownDefinitionRequest\"},\"deleteFooter\":{\"description\":\"Deletes a footer from the document.\",\"$ref\":\"#/$defs/Input_DeleteFooterRequest\"},\"deleteHeader\":{\"description\":\"Deletes a header from the document.\",\"$ref\":\"#/$defs/Input_DeleteHeaderRequest\"},\"deleteNamedRange\":{\"description\":\"Deletes a named range.\",\"$ref\":\"#/$defs/Input_DeleteNamedRangeRequest\"},\"deleteParagraphBullets\":{\"description\":\"Deletes bullets from paragraphs.\",\"$ref\":\"#/$defs/Input_DeleteParagraphBulletsRequest\"},\"deletePositionedObject\":{\"description\":\"Deletes a positioned object from the document.\",\"$ref\":\"#/$defs/Input_DeletePositionedObjectRequest\"},\"deleteSuggestion\":{\"description\":\"Deletes a suggestion.\",\"$ref\":\"#/$defs/Input_DeleteSuggestionRequest\"},\"deleteTab\":{\"description\":\"Deletes a document tab.\",\"$ref\":\"#/$defs/Input_DeleteTabRequest\"},\"deleteTableColumn\":{\"description\":\"Deletes a column from a table.\",\"$ref\":\"#/$defs/Input_DeleteTableColumnRequest\"},\"deleteTableRow\":{\"description\":\"Deletes a row from a table.\",\"$ref\":\"#/$defs/Input_DeleteTableRowRequest\"},\"insertComment\":{\"description\":\"Inserts a CommentThread into the document.\",\"$ref\":\"#/$defs/Input_InsertCommentRequest\"},\"insertDate\":{\"description\":\"Inserts a date.\",\"$ref\":\"#/$defs/Input_InsertDateRequest\"},\"insertDropdown\":{\"description\":\"Inserts a Dropdown at the specified location.\",\"$ref\":\"#/$defs/Input_InsertDropdownRequest\"},\"insertInlineImage\":{\"description\":\"Inserts an inline image at the specified location.\",\"$ref\":\"#/$defs/Input_InsertInlineImageRequest\"},\"insertPageBreak\":{\"description\":\"Inserts a page break at the specified location.\",\"$ref\":\"#/$defs/Input_InsertPageBreakRequest\"},\"insertPerson\":{\"description\":\"Inserts a person mention.\",\"$ref\":\"#/$defs/Input_InsertPersonRequest\"},\"insertRichLink\":{\"description\":\"Insert a rich link.\",\"$ref\":\"#/$defs/Input_InsertRichLinkRequest\"},\"insertSectionBreak\":{\"description\":\"Inserts a section break at the specified location.\",\"$ref\":\"#/$defs/Input_InsertSectionBreakRequest\"},\"insertTable\":{\"description\":\"Inserts a table at the specified location.\",\"$ref\":\"#/$defs/Input_InsertTableRequest\"},\"insertTableColumn\":{\"description\":\"Inserts an empty column into a table.\",\"$ref\":\"#/$defs/Input_InsertTableColumnRequest\"},\"insertTableRow\":{\"description\":\"Inserts an empty row into a table.\",\"$ref\":\"#/$defs/Input_InsertTableRowRequest\"},\"insertText\":{\"description\":\"Inserts text at the specified location.\",\"$ref\":\"#/$defs/Input_InsertTextRequest\"},\"mergeTableCells\":{\"description\":\"Merges cells in a table.\",\"$ref\":\"#/$defs/Input_MergeTableCellsRequest\"},\"pinTableHeaderRows\":{\"description\":\"Updates the number of pinned header rows in a table.\",\"$ref\":\"#/$defs/Input_PinTableHeaderRowsRequest\"},\"rejectSuggestion\":{\"description\":\"Rejects a suggestion.\",\"$ref\":\"#/$defs/Input_RejectSuggestionRequest\"},\"replaceAllText\":{\"description\":\"Replaces all instances of the specified text.\",\"$ref\":\"#/$defs/Input_ReplaceAllTextRequest\"},\"replaceImage\":{\"description\":\"Replaces an image in the document.\",\"$ref\":\"#/$defs/Input_ReplaceImageRequest\"},\"replaceNamedRangeContent\":{\"description\":\"Replaces the content in a named range.\",\"$ref\":\"#/$defs/Input_ReplaceNamedRangeContentRequest\"},\"unmergeTableCells\":{\"description\":\"Unmerges cells in a table.\",\"$ref\":\"#/$defs/Input_UnmergeTableCellsRequest\"},\"updateCommentPost\":{\"description\":\"Updates an existing post (head post or reply) of a CommentThread or SuggestionThread.\",\"$ref\":\"#/$defs/Input_UpdateCommentPostRequest\"},\"updateDocumentStyle\":{\"description\":\"Updates the style of the document.\",\"$ref\":\"#/$defs/Input_UpdateDocumentStyleRequest\"},\"updateDocumentTabProperties\":{\"description\":\"Updates the properties of a document tab.\",\"$ref\":\"#/$defs/Input_UpdateDocumentTabPropertiesRequest\"},\"updateDropdownDefinitionProperties\":{\"description\":\"Updates the properties of a DropdownDefinition.\",\"$ref\":\"#/$defs/Input_UpdateDropdownDefinitionPropertiesRequest\"},\"updateDropdownProperties\":{\"description\":\"Updates the properties of a Dropdown.\",\"$ref\":\"#/$defs/Input_UpdateDropdownPropertiesRequest\"},\"updateNamedStyle\":{\"description\":\"Updates a named style.\",\"$ref\":\"#/$defs/Input_UpdateNamedStyleRequest\"},\"updateParagraphStyle\":{\"description\":\"Updates the paragraph style at the specified range.\",\"$ref\":\"#/$defs/Input_UpdateParagraphStyleRequest\"},\"updateSectionStyle\":{\"description\":\"Updates the section style of the specified range.\",\"$ref\":\"#/$defs/Input_UpdateSectionStyleRequest\"},\"updateTableCellStyle\":{\"description\":\"Updates the style of table cells.\",\"$ref\":\"#/$defs/Input_UpdateTableCellStyleRequest\"},\"updateTableColumnProperties\":{\"description\":\"Updates the properties of columns in a table.\",\"$ref\":\"#/$defs/Input_UpdateTableColumnPropertiesRequest\"},\"updateTableRowStyle\":{\"description\":\"Updates the row style in a table.\",\"$ref\":\"#/$defs/Input_UpdateTableRowStyleRequest\"},\"updateTextStyle\":{\"description\":\"Updates the text style at the specified range.\",\"$ref\":\"#/$defs/Input_UpdateTextStyleRequest\"}},\"type\":\"object\"},\"Input_AcceptSuggestionRequest\":{\"description\":\"Accepts a suggestion.\",\"properties\":{\"suggestionId\":{\"description\":\"The ID of the suggestion.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_AddCommentReplyRequest\":{\"description\":\"Inserts a reply Post into a CommentThread or SuggestionThread.\",\"properties\":{\"commentId\":{\"description\":\"The ID of the CommentThread to add the reply to.\",\"type\":\"string\"},\"post\":{\"description\":\"The Post representing the reply.\",\"$ref\":\"#/$defs/Input_Post\"},\"suggestionId\":{\"description\":\"The ID of the SuggestionThread to add the reply to.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_Post\":{\"description\":\"Represents a single post in a comment or suggestion thread.\",\"properties\":{\"assigneeEmail\":{\"description\":\"Optional.\",\"type\":\"string\"},\"commentAction\":{\"description\":\"Optional.\",\"enum\":[\"COMMENT_ACTION_TYPE_UNSPECIFIED\",\"NO_COMMENT_ACTION_CHANGE\",\"RESOLVE\",\"REOPEN\"],\"type\":\"string\"},\"content\":{\"description\":\"The content of the post.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_AddDocumentTabRequest\":{\"description\":\"Adds a document tab.\",\"properties\":{\"tabProperties\":{\"description\":\"The properties of the tab to add.\",\"$ref\":\"#/$defs/Input_TabProperties\"}},\"type\":\"object\"},\"Input_TabProperties\":{\"description\":\"Properties of a tab.\",\"properties\":{\"iconEmoji\":{\"description\":\"Optional.\",\"type\":\"string\"},\"index\":{\"description\":\"The zero-based index of the tab within the parent.\",\"format\":\"int32\",\"type\":\"integer\"},\"parentTabId\":{\"description\":\"Optional.\",\"type\":\"string\"},\"tabId\":{\"description\":\"The immutable ID of the tab.\",\"type\":\"string\"},\"title\":{\"description\":\"The user-visible name of the tab.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_CreateDropdownDefinitionRequest\":{\"description\":\"Creates a new DropdownDefinition in the document.\",\"properties\":{\"dropdownDefinition\":{\"description\":\"Required.\",\"$ref\":\"#/$defs/Input_DropdownDefinition\"},\"tabId\":{\"description\":\"The ID of the tab to create the dropdown definition in.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DropdownDefinition\":{\"description\":\"A dropdown definition in the document.\",\"properties\":{\"dropdownDefinitionId\":{\"description\":\"The ID of this dropdown definition.\",\"type\":\"string\"},\"dropdownDefinitionProperties\":{\"description\":\"The properties of this dropdown definition.\",\"$ref\":\"#/$defs/Input_DropdownDefinitionProperties\"},\"suggestedDeletionId\":{\"description\":\"ID for suggestion that deletes this dropdown definition.\",\"type\":\"string\"},\"suggestedDropdownDefinitionPropertiesChanges\":{\"additionalProperties\":{\"$ref\":\"#/$defs/Input_SuggestedDropdownDefinitionProperties\"},\"description\":\"Suggested property changes to this definition, keyed by suggestion ID.\",\"type\":\"object\"},\"suggestedInsertionId\":{\"description\":\"ID for suggestion that inserts this dropdown definition.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DropdownDefinitionProperties\":{\"description\":\"Properties of a dropdown definition.\",\"properties\":{\"options\":{\"description\":\"The list of options defined by this dropdown definition.\",\"items\":{\"$ref\":\"#/$defs/Input_DropdownOption\"},\"type\":\"array\"},\"title\":{\"description\":\"The title of the dropdown definition.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DropdownOption\":{\"description\":\"An option in a Dropdown.\",\"properties\":{\"displayValue\":{\"description\":\"The display value of this dropdown option.\",\"type\":\"string\"},\"optionId\":{\"description\":\"The ID of this dropdown option.\",\"type\":\"string\"},\"textStyle\":{\"description\":\"The text style of this dropdown option.\",\"$ref\":\"#/$defs/Input_TextStyle\"}},\"type\":\"object\"},\"Input_TextStyle\":{\"description\":\"Represents the styling that can be applied to text.\",\"properties\":{\"backgroundColor\":{\"description\":\"The background color of the text.\",\"$ref\":\"#/$defs/Input_OptionalColor\"},\"baselineOffset\":{\"description\":\"The text's vertical offset from its normal position.\",\"enum\":[\"BASELINE_OFFSET_UNSPECIFIED\",\"NONE\",\"SUPERSCRIPT\",\"SUBSCRIPT\"],\"type\":\"string\"},\"bold\":{\"description\":\"Whether or not the text is rendered as bold.\",\"type\":\"boolean\"},\"fontSize\":{\"description\":\"The size of the text's font.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"foregroundColor\":{\"description\":\"The foreground color of the text.\",\"$ref\":\"#/$defs/Input_OptionalColor\"},\"italic\":{\"description\":\"Whether or not the text is italicized.\",\"type\":\"boolean\"},\"link\":{\"description\":\"The hyperlink destination of the text.\",\"$ref\":\"#/$defs/Input_Link\"},\"smallCaps\":{\"description\":\"Whether or not the text is in small capital letters.\",\"type\":\"boolean\"},\"strikethrough\":{\"description\":\"Whether or not the text is struck through.\",\"type\":\"boolean\"},\"underline\":{\"description\":\"Whether or not the text is underlined.\",\"type\":\"boolean\"},\"weightedFontFamily\":{\"description\":\"The font family and rendered weight of the text.\",\"$ref\":\"#/$defs/Input_WeightedFontFamily\"}},\"type\":\"object\"},\"Input_OptionalColor\":{\"description\":\"A color that can either be fully opaque or fully transparent.\",\"properties\":{\"color\":{\"description\":\"If set, this will be used as an opaque color.\",\"$ref\":\"#/$defs/Input_Color\"}},\"type\":\"object\"},\"Input_Color\":{\"description\":\"A solid color.\",\"properties\":{\"rgbColor\":{\"description\":\"The RGB color value.\",\"$ref\":\"#/$defs/Input_RgbColor\"}},\"type\":\"object\"},\"Input_RgbColor\":{\"description\":\"An RGB color.\",\"properties\":{\"blue\":{\"description\":\"The blue component of the color, from 0.0 to 1.0.\",\"format\":\"float\",\"type\":\"number\"},\"green\":{\"description\":\"The green component of the color, from 0.0 to 1.0.\",\"format\":\"float\",\"type\":\"number\"},\"red\":{\"description\":\"The red component of the color, from 0.0 to 1.0.\",\"format\":\"float\",\"type\":\"number\"}},\"type\":\"object\"},\"Input_Dimension\":{\"description\":\"A magnitude in a single direction in the specified units.\",\"properties\":{\"magnitude\":{\"description\":\"The magnitude.\",\"format\":\"double\",\"type\":\"number\"},\"unit\":{\"description\":\"The units for magnitude.\",\"enum\":[\"UNIT_UNSPECIFIED\",\"PT\"],\"type\":\"string\"}},\"type\":\"object\"},\"Input_Link\":{\"description\":\"A reference to another portion of a document or an external URL resource.\",\"properties\":{\"bookmark\":{\"description\":\"A bookmark in this document.\",\"$ref\":\"#/$defs/Input_BookmarkLink\"},\"bookmarkId\":{\"description\":\"The ID of a bookmark in this document.\",\"type\":\"string\"},\"heading\":{\"description\":\"A heading in this document.\",\"$ref\":\"#/$defs/Input_HeadingLink\"},\"headingId\":{\"description\":\"The ID of a heading in this document.\",\"type\":\"string\"},\"tabId\":{\"description\":\"The ID of a tab in this document.\",\"type\":\"string\"},\"url\":{\"description\":\"An external URL.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_BookmarkLink\":{\"description\":\"A reference to a bookmark in this document.\",\"properties\":{\"id\":{\"description\":\"The ID of a bookmark in this document.\",\"type\":\"string\"},\"tabId\":{\"description\":\"The ID of the tab containing this bookmark.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_HeadingLink\":{\"description\":\"A reference to a heading in this document.\",\"properties\":{\"id\":{\"description\":\"The ID of a heading in this document.\",\"type\":\"string\"},\"tabId\":{\"description\":\"The ID of the tab containing this heading.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_WeightedFontFamily\":{\"description\":\"Represents a font family and weight of text.\",\"properties\":{\"fontFamily\":{\"description\":\"The font family of the text.\",\"type\":\"string\"},\"weight\":{\"description\":\"The weight of the font.\",\"format\":\"int32\",\"type\":\"integer\"}},\"type\":\"object\"},\"Input_SuggestedDropdownDefinitionProperties\":{\"description\":\"A suggested change to dropdown definition properties.\",\"properties\":{\"dropdownDefinitionProperties\":{\"description\":\"A DropdownDefinitionProperties that only includes the changes made in this suggestion.\",\"$ref\":\"#/$defs/Input_DropdownDefinitionProperties\"},\"dropdownDefinitionPropertiesSuggestionState\":{\"description\":\"A mask that indicates which of the fields on the base DropdownDefinitionProperties have been changed in this suggestion.\",\"$ref\":\"#/$defs/Input_DropdownDefinitionPropertiesSuggestionState\"}},\"type\":\"object\"},\"Input_DropdownDefinitionPropertiesSuggestionState\":{\"description\":\"A mask that indicates which of the fields on the base DropdownDefinitionProperties have been changed in this suggestion.\",\"properties\":{\"optionsSuggested\":{\"description\":\"Indicates if there was a suggested change to options.\",\"type\":\"boolean\"},\"titleSuggested\":{\"description\":\"Indicates if there was a suggested change to title.\",\"type\":\"boolean\"}},\"type\":\"object\"},\"Input_CreateFooterRequest\":{\"description\":\"Creates a Footer.\",\"properties\":{\"sectionBreakLocation\":{\"description\":\"The location of the SectionBreak immediately preceding the section whose SectionStyle this footer should belong to.\",\"$ref\":\"#/$defs/Input_Location\"},\"type\":{\"description\":\"The type of footer to create.\",\"enum\":[\"HEADER_FOOTER_TYPE_UNSPECIFIED\",\"DEFAULT\"],\"type\":\"string\"}},\"type\":\"object\"},\"Input_Location\":{\"description\":\"A particular location in the document.\",\"properties\":{\"index\":{\"description\":\"The zero-based index, in UTF-16 code units.\",\"format\":\"int32\",\"type\":\"integer\"},\"segmentId\":{\"description\":\"The ID of the header, footer or footnote the location is in.\",\"type\":\"string\"},\"tabId\":{\"description\":\"The tab that the location is in.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_CreateFootnoteRequest\":{\"description\":\"Creates a Footnote segment and inserts a new FootnoteReference to it at the given location.\",\"properties\":{\"endOfSegmentLocation\":{\"description\":\"Inserts the footnote reference at the end of the document body.\",\"$ref\":\"#/$defs/Input_EndOfSegmentLocation\"},\"location\":{\"description\":\"Inserts the footnote reference at a specific index in the document.\",\"$ref\":\"#/$defs/Input_Location\"}},\"type\":\"object\"},\"Input_EndOfSegmentLocation\":{\"description\":\"Location at the end of a body, header, footer or footnote.\",\"properties\":{\"segmentId\":{\"description\":\"The ID of the header, footer or footnote the location is in.\",\"type\":\"string\"},\"tabId\":{\"description\":\"The tab that the location is in.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_CreateHeaderRequest\":{\"description\":\"Creates a Header.\",\"properties\":{\"sectionBreakLocation\":{\"description\":\"The location of the SectionBreak which begins the section this header should belong to.\",\"$ref\":\"#/$defs/Input_Location\"},\"type\":{\"description\":\"The type of header to create.\",\"enum\":[\"HEADER_FOOTER_TYPE_UNSPECIFIED\",\"DEFAULT\"],\"type\":\"string\"}},\"type\":\"object\"},\"Input_CreateNamedRangeRequest\":{\"description\":\"Creates a NamedRange referencing the given range.\",\"properties\":{\"name\":{\"description\":\"The name of the NamedRange.\",\"type\":\"string\"},\"range\":{\"description\":\"The range to apply the name to.\",\"$ref\":\"#/$defs/Input_Range\"}},\"type\":\"object\"},\"Input_Range\":{\"description\":\"Specifies a contiguous range of text.\",\"properties\":{\"endIndex\":{\"description\":\"The zero-based end index of this range, exclusive, in UTF-16 code units.\",\"format\":\"int32\",\"type\":\"integer\"},\"segmentId\":{\"description\":\"The ID of the header, footer, or footnote that this range is contained in.\",\"type\":\"string\"},\"startIndex\":{\"description\":\"The zero-based start index of this range, in UTF-16 code units.\",\"format\":\"int32\",\"type\":\"integer\"},\"tabId\":{\"description\":\"The tab that contains this range.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_CreateParagraphBulletsRequest\":{\"description\":\"Creates bullets for all of the paragraphs that overlap with the given range.\",\"properties\":{\"bulletPreset\":{\"description\":\"The kinds of bullet glyphs to be used.\",\"enum\":[\"BULLET_GLYPH_PRESET_UNSPECIFIED\",\"BULLET_DISC_CIRCLE_SQUARE\",\"BULLET_DIAMONDX_ARROW3D_SQUARE\",\"BULLET_CHECKBOX\",\"BULLET_ARROW_DIAMOND_DISC\",\"BULLET_STAR_CIRCLE_SQUARE\",\"BULLET_ARROW3D_CIRCLE_SQUARE\",\"BULLET_LEFTTRIANGLE_DIAMOND_DISC\",\"BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE\",\"BULLET_DIAMOND_CIRCLE_SQUARE\",\"NUMBERED_DECIMAL_ALPHA_ROMAN\",\"NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS\",\"NUMBERED_DECIMAL_NESTED\",\"NUMBERED_UPPERALPHA_ALPHA_ROMAN\",\"NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL\",\"NUMBERED_ZERODECIMAL_ALPHA_ROMAN\"],\"type\":\"string\"},\"range\":{\"description\":\"The range to apply the bullet preset to.\",\"$ref\":\"#/$defs/Input_Range\"}},\"type\":\"object\"},\"Input_DeleteCommentRequest\":{\"description\":\"Deletes a CommentThread.\",\"properties\":{\"commentId\":{\"description\":\"The ID of the CommentThread that is being deleted.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DeleteCommentReplyRequest\":{\"description\":\"Deletes a reply Post from a CommentThread or SuggestionThread.\",\"properties\":{\"commentId\":{\"description\":\"The ID of the CommentThread which the post belongs to.\",\"type\":\"string\"},\"postId\":{\"description\":\"The ID of the reply Post being deleted.\",\"type\":\"string\"},\"suggestionId\":{\"description\":\"The ID of the SuggestionThread which the post belongs to.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DeleteContentRangeRequest\":{\"description\":\"Deletes content from the document.\",\"properties\":{\"range\":{\"description\":\"The range of content to delete.\",\"$ref\":\"#/$defs/Input_Range\"}},\"type\":\"object\"},\"Input_DeleteDropdownDefinitionRequest\":{\"description\":\"Deletes a DropdownDefinition.\",\"properties\":{\"dropdownDefinitionId\":{\"description\":\"The ID of the DropdownDefinition to delete.\",\"type\":\"string\"},\"tabId\":{\"description\":\"The ID of the tab that contains the dropdown definition to delete.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DeleteFooterRequest\":{\"description\":\"Deletes a Footer from the document.\",\"properties\":{\"footerId\":{\"description\":\"The id of the footer to delete.\",\"type\":\"string\"},\"tabId\":{\"description\":\"The tab that contains the footer to delete.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DeleteHeaderRequest\":{\"description\":\"Deletes a Header from the document.\",\"properties\":{\"headerId\":{\"description\":\"The id of the header to delete.\",\"type\":\"string\"},\"tabId\":{\"description\":\"The tab containing the header to delete.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DeleteNamedRangeRequest\":{\"description\":\"Deletes a NamedRange.\",\"properties\":{\"name\":{\"description\":\"The name of the range(s) to delete.\",\"type\":\"string\"},\"namedRangeId\":{\"description\":\"The ID of the named range to delete.\",\"type\":\"string\"},\"tabsCriteria\":{\"description\":\"Optional.\",\"$ref\":\"#/$defs/Input_TabsCriteria\"}},\"type\":\"object\"},\"Input_TabsCriteria\":{\"description\":\"A criteria that specifies in which tabs a request executes.\",\"properties\":{\"tabIds\":{\"description\":\"The list of tab IDs in which the request executes.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"}},\"type\":\"object\"},\"Input_DeleteParagraphBulletsRequest\":{\"description\":\"Deletes bullets from all of the paragraphs that overlap with the given range.\",\"properties\":{\"range\":{\"description\":\"The range to delete bullets from.\",\"$ref\":\"#/$defs/Input_Range\"}},\"type\":\"object\"},\"Input_DeletePositionedObjectRequest\":{\"description\":\"Deletes a PositionedObject from the document.\",\"properties\":{\"objectId\":{\"description\":\"The ID of the positioned object to delete.\",\"type\":\"string\"},\"tabId\":{\"description\":\"The tab that the positioned object to delete is in.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DeleteSuggestionRequest\":{\"description\":\"Deletes a suggestion.\",\"properties\":{\"suggestionId\":{\"description\":\"The ID of the suggestion.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DeleteTabRequest\":{\"description\":\"Deletes a tab.\",\"properties\":{\"tabId\":{\"description\":\"The ID of the tab to delete.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DeleteTableColumnRequest\":{\"description\":\"Deletes a column from a table.\",\"properties\":{\"tableCellLocation\":{\"description\":\"The reference table cell location from which the column will be deleted.\",\"$ref\":\"#/$defs/Input_TableCellLocation\"}},\"type\":\"object\"},\"Input_TableCellLocation\":{\"description\":\"Location of a single cell within a table.\",\"properties\":{\"columnIndex\":{\"description\":\"The zero-based column index.\",\"format\":\"int32\",\"type\":\"integer\"},\"rowIndex\":{\"description\":\"The zero-based row index.\",\"format\":\"int32\",\"type\":\"integer\"},\"tableStartLocation\":{\"description\":\"The location where the table starts in the document.\",\"$ref\":\"#/$defs/Input_Location\"}},\"type\":\"object\"},\"Input_DeleteTableRowRequest\":{\"description\":\"Deletes a row from a table.\",\"properties\":{\"tableCellLocation\":{\"description\":\"The reference table cell location from which the row will be deleted.\",\"$ref\":\"#/$defs/Input_TableCellLocation\"}},\"type\":\"object\"},\"Input_InsertCommentRequest\":{\"description\":\"Inserts a CommentThread into the document.\",\"properties\":{\"assigneeEmailAddress\":{\"description\":\"Optional.\",\"type\":\"string\"},\"content\":{\"description\":\"The text of the comment, as plain text.\",\"type\":\"string\"},\"range\":{\"description\":\"The Range in the document that is tied to this comment.\",\"$ref\":\"#/$defs/Input_Range\"}},\"type\":\"object\"},\"Input_InsertDateRequest\":{\"description\":\"Inserts a date at the specified location.\",\"properties\":{\"dateElementProperties\":{\"description\":\"The properties of the date to insert.\",\"$ref\":\"#/$defs/Input_DateElementProperties\"},\"endOfSegmentLocation\":{\"description\":\"Inserts the date at the end of the given header, footer or document body.\",\"$ref\":\"#/$defs/Input_EndOfSegmentLocation\"},\"location\":{\"description\":\"Inserts the date at a specific index in the document.\",\"$ref\":\"#/$defs/Input_Location\"}},\"type\":\"object\"},\"Input_DateElementProperties\":{\"description\":\"Properties of a DateElement.\",\"properties\":{\"dateFormat\":{\"description\":\"Determines how the date part of the DateElement will be displayed in the document.\",\"enum\":[\"DATE_FORMAT_UNSPECIFIED\",\"DATE_FORMAT_CUSTOM\",\"DATE_FORMAT_MONTH_DAY_ABBREVIATED\",\"DATE_FORMAT_MONTH_DAY_FULL\",\"DATE_FORMAT_MONTH_DAY_YEAR_ABBREVIATED\",\"DATE_FORMAT_ISO8601\"],\"type\":\"string\"},\"locale\":{\"description\":\"The language code of the DateElement.\",\"type\":\"string\"},\"timeFormat\":{\"description\":\"Determines how the time part of the DateElement will be displayed in the document.\",\"enum\":[\"TIME_FORMAT_UNSPECIFIED\",\"TIME_FORMAT_DISABLED\",\"TIME_FORMAT_HOUR_MINUTE\",\"TIME_FORMAT_HOUR_MINUTE_TIMEZONE\"],\"type\":\"string\"},\"timeZoneId\":{\"description\":\"The time zone of the DateElement, as defined by the Unicode Common Locale Data Repository (CLDR) project.\",\"type\":\"string\"},\"timestamp\":{\"description\":\"The point in time to represent, in seconds and nanoseconds since Unix epoch: January 1, 1970 at midnight UTC.\",\"format\":\"google-datetime\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_InsertDropdownRequest\":{\"description\":\"Inserts a Dropdown at the specified location.\",\"properties\":{\"dropdownDefinitionId\":{\"description\":\"Required.\",\"type\":\"string\"},\"endOfSegmentLocation\":{\"description\":\"The EndOfSegmentLocation in the document to insert the dropdown at.\",\"$ref\":\"#/$defs/Input_EndOfSegmentLocation\"},\"location\":{\"description\":\"The Location in the document to insert the dropdown at.\",\"$ref\":\"#/$defs/Input_Location\"},\"selectedOptionId\":{\"description\":\"Optional initial value for the dropdown.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_InsertInlineImageRequest\":{\"description\":\"Inserts an InlineObject containing an image at the given location.\",\"properties\":{\"endOfSegmentLocation\":{\"description\":\"Inserts the text at the end of a header, footer or the document body.\",\"$ref\":\"#/$defs/Input_EndOfSegmentLocation\"},\"location\":{\"description\":\"Inserts the image at a specific index in the document.\",\"$ref\":\"#/$defs/Input_Location\"},\"objectSize\":{\"description\":\"The size that the image should appear as in the document.\",\"$ref\":\"#/$defs/Input_Size\"},\"uri\":{\"description\":\"The image URI.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_Size\":{\"description\":\"A width and height.\",\"properties\":{\"height\":{\"description\":\"The height of the object.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"width\":{\"description\":\"The width of the object.\",\"$ref\":\"#/$defs/Input_Dimension\"}},\"type\":\"object\"},\"Input_InsertPageBreakRequest\":{\"description\":\"Inserts a page break followed by a newline at the specified location.\",\"properties\":{\"endOfSegmentLocation\":{\"description\":\"Inserts the page break at the end of the document body.\",\"$ref\":\"#/$defs/Input_EndOfSegmentLocation\"},\"location\":{\"description\":\"Inserts the page break at a specific index in the document.\",\"$ref\":\"#/$defs/Input_Location\"}},\"type\":\"object\"},\"Input_InsertPersonRequest\":{\"description\":\"Inserts a person mention.\",\"properties\":{\"endOfSegmentLocation\":{\"description\":\"Inserts the person mention at the end of a header, footer, footnote or the document body.\",\"$ref\":\"#/$defs/Input_EndOfSegmentLocation\"},\"location\":{\"description\":\"Inserts the person mention at a specific index in the document.\",\"$ref\":\"#/$defs/Input_Location\"},\"personProperties\":{\"description\":\"The properties of the person mention to insert.\",\"$ref\":\"#/$defs/Input_PersonProperties\"}},\"type\":\"object\"},\"Input_PersonProperties\":{\"description\":\"Properties specific to a linked Person.\",\"properties\":{\"email\":{\"description\":\"The email address linked to this Person.\",\"type\":\"string\"},\"name\":{\"description\":\"The name of the person if it's displayed in the link text instead of the person's email address.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_InsertRichLinkRequest\":{\"description\":\"Inserts a RichLink at the specified location.\",\"properties\":{\"endOfSegmentLocation\":{\"description\":\"Inserts the rich link at the end of a header, footer, footnote or the document body.\",\"$ref\":\"#/$defs/Input_EndOfSegmentLocation\"},\"location\":{\"description\":\"Inserts the rich link at a specific index in the document.\",\"$ref\":\"#/$defs/Input_Location\"},\"richLinkProperties\":{\"description\":\"The properties of the rich link to insert.\",\"$ref\":\"#/$defs/Input_RichLinkProperties\"}},\"type\":\"object\"},\"Input_RichLinkProperties\":{\"description\":\"Properties specific to a RichLink.\",\"properties\":{\"mimeType\":{\"description\":\"The MIME type of the RichLink, if there's one (for example, when it's a file in Drive).\",\"type\":\"string\"},\"title\":{\"description\":\"The title of the RichLink as displayed in the link.\",\"type\":\"string\"},\"uri\":{\"description\":\"The URI to the RichLink.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_InsertSectionBreakRequest\":{\"description\":\"Inserts a section break at the given location.\",\"properties\":{\"endOfSegmentLocation\":{\"description\":\"Inserts a newline and a section break at the end of the document body.\",\"$ref\":\"#/$defs/Input_EndOfSegmentLocation\"},\"location\":{\"description\":\"Inserts a newline and a section break at a specific index in the document.\",\"$ref\":\"#/$defs/Input_Location\"},\"sectionType\":{\"description\":\"The type of section to insert.\",\"enum\":[\"SECTION_TYPE_UNSPECIFIED\",\"CONTINUOUS\",\"NEXT_PAGE\"],\"type\":\"string\"}},\"type\":\"object\"},\"Input_InsertTableRequest\":{\"description\":\"Inserts a table at the specified location.\",\"properties\":{\"columns\":{\"description\":\"The number of columns in the table.\",\"format\":\"int32\",\"type\":\"integer\"},\"endOfSegmentLocation\":{\"description\":\"Inserts the table at the end of the given header, footer or document body.\",\"$ref\":\"#/$defs/Input_EndOfSegmentLocation\"},\"location\":{\"description\":\"Inserts the table at a specific model index.\",\"$ref\":\"#/$defs/Input_Location\"},\"rows\":{\"description\":\"The number of rows in the table.\",\"format\":\"int32\",\"type\":\"integer\"}},\"type\":\"object\"},\"Input_InsertTableColumnRequest\":{\"description\":\"Inserts an empty column into a table.\",\"properties\":{\"insertRight\":{\"description\":\"Whether to insert new column to the right of the reference cell location.\",\"type\":\"boolean\"},\"tableCellLocation\":{\"description\":\"The reference table cell location from which columns will be inserted.\",\"$ref\":\"#/$defs/Input_TableCellLocation\"}},\"type\":\"object\"},\"Input_InsertTableRowRequest\":{\"description\":\"Inserts an empty row into a table.\",\"properties\":{\"insertBelow\":{\"description\":\"Whether to insert new row below the reference cell location.\",\"type\":\"boolean\"},\"tableCellLocation\":{\"description\":\"The reference table cell location from which rows will be inserted.\",\"$ref\":\"#/$defs/Input_TableCellLocation\"}},\"type\":\"object\"},\"Input_InsertTextRequest\":{\"description\":\"Inserts text at the specified location.\",\"properties\":{\"endOfSegmentLocation\":{\"description\":\"Inserts the text at the end of a header, footer, footnote or the document body.\",\"$ref\":\"#/$defs/Input_EndOfSegmentLocation\"},\"location\":{\"description\":\"Inserts the text at a specific index in the document.\",\"$ref\":\"#/$defs/Input_Location\"},\"text\":{\"description\":\"The text to be inserted.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_MergeTableCellsRequest\":{\"description\":\"Merges cells in a Table.\",\"properties\":{\"tableRange\":{\"description\":\"The table range specifying which cells of the table to merge.\",\"$ref\":\"#/$defs/Input_TableRange\"}},\"type\":\"object\"},\"Input_TableRange\":{\"description\":\"A table range represents a reference to a subset of a table.\",\"properties\":{\"columnSpan\":{\"description\":\"The column span of the table range.\",\"format\":\"int32\",\"type\":\"integer\"},\"rowSpan\":{\"description\":\"The row span of the table range.\",\"format\":\"int32\",\"type\":\"integer\"},\"tableCellLocation\":{\"description\":\"The cell location where the table range starts.\",\"$ref\":\"#/$defs/Input_TableCellLocation\"}},\"type\":\"object\"},\"Input_PinTableHeaderRowsRequest\":{\"description\":\"Updates the number of pinned table header rows in a table.\",\"properties\":{\"pinnedHeaderRowsCount\":{\"description\":\"The number of table rows to pin, where 0 implies that all rows are unpinned.\",\"format\":\"int32\",\"type\":\"integer\"},\"tableStartLocation\":{\"description\":\"The location where the table starts in the document.\",\"$ref\":\"#/$defs/Input_Location\"}},\"type\":\"object\"},\"Input_RejectSuggestionRequest\":{\"description\":\"Rejects a suggestion.\",\"properties\":{\"suggestionId\":{\"description\":\"The ID of the suggestion.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_ReplaceAllTextRequest\":{\"description\":\"Replaces all instances of text matching a criteria with replace text.\",\"properties\":{\"containsText\":{\"description\":\"Finds text in the document matching this substring.\",\"$ref\":\"#/$defs/Input_SubstringMatchCriteria\"},\"replaceText\":{\"description\":\"The text that will replace the matched text.\",\"type\":\"string\"},\"tabsCriteria\":{\"description\":\"Optional.\",\"$ref\":\"#/$defs/Input_TabsCriteria\"}},\"type\":\"object\"},\"Input_SubstringMatchCriteria\":{\"description\":\"A criteria that matches a specific string of text in the document.\",\"properties\":{\"matchCase\":{\"description\":\"Indicates whether the search should respect case: - `True`: the search is case sensitive.\",\"type\":\"boolean\"},\"searchByRegex\":{\"description\":\"Optional.\",\"type\":\"boolean\"},\"text\":{\"description\":\"The text to search for in the document.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_ReplaceImageRequest\":{\"description\":\"Replaces an existing image with a new image.\",\"properties\":{\"imageObjectId\":{\"description\":\"The ID of the existing image that will be replaced.\",\"type\":\"string\"},\"imageReplaceMethod\":{\"description\":\"The replacement method.\",\"enum\":[\"IMAGE_REPLACE_METHOD_UNSPECIFIED\",\"CENTER_CROP\"],\"type\":\"string\"},\"tabId\":{\"description\":\"The tab that the image to be replaced is in.\",\"type\":\"string\"},\"uri\":{\"description\":\"The URI of the new image.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_ReplaceNamedRangeContentRequest\":{\"description\":\"Replaces the contents of the specified NamedRange or NamedRanges with the given replacement content.\",\"properties\":{\"namedRangeId\":{\"description\":\"The ID of the named range whose content will be replaced.\",\"type\":\"string\"},\"namedRangeName\":{\"description\":\"The name of the NamedRanges whose content will be replaced.\",\"type\":\"string\"},\"tabsCriteria\":{\"description\":\"Optional.\",\"$ref\":\"#/$defs/Input_TabsCriteria\"},\"text\":{\"description\":\"Replaces the content of the specified named range(s) with the given text.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_UnmergeTableCellsRequest\":{\"description\":\"Unmerges cells in a Table.\",\"properties\":{\"tableRange\":{\"description\":\"The table range specifying which cells of the table to unmerge.\",\"$ref\":\"#/$defs/Input_TableRange\"}},\"type\":\"object\"},\"Input_UpdateCommentPostRequest\":{\"description\":\"Updates a Post in a CommentThread or SuggestionThread.\",\"properties\":{\"commentId\":{\"description\":\"The ID of the CommentThread which the post belongs to.\",\"type\":\"string\"},\"content\":{\"description\":\"The new text of the comment, as plain text.\",\"type\":\"string\"},\"postId\":{\"description\":\"The ID of the post being updated.\",\"type\":\"string\"},\"suggestionId\":{\"description\":\"The ID of the SuggestionThread which the post belongs to.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_UpdateDocumentStyleRequest\":{\"description\":\"Updates the DocumentStyle.\",\"properties\":{\"documentStyle\":{\"description\":\"The styles to set on the document.\",\"$ref\":\"#/$defs/Input_DocumentStyle\"},\"fields\":{\"description\":\"The fields that should be updated.\",\"format\":\"google-fieldmask\",\"type\":\"string\"},\"tabId\":{\"description\":\"The tab that contains the style to update.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DocumentStyle\":{\"description\":\"The style of the document.\",\"properties\":{\"background\":{\"description\":\"The background of the document.\",\"$ref\":\"#/$defs/Input_Background\"},\"defaultFooterId\":{\"description\":\"The ID of the default footer.\",\"type\":\"string\"},\"defaultHeaderId\":{\"description\":\"The ID of the default header.\",\"type\":\"string\"},\"documentFormat\":{\"description\":\"Specifies document-level format settings, such as the document mode (pages vs pageless).\",\"$ref\":\"#/$defs/Input_DocumentFormat\"},\"evenPageFooterId\":{\"description\":\"The ID of the footer used only for even pages.\",\"type\":\"string\"},\"evenPageHeaderId\":{\"description\":\"The ID of the header used only for even pages.\",\"type\":\"string\"},\"firstPageFooterId\":{\"description\":\"The ID of the footer used only for the first page.\",\"type\":\"string\"},\"firstPageHeaderId\":{\"description\":\"The ID of the header used only for the first page.\",\"type\":\"string\"},\"flipPageOrientation\":{\"description\":\"Optional.\",\"type\":\"boolean\"},\"marginBottom\":{\"description\":\"The bottom page margin.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"marginFooter\":{\"description\":\"The amount of space between the bottom of the page and the contents of the footer.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"marginHeader\":{\"description\":\"The amount of space between the top of the page and the contents of the header.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"marginLeft\":{\"description\":\"The left page margin.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"marginRight\":{\"description\":\"The right page margin.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"marginTop\":{\"description\":\"The top page margin.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"pageNumberStart\":{\"description\":\"The page number from which to start counting the number of pages.\",\"format\":\"int32\",\"type\":\"integer\"},\"pageSize\":{\"description\":\"The size of a page in the document.\",\"$ref\":\"#/$defs/Input_Size\"},\"useCustomHeaderFooterMargins\":{\"description\":\"Indicates whether DocumentStyle margin_header, SectionStyle margin_header and DocumentStyle margin_footer, SectionStyle margin_footer are respected.\",\"type\":\"boolean\"},\"useEvenPageHeaderFooter\":{\"description\":\"Indicates whether to use the even page header / footer IDs for the even pages.\",\"type\":\"boolean\"},\"useFirstPageHeaderFooter\":{\"description\":\"Indicates whether to use the first page header / footer IDs for the first page.\",\"type\":\"boolean\"}},\"type\":\"object\"},\"Input_Background\":{\"description\":\"Represents the background of a document.\",\"properties\":{\"color\":{\"description\":\"The background color.\",\"$ref\":\"#/$defs/Input_OptionalColor\"}},\"type\":\"object\"},\"Input_DocumentFormat\":{\"description\":\"Represents document-level format settings.\",\"properties\":{\"documentMode\":{\"description\":\"Whether the document has pages or is pageless.\",\"enum\":[\"DOCUMENT_MODE_UNSPECIFIED\",\"PAGES\",\"PAGELESS\"],\"type\":\"string\"}},\"type\":\"object\"},\"Input_UpdateDocumentTabPropertiesRequest\":{\"description\":\"Update the properties of a document tab.\",\"properties\":{\"fields\":{\"description\":\"The fields that should be updated.\",\"format\":\"google-fieldmask\",\"type\":\"string\"},\"tabProperties\":{\"description\":\"The tab properties to update.\",\"$ref\":\"#/$defs/Input_TabProperties\"}},\"type\":\"object\"},\"Input_UpdateDropdownDefinitionPropertiesRequest\":{\"description\":\"Updates the properties of a DropdownDefinition.\",\"properties\":{\"dropdownDefinitionId\":{\"description\":\"The ID of the DropdownDefinition to update.\",\"type\":\"string\"},\"dropdownDefinitionProperties\":{\"description\":\"The properties to update.\",\"$ref\":\"#/$defs/Input_DropdownDefinitionProperties\"},\"fields\":{\"description\":\"The fields that should be updated.\",\"format\":\"google-fieldmask\",\"type\":\"string\"},\"selectedOptionIdReplacements\":{\"additionalProperties\":{\"type\":\"string\"},\"description\":\"A map of option IDs to their replacements, used to automatically reassign orphaned Dropdown chips when an option is deleted.\",\"type\":\"object\"},\"tabId\":{\"description\":\"The ID of the tab that contains the dropdown definition to update.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_UpdateDropdownPropertiesRequest\":{\"description\":\"Updates the properties of a Dropdown.\",\"properties\":{\"dropdownId\":{\"description\":\"Required.\",\"type\":\"string\"},\"dropdownProperties\":{\"description\":\"The properties to update.\",\"$ref\":\"#/$defs/Input_DropdownProperties\"},\"fields\":{\"description\":\"The fields that should be updated.\",\"format\":\"google-fieldmask\",\"type\":\"string\"},\"tabId\":{\"description\":\"The ID of the tab that contains the dropdown to update.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_DropdownProperties\":{\"description\":\"Properties specific to a dropdown.\",\"properties\":{\"displayValue\":{\"description\":\"The human-readable display text of the currently selected item.\",\"type\":\"string\"},\"dropdownDefinitionId\":{\"description\":\"The ID of the DropdownDefinition that defines the options for this dropdown.\",\"type\":\"string\"},\"selectedOptionId\":{\"description\":\"The ID of the selected option in this dropdown.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_UpdateNamedStyleRequest\":{\"description\":\"Updates a named style.\",\"properties\":{\"fields\":{\"description\":\"The NamedStyle fields that should be updated.\",\"format\":\"google-fieldmask\",\"type\":\"string\"},\"namedStyle\":{\"description\":\"The document style to update.\",\"$ref\":\"#/$defs/Input_NamedStyle\"},\"tabId\":{\"description\":\"The document tab to update.\",\"type\":\"string\"}},\"type\":\"object\"},\"Input_NamedStyle\":{\"description\":\"A named style.\",\"properties\":{\"namedStyleType\":{\"description\":\"The type of this named style.\",\"enum\":[\"NAMED_STYLE_TYPE_UNSPECIFIED\",\"NORMAL_TEXT\",\"TITLE\",\"SUBTITLE\",\"HEADING_1\",\"HEADING_2\",\"HEADING_3\",\"HEADING_4\",\"HEADING_5\",\"HEADING_6\"],\"type\":\"string\"},\"paragraphStyle\":{\"description\":\"The paragraph style of this named style.\",\"$ref\":\"#/$defs/Input_ParagraphStyle\"},\"textStyle\":{\"description\":\"The text style of this named style.\",\"$ref\":\"#/$defs/Input_TextStyle\"}},\"type\":\"object\"},\"Input_ParagraphStyle\":{\"description\":\"Styles that apply to a whole paragraph.\",\"properties\":{\"alignment\":{\"description\":\"The text alignment for this paragraph.\",\"enum\":[\"ALIGNMENT_UNSPECIFIED\",\"START\",\"CENTER\",\"END\",\"JUSTIFIED\"],\"type\":\"string\"},\"avoidWidowAndOrphan\":{\"description\":\"Whether to avoid widows and orphans for the paragraph.\",\"type\":\"boolean\"},\"borderBetween\":{\"description\":\"The border between this paragraph and the next and previous paragraphs.\",\"$ref\":\"#/$defs/Input_ParagraphBorder\"},\"borderBottom\":{\"description\":\"The border at the bottom of this paragraph.\",\"$ref\":\"#/$defs/Input_ParagraphBorder\"},\"borderLeft\":{\"description\":\"The border to the left of this paragraph.\",\"$ref\":\"#/$defs/Input_ParagraphBorder\"},\"borderRight\":{\"description\":\"The border to the right of this paragraph.\",\"$ref\":\"#/$defs/Input_ParagraphBorder\"},\"borderTop\":{\"description\":\"The border at the top of this paragraph.\",\"$ref\":\"#/$defs/Input_ParagraphBorder\"},\"direction\":{\"description\":\"The text direction of this paragraph.\",\"enum\":[\"CONTENT_DIRECTION_UNSPECIFIED\",\"LEFT_TO_RIGHT\",\"RIGHT_TO_LEFT\"],\"type\":\"string\"},\"headingId\":{\"description\":\"The heading ID of the paragraph.\",\"type\":\"string\"},\"indentEnd\":{\"description\":\"The amount of indentation for the paragraph on the side that corresponds to the end of the text, based on the current paragraph direction.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"indentFirstLine\":{\"description\":\"The amount of indentation for the first line of the paragraph.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"indentStart\":{\"description\":\"The amount of indentation for the paragraph on the side that corresponds to the start of the text, based on the current paragraph direction.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"keepLinesTogether\":{\"description\":\"Whether all lines of the paragraph should be laid out on the same page or column if possible.\",\"type\":\"boolean\"},\"keepWithNext\":{\"description\":\"Whether at least a part of this paragraph should be laid out on the same page or column as the next paragraph if possible.\",\"type\":\"boolean\"},\"lineSpacing\":{\"description\":\"The amount of space between lines, as a percentage of normal, where normal is represented as 100.0.\",\"format\":\"float\",\"type\":\"number\"},\"namedStyleType\":{\"description\":\"The named style type of the paragraph.\",\"enum\":[\"NAMED_STYLE_TYPE_UNSPECIFIED\",\"NORMAL_TEXT\",\"TITLE\",\"SUBTITLE\",\"HEADING_1\",\"HEADING_2\",\"HEADING_3\",\"HEADING_4\",\"HEADING_5\",\"HEADING_6\"],\"type\":\"string\"},\"pageBreakBefore\":{\"description\":\"Whether the current paragraph should always start at the beginning of a page.\",\"type\":\"boolean\"},\"shading\":{\"description\":\"The shading of the paragraph.\",\"$ref\":\"#/$defs/Input_Shading\"},\"spaceAbove\":{\"description\":\"The amount of extra space above the paragraph.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"spaceBelow\":{\"description\":\"The amount of extra space below the paragraph.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"spacingMode\":{\"description\":\"The spacing mode for the paragraph.\",\"enum\":[\"SPACING_MODE_UNSPECIFIED\",\"NEVER_COLLAPSE\",\"COLLAPSE_LISTS\"],\"type\":\"string\"},\"tabStops\":{\"description\":\"A list of the tab stops for this paragraph.\",\"items\":{\"$ref\":\"#/$defs/Input_TabStop\"},\"type\":\"array\"}},\"type\":\"object\"},\"Input_ParagraphBorder\":{\"description\":\"A border around a paragraph.\",\"properties\":{\"color\":{\"description\":\"The color of the border.\",\"$ref\":\"#/$defs/Input_OptionalColor\"},\"dashStyle\":{\"description\":\"The dash style of the border.\",\"enum\":[\"DASH_STYLE_UNSPECIFIED\",\"SOLID\",\"DOT\",\"DASH\"],\"type\":\"string\"},\"padding\":{\"description\":\"The padding of the border.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"width\":{\"description\":\"The width of the border.\",\"$ref\":\"#/$defs/Input_Dimension\"}},\"type\":\"object\"},\"Input_Shading\":{\"description\":\"The shading of a paragraph.\",\"properties\":{\"backgroundColor\":{\"description\":\"The background color of this paragraph shading.\",\"$ref\":\"#/$defs/Input_OptionalColor\"}},\"type\":\"object\"},\"Input_TabStop\":{\"description\":\"A tab stop within a paragraph.\",\"properties\":{\"alignment\":{\"description\":\"The alignment of this tab stop.\",\"enum\":[\"TAB_STOP_ALIGNMENT_UNSPECIFIED\",\"START\",\"CENTER\",\"END\"],\"type\":\"string\"},\"offset\":{\"description\":\"The offset between this tab stop and the start margin.\",\"$ref\":\"#/$defs/Input_Dimension\"}},\"type\":\"object\"},\"Input_UpdateParagraphStyleRequest\":{\"description\":\"Update the styling of all paragraphs that overlap with the given range.\",\"properties\":{\"fields\":{\"description\":\"The fields that should be updated.\",\"format\":\"google-fieldmask\",\"type\":\"string\"},\"paragraphStyle\":{\"description\":\"The styles to set on the paragraphs.\",\"$ref\":\"#/$defs/Input_ParagraphStyle\"},\"range\":{\"description\":\"The range overlapping the paragraphs to style.\",\"$ref\":\"#/$defs/Input_Range\"}},\"type\":\"object\"},\"Input_UpdateSectionStyleRequest\":{\"description\":\"Updates the SectionStyle.\",\"properties\":{\"fields\":{\"description\":\"The fields that should be updated.\",\"format\":\"google-fieldmask\",\"type\":\"string\"},\"range\":{\"description\":\"The range overlapping the sections to style.\",\"$ref\":\"#/$defs/Input_Range\"},\"sectionStyle\":{\"description\":\"The styles to be set on the section.\",\"$ref\":\"#/$defs/Input_SectionStyle\"}},\"type\":\"object\"},\"Input_SectionStyle\":{\"description\":\"The styling that applies to a section.\",\"properties\":{\"columnProperties\":{\"description\":\"The section's columns properties.\",\"items\":{\"$ref\":\"#/$defs/Input_SectionColumnProperties\"},\"type\":\"array\"},\"columnSeparatorStyle\":{\"description\":\"The style of column separators.\",\"enum\":[\"COLUMN_SEPARATOR_STYLE_UNSPECIFIED\",\"NONE\",\"BETWEEN_EACH_COLUMN\"],\"type\":\"string\"},\"contentDirection\":{\"description\":\"The content direction of this section.\",\"enum\":[\"CONTENT_DIRECTION_UNSPECIFIED\",\"LEFT_TO_RIGHT\",\"RIGHT_TO_LEFT\"],\"type\":\"string\"},\"defaultFooterId\":{\"description\":\"The ID of the default footer.\",\"type\":\"string\"},\"defaultHeaderId\":{\"description\":\"The ID of the default header.\",\"type\":\"string\"},\"evenPageFooterId\":{\"description\":\"The ID of the footer used only for even pages.\",\"type\":\"string\"},\"evenPageHeaderId\":{\"description\":\"The ID of the header used only for even pages.\",\"type\":\"string\"},\"firstPageFooterId\":{\"description\":\"The ID of the footer used only for the first page of the section.\",\"type\":\"string\"},\"firstPageHeaderId\":{\"description\":\"The ID of the header used only for the first page of the section.\",\"type\":\"string\"},\"flipPageOrientation\":{\"description\":\"Optional.\",\"type\":\"boolean\"},\"marginBottom\":{\"description\":\"The bottom page margin of the section.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"marginFooter\":{\"description\":\"The footer margin of the section.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"marginHeader\":{\"description\":\"The header margin of the section.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"marginLeft\":{\"description\":\"The left page margin of the section.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"marginRight\":{\"description\":\"The right page margin of the section.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"marginTop\":{\"description\":\"The top page margin of the section.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"pageNumberStart\":{\"description\":\"The page number from which to start counting the number of pages for this section.\",\"format\":\"int32\",\"type\":\"integer\"},\"useFirstPageHeaderFooter\":{\"description\":\"Indicates whether to use the first page header / footer IDs for the first page of the section.\",\"type\":\"boolean\"}},\"type\":\"object\"},\"Input_SectionColumnProperties\":{\"description\":\"Properties that apply to a section's column.\",\"properties\":{\"paddingEnd\":{\"description\":\"The padding at the end of the column.\",\"$ref\":\"#/$defs/Input_Dimension\"}},\"type\":\"object\"},\"Input_UpdateTableCellStyleRequest\":{\"description\":\"Updates the style of a range of table cells.\",\"properties\":{\"fields\":{\"description\":\"The fields that should be updated.\",\"format\":\"google-fieldmask\",\"type\":\"string\"},\"tableCellStyle\":{\"description\":\"The style to set on the table cells.\",\"$ref\":\"#/$defs/Input_TableCellStyle\"},\"tableRange\":{\"description\":\"The table range representing the subset of the table to which the updates are applied.\",\"$ref\":\"#/$defs/Input_TableRange\"},\"tableStartLocation\":{\"description\":\"The location where the table starts in the document.\",\"$ref\":\"#/$defs/Input_Location\"}},\"type\":\"object\"},\"Input_TableCellStyle\":{\"description\":\"The style of a TableCell.\",\"properties\":{\"backgroundColor\":{\"description\":\"The background color of the cell.\",\"$ref\":\"#/$defs/Input_OptionalColor\"},\"borderBottom\":{\"description\":\"The bottom border of the cell.\",\"$ref\":\"#/$defs/Input_TableCellBorder\"},\"borderLeft\":{\"description\":\"The left border of the cell.\",\"$ref\":\"#/$defs/Input_TableCellBorder\"},\"borderRight\":{\"description\":\"The right border of the cell.\",\"$ref\":\"#/$defs/Input_TableCellBorder\"},\"borderTop\":{\"description\":\"The top border of the cell.\",\"$ref\":\"#/$defs/Input_TableCellBorder\"},\"columnSpan\":{\"description\":\"The column span of the cell.\",\"format\":\"int32\",\"type\":\"integer\"},\"contentAlignment\":{\"description\":\"The alignment of the content in the table cell.\",\"enum\":[\"CONTENT_ALIGNMENT_UNSPECIFIED\",\"CONTENT_ALIGNMENT_UNSUPPORTED\",\"TOP\",\"MIDDLE\",\"BOTTOM\"],\"type\":\"string\"},\"paddingBottom\":{\"description\":\"The bottom padding of the cell.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"paddingLeft\":{\"description\":\"The left padding of the cell.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"paddingRight\":{\"description\":\"The right padding of the cell.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"paddingTop\":{\"description\":\"The top padding of the cell.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"rowSpan\":{\"description\":\"The row span of the cell.\",\"format\":\"int32\",\"type\":\"integer\"}},\"type\":\"object\"},\"Input_TableCellBorder\":{\"description\":\"A border around a table cell.\",\"properties\":{\"color\":{\"description\":\"The color of the border.\",\"$ref\":\"#/$defs/Input_OptionalColor\"},\"dashStyle\":{\"description\":\"The dash style of the border.\",\"enum\":[\"DASH_STYLE_UNSPECIFIED\",\"SOLID\",\"DOT\",\"DASH\"],\"type\":\"string\"},\"width\":{\"description\":\"The width of the border.\",\"$ref\":\"#/$defs/Input_Dimension\"}},\"type\":\"object\"},\"Input_UpdateTableColumnPropertiesRequest\":{\"description\":\"Updates the TableColumnProperties of columns in a table.\",\"properties\":{\"columnIndices\":{\"description\":\"The list of zero-based column indices whose property should be updated.\",\"items\":{\"format\":\"int32\",\"type\":\"integer\"},\"type\":\"array\"},\"fields\":{\"description\":\"The fields that should be updated.\",\"format\":\"google-fieldmask\",\"type\":\"string\"},\"tableColumnProperties\":{\"description\":\"The table column properties to update.\",\"$ref\":\"#/$defs/Input_TableColumnProperties\"},\"tableStartLocation\":{\"description\":\"The location where the table starts in the document.\",\"$ref\":\"#/$defs/Input_Location\"}},\"type\":\"object\"},\"Input_TableColumnProperties\":{\"description\":\"The properties of a column in a table.\",\"properties\":{\"width\":{\"description\":\"The width of the column.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"widthType\":{\"description\":\"The width type of the column.\",\"enum\":[\"WIDTH_TYPE_UNSPECIFIED\",\"EVENLY_DISTRIBUTED\",\"FIXED_WIDTH\"],\"type\":\"string\"}},\"type\":\"object\"},\"Input_UpdateTableRowStyleRequest\":{\"description\":\"Updates the TableRowStyle of rows in a table.\",\"properties\":{\"fields\":{\"description\":\"The fields that should be updated.\",\"format\":\"google-fieldmask\",\"type\":\"string\"},\"rowIndices\":{\"description\":\"The list of zero-based row indices whose style should be updated.\",\"items\":{\"format\":\"int32\",\"type\":\"integer\"},\"type\":\"array\"},\"tableRowStyle\":{\"description\":\"The styles to be set on the rows.\",\"$ref\":\"#/$defs/Input_TableRowStyle\"},\"tableStartLocation\":{\"description\":\"The location where the table starts in the document.\",\"$ref\":\"#/$defs/Input_Location\"}},\"type\":\"object\"},\"Input_TableRowStyle\":{\"description\":\"Styles that apply to a table row.\",\"properties\":{\"minRowHeight\":{\"description\":\"The minimum height of the row.\",\"$ref\":\"#/$defs/Input_Dimension\"},\"preventOverflow\":{\"description\":\"Whether the row cannot overflow across page or column boundaries.\",\"type\":\"boolean\"},\"tableHeader\":{\"description\":\"Whether the row is a table header.\",\"type\":\"boolean\"}},\"type\":\"object\"},\"Input_UpdateTextStyleRequest\":{\"description\":\"Update the styling of text.\",\"properties\":{\"fields\":{\"description\":\"The fields that should be updated.\",\"format\":\"google-fieldmask\",\"type\":\"string\"},\"range\":{\"description\":\"The range of text to style.\",\"$ref\":\"#/$defs/Input_Range\"},\"textStyle\":{\"description\":\"The styles to set on the text.\",\"$ref\":\"#/$defs/Input_TextStyle\"}},\"type\":\"object\"},\"Input_WriteControl\":{\"description\":\"Provides control over how write requests are executed.\",\"properties\":{\"requiredRevisionId\":{\"description\":\"The optional revision ID of the document the write request is applied to.\",\"type\":\"string\"},\"targetRevisionId\":{\"description\":\"The optional target revision ID of the document the write request is applied to.\",\"type\":\"string\"},\"writeMode\":{\"description\":\"How the request updates should be applied to the document.\",\"enum\":[\"WRITE_MODE_UNSPECIFIED\",\"EDIT\",\"SUGGEST\"],\"type\":\"string\"}},\"type\":\"object\"}},\"roots\":[{\"$ref\":\"#/$defs/Input_Document\"},null,{\"$ref\":\"#/$defs/Input_BatchUpdateDocumentRequest\"}]}",
|
|
16
|
+
}, { "length": 4078, "definitions": "[]", "parameters": ["[\"prettyPrint\",\"query\",0,{\"t\":\"boolean\"},\"Returns response with indentations and line breaks.\"]", "[\"fields\",\"query\",0,{\"t\":\"string\"},\"Selector specifying which fields to include in a partial response.\"]", "[\"commentsViewMode\",\"query\",0,{\"t\":\"string\",\"e\":[\"COMMENTS_VIEW_MODE_UNSPECIFIED\",\"COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS\",\"COMMENTS_VIEW_MODE_OMITTED\",\"COMMENTS_VIEW_MODE_INCLUDED\"]},\"The comments view mode to apply to the document.\"]", "[\"suggestionsViewMode\",\"query\",0,{\"t\":\"string\",\"e\":[\"DEFAULT_FOR_CURRENT_ACCESS\",\"SUGGESTIONS_INLINE\",\"PREVIEW_SUGGESTIONS_ACCEPTED\",\"PREVIEW_WITHOUT_SUGGESTIONS\"]},\"The suggestions view mode to apply to the document.\"]", "[\"includeTabsContent\",\"query\",0,{\"t\":\"boolean\"},\"Whether to populate the `Document.tabs` field instead of the text content fields like `body` and `documentStyle` on `Document`.\"]", "[\"documentId\",\"path\",1,{\"t\":\"string\"},\"The ID of the document to retrieve.\"]", "[\"documentId\",\"path\",1,{\"t\":\"string\"},\"The ID of the document to update.\"]"], "operations": [[[0, 1], "[\"application/json\",{\"t\":\"object\",\"p\":{\"title\":{\"t\":\"string\",\"d\":\"The title of the document.\"}}},1]"], [[0, 1, 2, 3, 4, 5], "0"], [[0, 1, 6], "[\"application/json\",{\"t\":\"object\",\"p\":{\"requests\":{\"t\":\"array\",\"d\":\"A list of updates to apply to the document.\",\"i\":{\"t\":\"object\",\"p\":{\"acceptSuggestion\":{\"t\":\"object\",\"x\":1},\"addCommentReply\":{\"t\":\"object\",\"x\":1},\"addDocumentTab\":{\"t\":\"object\",\"x\":1},\"createDropdownDefinition\":{\"t\":\"object\",\"x\":1},\"createFooter\":{\"t\":\"object\",\"x\":1},\"createFootnote\":{\"t\":\"object\",\"x\":1},\"createHeader\":{\"t\":\"object\",\"x\":1},\"createNamedRange\":{\"t\":\"object\",\"x\":1},\"createParagraphBullets\":{\"t\":\"object\",\"x\":1},\"deleteComment\":{\"t\":\"object\",\"x\":1},\"deleteCommentReply\":{\"t\":\"object\",\"x\":1},\"deleteContentRange\":{\"t\":\"object\",\"x\":1},\"deleteDropdownDefinition\":{\"t\":\"object\",\"x\":1},\"deleteFooter\":{\"t\":\"object\",\"x\":1},\"deleteHeader\":{\"t\":\"object\",\"x\":1},\"deleteNamedRange\":{\"t\":\"object\",\"x\":1},\"deleteParagraphBullets\":{\"t\":\"object\",\"x\":1},\"deletePositionedObject\":{\"t\":\"object\",\"x\":1},\"deleteSuggestion\":{\"t\":\"object\",\"x\":1},\"deleteTab\":{\"t\":\"object\",\"x\":1},\"deleteTableColumn\":{\"t\":\"object\",\"x\":1},\"deleteTableRow\":{\"t\":\"object\",\"x\":1},\"insertComment\":{\"t\":\"object\",\"x\":1},\"insertDate\":{\"t\":\"object\",\"x\":1},\"insertDropdown\":{\"t\":\"object\",\"x\":1},\"insertInlineImage\":{\"t\":\"object\",\"x\":1},\"insertPageBreak\":{\"t\":\"object\",\"x\":1},\"insertPerson\":{\"t\":\"object\",\"x\":1},\"insertRichLink\":{\"t\":\"object\",\"x\":1},\"insertSectionBreak\":{\"t\":\"object\",\"x\":1},\"insertTable\":{\"t\":\"object\",\"x\":1},\"insertTableColumn\":{\"t\":\"object\",\"x\":1},\"insertTableRow\":{\"t\":\"object\",\"x\":1},\"insertText\":{\"t\":\"object\",\"x\":1},\"mergeTableCells\":{\"t\":\"object\",\"x\":1},\"pinTableHeaderRows\":{\"t\":\"object\",\"x\":1},\"rejectSuggestion\":{\"t\":\"object\",\"x\":1},\"replaceAllText\":{\"t\":\"object\",\"x\":1},\"replaceImage\":{\"t\":\"object\",\"x\":1},\"replaceNamedRangeContent\":{\"t\":\"object\",\"x\":1},\"unmergeTableCells\":{\"t\":\"object\",\"x\":1},\"updateCommentPost\":{\"t\":\"object\",\"x\":1},\"updateDocumentStyle\":{\"t\":\"object\",\"x\":1},\"updateDocumentTabProperties\":{\"t\":\"object\",\"x\":1},\"updateDropdownDefinitionProperties\":{\"t\":\"object\",\"x\":1},\"updateDropdownProperties\":{\"t\":\"object\",\"x\":1},\"updateNamedStyle\":{\"t\":\"object\",\"x\":1},\"updateParagraphStyle\":{\"t\":\"object\",\"x\":1},\"updateSectionStyle\":{\"t\":\"object\",\"x\":1},\"updateTableCellStyle\":{\"t\":\"object\",\"x\":1},\"updateTableColumnProperties\":{\"t\":\"object\",\"x\":1},\"updateTableRowStyle\":{\"t\":\"object\",\"x\":1},\"updateTextStyle\":{\"t\":\"object\",\"x\":1}}}},\"writeControl\":{\"t\":\"object\",\"d\":\"Provides control over how write requests are executed.\",\"p\":{\"requiredRevisionId\":{\"t\":\"string\"},\"targetRevisionId\":{\"t\":\"string\"},\"writeMode\":{\"t\":\"string\",\"e\":[\"WRITE_MODE_UNSPECIFIED\",\"EDIT\",\"SUGGEST\"]}}}}},1]"]] });
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { RequestSecrets } from "../../http/services.js";
|
|
3
|
+
import { googleSafety } from "../_shared/google/kit.js";
|
|
4
|
+
/** ImageProperties.contentUri delegates the requester's image access for 30 minutes.
|
|
5
|
+
* Keep ordinary authored links/sourceUri, but withhold that vendor capability on
|
|
6
|
+
* every document response, including tabs, headers and suggested image changes.
|
|
7
|
+
*/
|
|
8
|
+
export function docsSafety(operations) {
|
|
9
|
+
const base = googleSafety("Google Docs", operations);
|
|
10
|
+
return {
|
|
11
|
+
...base,
|
|
12
|
+
reviewed: {
|
|
13
|
+
...base.reviewed,
|
|
14
|
+
redact: (data) => {
|
|
15
|
+
const visit = (value) => {
|
|
16
|
+
if (Array.isArray(value))
|
|
17
|
+
return value.map(visit);
|
|
18
|
+
if (!value || typeof value !== "object")
|
|
19
|
+
return value;
|
|
20
|
+
return Object.fromEntries(Object.entries(value).map(([key, child]) => [
|
|
21
|
+
key,
|
|
22
|
+
key === "imageProperties" && child && typeof child === "object" && !Array.isArray(child)
|
|
23
|
+
? Object.fromEntries(Object.entries(child).map(([field, item]) => [
|
|
24
|
+
field,
|
|
25
|
+
field === "contentUri" ? "[redacted]" : visit(item),
|
|
26
|
+
]))
|
|
27
|
+
: visit(child),
|
|
28
|
+
]));
|
|
29
|
+
};
|
|
30
|
+
return visit(data);
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/** Check the source lane across runs/paragraphs before either rendering or
|
|
36
|
+
* hatch selection can split an echoed secret into individually short values. */
|
|
37
|
+
export const docsResult = (data) => RequestSecrets.use((secrets) => Effect.sync(() => {
|
|
38
|
+
const runs = [];
|
|
39
|
+
const visit = (value) => {
|
|
40
|
+
if (!value || typeof value !== "object")
|
|
41
|
+
return;
|
|
42
|
+
const run = value["textRun"];
|
|
43
|
+
if (run && typeof run === "object" && typeof run["content"] === "string")
|
|
44
|
+
runs.push(run);
|
|
45
|
+
for (const child of Object.values(value))
|
|
46
|
+
visit(child);
|
|
47
|
+
};
|
|
48
|
+
visit(data);
|
|
49
|
+
const safe = secrets.parts(runs.map((run) => run["content"]));
|
|
50
|
+
runs.forEach((run, index) => {
|
|
51
|
+
run["content"] = safe[index];
|
|
52
|
+
});
|
|
53
|
+
return data;
|
|
54
|
+
}));
|