mcp-google-multi 5.4.1-alpha.2 → 6.0.0-alpha.2
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/README.md +21 -16
- package/dist/accounts.d.ts +44 -5
- package/dist/accounts.js +267 -25
- package/dist/auth.d.ts +11 -4
- package/dist/auth.js +85 -78
- package/dist/client-config.d.ts +90 -0
- package/dist/client-config.js +282 -0
- package/dist/client.js +10 -4
- package/dist/config-file.d.ts +38 -0
- package/dist/config-file.js +117 -0
- package/dist/discover.js +57 -3
- package/dist/doctor.d.ts +86 -0
- package/dist/doctor.js +384 -0
- package/dist/env-load.d.ts +11 -0
- package/dist/env-load.js +52 -0
- package/dist/executor.d.ts +2 -0
- package/dist/executor.js +2 -1
- package/dist/fanout.js +8 -5
- package/dist/fs-atomic.d.ts +3 -0
- package/dist/fs-atomic.js +123 -0
- package/dist/http-config.d.ts +35 -0
- package/dist/http-config.js +113 -0
- package/dist/http-transport.d.ts +59 -0
- package/dist/http-transport.js +269 -0
- package/dist/identity.d.ts +24 -0
- package/dist/identity.js +19 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +199 -18
- package/dist/master-key.d.ts +53 -0
- package/dist/master-key.js +242 -0
- package/dist/mcp-token.d.ts +81 -0
- package/dist/mcp-token.js +176 -0
- package/dist/migrate-config.d.ts +7 -0
- package/dist/migrate-config.js +103 -0
- package/dist/migrate-tokens.js +4 -3
- package/dist/net-tuning.d.ts +8 -0
- package/dist/net-tuning.js +25 -0
- package/dist/oauth-as.d.ts +52 -0
- package/dist/oauth-as.js +457 -0
- package/dist/oauth-consent.d.ts +28 -0
- package/dist/oauth-consent.js +109 -0
- package/dist/open-url.d.ts +1 -0
- package/dist/open-url.js +30 -0
- package/dist/reauth-hint.d.ts +2 -0
- package/dist/reauth-hint.js +15 -0
- package/dist/registry-transfer.d.ts +41 -0
- package/dist/registry-transfer.js +219 -0
- package/dist/registry.d.ts +27 -1
- package/dist/registry.js +117 -6
- package/dist/scope-catalog.d.ts +19 -0
- package/dist/scope-catalog.js +182 -0
- package/dist/scope-observability.d.ts +78 -0
- package/dist/scope-observability.js +192 -0
- package/dist/services.js +1 -1
- package/dist/setup-prompt.d.ts +9 -0
- package/dist/setup-prompt.js +59 -0
- package/dist/ssrf-guard.d.ts +48 -0
- package/dist/ssrf-guard.js +242 -0
- package/dist/token-store.js +23 -125
- package/dist/tools/_errors.d.ts +8 -2
- package/dist/tools/_errors.js +97 -6
- package/dist/tools/account-wizard.d.ts +33 -0
- package/dist/tools/account-wizard.js +284 -0
- package/dist/tools/accounts-tool.d.ts +8 -5
- package/dist/tools/accounts-tool.js +38 -15
- package/dist/tools/admin.js +2 -2
- package/dist/tools/calendar.js +2 -2
- package/dist/tools/chat.js +2 -2
- package/dist/tools/contacts.d.ts +40 -0
- package/dist/tools/contacts.js +135 -2
- package/dist/tools/docs.d.ts +3 -0
- package/dist/tools/docs.js +60 -9
- package/dist/tools/drive.d.ts +3 -0
- package/dist/tools/drive.js +60 -8
- package/dist/tools/forms.js +4 -2
- package/dist/tools/generated/_shared.d.ts +1 -3
- package/dist/tools/generated/_shared.js +3 -3
- package/dist/tools/generated/admin.js +175 -132
- package/dist/tools/generated/appsmarket.js +6 -2
- package/dist/tools/generated/calendar.js +45 -27
- package/dist/tools/generated/chat.js +81 -47
- package/dist/tools/generated/classroom.js +131 -104
- package/dist/tools/generated/cloudidentity.js +73 -61
- package/dist/tools/generated/cloudsearch.js +59 -49
- package/dist/tools/generated/contacts.js +22 -14
- package/dist/tools/generated/drive.js +51 -35
- package/dist/tools/generated/driveactivity.js +5 -1
- package/dist/tools/generated/drivelabels.js +30 -25
- package/dist/tools/generated/forms.js +7 -3
- package/dist/tools/generated/gmail.js +73 -58
- package/dist/tools/generated/groupsmigration.js +5 -1
- package/dist/tools/generated/groupssettings.js +7 -3
- package/dist/tools/generated/keep.js +12 -7
- package/dist/tools/generated/licensing.js +11 -7
- package/dist/tools/generated/meet.js +20 -13
- package/dist/tools/generated/postmaster.js +8 -4
- package/dist/tools/generated/reseller.js +22 -17
- package/dist/tools/generated/script.js +26 -16
- package/dist/tools/generated/sheets.js +11 -7
- package/dist/tools/generated/tasks.js +6 -2
- package/dist/tools/generated/vault.js +38 -33
- package/dist/tools/generated/workspaceevents.js +12 -7
- package/dist/tools/gmail-mime.d.ts +38 -8
- package/dist/tools/gmail-mime.js +75 -71
- package/dist/tools/gmail.d.ts +31 -0
- package/dist/tools/gmail.js +483 -99
- package/dist/tools/google-api.js +7 -4
- package/dist/tools/meet.js +2 -2
- package/dist/tools/searchconsole.js +2 -2
- package/dist/tools/sheets.js +6 -2
- package/dist/tools/slides.js +4 -2
- package/dist/tools/tasks.js +2 -2
- package/dist/types.d.ts +1 -1
- package/dist/write-control.d.ts +24 -1
- package/dist/write-control.js +26 -1
- package/package.json +26 -7
|
@@ -3,11 +3,16 @@ import { z } from 'zod';
|
|
|
3
3
|
import { coerceBoolean, coerceJson } from '../_coerce.js';
|
|
4
4
|
import { accountField, registerGeneratedTool } from './_shared.js';
|
|
5
5
|
export function registerVaultGeneratedTools(registry) {
|
|
6
|
+
// Interned method scope sets (shared across tools; see scope-observability).
|
|
7
|
+
const S_vault_v1 = [
|
|
8
|
+
["https://www.googleapis.com/auth/ediscovery"],
|
|
9
|
+
["https://www.googleapis.com/auth/ediscovery", "https://www.googleapis.com/auth/ediscovery.readonly"],
|
|
10
|
+
];
|
|
6
11
|
registerGeneratedTool(registry, {
|
|
7
12
|
name: "vault_matters_add_permissions",
|
|
8
13
|
cud: "create",
|
|
9
14
|
description: "Adds an account as a matter collaborator.",
|
|
10
|
-
method: { id: "vault.matters.addPermissions", httpMethod: "POST", path: "v1/matters/{matterId}:addPermissions", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
15
|
+
method: { id: "vault.matters.addPermissions", httpMethod: "POST", path: "v1/matters/{matterId}:addPermissions", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[0] },
|
|
11
16
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
12
17
|
hasBody: true,
|
|
13
18
|
shape: {
|
|
@@ -21,7 +26,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
21
26
|
name: "vault_matters_close",
|
|
22
27
|
cud: "create",
|
|
23
28
|
description: "Closes the specified matter. Returns the matter with updated state.",
|
|
24
|
-
method: { id: "vault.matters.close", httpMethod: "POST", path: "v1/matters/{matterId}:close", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
29
|
+
method: { id: "vault.matters.close", httpMethod: "POST", path: "v1/matters/{matterId}:close", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[0] },
|
|
25
30
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
26
31
|
hasBody: true,
|
|
27
32
|
shape: {
|
|
@@ -35,7 +40,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
35
40
|
name: "vault_matters_count",
|
|
36
41
|
cud: "read",
|
|
37
42
|
description: "Counts the accounts processed by the specified query.",
|
|
38
|
-
method: { id: "vault.matters.count", httpMethod: "POST", path: "v1/matters/{matterId}:count", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
43
|
+
method: { id: "vault.matters.count", httpMethod: "POST", path: "v1/matters/{matterId}:count", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[0] },
|
|
39
44
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
40
45
|
hasBody: true,
|
|
41
46
|
shape: {
|
|
@@ -49,7 +54,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
49
54
|
name: "vault_matters_create",
|
|
50
55
|
cud: "create",
|
|
51
56
|
description: "Creates a matter with the given name and description. The initial state is open, and the owner is the method caller. Returns the created matter with default vie",
|
|
52
|
-
method: { id: "vault.matters.create", httpMethod: "POST", path: "v1/matters", baseUrl: "https://vault.googleapis.com/", requiredParams: [] },
|
|
57
|
+
method: { id: "vault.matters.create", httpMethod: "POST", path: "v1/matters", baseUrl: "https://vault.googleapis.com/", requiredParams: [], scopes: S_vault_v1[0] },
|
|
53
58
|
params: [{ "field": "fields", "api": "fields", "location": "query" }],
|
|
54
59
|
hasBody: true,
|
|
55
60
|
shape: {
|
|
@@ -62,7 +67,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
62
67
|
name: "vault_matters_delete",
|
|
63
68
|
cud: "delete",
|
|
64
69
|
description: "Deletes the specified matter. Returns the matter with updated state.",
|
|
65
|
-
method: { id: "vault.matters.delete", httpMethod: "DELETE", path: "v1/matters/{matterId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
70
|
+
method: { id: "vault.matters.delete", httpMethod: "DELETE", path: "v1/matters/{matterId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[0] },
|
|
66
71
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
67
72
|
hasBody: false,
|
|
68
73
|
shape: {
|
|
@@ -75,7 +80,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
75
80
|
name: "vault_matters_exports_create",
|
|
76
81
|
cud: "create",
|
|
77
82
|
description: "Creates an export.",
|
|
78
|
-
method: { id: "vault.matters.exports.create", httpMethod: "POST", path: "v1/matters/{matterId}/exports", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
83
|
+
method: { id: "vault.matters.exports.create", httpMethod: "POST", path: "v1/matters/{matterId}/exports", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[0] },
|
|
79
84
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
80
85
|
hasBody: true,
|
|
81
86
|
shape: {
|
|
@@ -89,7 +94,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
89
94
|
name: "vault_matters_exports_delete",
|
|
90
95
|
cud: "delete",
|
|
91
96
|
description: "Deletes an export.",
|
|
92
|
-
method: { id: "vault.matters.exports.delete", httpMethod: "DELETE", path: "v1/matters/{matterId}/exports/{exportId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "exportId"] },
|
|
97
|
+
method: { id: "vault.matters.exports.delete", httpMethod: "DELETE", path: "v1/matters/{matterId}/exports/{exportId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "exportId"], scopes: S_vault_v1[0] },
|
|
93
98
|
params: [{ "field": "exportId", "api": "exportId", "location": "path" }, { "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
94
99
|
hasBody: false,
|
|
95
100
|
shape: {
|
|
@@ -103,7 +108,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
103
108
|
name: "vault_matters_exports_get",
|
|
104
109
|
cud: "read",
|
|
105
110
|
description: "Gets an export.",
|
|
106
|
-
method: { id: "vault.matters.exports.get", httpMethod: "GET", path: "v1/matters/{matterId}/exports/{exportId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "exportId"] },
|
|
111
|
+
method: { id: "vault.matters.exports.get", httpMethod: "GET", path: "v1/matters/{matterId}/exports/{exportId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "exportId"], scopes: S_vault_v1[1] },
|
|
107
112
|
params: [{ "field": "exportId", "api": "exportId", "location": "path" }, { "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
108
113
|
hasBody: false,
|
|
109
114
|
shape: {
|
|
@@ -117,7 +122,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
117
122
|
name: "vault_matters_exports_list",
|
|
118
123
|
cud: "read",
|
|
119
124
|
description: "Lists details about the exports in the specified matter.",
|
|
120
|
-
method: { id: "vault.matters.exports.list", httpMethod: "GET", path: "v1/matters/{matterId}/exports", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
125
|
+
method: { id: "vault.matters.exports.list", httpMethod: "GET", path: "v1/matters/{matterId}/exports", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[1] },
|
|
121
126
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
122
127
|
hasBody: false,
|
|
123
128
|
shape: {
|
|
@@ -132,7 +137,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
132
137
|
name: "vault_matters_get",
|
|
133
138
|
cud: "read",
|
|
134
139
|
description: "Gets the specified matter.",
|
|
135
|
-
method: { id: "vault.matters.get", httpMethod: "GET", path: "v1/matters/{matterId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
140
|
+
method: { id: "vault.matters.get", httpMethod: "GET", path: "v1/matters/{matterId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[1] },
|
|
136
141
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "view", "api": "view", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
137
142
|
hasBody: false,
|
|
138
143
|
shape: {
|
|
@@ -146,7 +151,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
146
151
|
name: "vault_matters_holds_accounts_create",
|
|
147
152
|
cud: "create",
|
|
148
153
|
description: "Adds an account to a hold. Accounts can be added only to a hold that does not have an organizational unit set. If you try to add an account to an organizational",
|
|
149
|
-
method: { id: "vault.matters.holds.accounts.create", httpMethod: "POST", path: "v1/matters/{matterId}/holds/{holdId}/accounts", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"] },
|
|
154
|
+
method: { id: "vault.matters.holds.accounts.create", httpMethod: "POST", path: "v1/matters/{matterId}/holds/{holdId}/accounts", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"], scopes: S_vault_v1[0] },
|
|
150
155
|
params: [{ "field": "holdId", "api": "holdId", "location": "path" }, { "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
151
156
|
hasBody: true,
|
|
152
157
|
shape: {
|
|
@@ -161,7 +166,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
161
166
|
name: "vault_matters_holds_accounts_delete",
|
|
162
167
|
cud: "delete",
|
|
163
168
|
description: "Removes an account from a hold.",
|
|
164
|
-
method: { id: "vault.matters.holds.accounts.delete", httpMethod: "DELETE", path: "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId", "accountId"] },
|
|
169
|
+
method: { id: "vault.matters.holds.accounts.delete", httpMethod: "DELETE", path: "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId", "accountId"], scopes: S_vault_v1[0] },
|
|
165
170
|
params: [{ "field": "accountId", "api": "accountId", "location": "path" }, { "field": "holdId", "api": "holdId", "location": "path" }, { "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
166
171
|
hasBody: false,
|
|
167
172
|
shape: {
|
|
@@ -176,7 +181,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
176
181
|
name: "vault_matters_holds_accounts_list",
|
|
177
182
|
cud: "read",
|
|
178
183
|
description: "Lists the accounts covered by a hold. This can list only individually-specified accounts covered by the hold. If the hold covers an organizational unit, use the",
|
|
179
|
-
method: { id: "vault.matters.holds.accounts.list", httpMethod: "GET", path: "v1/matters/{matterId}/holds/{holdId}/accounts", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"] },
|
|
184
|
+
method: { id: "vault.matters.holds.accounts.list", httpMethod: "GET", path: "v1/matters/{matterId}/holds/{holdId}/accounts", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"], scopes: S_vault_v1[1] },
|
|
180
185
|
params: [{ "field": "holdId", "api": "holdId", "location": "path" }, { "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
181
186
|
hasBody: false,
|
|
182
187
|
shape: {
|
|
@@ -190,7 +195,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
190
195
|
name: "vault_matters_holds_add_held_accounts",
|
|
191
196
|
cud: "create",
|
|
192
197
|
description: "Adds accounts to a hold. Returns a list of accounts that have been successfully added. Accounts can be added only to an existing account-based hold.",
|
|
193
|
-
method: { id: "vault.matters.holds.addHeldAccounts", httpMethod: "POST", path: "v1/matters/{matterId}/holds/{holdId}:addHeldAccounts", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"] },
|
|
198
|
+
method: { id: "vault.matters.holds.addHeldAccounts", httpMethod: "POST", path: "v1/matters/{matterId}/holds/{holdId}:addHeldAccounts", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"], scopes: S_vault_v1[0] },
|
|
194
199
|
params: [{ "field": "holdId", "api": "holdId", "location": "path" }, { "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
195
200
|
hasBody: true,
|
|
196
201
|
shape: {
|
|
@@ -205,7 +210,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
205
210
|
name: "vault_matters_holds_create",
|
|
206
211
|
cud: "create",
|
|
207
212
|
description: "Creates a hold in the specified matter.",
|
|
208
|
-
method: { id: "vault.matters.holds.create", httpMethod: "POST", path: "v1/matters/{matterId}/holds", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
213
|
+
method: { id: "vault.matters.holds.create", httpMethod: "POST", path: "v1/matters/{matterId}/holds", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[0] },
|
|
209
214
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
210
215
|
hasBody: true,
|
|
211
216
|
shape: {
|
|
@@ -219,7 +224,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
219
224
|
name: "vault_matters_holds_delete",
|
|
220
225
|
cud: "delete",
|
|
221
226
|
description: "Removes the specified hold and releases the accounts or organizational unit covered by the hold. If the data is not preserved by another hold or retention rule,",
|
|
222
|
-
method: { id: "vault.matters.holds.delete", httpMethod: "DELETE", path: "v1/matters/{matterId}/holds/{holdId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"] },
|
|
227
|
+
method: { id: "vault.matters.holds.delete", httpMethod: "DELETE", path: "v1/matters/{matterId}/holds/{holdId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"], scopes: S_vault_v1[0] },
|
|
223
228
|
params: [{ "field": "holdId", "api": "holdId", "location": "path" }, { "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
224
229
|
hasBody: false,
|
|
225
230
|
shape: {
|
|
@@ -233,7 +238,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
233
238
|
name: "vault_matters_holds_get",
|
|
234
239
|
cud: "read",
|
|
235
240
|
description: "Gets the specified hold.",
|
|
236
|
-
method: { id: "vault.matters.holds.get", httpMethod: "GET", path: "v1/matters/{matterId}/holds/{holdId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"] },
|
|
241
|
+
method: { id: "vault.matters.holds.get", httpMethod: "GET", path: "v1/matters/{matterId}/holds/{holdId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"], scopes: S_vault_v1[1] },
|
|
237
242
|
params: [{ "field": "holdId", "api": "holdId", "location": "path" }, { "field": "matterId", "api": "matterId", "location": "path" }, { "field": "view", "api": "view", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
238
243
|
hasBody: false,
|
|
239
244
|
shape: {
|
|
@@ -248,7 +253,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
248
253
|
name: "vault_matters_holds_list",
|
|
249
254
|
cud: "read",
|
|
250
255
|
description: "Lists the holds in a matter.",
|
|
251
|
-
method: { id: "vault.matters.holds.list", httpMethod: "GET", path: "v1/matters/{matterId}/holds", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
256
|
+
method: { id: "vault.matters.holds.list", httpMethod: "GET", path: "v1/matters/{matterId}/holds", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[1] },
|
|
252
257
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "view", "api": "view", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
253
258
|
hasBody: false,
|
|
254
259
|
shape: {
|
|
@@ -264,7 +269,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
264
269
|
name: "vault_matters_holds_remove_held_accounts",
|
|
265
270
|
cud: "delete",
|
|
266
271
|
description: "Removes the specified accounts from a hold. Returns a list of statuses in the same order as the request.",
|
|
267
|
-
method: { id: "vault.matters.holds.removeHeldAccounts", httpMethod: "POST", path: "v1/matters/{matterId}/holds/{holdId}:removeHeldAccounts", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"] },
|
|
272
|
+
method: { id: "vault.matters.holds.removeHeldAccounts", httpMethod: "POST", path: "v1/matters/{matterId}/holds/{holdId}:removeHeldAccounts", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"], scopes: S_vault_v1[0] },
|
|
268
273
|
params: [{ "field": "holdId", "api": "holdId", "location": "path" }, { "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
269
274
|
hasBody: true,
|
|
270
275
|
shape: {
|
|
@@ -279,7 +284,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
279
284
|
name: "vault_matters_holds_update",
|
|
280
285
|
cud: "update",
|
|
281
286
|
description: "Updates the scope (organizational unit or accounts) and query parameters of a hold. You cannot add accounts to a hold that covers an organizational unit, nor ca",
|
|
282
|
-
method: { id: "vault.matters.holds.update", httpMethod: "PUT", path: "v1/matters/{matterId}/holds/{holdId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"] },
|
|
287
|
+
method: { id: "vault.matters.holds.update", httpMethod: "PUT", path: "v1/matters/{matterId}/holds/{holdId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "holdId"], scopes: S_vault_v1[0] },
|
|
283
288
|
params: [{ "field": "holdId", "api": "holdId", "location": "path" }, { "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
284
289
|
hasBody: true,
|
|
285
290
|
shape: {
|
|
@@ -294,7 +299,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
294
299
|
name: "vault_matters_list",
|
|
295
300
|
cud: "read",
|
|
296
301
|
description: "Lists matters the requestor has access to.",
|
|
297
|
-
method: { id: "vault.matters.list", httpMethod: "GET", path: "v1/matters", baseUrl: "https://vault.googleapis.com/", requiredParams: [] },
|
|
302
|
+
method: { id: "vault.matters.list", httpMethod: "GET", path: "v1/matters", baseUrl: "https://vault.googleapis.com/", requiredParams: [], scopes: S_vault_v1[1] },
|
|
298
303
|
params: [{ "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "state", "api": "state", "location": "query" }, { "field": "view", "api": "view", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
299
304
|
hasBody: false,
|
|
300
305
|
shape: {
|
|
@@ -310,7 +315,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
310
315
|
name: "vault_matters_remove_permissions",
|
|
311
316
|
cud: "delete",
|
|
312
317
|
description: "Removes an account as a matter collaborator.",
|
|
313
|
-
method: { id: "vault.matters.removePermissions", httpMethod: "POST", path: "v1/matters/{matterId}:removePermissions", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
318
|
+
method: { id: "vault.matters.removePermissions", httpMethod: "POST", path: "v1/matters/{matterId}:removePermissions", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[0] },
|
|
314
319
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
315
320
|
hasBody: true,
|
|
316
321
|
shape: {
|
|
@@ -324,7 +329,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
324
329
|
name: "vault_matters_reopen",
|
|
325
330
|
cud: "create",
|
|
326
331
|
description: "Reopens the specified matter. Returns the matter with updated state.",
|
|
327
|
-
method: { id: "vault.matters.reopen", httpMethod: "POST", path: "v1/matters/{matterId}:reopen", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
332
|
+
method: { id: "vault.matters.reopen", httpMethod: "POST", path: "v1/matters/{matterId}:reopen", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[0] },
|
|
328
333
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
329
334
|
hasBody: true,
|
|
330
335
|
shape: {
|
|
@@ -338,7 +343,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
338
343
|
name: "vault_matters_saved_queries_create",
|
|
339
344
|
cud: "create",
|
|
340
345
|
description: "Creates a saved query.",
|
|
341
|
-
method: { id: "vault.matters.savedQueries.create", httpMethod: "POST", path: "v1/matters/{matterId}/savedQueries", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
346
|
+
method: { id: "vault.matters.savedQueries.create", httpMethod: "POST", path: "v1/matters/{matterId}/savedQueries", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[0] },
|
|
342
347
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
343
348
|
hasBody: true,
|
|
344
349
|
shape: {
|
|
@@ -352,7 +357,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
352
357
|
name: "vault_matters_saved_queries_delete",
|
|
353
358
|
cud: "delete",
|
|
354
359
|
description: "Deletes the specified saved query.",
|
|
355
|
-
method: { id: "vault.matters.savedQueries.delete", httpMethod: "DELETE", path: "v1/matters/{matterId}/savedQueries/{savedQueryId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "savedQueryId"] },
|
|
360
|
+
method: { id: "vault.matters.savedQueries.delete", httpMethod: "DELETE", path: "v1/matters/{matterId}/savedQueries/{savedQueryId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "savedQueryId"], scopes: S_vault_v1[0] },
|
|
356
361
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "savedQueryId", "api": "savedQueryId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
357
362
|
hasBody: false,
|
|
358
363
|
shape: {
|
|
@@ -366,7 +371,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
366
371
|
name: "vault_matters_saved_queries_get",
|
|
367
372
|
cud: "read",
|
|
368
373
|
description: "Retrieves the specified saved query.",
|
|
369
|
-
method: { id: "vault.matters.savedQueries.get", httpMethod: "GET", path: "v1/matters/{matterId}/savedQueries/{savedQueryId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "savedQueryId"] },
|
|
374
|
+
method: { id: "vault.matters.savedQueries.get", httpMethod: "GET", path: "v1/matters/{matterId}/savedQueries/{savedQueryId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId", "savedQueryId"], scopes: S_vault_v1[1] },
|
|
370
375
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "savedQueryId", "api": "savedQueryId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
371
376
|
hasBody: false,
|
|
372
377
|
shape: {
|
|
@@ -380,7 +385,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
380
385
|
name: "vault_matters_saved_queries_list",
|
|
381
386
|
cud: "read",
|
|
382
387
|
description: "Lists the saved queries in a matter.",
|
|
383
|
-
method: { id: "vault.matters.savedQueries.list", httpMethod: "GET", path: "v1/matters/{matterId}/savedQueries", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
388
|
+
method: { id: "vault.matters.savedQueries.list", httpMethod: "GET", path: "v1/matters/{matterId}/savedQueries", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[1] },
|
|
384
389
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
385
390
|
hasBody: false,
|
|
386
391
|
shape: {
|
|
@@ -395,7 +400,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
395
400
|
name: "vault_matters_undelete",
|
|
396
401
|
cud: "update",
|
|
397
402
|
description: "Undeletes the specified matter. Returns the matter with updated state.",
|
|
398
|
-
method: { id: "vault.matters.undelete", httpMethod: "POST", path: "v1/matters/{matterId}:undelete", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
403
|
+
method: { id: "vault.matters.undelete", httpMethod: "POST", path: "v1/matters/{matterId}:undelete", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[0] },
|
|
399
404
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
400
405
|
hasBody: true,
|
|
401
406
|
shape: {
|
|
@@ -409,7 +414,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
409
414
|
name: "vault_matters_update",
|
|
410
415
|
cud: "update",
|
|
411
416
|
description: "Updates the specified matter. This updates only the name and description of the matter, identified by matter ID. Changes to any other fields are ignored. Return",
|
|
412
|
-
method: { id: "vault.matters.update", httpMethod: "PUT", path: "v1/matters/{matterId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"] },
|
|
417
|
+
method: { id: "vault.matters.update", httpMethod: "PUT", path: "v1/matters/{matterId}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["matterId"], scopes: S_vault_v1[0] },
|
|
413
418
|
params: [{ "field": "matterId", "api": "matterId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
414
419
|
hasBody: true,
|
|
415
420
|
shape: {
|
|
@@ -423,7 +428,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
423
428
|
name: "vault_operations_cancel",
|
|
424
429
|
cud: "create",
|
|
425
430
|
description: "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the serv",
|
|
426
|
-
method: { id: "vault.operations.cancel", httpMethod: "POST", path: "v1/{+name}:cancel", baseUrl: "https://vault.googleapis.com/", requiredParams: ["name"] },
|
|
431
|
+
method: { id: "vault.operations.cancel", httpMethod: "POST", path: "v1/{+name}:cancel", baseUrl: "https://vault.googleapis.com/", requiredParams: ["name"], scopes: S_vault_v1[0] },
|
|
427
432
|
params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
428
433
|
hasBody: true,
|
|
429
434
|
shape: {
|
|
@@ -437,7 +442,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
437
442
|
name: "vault_operations_delete",
|
|
438
443
|
cud: "delete",
|
|
439
444
|
description: "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If th",
|
|
440
|
-
method: { id: "vault.operations.delete", httpMethod: "DELETE", path: "v1/{+name}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["name"] },
|
|
445
|
+
method: { id: "vault.operations.delete", httpMethod: "DELETE", path: "v1/{+name}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["name"], scopes: S_vault_v1[0] },
|
|
441
446
|
params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
442
447
|
hasBody: false,
|
|
443
448
|
shape: {
|
|
@@ -450,7 +455,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
450
455
|
name: "vault_operations_get",
|
|
451
456
|
cud: "read",
|
|
452
457
|
description: "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
|
|
453
|
-
method: { id: "vault.operations.get", httpMethod: "GET", path: "v1/{+name}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["name"] },
|
|
458
|
+
method: { id: "vault.operations.get", httpMethod: "GET", path: "v1/{+name}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["name"], scopes: S_vault_v1[1] },
|
|
454
459
|
params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
455
460
|
hasBody: false,
|
|
456
461
|
shape: {
|
|
@@ -463,7 +468,7 @@ export function registerVaultGeneratedTools(registry) {
|
|
|
463
468
|
name: "vault_operations_list",
|
|
464
469
|
cud: "read",
|
|
465
470
|
description: "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
|
|
466
|
-
method: { id: "vault.operations.list", httpMethod: "GET", path: "v1/{+name}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["name"] },
|
|
471
|
+
method: { id: "vault.operations.list", httpMethod: "GET", path: "v1/{+name}", baseUrl: "https://vault.googleapis.com/", requiredParams: ["name"], scopes: S_vault_v1[1] },
|
|
467
472
|
params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "filter", "api": "filter", "location": "query" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "returnPartialSuccess", "api": "returnPartialSuccess", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
468
473
|
hasBody: false,
|
|
469
474
|
shape: {
|
|
@@ -3,6 +3,11 @@ import { z } from 'zod';
|
|
|
3
3
|
import { coerceBoolean, coerceJson } from '../_coerce.js';
|
|
4
4
|
import { accountField, registerGeneratedTool } from './_shared.js';
|
|
5
5
|
export function registerWorkspaceeventsGeneratedTools(registry) {
|
|
6
|
+
// Interned method scope sets (shared across tools; see scope-observability).
|
|
7
|
+
const S_workspaceevents_v1 = [
|
|
8
|
+
["https://www.googleapis.com/auth/chat.bot", "https://www.googleapis.com/auth/chat.memberships", "https://www.googleapis.com/auth/chat.memberships.readonly", "https://www.googleapis.com/auth/chat.messages", "https://www.googleapis.com/auth/chat.messages.reactions", "https://www.googleapis.com/auth/chat.messages.reactions.readonly", "https://www.googleapis.com/auth/chat.messages.readonly", "https://www.googleapis.com/auth/chat.spaces", "https://www.googleapis.com/auth/chat.spaces.readonly", "https://www.googleapis.com/auth/chat.users.availability", "https://www.googleapis.com/auth/chat.users.availability.readonly", "https://www.googleapis.com/auth/chat.users.readstate", "https://www.googleapis.com/auth/chat.users.readstate.readonly", "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/meetings.space.created", "https://www.googleapis.com/auth/meetings.space.readonly"],
|
|
9
|
+
["https://www.googleapis.com/auth/chat.app.all.memberships.readonly", "https://www.googleapis.com/auth/chat.app.all.messages.readonly", "https://www.googleapis.com/auth/chat.app.all.spaces.readonly", "https://www.googleapis.com/auth/chat.app.all.users.readstate.readonly", "https://www.googleapis.com/auth/chat.app.memberships", "https://www.googleapis.com/auth/chat.app.memberships.readonly", "https://www.googleapis.com/auth/chat.app.messages.readonly", "https://www.googleapis.com/auth/chat.app.spaces", "https://www.googleapis.com/auth/chat.app.spaces.readonly", "https://www.googleapis.com/auth/chat.memberships", "https://www.googleapis.com/auth/chat.memberships.readonly", "https://www.googleapis.com/auth/chat.messages", "https://www.googleapis.com/auth/chat.messages.reactions", "https://www.googleapis.com/auth/chat.messages.reactions.readonly", "https://www.googleapis.com/auth/chat.messages.readonly", "https://www.googleapis.com/auth/chat.spaces", "https://www.googleapis.com/auth/chat.spaces.readonly", "https://www.googleapis.com/auth/chat.users.availability", "https://www.googleapis.com/auth/chat.users.availability.readonly", "https://www.googleapis.com/auth/chat.users.readstate", "https://www.googleapis.com/auth/chat.users.readstate.readonly", "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/meetings.space.created", "https://www.googleapis.com/auth/meetings.space.readonly"],
|
|
10
|
+
];
|
|
6
11
|
registerGeneratedTool(registry, {
|
|
7
12
|
name: "workspaceevents_message_stream",
|
|
8
13
|
cud: "create",
|
|
@@ -20,7 +25,7 @@ export function registerWorkspaceeventsGeneratedTools(registry) {
|
|
|
20
25
|
name: "workspaceevents_operations_get",
|
|
21
26
|
cud: "read",
|
|
22
27
|
description: "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
|
|
23
|
-
method: { id: "workspaceevents.operations.get", httpMethod: "GET", path: "v1/{+name}", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: ["name"] },
|
|
28
|
+
method: { id: "workspaceevents.operations.get", httpMethod: "GET", path: "v1/{+name}", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: ["name"], scopes: S_workspaceevents_v1[0] },
|
|
24
29
|
params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
25
30
|
hasBody: false,
|
|
26
31
|
shape: {
|
|
@@ -33,7 +38,7 @@ export function registerWorkspaceeventsGeneratedTools(registry) {
|
|
|
33
38
|
name: "workspaceevents_subscriptions_create",
|
|
34
39
|
cud: "create",
|
|
35
40
|
description: "Creates a Google Workspace subscription. To learn how to use this method, see [Create a Google Workspace subscription](https://developers.google.com/workspace/e",
|
|
36
|
-
method: { id: "workspaceevents.subscriptions.create", httpMethod: "POST", path: "v1/subscriptions", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: [] },
|
|
41
|
+
method: { id: "workspaceevents.subscriptions.create", httpMethod: "POST", path: "v1/subscriptions", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: [], scopes: S_workspaceevents_v1[1] },
|
|
37
42
|
params: [{ "field": "validateOnly", "api": "validateOnly", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
38
43
|
hasBody: true,
|
|
39
44
|
shape: {
|
|
@@ -47,7 +52,7 @@ export function registerWorkspaceeventsGeneratedTools(registry) {
|
|
|
47
52
|
name: "workspaceevents_subscriptions_delete",
|
|
48
53
|
cud: "delete",
|
|
49
54
|
description: "Deletes a Google Workspace subscription. To learn how to use this method, see [Delete a Google Workspace subscription](https://developers.google.com/workspace/e",
|
|
50
|
-
method: { id: "workspaceevents.subscriptions.delete", httpMethod: "DELETE", path: "v1/{+name}", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: ["name"] },
|
|
55
|
+
method: { id: "workspaceevents.subscriptions.delete", httpMethod: "DELETE", path: "v1/{+name}", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: ["name"], scopes: S_workspaceevents_v1[0] },
|
|
51
56
|
params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "allowMissing", "api": "allowMissing", "location": "query" }, { "field": "etag", "api": "etag", "location": "query" }, { "field": "validateOnly", "api": "validateOnly", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
52
57
|
hasBody: false,
|
|
53
58
|
shape: {
|
|
@@ -63,7 +68,7 @@ export function registerWorkspaceeventsGeneratedTools(registry) {
|
|
|
63
68
|
name: "workspaceevents_subscriptions_get",
|
|
64
69
|
cud: "read",
|
|
65
70
|
description: "Gets details about a Google Workspace subscription. To learn how to use this method, see [Get details about a Google Workspace subscription](https://developers.",
|
|
66
|
-
method: { id: "workspaceevents.subscriptions.get", httpMethod: "GET", path: "v1/{+name}", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: ["name"] },
|
|
71
|
+
method: { id: "workspaceevents.subscriptions.get", httpMethod: "GET", path: "v1/{+name}", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: ["name"], scopes: S_workspaceevents_v1[0] },
|
|
67
72
|
params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
68
73
|
hasBody: false,
|
|
69
74
|
shape: {
|
|
@@ -76,7 +81,7 @@ export function registerWorkspaceeventsGeneratedTools(registry) {
|
|
|
76
81
|
name: "workspaceevents_subscriptions_list",
|
|
77
82
|
cud: "read",
|
|
78
83
|
description: "Lists Google Workspace subscriptions. To learn how to use this method, see [List Google Workspace subscriptions](https://developers.google.com/workspace/events/",
|
|
79
|
-
method: { id: "workspaceevents.subscriptions.list", httpMethod: "GET", path: "v1/subscriptions", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: [] },
|
|
84
|
+
method: { id: "workspaceevents.subscriptions.list", httpMethod: "GET", path: "v1/subscriptions", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: [], scopes: S_workspaceevents_v1[0] },
|
|
80
85
|
params: [{ "field": "filter", "api": "filter", "location": "query" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
81
86
|
hasBody: false,
|
|
82
87
|
shape: {
|
|
@@ -91,7 +96,7 @@ export function registerWorkspaceeventsGeneratedTools(registry) {
|
|
|
91
96
|
name: "workspaceevents_subscriptions_patch",
|
|
92
97
|
cud: "update",
|
|
93
98
|
description: "Updates or renews a Google Workspace subscription. To learn how to use this method, see [Update or renew a Google Workspace subscription](https://developers.goo",
|
|
94
|
-
method: { id: "workspaceevents.subscriptions.patch", httpMethod: "PATCH", path: "v1/{+name}", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: ["name"] },
|
|
99
|
+
method: { id: "workspaceevents.subscriptions.patch", httpMethod: "PATCH", path: "v1/{+name}", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: ["name"], scopes: S_workspaceevents_v1[1] },
|
|
95
100
|
params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "updateMask", "api": "updateMask", "location": "query" }, { "field": "validateOnly", "api": "validateOnly", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
96
101
|
hasBody: true,
|
|
97
102
|
shape: {
|
|
@@ -107,7 +112,7 @@ export function registerWorkspaceeventsGeneratedTools(registry) {
|
|
|
107
112
|
name: "workspaceevents_subscriptions_reactivate",
|
|
108
113
|
cud: "create",
|
|
109
114
|
description: "Reactivates a suspended Google Workspace subscription. This method resets your subscription's `State` field to `ACTIVE`. Before you use this method, you must fi",
|
|
110
|
-
method: { id: "workspaceevents.subscriptions.reactivate", httpMethod: "POST", path: "v1/{+name}:reactivate", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: ["name"] },
|
|
115
|
+
method: { id: "workspaceevents.subscriptions.reactivate", httpMethod: "POST", path: "v1/{+name}:reactivate", baseUrl: "https://workspaceevents.googleapis.com/", requiredParams: ["name"], scopes: S_workspaceevents_v1[1] },
|
|
111
116
|
params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
|
|
112
117
|
hasBody: true,
|
|
113
118
|
shape: {
|
|
@@ -1,19 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function encodeHeaderValue(value: string): string;
|
|
3
|
-
/** Address-list headers (To/Cc/Bcc/From): RFC 2047 forbids encoded-words in the addr-spec, so only display names are encoded. */
|
|
4
|
-
export declare function encodeAddressHeader(value: string): string;
|
|
1
|
+
export declare function renderMarkdown(body: string, allowRawHtml?: boolean): string;
|
|
5
2
|
/** RFC 5322 §2.3 forbids bare CR or LF in bodies; normalize everything to CRLF. */
|
|
6
3
|
export declare function normalizeBodyLineEndings(body: string): string;
|
|
7
4
|
/** Best-effort HTML→plain-text for HTML-only emails; regex on purpose (avoids an HTML-parser dep, mail HTML is flat enough). */
|
|
8
5
|
export declare function htmlToText(html: string): string;
|
|
6
|
+
/** Convert HTML to Markdown; on any turndown failure fall back to the
|
|
7
|
+
* plain-text extractor (caller then reports bodyFormat 'plain', not 'markdown'). */
|
|
8
|
+
export declare function htmlToMarkdown(html: string): {
|
|
9
|
+
text: string;
|
|
10
|
+
ok: boolean;
|
|
11
|
+
};
|
|
9
12
|
/** In-Reply-To/References need the parent's real RFC 5322 Message-ID header, not the Gmail API id;
|
|
10
13
|
* falls back to the API id so replies still thread inside Gmail. */
|
|
11
14
|
export declare function buildReplyHeaders(fallbackId: string, parentMessageIdHeader: string, parentReferences: string): {
|
|
12
15
|
inReplyTo: string;
|
|
13
16
|
references: string;
|
|
14
17
|
};
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
export interface ComposeAttachment {
|
|
19
|
+
filename: string;
|
|
20
|
+
content: Buffer;
|
|
17
21
|
contentType: string;
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
}
|
|
23
|
+
export interface ComposeInput {
|
|
24
|
+
from: string;
|
|
25
|
+
to: string;
|
|
26
|
+
subject: string;
|
|
27
|
+
text: string;
|
|
28
|
+
html?: string;
|
|
29
|
+
cc?: string;
|
|
30
|
+
inReplyTo?: string;
|
|
31
|
+
references?: string;
|
|
32
|
+
attachments?: ComposeAttachment[];
|
|
33
|
+
}
|
|
34
|
+
/** Header-injection guard slug; caller maps to a validation_error envelope. */
|
|
35
|
+
export declare class HeaderInjectionError extends Error {
|
|
36
|
+
field: string;
|
|
37
|
+
constructor(field: string);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The single MIME-assembly seam for gmail_send and gmail_create_draft (A4).
|
|
41
|
+
* MailComposer owns header/RFC-2047/address encoding and boundary generation,
|
|
42
|
+
* which closes the CRLF header-injection hole in the old hand-rolled encoders.
|
|
43
|
+
* A deterministic pre-check rejects CR/LF in address/subject headers with a
|
|
44
|
+
* named error (belt-and-suspenders over MailComposer's own stripping).
|
|
45
|
+
*
|
|
46
|
+
* Bare-LF defense (Gmail's raw upload skips SMTP line-ending normalization):
|
|
47
|
+
* normalize text/html to CRLF, build with newline:"\r\n" and base64 CTE.
|
|
48
|
+
*/
|
|
49
|
+
export declare function composeRaw(input: ComposeInput): Promise<string>;
|