@aaronsb/google-workspace-mcp 4.2.1 → 4.3.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 +6 -5
- package/build/accounts/auth.d.ts +18 -2
- package/build/accounts/auth.js +31 -7
- package/build/accounts/auth.js.map +1 -1
- package/build/accounts/credentials.d.ts +20 -0
- package/build/accounts/credentials.js.map +1 -1
- package/build/accounts/oauth.d.ts +51 -1
- package/build/accounts/oauth.js +69 -5
- package/build/accounts/oauth.js.map +1 -1
- package/build/accounts/registry.d.ts +2 -1
- package/build/accounts/registry.js +2 -2
- package/build/accounts/registry.js.map +1 -1
- package/build/factory/manifest/contacts.yaml +247 -0
- package/build/factory/manifest/meet.yaml +78 -0
- package/build/factory/patches.js +2 -0
- package/build/factory/patches.js.map +1 -1
- package/build/factory/safety.js +4 -0
- package/build/factory/safety.js.map +1 -1
- package/build/google/descriptor.d.ts +8 -0
- package/build/google/descriptor.js +9 -2
- package/build/google/descriptor.js.map +1 -1
- package/build/google/descriptor.json +1883 -0
- package/build/google/methods.d.ts +4 -1
- package/build/server/handler.js +16 -1
- package/build/server/handler.js.map +1 -1
- package/build/server/handlers/accounts.js +100 -6
- package/build/server/handlers/accounts.js.map +1 -1
- package/build/server/queue.d.ts +1 -1
- package/build/server/queue.js +16 -1
- package/build/server/queue.js.map +1 -1
- package/build/server/tools.js +31 -1
- package/build/server/tools.js.map +1 -1
- package/build/services/contacts/patch.d.ts +31 -0
- package/build/services/contacts/patch.js +496 -0
- package/build/services/contacts/patch.js.map +1 -0
- package/build/services/meet/patch.js +202 -0
- package/build/services/meet/patch.js.map +1 -1
- package/build/version.d.ts +1 -1
- package/build/version.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
tool_name: manage_contacts
|
|
2
|
+
description: "Search, read, create, update and delete Google Contacts: your saved contacts, the addresses you have corresponded with but never saved, and your organization's directory."
|
|
3
|
+
requires_email: true
|
|
4
|
+
google_service: people
|
|
5
|
+
|
|
6
|
+
# The People API asks the caller to name every field it wants back, on every call, via
|
|
7
|
+
# `personFields` or `readMask`. Omit the mask and the call is REJECTED outright — this is
|
|
8
|
+
# not a shape that degrades to a sensible default.
|
|
9
|
+
#
|
|
10
|
+
# Those masks live in `defaults` rather than `params` so they never enter the generated
|
|
11
|
+
# schema. An agent asking "who is Dana" should not first have to know that a birthday is
|
|
12
|
+
# spelled `birthdays` and lives behind a different parameter name depending on which of
|
|
13
|
+
# the seven operations it picked. The masks also differ per operation because Google
|
|
14
|
+
# restricts them per operation, which is exactly the routing this tool exists to absorb.
|
|
15
|
+
#
|
|
16
|
+
# `sources` is left out of the schema for a sharper reason: its legal values are NOT the
|
|
17
|
+
# same across operations. The contact operations take READ_SOURCE_TYPE_*, the directory
|
|
18
|
+
# operations take DIRECTORY_SOURCE_TYPE_*, and generateSchema keeps only the FIRST
|
|
19
|
+
# declaration of a param name — so a single advertised `sources` enum would be wrong for
|
|
20
|
+
# whichever half lost the race.
|
|
21
|
+
operations:
|
|
22
|
+
|
|
23
|
+
# --- Your own contacts ---
|
|
24
|
+
|
|
25
|
+
list:
|
|
26
|
+
type: list
|
|
27
|
+
description: "list your saved contacts"
|
|
28
|
+
resource: people.connections.list
|
|
29
|
+
params:
|
|
30
|
+
maxResults:
|
|
31
|
+
type: number
|
|
32
|
+
description: "Max people to return (default 25). Capped per operation: 30 for `search` and `searchOther`, 100 for everything else."
|
|
33
|
+
default: 25
|
|
34
|
+
max: 100
|
|
35
|
+
maps_to: pageSize
|
|
36
|
+
pageToken:
|
|
37
|
+
type: string
|
|
38
|
+
description: "Continue from where a previous page stopped — pass the token that response printed"
|
|
39
|
+
sortOrder:
|
|
40
|
+
type: string
|
|
41
|
+
description: "Order for `list` — by first name, by last name, or most recently changed first"
|
|
42
|
+
enum: [firstName, lastName, lastModified]
|
|
43
|
+
defaults:
|
|
44
|
+
# connections.list reads one person's connections, and the person is always the
|
|
45
|
+
# authenticated account. `people/me` is Google's alias for it, so the agent never
|
|
46
|
+
# has to know its own resource name.
|
|
47
|
+
resourceName: people/me
|
|
48
|
+
personFields: names,emailAddresses,phoneNumbers,organizations,metadata
|
|
49
|
+
sortOrder: firstName
|
|
50
|
+
|
|
51
|
+
search:
|
|
52
|
+
type: list
|
|
53
|
+
description: "search your saved contacts by name, email, nickname or phone"
|
|
54
|
+
resource: people.searchContacts
|
|
55
|
+
params:
|
|
56
|
+
query:
|
|
57
|
+
type: string
|
|
58
|
+
description: "Text to match against names, email addresses, nicknames and phone numbers. Matching is by PREFIX: `ann` finds Anna, `nna` finds nobody."
|
|
59
|
+
required: true
|
|
60
|
+
maxResults:
|
|
61
|
+
type: number
|
|
62
|
+
description: "Max people to return (default 25). Capped per operation: 30 for `search` and `searchOther`, 100 for everything else."
|
|
63
|
+
default: 25
|
|
64
|
+
max: 30
|
|
65
|
+
maps_to: pageSize
|
|
66
|
+
defaults:
|
|
67
|
+
readMask: names,emailAddresses,phoneNumbers,organizations,metadata
|
|
68
|
+
|
|
69
|
+
get:
|
|
70
|
+
type: detail
|
|
71
|
+
description: "get one person in full — addresses, birthday, notes, relations"
|
|
72
|
+
resource: people.get
|
|
73
|
+
params:
|
|
74
|
+
contactId:
|
|
75
|
+
type: string
|
|
76
|
+
description: "Person id as `list` or `search` printed it (e.g. `people/c1234567890`). A bare id without the `people/` prefix is accepted."
|
|
77
|
+
required: true
|
|
78
|
+
maps_to: resourceName
|
|
79
|
+
defaults:
|
|
80
|
+
personFields: names,nicknames,emailAddresses,phoneNumbers,addresses,organizations,birthdays,biographies,urls,relations,memberships,photos,metadata
|
|
81
|
+
|
|
82
|
+
# The Person body is built by the patch, not declared here. Every field the People API
|
|
83
|
+
# wants is a parallel array of objects — `names: [{givenName, familyName}]` — and any
|
|
84
|
+
# param this manifest declares that Google does not recognise as a query parameter goes
|
|
85
|
+
# into the request body VERBATIM. Declared flat, `name: "Ada Lovelace"` would be sent as
|
|
86
|
+
# a top-level `name` field, which Google ignores, producing a contact with no name and
|
|
87
|
+
# no error. So these are declared for the SCHEMA and converted before the call.
|
|
88
|
+
create:
|
|
89
|
+
type: action
|
|
90
|
+
description: "create a new contact"
|
|
91
|
+
resource: people.createContact
|
|
92
|
+
params:
|
|
93
|
+
name:
|
|
94
|
+
type: string
|
|
95
|
+
description: "Full name, e.g. `Ada Lovelace`. Split into given and family name on the way in; a single word becomes the given name."
|
|
96
|
+
contactEmail:
|
|
97
|
+
type: string
|
|
98
|
+
description: "The contact's email address. (`email` is the account making the call, not the person being saved.) On `update` this REPLACES every address the contact has — pass an empty string to clear them."
|
|
99
|
+
phone:
|
|
100
|
+
type: string
|
|
101
|
+
description: "Phone number, in whatever form you have it — Google normalizes it. On `update` this REPLACES every number the contact has — pass an empty string to clear them."
|
|
102
|
+
company:
|
|
103
|
+
type: string
|
|
104
|
+
description: "Organization name"
|
|
105
|
+
jobTitle:
|
|
106
|
+
type: string
|
|
107
|
+
description: "Job title within the organization"
|
|
108
|
+
notes:
|
|
109
|
+
type: string
|
|
110
|
+
description: "Free-text note stored on the contact"
|
|
111
|
+
defaults:
|
|
112
|
+
# Echoes back EVERY field this operation can write. Live, the shorter read mask
|
|
113
|
+
# confirmed a create without the note it had just stored — a confirmation that
|
|
114
|
+
# drops a field the caller supplied is indistinguishable from one that dropped it
|
|
115
|
+
# on the way in.
|
|
116
|
+
personFields: names,emailAddresses,phoneNumbers,organizations,biographies,metadata
|
|
117
|
+
|
|
118
|
+
# updatePersonFields is not sent from here — the patch derives it from which fields the
|
|
119
|
+
# caller actually supplied. A fixed list would name fields nobody touched, and naming a
|
|
120
|
+
# field in updatePersonFields with no value in the body CLEARS it. Declared statically,
|
|
121
|
+
# this operation would wipe a contact's phone number every time someone corrected a
|
|
122
|
+
# job title.
|
|
123
|
+
update:
|
|
124
|
+
type: action
|
|
125
|
+
description: "change an existing contact (only the fields you pass; pass an empty string to clear one)"
|
|
126
|
+
resource: people.updateContact
|
|
127
|
+
params:
|
|
128
|
+
contactId:
|
|
129
|
+
type: string
|
|
130
|
+
description: "Person id as `list` or `search` printed it (e.g. `people/c1234567890`). A bare id without the `people/` prefix is accepted."
|
|
131
|
+
required: true
|
|
132
|
+
maps_to: resourceName
|
|
133
|
+
name:
|
|
134
|
+
type: string
|
|
135
|
+
description: "Full name, e.g. `Ada Lovelace`. Split into given and family name on the way in; a single word becomes the given name."
|
|
136
|
+
contactEmail:
|
|
137
|
+
type: string
|
|
138
|
+
description: "The contact's email address. (`email` is the account making the call, not the person being saved.) On `update` this REPLACES every address the contact has — pass an empty string to clear them."
|
|
139
|
+
phone:
|
|
140
|
+
type: string
|
|
141
|
+
description: "Phone number, in whatever form you have it — Google normalizes it. On `update` this REPLACES every number the contact has — pass an empty string to clear them."
|
|
142
|
+
company:
|
|
143
|
+
type: string
|
|
144
|
+
description: "Organization name"
|
|
145
|
+
jobTitle:
|
|
146
|
+
type: string
|
|
147
|
+
description: "Job title within the organization"
|
|
148
|
+
notes:
|
|
149
|
+
type: string
|
|
150
|
+
description: "Free-text note stored on the contact"
|
|
151
|
+
defaults:
|
|
152
|
+
personFields: names,emailAddresses,phoneNumbers,organizations,biographies,metadata
|
|
153
|
+
|
|
154
|
+
delete:
|
|
155
|
+
type: action
|
|
156
|
+
description: "delete a contact"
|
|
157
|
+
resource: people.deleteContact
|
|
158
|
+
params:
|
|
159
|
+
contactId:
|
|
160
|
+
type: string
|
|
161
|
+
description: "Person id as `list` or `search` printed it (e.g. `people/c1234567890`). A bare id without the `people/` prefix is accepted."
|
|
162
|
+
required: true
|
|
163
|
+
maps_to: resourceName
|
|
164
|
+
|
|
165
|
+
# --- Other contacts: addresses seen in mail, never saved ---
|
|
166
|
+
|
|
167
|
+
listOther:
|
|
168
|
+
type: list
|
|
169
|
+
description: "list 'other contacts' — addresses you have corresponded with but never saved"
|
|
170
|
+
resource: otherContacts.list
|
|
171
|
+
params:
|
|
172
|
+
maxResults:
|
|
173
|
+
type: number
|
|
174
|
+
description: "Max people to return (default 25). Capped per operation: 30 for `search` and `searchOther`, 100 for everything else."
|
|
175
|
+
default: 25
|
|
176
|
+
max: 100
|
|
177
|
+
maps_to: pageSize
|
|
178
|
+
pageToken:
|
|
179
|
+
type: string
|
|
180
|
+
description: "Continue from where a previous page stopped — pass the token that response printed"
|
|
181
|
+
defaults:
|
|
182
|
+
# otherContacts accepts a narrower mask than the contact operations do; asking it
|
|
183
|
+
# for organizations is an error, not an empty field.
|
|
184
|
+
readMask: names,emailAddresses,phoneNumbers,metadata
|
|
185
|
+
|
|
186
|
+
searchOther:
|
|
187
|
+
type: list
|
|
188
|
+
description: "search 'other contacts' by name or email"
|
|
189
|
+
resource: otherContacts.search
|
|
190
|
+
params:
|
|
191
|
+
query:
|
|
192
|
+
type: string
|
|
193
|
+
description: "Text to match against names, email addresses, nicknames and phone numbers. Matching is by PREFIX: `ann` finds Anna, `nna` finds nobody."
|
|
194
|
+
required: true
|
|
195
|
+
maxResults:
|
|
196
|
+
type: number
|
|
197
|
+
description: "Max people to return (default 25). Capped per operation: 30 for `search` and `searchOther`, 100 for everything else."
|
|
198
|
+
default: 25
|
|
199
|
+
max: 30
|
|
200
|
+
maps_to: pageSize
|
|
201
|
+
defaults:
|
|
202
|
+
readMask: names,emailAddresses,phoneNumbers,metadata
|
|
203
|
+
|
|
204
|
+
# --- The organization directory (Google Workspace accounts only) ---
|
|
205
|
+
|
|
206
|
+
listDirectory:
|
|
207
|
+
type: list
|
|
208
|
+
description: "list people in your organization's directory (Workspace accounts only)"
|
|
209
|
+
resource: people.listDirectoryPeople
|
|
210
|
+
params:
|
|
211
|
+
maxResults:
|
|
212
|
+
type: number
|
|
213
|
+
description: "Max people to return (default 25). Capped per operation: 30 for `search` and `searchOther`, 100 for everything else."
|
|
214
|
+
default: 25
|
|
215
|
+
max: 100
|
|
216
|
+
maps_to: pageSize
|
|
217
|
+
pageToken:
|
|
218
|
+
type: string
|
|
219
|
+
description: "Continue from where a previous page stopped — pass the token that response printed"
|
|
220
|
+
defaults:
|
|
221
|
+
readMask: names,emailAddresses,phoneNumbers,organizations,metadata
|
|
222
|
+
# `sources` is REQUIRED here — the directory operations reject a call that does not
|
|
223
|
+
# say which directory to read. Both value sets are wanted: DOMAIN_PROFILE is the
|
|
224
|
+
# people with accounts, DOMAIN_CONTACT the shared contacts an admin published.
|
|
225
|
+
sources: DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE,DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT
|
|
226
|
+
|
|
227
|
+
searchDirectory:
|
|
228
|
+
type: list
|
|
229
|
+
description: "search your organization's directory by name or email (Workspace accounts only)"
|
|
230
|
+
resource: people.searchDirectoryPeople
|
|
231
|
+
params:
|
|
232
|
+
query:
|
|
233
|
+
type: string
|
|
234
|
+
description: "Text to match against names, email addresses, nicknames and phone numbers. Matching is by PREFIX: `ann` finds Anna, `nna` finds nobody."
|
|
235
|
+
required: true
|
|
236
|
+
maxResults:
|
|
237
|
+
type: number
|
|
238
|
+
description: "Max people to return (default 25). Capped per operation: 30 for `search` and `searchOther`, 100 for everything else."
|
|
239
|
+
default: 25
|
|
240
|
+
max: 100
|
|
241
|
+
maps_to: pageSize
|
|
242
|
+
pageToken:
|
|
243
|
+
type: string
|
|
244
|
+
description: "Continue from where a previous page stopped — pass the token that response printed"
|
|
245
|
+
defaults:
|
|
246
|
+
readMask: names,emailAddresses,phoneNumbers,organizations,metadata
|
|
247
|
+
sources: DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE,DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT
|
|
@@ -157,3 +157,81 @@ operations:
|
|
|
157
157
|
description: "Smart note resource name (from listSmartNotes)"
|
|
158
158
|
required: true
|
|
159
159
|
maps_to: name
|
|
160
|
+
|
|
161
|
+
# --- Meeting spaces ---
|
|
162
|
+
#
|
|
163
|
+
# A space is a standalone meeting link, not attached to a calendar event. For a link on
|
|
164
|
+
# an event, use `manage_calendar` with `meet: true` — that goes through Calendar and
|
|
165
|
+
# keeps the two together.
|
|
166
|
+
#
|
|
167
|
+
# `createSpace` is the first manage_meet operation that WRITES. Everything above reads
|
|
168
|
+
# conference records, which `meetings.space.readonly` covers on its own; creating a
|
|
169
|
+
# space needs `meetings.space.created`, which a read-only account does not hold
|
|
170
|
+
# (ADR-202). Both handlers are custom: spaces.create declares no parameters at all, so
|
|
171
|
+
# everything travels in the body, and the response nests the joinable URL.
|
|
172
|
+
|
|
173
|
+
createSpace:
|
|
174
|
+
type: action
|
|
175
|
+
description: "create a standalone Google Meet link (not attached to a calendar event)"
|
|
176
|
+
resource: spaces.create
|
|
177
|
+
params:
|
|
178
|
+
accessType:
|
|
179
|
+
type: string
|
|
180
|
+
enum: ["OPEN", "TRUSTED", "RESTRICTED"]
|
|
181
|
+
description: "Who can join without knocking. OPEN: anyone with the link. TRUSTED (default): people in your organization, plus invited guests. RESTRICTED: invited guests only."
|
|
182
|
+
moderation:
|
|
183
|
+
type: boolean
|
|
184
|
+
description: "Turn on host controls — the host admits guests and manages who can present or chat."
|
|
185
|
+
|
|
186
|
+
activeConferences:
|
|
187
|
+
type: list
|
|
188
|
+
description: "list conferences happening RIGHT NOW across your meetings"
|
|
189
|
+
resource: conferenceRecords.list
|
|
190
|
+
params:
|
|
191
|
+
maxResults:
|
|
192
|
+
type: number
|
|
193
|
+
description: "Max results per page, as default/ceiling. Differs by operation: `listConferences` 25/100, `listParticipants` 100/250, `listTranscriptEntries` 100/100. (Google's own default for transcript entries is 10; this tool raises it.)"
|
|
194
|
+
default: 25
|
|
195
|
+
max: 100
|
|
196
|
+
|
|
197
|
+
getSpace:
|
|
198
|
+
type: detail
|
|
199
|
+
description: "look up a meeting space by its meeting code or resource name"
|
|
200
|
+
resource: spaces.get
|
|
201
|
+
params:
|
|
202
|
+
space:
|
|
203
|
+
type: string
|
|
204
|
+
description: "Meeting code (the abc-mnop-xyz part of a Meet link) or a full spaces/... resource name"
|
|
205
|
+
required: true
|
|
206
|
+
maps_to: name
|
|
207
|
+
|
|
208
|
+
updateSpace:
|
|
209
|
+
type: action
|
|
210
|
+
description: "change who can join a meeting space, or turn host controls on or off"
|
|
211
|
+
resource: spaces.patch
|
|
212
|
+
params:
|
|
213
|
+
space:
|
|
214
|
+
type: string
|
|
215
|
+
description: "Meeting code (the abc-mnop-xyz part of a Meet link) or a full spaces/... resource name"
|
|
216
|
+
required: true
|
|
217
|
+
maps_to: name
|
|
218
|
+
accessType:
|
|
219
|
+
type: string
|
|
220
|
+
enum: ["OPEN", "TRUSTED", "RESTRICTED"]
|
|
221
|
+
description: "Who can join without knocking. OPEN: anyone with the link. TRUSTED (default): people in your organization, plus invited guests. RESTRICTED: invited guests only."
|
|
222
|
+
moderation:
|
|
223
|
+
type: boolean
|
|
224
|
+
description: "Turn on host controls — the host admits guests and manages who can present or chat."
|
|
225
|
+
|
|
226
|
+
# Ends the meeting for EVERYONE currently in it. There is no undo and no warning to
|
|
227
|
+
# participants; the call returns an empty body whether or not anyone was in the room.
|
|
228
|
+
endActiveConference:
|
|
229
|
+
type: action
|
|
230
|
+
description: "end the call happening in a space right now, disconnecting everyone in it"
|
|
231
|
+
resource: spaces.endActiveConference
|
|
232
|
+
params:
|
|
233
|
+
space:
|
|
234
|
+
type: string
|
|
235
|
+
description: "Meeting code (the abc-mnop-xyz part of a Meet link) or a full spaces/... resource name"
|
|
236
|
+
required: true
|
|
237
|
+
maps_to: name
|
package/build/factory/patches.js
CHANGED
|
@@ -9,6 +9,7 @@ import { docsPatch } from '../services/docs/patch.js';
|
|
|
9
9
|
import { meetPatch } from '../services/meet/patch.js';
|
|
10
10
|
import { sheetsPatch } from '../services/sheets/patch.js';
|
|
11
11
|
import { tasksPatch } from '../services/tasks/patch.js';
|
|
12
|
+
import { contactsPatch } from '../services/contacts/patch.js';
|
|
12
13
|
export const patches = {
|
|
13
14
|
gmail: gmailPatch,
|
|
14
15
|
calendar: calendarPatch,
|
|
@@ -17,5 +18,6 @@ export const patches = {
|
|
|
17
18
|
meet: meetPatch,
|
|
18
19
|
sheets: sheetsPatch,
|
|
19
20
|
tasks: tasksPatch,
|
|
21
|
+
contacts: contactsPatch,
|
|
20
22
|
};
|
|
21
23
|
//# sourceMappingURL=patches.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patches.js","sourceRoot":"","sources":["../../src/factory/patches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"patches.js","sourceRoot":"","sources":["../../src/factory/patches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,MAAM,CAAC,MAAM,OAAO,GAAiC;IACnD,KAAK,EAAE,UAAU;IACjB,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,UAAU;IACjB,QAAQ,EAAE,aAAa;CACxB,CAAC"}
|
package/build/factory/safety.js
CHANGED
|
@@ -58,6 +58,10 @@ export const noDelete = {
|
|
|
58
58
|
tasks: ['delete', 'deleteTaskList'],
|
|
59
59
|
docs: [],
|
|
60
60
|
sheets: [],
|
|
61
|
+
// Keyed by google_service, so contacts is `people`. An operator who turned this
|
|
62
|
+
// policy on asked for no permanent deletion; whether Google's own trash would have
|
|
63
|
+
// caught the contact is not the question they asked.
|
|
64
|
+
people: ['delete'],
|
|
61
65
|
};
|
|
62
66
|
const blocked = permanentDeletes[service] ?? [];
|
|
63
67
|
if (blocked.includes(ctx.operation)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safety.js","sourceRoot":"","sources":["../../src/factory/safety.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAyBH,wEAAwE;AAExE;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAiB;IAC1C,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,qDAAqD;IAClE,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,OAAO;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACvB,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QACzD,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YACpC,OAAO;gBACL,MAAM,EAAE,OAAO;gBACf,MAAM,EAAE,cAAc,GAAG,CAAC,SAAS,2CAA2C;oBAC5E,sFAAsF;aACzF,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IAC7B,CAAC;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAiB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M,CAAC;QAChB,CAAC;IACH,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -2,6 +2,8 @@ export interface ApiParam {
|
|
|
2
2
|
location: 'path' | 'query';
|
|
3
3
|
required?: boolean;
|
|
4
4
|
repeated?: boolean;
|
|
5
|
+
/** The values Google accepts, when it constrains them. Calendar declares its enums here. */
|
|
6
|
+
enum?: string[];
|
|
5
7
|
}
|
|
6
8
|
export interface ApiMediaUpload {
|
|
7
9
|
maxSize?: string;
|
|
@@ -25,6 +27,12 @@ export interface ApiService {
|
|
|
25
27
|
/** `fields`, `alt`, `quotaUser`… declared once at the document root, not per method. */
|
|
26
28
|
globalParameters: Record<string, ApiParam>;
|
|
27
29
|
methods: Record<string, ApiMethod>;
|
|
30
|
+
/**
|
|
31
|
+
* Enum values from Discovery's schema properties, keyed `SchemaName.field` —
|
|
32
|
+
* e.g. `SpaceConfig.moderation`. This is where REQUEST-BODY enums live, which method
|
|
33
|
+
* parameters cannot express.
|
|
34
|
+
*/
|
|
35
|
+
enums: Record<string, string[]>;
|
|
28
36
|
}
|
|
29
37
|
export interface ApiDescriptor {
|
|
30
38
|
generatedFrom: string;
|
|
@@ -8,8 +8,15 @@
|
|
|
8
8
|
*
|
|
9
9
|
* It records what Discovery says about how to CALL Google. It records nothing
|
|
10
10
|
* about what a RESPONSE means — Discovery's `schemas` block (~90% of the raw
|
|
11
|
-
* document) is
|
|
12
|
-
* a descriptor that can start helpfully reshaping them.
|
|
11
|
+
* document) is discarded, with ONE exception. A descriptor that knows response
|
|
12
|
+
* shapes is a descriptor that can start helpfully reshaping them.
|
|
13
|
+
*
|
|
14
|
+
* The exception is enum VALUES, taken from schema properties and method parameters
|
|
15
|
+
* alike (`enums` below, and `ApiParam.enum`). They describe what may go into a
|
|
16
|
+
* request, not what comes back, so they do not open the reshaping door. Without
|
|
17
|
+
* them a handler that builds a request body is checked by nothing here: a handler
|
|
18
|
+
* sending `MODERATION_ON` where Google wanted `ON` passed lint, type-check and the
|
|
19
|
+
* whole suite, and was found only by calling Google.
|
|
13
20
|
*
|
|
14
21
|
* See ADR-103.
|
|
15
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor.js","sourceRoot":"","sources":["../../src/google/descriptor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"descriptor.js","sourceRoot":"","sources":["../../src/google/descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA+CzC,IAAI,MAAiC,CAAC;AAEtC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,CAAC,CAAC;IACtE,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAkB,CAAC;IAC1C,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,oBAAoB;IAClC,MAAM,GAAG,SAAS,CAAC;AACrB,CAAC"}
|