@corsair-dev/gmail 0.1.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.
@@ -0,0 +1,1814 @@
1
+ import type { BindEndpoints, BindWebhooks, CorsairEndpoint, CorsairPlugin, CorsairPluginContext, CorsairWebhook, KeyBuilderContext, PluginPermissionsConfig } from 'corsair/core';
2
+ import type { PickAuth } from 'corsair/core';
3
+ import type { GmailEndpointInputs, GmailEndpointOutputs } from './endpoints';
4
+ import type { GmailCredentials } from './schema';
5
+ import { GmailSchema } from './schema';
6
+ import type { GmailWebhookOutputs, GmailWebhookPayload, MessageDeletedEvent, MessageLabelChangedEvent, MessageReceivedEvent } from './webhooks';
7
+ /**
8
+ * Auth config extending the base OAuth2 fields with Gmail-specific fields.
9
+ * - integration: topic_id (Google Cloud Pub/Sub topic for push notifications)
10
+ */
11
+ export declare const gmailAuthConfig: {
12
+ readonly oauth_2: {
13
+ readonly integration: readonly ["topic_id"];
14
+ };
15
+ };
16
+ export type GmailContext = CorsairPluginContext<typeof GmailSchema, GmailPluginOptions, undefined, typeof gmailAuthConfig>;
17
+ type GmailEndpoint<K extends keyof GmailEndpointOutputs> = CorsairEndpoint<GmailContext, GmailEndpointInputs[K], GmailEndpointOutputs[K]>;
18
+ export type GmailEndpoints = {
19
+ messagesList: GmailEndpoint<'messagesList'>;
20
+ messagesGet: GmailEndpoint<'messagesGet'>;
21
+ messagesSend: GmailEndpoint<'messagesSend'>;
22
+ messagesDelete: GmailEndpoint<'messagesDelete'>;
23
+ messagesModify: GmailEndpoint<'messagesModify'>;
24
+ messagesBatchModify: GmailEndpoint<'messagesBatchModify'>;
25
+ messagesTrash: GmailEndpoint<'messagesTrash'>;
26
+ messagesUntrash: GmailEndpoint<'messagesUntrash'>;
27
+ labelsList: GmailEndpoint<'labelsList'>;
28
+ labelsGet: GmailEndpoint<'labelsGet'>;
29
+ labelsCreate: GmailEndpoint<'labelsCreate'>;
30
+ labelsUpdate: GmailEndpoint<'labelsUpdate'>;
31
+ labelsDelete: GmailEndpoint<'labelsDelete'>;
32
+ draftsList: GmailEndpoint<'draftsList'>;
33
+ draftsGet: GmailEndpoint<'draftsGet'>;
34
+ draftsCreate: GmailEndpoint<'draftsCreate'>;
35
+ draftsUpdate: GmailEndpoint<'draftsUpdate'>;
36
+ draftsDelete: GmailEndpoint<'draftsDelete'>;
37
+ draftsSend: GmailEndpoint<'draftsSend'>;
38
+ threadsList: GmailEndpoint<'threadsList'>;
39
+ threadsGet: GmailEndpoint<'threadsGet'>;
40
+ threadsModify: GmailEndpoint<'threadsModify'>;
41
+ threadsDelete: GmailEndpoint<'threadsDelete'>;
42
+ threadsTrash: GmailEndpoint<'threadsTrash'>;
43
+ threadsUntrash: GmailEndpoint<'threadsUntrash'>;
44
+ usersGetProfile: GmailEndpoint<'usersGetProfile'>;
45
+ };
46
+ export type GmailBoundEndpoints = BindEndpoints<typeof gmailEndpointsNested>;
47
+ type GmailWebhook<K extends keyof GmailWebhookOutputs, TEvent> = CorsairWebhook<GmailContext, GmailWebhookPayload<TEvent>, GmailWebhookOutputs[K]>;
48
+ export type GmailWebhooks = {
49
+ messageChanged: GmailWebhook<'messageChanged', MessageReceivedEvent | MessageDeletedEvent | MessageLabelChangedEvent>;
50
+ };
51
+ export type GmailBoundWebhooks = BindWebhooks<typeof gmailWebhooksNested>;
52
+ export declare const gmailEndpointsNested: {
53
+ readonly messages: {
54
+ readonly list: GmailEndpoint<"messagesList">;
55
+ readonly get: GmailEndpoint<"messagesGet">;
56
+ readonly send: GmailEndpoint<"messagesSend">;
57
+ readonly delete: GmailEndpoint<"messagesDelete">;
58
+ readonly modify: GmailEndpoint<"messagesModify">;
59
+ readonly batchModify: GmailEndpoint<"messagesBatchModify">;
60
+ readonly trash: GmailEndpoint<"messagesTrash">;
61
+ readonly untrash: GmailEndpoint<"messagesUntrash">;
62
+ };
63
+ readonly labels: {
64
+ readonly list: GmailEndpoint<"labelsList">;
65
+ readonly get: GmailEndpoint<"labelsGet">;
66
+ readonly create: GmailEndpoint<"labelsCreate">;
67
+ readonly update: GmailEndpoint<"labelsUpdate">;
68
+ readonly delete: GmailEndpoint<"labelsDelete">;
69
+ };
70
+ readonly drafts: {
71
+ readonly list: GmailEndpoint<"draftsList">;
72
+ readonly get: GmailEndpoint<"draftsGet">;
73
+ readonly create: GmailEndpoint<"draftsCreate">;
74
+ readonly update: GmailEndpoint<"draftsUpdate">;
75
+ readonly delete: GmailEndpoint<"draftsDelete">;
76
+ readonly send: GmailEndpoint<"draftsSend">;
77
+ };
78
+ readonly threads: {
79
+ readonly list: GmailEndpoint<"threadsList">;
80
+ readonly get: GmailEndpoint<"threadsGet">;
81
+ readonly modify: GmailEndpoint<"threadsModify">;
82
+ readonly delete: GmailEndpoint<"threadsDelete">;
83
+ readonly trash: GmailEndpoint<"threadsTrash">;
84
+ readonly untrash: GmailEndpoint<"threadsUntrash">;
85
+ };
86
+ };
87
+ export declare const gmailEndpointSchemas: {
88
+ readonly 'messages.list': {
89
+ readonly input: import("zod").ZodObject<{
90
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
91
+ q: import("zod").ZodOptional<import("zod").ZodString>;
92
+ maxResults: import("zod").ZodOptional<import("zod").ZodNumber>;
93
+ pageToken: import("zod").ZodOptional<import("zod").ZodString>;
94
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
95
+ includeSpamTrash: import("zod").ZodOptional<import("zod").ZodBoolean>;
96
+ }, "strip", import("zod").ZodTypeAny, {
97
+ userId?: string | undefined;
98
+ q?: string | undefined;
99
+ maxResults?: number | undefined;
100
+ pageToken?: string | undefined;
101
+ labelIds?: string[] | undefined;
102
+ includeSpamTrash?: boolean | undefined;
103
+ }, {
104
+ userId?: string | undefined;
105
+ q?: string | undefined;
106
+ maxResults?: number | undefined;
107
+ pageToken?: string | undefined;
108
+ labelIds?: string[] | undefined;
109
+ includeSpamTrash?: boolean | undefined;
110
+ }>;
111
+ readonly output: import("zod").ZodObject<{
112
+ messages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
113
+ id: import("zod").ZodOptional<import("zod").ZodString>;
114
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
115
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
116
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
117
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
118
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
119
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
120
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
121
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
122
+ }, "strip", import("zod").ZodTypeAny, {
123
+ id?: string | undefined;
124
+ payload?: import("./endpoints").MessagePartShape | undefined;
125
+ labelIds?: string[] | undefined;
126
+ raw?: string | undefined;
127
+ threadId?: string | undefined;
128
+ snippet?: string | undefined;
129
+ historyId?: string | undefined;
130
+ internalDate?: Date | null | undefined;
131
+ sizeEstimate?: number | undefined;
132
+ }, {
133
+ id?: string | undefined;
134
+ payload?: import("./endpoints").MessagePartShape | undefined;
135
+ labelIds?: string[] | undefined;
136
+ raw?: string | undefined;
137
+ threadId?: string | undefined;
138
+ snippet?: string | undefined;
139
+ historyId?: string | undefined;
140
+ internalDate?: string | number | Date | null | undefined;
141
+ sizeEstimate?: number | undefined;
142
+ }>, "many">>;
143
+ nextPageToken: import("zod").ZodOptional<import("zod").ZodString>;
144
+ resultSizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
145
+ }, "strip", import("zod").ZodTypeAny, {
146
+ messages?: {
147
+ id?: string | undefined;
148
+ payload?: import("./endpoints").MessagePartShape | undefined;
149
+ labelIds?: string[] | undefined;
150
+ raw?: string | undefined;
151
+ threadId?: string | undefined;
152
+ snippet?: string | undefined;
153
+ historyId?: string | undefined;
154
+ internalDate?: Date | null | undefined;
155
+ sizeEstimate?: number | undefined;
156
+ }[] | undefined;
157
+ nextPageToken?: string | undefined;
158
+ resultSizeEstimate?: number | undefined;
159
+ }, {
160
+ messages?: {
161
+ id?: string | undefined;
162
+ payload?: import("./endpoints").MessagePartShape | undefined;
163
+ labelIds?: string[] | undefined;
164
+ raw?: string | undefined;
165
+ threadId?: string | undefined;
166
+ snippet?: string | undefined;
167
+ historyId?: string | undefined;
168
+ internalDate?: string | number | Date | null | undefined;
169
+ sizeEstimate?: number | undefined;
170
+ }[] | undefined;
171
+ nextPageToken?: string | undefined;
172
+ resultSizeEstimate?: number | undefined;
173
+ }>;
174
+ };
175
+ readonly 'messages.get': {
176
+ readonly input: import("zod").ZodObject<{
177
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
178
+ id: import("zod").ZodString;
179
+ format: import("zod").ZodOptional<import("zod").ZodEnum<["minimal", "full", "raw", "metadata"]>>;
180
+ metadataHeaders: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
181
+ }, "strip", import("zod").ZodTypeAny, {
182
+ id: string;
183
+ userId?: string | undefined;
184
+ format?: "minimal" | "full" | "raw" | "metadata" | undefined;
185
+ metadataHeaders?: string[] | undefined;
186
+ }, {
187
+ id: string;
188
+ userId?: string | undefined;
189
+ format?: "minimal" | "full" | "raw" | "metadata" | undefined;
190
+ metadataHeaders?: string[] | undefined;
191
+ }>;
192
+ readonly output: import("zod").ZodObject<{
193
+ id: import("zod").ZodOptional<import("zod").ZodString>;
194
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
195
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
196
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
197
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
198
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
199
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
200
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
201
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
202
+ }, "strip", import("zod").ZodTypeAny, {
203
+ id?: string | undefined;
204
+ payload?: import("./endpoints").MessagePartShape | undefined;
205
+ labelIds?: string[] | undefined;
206
+ raw?: string | undefined;
207
+ threadId?: string | undefined;
208
+ snippet?: string | undefined;
209
+ historyId?: string | undefined;
210
+ internalDate?: Date | null | undefined;
211
+ sizeEstimate?: number | undefined;
212
+ }, {
213
+ id?: string | undefined;
214
+ payload?: import("./endpoints").MessagePartShape | undefined;
215
+ labelIds?: string[] | undefined;
216
+ raw?: string | undefined;
217
+ threadId?: string | undefined;
218
+ snippet?: string | undefined;
219
+ historyId?: string | undefined;
220
+ internalDate?: string | number | Date | null | undefined;
221
+ sizeEstimate?: number | undefined;
222
+ }>;
223
+ };
224
+ readonly 'messages.send': {
225
+ readonly input: import("zod").ZodObject<{
226
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
227
+ raw: import("zod").ZodString;
228
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
229
+ }, "strip", import("zod").ZodTypeAny, {
230
+ raw: string;
231
+ userId?: string | undefined;
232
+ threadId?: string | undefined;
233
+ }, {
234
+ raw: string;
235
+ userId?: string | undefined;
236
+ threadId?: string | undefined;
237
+ }>;
238
+ readonly output: import("zod").ZodObject<{
239
+ id: import("zod").ZodOptional<import("zod").ZodString>;
240
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
241
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
242
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
243
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
244
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
245
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
246
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
247
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
248
+ }, "strip", import("zod").ZodTypeAny, {
249
+ id?: string | undefined;
250
+ payload?: import("./endpoints").MessagePartShape | undefined;
251
+ labelIds?: string[] | undefined;
252
+ raw?: string | undefined;
253
+ threadId?: string | undefined;
254
+ snippet?: string | undefined;
255
+ historyId?: string | undefined;
256
+ internalDate?: Date | null | undefined;
257
+ sizeEstimate?: number | undefined;
258
+ }, {
259
+ id?: string | undefined;
260
+ payload?: import("./endpoints").MessagePartShape | undefined;
261
+ labelIds?: string[] | undefined;
262
+ raw?: string | undefined;
263
+ threadId?: string | undefined;
264
+ snippet?: string | undefined;
265
+ historyId?: string | undefined;
266
+ internalDate?: string | number | Date | null | undefined;
267
+ sizeEstimate?: number | undefined;
268
+ }>;
269
+ };
270
+ readonly 'messages.delete': {
271
+ readonly input: import("zod").ZodObject<{
272
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
273
+ id: import("zod").ZodString;
274
+ }, "strip", import("zod").ZodTypeAny, {
275
+ id: string;
276
+ userId?: string | undefined;
277
+ }, {
278
+ id: string;
279
+ userId?: string | undefined;
280
+ }>;
281
+ readonly output: import("zod").ZodVoid;
282
+ };
283
+ readonly 'messages.modify': {
284
+ readonly input: import("zod").ZodObject<{
285
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
286
+ id: import("zod").ZodString;
287
+ addLabelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
288
+ removeLabelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
289
+ }, "strip", import("zod").ZodTypeAny, {
290
+ id: string;
291
+ userId?: string | undefined;
292
+ addLabelIds?: string[] | undefined;
293
+ removeLabelIds?: string[] | undefined;
294
+ }, {
295
+ id: string;
296
+ userId?: string | undefined;
297
+ addLabelIds?: string[] | undefined;
298
+ removeLabelIds?: string[] | undefined;
299
+ }>;
300
+ readonly output: import("zod").ZodObject<{
301
+ id: import("zod").ZodOptional<import("zod").ZodString>;
302
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
303
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
304
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
305
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
306
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
307
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
308
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
309
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
310
+ }, "strip", import("zod").ZodTypeAny, {
311
+ id?: string | undefined;
312
+ payload?: import("./endpoints").MessagePartShape | undefined;
313
+ labelIds?: string[] | undefined;
314
+ raw?: string | undefined;
315
+ threadId?: string | undefined;
316
+ snippet?: string | undefined;
317
+ historyId?: string | undefined;
318
+ internalDate?: Date | null | undefined;
319
+ sizeEstimate?: number | undefined;
320
+ }, {
321
+ id?: string | undefined;
322
+ payload?: import("./endpoints").MessagePartShape | undefined;
323
+ labelIds?: string[] | undefined;
324
+ raw?: string | undefined;
325
+ threadId?: string | undefined;
326
+ snippet?: string | undefined;
327
+ historyId?: string | undefined;
328
+ internalDate?: string | number | Date | null | undefined;
329
+ sizeEstimate?: number | undefined;
330
+ }>;
331
+ };
332
+ readonly 'messages.batchModify': {
333
+ readonly input: import("zod").ZodObject<{
334
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
335
+ ids: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
336
+ addLabelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
337
+ removeLabelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
338
+ }, "strip", import("zod").ZodTypeAny, {
339
+ userId?: string | undefined;
340
+ addLabelIds?: string[] | undefined;
341
+ removeLabelIds?: string[] | undefined;
342
+ ids?: string[] | undefined;
343
+ }, {
344
+ userId?: string | undefined;
345
+ addLabelIds?: string[] | undefined;
346
+ removeLabelIds?: string[] | undefined;
347
+ ids?: string[] | undefined;
348
+ }>;
349
+ readonly output: import("zod").ZodVoid;
350
+ };
351
+ readonly 'messages.trash': {
352
+ readonly input: import("zod").ZodObject<{
353
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
354
+ id: import("zod").ZodString;
355
+ }, "strip", import("zod").ZodTypeAny, {
356
+ id: string;
357
+ userId?: string | undefined;
358
+ }, {
359
+ id: string;
360
+ userId?: string | undefined;
361
+ }>;
362
+ readonly output: import("zod").ZodObject<{
363
+ id: import("zod").ZodOptional<import("zod").ZodString>;
364
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
365
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
366
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
367
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
368
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
369
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
370
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
371
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
372
+ }, "strip", import("zod").ZodTypeAny, {
373
+ id?: string | undefined;
374
+ payload?: import("./endpoints").MessagePartShape | undefined;
375
+ labelIds?: string[] | undefined;
376
+ raw?: string | undefined;
377
+ threadId?: string | undefined;
378
+ snippet?: string | undefined;
379
+ historyId?: string | undefined;
380
+ internalDate?: Date | null | undefined;
381
+ sizeEstimate?: number | undefined;
382
+ }, {
383
+ id?: string | undefined;
384
+ payload?: import("./endpoints").MessagePartShape | undefined;
385
+ labelIds?: string[] | undefined;
386
+ raw?: string | undefined;
387
+ threadId?: string | undefined;
388
+ snippet?: string | undefined;
389
+ historyId?: string | undefined;
390
+ internalDate?: string | number | Date | null | undefined;
391
+ sizeEstimate?: number | undefined;
392
+ }>;
393
+ };
394
+ readonly 'messages.untrash': {
395
+ readonly input: import("zod").ZodObject<{
396
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
397
+ id: import("zod").ZodString;
398
+ }, "strip", import("zod").ZodTypeAny, {
399
+ id: string;
400
+ userId?: string | undefined;
401
+ }, {
402
+ id: string;
403
+ userId?: string | undefined;
404
+ }>;
405
+ readonly output: import("zod").ZodObject<{
406
+ id: import("zod").ZodOptional<import("zod").ZodString>;
407
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
408
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
409
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
410
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
411
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
412
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
413
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
414
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
415
+ }, "strip", import("zod").ZodTypeAny, {
416
+ id?: string | undefined;
417
+ payload?: import("./endpoints").MessagePartShape | undefined;
418
+ labelIds?: string[] | undefined;
419
+ raw?: string | undefined;
420
+ threadId?: string | undefined;
421
+ snippet?: string | undefined;
422
+ historyId?: string | undefined;
423
+ internalDate?: Date | null | undefined;
424
+ sizeEstimate?: number | undefined;
425
+ }, {
426
+ id?: string | undefined;
427
+ payload?: import("./endpoints").MessagePartShape | undefined;
428
+ labelIds?: string[] | undefined;
429
+ raw?: string | undefined;
430
+ threadId?: string | undefined;
431
+ snippet?: string | undefined;
432
+ historyId?: string | undefined;
433
+ internalDate?: string | number | Date | null | undefined;
434
+ sizeEstimate?: number | undefined;
435
+ }>;
436
+ };
437
+ readonly 'labels.list': {
438
+ readonly input: import("zod").ZodObject<{
439
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
440
+ }, "strip", import("zod").ZodTypeAny, {
441
+ userId?: string | undefined;
442
+ }, {
443
+ userId?: string | undefined;
444
+ }>;
445
+ readonly output: import("zod").ZodObject<{
446
+ labels: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
447
+ id: import("zod").ZodOptional<import("zod").ZodString>;
448
+ name: import("zod").ZodOptional<import("zod").ZodString>;
449
+ messageListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["show", "hide"]>>;
450
+ labelListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["labelShow", "labelShowIfUnread", "labelHide"]>>;
451
+ type: import("zod").ZodOptional<import("zod").ZodEnum<["system", "user"]>>;
452
+ messagesTotal: import("zod").ZodOptional<import("zod").ZodNumber>;
453
+ messagesUnread: import("zod").ZodOptional<import("zod").ZodNumber>;
454
+ threadsTotal: import("zod").ZodOptional<import("zod").ZodNumber>;
455
+ threadsUnread: import("zod").ZodOptional<import("zod").ZodNumber>;
456
+ color: import("zod").ZodOptional<import("zod").ZodObject<{
457
+ textColor: import("zod").ZodOptional<import("zod").ZodString>;
458
+ backgroundColor: import("zod").ZodOptional<import("zod").ZodString>;
459
+ }, "strip", import("zod").ZodTypeAny, {
460
+ textColor?: string | undefined;
461
+ backgroundColor?: string | undefined;
462
+ }, {
463
+ textColor?: string | undefined;
464
+ backgroundColor?: string | undefined;
465
+ }>>;
466
+ }, "strip", import("zod").ZodTypeAny, {
467
+ id?: string | undefined;
468
+ name?: string | undefined;
469
+ type?: "system" | "user" | undefined;
470
+ messageListVisibility?: "show" | "hide" | undefined;
471
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
472
+ color?: {
473
+ textColor?: string | undefined;
474
+ backgroundColor?: string | undefined;
475
+ } | undefined;
476
+ messagesTotal?: number | undefined;
477
+ messagesUnread?: number | undefined;
478
+ threadsTotal?: number | undefined;
479
+ threadsUnread?: number | undefined;
480
+ }, {
481
+ id?: string | undefined;
482
+ name?: string | undefined;
483
+ type?: "system" | "user" | undefined;
484
+ messageListVisibility?: "show" | "hide" | undefined;
485
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
486
+ color?: {
487
+ textColor?: string | undefined;
488
+ backgroundColor?: string | undefined;
489
+ } | undefined;
490
+ messagesTotal?: number | undefined;
491
+ messagesUnread?: number | undefined;
492
+ threadsTotal?: number | undefined;
493
+ threadsUnread?: number | undefined;
494
+ }>, "many">>;
495
+ }, "strip", import("zod").ZodTypeAny, {
496
+ labels?: {
497
+ id?: string | undefined;
498
+ name?: string | undefined;
499
+ type?: "system" | "user" | undefined;
500
+ messageListVisibility?: "show" | "hide" | undefined;
501
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
502
+ color?: {
503
+ textColor?: string | undefined;
504
+ backgroundColor?: string | undefined;
505
+ } | undefined;
506
+ messagesTotal?: number | undefined;
507
+ messagesUnread?: number | undefined;
508
+ threadsTotal?: number | undefined;
509
+ threadsUnread?: number | undefined;
510
+ }[] | undefined;
511
+ }, {
512
+ labels?: {
513
+ id?: string | undefined;
514
+ name?: string | undefined;
515
+ type?: "system" | "user" | undefined;
516
+ messageListVisibility?: "show" | "hide" | undefined;
517
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
518
+ color?: {
519
+ textColor?: string | undefined;
520
+ backgroundColor?: string | undefined;
521
+ } | undefined;
522
+ messagesTotal?: number | undefined;
523
+ messagesUnread?: number | undefined;
524
+ threadsTotal?: number | undefined;
525
+ threadsUnread?: number | undefined;
526
+ }[] | undefined;
527
+ }>;
528
+ };
529
+ readonly 'labels.get': {
530
+ readonly input: import("zod").ZodObject<{
531
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
532
+ id: import("zod").ZodString;
533
+ }, "strip", import("zod").ZodTypeAny, {
534
+ id: string;
535
+ userId?: string | undefined;
536
+ }, {
537
+ id: string;
538
+ userId?: string | undefined;
539
+ }>;
540
+ readonly output: import("zod").ZodObject<{
541
+ id: import("zod").ZodOptional<import("zod").ZodString>;
542
+ name: import("zod").ZodOptional<import("zod").ZodString>;
543
+ messageListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["show", "hide"]>>;
544
+ labelListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["labelShow", "labelShowIfUnread", "labelHide"]>>;
545
+ type: import("zod").ZodOptional<import("zod").ZodEnum<["system", "user"]>>;
546
+ messagesTotal: import("zod").ZodOptional<import("zod").ZodNumber>;
547
+ messagesUnread: import("zod").ZodOptional<import("zod").ZodNumber>;
548
+ threadsTotal: import("zod").ZodOptional<import("zod").ZodNumber>;
549
+ threadsUnread: import("zod").ZodOptional<import("zod").ZodNumber>;
550
+ color: import("zod").ZodOptional<import("zod").ZodObject<{
551
+ textColor: import("zod").ZodOptional<import("zod").ZodString>;
552
+ backgroundColor: import("zod").ZodOptional<import("zod").ZodString>;
553
+ }, "strip", import("zod").ZodTypeAny, {
554
+ textColor?: string | undefined;
555
+ backgroundColor?: string | undefined;
556
+ }, {
557
+ textColor?: string | undefined;
558
+ backgroundColor?: string | undefined;
559
+ }>>;
560
+ }, "strip", import("zod").ZodTypeAny, {
561
+ id?: string | undefined;
562
+ name?: string | undefined;
563
+ type?: "system" | "user" | undefined;
564
+ messageListVisibility?: "show" | "hide" | undefined;
565
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
566
+ color?: {
567
+ textColor?: string | undefined;
568
+ backgroundColor?: string | undefined;
569
+ } | undefined;
570
+ messagesTotal?: number | undefined;
571
+ messagesUnread?: number | undefined;
572
+ threadsTotal?: number | undefined;
573
+ threadsUnread?: number | undefined;
574
+ }, {
575
+ id?: string | undefined;
576
+ name?: string | undefined;
577
+ type?: "system" | "user" | undefined;
578
+ messageListVisibility?: "show" | "hide" | undefined;
579
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
580
+ color?: {
581
+ textColor?: string | undefined;
582
+ backgroundColor?: string | undefined;
583
+ } | undefined;
584
+ messagesTotal?: number | undefined;
585
+ messagesUnread?: number | undefined;
586
+ threadsTotal?: number | undefined;
587
+ threadsUnread?: number | undefined;
588
+ }>;
589
+ };
590
+ readonly 'labels.create': {
591
+ readonly input: import("zod").ZodObject<{
592
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
593
+ label: import("zod").ZodObject<{
594
+ name: import("zod").ZodOptional<import("zod").ZodString>;
595
+ messageListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["show", "hide"]>>;
596
+ labelListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["labelShow", "labelShowIfUnread", "labelHide"]>>;
597
+ color: import("zod").ZodOptional<import("zod").ZodObject<{
598
+ textColor: import("zod").ZodOptional<import("zod").ZodString>;
599
+ backgroundColor: import("zod").ZodOptional<import("zod").ZodString>;
600
+ }, "strip", import("zod").ZodTypeAny, {
601
+ textColor?: string | undefined;
602
+ backgroundColor?: string | undefined;
603
+ }, {
604
+ textColor?: string | undefined;
605
+ backgroundColor?: string | undefined;
606
+ }>>;
607
+ }, "strip", import("zod").ZodTypeAny, {
608
+ name?: string | undefined;
609
+ messageListVisibility?: "show" | "hide" | undefined;
610
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
611
+ color?: {
612
+ textColor?: string | undefined;
613
+ backgroundColor?: string | undefined;
614
+ } | undefined;
615
+ }, {
616
+ name?: string | undefined;
617
+ messageListVisibility?: "show" | "hide" | undefined;
618
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
619
+ color?: {
620
+ textColor?: string | undefined;
621
+ backgroundColor?: string | undefined;
622
+ } | undefined;
623
+ }>;
624
+ }, "strip", import("zod").ZodTypeAny, {
625
+ label: {
626
+ name?: string | undefined;
627
+ messageListVisibility?: "show" | "hide" | undefined;
628
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
629
+ color?: {
630
+ textColor?: string | undefined;
631
+ backgroundColor?: string | undefined;
632
+ } | undefined;
633
+ };
634
+ userId?: string | undefined;
635
+ }, {
636
+ label: {
637
+ name?: string | undefined;
638
+ messageListVisibility?: "show" | "hide" | undefined;
639
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
640
+ color?: {
641
+ textColor?: string | undefined;
642
+ backgroundColor?: string | undefined;
643
+ } | undefined;
644
+ };
645
+ userId?: string | undefined;
646
+ }>;
647
+ readonly output: import("zod").ZodObject<{
648
+ id: import("zod").ZodOptional<import("zod").ZodString>;
649
+ name: import("zod").ZodOptional<import("zod").ZodString>;
650
+ messageListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["show", "hide"]>>;
651
+ labelListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["labelShow", "labelShowIfUnread", "labelHide"]>>;
652
+ type: import("zod").ZodOptional<import("zod").ZodEnum<["system", "user"]>>;
653
+ messagesTotal: import("zod").ZodOptional<import("zod").ZodNumber>;
654
+ messagesUnread: import("zod").ZodOptional<import("zod").ZodNumber>;
655
+ threadsTotal: import("zod").ZodOptional<import("zod").ZodNumber>;
656
+ threadsUnread: import("zod").ZodOptional<import("zod").ZodNumber>;
657
+ color: import("zod").ZodOptional<import("zod").ZodObject<{
658
+ textColor: import("zod").ZodOptional<import("zod").ZodString>;
659
+ backgroundColor: import("zod").ZodOptional<import("zod").ZodString>;
660
+ }, "strip", import("zod").ZodTypeAny, {
661
+ textColor?: string | undefined;
662
+ backgroundColor?: string | undefined;
663
+ }, {
664
+ textColor?: string | undefined;
665
+ backgroundColor?: string | undefined;
666
+ }>>;
667
+ }, "strip", import("zod").ZodTypeAny, {
668
+ id?: string | undefined;
669
+ name?: string | undefined;
670
+ type?: "system" | "user" | undefined;
671
+ messageListVisibility?: "show" | "hide" | undefined;
672
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
673
+ color?: {
674
+ textColor?: string | undefined;
675
+ backgroundColor?: string | undefined;
676
+ } | undefined;
677
+ messagesTotal?: number | undefined;
678
+ messagesUnread?: number | undefined;
679
+ threadsTotal?: number | undefined;
680
+ threadsUnread?: number | undefined;
681
+ }, {
682
+ id?: string | undefined;
683
+ name?: string | undefined;
684
+ type?: "system" | "user" | undefined;
685
+ messageListVisibility?: "show" | "hide" | undefined;
686
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
687
+ color?: {
688
+ textColor?: string | undefined;
689
+ backgroundColor?: string | undefined;
690
+ } | undefined;
691
+ messagesTotal?: number | undefined;
692
+ messagesUnread?: number | undefined;
693
+ threadsTotal?: number | undefined;
694
+ threadsUnread?: number | undefined;
695
+ }>;
696
+ };
697
+ readonly 'labels.update': {
698
+ readonly input: import("zod").ZodObject<{
699
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
700
+ id: import("zod").ZodString;
701
+ label: import("zod").ZodObject<{
702
+ name: import("zod").ZodOptional<import("zod").ZodString>;
703
+ messageListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["show", "hide"]>>;
704
+ labelListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["labelShow", "labelShowIfUnread", "labelHide"]>>;
705
+ color: import("zod").ZodOptional<import("zod").ZodObject<{
706
+ textColor: import("zod").ZodOptional<import("zod").ZodString>;
707
+ backgroundColor: import("zod").ZodOptional<import("zod").ZodString>;
708
+ }, "strip", import("zod").ZodTypeAny, {
709
+ textColor?: string | undefined;
710
+ backgroundColor?: string | undefined;
711
+ }, {
712
+ textColor?: string | undefined;
713
+ backgroundColor?: string | undefined;
714
+ }>>;
715
+ }, "strip", import("zod").ZodTypeAny, {
716
+ name?: string | undefined;
717
+ messageListVisibility?: "show" | "hide" | undefined;
718
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
719
+ color?: {
720
+ textColor?: string | undefined;
721
+ backgroundColor?: string | undefined;
722
+ } | undefined;
723
+ }, {
724
+ name?: string | undefined;
725
+ messageListVisibility?: "show" | "hide" | undefined;
726
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
727
+ color?: {
728
+ textColor?: string | undefined;
729
+ backgroundColor?: string | undefined;
730
+ } | undefined;
731
+ }>;
732
+ }, "strip", import("zod").ZodTypeAny, {
733
+ id: string;
734
+ label: {
735
+ name?: string | undefined;
736
+ messageListVisibility?: "show" | "hide" | undefined;
737
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
738
+ color?: {
739
+ textColor?: string | undefined;
740
+ backgroundColor?: string | undefined;
741
+ } | undefined;
742
+ };
743
+ userId?: string | undefined;
744
+ }, {
745
+ id: string;
746
+ label: {
747
+ name?: string | undefined;
748
+ messageListVisibility?: "show" | "hide" | undefined;
749
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
750
+ color?: {
751
+ textColor?: string | undefined;
752
+ backgroundColor?: string | undefined;
753
+ } | undefined;
754
+ };
755
+ userId?: string | undefined;
756
+ }>;
757
+ readonly output: import("zod").ZodObject<{
758
+ id: import("zod").ZodOptional<import("zod").ZodString>;
759
+ name: import("zod").ZodOptional<import("zod").ZodString>;
760
+ messageListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["show", "hide"]>>;
761
+ labelListVisibility: import("zod").ZodOptional<import("zod").ZodEnum<["labelShow", "labelShowIfUnread", "labelHide"]>>;
762
+ type: import("zod").ZodOptional<import("zod").ZodEnum<["system", "user"]>>;
763
+ messagesTotal: import("zod").ZodOptional<import("zod").ZodNumber>;
764
+ messagesUnread: import("zod").ZodOptional<import("zod").ZodNumber>;
765
+ threadsTotal: import("zod").ZodOptional<import("zod").ZodNumber>;
766
+ threadsUnread: import("zod").ZodOptional<import("zod").ZodNumber>;
767
+ color: import("zod").ZodOptional<import("zod").ZodObject<{
768
+ textColor: import("zod").ZodOptional<import("zod").ZodString>;
769
+ backgroundColor: import("zod").ZodOptional<import("zod").ZodString>;
770
+ }, "strip", import("zod").ZodTypeAny, {
771
+ textColor?: string | undefined;
772
+ backgroundColor?: string | undefined;
773
+ }, {
774
+ textColor?: string | undefined;
775
+ backgroundColor?: string | undefined;
776
+ }>>;
777
+ }, "strip", import("zod").ZodTypeAny, {
778
+ id?: string | undefined;
779
+ name?: string | undefined;
780
+ type?: "system" | "user" | undefined;
781
+ messageListVisibility?: "show" | "hide" | undefined;
782
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
783
+ color?: {
784
+ textColor?: string | undefined;
785
+ backgroundColor?: string | undefined;
786
+ } | undefined;
787
+ messagesTotal?: number | undefined;
788
+ messagesUnread?: number | undefined;
789
+ threadsTotal?: number | undefined;
790
+ threadsUnread?: number | undefined;
791
+ }, {
792
+ id?: string | undefined;
793
+ name?: string | undefined;
794
+ type?: "system" | "user" | undefined;
795
+ messageListVisibility?: "show" | "hide" | undefined;
796
+ labelListVisibility?: "labelShow" | "labelShowIfUnread" | "labelHide" | undefined;
797
+ color?: {
798
+ textColor?: string | undefined;
799
+ backgroundColor?: string | undefined;
800
+ } | undefined;
801
+ messagesTotal?: number | undefined;
802
+ messagesUnread?: number | undefined;
803
+ threadsTotal?: number | undefined;
804
+ threadsUnread?: number | undefined;
805
+ }>;
806
+ };
807
+ readonly 'labels.delete': {
808
+ readonly input: import("zod").ZodObject<{
809
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
810
+ id: import("zod").ZodString;
811
+ }, "strip", import("zod").ZodTypeAny, {
812
+ id: string;
813
+ userId?: string | undefined;
814
+ }, {
815
+ id: string;
816
+ userId?: string | undefined;
817
+ }>;
818
+ readonly output: import("zod").ZodVoid;
819
+ };
820
+ readonly 'drafts.list': {
821
+ readonly input: import("zod").ZodObject<{
822
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
823
+ maxResults: import("zod").ZodOptional<import("zod").ZodNumber>;
824
+ pageToken: import("zod").ZodOptional<import("zod").ZodString>;
825
+ q: import("zod").ZodOptional<import("zod").ZodString>;
826
+ }, "strip", import("zod").ZodTypeAny, {
827
+ userId?: string | undefined;
828
+ q?: string | undefined;
829
+ maxResults?: number | undefined;
830
+ pageToken?: string | undefined;
831
+ }, {
832
+ userId?: string | undefined;
833
+ q?: string | undefined;
834
+ maxResults?: number | undefined;
835
+ pageToken?: string | undefined;
836
+ }>;
837
+ readonly output: import("zod").ZodObject<{
838
+ drafts: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
839
+ id: import("zod").ZodOptional<import("zod").ZodString>;
840
+ message: import("zod").ZodOptional<import("zod").ZodObject<{
841
+ id: import("zod").ZodOptional<import("zod").ZodString>;
842
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
843
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
844
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
845
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
846
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
847
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
848
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
849
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
850
+ }, "strip", import("zod").ZodTypeAny, {
851
+ id?: string | undefined;
852
+ payload?: import("./endpoints").MessagePartShape | undefined;
853
+ labelIds?: string[] | undefined;
854
+ raw?: string | undefined;
855
+ threadId?: string | undefined;
856
+ snippet?: string | undefined;
857
+ historyId?: string | undefined;
858
+ internalDate?: Date | null | undefined;
859
+ sizeEstimate?: number | undefined;
860
+ }, {
861
+ id?: string | undefined;
862
+ payload?: import("./endpoints").MessagePartShape | undefined;
863
+ labelIds?: string[] | undefined;
864
+ raw?: string | undefined;
865
+ threadId?: string | undefined;
866
+ snippet?: string | undefined;
867
+ historyId?: string | undefined;
868
+ internalDate?: string | number | Date | null | undefined;
869
+ sizeEstimate?: number | undefined;
870
+ }>>;
871
+ }, "strip", import("zod").ZodTypeAny, {
872
+ id?: string | undefined;
873
+ message?: {
874
+ id?: string | undefined;
875
+ payload?: import("./endpoints").MessagePartShape | undefined;
876
+ labelIds?: string[] | undefined;
877
+ raw?: string | undefined;
878
+ threadId?: string | undefined;
879
+ snippet?: string | undefined;
880
+ historyId?: string | undefined;
881
+ internalDate?: Date | null | undefined;
882
+ sizeEstimate?: number | undefined;
883
+ } | undefined;
884
+ }, {
885
+ id?: string | undefined;
886
+ message?: {
887
+ id?: string | undefined;
888
+ payload?: import("./endpoints").MessagePartShape | undefined;
889
+ labelIds?: string[] | undefined;
890
+ raw?: string | undefined;
891
+ threadId?: string | undefined;
892
+ snippet?: string | undefined;
893
+ historyId?: string | undefined;
894
+ internalDate?: string | number | Date | null | undefined;
895
+ sizeEstimate?: number | undefined;
896
+ } | undefined;
897
+ }>, "many">>;
898
+ nextPageToken: import("zod").ZodOptional<import("zod").ZodString>;
899
+ resultSizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
900
+ }, "strip", import("zod").ZodTypeAny, {
901
+ nextPageToken?: string | undefined;
902
+ resultSizeEstimate?: number | undefined;
903
+ drafts?: {
904
+ id?: string | undefined;
905
+ message?: {
906
+ id?: string | undefined;
907
+ payload?: import("./endpoints").MessagePartShape | undefined;
908
+ labelIds?: string[] | undefined;
909
+ raw?: string | undefined;
910
+ threadId?: string | undefined;
911
+ snippet?: string | undefined;
912
+ historyId?: string | undefined;
913
+ internalDate?: Date | null | undefined;
914
+ sizeEstimate?: number | undefined;
915
+ } | undefined;
916
+ }[] | undefined;
917
+ }, {
918
+ nextPageToken?: string | undefined;
919
+ resultSizeEstimate?: number | undefined;
920
+ drafts?: {
921
+ id?: string | undefined;
922
+ message?: {
923
+ id?: string | undefined;
924
+ payload?: import("./endpoints").MessagePartShape | undefined;
925
+ labelIds?: string[] | undefined;
926
+ raw?: string | undefined;
927
+ threadId?: string | undefined;
928
+ snippet?: string | undefined;
929
+ historyId?: string | undefined;
930
+ internalDate?: string | number | Date | null | undefined;
931
+ sizeEstimate?: number | undefined;
932
+ } | undefined;
933
+ }[] | undefined;
934
+ }>;
935
+ };
936
+ readonly 'drafts.get': {
937
+ readonly input: import("zod").ZodObject<{
938
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
939
+ id: import("zod").ZodString;
940
+ format: import("zod").ZodOptional<import("zod").ZodEnum<["minimal", "full", "raw", "metadata"]>>;
941
+ }, "strip", import("zod").ZodTypeAny, {
942
+ id: string;
943
+ userId?: string | undefined;
944
+ format?: "minimal" | "full" | "raw" | "metadata" | undefined;
945
+ }, {
946
+ id: string;
947
+ userId?: string | undefined;
948
+ format?: "minimal" | "full" | "raw" | "metadata" | undefined;
949
+ }>;
950
+ readonly output: import("zod").ZodObject<{
951
+ id: import("zod").ZodOptional<import("zod").ZodString>;
952
+ message: import("zod").ZodOptional<import("zod").ZodObject<{
953
+ id: import("zod").ZodOptional<import("zod").ZodString>;
954
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
955
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
956
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
957
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
958
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
959
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
960
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
961
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
962
+ }, "strip", import("zod").ZodTypeAny, {
963
+ id?: string | undefined;
964
+ payload?: import("./endpoints").MessagePartShape | undefined;
965
+ labelIds?: string[] | undefined;
966
+ raw?: string | undefined;
967
+ threadId?: string | undefined;
968
+ snippet?: string | undefined;
969
+ historyId?: string | undefined;
970
+ internalDate?: Date | null | undefined;
971
+ sizeEstimate?: number | undefined;
972
+ }, {
973
+ id?: string | undefined;
974
+ payload?: import("./endpoints").MessagePartShape | undefined;
975
+ labelIds?: string[] | undefined;
976
+ raw?: string | undefined;
977
+ threadId?: string | undefined;
978
+ snippet?: string | undefined;
979
+ historyId?: string | undefined;
980
+ internalDate?: string | number | Date | null | undefined;
981
+ sizeEstimate?: number | undefined;
982
+ }>>;
983
+ }, "strip", import("zod").ZodTypeAny, {
984
+ id?: string | undefined;
985
+ message?: {
986
+ id?: string | undefined;
987
+ payload?: import("./endpoints").MessagePartShape | undefined;
988
+ labelIds?: string[] | undefined;
989
+ raw?: string | undefined;
990
+ threadId?: string | undefined;
991
+ snippet?: string | undefined;
992
+ historyId?: string | undefined;
993
+ internalDate?: Date | null | undefined;
994
+ sizeEstimate?: number | undefined;
995
+ } | undefined;
996
+ }, {
997
+ id?: string | undefined;
998
+ message?: {
999
+ id?: string | undefined;
1000
+ payload?: import("./endpoints").MessagePartShape | undefined;
1001
+ labelIds?: string[] | undefined;
1002
+ raw?: string | undefined;
1003
+ threadId?: string | undefined;
1004
+ snippet?: string | undefined;
1005
+ historyId?: string | undefined;
1006
+ internalDate?: string | number | Date | null | undefined;
1007
+ sizeEstimate?: number | undefined;
1008
+ } | undefined;
1009
+ }>;
1010
+ };
1011
+ readonly 'drafts.create': {
1012
+ readonly input: import("zod").ZodObject<{
1013
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1014
+ draft: import("zod").ZodObject<{
1015
+ message: import("zod").ZodOptional<import("zod").ZodObject<{
1016
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
1017
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
1018
+ }, "strip", import("zod").ZodTypeAny, {
1019
+ raw?: string | undefined;
1020
+ threadId?: string | undefined;
1021
+ }, {
1022
+ raw?: string | undefined;
1023
+ threadId?: string | undefined;
1024
+ }>>;
1025
+ }, "strip", import("zod").ZodTypeAny, {
1026
+ message?: {
1027
+ raw?: string | undefined;
1028
+ threadId?: string | undefined;
1029
+ } | undefined;
1030
+ }, {
1031
+ message?: {
1032
+ raw?: string | undefined;
1033
+ threadId?: string | undefined;
1034
+ } | undefined;
1035
+ }>;
1036
+ }, "strip", import("zod").ZodTypeAny, {
1037
+ draft: {
1038
+ message?: {
1039
+ raw?: string | undefined;
1040
+ threadId?: string | undefined;
1041
+ } | undefined;
1042
+ };
1043
+ userId?: string | undefined;
1044
+ }, {
1045
+ draft: {
1046
+ message?: {
1047
+ raw?: string | undefined;
1048
+ threadId?: string | undefined;
1049
+ } | undefined;
1050
+ };
1051
+ userId?: string | undefined;
1052
+ }>;
1053
+ readonly output: import("zod").ZodObject<{
1054
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1055
+ message: import("zod").ZodOptional<import("zod").ZodObject<{
1056
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1057
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
1058
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1059
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1060
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1061
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
1062
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
1063
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
1064
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
1065
+ }, "strip", import("zod").ZodTypeAny, {
1066
+ id?: string | undefined;
1067
+ payload?: import("./endpoints").MessagePartShape | undefined;
1068
+ labelIds?: string[] | undefined;
1069
+ raw?: string | undefined;
1070
+ threadId?: string | undefined;
1071
+ snippet?: string | undefined;
1072
+ historyId?: string | undefined;
1073
+ internalDate?: Date | null | undefined;
1074
+ sizeEstimate?: number | undefined;
1075
+ }, {
1076
+ id?: string | undefined;
1077
+ payload?: import("./endpoints").MessagePartShape | undefined;
1078
+ labelIds?: string[] | undefined;
1079
+ raw?: string | undefined;
1080
+ threadId?: string | undefined;
1081
+ snippet?: string | undefined;
1082
+ historyId?: string | undefined;
1083
+ internalDate?: string | number | Date | null | undefined;
1084
+ sizeEstimate?: number | undefined;
1085
+ }>>;
1086
+ }, "strip", import("zod").ZodTypeAny, {
1087
+ id?: string | undefined;
1088
+ message?: {
1089
+ id?: string | undefined;
1090
+ payload?: import("./endpoints").MessagePartShape | undefined;
1091
+ labelIds?: string[] | undefined;
1092
+ raw?: string | undefined;
1093
+ threadId?: string | undefined;
1094
+ snippet?: string | undefined;
1095
+ historyId?: string | undefined;
1096
+ internalDate?: Date | null | undefined;
1097
+ sizeEstimate?: number | undefined;
1098
+ } | undefined;
1099
+ }, {
1100
+ id?: string | undefined;
1101
+ message?: {
1102
+ id?: string | undefined;
1103
+ payload?: import("./endpoints").MessagePartShape | undefined;
1104
+ labelIds?: string[] | undefined;
1105
+ raw?: string | undefined;
1106
+ threadId?: string | undefined;
1107
+ snippet?: string | undefined;
1108
+ historyId?: string | undefined;
1109
+ internalDate?: string | number | Date | null | undefined;
1110
+ sizeEstimate?: number | undefined;
1111
+ } | undefined;
1112
+ }>;
1113
+ };
1114
+ readonly 'drafts.update': {
1115
+ readonly input: import("zod").ZodObject<{
1116
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1117
+ id: import("zod").ZodString;
1118
+ draft: import("zod").ZodObject<{
1119
+ message: import("zod").ZodOptional<import("zod").ZodObject<{
1120
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
1121
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
1122
+ }, "strip", import("zod").ZodTypeAny, {
1123
+ raw?: string | undefined;
1124
+ threadId?: string | undefined;
1125
+ }, {
1126
+ raw?: string | undefined;
1127
+ threadId?: string | undefined;
1128
+ }>>;
1129
+ }, "strip", import("zod").ZodTypeAny, {
1130
+ message?: {
1131
+ raw?: string | undefined;
1132
+ threadId?: string | undefined;
1133
+ } | undefined;
1134
+ }, {
1135
+ message?: {
1136
+ raw?: string | undefined;
1137
+ threadId?: string | undefined;
1138
+ } | undefined;
1139
+ }>;
1140
+ }, "strip", import("zod").ZodTypeAny, {
1141
+ id: string;
1142
+ draft: {
1143
+ message?: {
1144
+ raw?: string | undefined;
1145
+ threadId?: string | undefined;
1146
+ } | undefined;
1147
+ };
1148
+ userId?: string | undefined;
1149
+ }, {
1150
+ id: string;
1151
+ draft: {
1152
+ message?: {
1153
+ raw?: string | undefined;
1154
+ threadId?: string | undefined;
1155
+ } | undefined;
1156
+ };
1157
+ userId?: string | undefined;
1158
+ }>;
1159
+ readonly output: import("zod").ZodObject<{
1160
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1161
+ message: import("zod").ZodOptional<import("zod").ZodObject<{
1162
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1163
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
1164
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1165
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1166
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1167
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
1168
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
1169
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
1170
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
1171
+ }, "strip", import("zod").ZodTypeAny, {
1172
+ id?: string | undefined;
1173
+ payload?: import("./endpoints").MessagePartShape | undefined;
1174
+ labelIds?: string[] | undefined;
1175
+ raw?: string | undefined;
1176
+ threadId?: string | undefined;
1177
+ snippet?: string | undefined;
1178
+ historyId?: string | undefined;
1179
+ internalDate?: Date | null | undefined;
1180
+ sizeEstimate?: number | undefined;
1181
+ }, {
1182
+ id?: string | undefined;
1183
+ payload?: import("./endpoints").MessagePartShape | undefined;
1184
+ labelIds?: string[] | undefined;
1185
+ raw?: string | undefined;
1186
+ threadId?: string | undefined;
1187
+ snippet?: string | undefined;
1188
+ historyId?: string | undefined;
1189
+ internalDate?: string | number | Date | null | undefined;
1190
+ sizeEstimate?: number | undefined;
1191
+ }>>;
1192
+ }, "strip", import("zod").ZodTypeAny, {
1193
+ id?: string | undefined;
1194
+ message?: {
1195
+ id?: string | undefined;
1196
+ payload?: import("./endpoints").MessagePartShape | undefined;
1197
+ labelIds?: string[] | undefined;
1198
+ raw?: string | undefined;
1199
+ threadId?: string | undefined;
1200
+ snippet?: string | undefined;
1201
+ historyId?: string | undefined;
1202
+ internalDate?: Date | null | undefined;
1203
+ sizeEstimate?: number | undefined;
1204
+ } | undefined;
1205
+ }, {
1206
+ id?: string | undefined;
1207
+ message?: {
1208
+ id?: string | undefined;
1209
+ payload?: import("./endpoints").MessagePartShape | undefined;
1210
+ labelIds?: string[] | undefined;
1211
+ raw?: string | undefined;
1212
+ threadId?: string | undefined;
1213
+ snippet?: string | undefined;
1214
+ historyId?: string | undefined;
1215
+ internalDate?: string | number | Date | null | undefined;
1216
+ sizeEstimate?: number | undefined;
1217
+ } | undefined;
1218
+ }>;
1219
+ };
1220
+ readonly 'drafts.delete': {
1221
+ readonly input: import("zod").ZodObject<{
1222
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1223
+ id: import("zod").ZodString;
1224
+ }, "strip", import("zod").ZodTypeAny, {
1225
+ id: string;
1226
+ userId?: string | undefined;
1227
+ }, {
1228
+ id: string;
1229
+ userId?: string | undefined;
1230
+ }>;
1231
+ readonly output: import("zod").ZodVoid;
1232
+ };
1233
+ readonly 'drafts.send': {
1234
+ readonly input: import("zod").ZodObject<{
1235
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1236
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1237
+ message: import("zod").ZodOptional<import("zod").ZodObject<{
1238
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
1239
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
1240
+ }, "strip", import("zod").ZodTypeAny, {
1241
+ raw?: string | undefined;
1242
+ threadId?: string | undefined;
1243
+ }, {
1244
+ raw?: string | undefined;
1245
+ threadId?: string | undefined;
1246
+ }>>;
1247
+ }, "strip", import("zod").ZodTypeAny, {
1248
+ id?: string | undefined;
1249
+ message?: {
1250
+ raw?: string | undefined;
1251
+ threadId?: string | undefined;
1252
+ } | undefined;
1253
+ userId?: string | undefined;
1254
+ }, {
1255
+ id?: string | undefined;
1256
+ message?: {
1257
+ raw?: string | undefined;
1258
+ threadId?: string | undefined;
1259
+ } | undefined;
1260
+ userId?: string | undefined;
1261
+ }>;
1262
+ readonly output: import("zod").ZodObject<{
1263
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1264
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
1265
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1266
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1267
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1268
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
1269
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
1270
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
1271
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
1272
+ }, "strip", import("zod").ZodTypeAny, {
1273
+ id?: string | undefined;
1274
+ payload?: import("./endpoints").MessagePartShape | undefined;
1275
+ labelIds?: string[] | undefined;
1276
+ raw?: string | undefined;
1277
+ threadId?: string | undefined;
1278
+ snippet?: string | undefined;
1279
+ historyId?: string | undefined;
1280
+ internalDate?: Date | null | undefined;
1281
+ sizeEstimate?: number | undefined;
1282
+ }, {
1283
+ id?: string | undefined;
1284
+ payload?: import("./endpoints").MessagePartShape | undefined;
1285
+ labelIds?: string[] | undefined;
1286
+ raw?: string | undefined;
1287
+ threadId?: string | undefined;
1288
+ snippet?: string | undefined;
1289
+ historyId?: string | undefined;
1290
+ internalDate?: string | number | Date | null | undefined;
1291
+ sizeEstimate?: number | undefined;
1292
+ }>;
1293
+ };
1294
+ readonly 'threads.list': {
1295
+ readonly input: import("zod").ZodObject<{
1296
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1297
+ q: import("zod").ZodOptional<import("zod").ZodString>;
1298
+ maxResults: import("zod").ZodOptional<import("zod").ZodNumber>;
1299
+ pageToken: import("zod").ZodOptional<import("zod").ZodString>;
1300
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1301
+ includeSpamTrash: import("zod").ZodOptional<import("zod").ZodBoolean>;
1302
+ }, "strip", import("zod").ZodTypeAny, {
1303
+ userId?: string | undefined;
1304
+ q?: string | undefined;
1305
+ maxResults?: number | undefined;
1306
+ pageToken?: string | undefined;
1307
+ labelIds?: string[] | undefined;
1308
+ includeSpamTrash?: boolean | undefined;
1309
+ }, {
1310
+ userId?: string | undefined;
1311
+ q?: string | undefined;
1312
+ maxResults?: number | undefined;
1313
+ pageToken?: string | undefined;
1314
+ labelIds?: string[] | undefined;
1315
+ includeSpamTrash?: boolean | undefined;
1316
+ }>;
1317
+ readonly output: import("zod").ZodObject<{
1318
+ threads: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1319
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1320
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1321
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1322
+ messages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1323
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1324
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
1325
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1326
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1327
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1328
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
1329
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
1330
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
1331
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
1332
+ }, "strip", import("zod").ZodTypeAny, {
1333
+ id?: string | undefined;
1334
+ payload?: import("./endpoints").MessagePartShape | undefined;
1335
+ labelIds?: string[] | undefined;
1336
+ raw?: string | undefined;
1337
+ threadId?: string | undefined;
1338
+ snippet?: string | undefined;
1339
+ historyId?: string | undefined;
1340
+ internalDate?: Date | null | undefined;
1341
+ sizeEstimate?: number | undefined;
1342
+ }, {
1343
+ id?: string | undefined;
1344
+ payload?: import("./endpoints").MessagePartShape | undefined;
1345
+ labelIds?: string[] | undefined;
1346
+ raw?: string | undefined;
1347
+ threadId?: string | undefined;
1348
+ snippet?: string | undefined;
1349
+ historyId?: string | undefined;
1350
+ internalDate?: string | number | Date | null | undefined;
1351
+ sizeEstimate?: number | undefined;
1352
+ }>, "many">>;
1353
+ }, "strip", import("zod").ZodTypeAny, {
1354
+ id?: string | undefined;
1355
+ snippet?: string | undefined;
1356
+ historyId?: string | undefined;
1357
+ messages?: {
1358
+ id?: string | undefined;
1359
+ payload?: import("./endpoints").MessagePartShape | undefined;
1360
+ labelIds?: string[] | undefined;
1361
+ raw?: string | undefined;
1362
+ threadId?: string | undefined;
1363
+ snippet?: string | undefined;
1364
+ historyId?: string | undefined;
1365
+ internalDate?: Date | null | undefined;
1366
+ sizeEstimate?: number | undefined;
1367
+ }[] | undefined;
1368
+ }, {
1369
+ id?: string | undefined;
1370
+ snippet?: string | undefined;
1371
+ historyId?: string | undefined;
1372
+ messages?: {
1373
+ id?: string | undefined;
1374
+ payload?: import("./endpoints").MessagePartShape | undefined;
1375
+ labelIds?: string[] | undefined;
1376
+ raw?: string | undefined;
1377
+ threadId?: string | undefined;
1378
+ snippet?: string | undefined;
1379
+ historyId?: string | undefined;
1380
+ internalDate?: string | number | Date | null | undefined;
1381
+ sizeEstimate?: number | undefined;
1382
+ }[] | undefined;
1383
+ }>, "many">>;
1384
+ nextPageToken: import("zod").ZodOptional<import("zod").ZodString>;
1385
+ resultSizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
1386
+ }, "strip", import("zod").ZodTypeAny, {
1387
+ nextPageToken?: string | undefined;
1388
+ resultSizeEstimate?: number | undefined;
1389
+ threads?: {
1390
+ id?: string | undefined;
1391
+ snippet?: string | undefined;
1392
+ historyId?: string | undefined;
1393
+ messages?: {
1394
+ id?: string | undefined;
1395
+ payload?: import("./endpoints").MessagePartShape | undefined;
1396
+ labelIds?: string[] | undefined;
1397
+ raw?: string | undefined;
1398
+ threadId?: string | undefined;
1399
+ snippet?: string | undefined;
1400
+ historyId?: string | undefined;
1401
+ internalDate?: Date | null | undefined;
1402
+ sizeEstimate?: number | undefined;
1403
+ }[] | undefined;
1404
+ }[] | undefined;
1405
+ }, {
1406
+ nextPageToken?: string | undefined;
1407
+ resultSizeEstimate?: number | undefined;
1408
+ threads?: {
1409
+ id?: string | undefined;
1410
+ snippet?: string | undefined;
1411
+ historyId?: string | undefined;
1412
+ messages?: {
1413
+ id?: string | undefined;
1414
+ payload?: import("./endpoints").MessagePartShape | undefined;
1415
+ labelIds?: string[] | undefined;
1416
+ raw?: string | undefined;
1417
+ threadId?: string | undefined;
1418
+ snippet?: string | undefined;
1419
+ historyId?: string | undefined;
1420
+ internalDate?: string | number | Date | null | undefined;
1421
+ sizeEstimate?: number | undefined;
1422
+ }[] | undefined;
1423
+ }[] | undefined;
1424
+ }>;
1425
+ };
1426
+ readonly 'threads.get': {
1427
+ readonly input: import("zod").ZodObject<{
1428
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1429
+ id: import("zod").ZodString;
1430
+ format: import("zod").ZodOptional<import("zod").ZodEnum<["minimal", "full", "metadata"]>>;
1431
+ metadataHeaders: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1432
+ }, "strip", import("zod").ZodTypeAny, {
1433
+ id: string;
1434
+ userId?: string | undefined;
1435
+ format?: "minimal" | "full" | "metadata" | undefined;
1436
+ metadataHeaders?: string[] | undefined;
1437
+ }, {
1438
+ id: string;
1439
+ userId?: string | undefined;
1440
+ format?: "minimal" | "full" | "metadata" | undefined;
1441
+ metadataHeaders?: string[] | undefined;
1442
+ }>;
1443
+ readonly output: import("zod").ZodObject<{
1444
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1445
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1446
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1447
+ messages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1448
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1449
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
1450
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1451
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1452
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1453
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
1454
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
1455
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
1456
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
1457
+ }, "strip", import("zod").ZodTypeAny, {
1458
+ id?: string | undefined;
1459
+ payload?: import("./endpoints").MessagePartShape | undefined;
1460
+ labelIds?: string[] | undefined;
1461
+ raw?: string | undefined;
1462
+ threadId?: string | undefined;
1463
+ snippet?: string | undefined;
1464
+ historyId?: string | undefined;
1465
+ internalDate?: Date | null | undefined;
1466
+ sizeEstimate?: number | undefined;
1467
+ }, {
1468
+ id?: string | undefined;
1469
+ payload?: import("./endpoints").MessagePartShape | undefined;
1470
+ labelIds?: string[] | undefined;
1471
+ raw?: string | undefined;
1472
+ threadId?: string | undefined;
1473
+ snippet?: string | undefined;
1474
+ historyId?: string | undefined;
1475
+ internalDate?: string | number | Date | null | undefined;
1476
+ sizeEstimate?: number | undefined;
1477
+ }>, "many">>;
1478
+ }, "strip", import("zod").ZodTypeAny, {
1479
+ id?: string | undefined;
1480
+ snippet?: string | undefined;
1481
+ historyId?: string | undefined;
1482
+ messages?: {
1483
+ id?: string | undefined;
1484
+ payload?: import("./endpoints").MessagePartShape | undefined;
1485
+ labelIds?: string[] | undefined;
1486
+ raw?: string | undefined;
1487
+ threadId?: string | undefined;
1488
+ snippet?: string | undefined;
1489
+ historyId?: string | undefined;
1490
+ internalDate?: Date | null | undefined;
1491
+ sizeEstimate?: number | undefined;
1492
+ }[] | undefined;
1493
+ }, {
1494
+ id?: string | undefined;
1495
+ snippet?: string | undefined;
1496
+ historyId?: string | undefined;
1497
+ messages?: {
1498
+ id?: string | undefined;
1499
+ payload?: import("./endpoints").MessagePartShape | undefined;
1500
+ labelIds?: string[] | undefined;
1501
+ raw?: string | undefined;
1502
+ threadId?: string | undefined;
1503
+ snippet?: string | undefined;
1504
+ historyId?: string | undefined;
1505
+ internalDate?: string | number | Date | null | undefined;
1506
+ sizeEstimate?: number | undefined;
1507
+ }[] | undefined;
1508
+ }>;
1509
+ };
1510
+ readonly 'threads.modify': {
1511
+ readonly input: import("zod").ZodObject<{
1512
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1513
+ id: import("zod").ZodString;
1514
+ addLabelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1515
+ removeLabelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1516
+ }, "strip", import("zod").ZodTypeAny, {
1517
+ id: string;
1518
+ userId?: string | undefined;
1519
+ addLabelIds?: string[] | undefined;
1520
+ removeLabelIds?: string[] | undefined;
1521
+ }, {
1522
+ id: string;
1523
+ userId?: string | undefined;
1524
+ addLabelIds?: string[] | undefined;
1525
+ removeLabelIds?: string[] | undefined;
1526
+ }>;
1527
+ readonly output: import("zod").ZodObject<{
1528
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1529
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1530
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1531
+ messages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1532
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1533
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
1534
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1535
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1536
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1537
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
1538
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
1539
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
1540
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
1541
+ }, "strip", import("zod").ZodTypeAny, {
1542
+ id?: string | undefined;
1543
+ payload?: import("./endpoints").MessagePartShape | undefined;
1544
+ labelIds?: string[] | undefined;
1545
+ raw?: string | undefined;
1546
+ threadId?: string | undefined;
1547
+ snippet?: string | undefined;
1548
+ historyId?: string | undefined;
1549
+ internalDate?: Date | null | undefined;
1550
+ sizeEstimate?: number | undefined;
1551
+ }, {
1552
+ id?: string | undefined;
1553
+ payload?: import("./endpoints").MessagePartShape | undefined;
1554
+ labelIds?: string[] | undefined;
1555
+ raw?: string | undefined;
1556
+ threadId?: string | undefined;
1557
+ snippet?: string | undefined;
1558
+ historyId?: string | undefined;
1559
+ internalDate?: string | number | Date | null | undefined;
1560
+ sizeEstimate?: number | undefined;
1561
+ }>, "many">>;
1562
+ }, "strip", import("zod").ZodTypeAny, {
1563
+ id?: string | undefined;
1564
+ snippet?: string | undefined;
1565
+ historyId?: string | undefined;
1566
+ messages?: {
1567
+ id?: string | undefined;
1568
+ payload?: import("./endpoints").MessagePartShape | undefined;
1569
+ labelIds?: string[] | undefined;
1570
+ raw?: string | undefined;
1571
+ threadId?: string | undefined;
1572
+ snippet?: string | undefined;
1573
+ historyId?: string | undefined;
1574
+ internalDate?: Date | null | undefined;
1575
+ sizeEstimate?: number | undefined;
1576
+ }[] | undefined;
1577
+ }, {
1578
+ id?: string | undefined;
1579
+ snippet?: string | undefined;
1580
+ historyId?: string | undefined;
1581
+ messages?: {
1582
+ id?: string | undefined;
1583
+ payload?: import("./endpoints").MessagePartShape | undefined;
1584
+ labelIds?: string[] | undefined;
1585
+ raw?: string | undefined;
1586
+ threadId?: string | undefined;
1587
+ snippet?: string | undefined;
1588
+ historyId?: string | undefined;
1589
+ internalDate?: string | number | Date | null | undefined;
1590
+ sizeEstimate?: number | undefined;
1591
+ }[] | undefined;
1592
+ }>;
1593
+ };
1594
+ readonly 'threads.delete': {
1595
+ readonly input: import("zod").ZodObject<{
1596
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1597
+ id: import("zod").ZodString;
1598
+ }, "strip", import("zod").ZodTypeAny, {
1599
+ id: string;
1600
+ userId?: string | undefined;
1601
+ }, {
1602
+ id: string;
1603
+ userId?: string | undefined;
1604
+ }>;
1605
+ readonly output: import("zod").ZodVoid;
1606
+ };
1607
+ readonly 'threads.trash': {
1608
+ readonly input: import("zod").ZodObject<{
1609
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1610
+ id: import("zod").ZodString;
1611
+ }, "strip", import("zod").ZodTypeAny, {
1612
+ id: string;
1613
+ userId?: string | undefined;
1614
+ }, {
1615
+ id: string;
1616
+ userId?: string | undefined;
1617
+ }>;
1618
+ readonly output: import("zod").ZodObject<{
1619
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1620
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1621
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1622
+ messages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1623
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1624
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
1625
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1626
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1627
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1628
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
1629
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
1630
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
1631
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
1632
+ }, "strip", import("zod").ZodTypeAny, {
1633
+ id?: string | undefined;
1634
+ payload?: import("./endpoints").MessagePartShape | undefined;
1635
+ labelIds?: string[] | undefined;
1636
+ raw?: string | undefined;
1637
+ threadId?: string | undefined;
1638
+ snippet?: string | undefined;
1639
+ historyId?: string | undefined;
1640
+ internalDate?: Date | null | undefined;
1641
+ sizeEstimate?: number | undefined;
1642
+ }, {
1643
+ id?: string | undefined;
1644
+ payload?: import("./endpoints").MessagePartShape | undefined;
1645
+ labelIds?: string[] | undefined;
1646
+ raw?: string | undefined;
1647
+ threadId?: string | undefined;
1648
+ snippet?: string | undefined;
1649
+ historyId?: string | undefined;
1650
+ internalDate?: string | number | Date | null | undefined;
1651
+ sizeEstimate?: number | undefined;
1652
+ }>, "many">>;
1653
+ }, "strip", import("zod").ZodTypeAny, {
1654
+ id?: string | undefined;
1655
+ snippet?: string | undefined;
1656
+ historyId?: string | undefined;
1657
+ messages?: {
1658
+ id?: string | undefined;
1659
+ payload?: import("./endpoints").MessagePartShape | undefined;
1660
+ labelIds?: string[] | undefined;
1661
+ raw?: string | undefined;
1662
+ threadId?: string | undefined;
1663
+ snippet?: string | undefined;
1664
+ historyId?: string | undefined;
1665
+ internalDate?: Date | null | undefined;
1666
+ sizeEstimate?: number | undefined;
1667
+ }[] | undefined;
1668
+ }, {
1669
+ id?: string | undefined;
1670
+ snippet?: string | undefined;
1671
+ historyId?: string | undefined;
1672
+ messages?: {
1673
+ id?: string | undefined;
1674
+ payload?: import("./endpoints").MessagePartShape | undefined;
1675
+ labelIds?: string[] | undefined;
1676
+ raw?: string | undefined;
1677
+ threadId?: string | undefined;
1678
+ snippet?: string | undefined;
1679
+ historyId?: string | undefined;
1680
+ internalDate?: string | number | Date | null | undefined;
1681
+ sizeEstimate?: number | undefined;
1682
+ }[] | undefined;
1683
+ }>;
1684
+ };
1685
+ readonly 'threads.untrash': {
1686
+ readonly input: import("zod").ZodObject<{
1687
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1688
+ id: import("zod").ZodString;
1689
+ }, "strip", import("zod").ZodTypeAny, {
1690
+ id: string;
1691
+ userId?: string | undefined;
1692
+ }, {
1693
+ id: string;
1694
+ userId?: string | undefined;
1695
+ }>;
1696
+ readonly output: import("zod").ZodObject<{
1697
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1698
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1699
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1700
+ messages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1701
+ id: import("zod").ZodOptional<import("zod").ZodString>;
1702
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
1703
+ labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1704
+ snippet: import("zod").ZodOptional<import("zod").ZodString>;
1705
+ historyId: import("zod").ZodOptional<import("zod").ZodString>;
1706
+ internalDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodDate]>, Date | null, string | number | Date>>>;
1707
+ sizeEstimate: import("zod").ZodOptional<import("zod").ZodNumber>;
1708
+ payload: import("zod").ZodOptional<import("zod").ZodType<import("./endpoints").MessagePartShape, import("zod").ZodTypeDef, import("./endpoints").MessagePartShape>>;
1709
+ raw: import("zod").ZodOptional<import("zod").ZodString>;
1710
+ }, "strip", import("zod").ZodTypeAny, {
1711
+ id?: string | undefined;
1712
+ payload?: import("./endpoints").MessagePartShape | undefined;
1713
+ labelIds?: string[] | undefined;
1714
+ raw?: string | undefined;
1715
+ threadId?: string | undefined;
1716
+ snippet?: string | undefined;
1717
+ historyId?: string | undefined;
1718
+ internalDate?: Date | null | undefined;
1719
+ sizeEstimate?: number | undefined;
1720
+ }, {
1721
+ id?: string | undefined;
1722
+ payload?: import("./endpoints").MessagePartShape | undefined;
1723
+ labelIds?: string[] | undefined;
1724
+ raw?: string | undefined;
1725
+ threadId?: string | undefined;
1726
+ snippet?: string | undefined;
1727
+ historyId?: string | undefined;
1728
+ internalDate?: string | number | Date | null | undefined;
1729
+ sizeEstimate?: number | undefined;
1730
+ }>, "many">>;
1731
+ }, "strip", import("zod").ZodTypeAny, {
1732
+ id?: string | undefined;
1733
+ snippet?: string | undefined;
1734
+ historyId?: string | undefined;
1735
+ messages?: {
1736
+ id?: string | undefined;
1737
+ payload?: import("./endpoints").MessagePartShape | undefined;
1738
+ labelIds?: string[] | undefined;
1739
+ raw?: string | undefined;
1740
+ threadId?: string | undefined;
1741
+ snippet?: string | undefined;
1742
+ historyId?: string | undefined;
1743
+ internalDate?: Date | null | undefined;
1744
+ sizeEstimate?: number | undefined;
1745
+ }[] | undefined;
1746
+ }, {
1747
+ id?: string | undefined;
1748
+ snippet?: string | undefined;
1749
+ historyId?: string | undefined;
1750
+ messages?: {
1751
+ id?: string | undefined;
1752
+ payload?: import("./endpoints").MessagePartShape | undefined;
1753
+ labelIds?: string[] | undefined;
1754
+ raw?: string | undefined;
1755
+ threadId?: string | undefined;
1756
+ snippet?: string | undefined;
1757
+ historyId?: string | undefined;
1758
+ internalDate?: string | number | Date | null | undefined;
1759
+ sizeEstimate?: number | undefined;
1760
+ }[] | undefined;
1761
+ }>;
1762
+ };
1763
+ };
1764
+ export declare const gmailWebhooksNested: {
1765
+ readonly messageChanged: GmailWebhook<"messageChanged", {
1766
+ message: import("./types").Message;
1767
+ type: "messageReceived";
1768
+ historyId: string;
1769
+ emailAddress: string;
1770
+ } | {
1771
+ message: import("./types").Message;
1772
+ type: "messageDeleted";
1773
+ historyId: string;
1774
+ emailAddress: string;
1775
+ } | {
1776
+ message: import("./types").Message;
1777
+ type: "messageLabelChanged";
1778
+ historyId: string;
1779
+ emailAddress: string;
1780
+ labelsAdded?: string[] | undefined;
1781
+ labelsRemoved?: string[] | undefined;
1782
+ }>;
1783
+ };
1784
+ export type GmailPluginOptions = {
1785
+ authType?: PickAuth<'oauth_2'>;
1786
+ key?: string;
1787
+ credentials?: GmailCredentials;
1788
+ hooks?: InternalGmailPlugin['hooks'];
1789
+ webhookHooks?: InternalGmailPlugin['webhookHooks'];
1790
+ /**
1791
+ * Permission configuration for the Gmail plugin.
1792
+ * Controls what the AI agent is allowed to do.
1793
+ * Overrides use dot-notation paths from the Gmail endpoint tree — invalid paths are type errors.
1794
+ */
1795
+ permissions?: PluginPermissionsConfig<typeof gmailEndpointsNested>;
1796
+ };
1797
+ export type GmailKeyBuilderContext = KeyBuilderContext<GmailPluginOptions, typeof gmailAuthConfig>;
1798
+ declare const defaultAuthType: "oauth_2";
1799
+ export type BaseGmailPlugin<T extends GmailPluginOptions> = CorsairPlugin<'gmail', typeof GmailSchema, typeof gmailEndpointsNested, typeof gmailWebhooksNested, T, typeof defaultAuthType, typeof gmailAuthConfig>;
1800
+ /**
1801
+ * We have to type the internal plugin separately from the external plugin
1802
+ * Because the internal plugin has to provide options for all possible auth methods
1803
+ * The external plugin has to provide options for the auth method the user has selected
1804
+ */
1805
+ export type InternalGmailPlugin = BaseGmailPlugin<GmailPluginOptions>;
1806
+ export type ExternalGmailPlugin<T extends GmailPluginOptions> = BaseGmailPlugin<T>;
1807
+ export declare function gmail<const T extends GmailPluginOptions>(incomingOptions?: GmailPluginOptions & T): ExternalGmailPlugin<T>;
1808
+ export type { GmailEventName, GmailPushNotification, GmailWebhookEvent, GmailWebhookOutputs, GmailWebhookPayload, MessageDeletedEvent, MessageLabelChangedEvent, MessageReceivedEvent, PubSubMessage, PubSubNotification, } from './webhooks/types';
1809
+ export { createGmailWebhookMatcher, decodePubSubMessage, } from './webhooks/types';
1810
+ export type { GmailEndpointInputs, GmailEndpointOutputs, } from './endpoints/types';
1811
+ export type { GmailCredentials } from './schema';
1812
+ export { GmailSchema } from './schema';
1813
+ export type * from './types';
1814
+ //# sourceMappingURL=index.d.ts.map