@aaronsb/google-workspace-mcp 4.2.0 → 4.3.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.
Files changed (47) hide show
  1. package/README.md +6 -5
  2. package/build/accounts/auth.d.ts +18 -2
  3. package/build/accounts/auth.js +31 -7
  4. package/build/accounts/auth.js.map +1 -1
  5. package/build/accounts/credentials.d.ts +20 -0
  6. package/build/accounts/credentials.js.map +1 -1
  7. package/build/accounts/oauth.d.ts +51 -1
  8. package/build/accounts/oauth.js +69 -5
  9. package/build/accounts/oauth.js.map +1 -1
  10. package/build/accounts/registry.d.ts +2 -1
  11. package/build/accounts/registry.js +2 -2
  12. package/build/accounts/registry.js.map +1 -1
  13. package/build/factory/manifest/calendar.yaml +22 -22
  14. package/build/factory/manifest/contacts.yaml +247 -0
  15. package/build/factory/manifest/drive.yaml +16 -16
  16. package/build/factory/manifest/gmail.yaml +18 -18
  17. package/build/factory/manifest/meet.yaml +91 -13
  18. package/build/factory/manifest/sheets.yaml +29 -29
  19. package/build/factory/manifest/tasks.yaml +14 -14
  20. package/build/factory/patches.js +2 -0
  21. package/build/factory/patches.js.map +1 -1
  22. package/build/factory/safety.js +4 -0
  23. package/build/factory/safety.js.map +1 -1
  24. package/build/google/descriptor.d.ts +8 -0
  25. package/build/google/descriptor.js +9 -2
  26. package/build/google/descriptor.js.map +1 -1
  27. package/build/google/descriptor.json +1883 -0
  28. package/build/google/methods.d.ts +4 -1
  29. package/build/server/handler.js +16 -1
  30. package/build/server/handler.js.map +1 -1
  31. package/build/server/handlers/accounts.js +100 -6
  32. package/build/server/handlers/accounts.js.map +1 -1
  33. package/build/server/queue.d.ts +1 -1
  34. package/build/server/queue.js +16 -1
  35. package/build/server/queue.js.map +1 -1
  36. package/build/server/tools.js +31 -1
  37. package/build/server/tools.js.map +1 -1
  38. package/build/services/calendar/patch.js +62 -8
  39. package/build/services/calendar/patch.js.map +1 -1
  40. package/build/services/contacts/patch.d.ts +31 -0
  41. package/build/services/contacts/patch.js +496 -0
  42. package/build/services/contacts/patch.js.map +1 -0
  43. package/build/services/meet/patch.js +202 -0
  44. package/build/services/meet/patch.js.map +1 -1
  45. package/build/version.d.ts +1 -1
  46. package/build/version.js +1 -1
  47. package/package.json +1 -1
@@ -11,7 +11,7 @@ operations:
11
11
  params:
12
12
  spreadsheetId:
13
13
  type: string
14
- description: "Spreadsheet ID"
14
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
15
15
  required: true
16
16
 
17
17
  create:
@@ -21,7 +21,7 @@ operations:
21
21
  params:
22
22
  title:
23
23
  type: string
24
- description: "Spreadsheet title (defaults to 'Untitled spreadsheet')"
24
+ description: "On `create`, the spreadsheet title (defaults to 'Untitled spreadsheet'); on `renameSpreadsheet`, its new title. On `addSheet`, the name of the new TAB; on `renameSheet`, that tab's new title; on `duplicateSheet`, the name for the copy (defaults to 'Copy of <source>')."
25
25
 
26
26
  read:
27
27
  type: detail
@@ -30,11 +30,11 @@ operations:
30
30
  params:
31
31
  spreadsheetId:
32
32
  type: string
33
- description: "Spreadsheet ID"
33
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
34
34
  required: true
35
35
  range:
36
36
  type: string
37
- description: "Range to read (e.g. 'Sheet1!A1:D10' or just 'Sheet1')"
37
+ description: "A1 notation range (e.g. 'Sheet1!A1:D10', or just 'Sheet1' for a whole tab). On `append`, the target tab — defaults to 'Sheet1'; use 'MyTab' or 'MyTab!A:Z' to append to a specific one."
38
38
  required: true
39
39
 
40
40
  append:
@@ -44,17 +44,17 @@ operations:
44
44
  params:
45
45
  spreadsheetId:
46
46
  type: string
47
- description: "Spreadsheet ID"
47
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
48
48
  required: true
49
49
  range:
50
50
  type: string
51
- description: "Target range; defaults to 'Sheet1'. Use 'MyTab' or 'MyTab!A:Z' to append to a specific tab."
51
+ description: "A1 notation range (e.g. 'Sheet1!A1:D10', or just 'Sheet1' for a whole tab). On `append`, the target tab — defaults to 'Sheet1'; use 'MyTab' or 'MyTab!A:Z' to append to a specific one."
52
52
  values:
53
53
  type: string
54
54
  description: "Comma-separated values for a single row (e.g. 'Alice,100,true')"
55
55
  jsonValues:
56
56
  type: string
57
- description: "JSON 2D array of rows for bulk insert (e.g. '[[\"a\",\"b\"],[\"c\",\"d\"]]')"
57
+ description: "JSON 2D array of rows (e.g. '[[\"a\",\"b\"],[\"c\",\"d\"]]'). Use for bulk and multi-row writes."
58
58
  valueInputOption:
59
59
  type: string
60
60
  description: "How input is interpreted: USER_ENTERED (default, parses formulas/types) or RAW"
@@ -68,11 +68,11 @@ operations:
68
68
  params:
69
69
  spreadsheetId:
70
70
  type: string
71
- description: "Spreadsheet ID"
71
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
72
72
  required: true
73
73
  range:
74
74
  type: string
75
- description: "A1 notation range (e.g. 'Sheet1!A1:B10')"
75
+ description: "A1 notation range (e.g. 'Sheet1!A1:D10', or just 'Sheet1' for a whole tab). On `append`, the target tab — defaults to 'Sheet1'; use 'MyTab' or 'MyTab!A:Z' to append to a specific one."
76
76
  required: true
77
77
 
78
78
  updateValues:
@@ -82,18 +82,18 @@ operations:
82
82
  params:
83
83
  spreadsheetId:
84
84
  type: string
85
- description: "Spreadsheet ID"
85
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
86
86
  required: true
87
87
  range:
88
88
  type: string
89
- description: "A1 notation range to write to"
89
+ description: "A1 notation range (e.g. 'Sheet1!A1:D10', or just 'Sheet1' for a whole tab). On `append`, the target tab — defaults to 'Sheet1'; use 'MyTab' or 'MyTab!A:Z' to append to a specific one."
90
90
  required: true
91
91
  values:
92
92
  type: string
93
93
  description: "Comma-separated values for a single row (e.g. 'Alice,100,true')"
94
94
  jsonValues:
95
95
  type: string
96
- description: "JSON 2D array of rows (e.g. '[[\"a\",\"b\"],[\"c\",\"d\"]]'). Use for multi-row writes."
96
+ description: "JSON 2D array of rows (e.g. '[[\"a\",\"b\"],[\"c\",\"d\"]]'). Use for bulk and multi-row writes."
97
97
  valueInputOption:
98
98
  type: string
99
99
  description: "How input is interpreted: USER_ENTERED (default, parses formulas/types) or RAW"
@@ -107,11 +107,11 @@ operations:
107
107
  params:
108
108
  spreadsheetId:
109
109
  type: string
110
- description: "Spreadsheet ID"
110
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
111
111
  required: true
112
112
  range:
113
113
  type: string
114
- description: "A1 notation range to clear"
114
+ description: "A1 notation range (e.g. 'Sheet1!A1:D10', or just 'Sheet1' for a whole tab). On `append`, the target tab — defaults to 'Sheet1'; use 'MyTab' or 'MyTab!A:Z' to append to a specific one."
115
115
  required: true
116
116
 
117
117
  addSheet:
@@ -121,11 +121,11 @@ operations:
121
121
  params:
122
122
  spreadsheetId:
123
123
  type: string
124
- description: "Spreadsheet ID"
124
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
125
125
  required: true
126
126
  title:
127
127
  type: string
128
- description: "Name of the new sheet tab"
128
+ description: "On `create`, the spreadsheet title (defaults to 'Untitled spreadsheet'); on `renameSpreadsheet`, its new title. On `addSheet`, the name of the new TAB; on `renameSheet`, that tab's new title; on `duplicateSheet`, the name for the copy (defaults to 'Copy of <source>')."
129
129
  required: true
130
130
  index:
131
131
  type: number
@@ -144,15 +144,15 @@ operations:
144
144
  params:
145
145
  spreadsheetId:
146
146
  type: string
147
- description: "Spreadsheet ID"
147
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
148
148
  required: true
149
149
  sheetId:
150
150
  type: number
151
- description: "Sheet ID of the tab to rename (from manage_sheets get)"
151
+ description: "Sheet ID of the tab, from `manage_sheets get`. On `duplicateSheet` and `copySheetTo`, the SOURCE tab to copy."
152
152
  required: true
153
153
  title:
154
154
  type: string
155
- description: "New title for the tab"
155
+ description: "On `create`, the spreadsheet title (defaults to 'Untitled spreadsheet'); on `renameSpreadsheet`, its new title. On `addSheet`, the name of the new TAB; on `renameSheet`, that tab's new title; on `duplicateSheet`, the name for the copy (defaults to 'Copy of <source>')."
156
156
  required: true
157
157
 
158
158
  deleteSheet:
@@ -162,11 +162,11 @@ operations:
162
162
  params:
163
163
  spreadsheetId:
164
164
  type: string
165
- description: "Spreadsheet ID"
165
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
166
166
  required: true
167
167
  sheetId:
168
168
  type: number
169
- description: "Sheet ID of the tab to delete"
169
+ description: "Sheet ID of the tab, from `manage_sheets get`. On `duplicateSheet` and `copySheetTo`, the SOURCE tab to copy."
170
170
  required: true
171
171
 
172
172
  duplicateSheet:
@@ -176,18 +176,18 @@ operations:
176
176
  params:
177
177
  spreadsheetId:
178
178
  type: string
179
- description: "Spreadsheet ID"
179
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
180
180
  required: true
181
181
  sheetId:
182
182
  type: number
183
- description: "Source sheet ID (the tab to copy)"
183
+ description: "Sheet ID of the tab, from `manage_sheets get`. On `duplicateSheet` and `copySheetTo`, the SOURCE tab to copy."
184
184
  required: true
185
185
  title:
186
186
  type: string
187
- description: "Name for the duplicated sheet (defaults to 'Copy of <source>')"
187
+ description: "On `create`, the spreadsheet title (defaults to 'Untitled spreadsheet'); on `renameSpreadsheet`, its new title. On `addSheet`, the name of the new TAB; on `renameSheet`, that tab's new title; on `duplicateSheet`, the name for the copy (defaults to 'Copy of <source>')."
188
188
  index:
189
189
  type: number
190
- description: "Position to insert the duplicate (0-based)"
190
+ description: "Position among tabs (0-based). Appended at the end if omitted."
191
191
 
192
192
  renameSpreadsheet:
193
193
  type: action
@@ -196,11 +196,11 @@ operations:
196
196
  params:
197
197
  spreadsheetId:
198
198
  type: string
199
- description: "Spreadsheet ID"
199
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
200
200
  required: true
201
201
  title:
202
202
  type: string
203
- description: "New spreadsheet title"
203
+ description: "On `create`, the spreadsheet title (defaults to 'Untitled spreadsheet'); on `renameSpreadsheet`, its new title. On `addSheet`, the name of the new TAB; on `renameSheet`, that tab's new title; on `duplicateSheet`, the name for the copy (defaults to 'Copy of <source>')."
204
204
  required: true
205
205
 
206
206
  copySheetTo:
@@ -210,11 +210,11 @@ operations:
210
210
  params:
211
211
  spreadsheetId:
212
212
  type: string
213
- description: "Source spreadsheet ID"
213
+ description: "Spreadsheet ID. On `copySheetTo`, the SOURCE spreadsheet."
214
214
  required: true
215
215
  sheetId:
216
216
  type: number
217
- description: "Source sheet ID (the tab to copy)"
217
+ description: "Sheet ID of the tab, from `manage_sheets get`. On `duplicateSheet` and `copySheetTo`, the SOURCE tab to copy."
218
218
  required: true
219
219
  destinationSpreadsheetId:
220
220
  type: string
@@ -18,7 +18,7 @@ operations:
18
18
  params:
19
19
  taskListId:
20
20
  type: string
21
- description: "Task list ID"
21
+ description: "Task list ID (use `listTaskLists` to find)"
22
22
  required: true
23
23
  maps_to: tasklist
24
24
 
@@ -32,7 +32,7 @@ operations:
32
32
  params:
33
33
  title:
34
34
  type: string
35
- description: "Task list name"
35
+ description: "On `createTaskList`, the task list name. On `create` and `update`, the task title."
36
36
  required: true
37
37
 
38
38
  deleteTaskList:
@@ -42,7 +42,7 @@ operations:
42
42
  params:
43
43
  taskListId:
44
44
  type: string
45
- description: "Task list ID to delete"
45
+ description: "Task list ID (use `listTaskLists` to find)"
46
46
  required: true
47
47
  maps_to: tasklist
48
48
 
@@ -55,7 +55,7 @@ operations:
55
55
  params:
56
56
  taskListId:
57
57
  type: string
58
- description: "Task list ID (use listTaskLists to find)"
58
+ description: "Task list ID (use `listTaskLists` to find)"
59
59
  required: true
60
60
  maps_to: tasklist
61
61
  showCompleted:
@@ -74,7 +74,7 @@ operations:
74
74
  params:
75
75
  taskListId:
76
76
  type: string
77
- description: "Task list ID"
77
+ description: "Task list ID (use `listTaskLists` to find)"
78
78
  required: true
79
79
  maps_to: tasklist
80
80
  taskId:
@@ -94,12 +94,12 @@ operations:
94
94
  params:
95
95
  taskListId:
96
96
  type: string
97
- description: "Task list ID"
97
+ description: "Task list ID (use `listTaskLists` to find)"
98
98
  required: true
99
99
  maps_to: tasklist
100
100
  title:
101
101
  type: string
102
- description: "Task title"
102
+ description: "On `createTaskList`, the task list name. On `create` and `update`, the task title."
103
103
  required: true
104
104
  notes:
105
105
  type: string
@@ -118,7 +118,7 @@ operations:
118
118
  params:
119
119
  taskListId:
120
120
  type: string
121
- description: "Task list ID"
121
+ description: "Task list ID (use `listTaskLists` to find)"
122
122
  required: true
123
123
  maps_to: tasklist
124
124
  taskId:
@@ -128,13 +128,13 @@ operations:
128
128
  maps_to: task
129
129
  title:
130
130
  type: string
131
- description: "New task title"
131
+ description: "On `createTaskList`, the task list name. On `create` and `update`, the task title."
132
132
  notes:
133
133
  type: string
134
- description: "New task notes / details"
134
+ description: "Task notes / details"
135
135
  due:
136
136
  type: string
137
- description: "New due date (RFC 3339)"
137
+ description: "Due date (RFC 3339, e.g. 2026-07-20T00:00:00.000Z — Google stores the date, not the time)"
138
138
  status:
139
139
  type: string
140
140
  description: "Task status"
@@ -147,7 +147,7 @@ operations:
147
147
  params:
148
148
  taskListId:
149
149
  type: string
150
- description: "Task list ID"
150
+ description: "Task list ID (use `listTaskLists` to find)"
151
151
  required: true
152
152
  maps_to: tasklist
153
153
  taskId:
@@ -165,11 +165,11 @@ operations:
165
165
  params:
166
166
  taskListId:
167
167
  type: string
168
- description: "Task list ID"
168
+ description: "Task list ID (use `listTaskLists` to find)"
169
169
  required: true
170
170
  maps_to: tasklist
171
171
  taskId:
172
172
  type: string
173
- description: "Task ID to delete"
173
+ description: "Task ID"
174
174
  required: true
175
175
  maps_to: task
@@ -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;AAGxD,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;CAClB,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"}
@@ -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,EA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,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAC5C,CAAC;IACJ,CAAC;AACH,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,iBAAiB;IAC/B,OAAO,CAAC,GAAG,cAAc,CAAC,CAAC;AAC7B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAAc,EACd,GAAiB,EACjB,OAAe;IAEf,KAAK,MAAM,MAAM,IAAI,cAAc,EAAE,CAAC;QACpC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC;YAAE,SAAS;QAEtD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QACnD,IAAI,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;YAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,0CAA0C,OAAO,IAAI,GAAG,CAAC,SAAS,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,MAAM,IAAI,CAC3G,CAAC;YACF,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;YAC5D,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,6CAA6C,OAAO,IAAI,GAAG,CAAC,SAAS,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,MAAM,IAAI,CAC9G,CAAC;YACF,OAAO,MAAM,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 deliberately DISCARDED. A descriptor that knows response shapes 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;;;;;;;;;;;;;;GAcG;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;AAuCzC,IAAI,MAAiC,CAAC;AAEtC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,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