@bubblelab/bubble-core 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.
Files changed (275) hide show
  1. package/LICENSE.txt +202 -0
  2. package/dist/bubble-bundle.d.ts +2021 -0
  3. package/dist/bubble-factory.d.ts +161 -0
  4. package/dist/bubble-factory.d.ts.map +1 -0
  5. package/dist/bubble-factory.js +426 -0
  6. package/dist/bubble-factory.js.map +1 -0
  7. package/dist/bubble-flow/bubble-flow-class.d.ts +19 -0
  8. package/dist/bubble-flow/bubble-flow-class.d.ts.map +1 -0
  9. package/dist/bubble-flow/bubble-flow-class.js +23 -0
  10. package/dist/bubble-flow/bubble-flow-class.js.map +1 -0
  11. package/dist/bubble-flow/sample/data-analyst-flow.d.ts +15 -0
  12. package/dist/bubble-flow/sample/data-analyst-flow.d.ts.map +1 -0
  13. package/dist/bubble-flow/sample/data-analyst-flow.js +63 -0
  14. package/dist/bubble-flow/sample/data-analyst-flow.js.map +1 -0
  15. package/dist/bubble-flow/sample/error-ts.d.ts +23 -0
  16. package/dist/bubble-flow/sample/error-ts.d.ts.map +1 -0
  17. package/dist/bubble-flow/sample/error-ts.js +31 -0
  18. package/dist/bubble-flow/sample/error-ts.js.map +1 -0
  19. package/dist/bubble-flow/sample/sanitytest.d.ts +10 -0
  20. package/dist/bubble-flow/sample/sanitytest.d.ts.map +1 -0
  21. package/dist/bubble-flow/sample/sanitytest.js +13 -0
  22. package/dist/bubble-flow/sample/sanitytest.js.map +1 -0
  23. package/dist/bubble-flow/sample/simple-webhook-2.d.ts +19 -0
  24. package/dist/bubble-flow/sample/simple-webhook-2.d.ts.map +1 -0
  25. package/dist/bubble-flow/sample/simple-webhook-2.js +23 -0
  26. package/dist/bubble-flow/sample/simple-webhook-2.js.map +1 -0
  27. package/dist/bubble-flow/sample/simple-webhook.d.ts +10 -0
  28. package/dist/bubble-flow/sample/simple-webhook.d.ts.map +1 -0
  29. package/dist/bubble-flow/sample/simple-webhook.js +18 -0
  30. package/dist/bubble-flow/sample/simple-webhook.js.map +1 -0
  31. package/dist/bubble-flow/sample/simplified-data-analysis.flow.d.ts +29 -0
  32. package/dist/bubble-flow/sample/simplified-data-analysis.flow.d.ts.map +1 -0
  33. package/dist/bubble-flow/sample/simplified-data-analysis.flow.js +150 -0
  34. package/dist/bubble-flow/sample/simplified-data-analysis.flow.js.map +1 -0
  35. package/dist/bubble-flow/sample/slack-v0.1.d.ts +10 -0
  36. package/dist/bubble-flow/sample/slack-v0.1.d.ts.map +1 -0
  37. package/dist/bubble-flow/sample/slack-v0.1.js +59 -0
  38. package/dist/bubble-flow/sample/slack-v0.1.js.map +1 -0
  39. package/dist/bubble-flow/sample/slackagenttest.d.ts +10 -0
  40. package/dist/bubble-flow/sample/slackagenttest.d.ts.map +1 -0
  41. package/dist/bubble-flow/sample/slackagenttest.js +59 -0
  42. package/dist/bubble-flow/sample/slackagenttest.js.map +1 -0
  43. package/dist/bubble-trigger/index.d.ts +2 -0
  44. package/dist/bubble-trigger/index.d.ts.map +1 -0
  45. package/dist/bubble-trigger/index.js +2 -0
  46. package/dist/bubble-trigger/index.js.map +1 -0
  47. package/dist/bubble-trigger/types.d.ts +87 -0
  48. package/dist/bubble-trigger/types.d.ts.map +1 -0
  49. package/dist/bubble-trigger/types.js +14 -0
  50. package/dist/bubble-trigger/types.js.map +1 -0
  51. package/dist/bubbles/service-bubble/ai-agent.d.ts +428 -0
  52. package/dist/bubbles/service-bubble/ai-agent.d.ts.map +1 -0
  53. package/dist/bubbles/service-bubble/ai-agent.js +881 -0
  54. package/dist/bubbles/service-bubble/ai-agent.js.map +1 -0
  55. package/dist/bubbles/service-bubble/gmail.d.ts +3073 -0
  56. package/dist/bubbles/service-bubble/gmail.d.ts.map +1 -0
  57. package/dist/bubbles/service-bubble/gmail.js +908 -0
  58. package/dist/bubbles/service-bubble/gmail.js.map +1 -0
  59. package/dist/bubbles/service-bubble/google-calendar.d.ts +3377 -0
  60. package/dist/bubbles/service-bubble/google-calendar.d.ts.map +1 -0
  61. package/dist/bubbles/service-bubble/google-calendar.js +527 -0
  62. package/dist/bubbles/service-bubble/google-calendar.js.map +1 -0
  63. package/dist/bubbles/service-bubble/google-drive.d.ts +1152 -0
  64. package/dist/bubbles/service-bubble/google-drive.d.ts.map +1 -0
  65. package/dist/bubbles/service-bubble/google-drive.js +943 -0
  66. package/dist/bubbles/service-bubble/google-drive.js.map +1 -0
  67. package/dist/bubbles/service-bubble/google-sheets.d.ts +1811 -0
  68. package/dist/bubbles/service-bubble/google-sheets.d.ts.map +1 -0
  69. package/dist/bubbles/service-bubble/google-sheets.js +904 -0
  70. package/dist/bubbles/service-bubble/google-sheets.js.map +1 -0
  71. package/dist/bubbles/service-bubble/hello-world.d.ts +74 -0
  72. package/dist/bubbles/service-bubble/hello-world.d.ts.map +1 -0
  73. package/dist/bubbles/service-bubble/hello-world.js +67 -0
  74. package/dist/bubbles/service-bubble/hello-world.js.map +1 -0
  75. package/dist/bubbles/service-bubble/http.d.ts +134 -0
  76. package/dist/bubbles/service-bubble/http.d.ts.map +1 -0
  77. package/dist/bubbles/service-bubble/http.js +184 -0
  78. package/dist/bubbles/service-bubble/http.js.map +1 -0
  79. package/dist/bubbles/service-bubble/postgresql.d.ts +180 -0
  80. package/dist/bubbles/service-bubble/postgresql.d.ts.map +1 -0
  81. package/dist/bubbles/service-bubble/postgresql.js +448 -0
  82. package/dist/bubbles/service-bubble/postgresql.js.map +1 -0
  83. package/dist/bubbles/service-bubble/resend.d.ts +301 -0
  84. package/dist/bubbles/service-bubble/resend.d.ts.map +1 -0
  85. package/dist/bubbles/service-bubble/resend.js +253 -0
  86. package/dist/bubbles/service-bubble/resend.js.map +1 -0
  87. package/dist/bubbles/service-bubble/slack.d.ts +5869 -0
  88. package/dist/bubbles/service-bubble/slack.d.ts.map +1 -0
  89. package/dist/bubbles/service-bubble/slack.js +1536 -0
  90. package/dist/bubbles/service-bubble/slack.js.map +1 -0
  91. package/dist/bubbles/service-bubble/storage.d.ts +571 -0
  92. package/dist/bubbles/service-bubble/storage.d.ts.map +1 -0
  93. package/dist/bubbles/service-bubble/storage.js +504 -0
  94. package/dist/bubbles/service-bubble/storage.js.map +1 -0
  95. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +308 -0
  96. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts.map +1 -0
  97. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.js +285 -0
  98. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.js.map +1 -0
  99. package/dist/bubbles/tool-bubble/chart-js-tool.d.ts +416 -0
  100. package/dist/bubbles/tool-bubble/chart-js-tool.d.ts.map +1 -0
  101. package/dist/bubbles/tool-bubble/chart-js-tool.js +570 -0
  102. package/dist/bubbles/tool-bubble/chart-js-tool.js.map +1 -0
  103. package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts +99 -0
  104. package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts.map +1 -0
  105. package/dist/bubbles/tool-bubble/get-bubble-details-tool.js +645 -0
  106. package/dist/bubbles/tool-bubble/get-bubble-details-tool.js.map +1 -0
  107. package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts +112 -0
  108. package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts.map +1 -0
  109. package/dist/bubbles/tool-bubble/list-bubbles-tool.js +82 -0
  110. package/dist/bubbles/tool-bubble/list-bubbles-tool.js.map +1 -0
  111. package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +413 -0
  112. package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts.map +1 -0
  113. package/dist/bubbles/tool-bubble/reddit-scrape-tool.js +327 -0
  114. package/dist/bubbles/tool-bubble/reddit-scrape-tool.js.map +1 -0
  115. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +122 -0
  116. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts.map +1 -0
  117. package/dist/bubbles/tool-bubble/research-agent-tool.js +343 -0
  118. package/dist/bubbles/tool-bubble/research-agent-tool.js.map +1 -0
  119. package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +131 -0
  120. package/dist/bubbles/tool-bubble/sql-query-tool.d.ts.map +1 -0
  121. package/dist/bubbles/tool-bubble/sql-query-tool.js +147 -0
  122. package/dist/bubbles/tool-bubble/sql-query-tool.js.map +1 -0
  123. package/dist/bubbles/tool-bubble/tool-template.d.ts +257 -0
  124. package/dist/bubbles/tool-bubble/tool-template.d.ts.map +1 -0
  125. package/dist/bubbles/tool-bubble/tool-template.js +238 -0
  126. package/dist/bubbles/tool-bubble/tool-template.js.map +1 -0
  127. package/dist/bubbles/tool-bubble/virtual-file-editor-example.d.ts +8 -0
  128. package/dist/bubbles/tool-bubble/virtual-file-editor-example.d.ts.map +1 -0
  129. package/dist/bubbles/tool-bubble/virtual-file-editor-example.js +65 -0
  130. package/dist/bubbles/tool-bubble/virtual-file-editor-example.js.map +1 -0
  131. package/dist/bubbles/tool-bubble/virtual-file-editor.tool.d.ts +125 -0
  132. package/dist/bubbles/tool-bubble/virtual-file-editor.tool.d.ts.map +1 -0
  133. package/dist/bubbles/tool-bubble/virtual-file-editor.tool.js +169 -0
  134. package/dist/bubbles/tool-bubble/virtual-file-editor.tool.js.map +1 -0
  135. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +218 -0
  136. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts.map +1 -0
  137. package/dist/bubbles/tool-bubble/web-crawl-tool.js +255 -0
  138. package/dist/bubbles/tool-bubble/web-crawl-tool.js.map +1 -0
  139. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +134 -0
  140. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts.map +1 -0
  141. package/dist/bubbles/tool-bubble/web-extract-tool.js +175 -0
  142. package/dist/bubbles/tool-bubble/web-extract-tool.js.map +1 -0
  143. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +228 -0
  144. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts.map +1 -0
  145. package/dist/bubbles/tool-bubble/web-scrape-tool.js +214 -0
  146. package/dist/bubbles/tool-bubble/web-scrape-tool.js.map +1 -0
  147. package/dist/bubbles/tool-bubble/web-search-tool.d.ts +134 -0
  148. package/dist/bubbles/tool-bubble/web-search-tool.d.ts.map +1 -0
  149. package/dist/bubbles/tool-bubble/web-search-tool.js +155 -0
  150. package/dist/bubbles/tool-bubble/web-search-tool.js.map +1 -0
  151. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts +114 -0
  152. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts.map +1 -0
  153. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js +777 -0
  154. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js.map +1 -0
  155. package/dist/bubbles/workflow-bubble/bubblscript-generateor.workflow.d.ts +97 -0
  156. package/dist/bubbles/workflow-bubble/bubblscript-generateor.workflow.d.ts.map +1 -0
  157. package/dist/bubbles/workflow-bubble/bubblscript-generateor.workflow.js +327 -0
  158. package/dist/bubbles/workflow-bubble/bubblscript-generateor.workflow.js.map +1 -0
  159. package/dist/bubbles/workflow-bubble/database-analyzer.workflow.d.ts +303 -0
  160. package/dist/bubbles/workflow-bubble/database-analyzer.workflow.d.ts.map +1 -0
  161. package/dist/bubbles/workflow-bubble/database-analyzer.workflow.js +297 -0
  162. package/dist/bubbles/workflow-bubble/database-analyzer.workflow.js.map +1 -0
  163. package/dist/bubbles/workflow-bubble/file-editor-agent.workflow.d.ts +157 -0
  164. package/dist/bubbles/workflow-bubble/file-editor-agent.workflow.d.ts.map +1 -0
  165. package/dist/bubbles/workflow-bubble/file-editor-agent.workflow.js +310 -0
  166. package/dist/bubbles/workflow-bubble/file-editor-agent.workflow.js.map +1 -0
  167. package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +543 -0
  168. package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts.map +1 -0
  169. package/dist/bubbles/workflow-bubble/generate-document.workflow.js +628 -0
  170. package/dist/bubbles/workflow-bubble/generate-document.workflow.js.map +1 -0
  171. package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts +679 -0
  172. package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts.map +1 -0
  173. package/dist/bubbles/workflow-bubble/parse-document.workflow.js +604 -0
  174. package/dist/bubbles/workflow-bubble/parse-document.workflow.js.map +1 -0
  175. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +1011 -0
  176. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts.map +1 -0
  177. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js +841 -0
  178. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js.map +1 -0
  179. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +883 -0
  180. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts.map +1 -0
  181. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.js +781 -0
  182. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.js.map +1 -0
  183. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +300 -0
  184. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts.map +1 -0
  185. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js +508 -0
  186. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js.map +1 -0
  187. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +731 -0
  188. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts.map +1 -0
  189. package/dist/bubbles/workflow-bubble/slack-formatter-agent.js +690 -0
  190. package/dist/bubbles/workflow-bubble/slack-formatter-agent.js.map +1 -0
  191. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts +401 -0
  192. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts.map +1 -0
  193. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js +382 -0
  194. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js.map +1 -0
  195. package/dist/bubbles/workflow-bubble/workflow-template.d.ts +144 -0
  196. package/dist/bubbles/workflow-bubble/workflow-template.d.ts.map +1 -0
  197. package/dist/bubbles/workflow-bubble/workflow-template.js +124 -0
  198. package/dist/bubbles/workflow-bubble/workflow-template.js.map +1 -0
  199. package/dist/index.d.ts +46 -0
  200. package/dist/index.d.ts.map +1 -0
  201. package/dist/index.js +53 -0
  202. package/dist/index.js.map +1 -0
  203. package/dist/logging/BubbleLogger.d.ts +146 -0
  204. package/dist/logging/BubbleLogger.d.ts.map +1 -0
  205. package/dist/logging/BubbleLogger.js +472 -0
  206. package/dist/logging/BubbleLogger.js.map +1 -0
  207. package/dist/logging/StreamingBubbleLogger.d.ts +85 -0
  208. package/dist/logging/StreamingBubbleLogger.d.ts.map +1 -0
  209. package/dist/logging/StreamingBubbleLogger.js +340 -0
  210. package/dist/logging/StreamingBubbleLogger.js.map +1 -0
  211. package/dist/types/ai-models.d.ts +4 -0
  212. package/dist/types/ai-models.d.ts.map +1 -0
  213. package/dist/types/ai-models.js +14 -0
  214. package/dist/types/ai-models.js.map +1 -0
  215. package/dist/types/available-tools.d.ts +4 -0
  216. package/dist/types/available-tools.d.ts.map +1 -0
  217. package/dist/types/available-tools.js +19 -0
  218. package/dist/types/available-tools.js.map +1 -0
  219. package/dist/types/base-bubble-class.d.ts +47 -0
  220. package/dist/types/base-bubble-class.d.ts.map +1 -0
  221. package/dist/types/base-bubble-class.js +212 -0
  222. package/dist/types/base-bubble-class.js.map +1 -0
  223. package/dist/types/bubble-errors.d.ts +44 -0
  224. package/dist/types/bubble-errors.d.ts.map +1 -0
  225. package/dist/types/bubble-errors.js +51 -0
  226. package/dist/types/bubble-errors.js.map +1 -0
  227. package/dist/types/bubble.d.ts +73 -0
  228. package/dist/types/bubble.d.ts.map +1 -0
  229. package/dist/types/bubble.js +2 -0
  230. package/dist/types/bubble.js.map +1 -0
  231. package/dist/types/credentials.d.ts +6 -0
  232. package/dist/types/credentials.d.ts.map +1 -0
  233. package/dist/types/credentials.js +6 -0
  234. package/dist/types/credentials.js.map +1 -0
  235. package/dist/types/service-bubble-class.d.ts +31 -0
  236. package/dist/types/service-bubble-class.d.ts.map +1 -0
  237. package/dist/types/service-bubble-class.js +36 -0
  238. package/dist/types/service-bubble-class.js.map +1 -0
  239. package/dist/types/streaming-events.d.ts +18 -0
  240. package/dist/types/streaming-events.d.ts.map +1 -0
  241. package/dist/types/streaming-events.js +5 -0
  242. package/dist/types/streaming-events.js.map +1 -0
  243. package/dist/types/tool-bubble-class.d.ts +19 -0
  244. package/dist/types/tool-bubble-class.d.ts.map +1 -0
  245. package/dist/types/tool-bubble-class.js +48 -0
  246. package/dist/types/tool-bubble-class.js.map +1 -0
  247. package/dist/types/workflow-bubble-class.d.ts +25 -0
  248. package/dist/types/workflow-bubble-class.d.ts.map +1 -0
  249. package/dist/types/workflow-bubble-class.js +30 -0
  250. package/dist/types/workflow-bubble-class.js.map +1 -0
  251. package/dist/utils/bubbleflow-parser.d.ts +32 -0
  252. package/dist/utils/bubbleflow-parser.d.ts.map +1 -0
  253. package/dist/utils/bubbleflow-parser.js +332 -0
  254. package/dist/utils/bubbleflow-parser.js.map +1 -0
  255. package/dist/utils/bubbleflow-validation.d.ts +9 -0
  256. package/dist/utils/bubbleflow-validation.d.ts.map +1 -0
  257. package/dist/utils/bubbleflow-validation.js +116 -0
  258. package/dist/utils/bubbleflow-validation.js.map +1 -0
  259. package/dist/utils/json-parsing.d.ts +20 -0
  260. package/dist/utils/json-parsing.d.ts.map +1 -0
  261. package/dist/utils/json-parsing.js +394 -0
  262. package/dist/utils/json-parsing.js.map +1 -0
  263. package/dist/utils/mock-data-generator.d.ts +43 -0
  264. package/dist/utils/mock-data-generator.d.ts.map +1 -0
  265. package/dist/utils/mock-data-generator.js +312 -0
  266. package/dist/utils/mock-data-generator.js.map +1 -0
  267. package/dist/utils/param-helper.d.ts +2 -0
  268. package/dist/utils/param-helper.d.ts.map +1 -0
  269. package/dist/utils/param-helper.js +5 -0
  270. package/dist/utils/param-helper.js.map +1 -0
  271. package/dist/utils/source-bubble-parser.d.ts +31 -0
  272. package/dist/utils/source-bubble-parser.d.ts.map +1 -0
  273. package/dist/utils/source-bubble-parser.js +231 -0
  274. package/dist/utils/source-bubble-parser.js.map +1 -0
  275. package/package.json +63 -0
@@ -0,0 +1,3073 @@
1
+ import { z } from 'zod';
2
+ import { ServiceBubble } from '../../types/service-bubble-class.js';
3
+ import type { BubbleContext } from '../../types/bubble.js';
4
+ import { CredentialType } from '@bubblelab/shared-schemas';
5
+ declare const GmailParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
6
+ operation: z.ZodLiteral<"send_email">;
7
+ to: z.ZodArray<z.ZodString, "many">;
8
+ cc: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9
+ bcc: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10
+ subject: z.ZodString;
11
+ body_text: z.ZodOptional<z.ZodString>;
12
+ body_html: z.ZodOptional<z.ZodString>;
13
+ reply_to: z.ZodOptional<z.ZodString>;
14
+ thread_id: z.ZodOptional<z.ZodString>;
15
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ operation: "send_email";
18
+ to: string[];
19
+ subject: string;
20
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
21
+ cc?: string[] | undefined;
22
+ bcc?: string[] | undefined;
23
+ reply_to?: string | undefined;
24
+ body_text?: string | undefined;
25
+ body_html?: string | undefined;
26
+ thread_id?: string | undefined;
27
+ }, {
28
+ operation: "send_email";
29
+ to: string[];
30
+ subject: string;
31
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
32
+ cc?: string[] | undefined;
33
+ bcc?: string[] | undefined;
34
+ reply_to?: string | undefined;
35
+ body_text?: string | undefined;
36
+ body_html?: string | undefined;
37
+ thread_id?: string | undefined;
38
+ }>, z.ZodObject<{
39
+ operation: z.ZodLiteral<"list_emails">;
40
+ query: z.ZodOptional<z.ZodString>;
41
+ label_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
42
+ include_spam_trash: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
43
+ max_results: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
44
+ page_token: z.ZodOptional<z.ZodString>;
45
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ operation: "list_emails";
48
+ max_results: number;
49
+ include_spam_trash: boolean;
50
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
51
+ query?: string | undefined;
52
+ label_ids?: string[] | undefined;
53
+ page_token?: string | undefined;
54
+ }, {
55
+ operation: "list_emails";
56
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
57
+ query?: string | undefined;
58
+ max_results?: number | undefined;
59
+ label_ids?: string[] | undefined;
60
+ include_spam_trash?: boolean | undefined;
61
+ page_token?: string | undefined;
62
+ }>, z.ZodObject<{
63
+ operation: z.ZodLiteral<"get_email">;
64
+ message_id: z.ZodString;
65
+ format: z.ZodDefault<z.ZodOptional<z.ZodEnum<["minimal", "full", "raw", "metadata"]>>>;
66
+ metadata_headers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
67
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ format: "metadata" | "raw" | "minimal" | "full";
70
+ operation: "get_email";
71
+ message_id: string;
72
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
73
+ metadata_headers?: string[] | undefined;
74
+ }, {
75
+ operation: "get_email";
76
+ message_id: string;
77
+ format?: "metadata" | "raw" | "minimal" | "full" | undefined;
78
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
79
+ metadata_headers?: string[] | undefined;
80
+ }>, z.ZodObject<{
81
+ operation: z.ZodLiteral<"search_emails">;
82
+ query: z.ZodString;
83
+ max_results: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
84
+ include_spam_trash: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
85
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
86
+ }, "strip", z.ZodTypeAny, {
87
+ query: string;
88
+ operation: "search_emails";
89
+ max_results: number;
90
+ include_spam_trash: boolean;
91
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
92
+ }, {
93
+ query: string;
94
+ operation: "search_emails";
95
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
96
+ max_results?: number | undefined;
97
+ include_spam_trash?: boolean | undefined;
98
+ }>, z.ZodObject<{
99
+ operation: z.ZodLiteral<"mark_as_read">;
100
+ message_ids: z.ZodArray<z.ZodString, "many">;
101
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
102
+ }, "strip", z.ZodTypeAny, {
103
+ operation: "mark_as_read";
104
+ message_ids: string[];
105
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
106
+ }, {
107
+ operation: "mark_as_read";
108
+ message_ids: string[];
109
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
110
+ }>, z.ZodObject<{
111
+ operation: z.ZodLiteral<"mark_as_unread">;
112
+ message_ids: z.ZodArray<z.ZodString, "many">;
113
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ operation: "mark_as_unread";
116
+ message_ids: string[];
117
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
118
+ }, {
119
+ operation: "mark_as_unread";
120
+ message_ids: string[];
121
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
122
+ }>, z.ZodObject<{
123
+ operation: z.ZodLiteral<"create_draft">;
124
+ to: z.ZodArray<z.ZodString, "many">;
125
+ cc: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
126
+ bcc: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
127
+ subject: z.ZodString;
128
+ body_text: z.ZodOptional<z.ZodString>;
129
+ body_html: z.ZodOptional<z.ZodString>;
130
+ reply_to: z.ZodOptional<z.ZodString>;
131
+ thread_id: z.ZodOptional<z.ZodString>;
132
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ operation: "create_draft";
135
+ to: string[];
136
+ subject: string;
137
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
138
+ cc?: string[] | undefined;
139
+ bcc?: string[] | undefined;
140
+ reply_to?: string | undefined;
141
+ body_text?: string | undefined;
142
+ body_html?: string | undefined;
143
+ thread_id?: string | undefined;
144
+ }, {
145
+ operation: "create_draft";
146
+ to: string[];
147
+ subject: string;
148
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
149
+ cc?: string[] | undefined;
150
+ bcc?: string[] | undefined;
151
+ reply_to?: string | undefined;
152
+ body_text?: string | undefined;
153
+ body_html?: string | undefined;
154
+ thread_id?: string | undefined;
155
+ }>, z.ZodObject<{
156
+ operation: z.ZodLiteral<"send_draft">;
157
+ draft_id: z.ZodString;
158
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
159
+ }, "strip", z.ZodTypeAny, {
160
+ operation: "send_draft";
161
+ draft_id: string;
162
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
163
+ }, {
164
+ operation: "send_draft";
165
+ draft_id: string;
166
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
167
+ }>, z.ZodObject<{
168
+ operation: z.ZodLiteral<"list_drafts">;
169
+ query: z.ZodOptional<z.ZodString>;
170
+ max_results: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
171
+ page_token: z.ZodOptional<z.ZodString>;
172
+ include_spam_trash: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
173
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
174
+ }, "strip", z.ZodTypeAny, {
175
+ operation: "list_drafts";
176
+ max_results: number;
177
+ include_spam_trash: boolean;
178
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
179
+ query?: string | undefined;
180
+ page_token?: string | undefined;
181
+ }, {
182
+ operation: "list_drafts";
183
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
184
+ query?: string | undefined;
185
+ max_results?: number | undefined;
186
+ include_spam_trash?: boolean | undefined;
187
+ page_token?: string | undefined;
188
+ }>, z.ZodObject<{
189
+ operation: z.ZodLiteral<"delete_email">;
190
+ message_id: z.ZodString;
191
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ operation: "delete_email";
194
+ message_id: string;
195
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
196
+ }, {
197
+ operation: "delete_email";
198
+ message_id: string;
199
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
200
+ }>, z.ZodObject<{
201
+ operation: z.ZodLiteral<"trash_email">;
202
+ message_id: z.ZodString;
203
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ operation: "trash_email";
206
+ message_id: string;
207
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
208
+ }, {
209
+ operation: "trash_email";
210
+ message_id: string;
211
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
212
+ }>, z.ZodObject<{
213
+ operation: z.ZodLiteral<"list_threads">;
214
+ query: z.ZodOptional<z.ZodString>;
215
+ label_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
216
+ include_spam_trash: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
217
+ max_results: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
218
+ page_token: z.ZodOptional<z.ZodString>;
219
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ operation: "list_threads";
222
+ max_results: number;
223
+ include_spam_trash: boolean;
224
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
225
+ query?: string | undefined;
226
+ label_ids?: string[] | undefined;
227
+ page_token?: string | undefined;
228
+ }, {
229
+ operation: "list_threads";
230
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
231
+ query?: string | undefined;
232
+ max_results?: number | undefined;
233
+ label_ids?: string[] | undefined;
234
+ include_spam_trash?: boolean | undefined;
235
+ page_token?: string | undefined;
236
+ }>]>;
237
+ declare const GmailResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
238
+ operation: z.ZodLiteral<"send_email">;
239
+ success: z.ZodBoolean;
240
+ message_id: z.ZodOptional<z.ZodString>;
241
+ thread_id: z.ZodOptional<z.ZodString>;
242
+ error: z.ZodString;
243
+ }, "strip", z.ZodTypeAny, {
244
+ success: boolean;
245
+ error: string;
246
+ operation: "send_email";
247
+ thread_id?: string | undefined;
248
+ message_id?: string | undefined;
249
+ }, {
250
+ success: boolean;
251
+ error: string;
252
+ operation: "send_email";
253
+ thread_id?: string | undefined;
254
+ message_id?: string | undefined;
255
+ }>, z.ZodObject<{
256
+ operation: z.ZodLiteral<"list_emails">;
257
+ success: z.ZodBoolean;
258
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
259
+ id: z.ZodString;
260
+ threadId: z.ZodString;
261
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
262
+ snippet: z.ZodOptional<z.ZodString>;
263
+ historyId: z.ZodOptional<z.ZodString>;
264
+ internalDate: z.ZodOptional<z.ZodString>;
265
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
266
+ raw: z.ZodOptional<z.ZodString>;
267
+ payload: z.ZodOptional<z.ZodObject<{
268
+ mimeType: z.ZodOptional<z.ZodString>;
269
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
270
+ name: z.ZodString;
271
+ value: z.ZodString;
272
+ }, "strip", z.ZodTypeAny, {
273
+ value: string;
274
+ name: string;
275
+ }, {
276
+ value: string;
277
+ name: string;
278
+ }>, "many">>;
279
+ body: z.ZodOptional<z.ZodObject<{
280
+ data: z.ZodOptional<z.ZodString>;
281
+ size: z.ZodOptional<z.ZodNumber>;
282
+ attachmentId: z.ZodOptional<z.ZodString>;
283
+ }, "strip", z.ZodTypeAny, {
284
+ data?: string | undefined;
285
+ size?: number | undefined;
286
+ attachmentId?: string | undefined;
287
+ }, {
288
+ data?: string | undefined;
289
+ size?: number | undefined;
290
+ attachmentId?: string | undefined;
291
+ }>>;
292
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
293
+ }, "strip", z.ZodTypeAny, {
294
+ mimeType?: string | undefined;
295
+ body?: {
296
+ data?: string | undefined;
297
+ size?: number | undefined;
298
+ attachmentId?: string | undefined;
299
+ } | undefined;
300
+ headers?: {
301
+ value: string;
302
+ name: string;
303
+ }[] | undefined;
304
+ parts?: any[] | undefined;
305
+ }, {
306
+ mimeType?: string | undefined;
307
+ body?: {
308
+ data?: string | undefined;
309
+ size?: number | undefined;
310
+ attachmentId?: string | undefined;
311
+ } | undefined;
312
+ headers?: {
313
+ value: string;
314
+ name: string;
315
+ }[] | undefined;
316
+ parts?: any[] | undefined;
317
+ }>>;
318
+ }, "strip", z.ZodTypeAny, {
319
+ id: string;
320
+ threadId: string;
321
+ raw?: string | undefined;
322
+ labelIds?: string[] | undefined;
323
+ snippet?: string | undefined;
324
+ historyId?: string | undefined;
325
+ internalDate?: string | undefined;
326
+ sizeEstimate?: number | undefined;
327
+ payload?: {
328
+ mimeType?: string | undefined;
329
+ body?: {
330
+ data?: string | undefined;
331
+ size?: number | undefined;
332
+ attachmentId?: string | undefined;
333
+ } | undefined;
334
+ headers?: {
335
+ value: string;
336
+ name: string;
337
+ }[] | undefined;
338
+ parts?: any[] | undefined;
339
+ } | undefined;
340
+ }, {
341
+ id: string;
342
+ threadId: string;
343
+ raw?: string | undefined;
344
+ labelIds?: string[] | undefined;
345
+ snippet?: string | undefined;
346
+ historyId?: string | undefined;
347
+ internalDate?: string | undefined;
348
+ sizeEstimate?: number | undefined;
349
+ payload?: {
350
+ mimeType?: string | undefined;
351
+ body?: {
352
+ data?: string | undefined;
353
+ size?: number | undefined;
354
+ attachmentId?: string | undefined;
355
+ } | undefined;
356
+ headers?: {
357
+ value: string;
358
+ name: string;
359
+ }[] | undefined;
360
+ parts?: any[] | undefined;
361
+ } | undefined;
362
+ }>, "many">>;
363
+ next_page_token: z.ZodOptional<z.ZodString>;
364
+ result_size_estimate: z.ZodOptional<z.ZodNumber>;
365
+ error: z.ZodString;
366
+ }, "strip", z.ZodTypeAny, {
367
+ success: boolean;
368
+ error: string;
369
+ operation: "list_emails";
370
+ messages?: {
371
+ id: string;
372
+ threadId: string;
373
+ raw?: string | undefined;
374
+ labelIds?: string[] | undefined;
375
+ snippet?: string | undefined;
376
+ historyId?: string | undefined;
377
+ internalDate?: string | undefined;
378
+ sizeEstimate?: number | undefined;
379
+ payload?: {
380
+ mimeType?: string | undefined;
381
+ body?: {
382
+ data?: string | undefined;
383
+ size?: number | undefined;
384
+ attachmentId?: string | undefined;
385
+ } | undefined;
386
+ headers?: {
387
+ value: string;
388
+ name: string;
389
+ }[] | undefined;
390
+ parts?: any[] | undefined;
391
+ } | undefined;
392
+ }[] | undefined;
393
+ next_page_token?: string | undefined;
394
+ result_size_estimate?: number | undefined;
395
+ }, {
396
+ success: boolean;
397
+ error: string;
398
+ operation: "list_emails";
399
+ messages?: {
400
+ id: string;
401
+ threadId: string;
402
+ raw?: string | undefined;
403
+ labelIds?: string[] | undefined;
404
+ snippet?: string | undefined;
405
+ historyId?: string | undefined;
406
+ internalDate?: string | undefined;
407
+ sizeEstimate?: number | undefined;
408
+ payload?: {
409
+ mimeType?: string | undefined;
410
+ body?: {
411
+ data?: string | undefined;
412
+ size?: number | undefined;
413
+ attachmentId?: string | undefined;
414
+ } | undefined;
415
+ headers?: {
416
+ value: string;
417
+ name: string;
418
+ }[] | undefined;
419
+ parts?: any[] | undefined;
420
+ } | undefined;
421
+ }[] | undefined;
422
+ next_page_token?: string | undefined;
423
+ result_size_estimate?: number | undefined;
424
+ }>, z.ZodObject<{
425
+ operation: z.ZodLiteral<"get_email">;
426
+ success: z.ZodBoolean;
427
+ message: z.ZodOptional<z.ZodObject<{
428
+ id: z.ZodString;
429
+ threadId: z.ZodString;
430
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
431
+ snippet: z.ZodOptional<z.ZodString>;
432
+ historyId: z.ZodOptional<z.ZodString>;
433
+ internalDate: z.ZodOptional<z.ZodString>;
434
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
435
+ raw: z.ZodOptional<z.ZodString>;
436
+ payload: z.ZodOptional<z.ZodObject<{
437
+ mimeType: z.ZodOptional<z.ZodString>;
438
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
439
+ name: z.ZodString;
440
+ value: z.ZodString;
441
+ }, "strip", z.ZodTypeAny, {
442
+ value: string;
443
+ name: string;
444
+ }, {
445
+ value: string;
446
+ name: string;
447
+ }>, "many">>;
448
+ body: z.ZodOptional<z.ZodObject<{
449
+ data: z.ZodOptional<z.ZodString>;
450
+ size: z.ZodOptional<z.ZodNumber>;
451
+ attachmentId: z.ZodOptional<z.ZodString>;
452
+ }, "strip", z.ZodTypeAny, {
453
+ data?: string | undefined;
454
+ size?: number | undefined;
455
+ attachmentId?: string | undefined;
456
+ }, {
457
+ data?: string | undefined;
458
+ size?: number | undefined;
459
+ attachmentId?: string | undefined;
460
+ }>>;
461
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
462
+ }, "strip", z.ZodTypeAny, {
463
+ mimeType?: string | undefined;
464
+ body?: {
465
+ data?: string | undefined;
466
+ size?: number | undefined;
467
+ attachmentId?: string | undefined;
468
+ } | undefined;
469
+ headers?: {
470
+ value: string;
471
+ name: string;
472
+ }[] | undefined;
473
+ parts?: any[] | undefined;
474
+ }, {
475
+ mimeType?: string | undefined;
476
+ body?: {
477
+ data?: string | undefined;
478
+ size?: number | undefined;
479
+ attachmentId?: string | undefined;
480
+ } | undefined;
481
+ headers?: {
482
+ value: string;
483
+ name: string;
484
+ }[] | undefined;
485
+ parts?: any[] | undefined;
486
+ }>>;
487
+ }, "strip", z.ZodTypeAny, {
488
+ id: string;
489
+ threadId: string;
490
+ raw?: string | undefined;
491
+ labelIds?: string[] | undefined;
492
+ snippet?: string | undefined;
493
+ historyId?: string | undefined;
494
+ internalDate?: string | undefined;
495
+ sizeEstimate?: number | undefined;
496
+ payload?: {
497
+ mimeType?: string | undefined;
498
+ body?: {
499
+ data?: string | undefined;
500
+ size?: number | undefined;
501
+ attachmentId?: string | undefined;
502
+ } | undefined;
503
+ headers?: {
504
+ value: string;
505
+ name: string;
506
+ }[] | undefined;
507
+ parts?: any[] | undefined;
508
+ } | undefined;
509
+ }, {
510
+ id: string;
511
+ threadId: string;
512
+ raw?: string | undefined;
513
+ labelIds?: string[] | undefined;
514
+ snippet?: string | undefined;
515
+ historyId?: string | undefined;
516
+ internalDate?: string | undefined;
517
+ sizeEstimate?: number | undefined;
518
+ payload?: {
519
+ mimeType?: string | undefined;
520
+ body?: {
521
+ data?: string | undefined;
522
+ size?: number | undefined;
523
+ attachmentId?: string | undefined;
524
+ } | undefined;
525
+ headers?: {
526
+ value: string;
527
+ name: string;
528
+ }[] | undefined;
529
+ parts?: any[] | undefined;
530
+ } | undefined;
531
+ }>>;
532
+ error: z.ZodString;
533
+ }, "strip", z.ZodTypeAny, {
534
+ success: boolean;
535
+ error: string;
536
+ operation: "get_email";
537
+ message?: {
538
+ id: string;
539
+ threadId: string;
540
+ raw?: string | undefined;
541
+ labelIds?: string[] | undefined;
542
+ snippet?: string | undefined;
543
+ historyId?: string | undefined;
544
+ internalDate?: string | undefined;
545
+ sizeEstimate?: number | undefined;
546
+ payload?: {
547
+ mimeType?: string | undefined;
548
+ body?: {
549
+ data?: string | undefined;
550
+ size?: number | undefined;
551
+ attachmentId?: string | undefined;
552
+ } | undefined;
553
+ headers?: {
554
+ value: string;
555
+ name: string;
556
+ }[] | undefined;
557
+ parts?: any[] | undefined;
558
+ } | undefined;
559
+ } | undefined;
560
+ }, {
561
+ success: boolean;
562
+ error: string;
563
+ operation: "get_email";
564
+ message?: {
565
+ id: string;
566
+ threadId: string;
567
+ raw?: string | undefined;
568
+ labelIds?: string[] | undefined;
569
+ snippet?: string | undefined;
570
+ historyId?: string | undefined;
571
+ internalDate?: string | undefined;
572
+ sizeEstimate?: number | undefined;
573
+ payload?: {
574
+ mimeType?: string | undefined;
575
+ body?: {
576
+ data?: string | undefined;
577
+ size?: number | undefined;
578
+ attachmentId?: string | undefined;
579
+ } | undefined;
580
+ headers?: {
581
+ value: string;
582
+ name: string;
583
+ }[] | undefined;
584
+ parts?: any[] | undefined;
585
+ } | undefined;
586
+ } | undefined;
587
+ }>, z.ZodObject<{
588
+ operation: z.ZodLiteral<"search_emails">;
589
+ success: z.ZodBoolean;
590
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
591
+ id: z.ZodString;
592
+ threadId: z.ZodString;
593
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
594
+ snippet: z.ZodOptional<z.ZodString>;
595
+ historyId: z.ZodOptional<z.ZodString>;
596
+ internalDate: z.ZodOptional<z.ZodString>;
597
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
598
+ raw: z.ZodOptional<z.ZodString>;
599
+ payload: z.ZodOptional<z.ZodObject<{
600
+ mimeType: z.ZodOptional<z.ZodString>;
601
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
602
+ name: z.ZodString;
603
+ value: z.ZodString;
604
+ }, "strip", z.ZodTypeAny, {
605
+ value: string;
606
+ name: string;
607
+ }, {
608
+ value: string;
609
+ name: string;
610
+ }>, "many">>;
611
+ body: z.ZodOptional<z.ZodObject<{
612
+ data: z.ZodOptional<z.ZodString>;
613
+ size: z.ZodOptional<z.ZodNumber>;
614
+ attachmentId: z.ZodOptional<z.ZodString>;
615
+ }, "strip", z.ZodTypeAny, {
616
+ data?: string | undefined;
617
+ size?: number | undefined;
618
+ attachmentId?: string | undefined;
619
+ }, {
620
+ data?: string | undefined;
621
+ size?: number | undefined;
622
+ attachmentId?: string | undefined;
623
+ }>>;
624
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
625
+ }, "strip", z.ZodTypeAny, {
626
+ mimeType?: string | undefined;
627
+ body?: {
628
+ data?: string | undefined;
629
+ size?: number | undefined;
630
+ attachmentId?: string | undefined;
631
+ } | undefined;
632
+ headers?: {
633
+ value: string;
634
+ name: string;
635
+ }[] | undefined;
636
+ parts?: any[] | undefined;
637
+ }, {
638
+ mimeType?: string | undefined;
639
+ body?: {
640
+ data?: string | undefined;
641
+ size?: number | undefined;
642
+ attachmentId?: string | undefined;
643
+ } | undefined;
644
+ headers?: {
645
+ value: string;
646
+ name: string;
647
+ }[] | undefined;
648
+ parts?: any[] | undefined;
649
+ }>>;
650
+ }, "strip", z.ZodTypeAny, {
651
+ id: string;
652
+ threadId: string;
653
+ raw?: string | undefined;
654
+ labelIds?: string[] | undefined;
655
+ snippet?: string | undefined;
656
+ historyId?: string | undefined;
657
+ internalDate?: string | undefined;
658
+ sizeEstimate?: number | undefined;
659
+ payload?: {
660
+ mimeType?: string | undefined;
661
+ body?: {
662
+ data?: string | undefined;
663
+ size?: number | undefined;
664
+ attachmentId?: string | undefined;
665
+ } | undefined;
666
+ headers?: {
667
+ value: string;
668
+ name: string;
669
+ }[] | undefined;
670
+ parts?: any[] | undefined;
671
+ } | undefined;
672
+ }, {
673
+ id: string;
674
+ threadId: string;
675
+ raw?: string | undefined;
676
+ labelIds?: string[] | undefined;
677
+ snippet?: string | undefined;
678
+ historyId?: string | undefined;
679
+ internalDate?: string | undefined;
680
+ sizeEstimate?: number | undefined;
681
+ payload?: {
682
+ mimeType?: string | undefined;
683
+ body?: {
684
+ data?: string | undefined;
685
+ size?: number | undefined;
686
+ attachmentId?: string | undefined;
687
+ } | undefined;
688
+ headers?: {
689
+ value: string;
690
+ name: string;
691
+ }[] | undefined;
692
+ parts?: any[] | undefined;
693
+ } | undefined;
694
+ }>, "many">>;
695
+ result_size_estimate: z.ZodOptional<z.ZodNumber>;
696
+ error: z.ZodString;
697
+ }, "strip", z.ZodTypeAny, {
698
+ success: boolean;
699
+ error: string;
700
+ operation: "search_emails";
701
+ messages?: {
702
+ id: string;
703
+ threadId: string;
704
+ raw?: string | undefined;
705
+ labelIds?: string[] | undefined;
706
+ snippet?: string | undefined;
707
+ historyId?: string | undefined;
708
+ internalDate?: string | undefined;
709
+ sizeEstimate?: number | undefined;
710
+ payload?: {
711
+ mimeType?: string | undefined;
712
+ body?: {
713
+ data?: string | undefined;
714
+ size?: number | undefined;
715
+ attachmentId?: string | undefined;
716
+ } | undefined;
717
+ headers?: {
718
+ value: string;
719
+ name: string;
720
+ }[] | undefined;
721
+ parts?: any[] | undefined;
722
+ } | undefined;
723
+ }[] | undefined;
724
+ result_size_estimate?: number | undefined;
725
+ }, {
726
+ success: boolean;
727
+ error: string;
728
+ operation: "search_emails";
729
+ messages?: {
730
+ id: string;
731
+ threadId: string;
732
+ raw?: string | undefined;
733
+ labelIds?: string[] | undefined;
734
+ snippet?: string | undefined;
735
+ historyId?: string | undefined;
736
+ internalDate?: string | undefined;
737
+ sizeEstimate?: number | undefined;
738
+ payload?: {
739
+ mimeType?: string | undefined;
740
+ body?: {
741
+ data?: string | undefined;
742
+ size?: number | undefined;
743
+ attachmentId?: string | undefined;
744
+ } | undefined;
745
+ headers?: {
746
+ value: string;
747
+ name: string;
748
+ }[] | undefined;
749
+ parts?: any[] | undefined;
750
+ } | undefined;
751
+ }[] | undefined;
752
+ result_size_estimate?: number | undefined;
753
+ }>, z.ZodObject<{
754
+ operation: z.ZodLiteral<"mark_as_read">;
755
+ success: z.ZodBoolean;
756
+ modified_messages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
757
+ error: z.ZodString;
758
+ }, "strip", z.ZodTypeAny, {
759
+ success: boolean;
760
+ error: string;
761
+ operation: "mark_as_read";
762
+ modified_messages?: string[] | undefined;
763
+ }, {
764
+ success: boolean;
765
+ error: string;
766
+ operation: "mark_as_read";
767
+ modified_messages?: string[] | undefined;
768
+ }>, z.ZodObject<{
769
+ operation: z.ZodLiteral<"mark_as_unread">;
770
+ success: z.ZodBoolean;
771
+ modified_messages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
772
+ error: z.ZodString;
773
+ }, "strip", z.ZodTypeAny, {
774
+ success: boolean;
775
+ error: string;
776
+ operation: "mark_as_unread";
777
+ modified_messages?: string[] | undefined;
778
+ }, {
779
+ success: boolean;
780
+ error: string;
781
+ operation: "mark_as_unread";
782
+ modified_messages?: string[] | undefined;
783
+ }>, z.ZodObject<{
784
+ operation: z.ZodLiteral<"create_draft">;
785
+ success: z.ZodBoolean;
786
+ draft: z.ZodOptional<z.ZodObject<{
787
+ id: z.ZodString;
788
+ message: z.ZodObject<{
789
+ id: z.ZodString;
790
+ threadId: z.ZodString;
791
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
792
+ snippet: z.ZodOptional<z.ZodString>;
793
+ historyId: z.ZodOptional<z.ZodString>;
794
+ internalDate: z.ZodOptional<z.ZodString>;
795
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
796
+ raw: z.ZodOptional<z.ZodString>;
797
+ payload: z.ZodOptional<z.ZodObject<{
798
+ mimeType: z.ZodOptional<z.ZodString>;
799
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
800
+ name: z.ZodString;
801
+ value: z.ZodString;
802
+ }, "strip", z.ZodTypeAny, {
803
+ value: string;
804
+ name: string;
805
+ }, {
806
+ value: string;
807
+ name: string;
808
+ }>, "many">>;
809
+ body: z.ZodOptional<z.ZodObject<{
810
+ data: z.ZodOptional<z.ZodString>;
811
+ size: z.ZodOptional<z.ZodNumber>;
812
+ attachmentId: z.ZodOptional<z.ZodString>;
813
+ }, "strip", z.ZodTypeAny, {
814
+ data?: string | undefined;
815
+ size?: number | undefined;
816
+ attachmentId?: string | undefined;
817
+ }, {
818
+ data?: string | undefined;
819
+ size?: number | undefined;
820
+ attachmentId?: string | undefined;
821
+ }>>;
822
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
823
+ }, "strip", z.ZodTypeAny, {
824
+ mimeType?: string | undefined;
825
+ body?: {
826
+ data?: string | undefined;
827
+ size?: number | undefined;
828
+ attachmentId?: string | undefined;
829
+ } | undefined;
830
+ headers?: {
831
+ value: string;
832
+ name: string;
833
+ }[] | undefined;
834
+ parts?: any[] | undefined;
835
+ }, {
836
+ mimeType?: string | undefined;
837
+ body?: {
838
+ data?: string | undefined;
839
+ size?: number | undefined;
840
+ attachmentId?: string | undefined;
841
+ } | undefined;
842
+ headers?: {
843
+ value: string;
844
+ name: string;
845
+ }[] | undefined;
846
+ parts?: any[] | undefined;
847
+ }>>;
848
+ }, "strip", z.ZodTypeAny, {
849
+ id: string;
850
+ threadId: string;
851
+ raw?: string | undefined;
852
+ labelIds?: string[] | undefined;
853
+ snippet?: string | undefined;
854
+ historyId?: string | undefined;
855
+ internalDate?: string | undefined;
856
+ sizeEstimate?: number | undefined;
857
+ payload?: {
858
+ mimeType?: string | undefined;
859
+ body?: {
860
+ data?: string | undefined;
861
+ size?: number | undefined;
862
+ attachmentId?: string | undefined;
863
+ } | undefined;
864
+ headers?: {
865
+ value: string;
866
+ name: string;
867
+ }[] | undefined;
868
+ parts?: any[] | undefined;
869
+ } | undefined;
870
+ }, {
871
+ id: string;
872
+ threadId: string;
873
+ raw?: string | undefined;
874
+ labelIds?: string[] | undefined;
875
+ snippet?: string | undefined;
876
+ historyId?: string | undefined;
877
+ internalDate?: string | undefined;
878
+ sizeEstimate?: number | undefined;
879
+ payload?: {
880
+ mimeType?: string | undefined;
881
+ body?: {
882
+ data?: string | undefined;
883
+ size?: number | undefined;
884
+ attachmentId?: string | undefined;
885
+ } | undefined;
886
+ headers?: {
887
+ value: string;
888
+ name: string;
889
+ }[] | undefined;
890
+ parts?: any[] | undefined;
891
+ } | undefined;
892
+ }>;
893
+ }, "strip", z.ZodTypeAny, {
894
+ message: {
895
+ id: string;
896
+ threadId: string;
897
+ raw?: string | undefined;
898
+ labelIds?: string[] | undefined;
899
+ snippet?: string | undefined;
900
+ historyId?: string | undefined;
901
+ internalDate?: string | undefined;
902
+ sizeEstimate?: number | undefined;
903
+ payload?: {
904
+ mimeType?: string | undefined;
905
+ body?: {
906
+ data?: string | undefined;
907
+ size?: number | undefined;
908
+ attachmentId?: string | undefined;
909
+ } | undefined;
910
+ headers?: {
911
+ value: string;
912
+ name: string;
913
+ }[] | undefined;
914
+ parts?: any[] | undefined;
915
+ } | undefined;
916
+ };
917
+ id: string;
918
+ }, {
919
+ message: {
920
+ id: string;
921
+ threadId: string;
922
+ raw?: string | undefined;
923
+ labelIds?: string[] | undefined;
924
+ snippet?: string | undefined;
925
+ historyId?: string | undefined;
926
+ internalDate?: string | undefined;
927
+ sizeEstimate?: number | undefined;
928
+ payload?: {
929
+ mimeType?: string | undefined;
930
+ body?: {
931
+ data?: string | undefined;
932
+ size?: number | undefined;
933
+ attachmentId?: string | undefined;
934
+ } | undefined;
935
+ headers?: {
936
+ value: string;
937
+ name: string;
938
+ }[] | undefined;
939
+ parts?: any[] | undefined;
940
+ } | undefined;
941
+ };
942
+ id: string;
943
+ }>>;
944
+ error: z.ZodString;
945
+ }, "strip", z.ZodTypeAny, {
946
+ success: boolean;
947
+ error: string;
948
+ operation: "create_draft";
949
+ draft?: {
950
+ message: {
951
+ id: string;
952
+ threadId: string;
953
+ raw?: string | undefined;
954
+ labelIds?: string[] | undefined;
955
+ snippet?: string | undefined;
956
+ historyId?: string | undefined;
957
+ internalDate?: string | undefined;
958
+ sizeEstimate?: number | undefined;
959
+ payload?: {
960
+ mimeType?: string | undefined;
961
+ body?: {
962
+ data?: string | undefined;
963
+ size?: number | undefined;
964
+ attachmentId?: string | undefined;
965
+ } | undefined;
966
+ headers?: {
967
+ value: string;
968
+ name: string;
969
+ }[] | undefined;
970
+ parts?: any[] | undefined;
971
+ } | undefined;
972
+ };
973
+ id: string;
974
+ } | undefined;
975
+ }, {
976
+ success: boolean;
977
+ error: string;
978
+ operation: "create_draft";
979
+ draft?: {
980
+ message: {
981
+ id: string;
982
+ threadId: string;
983
+ raw?: string | undefined;
984
+ labelIds?: string[] | undefined;
985
+ snippet?: string | undefined;
986
+ historyId?: string | undefined;
987
+ internalDate?: string | undefined;
988
+ sizeEstimate?: number | undefined;
989
+ payload?: {
990
+ mimeType?: string | undefined;
991
+ body?: {
992
+ data?: string | undefined;
993
+ size?: number | undefined;
994
+ attachmentId?: string | undefined;
995
+ } | undefined;
996
+ headers?: {
997
+ value: string;
998
+ name: string;
999
+ }[] | undefined;
1000
+ parts?: any[] | undefined;
1001
+ } | undefined;
1002
+ };
1003
+ id: string;
1004
+ } | undefined;
1005
+ }>, z.ZodObject<{
1006
+ operation: z.ZodLiteral<"send_draft">;
1007
+ success: z.ZodBoolean;
1008
+ message_id: z.ZodOptional<z.ZodString>;
1009
+ thread_id: z.ZodOptional<z.ZodString>;
1010
+ error: z.ZodString;
1011
+ }, "strip", z.ZodTypeAny, {
1012
+ success: boolean;
1013
+ error: string;
1014
+ operation: "send_draft";
1015
+ thread_id?: string | undefined;
1016
+ message_id?: string | undefined;
1017
+ }, {
1018
+ success: boolean;
1019
+ error: string;
1020
+ operation: "send_draft";
1021
+ thread_id?: string | undefined;
1022
+ message_id?: string | undefined;
1023
+ }>, z.ZodObject<{
1024
+ operation: z.ZodLiteral<"list_drafts">;
1025
+ success: z.ZodBoolean;
1026
+ drafts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1027
+ id: z.ZodString;
1028
+ message: z.ZodObject<{
1029
+ id: z.ZodString;
1030
+ threadId: z.ZodString;
1031
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1032
+ snippet: z.ZodOptional<z.ZodString>;
1033
+ historyId: z.ZodOptional<z.ZodString>;
1034
+ internalDate: z.ZodOptional<z.ZodString>;
1035
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
1036
+ raw: z.ZodOptional<z.ZodString>;
1037
+ payload: z.ZodOptional<z.ZodObject<{
1038
+ mimeType: z.ZodOptional<z.ZodString>;
1039
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1040
+ name: z.ZodString;
1041
+ value: z.ZodString;
1042
+ }, "strip", z.ZodTypeAny, {
1043
+ value: string;
1044
+ name: string;
1045
+ }, {
1046
+ value: string;
1047
+ name: string;
1048
+ }>, "many">>;
1049
+ body: z.ZodOptional<z.ZodObject<{
1050
+ data: z.ZodOptional<z.ZodString>;
1051
+ size: z.ZodOptional<z.ZodNumber>;
1052
+ attachmentId: z.ZodOptional<z.ZodString>;
1053
+ }, "strip", z.ZodTypeAny, {
1054
+ data?: string | undefined;
1055
+ size?: number | undefined;
1056
+ attachmentId?: string | undefined;
1057
+ }, {
1058
+ data?: string | undefined;
1059
+ size?: number | undefined;
1060
+ attachmentId?: string | undefined;
1061
+ }>>;
1062
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1063
+ }, "strip", z.ZodTypeAny, {
1064
+ mimeType?: string | undefined;
1065
+ body?: {
1066
+ data?: string | undefined;
1067
+ size?: number | undefined;
1068
+ attachmentId?: string | undefined;
1069
+ } | undefined;
1070
+ headers?: {
1071
+ value: string;
1072
+ name: string;
1073
+ }[] | undefined;
1074
+ parts?: any[] | undefined;
1075
+ }, {
1076
+ mimeType?: string | undefined;
1077
+ body?: {
1078
+ data?: string | undefined;
1079
+ size?: number | undefined;
1080
+ attachmentId?: string | undefined;
1081
+ } | undefined;
1082
+ headers?: {
1083
+ value: string;
1084
+ name: string;
1085
+ }[] | undefined;
1086
+ parts?: any[] | undefined;
1087
+ }>>;
1088
+ }, "strip", z.ZodTypeAny, {
1089
+ id: string;
1090
+ threadId: string;
1091
+ raw?: string | undefined;
1092
+ labelIds?: string[] | undefined;
1093
+ snippet?: string | undefined;
1094
+ historyId?: string | undefined;
1095
+ internalDate?: string | undefined;
1096
+ sizeEstimate?: number | undefined;
1097
+ payload?: {
1098
+ mimeType?: string | undefined;
1099
+ body?: {
1100
+ data?: string | undefined;
1101
+ size?: number | undefined;
1102
+ attachmentId?: string | undefined;
1103
+ } | undefined;
1104
+ headers?: {
1105
+ value: string;
1106
+ name: string;
1107
+ }[] | undefined;
1108
+ parts?: any[] | undefined;
1109
+ } | undefined;
1110
+ }, {
1111
+ id: string;
1112
+ threadId: string;
1113
+ raw?: string | undefined;
1114
+ labelIds?: string[] | undefined;
1115
+ snippet?: string | undefined;
1116
+ historyId?: string | undefined;
1117
+ internalDate?: string | undefined;
1118
+ sizeEstimate?: number | undefined;
1119
+ payload?: {
1120
+ mimeType?: string | undefined;
1121
+ body?: {
1122
+ data?: string | undefined;
1123
+ size?: number | undefined;
1124
+ attachmentId?: string | undefined;
1125
+ } | undefined;
1126
+ headers?: {
1127
+ value: string;
1128
+ name: string;
1129
+ }[] | undefined;
1130
+ parts?: any[] | undefined;
1131
+ } | undefined;
1132
+ }>;
1133
+ }, "strip", z.ZodTypeAny, {
1134
+ message: {
1135
+ id: string;
1136
+ threadId: string;
1137
+ raw?: string | undefined;
1138
+ labelIds?: string[] | undefined;
1139
+ snippet?: string | undefined;
1140
+ historyId?: string | undefined;
1141
+ internalDate?: string | undefined;
1142
+ sizeEstimate?: number | undefined;
1143
+ payload?: {
1144
+ mimeType?: string | undefined;
1145
+ body?: {
1146
+ data?: string | undefined;
1147
+ size?: number | undefined;
1148
+ attachmentId?: string | undefined;
1149
+ } | undefined;
1150
+ headers?: {
1151
+ value: string;
1152
+ name: string;
1153
+ }[] | undefined;
1154
+ parts?: any[] | undefined;
1155
+ } | undefined;
1156
+ };
1157
+ id: string;
1158
+ }, {
1159
+ message: {
1160
+ id: string;
1161
+ threadId: string;
1162
+ raw?: string | undefined;
1163
+ labelIds?: string[] | undefined;
1164
+ snippet?: string | undefined;
1165
+ historyId?: string | undefined;
1166
+ internalDate?: string | undefined;
1167
+ sizeEstimate?: number | undefined;
1168
+ payload?: {
1169
+ mimeType?: string | undefined;
1170
+ body?: {
1171
+ data?: string | undefined;
1172
+ size?: number | undefined;
1173
+ attachmentId?: string | undefined;
1174
+ } | undefined;
1175
+ headers?: {
1176
+ value: string;
1177
+ name: string;
1178
+ }[] | undefined;
1179
+ parts?: any[] | undefined;
1180
+ } | undefined;
1181
+ };
1182
+ id: string;
1183
+ }>, "many">>;
1184
+ next_page_token: z.ZodOptional<z.ZodString>;
1185
+ result_size_estimate: z.ZodOptional<z.ZodNumber>;
1186
+ error: z.ZodString;
1187
+ }, "strip", z.ZodTypeAny, {
1188
+ success: boolean;
1189
+ error: string;
1190
+ operation: "list_drafts";
1191
+ next_page_token?: string | undefined;
1192
+ result_size_estimate?: number | undefined;
1193
+ drafts?: {
1194
+ message: {
1195
+ id: string;
1196
+ threadId: string;
1197
+ raw?: string | undefined;
1198
+ labelIds?: string[] | undefined;
1199
+ snippet?: string | undefined;
1200
+ historyId?: string | undefined;
1201
+ internalDate?: string | undefined;
1202
+ sizeEstimate?: number | undefined;
1203
+ payload?: {
1204
+ mimeType?: string | undefined;
1205
+ body?: {
1206
+ data?: string | undefined;
1207
+ size?: number | undefined;
1208
+ attachmentId?: string | undefined;
1209
+ } | undefined;
1210
+ headers?: {
1211
+ value: string;
1212
+ name: string;
1213
+ }[] | undefined;
1214
+ parts?: any[] | undefined;
1215
+ } | undefined;
1216
+ };
1217
+ id: string;
1218
+ }[] | undefined;
1219
+ }, {
1220
+ success: boolean;
1221
+ error: string;
1222
+ operation: "list_drafts";
1223
+ next_page_token?: string | undefined;
1224
+ result_size_estimate?: number | undefined;
1225
+ drafts?: {
1226
+ message: {
1227
+ id: string;
1228
+ threadId: string;
1229
+ raw?: string | undefined;
1230
+ labelIds?: string[] | undefined;
1231
+ snippet?: string | undefined;
1232
+ historyId?: string | undefined;
1233
+ internalDate?: string | undefined;
1234
+ sizeEstimate?: number | undefined;
1235
+ payload?: {
1236
+ mimeType?: string | undefined;
1237
+ body?: {
1238
+ data?: string | undefined;
1239
+ size?: number | undefined;
1240
+ attachmentId?: string | undefined;
1241
+ } | undefined;
1242
+ headers?: {
1243
+ value: string;
1244
+ name: string;
1245
+ }[] | undefined;
1246
+ parts?: any[] | undefined;
1247
+ } | undefined;
1248
+ };
1249
+ id: string;
1250
+ }[] | undefined;
1251
+ }>, z.ZodObject<{
1252
+ operation: z.ZodLiteral<"delete_email">;
1253
+ success: z.ZodBoolean;
1254
+ deleted_message_id: z.ZodOptional<z.ZodString>;
1255
+ error: z.ZodString;
1256
+ }, "strip", z.ZodTypeAny, {
1257
+ success: boolean;
1258
+ error: string;
1259
+ operation: "delete_email";
1260
+ deleted_message_id?: string | undefined;
1261
+ }, {
1262
+ success: boolean;
1263
+ error: string;
1264
+ operation: "delete_email";
1265
+ deleted_message_id?: string | undefined;
1266
+ }>, z.ZodObject<{
1267
+ operation: z.ZodLiteral<"trash_email">;
1268
+ success: z.ZodBoolean;
1269
+ trashed_message_id: z.ZodOptional<z.ZodString>;
1270
+ error: z.ZodString;
1271
+ }, "strip", z.ZodTypeAny, {
1272
+ success: boolean;
1273
+ error: string;
1274
+ operation: "trash_email";
1275
+ trashed_message_id?: string | undefined;
1276
+ }, {
1277
+ success: boolean;
1278
+ error: string;
1279
+ operation: "trash_email";
1280
+ trashed_message_id?: string | undefined;
1281
+ }>, z.ZodObject<{
1282
+ operation: z.ZodLiteral<"list_threads">;
1283
+ success: z.ZodBoolean;
1284
+ threads: z.ZodOptional<z.ZodArray<z.ZodObject<{
1285
+ id: z.ZodString;
1286
+ historyId: z.ZodOptional<z.ZodString>;
1287
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1288
+ id: z.ZodString;
1289
+ threadId: z.ZodString;
1290
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1291
+ snippet: z.ZodOptional<z.ZodString>;
1292
+ historyId: z.ZodOptional<z.ZodString>;
1293
+ internalDate: z.ZodOptional<z.ZodString>;
1294
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
1295
+ raw: z.ZodOptional<z.ZodString>;
1296
+ payload: z.ZodOptional<z.ZodObject<{
1297
+ mimeType: z.ZodOptional<z.ZodString>;
1298
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1299
+ name: z.ZodString;
1300
+ value: z.ZodString;
1301
+ }, "strip", z.ZodTypeAny, {
1302
+ value: string;
1303
+ name: string;
1304
+ }, {
1305
+ value: string;
1306
+ name: string;
1307
+ }>, "many">>;
1308
+ body: z.ZodOptional<z.ZodObject<{
1309
+ data: z.ZodOptional<z.ZodString>;
1310
+ size: z.ZodOptional<z.ZodNumber>;
1311
+ attachmentId: z.ZodOptional<z.ZodString>;
1312
+ }, "strip", z.ZodTypeAny, {
1313
+ data?: string | undefined;
1314
+ size?: number | undefined;
1315
+ attachmentId?: string | undefined;
1316
+ }, {
1317
+ data?: string | undefined;
1318
+ size?: number | undefined;
1319
+ attachmentId?: string | undefined;
1320
+ }>>;
1321
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1322
+ }, "strip", z.ZodTypeAny, {
1323
+ mimeType?: string | undefined;
1324
+ body?: {
1325
+ data?: string | undefined;
1326
+ size?: number | undefined;
1327
+ attachmentId?: string | undefined;
1328
+ } | undefined;
1329
+ headers?: {
1330
+ value: string;
1331
+ name: string;
1332
+ }[] | undefined;
1333
+ parts?: any[] | undefined;
1334
+ }, {
1335
+ mimeType?: string | undefined;
1336
+ body?: {
1337
+ data?: string | undefined;
1338
+ size?: number | undefined;
1339
+ attachmentId?: string | undefined;
1340
+ } | undefined;
1341
+ headers?: {
1342
+ value: string;
1343
+ name: string;
1344
+ }[] | undefined;
1345
+ parts?: any[] | undefined;
1346
+ }>>;
1347
+ }, "strip", z.ZodTypeAny, {
1348
+ id: string;
1349
+ threadId: string;
1350
+ raw?: string | undefined;
1351
+ labelIds?: string[] | undefined;
1352
+ snippet?: string | undefined;
1353
+ historyId?: string | undefined;
1354
+ internalDate?: string | undefined;
1355
+ sizeEstimate?: number | undefined;
1356
+ payload?: {
1357
+ mimeType?: string | undefined;
1358
+ body?: {
1359
+ data?: string | undefined;
1360
+ size?: number | undefined;
1361
+ attachmentId?: string | undefined;
1362
+ } | undefined;
1363
+ headers?: {
1364
+ value: string;
1365
+ name: string;
1366
+ }[] | undefined;
1367
+ parts?: any[] | undefined;
1368
+ } | undefined;
1369
+ }, {
1370
+ id: string;
1371
+ threadId: string;
1372
+ raw?: string | undefined;
1373
+ labelIds?: string[] | undefined;
1374
+ snippet?: string | undefined;
1375
+ historyId?: string | undefined;
1376
+ internalDate?: string | undefined;
1377
+ sizeEstimate?: number | undefined;
1378
+ payload?: {
1379
+ mimeType?: string | undefined;
1380
+ body?: {
1381
+ data?: string | undefined;
1382
+ size?: number | undefined;
1383
+ attachmentId?: string | undefined;
1384
+ } | undefined;
1385
+ headers?: {
1386
+ value: string;
1387
+ name: string;
1388
+ }[] | undefined;
1389
+ parts?: any[] | undefined;
1390
+ } | undefined;
1391
+ }>, "many">>;
1392
+ snippet: z.ZodOptional<z.ZodString>;
1393
+ }, "strip", z.ZodTypeAny, {
1394
+ id: string;
1395
+ messages?: {
1396
+ id: string;
1397
+ threadId: string;
1398
+ raw?: string | undefined;
1399
+ labelIds?: string[] | undefined;
1400
+ snippet?: string | undefined;
1401
+ historyId?: string | undefined;
1402
+ internalDate?: string | undefined;
1403
+ sizeEstimate?: number | undefined;
1404
+ payload?: {
1405
+ mimeType?: string | undefined;
1406
+ body?: {
1407
+ data?: string | undefined;
1408
+ size?: number | undefined;
1409
+ attachmentId?: string | undefined;
1410
+ } | undefined;
1411
+ headers?: {
1412
+ value: string;
1413
+ name: string;
1414
+ }[] | undefined;
1415
+ parts?: any[] | undefined;
1416
+ } | undefined;
1417
+ }[] | undefined;
1418
+ snippet?: string | undefined;
1419
+ historyId?: string | undefined;
1420
+ }, {
1421
+ id: string;
1422
+ messages?: {
1423
+ id: string;
1424
+ threadId: string;
1425
+ raw?: string | undefined;
1426
+ labelIds?: string[] | undefined;
1427
+ snippet?: string | undefined;
1428
+ historyId?: string | undefined;
1429
+ internalDate?: string | undefined;
1430
+ sizeEstimate?: number | undefined;
1431
+ payload?: {
1432
+ mimeType?: string | undefined;
1433
+ body?: {
1434
+ data?: string | undefined;
1435
+ size?: number | undefined;
1436
+ attachmentId?: string | undefined;
1437
+ } | undefined;
1438
+ headers?: {
1439
+ value: string;
1440
+ name: string;
1441
+ }[] | undefined;
1442
+ parts?: any[] | undefined;
1443
+ } | undefined;
1444
+ }[] | undefined;
1445
+ snippet?: string | undefined;
1446
+ historyId?: string | undefined;
1447
+ }>, "many">>;
1448
+ next_page_token: z.ZodOptional<z.ZodString>;
1449
+ result_size_estimate: z.ZodOptional<z.ZodNumber>;
1450
+ error: z.ZodString;
1451
+ }, "strip", z.ZodTypeAny, {
1452
+ success: boolean;
1453
+ error: string;
1454
+ operation: "list_threads";
1455
+ next_page_token?: string | undefined;
1456
+ result_size_estimate?: number | undefined;
1457
+ threads?: {
1458
+ id: string;
1459
+ messages?: {
1460
+ id: string;
1461
+ threadId: string;
1462
+ raw?: string | undefined;
1463
+ labelIds?: string[] | undefined;
1464
+ snippet?: string | undefined;
1465
+ historyId?: string | undefined;
1466
+ internalDate?: string | undefined;
1467
+ sizeEstimate?: number | undefined;
1468
+ payload?: {
1469
+ mimeType?: string | undefined;
1470
+ body?: {
1471
+ data?: string | undefined;
1472
+ size?: number | undefined;
1473
+ attachmentId?: string | undefined;
1474
+ } | undefined;
1475
+ headers?: {
1476
+ value: string;
1477
+ name: string;
1478
+ }[] | undefined;
1479
+ parts?: any[] | undefined;
1480
+ } | undefined;
1481
+ }[] | undefined;
1482
+ snippet?: string | undefined;
1483
+ historyId?: string | undefined;
1484
+ }[] | undefined;
1485
+ }, {
1486
+ success: boolean;
1487
+ error: string;
1488
+ operation: "list_threads";
1489
+ next_page_token?: string | undefined;
1490
+ result_size_estimate?: number | undefined;
1491
+ threads?: {
1492
+ id: string;
1493
+ messages?: {
1494
+ id: string;
1495
+ threadId: string;
1496
+ raw?: string | undefined;
1497
+ labelIds?: string[] | undefined;
1498
+ snippet?: string | undefined;
1499
+ historyId?: string | undefined;
1500
+ internalDate?: string | undefined;
1501
+ sizeEstimate?: number | undefined;
1502
+ payload?: {
1503
+ mimeType?: string | undefined;
1504
+ body?: {
1505
+ data?: string | undefined;
1506
+ size?: number | undefined;
1507
+ attachmentId?: string | undefined;
1508
+ } | undefined;
1509
+ headers?: {
1510
+ value: string;
1511
+ name: string;
1512
+ }[] | undefined;
1513
+ parts?: any[] | undefined;
1514
+ } | undefined;
1515
+ }[] | undefined;
1516
+ snippet?: string | undefined;
1517
+ historyId?: string | undefined;
1518
+ }[] | undefined;
1519
+ }>]>;
1520
+ type GmailResult = z.output<typeof GmailResultSchema>;
1521
+ type GmailParams = z.input<typeof GmailParamsSchema>;
1522
+ export type GmailOperationResult<T extends GmailParams['operation']> = Extract<GmailResult, {
1523
+ operation: T;
1524
+ }>;
1525
+ export type GmailParamsInput = z.input<typeof GmailParamsSchema>;
1526
+ export declare class GmailBubble<T extends GmailParams = GmailParams> extends ServiceBubble<T, Extract<GmailResult, {
1527
+ operation: T['operation'];
1528
+ }>> {
1529
+ static readonly type: "service";
1530
+ static readonly service = "gmail";
1531
+ static readonly authType: "oauth";
1532
+ static readonly bubbleName = "gmail";
1533
+ static readonly schema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
1534
+ operation: z.ZodLiteral<"send_email">;
1535
+ to: z.ZodArray<z.ZodString, "many">;
1536
+ cc: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1537
+ bcc: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1538
+ subject: z.ZodString;
1539
+ body_text: z.ZodOptional<z.ZodString>;
1540
+ body_html: z.ZodOptional<z.ZodString>;
1541
+ reply_to: z.ZodOptional<z.ZodString>;
1542
+ thread_id: z.ZodOptional<z.ZodString>;
1543
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1544
+ }, "strip", z.ZodTypeAny, {
1545
+ operation: "send_email";
1546
+ to: string[];
1547
+ subject: string;
1548
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1549
+ cc?: string[] | undefined;
1550
+ bcc?: string[] | undefined;
1551
+ reply_to?: string | undefined;
1552
+ body_text?: string | undefined;
1553
+ body_html?: string | undefined;
1554
+ thread_id?: string | undefined;
1555
+ }, {
1556
+ operation: "send_email";
1557
+ to: string[];
1558
+ subject: string;
1559
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1560
+ cc?: string[] | undefined;
1561
+ bcc?: string[] | undefined;
1562
+ reply_to?: string | undefined;
1563
+ body_text?: string | undefined;
1564
+ body_html?: string | undefined;
1565
+ thread_id?: string | undefined;
1566
+ }>, z.ZodObject<{
1567
+ operation: z.ZodLiteral<"list_emails">;
1568
+ query: z.ZodOptional<z.ZodString>;
1569
+ label_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1570
+ include_spam_trash: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1571
+ max_results: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1572
+ page_token: z.ZodOptional<z.ZodString>;
1573
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1574
+ }, "strip", z.ZodTypeAny, {
1575
+ operation: "list_emails";
1576
+ max_results: number;
1577
+ include_spam_trash: boolean;
1578
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1579
+ query?: string | undefined;
1580
+ label_ids?: string[] | undefined;
1581
+ page_token?: string | undefined;
1582
+ }, {
1583
+ operation: "list_emails";
1584
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1585
+ query?: string | undefined;
1586
+ max_results?: number | undefined;
1587
+ label_ids?: string[] | undefined;
1588
+ include_spam_trash?: boolean | undefined;
1589
+ page_token?: string | undefined;
1590
+ }>, z.ZodObject<{
1591
+ operation: z.ZodLiteral<"get_email">;
1592
+ message_id: z.ZodString;
1593
+ format: z.ZodDefault<z.ZodOptional<z.ZodEnum<["minimal", "full", "raw", "metadata"]>>>;
1594
+ metadata_headers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1595
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1596
+ }, "strip", z.ZodTypeAny, {
1597
+ format: "metadata" | "raw" | "minimal" | "full";
1598
+ operation: "get_email";
1599
+ message_id: string;
1600
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1601
+ metadata_headers?: string[] | undefined;
1602
+ }, {
1603
+ operation: "get_email";
1604
+ message_id: string;
1605
+ format?: "metadata" | "raw" | "minimal" | "full" | undefined;
1606
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1607
+ metadata_headers?: string[] | undefined;
1608
+ }>, z.ZodObject<{
1609
+ operation: z.ZodLiteral<"search_emails">;
1610
+ query: z.ZodString;
1611
+ max_results: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1612
+ include_spam_trash: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1613
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1614
+ }, "strip", z.ZodTypeAny, {
1615
+ query: string;
1616
+ operation: "search_emails";
1617
+ max_results: number;
1618
+ include_spam_trash: boolean;
1619
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1620
+ }, {
1621
+ query: string;
1622
+ operation: "search_emails";
1623
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1624
+ max_results?: number | undefined;
1625
+ include_spam_trash?: boolean | undefined;
1626
+ }>, z.ZodObject<{
1627
+ operation: z.ZodLiteral<"mark_as_read">;
1628
+ message_ids: z.ZodArray<z.ZodString, "many">;
1629
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1630
+ }, "strip", z.ZodTypeAny, {
1631
+ operation: "mark_as_read";
1632
+ message_ids: string[];
1633
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1634
+ }, {
1635
+ operation: "mark_as_read";
1636
+ message_ids: string[];
1637
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1638
+ }>, z.ZodObject<{
1639
+ operation: z.ZodLiteral<"mark_as_unread">;
1640
+ message_ids: z.ZodArray<z.ZodString, "many">;
1641
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1642
+ }, "strip", z.ZodTypeAny, {
1643
+ operation: "mark_as_unread";
1644
+ message_ids: string[];
1645
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1646
+ }, {
1647
+ operation: "mark_as_unread";
1648
+ message_ids: string[];
1649
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1650
+ }>, z.ZodObject<{
1651
+ operation: z.ZodLiteral<"create_draft">;
1652
+ to: z.ZodArray<z.ZodString, "many">;
1653
+ cc: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1654
+ bcc: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1655
+ subject: z.ZodString;
1656
+ body_text: z.ZodOptional<z.ZodString>;
1657
+ body_html: z.ZodOptional<z.ZodString>;
1658
+ reply_to: z.ZodOptional<z.ZodString>;
1659
+ thread_id: z.ZodOptional<z.ZodString>;
1660
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1661
+ }, "strip", z.ZodTypeAny, {
1662
+ operation: "create_draft";
1663
+ to: string[];
1664
+ subject: string;
1665
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1666
+ cc?: string[] | undefined;
1667
+ bcc?: string[] | undefined;
1668
+ reply_to?: string | undefined;
1669
+ body_text?: string | undefined;
1670
+ body_html?: string | undefined;
1671
+ thread_id?: string | undefined;
1672
+ }, {
1673
+ operation: "create_draft";
1674
+ to: string[];
1675
+ subject: string;
1676
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1677
+ cc?: string[] | undefined;
1678
+ bcc?: string[] | undefined;
1679
+ reply_to?: string | undefined;
1680
+ body_text?: string | undefined;
1681
+ body_html?: string | undefined;
1682
+ thread_id?: string | undefined;
1683
+ }>, z.ZodObject<{
1684
+ operation: z.ZodLiteral<"send_draft">;
1685
+ draft_id: z.ZodString;
1686
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1687
+ }, "strip", z.ZodTypeAny, {
1688
+ operation: "send_draft";
1689
+ draft_id: string;
1690
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1691
+ }, {
1692
+ operation: "send_draft";
1693
+ draft_id: string;
1694
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1695
+ }>, z.ZodObject<{
1696
+ operation: z.ZodLiteral<"list_drafts">;
1697
+ query: z.ZodOptional<z.ZodString>;
1698
+ max_results: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1699
+ page_token: z.ZodOptional<z.ZodString>;
1700
+ include_spam_trash: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1701
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1702
+ }, "strip", z.ZodTypeAny, {
1703
+ operation: "list_drafts";
1704
+ max_results: number;
1705
+ include_spam_trash: boolean;
1706
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1707
+ query?: string | undefined;
1708
+ page_token?: string | undefined;
1709
+ }, {
1710
+ operation: "list_drafts";
1711
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1712
+ query?: string | undefined;
1713
+ max_results?: number | undefined;
1714
+ include_spam_trash?: boolean | undefined;
1715
+ page_token?: string | undefined;
1716
+ }>, z.ZodObject<{
1717
+ operation: z.ZodLiteral<"delete_email">;
1718
+ message_id: z.ZodString;
1719
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1720
+ }, "strip", z.ZodTypeAny, {
1721
+ operation: "delete_email";
1722
+ message_id: string;
1723
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1724
+ }, {
1725
+ operation: "delete_email";
1726
+ message_id: string;
1727
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1728
+ }>, z.ZodObject<{
1729
+ operation: z.ZodLiteral<"trash_email">;
1730
+ message_id: z.ZodString;
1731
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1732
+ }, "strip", z.ZodTypeAny, {
1733
+ operation: "trash_email";
1734
+ message_id: string;
1735
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1736
+ }, {
1737
+ operation: "trash_email";
1738
+ message_id: string;
1739
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1740
+ }>, z.ZodObject<{
1741
+ operation: z.ZodLiteral<"list_threads">;
1742
+ query: z.ZodOptional<z.ZodString>;
1743
+ label_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1744
+ include_spam_trash: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1745
+ max_results: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1746
+ page_token: z.ZodOptional<z.ZodString>;
1747
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
1748
+ }, "strip", z.ZodTypeAny, {
1749
+ operation: "list_threads";
1750
+ max_results: number;
1751
+ include_spam_trash: boolean;
1752
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1753
+ query?: string | undefined;
1754
+ label_ids?: string[] | undefined;
1755
+ page_token?: string | undefined;
1756
+ }, {
1757
+ operation: "list_threads";
1758
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
1759
+ query?: string | undefined;
1760
+ max_results?: number | undefined;
1761
+ label_ids?: string[] | undefined;
1762
+ include_spam_trash?: boolean | undefined;
1763
+ page_token?: string | undefined;
1764
+ }>]>;
1765
+ static readonly resultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
1766
+ operation: z.ZodLiteral<"send_email">;
1767
+ success: z.ZodBoolean;
1768
+ message_id: z.ZodOptional<z.ZodString>;
1769
+ thread_id: z.ZodOptional<z.ZodString>;
1770
+ error: z.ZodString;
1771
+ }, "strip", z.ZodTypeAny, {
1772
+ success: boolean;
1773
+ error: string;
1774
+ operation: "send_email";
1775
+ thread_id?: string | undefined;
1776
+ message_id?: string | undefined;
1777
+ }, {
1778
+ success: boolean;
1779
+ error: string;
1780
+ operation: "send_email";
1781
+ thread_id?: string | undefined;
1782
+ message_id?: string | undefined;
1783
+ }>, z.ZodObject<{
1784
+ operation: z.ZodLiteral<"list_emails">;
1785
+ success: z.ZodBoolean;
1786
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1787
+ id: z.ZodString;
1788
+ threadId: z.ZodString;
1789
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1790
+ snippet: z.ZodOptional<z.ZodString>;
1791
+ historyId: z.ZodOptional<z.ZodString>;
1792
+ internalDate: z.ZodOptional<z.ZodString>;
1793
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
1794
+ raw: z.ZodOptional<z.ZodString>;
1795
+ payload: z.ZodOptional<z.ZodObject<{
1796
+ mimeType: z.ZodOptional<z.ZodString>;
1797
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1798
+ name: z.ZodString;
1799
+ value: z.ZodString;
1800
+ }, "strip", z.ZodTypeAny, {
1801
+ value: string;
1802
+ name: string;
1803
+ }, {
1804
+ value: string;
1805
+ name: string;
1806
+ }>, "many">>;
1807
+ body: z.ZodOptional<z.ZodObject<{
1808
+ data: z.ZodOptional<z.ZodString>;
1809
+ size: z.ZodOptional<z.ZodNumber>;
1810
+ attachmentId: z.ZodOptional<z.ZodString>;
1811
+ }, "strip", z.ZodTypeAny, {
1812
+ data?: string | undefined;
1813
+ size?: number | undefined;
1814
+ attachmentId?: string | undefined;
1815
+ }, {
1816
+ data?: string | undefined;
1817
+ size?: number | undefined;
1818
+ attachmentId?: string | undefined;
1819
+ }>>;
1820
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1821
+ }, "strip", z.ZodTypeAny, {
1822
+ mimeType?: string | undefined;
1823
+ body?: {
1824
+ data?: string | undefined;
1825
+ size?: number | undefined;
1826
+ attachmentId?: string | undefined;
1827
+ } | undefined;
1828
+ headers?: {
1829
+ value: string;
1830
+ name: string;
1831
+ }[] | undefined;
1832
+ parts?: any[] | undefined;
1833
+ }, {
1834
+ mimeType?: string | undefined;
1835
+ body?: {
1836
+ data?: string | undefined;
1837
+ size?: number | undefined;
1838
+ attachmentId?: string | undefined;
1839
+ } | undefined;
1840
+ headers?: {
1841
+ value: string;
1842
+ name: string;
1843
+ }[] | undefined;
1844
+ parts?: any[] | undefined;
1845
+ }>>;
1846
+ }, "strip", z.ZodTypeAny, {
1847
+ id: string;
1848
+ threadId: string;
1849
+ raw?: string | undefined;
1850
+ labelIds?: string[] | undefined;
1851
+ snippet?: string | undefined;
1852
+ historyId?: string | undefined;
1853
+ internalDate?: string | undefined;
1854
+ sizeEstimate?: number | undefined;
1855
+ payload?: {
1856
+ mimeType?: string | undefined;
1857
+ body?: {
1858
+ data?: string | undefined;
1859
+ size?: number | undefined;
1860
+ attachmentId?: string | undefined;
1861
+ } | undefined;
1862
+ headers?: {
1863
+ value: string;
1864
+ name: string;
1865
+ }[] | undefined;
1866
+ parts?: any[] | undefined;
1867
+ } | undefined;
1868
+ }, {
1869
+ id: string;
1870
+ threadId: string;
1871
+ raw?: string | undefined;
1872
+ labelIds?: string[] | undefined;
1873
+ snippet?: string | undefined;
1874
+ historyId?: string | undefined;
1875
+ internalDate?: string | undefined;
1876
+ sizeEstimate?: number | undefined;
1877
+ payload?: {
1878
+ mimeType?: string | undefined;
1879
+ body?: {
1880
+ data?: string | undefined;
1881
+ size?: number | undefined;
1882
+ attachmentId?: string | undefined;
1883
+ } | undefined;
1884
+ headers?: {
1885
+ value: string;
1886
+ name: string;
1887
+ }[] | undefined;
1888
+ parts?: any[] | undefined;
1889
+ } | undefined;
1890
+ }>, "many">>;
1891
+ next_page_token: z.ZodOptional<z.ZodString>;
1892
+ result_size_estimate: z.ZodOptional<z.ZodNumber>;
1893
+ error: z.ZodString;
1894
+ }, "strip", z.ZodTypeAny, {
1895
+ success: boolean;
1896
+ error: string;
1897
+ operation: "list_emails";
1898
+ messages?: {
1899
+ id: string;
1900
+ threadId: string;
1901
+ raw?: string | undefined;
1902
+ labelIds?: string[] | undefined;
1903
+ snippet?: string | undefined;
1904
+ historyId?: string | undefined;
1905
+ internalDate?: string | undefined;
1906
+ sizeEstimate?: number | undefined;
1907
+ payload?: {
1908
+ mimeType?: string | undefined;
1909
+ body?: {
1910
+ data?: string | undefined;
1911
+ size?: number | undefined;
1912
+ attachmentId?: string | undefined;
1913
+ } | undefined;
1914
+ headers?: {
1915
+ value: string;
1916
+ name: string;
1917
+ }[] | undefined;
1918
+ parts?: any[] | undefined;
1919
+ } | undefined;
1920
+ }[] | undefined;
1921
+ next_page_token?: string | undefined;
1922
+ result_size_estimate?: number | undefined;
1923
+ }, {
1924
+ success: boolean;
1925
+ error: string;
1926
+ operation: "list_emails";
1927
+ messages?: {
1928
+ id: string;
1929
+ threadId: string;
1930
+ raw?: string | undefined;
1931
+ labelIds?: string[] | undefined;
1932
+ snippet?: string | undefined;
1933
+ historyId?: string | undefined;
1934
+ internalDate?: string | undefined;
1935
+ sizeEstimate?: number | undefined;
1936
+ payload?: {
1937
+ mimeType?: string | undefined;
1938
+ body?: {
1939
+ data?: string | undefined;
1940
+ size?: number | undefined;
1941
+ attachmentId?: string | undefined;
1942
+ } | undefined;
1943
+ headers?: {
1944
+ value: string;
1945
+ name: string;
1946
+ }[] | undefined;
1947
+ parts?: any[] | undefined;
1948
+ } | undefined;
1949
+ }[] | undefined;
1950
+ next_page_token?: string | undefined;
1951
+ result_size_estimate?: number | undefined;
1952
+ }>, z.ZodObject<{
1953
+ operation: z.ZodLiteral<"get_email">;
1954
+ success: z.ZodBoolean;
1955
+ message: z.ZodOptional<z.ZodObject<{
1956
+ id: z.ZodString;
1957
+ threadId: z.ZodString;
1958
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1959
+ snippet: z.ZodOptional<z.ZodString>;
1960
+ historyId: z.ZodOptional<z.ZodString>;
1961
+ internalDate: z.ZodOptional<z.ZodString>;
1962
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
1963
+ raw: z.ZodOptional<z.ZodString>;
1964
+ payload: z.ZodOptional<z.ZodObject<{
1965
+ mimeType: z.ZodOptional<z.ZodString>;
1966
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1967
+ name: z.ZodString;
1968
+ value: z.ZodString;
1969
+ }, "strip", z.ZodTypeAny, {
1970
+ value: string;
1971
+ name: string;
1972
+ }, {
1973
+ value: string;
1974
+ name: string;
1975
+ }>, "many">>;
1976
+ body: z.ZodOptional<z.ZodObject<{
1977
+ data: z.ZodOptional<z.ZodString>;
1978
+ size: z.ZodOptional<z.ZodNumber>;
1979
+ attachmentId: z.ZodOptional<z.ZodString>;
1980
+ }, "strip", z.ZodTypeAny, {
1981
+ data?: string | undefined;
1982
+ size?: number | undefined;
1983
+ attachmentId?: string | undefined;
1984
+ }, {
1985
+ data?: string | undefined;
1986
+ size?: number | undefined;
1987
+ attachmentId?: string | undefined;
1988
+ }>>;
1989
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1990
+ }, "strip", z.ZodTypeAny, {
1991
+ mimeType?: string | undefined;
1992
+ body?: {
1993
+ data?: string | undefined;
1994
+ size?: number | undefined;
1995
+ attachmentId?: string | undefined;
1996
+ } | undefined;
1997
+ headers?: {
1998
+ value: string;
1999
+ name: string;
2000
+ }[] | undefined;
2001
+ parts?: any[] | undefined;
2002
+ }, {
2003
+ mimeType?: string | undefined;
2004
+ body?: {
2005
+ data?: string | undefined;
2006
+ size?: number | undefined;
2007
+ attachmentId?: string | undefined;
2008
+ } | undefined;
2009
+ headers?: {
2010
+ value: string;
2011
+ name: string;
2012
+ }[] | undefined;
2013
+ parts?: any[] | undefined;
2014
+ }>>;
2015
+ }, "strip", z.ZodTypeAny, {
2016
+ id: string;
2017
+ threadId: string;
2018
+ raw?: string | undefined;
2019
+ labelIds?: string[] | undefined;
2020
+ snippet?: string | undefined;
2021
+ historyId?: string | undefined;
2022
+ internalDate?: string | undefined;
2023
+ sizeEstimate?: number | undefined;
2024
+ payload?: {
2025
+ mimeType?: string | undefined;
2026
+ body?: {
2027
+ data?: string | undefined;
2028
+ size?: number | undefined;
2029
+ attachmentId?: string | undefined;
2030
+ } | undefined;
2031
+ headers?: {
2032
+ value: string;
2033
+ name: string;
2034
+ }[] | undefined;
2035
+ parts?: any[] | undefined;
2036
+ } | undefined;
2037
+ }, {
2038
+ id: string;
2039
+ threadId: string;
2040
+ raw?: string | undefined;
2041
+ labelIds?: string[] | undefined;
2042
+ snippet?: string | undefined;
2043
+ historyId?: string | undefined;
2044
+ internalDate?: string | undefined;
2045
+ sizeEstimate?: number | undefined;
2046
+ payload?: {
2047
+ mimeType?: string | undefined;
2048
+ body?: {
2049
+ data?: string | undefined;
2050
+ size?: number | undefined;
2051
+ attachmentId?: string | undefined;
2052
+ } | undefined;
2053
+ headers?: {
2054
+ value: string;
2055
+ name: string;
2056
+ }[] | undefined;
2057
+ parts?: any[] | undefined;
2058
+ } | undefined;
2059
+ }>>;
2060
+ error: z.ZodString;
2061
+ }, "strip", z.ZodTypeAny, {
2062
+ success: boolean;
2063
+ error: string;
2064
+ operation: "get_email";
2065
+ message?: {
2066
+ id: string;
2067
+ threadId: string;
2068
+ raw?: string | undefined;
2069
+ labelIds?: string[] | undefined;
2070
+ snippet?: string | undefined;
2071
+ historyId?: string | undefined;
2072
+ internalDate?: string | undefined;
2073
+ sizeEstimate?: number | undefined;
2074
+ payload?: {
2075
+ mimeType?: string | undefined;
2076
+ body?: {
2077
+ data?: string | undefined;
2078
+ size?: number | undefined;
2079
+ attachmentId?: string | undefined;
2080
+ } | undefined;
2081
+ headers?: {
2082
+ value: string;
2083
+ name: string;
2084
+ }[] | undefined;
2085
+ parts?: any[] | undefined;
2086
+ } | undefined;
2087
+ } | undefined;
2088
+ }, {
2089
+ success: boolean;
2090
+ error: string;
2091
+ operation: "get_email";
2092
+ message?: {
2093
+ id: string;
2094
+ threadId: string;
2095
+ raw?: string | undefined;
2096
+ labelIds?: string[] | undefined;
2097
+ snippet?: string | undefined;
2098
+ historyId?: string | undefined;
2099
+ internalDate?: string | undefined;
2100
+ sizeEstimate?: number | undefined;
2101
+ payload?: {
2102
+ mimeType?: string | undefined;
2103
+ body?: {
2104
+ data?: string | undefined;
2105
+ size?: number | undefined;
2106
+ attachmentId?: string | undefined;
2107
+ } | undefined;
2108
+ headers?: {
2109
+ value: string;
2110
+ name: string;
2111
+ }[] | undefined;
2112
+ parts?: any[] | undefined;
2113
+ } | undefined;
2114
+ } | undefined;
2115
+ }>, z.ZodObject<{
2116
+ operation: z.ZodLiteral<"search_emails">;
2117
+ success: z.ZodBoolean;
2118
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
2119
+ id: z.ZodString;
2120
+ threadId: z.ZodString;
2121
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2122
+ snippet: z.ZodOptional<z.ZodString>;
2123
+ historyId: z.ZodOptional<z.ZodString>;
2124
+ internalDate: z.ZodOptional<z.ZodString>;
2125
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
2126
+ raw: z.ZodOptional<z.ZodString>;
2127
+ payload: z.ZodOptional<z.ZodObject<{
2128
+ mimeType: z.ZodOptional<z.ZodString>;
2129
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
2130
+ name: z.ZodString;
2131
+ value: z.ZodString;
2132
+ }, "strip", z.ZodTypeAny, {
2133
+ value: string;
2134
+ name: string;
2135
+ }, {
2136
+ value: string;
2137
+ name: string;
2138
+ }>, "many">>;
2139
+ body: z.ZodOptional<z.ZodObject<{
2140
+ data: z.ZodOptional<z.ZodString>;
2141
+ size: z.ZodOptional<z.ZodNumber>;
2142
+ attachmentId: z.ZodOptional<z.ZodString>;
2143
+ }, "strip", z.ZodTypeAny, {
2144
+ data?: string | undefined;
2145
+ size?: number | undefined;
2146
+ attachmentId?: string | undefined;
2147
+ }, {
2148
+ data?: string | undefined;
2149
+ size?: number | undefined;
2150
+ attachmentId?: string | undefined;
2151
+ }>>;
2152
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
2153
+ }, "strip", z.ZodTypeAny, {
2154
+ mimeType?: string | undefined;
2155
+ body?: {
2156
+ data?: string | undefined;
2157
+ size?: number | undefined;
2158
+ attachmentId?: string | undefined;
2159
+ } | undefined;
2160
+ headers?: {
2161
+ value: string;
2162
+ name: string;
2163
+ }[] | undefined;
2164
+ parts?: any[] | undefined;
2165
+ }, {
2166
+ mimeType?: string | undefined;
2167
+ body?: {
2168
+ data?: string | undefined;
2169
+ size?: number | undefined;
2170
+ attachmentId?: string | undefined;
2171
+ } | undefined;
2172
+ headers?: {
2173
+ value: string;
2174
+ name: string;
2175
+ }[] | undefined;
2176
+ parts?: any[] | undefined;
2177
+ }>>;
2178
+ }, "strip", z.ZodTypeAny, {
2179
+ id: string;
2180
+ threadId: string;
2181
+ raw?: string | undefined;
2182
+ labelIds?: string[] | undefined;
2183
+ snippet?: string | undefined;
2184
+ historyId?: string | undefined;
2185
+ internalDate?: string | undefined;
2186
+ sizeEstimate?: number | undefined;
2187
+ payload?: {
2188
+ mimeType?: string | undefined;
2189
+ body?: {
2190
+ data?: string | undefined;
2191
+ size?: number | undefined;
2192
+ attachmentId?: string | undefined;
2193
+ } | undefined;
2194
+ headers?: {
2195
+ value: string;
2196
+ name: string;
2197
+ }[] | undefined;
2198
+ parts?: any[] | undefined;
2199
+ } | undefined;
2200
+ }, {
2201
+ id: string;
2202
+ threadId: string;
2203
+ raw?: string | undefined;
2204
+ labelIds?: string[] | undefined;
2205
+ snippet?: string | undefined;
2206
+ historyId?: string | undefined;
2207
+ internalDate?: string | undefined;
2208
+ sizeEstimate?: number | undefined;
2209
+ payload?: {
2210
+ mimeType?: string | undefined;
2211
+ body?: {
2212
+ data?: string | undefined;
2213
+ size?: number | undefined;
2214
+ attachmentId?: string | undefined;
2215
+ } | undefined;
2216
+ headers?: {
2217
+ value: string;
2218
+ name: string;
2219
+ }[] | undefined;
2220
+ parts?: any[] | undefined;
2221
+ } | undefined;
2222
+ }>, "many">>;
2223
+ result_size_estimate: z.ZodOptional<z.ZodNumber>;
2224
+ error: z.ZodString;
2225
+ }, "strip", z.ZodTypeAny, {
2226
+ success: boolean;
2227
+ error: string;
2228
+ operation: "search_emails";
2229
+ messages?: {
2230
+ id: string;
2231
+ threadId: string;
2232
+ raw?: string | undefined;
2233
+ labelIds?: string[] | undefined;
2234
+ snippet?: string | undefined;
2235
+ historyId?: string | undefined;
2236
+ internalDate?: string | undefined;
2237
+ sizeEstimate?: number | undefined;
2238
+ payload?: {
2239
+ mimeType?: string | undefined;
2240
+ body?: {
2241
+ data?: string | undefined;
2242
+ size?: number | undefined;
2243
+ attachmentId?: string | undefined;
2244
+ } | undefined;
2245
+ headers?: {
2246
+ value: string;
2247
+ name: string;
2248
+ }[] | undefined;
2249
+ parts?: any[] | undefined;
2250
+ } | undefined;
2251
+ }[] | undefined;
2252
+ result_size_estimate?: number | undefined;
2253
+ }, {
2254
+ success: boolean;
2255
+ error: string;
2256
+ operation: "search_emails";
2257
+ messages?: {
2258
+ id: string;
2259
+ threadId: string;
2260
+ raw?: string | undefined;
2261
+ labelIds?: string[] | undefined;
2262
+ snippet?: string | undefined;
2263
+ historyId?: string | undefined;
2264
+ internalDate?: string | undefined;
2265
+ sizeEstimate?: number | undefined;
2266
+ payload?: {
2267
+ mimeType?: string | undefined;
2268
+ body?: {
2269
+ data?: string | undefined;
2270
+ size?: number | undefined;
2271
+ attachmentId?: string | undefined;
2272
+ } | undefined;
2273
+ headers?: {
2274
+ value: string;
2275
+ name: string;
2276
+ }[] | undefined;
2277
+ parts?: any[] | undefined;
2278
+ } | undefined;
2279
+ }[] | undefined;
2280
+ result_size_estimate?: number | undefined;
2281
+ }>, z.ZodObject<{
2282
+ operation: z.ZodLiteral<"mark_as_read">;
2283
+ success: z.ZodBoolean;
2284
+ modified_messages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2285
+ error: z.ZodString;
2286
+ }, "strip", z.ZodTypeAny, {
2287
+ success: boolean;
2288
+ error: string;
2289
+ operation: "mark_as_read";
2290
+ modified_messages?: string[] | undefined;
2291
+ }, {
2292
+ success: boolean;
2293
+ error: string;
2294
+ operation: "mark_as_read";
2295
+ modified_messages?: string[] | undefined;
2296
+ }>, z.ZodObject<{
2297
+ operation: z.ZodLiteral<"mark_as_unread">;
2298
+ success: z.ZodBoolean;
2299
+ modified_messages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2300
+ error: z.ZodString;
2301
+ }, "strip", z.ZodTypeAny, {
2302
+ success: boolean;
2303
+ error: string;
2304
+ operation: "mark_as_unread";
2305
+ modified_messages?: string[] | undefined;
2306
+ }, {
2307
+ success: boolean;
2308
+ error: string;
2309
+ operation: "mark_as_unread";
2310
+ modified_messages?: string[] | undefined;
2311
+ }>, z.ZodObject<{
2312
+ operation: z.ZodLiteral<"create_draft">;
2313
+ success: z.ZodBoolean;
2314
+ draft: z.ZodOptional<z.ZodObject<{
2315
+ id: z.ZodString;
2316
+ message: z.ZodObject<{
2317
+ id: z.ZodString;
2318
+ threadId: z.ZodString;
2319
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2320
+ snippet: z.ZodOptional<z.ZodString>;
2321
+ historyId: z.ZodOptional<z.ZodString>;
2322
+ internalDate: z.ZodOptional<z.ZodString>;
2323
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
2324
+ raw: z.ZodOptional<z.ZodString>;
2325
+ payload: z.ZodOptional<z.ZodObject<{
2326
+ mimeType: z.ZodOptional<z.ZodString>;
2327
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
2328
+ name: z.ZodString;
2329
+ value: z.ZodString;
2330
+ }, "strip", z.ZodTypeAny, {
2331
+ value: string;
2332
+ name: string;
2333
+ }, {
2334
+ value: string;
2335
+ name: string;
2336
+ }>, "many">>;
2337
+ body: z.ZodOptional<z.ZodObject<{
2338
+ data: z.ZodOptional<z.ZodString>;
2339
+ size: z.ZodOptional<z.ZodNumber>;
2340
+ attachmentId: z.ZodOptional<z.ZodString>;
2341
+ }, "strip", z.ZodTypeAny, {
2342
+ data?: string | undefined;
2343
+ size?: number | undefined;
2344
+ attachmentId?: string | undefined;
2345
+ }, {
2346
+ data?: string | undefined;
2347
+ size?: number | undefined;
2348
+ attachmentId?: string | undefined;
2349
+ }>>;
2350
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
2351
+ }, "strip", z.ZodTypeAny, {
2352
+ mimeType?: string | undefined;
2353
+ body?: {
2354
+ data?: string | undefined;
2355
+ size?: number | undefined;
2356
+ attachmentId?: string | undefined;
2357
+ } | undefined;
2358
+ headers?: {
2359
+ value: string;
2360
+ name: string;
2361
+ }[] | undefined;
2362
+ parts?: any[] | undefined;
2363
+ }, {
2364
+ mimeType?: string | undefined;
2365
+ body?: {
2366
+ data?: string | undefined;
2367
+ size?: number | undefined;
2368
+ attachmentId?: string | undefined;
2369
+ } | undefined;
2370
+ headers?: {
2371
+ value: string;
2372
+ name: string;
2373
+ }[] | undefined;
2374
+ parts?: any[] | undefined;
2375
+ }>>;
2376
+ }, "strip", z.ZodTypeAny, {
2377
+ id: string;
2378
+ threadId: string;
2379
+ raw?: string | undefined;
2380
+ labelIds?: string[] | undefined;
2381
+ snippet?: string | undefined;
2382
+ historyId?: string | undefined;
2383
+ internalDate?: string | undefined;
2384
+ sizeEstimate?: number | undefined;
2385
+ payload?: {
2386
+ mimeType?: string | undefined;
2387
+ body?: {
2388
+ data?: string | undefined;
2389
+ size?: number | undefined;
2390
+ attachmentId?: string | undefined;
2391
+ } | undefined;
2392
+ headers?: {
2393
+ value: string;
2394
+ name: string;
2395
+ }[] | undefined;
2396
+ parts?: any[] | undefined;
2397
+ } | undefined;
2398
+ }, {
2399
+ id: string;
2400
+ threadId: string;
2401
+ raw?: string | undefined;
2402
+ labelIds?: string[] | undefined;
2403
+ snippet?: string | undefined;
2404
+ historyId?: string | undefined;
2405
+ internalDate?: string | undefined;
2406
+ sizeEstimate?: number | undefined;
2407
+ payload?: {
2408
+ mimeType?: string | undefined;
2409
+ body?: {
2410
+ data?: string | undefined;
2411
+ size?: number | undefined;
2412
+ attachmentId?: string | undefined;
2413
+ } | undefined;
2414
+ headers?: {
2415
+ value: string;
2416
+ name: string;
2417
+ }[] | undefined;
2418
+ parts?: any[] | undefined;
2419
+ } | undefined;
2420
+ }>;
2421
+ }, "strip", z.ZodTypeAny, {
2422
+ message: {
2423
+ id: string;
2424
+ threadId: string;
2425
+ raw?: string | undefined;
2426
+ labelIds?: string[] | undefined;
2427
+ snippet?: string | undefined;
2428
+ historyId?: string | undefined;
2429
+ internalDate?: string | undefined;
2430
+ sizeEstimate?: number | undefined;
2431
+ payload?: {
2432
+ mimeType?: string | undefined;
2433
+ body?: {
2434
+ data?: string | undefined;
2435
+ size?: number | undefined;
2436
+ attachmentId?: string | undefined;
2437
+ } | undefined;
2438
+ headers?: {
2439
+ value: string;
2440
+ name: string;
2441
+ }[] | undefined;
2442
+ parts?: any[] | undefined;
2443
+ } | undefined;
2444
+ };
2445
+ id: string;
2446
+ }, {
2447
+ message: {
2448
+ id: string;
2449
+ threadId: string;
2450
+ raw?: string | undefined;
2451
+ labelIds?: string[] | undefined;
2452
+ snippet?: string | undefined;
2453
+ historyId?: string | undefined;
2454
+ internalDate?: string | undefined;
2455
+ sizeEstimate?: number | undefined;
2456
+ payload?: {
2457
+ mimeType?: string | undefined;
2458
+ body?: {
2459
+ data?: string | undefined;
2460
+ size?: number | undefined;
2461
+ attachmentId?: string | undefined;
2462
+ } | undefined;
2463
+ headers?: {
2464
+ value: string;
2465
+ name: string;
2466
+ }[] | undefined;
2467
+ parts?: any[] | undefined;
2468
+ } | undefined;
2469
+ };
2470
+ id: string;
2471
+ }>>;
2472
+ error: z.ZodString;
2473
+ }, "strip", z.ZodTypeAny, {
2474
+ success: boolean;
2475
+ error: string;
2476
+ operation: "create_draft";
2477
+ draft?: {
2478
+ message: {
2479
+ id: string;
2480
+ threadId: string;
2481
+ raw?: string | undefined;
2482
+ labelIds?: string[] | undefined;
2483
+ snippet?: string | undefined;
2484
+ historyId?: string | undefined;
2485
+ internalDate?: string | undefined;
2486
+ sizeEstimate?: number | undefined;
2487
+ payload?: {
2488
+ mimeType?: string | undefined;
2489
+ body?: {
2490
+ data?: string | undefined;
2491
+ size?: number | undefined;
2492
+ attachmentId?: string | undefined;
2493
+ } | undefined;
2494
+ headers?: {
2495
+ value: string;
2496
+ name: string;
2497
+ }[] | undefined;
2498
+ parts?: any[] | undefined;
2499
+ } | undefined;
2500
+ };
2501
+ id: string;
2502
+ } | undefined;
2503
+ }, {
2504
+ success: boolean;
2505
+ error: string;
2506
+ operation: "create_draft";
2507
+ draft?: {
2508
+ message: {
2509
+ id: string;
2510
+ threadId: string;
2511
+ raw?: string | undefined;
2512
+ labelIds?: string[] | undefined;
2513
+ snippet?: string | undefined;
2514
+ historyId?: string | undefined;
2515
+ internalDate?: string | undefined;
2516
+ sizeEstimate?: number | undefined;
2517
+ payload?: {
2518
+ mimeType?: string | undefined;
2519
+ body?: {
2520
+ data?: string | undefined;
2521
+ size?: number | undefined;
2522
+ attachmentId?: string | undefined;
2523
+ } | undefined;
2524
+ headers?: {
2525
+ value: string;
2526
+ name: string;
2527
+ }[] | undefined;
2528
+ parts?: any[] | undefined;
2529
+ } | undefined;
2530
+ };
2531
+ id: string;
2532
+ } | undefined;
2533
+ }>, z.ZodObject<{
2534
+ operation: z.ZodLiteral<"send_draft">;
2535
+ success: z.ZodBoolean;
2536
+ message_id: z.ZodOptional<z.ZodString>;
2537
+ thread_id: z.ZodOptional<z.ZodString>;
2538
+ error: z.ZodString;
2539
+ }, "strip", z.ZodTypeAny, {
2540
+ success: boolean;
2541
+ error: string;
2542
+ operation: "send_draft";
2543
+ thread_id?: string | undefined;
2544
+ message_id?: string | undefined;
2545
+ }, {
2546
+ success: boolean;
2547
+ error: string;
2548
+ operation: "send_draft";
2549
+ thread_id?: string | undefined;
2550
+ message_id?: string | undefined;
2551
+ }>, z.ZodObject<{
2552
+ operation: z.ZodLiteral<"list_drafts">;
2553
+ success: z.ZodBoolean;
2554
+ drafts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2555
+ id: z.ZodString;
2556
+ message: z.ZodObject<{
2557
+ id: z.ZodString;
2558
+ threadId: z.ZodString;
2559
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2560
+ snippet: z.ZodOptional<z.ZodString>;
2561
+ historyId: z.ZodOptional<z.ZodString>;
2562
+ internalDate: z.ZodOptional<z.ZodString>;
2563
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
2564
+ raw: z.ZodOptional<z.ZodString>;
2565
+ payload: z.ZodOptional<z.ZodObject<{
2566
+ mimeType: z.ZodOptional<z.ZodString>;
2567
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
2568
+ name: z.ZodString;
2569
+ value: z.ZodString;
2570
+ }, "strip", z.ZodTypeAny, {
2571
+ value: string;
2572
+ name: string;
2573
+ }, {
2574
+ value: string;
2575
+ name: string;
2576
+ }>, "many">>;
2577
+ body: z.ZodOptional<z.ZodObject<{
2578
+ data: z.ZodOptional<z.ZodString>;
2579
+ size: z.ZodOptional<z.ZodNumber>;
2580
+ attachmentId: z.ZodOptional<z.ZodString>;
2581
+ }, "strip", z.ZodTypeAny, {
2582
+ data?: string | undefined;
2583
+ size?: number | undefined;
2584
+ attachmentId?: string | undefined;
2585
+ }, {
2586
+ data?: string | undefined;
2587
+ size?: number | undefined;
2588
+ attachmentId?: string | undefined;
2589
+ }>>;
2590
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
2591
+ }, "strip", z.ZodTypeAny, {
2592
+ mimeType?: string | undefined;
2593
+ body?: {
2594
+ data?: string | undefined;
2595
+ size?: number | undefined;
2596
+ attachmentId?: string | undefined;
2597
+ } | undefined;
2598
+ headers?: {
2599
+ value: string;
2600
+ name: string;
2601
+ }[] | undefined;
2602
+ parts?: any[] | undefined;
2603
+ }, {
2604
+ mimeType?: string | undefined;
2605
+ body?: {
2606
+ data?: string | undefined;
2607
+ size?: number | undefined;
2608
+ attachmentId?: string | undefined;
2609
+ } | undefined;
2610
+ headers?: {
2611
+ value: string;
2612
+ name: string;
2613
+ }[] | undefined;
2614
+ parts?: any[] | undefined;
2615
+ }>>;
2616
+ }, "strip", z.ZodTypeAny, {
2617
+ id: string;
2618
+ threadId: string;
2619
+ raw?: string | undefined;
2620
+ labelIds?: string[] | undefined;
2621
+ snippet?: string | undefined;
2622
+ historyId?: string | undefined;
2623
+ internalDate?: string | undefined;
2624
+ sizeEstimate?: number | undefined;
2625
+ payload?: {
2626
+ mimeType?: string | undefined;
2627
+ body?: {
2628
+ data?: string | undefined;
2629
+ size?: number | undefined;
2630
+ attachmentId?: string | undefined;
2631
+ } | undefined;
2632
+ headers?: {
2633
+ value: string;
2634
+ name: string;
2635
+ }[] | undefined;
2636
+ parts?: any[] | undefined;
2637
+ } | undefined;
2638
+ }, {
2639
+ id: string;
2640
+ threadId: string;
2641
+ raw?: string | undefined;
2642
+ labelIds?: string[] | undefined;
2643
+ snippet?: string | undefined;
2644
+ historyId?: string | undefined;
2645
+ internalDate?: string | undefined;
2646
+ sizeEstimate?: number | undefined;
2647
+ payload?: {
2648
+ mimeType?: string | undefined;
2649
+ body?: {
2650
+ data?: string | undefined;
2651
+ size?: number | undefined;
2652
+ attachmentId?: string | undefined;
2653
+ } | undefined;
2654
+ headers?: {
2655
+ value: string;
2656
+ name: string;
2657
+ }[] | undefined;
2658
+ parts?: any[] | undefined;
2659
+ } | undefined;
2660
+ }>;
2661
+ }, "strip", z.ZodTypeAny, {
2662
+ message: {
2663
+ id: string;
2664
+ threadId: string;
2665
+ raw?: string | undefined;
2666
+ labelIds?: string[] | undefined;
2667
+ snippet?: string | undefined;
2668
+ historyId?: string | undefined;
2669
+ internalDate?: string | undefined;
2670
+ sizeEstimate?: number | undefined;
2671
+ payload?: {
2672
+ mimeType?: string | undefined;
2673
+ body?: {
2674
+ data?: string | undefined;
2675
+ size?: number | undefined;
2676
+ attachmentId?: string | undefined;
2677
+ } | undefined;
2678
+ headers?: {
2679
+ value: string;
2680
+ name: string;
2681
+ }[] | undefined;
2682
+ parts?: any[] | undefined;
2683
+ } | undefined;
2684
+ };
2685
+ id: string;
2686
+ }, {
2687
+ message: {
2688
+ id: string;
2689
+ threadId: string;
2690
+ raw?: string | undefined;
2691
+ labelIds?: string[] | undefined;
2692
+ snippet?: string | undefined;
2693
+ historyId?: string | undefined;
2694
+ internalDate?: string | undefined;
2695
+ sizeEstimate?: number | undefined;
2696
+ payload?: {
2697
+ mimeType?: string | undefined;
2698
+ body?: {
2699
+ data?: string | undefined;
2700
+ size?: number | undefined;
2701
+ attachmentId?: string | undefined;
2702
+ } | undefined;
2703
+ headers?: {
2704
+ value: string;
2705
+ name: string;
2706
+ }[] | undefined;
2707
+ parts?: any[] | undefined;
2708
+ } | undefined;
2709
+ };
2710
+ id: string;
2711
+ }>, "many">>;
2712
+ next_page_token: z.ZodOptional<z.ZodString>;
2713
+ result_size_estimate: z.ZodOptional<z.ZodNumber>;
2714
+ error: z.ZodString;
2715
+ }, "strip", z.ZodTypeAny, {
2716
+ success: boolean;
2717
+ error: string;
2718
+ operation: "list_drafts";
2719
+ next_page_token?: string | undefined;
2720
+ result_size_estimate?: number | undefined;
2721
+ drafts?: {
2722
+ message: {
2723
+ id: string;
2724
+ threadId: string;
2725
+ raw?: string | undefined;
2726
+ labelIds?: string[] | undefined;
2727
+ snippet?: string | undefined;
2728
+ historyId?: string | undefined;
2729
+ internalDate?: string | undefined;
2730
+ sizeEstimate?: number | undefined;
2731
+ payload?: {
2732
+ mimeType?: string | undefined;
2733
+ body?: {
2734
+ data?: string | undefined;
2735
+ size?: number | undefined;
2736
+ attachmentId?: string | undefined;
2737
+ } | undefined;
2738
+ headers?: {
2739
+ value: string;
2740
+ name: string;
2741
+ }[] | undefined;
2742
+ parts?: any[] | undefined;
2743
+ } | undefined;
2744
+ };
2745
+ id: string;
2746
+ }[] | undefined;
2747
+ }, {
2748
+ success: boolean;
2749
+ error: string;
2750
+ operation: "list_drafts";
2751
+ next_page_token?: string | undefined;
2752
+ result_size_estimate?: number | undefined;
2753
+ drafts?: {
2754
+ message: {
2755
+ id: string;
2756
+ threadId: string;
2757
+ raw?: string | undefined;
2758
+ labelIds?: string[] | undefined;
2759
+ snippet?: string | undefined;
2760
+ historyId?: string | undefined;
2761
+ internalDate?: string | undefined;
2762
+ sizeEstimate?: number | undefined;
2763
+ payload?: {
2764
+ mimeType?: string | undefined;
2765
+ body?: {
2766
+ data?: string | undefined;
2767
+ size?: number | undefined;
2768
+ attachmentId?: string | undefined;
2769
+ } | undefined;
2770
+ headers?: {
2771
+ value: string;
2772
+ name: string;
2773
+ }[] | undefined;
2774
+ parts?: any[] | undefined;
2775
+ } | undefined;
2776
+ };
2777
+ id: string;
2778
+ }[] | undefined;
2779
+ }>, z.ZodObject<{
2780
+ operation: z.ZodLiteral<"delete_email">;
2781
+ success: z.ZodBoolean;
2782
+ deleted_message_id: z.ZodOptional<z.ZodString>;
2783
+ error: z.ZodString;
2784
+ }, "strip", z.ZodTypeAny, {
2785
+ success: boolean;
2786
+ error: string;
2787
+ operation: "delete_email";
2788
+ deleted_message_id?: string | undefined;
2789
+ }, {
2790
+ success: boolean;
2791
+ error: string;
2792
+ operation: "delete_email";
2793
+ deleted_message_id?: string | undefined;
2794
+ }>, z.ZodObject<{
2795
+ operation: z.ZodLiteral<"trash_email">;
2796
+ success: z.ZodBoolean;
2797
+ trashed_message_id: z.ZodOptional<z.ZodString>;
2798
+ error: z.ZodString;
2799
+ }, "strip", z.ZodTypeAny, {
2800
+ success: boolean;
2801
+ error: string;
2802
+ operation: "trash_email";
2803
+ trashed_message_id?: string | undefined;
2804
+ }, {
2805
+ success: boolean;
2806
+ error: string;
2807
+ operation: "trash_email";
2808
+ trashed_message_id?: string | undefined;
2809
+ }>, z.ZodObject<{
2810
+ operation: z.ZodLiteral<"list_threads">;
2811
+ success: z.ZodBoolean;
2812
+ threads: z.ZodOptional<z.ZodArray<z.ZodObject<{
2813
+ id: z.ZodString;
2814
+ historyId: z.ZodOptional<z.ZodString>;
2815
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
2816
+ id: z.ZodString;
2817
+ threadId: z.ZodString;
2818
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2819
+ snippet: z.ZodOptional<z.ZodString>;
2820
+ historyId: z.ZodOptional<z.ZodString>;
2821
+ internalDate: z.ZodOptional<z.ZodString>;
2822
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
2823
+ raw: z.ZodOptional<z.ZodString>;
2824
+ payload: z.ZodOptional<z.ZodObject<{
2825
+ mimeType: z.ZodOptional<z.ZodString>;
2826
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
2827
+ name: z.ZodString;
2828
+ value: z.ZodString;
2829
+ }, "strip", z.ZodTypeAny, {
2830
+ value: string;
2831
+ name: string;
2832
+ }, {
2833
+ value: string;
2834
+ name: string;
2835
+ }>, "many">>;
2836
+ body: z.ZodOptional<z.ZodObject<{
2837
+ data: z.ZodOptional<z.ZodString>;
2838
+ size: z.ZodOptional<z.ZodNumber>;
2839
+ attachmentId: z.ZodOptional<z.ZodString>;
2840
+ }, "strip", z.ZodTypeAny, {
2841
+ data?: string | undefined;
2842
+ size?: number | undefined;
2843
+ attachmentId?: string | undefined;
2844
+ }, {
2845
+ data?: string | undefined;
2846
+ size?: number | undefined;
2847
+ attachmentId?: string | undefined;
2848
+ }>>;
2849
+ parts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
2850
+ }, "strip", z.ZodTypeAny, {
2851
+ mimeType?: string | undefined;
2852
+ body?: {
2853
+ data?: string | undefined;
2854
+ size?: number | undefined;
2855
+ attachmentId?: string | undefined;
2856
+ } | undefined;
2857
+ headers?: {
2858
+ value: string;
2859
+ name: string;
2860
+ }[] | undefined;
2861
+ parts?: any[] | undefined;
2862
+ }, {
2863
+ mimeType?: string | undefined;
2864
+ body?: {
2865
+ data?: string | undefined;
2866
+ size?: number | undefined;
2867
+ attachmentId?: string | undefined;
2868
+ } | undefined;
2869
+ headers?: {
2870
+ value: string;
2871
+ name: string;
2872
+ }[] | undefined;
2873
+ parts?: any[] | undefined;
2874
+ }>>;
2875
+ }, "strip", z.ZodTypeAny, {
2876
+ id: string;
2877
+ threadId: string;
2878
+ raw?: string | undefined;
2879
+ labelIds?: string[] | undefined;
2880
+ snippet?: string | undefined;
2881
+ historyId?: string | undefined;
2882
+ internalDate?: string | undefined;
2883
+ sizeEstimate?: number | undefined;
2884
+ payload?: {
2885
+ mimeType?: string | undefined;
2886
+ body?: {
2887
+ data?: string | undefined;
2888
+ size?: number | undefined;
2889
+ attachmentId?: string | undefined;
2890
+ } | undefined;
2891
+ headers?: {
2892
+ value: string;
2893
+ name: string;
2894
+ }[] | undefined;
2895
+ parts?: any[] | undefined;
2896
+ } | undefined;
2897
+ }, {
2898
+ id: string;
2899
+ threadId: string;
2900
+ raw?: string | undefined;
2901
+ labelIds?: string[] | undefined;
2902
+ snippet?: string | undefined;
2903
+ historyId?: string | undefined;
2904
+ internalDate?: string | undefined;
2905
+ sizeEstimate?: number | undefined;
2906
+ payload?: {
2907
+ mimeType?: string | undefined;
2908
+ body?: {
2909
+ data?: string | undefined;
2910
+ size?: number | undefined;
2911
+ attachmentId?: string | undefined;
2912
+ } | undefined;
2913
+ headers?: {
2914
+ value: string;
2915
+ name: string;
2916
+ }[] | undefined;
2917
+ parts?: any[] | undefined;
2918
+ } | undefined;
2919
+ }>, "many">>;
2920
+ snippet: z.ZodOptional<z.ZodString>;
2921
+ }, "strip", z.ZodTypeAny, {
2922
+ id: string;
2923
+ messages?: {
2924
+ id: string;
2925
+ threadId: string;
2926
+ raw?: string | undefined;
2927
+ labelIds?: string[] | undefined;
2928
+ snippet?: string | undefined;
2929
+ historyId?: string | undefined;
2930
+ internalDate?: string | undefined;
2931
+ sizeEstimate?: number | undefined;
2932
+ payload?: {
2933
+ mimeType?: string | undefined;
2934
+ body?: {
2935
+ data?: string | undefined;
2936
+ size?: number | undefined;
2937
+ attachmentId?: string | undefined;
2938
+ } | undefined;
2939
+ headers?: {
2940
+ value: string;
2941
+ name: string;
2942
+ }[] | undefined;
2943
+ parts?: any[] | undefined;
2944
+ } | undefined;
2945
+ }[] | undefined;
2946
+ snippet?: string | undefined;
2947
+ historyId?: string | undefined;
2948
+ }, {
2949
+ id: string;
2950
+ messages?: {
2951
+ id: string;
2952
+ threadId: string;
2953
+ raw?: string | undefined;
2954
+ labelIds?: string[] | undefined;
2955
+ snippet?: string | undefined;
2956
+ historyId?: string | undefined;
2957
+ internalDate?: string | undefined;
2958
+ sizeEstimate?: number | undefined;
2959
+ payload?: {
2960
+ mimeType?: string | undefined;
2961
+ body?: {
2962
+ data?: string | undefined;
2963
+ size?: number | undefined;
2964
+ attachmentId?: string | undefined;
2965
+ } | undefined;
2966
+ headers?: {
2967
+ value: string;
2968
+ name: string;
2969
+ }[] | undefined;
2970
+ parts?: any[] | undefined;
2971
+ } | undefined;
2972
+ }[] | undefined;
2973
+ snippet?: string | undefined;
2974
+ historyId?: string | undefined;
2975
+ }>, "many">>;
2976
+ next_page_token: z.ZodOptional<z.ZodString>;
2977
+ result_size_estimate: z.ZodOptional<z.ZodNumber>;
2978
+ error: z.ZodString;
2979
+ }, "strip", z.ZodTypeAny, {
2980
+ success: boolean;
2981
+ error: string;
2982
+ operation: "list_threads";
2983
+ next_page_token?: string | undefined;
2984
+ result_size_estimate?: number | undefined;
2985
+ threads?: {
2986
+ id: string;
2987
+ messages?: {
2988
+ id: string;
2989
+ threadId: string;
2990
+ raw?: string | undefined;
2991
+ labelIds?: string[] | undefined;
2992
+ snippet?: string | undefined;
2993
+ historyId?: string | undefined;
2994
+ internalDate?: string | undefined;
2995
+ sizeEstimate?: number | undefined;
2996
+ payload?: {
2997
+ mimeType?: string | undefined;
2998
+ body?: {
2999
+ data?: string | undefined;
3000
+ size?: number | undefined;
3001
+ attachmentId?: string | undefined;
3002
+ } | undefined;
3003
+ headers?: {
3004
+ value: string;
3005
+ name: string;
3006
+ }[] | undefined;
3007
+ parts?: any[] | undefined;
3008
+ } | undefined;
3009
+ }[] | undefined;
3010
+ snippet?: string | undefined;
3011
+ historyId?: string | undefined;
3012
+ }[] | undefined;
3013
+ }, {
3014
+ success: boolean;
3015
+ error: string;
3016
+ operation: "list_threads";
3017
+ next_page_token?: string | undefined;
3018
+ result_size_estimate?: number | undefined;
3019
+ threads?: {
3020
+ id: string;
3021
+ messages?: {
3022
+ id: string;
3023
+ threadId: string;
3024
+ raw?: string | undefined;
3025
+ labelIds?: string[] | undefined;
3026
+ snippet?: string | undefined;
3027
+ historyId?: string | undefined;
3028
+ internalDate?: string | undefined;
3029
+ sizeEstimate?: number | undefined;
3030
+ payload?: {
3031
+ mimeType?: string | undefined;
3032
+ body?: {
3033
+ data?: string | undefined;
3034
+ size?: number | undefined;
3035
+ attachmentId?: string | undefined;
3036
+ } | undefined;
3037
+ headers?: {
3038
+ value: string;
3039
+ name: string;
3040
+ }[] | undefined;
3041
+ parts?: any[] | undefined;
3042
+ } | undefined;
3043
+ }[] | undefined;
3044
+ snippet?: string | undefined;
3045
+ historyId?: string | undefined;
3046
+ }[] | undefined;
3047
+ }>]>;
3048
+ static readonly shortDescription = "Gmail integration for email management";
3049
+ static readonly longDescription = "\n Gmail service integration for comprehensive email management and automation.\n Use cases:\n - Send and receive emails with rich formatting\n - Search and filter emails with advanced queries\n - Manage drafts and email threads\n - Mark messages as read/unread\n - Organize emails with labels and folders\n - Handle email attachments and metadata\n ";
3050
+ static readonly alias = "gmail";
3051
+ constructor(params?: T, context?: BubbleContext);
3052
+ testCredential(): Promise<boolean>;
3053
+ private makeGmailApiRequest;
3054
+ protected performAction(context?: BubbleContext): Promise<Extract<GmailResult, {
3055
+ operation: T['operation'];
3056
+ }>>;
3057
+ private createEmailMessage;
3058
+ private sendEmail;
3059
+ private listEmails;
3060
+ private getEmail;
3061
+ private searchEmails;
3062
+ private markAsRead;
3063
+ private markAsUnread;
3064
+ private createDraft;
3065
+ private sendDraft;
3066
+ private listDrafts;
3067
+ private deleteEmail;
3068
+ private trashEmail;
3069
+ private listThreads;
3070
+ protected chooseCredential(): string | undefined;
3071
+ }
3072
+ export {};
3073
+ //# sourceMappingURL=gmail.d.ts.map