@rox-one/sdk 0.0.0-stage → 0.7.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 (482) hide show
  1. package/CALLS.md +82 -0
  2. package/README.md +1259 -2
  3. package/dist/chunk-AOHK5YXC.js +5585 -0
  4. package/dist/chunk-CATFKTFD.js +80 -0
  5. package/dist/chunk-FQGPXWPJ.js +1491 -0
  6. package/dist/chunk-G43PLP2U.js +1087 -0
  7. package/dist/chunk-LMJW65ML.js +836 -0
  8. package/dist/chunk-MCSQNZ4E.js +836 -0
  9. package/dist/chunk-NSJ3GKUC.js +1552 -0
  10. package/dist/chunk-OGFKJOK7.js +2068 -0
  11. package/dist/chunk-RDEJZJBZ.js +1351 -0
  12. package/dist/chunk-TMTYN2UK.js +1128 -0
  13. package/dist/chunk-V45LUJDI.js +838 -0
  14. package/dist/chunk-YRUXFEZM.js +1044 -0
  15. package/dist/chunk-ZYBAKW25.js +994 -0
  16. package/dist/generated/agent-fold/index.d.ts +4520 -0
  17. package/dist/generated/agent-fold/index.js +0 -0
  18. package/dist/generated/agent-harness/client/client.gen.d.ts +2 -0
  19. package/dist/generated/agent-harness/client/index.d.ts +10 -0
  20. package/dist/generated/agent-harness/client/types.gen.d.ts +120 -0
  21. package/dist/generated/agent-harness/client/utils.gen.d.ts +37 -0
  22. package/dist/generated/agent-harness/client.gen.d.ts +12 -0
  23. package/dist/generated/agent-harness/core/auth.gen.d.ts +25 -0
  24. package/dist/generated/agent-harness/core/bodySerializer.gen.d.ts +25 -0
  25. package/dist/generated/agent-harness/core/params.gen.d.ts +43 -0
  26. package/dist/generated/agent-harness/core/pathSerializer.gen.d.ts +33 -0
  27. package/dist/generated/agent-harness/core/queryKeySerializer.gen.d.ts +18 -0
  28. package/dist/generated/agent-harness/core/serverSentEvents.gen.d.ts +71 -0
  29. package/dist/generated/agent-harness/core/types.gen.d.ts +83 -0
  30. package/dist/generated/agent-harness/core/utils.gen.d.ts +19 -0
  31. package/dist/generated/agent-harness/index.d.ts +2 -0
  32. package/dist/generated/agent-harness/index.js +6 -0
  33. package/dist/generated/agent-harness/sdk.gen.d.ts +375 -0
  34. package/dist/generated/agent-harness/types.gen.d.ts +4725 -0
  35. package/dist/generated/agent-reviews/index.d.ts +895 -0
  36. package/dist/generated/agent-reviews/index.js +0 -0
  37. package/dist/generated/auth/client/client.gen.d.ts +2 -0
  38. package/dist/generated/auth/client/index.d.ts +10 -0
  39. package/dist/generated/auth/client/types.gen.d.ts +120 -0
  40. package/dist/generated/auth/client/utils.gen.d.ts +37 -0
  41. package/dist/generated/auth/client.gen.d.ts +12 -0
  42. package/dist/generated/auth/core/auth.gen.d.ts +25 -0
  43. package/dist/generated/auth/core/bodySerializer.gen.d.ts +25 -0
  44. package/dist/generated/auth/core/params.gen.d.ts +43 -0
  45. package/dist/generated/auth/core/pathSerializer.gen.d.ts +33 -0
  46. package/dist/generated/auth/core/queryKeySerializer.gen.d.ts +18 -0
  47. package/dist/generated/auth/core/serverSentEvents.gen.d.ts +71 -0
  48. package/dist/generated/auth/core/types.gen.d.ts +83 -0
  49. package/dist/generated/auth/core/utils.gen.d.ts +19 -0
  50. package/dist/generated/auth/index.d.ts +2 -0
  51. package/dist/generated/auth/index.js +6 -0
  52. package/dist/generated/auth/sdk.gen.d.ts +674 -0
  53. package/dist/generated/auth/types.gen.d.ts +5233 -0
  54. package/dist/generated/calendar/client/client.gen.d.ts +2 -0
  55. package/dist/generated/calendar/client/index.d.ts +10 -0
  56. package/dist/generated/calendar/client/types.gen.d.ts +120 -0
  57. package/dist/generated/calendar/client/utils.gen.d.ts +37 -0
  58. package/dist/generated/calendar/client.gen.d.ts +12 -0
  59. package/dist/generated/calendar/core/auth.gen.d.ts +25 -0
  60. package/dist/generated/calendar/core/bodySerializer.gen.d.ts +25 -0
  61. package/dist/generated/calendar/core/params.gen.d.ts +43 -0
  62. package/dist/generated/calendar/core/pathSerializer.gen.d.ts +33 -0
  63. package/dist/generated/calendar/core/queryKeySerializer.gen.d.ts +18 -0
  64. package/dist/generated/calendar/core/serverSentEvents.gen.d.ts +71 -0
  65. package/dist/generated/calendar/core/types.gen.d.ts +83 -0
  66. package/dist/generated/calendar/core/utils.gen.d.ts +19 -0
  67. package/dist/generated/calendar/index.d.ts +2 -0
  68. package/dist/generated/calendar/index.js +6 -0
  69. package/dist/generated/calendar/sdk.gen.d.ts +157 -0
  70. package/dist/generated/calendar/types.gen.d.ts +2333 -0
  71. package/dist/generated/cognition/client/client.gen.d.ts +2 -0
  72. package/dist/generated/cognition/client/index.d.ts +10 -0
  73. package/dist/generated/cognition/client/types.gen.d.ts +120 -0
  74. package/dist/generated/cognition/client/utils.gen.d.ts +37 -0
  75. package/dist/generated/cognition/client.gen.d.ts +12 -0
  76. package/dist/generated/cognition/core/auth.gen.d.ts +25 -0
  77. package/dist/generated/cognition/core/bodySerializer.gen.d.ts +25 -0
  78. package/dist/generated/cognition/core/params.gen.d.ts +43 -0
  79. package/dist/generated/cognition/core/pathSerializer.gen.d.ts +33 -0
  80. package/dist/generated/cognition/core/queryKeySerializer.gen.d.ts +18 -0
  81. package/dist/generated/cognition/core/serverSentEvents.gen.d.ts +71 -0
  82. package/dist/generated/cognition/core/types.gen.d.ts +83 -0
  83. package/dist/generated/cognition/core/utils.gen.d.ts +19 -0
  84. package/dist/generated/cognition/index.d.ts +2 -0
  85. package/dist/generated/cognition/index.js +6 -0
  86. package/dist/generated/cognition/sdk.gen.d.ts +348 -0
  87. package/dist/generated/cognition/types.gen.d.ts +4228 -0
  88. package/dist/generated/connection/client/client.gen.d.ts +2 -0
  89. package/dist/generated/connection/client/index.d.ts +10 -0
  90. package/dist/generated/connection/client/types.gen.d.ts +120 -0
  91. package/dist/generated/connection/client/utils.gen.d.ts +37 -0
  92. package/dist/generated/connection/client.gen.d.ts +12 -0
  93. package/dist/generated/connection/core/auth.gen.d.ts +25 -0
  94. package/dist/generated/connection/core/bodySerializer.gen.d.ts +25 -0
  95. package/dist/generated/connection/core/params.gen.d.ts +43 -0
  96. package/dist/generated/connection/core/pathSerializer.gen.d.ts +33 -0
  97. package/dist/generated/connection/core/queryKeySerializer.gen.d.ts +18 -0
  98. package/dist/generated/connection/core/serverSentEvents.gen.d.ts +71 -0
  99. package/dist/generated/connection/core/types.gen.d.ts +83 -0
  100. package/dist/generated/connection/core/utils.gen.d.ts +19 -0
  101. package/dist/generated/connection/index.d.ts +2 -0
  102. package/dist/generated/connection/index.js +854 -0
  103. package/dist/generated/connection/sdk.gen.d.ts +43 -0
  104. package/dist/generated/connection/types.gen.d.ts +252 -0
  105. package/dist/generated/contacts/client/client.gen.d.ts +2 -0
  106. package/dist/generated/contacts/client/index.d.ts +10 -0
  107. package/dist/generated/contacts/client/types.gen.d.ts +120 -0
  108. package/dist/generated/contacts/client/utils.gen.d.ts +37 -0
  109. package/dist/generated/contacts/client.gen.d.ts +12 -0
  110. package/dist/generated/contacts/core/auth.gen.d.ts +25 -0
  111. package/dist/generated/contacts/core/bodySerializer.gen.d.ts +25 -0
  112. package/dist/generated/contacts/core/params.gen.d.ts +43 -0
  113. package/dist/generated/contacts/core/pathSerializer.gen.d.ts +33 -0
  114. package/dist/generated/contacts/core/queryKeySerializer.gen.d.ts +18 -0
  115. package/dist/generated/contacts/core/serverSentEvents.gen.d.ts +71 -0
  116. package/dist/generated/contacts/core/types.gen.d.ts +83 -0
  117. package/dist/generated/contacts/core/utils.gen.d.ts +19 -0
  118. package/dist/generated/contacts/index.d.ts +2 -0
  119. package/dist/generated/contacts/index.js +6 -0
  120. package/dist/generated/contacts/sdk.gen.d.ts +47 -0
  121. package/dist/generated/contacts/types.gen.d.ts +108 -0
  122. package/dist/generated/email/client/client.gen.d.ts +2 -0
  123. package/dist/generated/email/client/index.d.ts +10 -0
  124. package/dist/generated/email/client/types.gen.d.ts +120 -0
  125. package/dist/generated/email/client/utils.gen.d.ts +37 -0
  126. package/dist/generated/email/client.gen.d.ts +12 -0
  127. package/dist/generated/email/core/auth.gen.d.ts +25 -0
  128. package/dist/generated/email/core/bodySerializer.gen.d.ts +25 -0
  129. package/dist/generated/email/core/params.gen.d.ts +43 -0
  130. package/dist/generated/email/core/pathSerializer.gen.d.ts +33 -0
  131. package/dist/generated/email/core/queryKeySerializer.gen.d.ts +18 -0
  132. package/dist/generated/email/core/serverSentEvents.gen.d.ts +71 -0
  133. package/dist/generated/email/core/types.gen.d.ts +83 -0
  134. package/dist/generated/email/core/utils.gen.d.ts +19 -0
  135. package/dist/generated/email/index.d.ts +2 -0
  136. package/dist/generated/email/index.js +6 -0
  137. package/dist/generated/email/sdk.gen.d.ts +301 -0
  138. package/dist/generated/email/types.gen.d.ts +3262 -0
  139. package/dist/generated/notification/client/client.gen.d.ts +2 -0
  140. package/dist/generated/notification/client/index.d.ts +10 -0
  141. package/dist/generated/notification/client/types.gen.d.ts +120 -0
  142. package/dist/generated/notification/client/utils.gen.d.ts +37 -0
  143. package/dist/generated/notification/client.gen.d.ts +12 -0
  144. package/dist/generated/notification/core/auth.gen.d.ts +25 -0
  145. package/dist/generated/notification/core/bodySerializer.gen.d.ts +25 -0
  146. package/dist/generated/notification/core/params.gen.d.ts +43 -0
  147. package/dist/generated/notification/core/pathSerializer.gen.d.ts +33 -0
  148. package/dist/generated/notification/core/queryKeySerializer.gen.d.ts +18 -0
  149. package/dist/generated/notification/core/serverSentEvents.gen.d.ts +71 -0
  150. package/dist/generated/notification/core/types.gen.d.ts +83 -0
  151. package/dist/generated/notification/core/utils.gen.d.ts +19 -0
  152. package/dist/generated/notification/index.d.ts +2 -0
  153. package/dist/generated/notification/index.js +6 -0
  154. package/dist/generated/notification/sdk.gen.d.ts +127 -0
  155. package/dist/generated/notification/types.gen.d.ts +2084 -0
  156. package/dist/generated/properties/client/client.gen.d.ts +2 -0
  157. package/dist/generated/properties/client/index.d.ts +10 -0
  158. package/dist/generated/properties/client/types.gen.d.ts +120 -0
  159. package/dist/generated/properties/client/utils.gen.d.ts +37 -0
  160. package/dist/generated/properties/client.gen.d.ts +12 -0
  161. package/dist/generated/properties/core/auth.gen.d.ts +25 -0
  162. package/dist/generated/properties/core/bodySerializer.gen.d.ts +25 -0
  163. package/dist/generated/properties/core/params.gen.d.ts +43 -0
  164. package/dist/generated/properties/core/pathSerializer.gen.d.ts +33 -0
  165. package/dist/generated/properties/core/queryKeySerializer.gen.d.ts +18 -0
  166. package/dist/generated/properties/core/serverSentEvents.gen.d.ts +71 -0
  167. package/dist/generated/properties/core/types.gen.d.ts +83 -0
  168. package/dist/generated/properties/core/utils.gen.d.ts +19 -0
  169. package/dist/generated/properties/index.d.ts +2 -0
  170. package/dist/generated/properties/index.js +6 -0
  171. package/dist/generated/properties/sdk.gen.d.ts +158 -0
  172. package/dist/generated/properties/types.gen.d.ts +1311 -0
  173. package/dist/generated/scheduled-action/client/client.gen.d.ts +2 -0
  174. package/dist/generated/scheduled-action/client/index.d.ts +10 -0
  175. package/dist/generated/scheduled-action/client/types.gen.d.ts +120 -0
  176. package/dist/generated/scheduled-action/client/utils.gen.d.ts +37 -0
  177. package/dist/generated/scheduled-action/client.gen.d.ts +12 -0
  178. package/dist/generated/scheduled-action/core/auth.gen.d.ts +25 -0
  179. package/dist/generated/scheduled-action/core/bodySerializer.gen.d.ts +25 -0
  180. package/dist/generated/scheduled-action/core/params.gen.d.ts +43 -0
  181. package/dist/generated/scheduled-action/core/pathSerializer.gen.d.ts +33 -0
  182. package/dist/generated/scheduled-action/core/queryKeySerializer.gen.d.ts +18 -0
  183. package/dist/generated/scheduled-action/core/serverSentEvents.gen.d.ts +71 -0
  184. package/dist/generated/scheduled-action/core/types.gen.d.ts +83 -0
  185. package/dist/generated/scheduled-action/core/utils.gen.d.ts +19 -0
  186. package/dist/generated/scheduled-action/index.d.ts +2 -0
  187. package/dist/generated/scheduled-action/index.js +6 -0
  188. package/dist/generated/scheduled-action/sdk.gen.d.ts +156 -0
  189. package/dist/generated/scheduled-action/types.gen.d.ts +3099 -0
  190. package/dist/generated/search/client/client.gen.d.ts +2 -0
  191. package/dist/generated/search/client/index.d.ts +10 -0
  192. package/dist/generated/search/client/types.gen.d.ts +120 -0
  193. package/dist/generated/search/client/utils.gen.d.ts +37 -0
  194. package/dist/generated/search/client.gen.d.ts +12 -0
  195. package/dist/generated/search/core/auth.gen.d.ts +25 -0
  196. package/dist/generated/search/core/bodySerializer.gen.d.ts +25 -0
  197. package/dist/generated/search/core/params.gen.d.ts +43 -0
  198. package/dist/generated/search/core/pathSerializer.gen.d.ts +33 -0
  199. package/dist/generated/search/core/queryKeySerializer.gen.d.ts +18 -0
  200. package/dist/generated/search/core/serverSentEvents.gen.d.ts +71 -0
  201. package/dist/generated/search/core/types.gen.d.ts +83 -0
  202. package/dist/generated/search/core/utils.gen.d.ts +19 -0
  203. package/dist/generated/search/index.d.ts +2 -0
  204. package/dist/generated/search/index.js +6 -0
  205. package/dist/generated/search/sdk.gen.d.ts +44 -0
  206. package/dist/generated/search/types.gen.d.ts +2532 -0
  207. package/dist/generated/static-files/client/client.gen.d.ts +2 -0
  208. package/dist/generated/static-files/client/index.d.ts +10 -0
  209. package/dist/generated/static-files/client/types.gen.d.ts +120 -0
  210. package/dist/generated/static-files/client/utils.gen.d.ts +37 -0
  211. package/dist/generated/static-files/client.gen.d.ts +12 -0
  212. package/dist/generated/static-files/core/auth.gen.d.ts +25 -0
  213. package/dist/generated/static-files/core/bodySerializer.gen.d.ts +25 -0
  214. package/dist/generated/static-files/core/params.gen.d.ts +43 -0
  215. package/dist/generated/static-files/core/pathSerializer.gen.d.ts +33 -0
  216. package/dist/generated/static-files/core/queryKeySerializer.gen.d.ts +18 -0
  217. package/dist/generated/static-files/core/serverSentEvents.gen.d.ts +71 -0
  218. package/dist/generated/static-files/core/types.gen.d.ts +83 -0
  219. package/dist/generated/static-files/core/utils.gen.d.ts +19 -0
  220. package/dist/generated/static-files/index.d.ts +2 -0
  221. package/dist/generated/static-files/index.js +842 -0
  222. package/dist/generated/static-files/sdk.gen.d.ts +43 -0
  223. package/dist/generated/static-files/types.gen.d.ts +220 -0
  224. package/dist/generated/storage/client/client.gen.d.ts +2 -0
  225. package/dist/generated/storage/client/index.d.ts +10 -0
  226. package/dist/generated/storage/client/types.gen.d.ts +120 -0
  227. package/dist/generated/storage/client/utils.gen.d.ts +37 -0
  228. package/dist/generated/storage/client.gen.d.ts +12 -0
  229. package/dist/generated/storage/core/auth.gen.d.ts +25 -0
  230. package/dist/generated/storage/core/bodySerializer.gen.d.ts +25 -0
  231. package/dist/generated/storage/core/params.gen.d.ts +43 -0
  232. package/dist/generated/storage/core/pathSerializer.gen.d.ts +33 -0
  233. package/dist/generated/storage/core/queryKeySerializer.gen.d.ts +18 -0
  234. package/dist/generated/storage/core/serverSentEvents.gen.d.ts +71 -0
  235. package/dist/generated/storage/core/types.gen.d.ts +83 -0
  236. package/dist/generated/storage/core/utils.gen.d.ts +19 -0
  237. package/dist/generated/storage/index.d.ts +2 -0
  238. package/dist/generated/storage/index.js +6 -0
  239. package/dist/generated/storage/sdk.gen.d.ts +2285 -0
  240. package/dist/generated/storage/types.gen.d.ts +34546 -0
  241. package/dist/generated/unfurl/client/client.gen.d.ts +2 -0
  242. package/dist/generated/unfurl/client/index.d.ts +10 -0
  243. package/dist/generated/unfurl/client/types.gen.d.ts +120 -0
  244. package/dist/generated/unfurl/client/utils.gen.d.ts +37 -0
  245. package/dist/generated/unfurl/client.gen.d.ts +12 -0
  246. package/dist/generated/unfurl/core/auth.gen.d.ts +25 -0
  247. package/dist/generated/unfurl/core/bodySerializer.gen.d.ts +25 -0
  248. package/dist/generated/unfurl/core/params.gen.d.ts +43 -0
  249. package/dist/generated/unfurl/core/pathSerializer.gen.d.ts +33 -0
  250. package/dist/generated/unfurl/core/queryKeySerializer.gen.d.ts +18 -0
  251. package/dist/generated/unfurl/core/serverSentEvents.gen.d.ts +71 -0
  252. package/dist/generated/unfurl/core/types.gen.d.ts +83 -0
  253. package/dist/generated/unfurl/core/utils.gen.d.ts +19 -0
  254. package/dist/generated/unfurl/index.d.ts +2 -0
  255. package/dist/generated/unfurl/index.js +6 -0
  256. package/dist/generated/unfurl/sdk.gen.d.ts +47 -0
  257. package/dist/generated/unfurl/types.gen.d.ts +145 -0
  258. package/dist/src/calls/browser.d.ts +14 -0
  259. package/dist/src/calls/browser.js +102 -0
  260. package/dist/src/calls/common.d.ts +18 -0
  261. package/dist/src/calls/node.d.ts +24 -0
  262. package/dist/src/calls/node.js +145 -0
  263. package/dist/src/calls/telemetry.d.ts +5 -0
  264. package/dist/src/config.d.ts +71 -0
  265. package/dist/src/entities/account-managers/grant.d.ts +62 -0
  266. package/dist/src/entities/account-managers/namespace.d.ts +29 -0
  267. package/dist/src/entities/activity/entity.d.ts +7 -0
  268. package/dist/src/entities/activity/namespace.d.ts +58 -0
  269. package/dist/src/entities/activity/namespace.test.d.ts +1 -0
  270. package/dist/src/entities/agent-sessions/activity.d.ts +48 -0
  271. package/dist/src/entities/agent-sessions/agent-session.d.ts +518 -0
  272. package/dist/src/entities/agent-sessions/code-execution.d.ts +60 -0
  273. package/dist/src/entities/agent-sessions/conversation.d.ts +91 -0
  274. package/dist/src/entities/agent-sessions/namespace.d.ts +142 -0
  275. package/dist/src/entities/agent-sessions/origin.d.ts +94 -0
  276. package/dist/src/entities/agent-sessions/queued-action.d.ts +60 -0
  277. package/dist/src/entities/agent-sessions/review.d.ts +114 -0
  278. package/dist/src/entities/agent-sessions/tool-approval.d.ts +25 -0
  279. package/dist/src/entities/agent-sessions/view.d.ts +11 -0
  280. package/dist/src/entities/agents/agent.d.ts +142 -0
  281. package/dist/src/entities/agents/namespace.d.ts +66 -0
  282. package/dist/src/entities/ai/namespace.d.ts +36 -0
  283. package/dist/src/entities/api-keys/api-key.d.ts +22 -0
  284. package/dist/src/entities/api-keys/namespace.d.ts +37 -0
  285. package/dist/src/entities/bots/bot.d.ts +143 -0
  286. package/dist/src/entities/bots/namespace.d.ts +50 -0
  287. package/dist/src/entities/bots/token.d.ts +39 -0
  288. package/dist/src/entities/calendar/booking-link.d.ts +55 -0
  289. package/dist/src/entities/calendar/booking-namespace.d.ts +143 -0
  290. package/dist/src/entities/calendar/booking-namespace.test.d.ts +1 -0
  291. package/dist/src/entities/calendar/booking.d.ts +97 -0
  292. package/dist/src/entities/calendar/calendar.d.ts +49 -0
  293. package/dist/src/entities/calendar/create-confirmed.test.d.ts +1 -0
  294. package/dist/src/entities/calendar/event.d.ts +283 -0
  295. package/dist/src/entities/calendar/event.test.d.ts +1 -0
  296. package/dist/src/entities/calendar/namespace.d.ts +334 -0
  297. package/dist/src/entities/calendar/namespace.test.d.ts +1 -0
  298. package/dist/src/entities/calendar/replacement.d.ts +31 -0
  299. package/dist/src/entities/calls/call-record.d.ts +231 -0
  300. package/dist/src/entities/calls/connection.d.ts +59 -0
  301. package/dist/src/entities/calls/errors.d.ts +15 -0
  302. package/dist/src/entities/calls/message.d.ts +55 -0
  303. package/dist/src/entities/calls/namespace.d.ts +41 -0
  304. package/dist/src/entities/calls/participant.d.ts +22 -0
  305. package/dist/src/entities/canvases/canvas.d.ts +329 -0
  306. package/dist/src/entities/channels/access-request.d.ts +42 -0
  307. package/dist/src/entities/channels/activity.d.ts +40 -0
  308. package/dist/src/entities/channels/channel.d.ts +302 -0
  309. package/dist/src/entities/channels/labels.d.ts +73 -0
  310. package/dist/src/entities/channels/message.d.ts +153 -0
  311. package/dist/src/entities/channels/message.test.d.ts +1 -0
  312. package/dist/src/entities/channels/namespace.d.ts +82 -0
  313. package/dist/src/entities/channels/namespace.test.d.ts +1 -0
  314. package/dist/src/entities/channels/picture.d.ts +11 -0
  315. package/dist/src/entities/channels/post.d.ts +37 -0
  316. package/dist/src/entities/channels/post.test.d.ts +1 -0
  317. package/dist/src/entities/channels/share.d.ts +9 -0
  318. package/dist/src/entities/channels/share.test.d.ts +1 -0
  319. package/dist/src/entities/channels/thread.d.ts +64 -0
  320. package/dist/src/entities/chats/chat.d.ts +121 -0
  321. package/dist/src/entities/chats/generation.d.ts +55 -0
  322. package/dist/src/entities/chats/namespace.d.ts +35 -0
  323. package/dist/src/entities/connected-apps/connected-app.d.ts +121 -0
  324. package/dist/src/entities/connected-apps/connector.d.ts +59 -0
  325. package/dist/src/entities/connected-apps/namespace.d.ts +92 -0
  326. package/dist/src/entities/crm/company.d.ts +154 -0
  327. package/dist/src/entities/crm/contact.d.ts +168 -0
  328. package/dist/src/entities/crm/namespace.d.ts +163 -0
  329. package/dist/src/entities/crm/pipeline-entry.d.ts +109 -0
  330. package/dist/src/entities/crm/pipeline.d.ts +426 -0
  331. package/dist/src/entities/crm/pipelines.d.ts +79 -0
  332. package/dist/src/entities/crm-email-privacy/email-privacy.d.ts +238 -0
  333. package/dist/src/entities/crm-email-privacy/email-rule-preview.d.ts +55 -0
  334. package/dist/src/entities/crm-email-privacy/email-rule-revision.d.ts +27 -0
  335. package/dist/src/entities/crm-email-privacy/email-rules.d.ts +32 -0
  336. package/dist/src/entities/databases/column.d.ts +122 -0
  337. package/dist/src/entities/databases/database.d.ts +431 -0
  338. package/dist/src/entities/databases/namespace.d.ts +109 -0
  339. package/dist/src/entities/databases/query.d.ts +86 -0
  340. package/dist/src/entities/databases/row.d.ts +29 -0
  341. package/dist/src/entities/databases/saved-query.d.ts +151 -0
  342. package/dist/src/entities/databases/table.d.ts +124 -0
  343. package/dist/src/entities/databases/view.d.ts +72 -0
  344. package/dist/src/entities/databases/webhook.d.ts +39 -0
  345. package/dist/src/entities/documents/ai-edit.d.ts +54 -0
  346. package/dist/src/entities/documents/anchor.d.ts +39 -0
  347. package/dist/src/entities/documents/comment.d.ts +68 -0
  348. package/dist/src/entities/documents/create.test.d.ts +1 -0
  349. package/dist/src/entities/documents/document.d.ts +675 -0
  350. package/dist/src/entities/documents/markdown.d.ts +25 -0
  351. package/dist/src/entities/documents/namespace.d.ts +291 -0
  352. package/dist/src/entities/documents/office-files.d.ts +47 -0
  353. package/dist/src/entities/documents/skills.test.d.ts +1 -0
  354. package/dist/src/entities/documents/system-skill.d.ts +36 -0
  355. package/dist/src/entities/documents/text-comment.d.ts +41 -0
  356. package/dist/src/entities/documents/text-comment.test.d.ts +1 -0
  357. package/dist/src/entities/documents/version.d.ts +26 -0
  358. package/dist/src/entities/email/attachment.d.ts +39 -0
  359. package/dist/src/entities/email/draft.d.ts +160 -0
  360. package/dist/src/entities/email/filter.d.ts +44 -0
  361. package/dist/src/entities/email/label.d.ts +37 -0
  362. package/dist/src/entities/email/link.d.ts +35 -0
  363. package/dist/src/entities/email/message.d.ts +223 -0
  364. package/dist/src/entities/email/namespace.d.ts +235 -0
  365. package/dist/src/entities/email/namespace.test.d.ts +1 -0
  366. package/dist/src/entities/email/thread.d.ts +268 -0
  367. package/dist/src/entities/entity-mentions/mention.d.ts +21 -0
  368. package/dist/src/entities/entity-mentions/namespace.d.ts +20 -0
  369. package/dist/src/entities/entity.d.ts +167 -0
  370. package/dist/src/entities/external-chat/chat.d.ts +173 -0
  371. package/dist/src/entities/external-chat/message.d.ts +54 -0
  372. package/dist/src/entities/external-chat/namespace.d.ts +22 -0
  373. package/dist/src/entities/external-chat/participant.d.ts +28 -0
  374. package/dist/src/entities/external-chat/send.d.ts +40 -0
  375. package/dist/src/entities/external-chat/upload.d.ts +25 -0
  376. package/dist/src/entities/favorites/namespace.d.ts +52 -0
  377. package/dist/src/entities/foreign/foreign-entity.d.ts +36 -0
  378. package/dist/src/entities/foreign/namespace.d.ts +54 -0
  379. package/dist/src/entities/forms/form.d.ts +319 -0
  380. package/dist/src/entities/forms/namespace.d.ts +30 -0
  381. package/dist/src/entities/forms/question.d.ts +65 -0
  382. package/dist/src/entities/forms/response.d.ts +52 -0
  383. package/dist/src/entities/forms/section.d.ts +31 -0
  384. package/dist/src/entities/github-pull-requests/namespace.d.ts +20 -0
  385. package/dist/src/entities/github-pull-requests/pull-request.d.ts +64 -0
  386. package/dist/src/entities/harnesses/harness.d.ts +76 -0
  387. package/dist/src/entities/harnesses/namespace.d.ts +83 -0
  388. package/dist/src/entities/harnesses/pairing.d.ts +50 -0
  389. package/dist/src/entities/images/image.d.ts +88 -0
  390. package/dist/src/entities/images/namespace.d.ts +55 -0
  391. package/dist/src/entities/images/namespace.test.d.ts +1 -0
  392. package/dist/src/entities/imports/entry.d.ts +65 -0
  393. package/dist/src/entities/imports/namespace.d.ts +103 -0
  394. package/dist/src/entities/imports/namespace.test.d.ts +1 -0
  395. package/dist/src/entities/initiatives/initiative.d.ts +185 -0
  396. package/dist/src/entities/initiatives/initiative.test.d.ts +1 -0
  397. package/dist/src/entities/initiatives/namespace.d.ts +90 -0
  398. package/dist/src/entities/me/namespace.d.ts +68 -0
  399. package/dist/src/entities/meetings/meeting.d.ts +81 -0
  400. package/dist/src/entities/meetings/namespace.d.ts +38 -0
  401. package/dist/src/entities/memory/namespace.d.ts +49 -0
  402. package/dist/src/entities/memory/namespace.test.d.ts +1 -0
  403. package/dist/src/entities/messages/discussion.d.ts +84 -0
  404. package/dist/src/entities/messages/thread.d.ts +115 -0
  405. package/dist/src/entities/notifications/namespace.d.ts +66 -0
  406. package/dist/src/entities/notifications/notification.d.ts +78 -0
  407. package/dist/src/entities/notifications/notification.test.d.ts +1 -0
  408. package/dist/src/entities/passwords/item.d.ts +118 -0
  409. package/dist/src/entities/passwords/namespace.d.ts +45 -0
  410. package/dist/src/entities/pins/namespace.d.ts +42 -0
  411. package/dist/src/entities/projects/namespace.d.ts +45 -0
  412. package/dist/src/entities/projects/project.d.ts +108 -0
  413. package/dist/src/entities/properties/namespace.d.ts +105 -0
  414. package/dist/src/entities/properties/namespace.test.d.ts +1 -0
  415. package/dist/src/entities/properties/property-definition.d.ts +70 -0
  416. package/dist/src/entities/properties/property-option.d.ts +44 -0
  417. package/dist/src/entities/reference.d.ts +82 -0
  418. package/dist/src/entities/referrals/namespace.d.ts +40 -0
  419. package/dist/src/entities/routines/namespace.d.ts +239 -0
  420. package/dist/src/entities/routines/routine.d.ts +341 -0
  421. package/dist/src/entities/routines/suggestion.d.ts +38 -0
  422. package/dist/src/entities/saved-views/namespace.d.ts +58 -0
  423. package/dist/src/entities/saved-views/saved-view.d.ts +78 -0
  424. package/dist/src/entities/search/exclusions.d.ts +6 -0
  425. package/dist/src/entities/search/namespace.d.ts +71 -0
  426. package/dist/src/entities/search/options.d.ts +30 -0
  427. package/dist/src/entities/search/types.d.ts +90 -0
  428. package/dist/src/entities/sharing/access.d.ts +120 -0
  429. package/dist/src/entities/sharing/permissions.d.ts +13 -0
  430. package/dist/src/entities/spreadsheets/spreadsheet.d.ts +201 -0
  431. package/dist/src/entities/suggestions/namespace.d.ts +118 -0
  432. package/dist/src/entities/suggestions/suggestion.d.ts +172 -0
  433. package/dist/src/entities/suggestions/suggestion.test.d.ts +1 -0
  434. package/dist/src/entities/tasks/namespace.d.ts +77 -0
  435. package/dist/src/entities/tasks/task.d.ts +99 -0
  436. package/dist/src/entities/teams/invite.d.ts +33 -0
  437. package/dist/src/entities/teams/namespace.d.ts +23 -0
  438. package/dist/src/entities/teams/team.d.ts +129 -0
  439. package/dist/src/entities/ui/app-link.d.ts +24 -0
  440. package/dist/src/entities/ui/namespace.d.ts +75 -0
  441. package/dist/src/entities/unfurls/namespace.d.ts +24 -0
  442. package/dist/src/entities/users/namespace.d.ts +41 -0
  443. package/dist/src/entities/users/profile-picture.d.ts +29 -0
  444. package/dist/src/entities/users/profile-picture.test.d.ts +1 -0
  445. package/dist/src/entities/users/user.d.ts +102 -0
  446. package/dist/src/entities/web/namespace.d.ts +67 -0
  447. package/dist/src/entities/web/namespace.test.d.ts +1 -0
  448. package/dist/src/entities/webhooks/namespace.d.ts +38 -0
  449. package/dist/src/entities/webhooks/webhook.d.ts +130 -0
  450. package/dist/src/entities/whatsapp/account.d.ts +24 -0
  451. package/dist/src/entities/whatsapp/chat.d.ts +62 -0
  452. package/dist/src/entities/whatsapp/namespace.d.ts +29 -0
  453. package/dist/src/entities/workspace/items.d.ts +14 -0
  454. package/dist/src/entities/workspace/namespace.d.ts +96 -0
  455. package/dist/src/entities/workspace/query.d.ts +39 -0
  456. package/dist/src/entities/workspace/query.test.d.ts +1 -0
  457. package/dist/src/entities/workspace/types.d.ts +99 -0
  458. package/dist/src/events/hydrate/agentSession.d.ts +192 -0
  459. package/dist/src/events/hydrate/call.d.ts +101 -0
  460. package/dist/src/events/hydrate/channel.d.ts +55 -0
  461. package/dist/src/events/hydrate/document.d.ts +59 -0
  462. package/dist/src/events/hydrate/message.d.ts +70 -0
  463. package/dist/src/events/hydrate/user.d.ts +14 -0
  464. package/dist/src/events/receiver.d.ts +91 -0
  465. package/dist/src/events/types.d.ts +44 -0
  466. package/dist/src/events/verify.d.ts +13 -0
  467. package/dist/src/local-portmap.d.ts +8 -0
  468. package/dist/src/mentions.d.ts +42 -0
  469. package/dist/src/raw.d.ts +12 -0
  470. package/dist/src/rox.d.ts +267 -0
  471. package/dist/src/rox.js +23217 -0
  472. package/dist/src/utils/activity.d.ts +34 -0
  473. package/dist/src/utils/activity.test.d.ts +1 -0
  474. package/dist/src/utils/client.d.ts +62 -0
  475. package/dist/src/utils/concurrency.d.ts +5 -0
  476. package/dist/src/utils/index.d.ts +5 -0
  477. package/dist/src/utils/lazy.d.ts +37 -0
  478. package/dist/src/utils/options.d.ts +7 -0
  479. package/dist/src/utils/pagination.d.ts +28 -0
  480. package/dist/src/utils/unwrap.d.ts +48 -0
  481. package/dist/src/utils/verbs.d.ts +3 -0
  482. package/package.json +82 -4
@@ -0,0 +1,3262 @@
1
+ export type ClientOptions = {
2
+ baseUrl: `${string}://${string}` | (string & {});
3
+ };
4
+ /**
5
+ * Ordered from least to most access top -> bottom
6
+ */
7
+ export type AccessLevel = 'view' | 'comment' | 'edit' | 'owner';
8
+ /**
9
+ * The request passed to send a message
10
+ */
11
+ export type AddDraftAttachmentRequest = {
12
+ /**
13
+ * The name of the file being uploaded.
14
+ */
15
+ file_name: string;
16
+ /**
17
+ * The SHA256 hash of the file being uploaded.
18
+ */
19
+ sha: string;
20
+ /**
21
+ * The size of the file in bytes.
22
+ */
23
+ size: number;
24
+ /**
25
+ * Stable client upload identifier. Retry the same file with the same ID.
26
+ */
27
+ upload_id?: string | null;
28
+ };
29
+ export type AddDraftAttachmentResponse = {
30
+ /**
31
+ * The ID of the attachment in the database.
32
+ */
33
+ attachment_id: string;
34
+ /**
35
+ * The MIME type of the attachment.
36
+ */
37
+ content_type: string;
38
+ /**
39
+ * The URL to upload the attachment to.
40
+ */
41
+ upload_url: string;
42
+ };
43
+ export type AddForwardedAttachmentRequest = {
44
+ /**
45
+ * The ID of the original attachment to forward.
46
+ */
47
+ attachment_id: string;
48
+ };
49
+ export type AddForwardedAttachmentResponse = {
50
+ /**
51
+ * The ID of the original attachment.
52
+ */
53
+ attachment_id: string;
54
+ /**
55
+ * Original file name of the attachment.
56
+ */
57
+ filename?: string | null;
58
+ /**
59
+ * MIME type of the attachment.
60
+ */
61
+ mime_type?: string | null;
62
+ /**
63
+ * File size in bytes.
64
+ */
65
+ size_bytes?: number | null;
66
+ };
67
+ export type ApiAttachment = {
68
+ contentId?: string | null;
69
+ createdAt: string;
70
+ filename?: string | null;
71
+ id: string;
72
+ messageId: string;
73
+ mimeType?: string | null;
74
+ providerAttachmentId?: string | null;
75
+ sizeBytes?: number | null;
76
+ };
77
+ /**
78
+ * API representation of a draft attachment on a message.
79
+ */
80
+ export type ApiAttachmentDraft = {
81
+ content_id?: string | null;
82
+ content_type: string;
83
+ draft_id: string;
84
+ file_name: string;
85
+ id: string;
86
+ is_inline: boolean;
87
+ s3_key: string;
88
+ sha: string;
89
+ size: number;
90
+ upload_pending: boolean;
91
+ };
92
+ /**
93
+ * API representation of a forwarded attachment on a message.
94
+ */
95
+ export type ApiAttachmentForwarded = {
96
+ attachment_id: string;
97
+ draft_id: string;
98
+ filename?: string | null;
99
+ message_provider_id: string;
100
+ mime_type?: string | null;
101
+ provider_attachment_id?: string | null;
102
+ size_bytes?: number | null;
103
+ };
104
+ export type ApiContact = {
105
+ emailAddress?: string | null;
106
+ id: string;
107
+ linkId: string;
108
+ name?: string | null;
109
+ sfsPhotoUrl?: string | null;
110
+ };
111
+ /**
112
+ * API representation of a contact (sender or recipient).
113
+ */
114
+ export type ApiContactInfo = {
115
+ email: string;
116
+ name?: string | null;
117
+ photo_url?: string | null;
118
+ };
119
+ /**
120
+ * Contact info for draft request/response (backward-compatible with MessageToSend shape).
121
+ */
122
+ export type ApiDraftContactInfo = {
123
+ /**
124
+ * Email address.
125
+ */
126
+ email: string;
127
+ /**
128
+ * Display name.
129
+ */
130
+ name?: string | null;
131
+ /**
132
+ * Profile photo URL.
133
+ */
134
+ photo_url?: string | null;
135
+ };
136
+ /**
137
+ * The draft input matching the current `MessageToSend` JSON shape for backward compat.
138
+ */
139
+ export type ApiDraftInput = {
140
+ /**
141
+ * Bcc recipients.
142
+ */
143
+ bcc?: Array<ApiDraftContactInfo> | null;
144
+ /**
145
+ * HTML body (base64 URL_SAFE_NO_PAD encoded). Sanitized before storage.
146
+ */
147
+ body_html?: string | null;
148
+ /**
149
+ * Rox body format.
150
+ */
151
+ body_macro?: string | null;
152
+ /**
153
+ * Plain text body.
154
+ */
155
+ body_text?: string | null;
156
+ /**
157
+ * Cc recipients.
158
+ */
159
+ cc?: Array<ApiDraftContactInfo> | null;
160
+ /**
161
+ * Existing message DB ID (for updating an existing draft).
162
+ */
163
+ db_id?: string | null;
164
+ /**
165
+ * Generation from the last loaded draft; legacy clients begin at zero.
166
+ */
167
+ draft_generation?: number;
168
+ /**
169
+ * The address to send from: the selected inbox's own address or one of
170
+ * its verified Gmail send-as aliases, which sends under the alias's
171
+ * display name. Omit it to send from the inbox's own address.
172
+ */
173
+ from?: string | null;
174
+ headers_json?: null | Value;
175
+ /**
176
+ * Per-message override for whether to include the signature on send:
177
+ * `Some(false)` to exclude (user dismissed it). Omit to use the inbox's
178
+ * default policy. Ignored for drafts.
179
+ */
180
+ include_signature?: boolean | null;
181
+ /**
182
+ * Provider message ID.
183
+ */
184
+ provider_id?: string | null;
185
+ /**
186
+ * Provider thread ID.
187
+ */
188
+ provider_thread_id?: string | null;
189
+ /**
190
+ * ID of the message this draft is replying to.
191
+ */
192
+ replying_to_id?: string | null;
193
+ /**
194
+ * Subject line.
195
+ */
196
+ subject: string;
197
+ /**
198
+ * Thread DB ID.
199
+ */
200
+ thread_db_id?: string | null;
201
+ /**
202
+ * To recipients.
203
+ */
204
+ to?: Array<ApiDraftContactInfo> | null;
205
+ };
206
+ /**
207
+ * The draft output matching the current `MessageToSend` JSON shape for backward compat.
208
+ */
209
+ export type ApiDraftOutput = {
210
+ /**
211
+ * Bcc recipients.
212
+ */
213
+ bcc?: Array<ApiDraftContactInfo> | null;
214
+ /**
215
+ * HTML body (decoded).
216
+ */
217
+ body_html?: string | null;
218
+ /**
219
+ * Rox body.
220
+ */
221
+ body_macro?: string | null;
222
+ /**
223
+ * Plain text body.
224
+ */
225
+ body_text?: string | null;
226
+ /**
227
+ * Cc recipients.
228
+ */
229
+ cc?: Array<ApiDraftContactInfo> | null;
230
+ /**
231
+ * Message DB ID.
232
+ */
233
+ db_id?: string | null;
234
+ /**
235
+ * Generation required for subsequent edits.
236
+ */
237
+ draft_generation: number;
238
+ headers_json?: null | Value;
239
+ /**
240
+ * Link ID.
241
+ */
242
+ link_id: string;
243
+ /**
244
+ * Provider message ID.
245
+ */
246
+ provider_id?: string | null;
247
+ /**
248
+ * Provider thread ID.
249
+ */
250
+ provider_thread_id?: string | null;
251
+ /**
252
+ * ID of the message this draft is replying to.
253
+ */
254
+ replying_to_id?: string | null;
255
+ /**
256
+ * Send time.
257
+ */
258
+ send_time?: string | null;
259
+ /**
260
+ * Subject line.
261
+ */
262
+ subject: string;
263
+ /**
264
+ * Thread DB ID.
265
+ */
266
+ thread_db_id?: string | null;
267
+ /**
268
+ * To recipients.
269
+ */
270
+ to?: Array<ApiDraftContactInfo> | null;
271
+ };
272
+ /**
273
+ * A single email filter in API responses.
274
+ */
275
+ export type ApiEmailFilter = {
276
+ created_at: string;
277
+ email_address?: string | null;
278
+ email_domain?: string | null;
279
+ id: string;
280
+ is_important: boolean;
281
+ };
282
+ export type ApiLabel = {
283
+ createdAt: string;
284
+ id: string;
285
+ labelListVisibility: ApiLabelListVisibility;
286
+ linkId: string;
287
+ messageListVisibility: ApiMessageListVisibility;
288
+ name: string;
289
+ providerLabelId: string;
290
+ type: ApiLabelType;
291
+ };
292
+ export type ApiLabelListVisibility = 'LabelShow' | 'LabelShowIfUnread' | 'LabelHide';
293
+ export type ApiLabelType = 'System' | 'User';
294
+ /**
295
+ * API representation of a fully assembled email message.
296
+ */
297
+ export type ApiMessage = {
298
+ attachments: Array<ApiMessageAttachment>;
299
+ attachments_draft: Array<ApiAttachmentDraft>;
300
+ attachments_forwarded: Array<ApiAttachmentForwarded>;
301
+ bcc: Array<ApiContactInfo>;
302
+ body_html_sanitized?: string | null;
303
+ body_macro?: string | null;
304
+ body_replyless?: string | null;
305
+ body_text?: string | null;
306
+ calendar_invitations?: Array<CalendarInvitation>;
307
+ cc: Array<ApiContactInfo>;
308
+ created_at: string;
309
+ db_id: string;
310
+ /**
311
+ * Draft edit generation; changes at send and cancellation boundaries.
312
+ */
313
+ draft_generation: number;
314
+ from?: null | ApiContactInfo;
315
+ global_id?: string | null;
316
+ has_attachments: boolean;
317
+ headers_json?: unknown;
318
+ internal_date_ts?: string | null;
319
+ is_draft: boolean;
320
+ is_read: boolean;
321
+ is_sent: boolean;
322
+ is_starred: boolean;
323
+ labels: Array<ApiMessageLabel>;
324
+ link_id: string;
325
+ operation_status?: null | ApiMessageOperation;
326
+ provider_history_id?: string | null;
327
+ provider_id?: string | null;
328
+ provider_thread_id?: string | null;
329
+ replying_to_id?: string | null;
330
+ scheduled_send_status?: null | ScheduledSendStatus;
331
+ scheduled_send_time?: string | null;
332
+ sent_at?: string | null;
333
+ size_estimate?: number | null;
334
+ snippet?: string | null;
335
+ subject?: string | null;
336
+ thread_db_id: string;
337
+ to: Array<ApiContactInfo>;
338
+ updated_at: string;
339
+ };
340
+ /**
341
+ * API representation of a provider attachment on a message.
342
+ */
343
+ export type ApiMessageAttachment = {
344
+ content_id?: string | null;
345
+ data_url?: string | null;
346
+ db_id: string;
347
+ filename?: string | null;
348
+ mime_type?: string | null;
349
+ provider_id?: string | null;
350
+ reference_url?: string | null;
351
+ sfs_id?: string | null;
352
+ size_bytes?: number | null;
353
+ };
354
+ /**
355
+ * API representation of a label on a message.
356
+ */
357
+ export type ApiMessageLabel = {
358
+ created_at: string;
359
+ id?: string | null;
360
+ label_list_visibility?: null | ApiLabelListVisibility;
361
+ link_id: string;
362
+ message_list_visibility?: null | ApiMessageListVisibility;
363
+ name?: string | null;
364
+ provider_label_id: string;
365
+ type_?: null | ApiLabelType;
366
+ };
367
+ export type ApiMessageListVisibility = 'Show' | 'Hide';
368
+ /**
369
+ * Versions are opaque decimal strings so clients never truncate an i64.
370
+ */
371
+ export type ApiMessageOperation = {
372
+ issue?: null | ApiMessageOperationIssue;
373
+ remote_version?: string | null;
374
+ revision: string;
375
+ state: ApiMessageOperationState;
376
+ };
377
+ /**
378
+ * Provider-neutral state exposed to clients.
379
+ */
380
+ export type ApiMessageOperationIssue = 'ACCEPTING_REMOTE' | 'DRAFT_CONFLICT' | 'CREATION_UNKNOWN' | 'ATTACHMENT_UNKNOWN' | 'SEND_UNKNOWN' | 'SEND_REJECTED' | 'ACCESS_REVOKED' | 'INVALID_CONTENT' | 'MOVE_PENDING' | 'MOVE_CONFLICT' | 'MOVE_SOURCE_SENT' | 'MOVE_REAUTHORIZATION' | 'MOVE_ORIGINAL_REMAINS';
381
+ /**
382
+ * Provider-neutral state exposed to clients.
383
+ */
384
+ export type ApiMessageOperationState = 'PENDING' | 'SYNCHRONIZED' | 'CONFLICT' | 'UNCERTAIN' | 'SUBMITTING' | 'CONFIRMING' | 'SENT' | 'DELETED' | 'CANCELLED' | 'FAILED';
385
+ /**
386
+ * A deliberate resolution of a particular observed operation version.
387
+ */
388
+ export type ApiMessageResolutionAction = 'keep_local' | 'use_provider' | 'recheck' | 'retry_send' | 'keep_original';
389
+ export type ApiPaginatedThreadCursor = {
390
+ items: Array<ApiThreadPreviewCursor>;
391
+ next_cursor?: string | null;
392
+ };
393
+ /**
394
+ * common types of sorts based on timestamps
395
+ */
396
+ export type ApiSortMethod = 'viewed_at' | 'updated_at' | 'created_at' | 'viewed_updated';
397
+ /**
398
+ * API representation of a fully assembled email thread.
399
+ */
400
+ export type ApiThread = {
401
+ access_level: AccessLevel;
402
+ created_at: string;
403
+ db_id: string;
404
+ /**
405
+ * Whether any message was received rather than drafted or sent. Only
406
+ * threads with received mail can return to the inbox.
407
+ */
408
+ has_received_mail: boolean;
409
+ inbox_visible: boolean;
410
+ is_read: boolean;
411
+ latest_inbound_message_ts?: string | null;
412
+ latest_non_spam_message_ts?: string | null;
413
+ latest_outbound_message_ts?: string | null;
414
+ link_id: string;
415
+ messages: Array<ApiMessage>;
416
+ project_id?: string | null;
417
+ provider_id?: string | null;
418
+ updated_at: string;
419
+ };
420
+ export type ApiThreadPreviewCursor = ApiThreadPreviewCursorInner & {
421
+ attachments: Array<ApiAttachment>;
422
+ contacts: Array<ApiContact>;
423
+ frecencyScore?: number | null;
424
+ labels: Array<ApiLabel>;
425
+ };
426
+ export type ApiThreadPreviewCursorInner = {
427
+ createdAt: string;
428
+ id: string;
429
+ inboxVisible: boolean;
430
+ isDraft: boolean;
431
+ isImportant: boolean;
432
+ isRead: boolean;
433
+ linkId: string;
434
+ name?: string | null;
435
+ ownerId: string;
436
+ providerId?: string | null;
437
+ senderEmail?: string | null;
438
+ senderName?: string | null;
439
+ senderPhotoUrl?: string | null;
440
+ snippet?: string | null;
441
+ sortTs: string;
442
+ updatedAt: string;
443
+ viewedAt?: string | null;
444
+ };
445
+ export type ArchiveThreadRequest = {
446
+ value: boolean;
447
+ };
448
+ export type ArchiveThreadsRequest = {
449
+ thread_ids: Array<string>;
450
+ value: boolean;
451
+ };
452
+ export type ArchiveThreadsResponse = {
453
+ /**
454
+ * Threads left unchanged because they could not be updated.
455
+ */
456
+ failed_thread_ids: Array<string>;
457
+ /**
458
+ * Threads whose archived status now matches the request.
459
+ */
460
+ updated_thread_ids: Array<string>;
461
+ };
462
+ /**
463
+ * Attachments of a message, as sent to us by the provider.
464
+ */
465
+ export type Attachment = {
466
+ content_id?: string | null;
467
+ data_url?: string | null;
468
+ db_id: string;
469
+ filename?: string | null;
470
+ mime_type?: string | null;
471
+ provider_id?: string | null;
472
+ /**
473
+ * Cloud reference: open this provider page instead of downloading bytes.
474
+ */
475
+ reference_url?: string | null;
476
+ sfs_id?: string | null;
477
+ size_bytes?: number | null;
478
+ };
479
+ export type AttachmentDraft = {
480
+ /**
481
+ * Original Content-ID retained when transferring a provider attachment.
482
+ */
483
+ content_id?: string | null;
484
+ /**
485
+ * MIME type of the attachment (e.g., "application/pdf", "image/png").
486
+ */
487
+ content_type: string;
488
+ /**
489
+ * The ID of the draft message this attachment belongs to.
490
+ */
491
+ draft_id: string;
492
+ /**
493
+ * Original file name of the attachment.
494
+ */
495
+ file_name: string;
496
+ /**
497
+ * Unique identifier for the attachment.
498
+ */
499
+ id: string;
500
+ /**
501
+ * Whether the attachment is referenced inline by the message body.
502
+ */
503
+ is_inline?: boolean;
504
+ /**
505
+ * S3 object key where the attachment content is stored.
506
+ */
507
+ s3_key: string;
508
+ /**
509
+ * SHA-256 hash of the file content for integrity verification.
510
+ */
511
+ sha: string;
512
+ /**
513
+ * File size in bytes.
514
+ */
515
+ size: number;
516
+ /**
517
+ * Bytes have not yet been verified; sending must wait for completion.
518
+ */
519
+ upload_pending?: boolean;
520
+ };
521
+ /**
522
+ * A forwarded attachment linking a draft to an original message's attachment.
523
+ * Data is fetched from Gmail at send time rather than stored in S3.
524
+ */
525
+ export type AttachmentForwarded = {
526
+ /**
527
+ * The UUID of the original attachment in email_attachments.
528
+ */
529
+ attachment_id: string;
530
+ /**
531
+ * The ID of the draft message this forwarded attachment belongs to.
532
+ */
533
+ draft_id: string;
534
+ /**
535
+ * Original file name of the attachment.
536
+ */
537
+ filename?: string | null;
538
+ /**
539
+ * The Gmail message ID of the original message containing the attachment.
540
+ */
541
+ message_provider_id: string;
542
+ /**
543
+ * MIME type of the attachment.
544
+ */
545
+ mime_type?: string | null;
546
+ /**
547
+ * The Gmail attachment ID for fetching data from Gmail API.
548
+ */
549
+ provider_attachment_id?: string | null;
550
+ /**
551
+ * File size in bytes.
552
+ */
553
+ size_bytes?: number | null;
554
+ };
555
+ /**
556
+ * RSVP state for an attendee.
557
+ */
558
+ export type AttendeeResponseStatus = 'needs_action' | 'accepted' | 'declined' | 'tentative';
559
+ export type BackfillJob = {
560
+ created_at: string;
561
+ fusionauth_user_id: string;
562
+ id: string;
563
+ link_id?: string | null;
564
+ status: BackfillJobStatus;
565
+ threads_requested_limit?: number | null;
566
+ threads_retrieved_count: number;
567
+ total_threads: number;
568
+ updated_at: string;
569
+ };
570
+ export type BackfillJobStatus = 'Init' | 'InProgress' | 'Complete' | 'Cancelled' | 'Failed';
571
+ /**
572
+ * Progress/terminal state of a backfill job for [`RefreshEmailEvent::Backfill`].
573
+ */
574
+ export type BackfillStatus = 'progress' | 'complete' | 'failed';
575
+ /**
576
+ * Request to block a sender.
577
+ */
578
+ export type BlockSenderRequest = {
579
+ /**
580
+ * The email address of the sender to block.
581
+ */
582
+ email_address: string;
583
+ };
584
+ /**
585
+ * An attendee on a calendar event.
586
+ */
587
+ export type CalendarAttendee = {
588
+ /**
589
+ * Optional attendee comment.
590
+ */
591
+ comment?: string | null;
592
+ /**
593
+ * Provider display name.
594
+ */
595
+ displayName?: string | null;
596
+ /**
597
+ * Normalized email address.
598
+ */
599
+ email: string;
600
+ /**
601
+ * Whether attendance is optional.
602
+ */
603
+ isOptional: boolean;
604
+ /**
605
+ * Whether this attendee is the organizer.
606
+ */
607
+ isOrganizer: boolean;
608
+ /**
609
+ * Whether this attendee is one of the viewing requester's inboxes.
610
+ */
611
+ isSelf: boolean;
612
+ /**
613
+ * RSVP state.
614
+ */
615
+ responseStatus: AttendeeResponseStatus;
616
+ };
617
+ /**
618
+ * A stable, first-class Rox calendar event entity.
619
+ *
620
+ * Content fields hold the canonical source's values: the account's primary
621
+ * calendar copy when one is synced, else the freshest remaining copy.
622
+ */
623
+ export type CalendarEvent = {
624
+ /**
625
+ * Attendees, keyed by email during persistence.
626
+ */
627
+ attendees: Array<CalendarAttendee>;
628
+ /**
629
+ * Calendar the canonical source belongs to, when known. Absent only in
630
+ * projections stored before calendars were attributed.
631
+ */
632
+ calendarId?: string | null;
633
+ conferenceProvider?: null | ConferenceProvider;
634
+ /**
635
+ * Direct join URL when known.
636
+ */
637
+ conferenceUrl?: string | null;
638
+ /**
639
+ * Entity creation time.
640
+ */
641
+ createdAt: string;
642
+ /**
643
+ * Provider-reported creator email. Distinct from the organizer when
644
+ * someone writes onto a calendar they do not own. Omitted from stored
645
+ * projections when unknown so events ingested before this field still
646
+ * compare equal.
647
+ */
648
+ creatorEmail?: string | null;
649
+ /**
650
+ * Provider-reported creator display name.
651
+ */
652
+ creatorName?: string | null;
653
+ /**
654
+ * Optional event body.
655
+ */
656
+ description?: string | null;
657
+ /**
658
+ * Provider event type. Skipped when it is the regular type so
659
+ * projections stored before event types were modeled still compare
660
+ * equal.
661
+ */
662
+ eventType?: EventType;
663
+ /**
664
+ * What the organizer lets guests do: the canonical copy's values, or
665
+ * Google's defaults for an event synced before the policy was modeled.
666
+ */
667
+ guestPolicy: GuestPolicy;
668
+ /**
669
+ * RFC 5545 UID used to reconcile provider and email sources.
670
+ */
671
+ icalUid: string;
672
+ /**
673
+ * Rox entity identifier.
674
+ */
675
+ id: string;
676
+ /**
677
+ * Whether the canonical source's calendar prohibits editing it.
678
+ */
679
+ isReadOnly: boolean;
680
+ /**
681
+ * Whether this is a snapshot of a meeting shared with the owner, which
682
+ * Rox added to their calendar as a private copy: the meeting's changes
683
+ * never reach it, and nothing done to it reaches the meeting.
684
+ */
685
+ isSnapshot: boolean;
686
+ /**
687
+ * Optional physical or virtual location label.
688
+ */
689
+ location?: string | null;
690
+ /**
691
+ * Organizer email.
692
+ */
693
+ organizerEmail?: string | null;
694
+ /**
695
+ * Organizer display name.
696
+ */
697
+ organizerName?: string | null;
698
+ /**
699
+ * Rox user who owns this event entity.
700
+ */
701
+ ownerId: string;
702
+ /**
703
+ * Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`).
704
+ */
705
+ recurrenceLines: Array<string>;
706
+ /**
707
+ * Per-user reminder configuration. Skipped when it is the provider
708
+ * default so projections stored before reminders were modeled still
709
+ * compare equal.
710
+ */
711
+ reminders?: EventReminders;
712
+ /**
713
+ * Provider/iCalendar sequence number.
714
+ */
715
+ sequence: number;
716
+ /**
717
+ * Content of every active copy of this event, canonical first: the
718
+ * primary calendar's copy, then the freshest. A client picks the copy
719
+ * whose calendar it is showing and falls back to the first. Populated
720
+ * only on the read path, so stored projections omit it.
721
+ */
722
+ sources?: Array<CalendarEventSourceContent>;
723
+ /**
724
+ * Event status.
725
+ */
726
+ status: EventStatus;
727
+ /**
728
+ * Timed or all-day shape.
729
+ */
730
+ time: EventTime;
731
+ /**
732
+ * Display title.
733
+ */
734
+ title: string;
735
+ /**
736
+ * Availability behavior.
737
+ */
738
+ transparency: EventTransparency;
739
+ /**
740
+ * Entity update time.
741
+ */
742
+ updatedAt: string;
743
+ /**
744
+ * What the viewing requester may do with the event. Resolved only on
745
+ * the read path, alongside each attendee's `is_self`; nothing when no
746
+ * viewer is known. Source projections never store it.
747
+ */
748
+ viewerCan: ViewerCapabilities;
749
+ /**
750
+ * Event visibility.
751
+ */
752
+ visibility: EventVisibility;
753
+ };
754
+ /**
755
+ * The content one provider copy of an event carries.
756
+ *
757
+ * Google keeps these fields per calendar copy: a shared calendar's copy of a
758
+ * member's event can have its own title, type, reminders, and access role.
759
+ * The entity holds its canonical source's values. Every other copy's values
760
+ * are read from here so a client can show the copy that belongs to the
761
+ * calendar being viewed.
762
+ */
763
+ export type CalendarEventSourceContent = {
764
+ /**
765
+ * Calendar this copy lives on.
766
+ */
767
+ calendarId: string;
768
+ /**
769
+ * Provider-reported creator email.
770
+ */
771
+ creatorEmail?: string | null;
772
+ /**
773
+ * Provider-reported creator display name.
774
+ */
775
+ creatorName?: string | null;
776
+ /**
777
+ * Optional event body.
778
+ */
779
+ description?: string | null;
780
+ /**
781
+ * Provider event type.
782
+ */
783
+ eventType: EventType;
784
+ /**
785
+ * Whether the calendar's access role prohibits editing this copy.
786
+ */
787
+ isReadOnly: boolean;
788
+ /**
789
+ * Optional physical or virtual location label.
790
+ */
791
+ location?: string | null;
792
+ /**
793
+ * Reminder configuration of this copy.
794
+ */
795
+ reminders: EventReminders;
796
+ /**
797
+ * Display title.
798
+ */
799
+ title: string;
800
+ /**
801
+ * Availability behavior.
802
+ */
803
+ transparency: EventTransparency;
804
+ /**
805
+ * Event visibility.
806
+ */
807
+ visibility: EventVisibility;
808
+ };
809
+ /**
810
+ * Display snapshot of one meaningful VEVENT, owned by the email domain.
811
+ */
812
+ export type CalendarInvitation = {
813
+ /**
814
+ * Historical attendee identities and participation metadata.
815
+ */
816
+ attendees: Array<InvitationParticipant>;
817
+ /**
818
+ * Reply or counter-proposal comment.
819
+ */
820
+ comment?: string | null;
821
+ /**
822
+ * Validated HTTP(S) conferencing URL; never fetched during rendering.
823
+ */
824
+ conference_url?: string | null;
825
+ /**
826
+ * Plaintext description, retaining passwords and dial-in instructions.
827
+ */
828
+ description?: string | null;
829
+ /**
830
+ * Scheduling timestamp in its original spelling.
831
+ */
832
+ dtstamp?: string | null;
833
+ end?: null | InvitationDateTime;
834
+ /**
835
+ * Content-derived component identity, stable across repeated extraction.
836
+ */
837
+ id: string;
838
+ /**
839
+ * Last modification timestamp in its original spelling.
840
+ */
841
+ last_modified?: string | null;
842
+ /**
843
+ * Plaintext event location.
844
+ */
845
+ location?: string | null;
846
+ /**
847
+ * Original scheduling method.
848
+ */
849
+ method: InvitationMethod;
850
+ organizer?: null | InvitationParticipant;
851
+ /**
852
+ * Raw `RRULE`, `RDATE` and `EXDATE` lines, empty for a single event.
853
+ * `None` on snapshots saved before recurrence was recorded, where a
854
+ * series cannot be told apart from a single event.
855
+ */
856
+ recurrence?: Array<string> | null;
857
+ recurrence_id?: null | InvitationDateTime;
858
+ /**
859
+ * Original recurrence identifier spelling and parameters.
860
+ */
861
+ recurrence_id_raw?: string | null;
862
+ /**
863
+ * Scheduling revision, distinct from delivery order.
864
+ */
865
+ sequence: number;
866
+ start?: null | InvitationDateTime;
867
+ /**
868
+ * Original event status.
869
+ */
870
+ status?: string | null;
871
+ /**
872
+ * Event summary.
873
+ */
874
+ title?: string | null;
875
+ /**
876
+ * iCalendar UID; never a Google provider event ID.
877
+ */
878
+ uid: string;
879
+ };
880
+ /**
881
+ * HTTP error body returned by calendar mutation endpoints.
882
+ */
883
+ export type CalendarMutationApiError = {
884
+ /**
885
+ * Machine-readable failure category.
886
+ */
887
+ code: CalendarMutationErrorCode;
888
+ /**
889
+ * Human-readable failure description.
890
+ */
891
+ message: string;
892
+ };
893
+ /**
894
+ * Machine-readable failure category for calendar mutations.
895
+ */
896
+ export type CalendarMutationErrorCode = 'not_found' | 'occurrence_not_found' | 'read_only' | 'no_writable_calendar' | 'not_attendee' | 'not_organizer' | 'guests_cannot_invite' | 'guest_list_hidden' | 'guests_cannot_modify' | 'already_on_calendar' | 'join_request_open' | 'copy_refused' | 'snapshot' | 'invalid_input' | 'reauth_required' | 'provider_rejected' | 'retryable' | 'persist_failed' | 'macro_call_failed' | 'copy_choice_required' | 'confirmation_required';
897
+ /**
898
+ * A materialized recurrence instance optimized for range queries.
899
+ */
900
+ export type CalendarOccurrence = {
901
+ /**
902
+ * Owning event entity.
903
+ */
904
+ eventId: string;
905
+ /**
906
+ * Whether the instance was cancelled.
907
+ */
908
+ isCancelled: boolean;
909
+ /**
910
+ * Stable key within the event.
911
+ */
912
+ occurrenceKey: string;
913
+ /**
914
+ * Provider recurrence identifier, when applicable.
915
+ */
916
+ recurrenceId?: string | null;
917
+ /**
918
+ * Instance time.
919
+ */
920
+ time: EventTime;
921
+ };
922
+ export type CancelBackfillParams = {
923
+ job_id: string;
924
+ };
925
+ /**
926
+ * The conferencing system backing an event's join URL.
927
+ *
928
+ * Calendars can create Google Meet or Microsoft Teams according to their
929
+ * capabilities. Imported third-party conferences are labeled separately.
930
+ * Omitting a conference change preserves the current conference; explicit
931
+ * changes still require provider and calendar capability validation.
932
+ */
933
+ export type ConferenceProvider = 'microsoft_teams' | 'google_meet' | 'other';
934
+ export type Contact = {
935
+ email_address?: string | null;
936
+ id: string;
937
+ link_id: string;
938
+ name?: string | null;
939
+ original_photo_url?: string | null;
940
+ sfs_photo_url?: string | null;
941
+ };
942
+ export type ContactInfo = {
943
+ email: string;
944
+ name?: string | null;
945
+ photo_url?: string | null;
946
+ };
947
+ export type ContactInfoLegacy = {
948
+ email: string;
949
+ email_address: string;
950
+ name?: string | null;
951
+ photo_url?: string | null;
952
+ };
953
+ export type ContactInfoWithInteraction = ContactInfoLegacy & {
954
+ last_interaction: string;
955
+ };
956
+ /**
957
+ * Request body adding a shared event to the requester's calendar.
958
+ */
959
+ export type CopyCalendarEventRequest = {
960
+ /**
961
+ * Google calendar to add the copy to; defaults to the requester's
962
+ * primary inbox's primary calendar.
963
+ */
964
+ calendarId?: string | null;
965
+ };
966
+ /**
967
+ * Request body for creating a draft.
968
+ */
969
+ export type CreateDraftRequest = {
970
+ /**
971
+ * The draft content.
972
+ */
973
+ draft: ApiDraftInput;
974
+ /**
975
+ * Scheduled send time.
976
+ */
977
+ send_time?: string | null;
978
+ };
979
+ /**
980
+ * Response body for creating a draft.
981
+ */
982
+ export type CreateDraftResponse = {
983
+ /**
984
+ * The created draft.
985
+ */
986
+ draft: ApiDraftOutput;
987
+ };
988
+ export type CreateLabelRequest = {
989
+ label_name: string;
990
+ };
991
+ /**
992
+ * The response returned from the create label endpoint
993
+ */
994
+ export type CreateLabelResponse = {
995
+ /**
996
+ * Local label. Pending provider creation is reported by settings operations.
997
+ */
998
+ label: Label;
999
+ };
1000
+ export type EmlFile = Blob | File;
1001
+ /**
1002
+ * Empty response is required due to custom fetch forcing `response.json()`
1003
+ */
1004
+ export type EmptyResponse = {
1005
+ [key: string]: unknown;
1006
+ };
1007
+ /**
1008
+ * A plain old json error response for use with axum.
1009
+ * yup, thats it.
1010
+ */
1011
+ export type ErrorResponse = {
1012
+ /**
1013
+ * Message to explain failure
1014
+ */
1015
+ message: string;
1016
+ };
1017
+ /**
1018
+ * One reminder: how it alerts and how many minutes before the event start
1019
+ * (before midnight in the calendar's zone for all-day events) it fires.
1020
+ */
1021
+ export type EventReminderOverride = {
1022
+ /**
1023
+ * Provider method, stored verbatim; only `popup` fires Macro
1024
+ * notifications.
1025
+ */
1026
+ method: string;
1027
+ /**
1028
+ * Minutes before the event start.
1029
+ */
1030
+ minutes: number;
1031
+ };
1032
+ /**
1033
+ * Per-user reminder configuration for an event, mirroring Google's model:
1034
+ * either the calendar's default reminders apply, or the explicit overrides
1035
+ * replace them entirely.
1036
+ */
1037
+ export type EventReminders = {
1038
+ /**
1039
+ * Explicit reminders replacing the defaults when `use_default` is off.
1040
+ */
1041
+ overrides?: Array<EventReminderOverride>;
1042
+ /**
1043
+ * Whether the calendar's default reminders apply.
1044
+ */
1045
+ useDefault: boolean;
1046
+ };
1047
+ /**
1048
+ * Canonical event status.
1049
+ */
1050
+ export type EventStatus = 'confirmed' | 'tentative' | 'cancelled';
1051
+ /**
1052
+ * The mutually exclusive time shape of a calendar event.
1053
+ *
1054
+ * Fields are renamed per variant rather than with `rename_all_fields`
1055
+ * because utoipa only honors variant-level serde renames when it
1056
+ * derives the OpenAPI schema.
1057
+ */
1058
+ export type EventTime = {
1059
+ /**
1060
+ * Exclusive end instant; equal to the start for an imported point event.
1061
+ */
1062
+ endsAt: string;
1063
+ kind: 'timed';
1064
+ /**
1065
+ * Inclusive start instant.
1066
+ */
1067
+ startsAt: string;
1068
+ /**
1069
+ * Original IANA time-zone identifier, when supplied.
1070
+ */
1071
+ timeZone?: string | null;
1072
+ } | {
1073
+ /**
1074
+ * Exclusive local end date.
1075
+ */
1076
+ endDate: string;
1077
+ kind: 'allDay';
1078
+ /**
1079
+ * Inclusive local start date.
1080
+ */
1081
+ startDate: string;
1082
+ };
1083
+ /**
1084
+ * Whether an event blocks availability.
1085
+ */
1086
+ export type EventTransparency = 'opaque' | 'transparent';
1087
+ /**
1088
+ * Google's event type: ordinary meetings versus the status-style entries
1089
+ * (working location, out of office, focus time, birthdays) Google renders
1090
+ * and notifies differently. Immutable at the provider after creation.
1091
+ */
1092
+ export type EventType = 'default' | 'out_of_office' | 'focus_time' | 'working_location' | 'birthday' | 'from_gmail';
1093
+ /**
1094
+ * Visibility of event details.
1095
+ */
1096
+ export type EventVisibility = 'default' | 'public' | 'private' | 'confidential';
1097
+ /**
1098
+ * A refused or failed forward.
1099
+ */
1100
+ export type ForwardCalendarEventError = {
1101
+ /**
1102
+ * What went wrong.
1103
+ */
1104
+ code: ForwardCalendarEventErrorCode;
1105
+ /**
1106
+ * A message fit to show the user.
1107
+ */
1108
+ message: string;
1109
+ };
1110
+ /**
1111
+ * Why a forward was not sent.
1112
+ */
1113
+ export type ForwardCalendarEventErrorCode = 'not_found' | 'invalid_recipients' | 'inbox_unavailable' | 'send_failed' | 'confirmation_required';
1114
+ /**
1115
+ * One person a forwarded invitation goes to.
1116
+ */
1117
+ export type ForwardCalendarEventRecipient = {
1118
+ /**
1119
+ * Their email address.
1120
+ */
1121
+ email: string;
1122
+ /**
1123
+ * Their display name.
1124
+ */
1125
+ name?: string | null;
1126
+ };
1127
+ /**
1128
+ * Who a forwarded invitation goes to, and what its email says.
1129
+ */
1130
+ export type ForwardCalendarEventRequest = {
1131
+ /**
1132
+ * A plain-text summary of the event the email opens with; the title
1133
+ * when absent. The email ends with a note saying what the recipient
1134
+ * can do with the forward.
1135
+ */
1136
+ bodyText?: string | null;
1137
+ /**
1138
+ * The people it goes to, at most 50.
1139
+ */
1140
+ to: Array<ForwardCalendarEventRecipient>;
1141
+ };
1142
+ /**
1143
+ * The email the forward queued.
1144
+ */
1145
+ export type ForwardCalendarEventResponse = {
1146
+ /**
1147
+ * The sent message.
1148
+ */
1149
+ messageId: string;
1150
+ /**
1151
+ * Its thread.
1152
+ */
1153
+ threadId: string;
1154
+ };
1155
+ /**
1156
+ * The response returned from the get backfill job endpoint
1157
+ */
1158
+ export type GetActiveBackfillJobResponse = {
1159
+ job: BackfillJob;
1160
+ };
1161
+ /**
1162
+ * The response returned from the get attachment endpoint
1163
+ */
1164
+ export type GetAttachmentDocumentIdResponse = {
1165
+ attachment_id: string;
1166
+ document_id: string;
1167
+ };
1168
+ /**
1169
+ * The response returned from the get attachment endpoint
1170
+ */
1171
+ export type GetAttachmentResponse = {
1172
+ attachment: Attachment;
1173
+ };
1174
+ /**
1175
+ * The response returned from the get backfill job endpoint
1176
+ */
1177
+ export type GetBackfillJobResponse = {
1178
+ job: BackfillJob;
1179
+ };
1180
+ /**
1181
+ * Parameters for getting thread previews with cursor-based pagination.
1182
+ */
1183
+ export type GetPreviewsCursorParams = {
1184
+ /**
1185
+ * Limit for pagination. Default is 20. Max is 500.
1186
+ */
1187
+ limit?: number | null;
1188
+ sort_method?: null | ApiSortMethod;
1189
+ };
1190
+ export type GetScheduledResponse = {
1191
+ messages: Array<Message>;
1192
+ };
1193
+ /**
1194
+ * Response body for the get-thread endpoint.
1195
+ */
1196
+ export type GetThreadResponse = {
1197
+ thread: ApiThread;
1198
+ };
1199
+ /**
1200
+ * The switches an organizer sets on an event to bound what its guests may
1201
+ * do. Google omits a switch from the payload while it holds its default.
1202
+ */
1203
+ export type GuestPolicy = {
1204
+ /**
1205
+ * Whether guests may invite others.
1206
+ */
1207
+ canInviteOthers: boolean;
1208
+ /**
1209
+ * Whether guests may change the event, including its guest list.
1210
+ */
1211
+ canModify: boolean;
1212
+ /**
1213
+ * Whether guests may see the guest list.
1214
+ */
1215
+ canSeeOtherGuests: boolean;
1216
+ };
1217
+ /**
1218
+ * Structured 400 body carrying a machine-readable code. Clients branch on
1219
+ * `code` instead of parsing the human message.
1220
+ */
1221
+ export type InitErrorCodeResponse = {
1222
+ /**
1223
+ * Stable machine-readable error code.
1224
+ */
1225
+ code: string;
1226
+ /**
1227
+ * Human-readable explanation.
1228
+ */
1229
+ message: string;
1230
+ };
1231
+ export type InitResponse = {
1232
+ /**
1233
+ * Present when init enqueued a backfill job. Absent for cross-user delegation,
1234
+ * where the child link's backfill already ran under its own macro_id; present for
1235
+ * the self-link bootstrap, where a fresh link is provisioned and backfilled.
1236
+ */
1237
+ backfill_job_id?: string | null;
1238
+ /**
1239
+ * The email_links row id for the now-accessible inbox. For cross-user delegation
1240
+ * this is the *existing* child link the caller now delegates over; for the
1241
+ * self-link bootstrap and the data-source path it's a freshly upserted row.
1242
+ */
1243
+ link_id: string;
1244
+ };
1245
+ /**
1246
+ * Preserve date-only and unresolved times without manufacturing UTC instants.
1247
+ */
1248
+ export type InvitationDateTime = {
1249
+ kind: 'date';
1250
+ /**
1251
+ * ISO calendar date.
1252
+ */
1253
+ value: string;
1254
+ } | {
1255
+ kind: 'zoned';
1256
+ /**
1257
+ * IANA zone of the original TZID, or UTC.
1258
+ */
1259
+ time_zone: string;
1260
+ /**
1261
+ * RFC3339 instant.
1262
+ */
1263
+ value: string;
1264
+ } | {
1265
+ kind: 'unresolved';
1266
+ /**
1267
+ * Original TZID if present.
1268
+ */
1269
+ time_zone?: string | null;
1270
+ /**
1271
+ * ISO local wall time, without an offset.
1272
+ */
1273
+ value: string;
1274
+ };
1275
+ /**
1276
+ * Original scheduling method, including methods unsupported for actions.
1277
+ */
1278
+ export type InvitationMethod = 'request' | 'reply' | 'cancel' | 'counter' | 'publish' | 'unknown';
1279
+ /**
1280
+ * Scheduling participant; saved responses are historical, not current RSVP.
1281
+ */
1282
+ export type InvitationParticipant = {
1283
+ /**
1284
+ * Participant calendar address.
1285
+ */
1286
+ email: string;
1287
+ /**
1288
+ * Sender-supplied display name.
1289
+ */
1290
+ name?: string | null;
1291
+ /**
1292
+ * Original PARTSTAT, retaining extensions.
1293
+ */
1294
+ participation_status?: string | null;
1295
+ };
1296
+ /**
1297
+ * Refreshable result, distinct from the immutable email contents.
1298
+ */
1299
+ export type InvitationResolution = {
1300
+ kind: 'disconnected';
1301
+ } | {
1302
+ kind: 'still_syncing';
1303
+ } | {
1304
+ kind: 'cancelled';
1305
+ } | {
1306
+ kind: 'unavailable';
1307
+ } | {
1308
+ kind: 'no_match';
1309
+ } | {
1310
+ kind: 'ambiguous';
1311
+ } | {
1312
+ /**
1313
+ * Whether the conference link belongs to the reconciled scheduling target.
1314
+ */
1315
+ can_join: boolean;
1316
+ /**
1317
+ * Whether a response is currently allowed.
1318
+ */
1319
+ can_respond: boolean;
1320
+ /**
1321
+ * Current occurrence-specific content.
1322
+ */
1323
+ event: CalendarEvent;
1324
+ /**
1325
+ * Whether the provider projection trails the email revision.
1326
+ */
1327
+ is_stale: boolean;
1328
+ kind: 'resolved';
1329
+ /**
1330
+ * Original occurrence identity and current time.
1331
+ */
1332
+ occurrence: CalendarOccurrence;
1333
+ /**
1334
+ * Connected address that would respond.
1335
+ */
1336
+ responding_email: string;
1337
+ };
1338
+ export type Label = {
1339
+ created_at: string;
1340
+ id?: string | null;
1341
+ label_list_visibility?: null | LabelListVisibility;
1342
+ link_id: string;
1343
+ message_list_visibility?: null | MessageListVisibility;
1344
+ name?: string | null;
1345
+ provider_label_id: string;
1346
+ type_?: null | LabelType;
1347
+ };
1348
+ export type LabelInfo = {
1349
+ name: string;
1350
+ provider_id: string;
1351
+ };
1352
+ export type LabelListVisibility = 'LabelShow' | 'LabelShowIfUnread' | 'LabelHide';
1353
+ export type LabelType = 'System' | 'User';
1354
+ export type Link = {
1355
+ /**
1356
+ * Whether the user turned calendar off for this inbox, which also removed
1357
+ * its calendar data. `needs_calendar_permission` is true either way, so
1358
+ * this is what separates "never granted" from "deliberately off" —
1359
+ * unprompted calendar nags must stay quiet for the latter.
1360
+ */
1361
+ calendar_disabled: boolean;
1362
+ created_at: string;
1363
+ email_address: string;
1364
+ fusionauth_user_id: string;
1365
+ /**
1366
+ * Whether Rox holds calendar data for this inbox. Drives the turn-off
1367
+ * control on its own, so removing that data never depends on the recorded
1368
+ * scopes still matching the set Rox requests today — a set that changes
1369
+ * as the integration narrows, stranding data behind a capability check
1370
+ * that no longer recognizes an older grant.
1371
+ */
1372
+ has_calendar_data: boolean;
1373
+ id: string;
1374
+ is_primary: boolean;
1375
+ is_sync_active: boolean;
1376
+ macro_id: string;
1377
+ /**
1378
+ * Whether the link's Google grant is missing the calendar scope. True for
1379
+ * inboxes connected before the calendar capability existed (and for
1380
+ * grants where the user declined it); drives the per-inbox calendar
1381
+ * upgrade prompt. Re-running the connect flow records the new grant.
1382
+ */
1383
+ needs_calendar_permission: boolean;
1384
+ /**
1385
+ * Whether the link's Google grant needs to be reconnected. Drives the
1386
+ * per-inbox reconnect prompt independently of the sync-status badge.
1387
+ */
1388
+ needs_reauth: boolean;
1389
+ /**
1390
+ * The inbox's own profile photo (its self-contact's SFS photo), if synced.
1391
+ */
1392
+ photo_url?: string | null;
1393
+ provider: UserProvider;
1394
+ settings: Settings;
1395
+ sync_status: SyncStatus;
1396
+ updated_at: string;
1397
+ };
1398
+ /**
1399
+ * The response returned from the list backfill jobs endpoint
1400
+ */
1401
+ export type ListBackfillJobsResponse = {
1402
+ jobs: Array<BackfillJob>;
1403
+ };
1404
+ /**
1405
+ * Response containing list of blocked email addresses.
1406
+ */
1407
+ export type ListBlockedResponse = {
1408
+ /**
1409
+ * List of email addresses that are currently blocked.
1410
+ */
1411
+ blocked_emails: Array<string>;
1412
+ };
1413
+ export type ListContactsResponse = {
1414
+ /**
1415
+ * the thread, with messages inside
1416
+ */
1417
+ contacts: {
1418
+ [key: string]: Array<ContactInfoWithInteraction>;
1419
+ };
1420
+ };
1421
+ /**
1422
+ * Response body for listing email filters.
1423
+ */
1424
+ export type ListEmailFiltersResponse = {
1425
+ filters: Array<ApiEmailFilter>;
1426
+ };
1427
+ /**
1428
+ * Response body for listing labels.
1429
+ */
1430
+ export type ListLabelsResponse = {
1431
+ labels: Array<ApiLabel>;
1432
+ };
1433
+ /**
1434
+ * The response returned from the list links endpoint
1435
+ */
1436
+ export type ListLinksResponse = {
1437
+ /**
1438
+ * the thread, with messages inside
1439
+ */
1440
+ links: Array<Link>;
1441
+ };
1442
+ /**
1443
+ * Desired organization state. Categories never stand in for folders or flags.
1444
+ */
1445
+ export type MailboxAction = {
1446
+ kind: 'read';
1447
+ /**
1448
+ * Mark correspondence read or unread.
1449
+ */
1450
+ value: boolean;
1451
+ } | {
1452
+ kind: 'flagged';
1453
+ /**
1454
+ * Set the follow-up star.
1455
+ */
1456
+ value: boolean;
1457
+ } | {
1458
+ kind: 'archived';
1459
+ /**
1460
+ * Archive inbox messages, or restore received correspondence to the inbox.
1461
+ */
1462
+ value: boolean;
1463
+ } | {
1464
+ kind: 'trashed';
1465
+ /**
1466
+ * Move to recoverable trash, or restore correspondence to Inbox (drafts to Drafts).
1467
+ */
1468
+ value: boolean;
1469
+ } | {
1470
+ kind: 'junk';
1471
+ /**
1472
+ * Move to junk, or restore to the inbox.
1473
+ */
1474
+ value: boolean;
1475
+ } | {
1476
+ kind: 'category';
1477
+ /**
1478
+ * Add/remove a category while preserving other provider assignments.
1479
+ */
1480
+ value: {
1481
+ name: string;
1482
+ present: boolean;
1483
+ };
1484
+ };
1485
+ /**
1486
+ * Durable outcome of an accepted organization action.
1487
+ */
1488
+ export type MailboxOperation = {
1489
+ action: MailboxAction;
1490
+ id: string;
1491
+ state: MailboxOperationState;
1492
+ updated_at: string;
1493
+ };
1494
+ export type MailboxOperationState = 'pending' | 'applied' | 'failed' | 'cancelled';
1495
+ export type MailboxSettingsChange = 'create_label' | 'delete_label' | 'sender_block';
1496
+ /**
1497
+ * An accepted inbox configuration change awaiting provider confirmation.
1498
+ */
1499
+ export type MailboxSettingsOperation = {
1500
+ enabled: boolean;
1501
+ id: string;
1502
+ kind: MailboxSettingsChange;
1503
+ needs_attention: boolean;
1504
+ resource: string;
1505
+ };
1506
+ export type Message = {
1507
+ attachments: Array<Attachment>;
1508
+ /**
1509
+ * Uploaded file attachments for the message, if it is a draft
1510
+ */
1511
+ attachments_draft: Array<AttachmentDraft>;
1512
+ /**
1513
+ * Forwarded attachments from original messages, if it is a draft
1514
+ */
1515
+ attachments_forwarded: Array<AttachmentForwarded>;
1516
+ bcc: Array<ContactInfo>;
1517
+ body_html_sanitized?: string | null;
1518
+ body_macro?: string | null;
1519
+ body_text?: string | null;
1520
+ cc: Array<ContactInfo>;
1521
+ created_at: string;
1522
+ db_id: string;
1523
+ from?: null | ContactInfo;
1524
+ /**
1525
+ * The globally unique Message-ID header value created by the sender to uniquely identify this email
1526
+ * Used for threading across all providers (In-Reply-To header, References header)
1527
+ */
1528
+ global_id?: string | null;
1529
+ has_attachments: boolean;
1530
+ headers_json?: null | Value;
1531
+ internal_date_ts?: string | null;
1532
+ is_draft: boolean;
1533
+ is_read: boolean;
1534
+ is_sent: boolean;
1535
+ is_starred: boolean;
1536
+ labels: Array<Label>;
1537
+ link_id: string;
1538
+ provider_history_id?: string | null;
1539
+ provider_id?: string | null;
1540
+ provider_thread_id?: string | null;
1541
+ replying_to_id?: string | null;
1542
+ scheduled_send_time?: string | null;
1543
+ sent_at?: string | null;
1544
+ size_estimate?: number | null;
1545
+ snippet?: string | null;
1546
+ subject?: string | null;
1547
+ thread_db_id: string;
1548
+ to: Array<ContactInfo>;
1549
+ updated_at: string;
1550
+ };
1551
+ export type MessageListVisibility = 'Show' | 'Hide';
1552
+ /**
1553
+ * Authorized polling response. Gmail has no asynchronous draft operation.
1554
+ */
1555
+ export type MessageOperationResponse = {
1556
+ operation?: null | ApiMessageOperation;
1557
+ };
1558
+ /**
1559
+ * Open state of one tracked, sent message.
1560
+ */
1561
+ export type MessageReadReceipt = {
1562
+ /**
1563
+ * First counted fetch.
1564
+ */
1565
+ first_opened_at?: string | null;
1566
+ /**
1567
+ * Latest counted fetch.
1568
+ */
1569
+ last_opened_at?: string | null;
1570
+ /**
1571
+ * The tracked message.
1572
+ */
1573
+ message_id: string;
1574
+ /**
1575
+ * Counted pixel fetches.
1576
+ */
1577
+ open_count: number;
1578
+ };
1579
+ export type ParsedMessage = {
1580
+ bcc: Array<ContactInfo>;
1581
+ body_parsed?: string | null;
1582
+ cc: Array<ContactInfo>;
1583
+ db_id: string;
1584
+ /**
1585
+ * Draft edit generation captured with this message snapshot.
1586
+ */
1587
+ draft_generation?: number;
1588
+ from?: null | ContactInfo;
1589
+ internal_date_ts?: string | null;
1590
+ labels: Array<LabelInfo>;
1591
+ link_id: string;
1592
+ subject?: string | null;
1593
+ thread_db_id: string;
1594
+ to: Array<ContactInfo>;
1595
+ };
1596
+ export type PatchSettingsRequest = {
1597
+ settings: Settings;
1598
+ };
1599
+ export type PatchSettingsResponse = {
1600
+ settings: Settings;
1601
+ };
1602
+ /**
1603
+ * View type. Supported values include standard labels and a custom user label user:<label>
1604
+ */
1605
+ export type PreviewView = 'inbox' | 'sent' | 'drafts' | 'starred' | 'all' | 'spam' | 'trash' | 'important' | 'other' | string;
1606
+ export type PreviewViewStandardLabel = 'inbox' | 'sent' | 'drafts' | 'starred' | 'all' | 'spam' | 'trash' | 'important' | 'other';
1607
+ /**
1608
+ * Payload for the `refresh_email` connection gateway event: identifies the
1609
+ * inbox that changed and the kind of change.
1610
+ */
1611
+ export type RefreshEmailEvent = {
1612
+ event: 'backfill';
1613
+ link_id: string;
1614
+ status: BackfillStatus;
1615
+ } | {
1616
+ event: 'upsert_message';
1617
+ link_id: string;
1618
+ } | {
1619
+ event: 'update_labels';
1620
+ link_id: string;
1621
+ } | {
1622
+ event: 'delete_message';
1623
+ link_id: string;
1624
+ } | {
1625
+ event: 'link_removed';
1626
+ link_id: string;
1627
+ } | {
1628
+ event: 'photo_synced';
1629
+ link_id: string;
1630
+ } | {
1631
+ completed_threads: number;
1632
+ event: 'backfill_progress';
1633
+ link_id: string;
1634
+ status: BackfillStatus;
1635
+ total_threads: number;
1636
+ } | {
1637
+ event: 'focus_updated';
1638
+ link_id: string;
1639
+ traceparent?: string | null;
1640
+ };
1641
+ /**
1642
+ * Stale versions fail without altering the current operation.
1643
+ */
1644
+ export type ResolveMessageOperationRequest = {
1645
+ accept_duplicate_risk?: boolean;
1646
+ action: ApiMessageResolutionAction;
1647
+ remote_version?: string | null;
1648
+ revision: string;
1649
+ };
1650
+ /**
1651
+ * The response returned from the resync endpoint.
1652
+ */
1653
+ export type ResyncResponse = {
1654
+ /**
1655
+ * True when a backfill was already running and this call was a no-op.
1656
+ */
1657
+ already_in_progress: boolean;
1658
+ /**
1659
+ * Opaque ID of the backfill job or provider sync stream driving the resync.
1660
+ * the one already in progress.
1661
+ */
1662
+ backfill_job_id: string;
1663
+ };
1664
+ /**
1665
+ * The user-visible delivery state of an unsent scheduled message.
1666
+ */
1667
+ export type ScheduledSendStatus = 'pending' | 'sending' | 'failed' | 'unconfirmed';
1668
+ /**
1669
+ * Request body for sending a message (backward-compatible with `{ message: MessageToSend }`).
1670
+ */
1671
+ export type SendMessageRequest = {
1672
+ /**
1673
+ * The message content.
1674
+ */
1675
+ message: ApiDraftInput;
1676
+ };
1677
+ /**
1678
+ * Response body for sending a message.
1679
+ */
1680
+ export type SendMessageResponse = {
1681
+ /**
1682
+ * The created message.
1683
+ */
1684
+ message: ApiDraftOutput;
1685
+ };
1686
+ export type Settings = {
1687
+ /**
1688
+ * Whether messages sent from this inbox carry an open-tracking pixel.
1689
+ */
1690
+ read_receipts_enabled?: boolean | null;
1691
+ /**
1692
+ * The user's email signature content (HTML). On a patch, omit or send
1693
+ * `null` to leave unchanged (both deserialize to `None`); pass an empty
1694
+ * string to clear it. The column cannot be set to SQL NULL via patch.
1695
+ */
1696
+ signature?: string | null;
1697
+ signature_on_replies_forwards?: boolean | null;
1698
+ };
1699
+ /**
1700
+ * Returned with a `409 Conflict` when a connect targets an external mailbox another
1701
+ * macro user has already connected. The client surfaces a confirmation; on confirm it
1702
+ * retries `/email/init` with `force_share=true` to promote the mailbox to a shared inbox.
1703
+ */
1704
+ export type SharedInboxConflictResponse = {
1705
+ /**
1706
+ * The mailbox address that is already connected.
1707
+ */
1708
+ email_address: string;
1709
+ /**
1710
+ * The existing link that would be shared if the caller confirms.
1711
+ */
1712
+ existing_link_id: string;
1713
+ /**
1714
+ * The email of the macro user who first connected the mailbox.
1715
+ */
1716
+ existing_owner_email: string;
1717
+ };
1718
+ /**
1719
+ * Coarse sync state for an inbox, used to render a one-line hint in the
1720
+ * multi-inbox settings list. Derived from the link's `is_sync_active` flag, its
1721
+ * reauth health, and its most recent backfill job.
1722
+ */
1723
+ export type SyncStatus = 'SYNCING' | 'UP_TO_DATE' | 'ERROR' | 'NEEDS_REAUTH' | 'INACTIVE';
1724
+ export type Thread = {
1725
+ created_at: string;
1726
+ db_id: string;
1727
+ inbox_visible: boolean;
1728
+ is_read: boolean;
1729
+ latest_inbound_message_ts?: string | null;
1730
+ latest_non_spam_message_ts?: string | null;
1731
+ latest_outbound_message_ts?: string | null;
1732
+ link_id: string;
1733
+ messages: Array<Message>;
1734
+ provider_id?: string | null;
1735
+ updated_at: string;
1736
+ };
1737
+ export type ThreadList = {
1738
+ next_page_token?: string | null;
1739
+ threads: Array<ThreadSummary>;
1740
+ };
1741
+ /**
1742
+ * thread summary returned in preview cursor endpoint
1743
+ */
1744
+ export type ThreadPreviewCursor = {
1745
+ attachments: Array<Attachment>;
1746
+ createdAt: string;
1747
+ id: string;
1748
+ inboxVisible: boolean;
1749
+ isDraft: boolean;
1750
+ isImportant: boolean;
1751
+ isRead: boolean;
1752
+ name?: string | null;
1753
+ ownerId: string;
1754
+ participants: Array<Contact>;
1755
+ providerId?: string | null;
1756
+ senderEmail?: string | null;
1757
+ senderName?: string | null;
1758
+ senderPhotoUrl?: string | null;
1759
+ snippet?: string | null;
1760
+ sortTs: string;
1761
+ updatedAt: string;
1762
+ viewedAt?: string | null;
1763
+ };
1764
+ /**
1765
+ * Open state of the caller's tracked, sent messages in one thread.
1766
+ */
1767
+ export type ThreadReadReceipts = {
1768
+ receipts: Array<MessageReadReceipt>;
1769
+ };
1770
+ /**
1771
+ * Semantic mailbox facts, independent of folder/category names.
1772
+ */
1773
+ export type ThreadStateField = 'read' | 'starred' | 'trashed' | 'junk';
1774
+ export type ThreadSummary = {
1775
+ provider_id: string;
1776
+ };
1777
+ /**
1778
+ * Reuse the same operation ID when retrying after a lost response.
1779
+ */
1780
+ export type TransferDraftRequest = {
1781
+ destination_link_id: string;
1782
+ /**
1783
+ * Generation captured with the source draft.
1784
+ */
1785
+ draft_generation?: number;
1786
+ operation_id: string;
1787
+ };
1788
+ /**
1789
+ * A new identity prevents delayed writes from mutating the moved copy.
1790
+ */
1791
+ export type TransferDraftResponse = {
1792
+ attachments: Array<ApiAttachmentDraft>;
1793
+ message_id: string;
1794
+ source_id: string;
1795
+ source_thread_id: string;
1796
+ thread_id: string;
1797
+ };
1798
+ /**
1799
+ * A null result confirms that the move cannot commit, even if its request was delayed.
1800
+ */
1801
+ export type TransferRecoveryResponse = {
1802
+ committed?: null | TransferDraftResponse;
1803
+ };
1804
+ /**
1805
+ * Request to unblock a sender.
1806
+ */
1807
+ export type UnblockSenderRequest = {
1808
+ /**
1809
+ * The email address of the sender to unblock.
1810
+ */
1811
+ email_address: string;
1812
+ };
1813
+ /**
1814
+ * Body returned with a 422 when signature images can't be loaded.
1815
+ */
1816
+ export type UnresolvedSignatureImagesError = {
1817
+ unresolved_image_count: number;
1818
+ };
1819
+ export type UpdateLabelBatchRequest = {
1820
+ label_id: string;
1821
+ message_ids: Array<string>;
1822
+ value: boolean;
1823
+ };
1824
+ export type UpdateLabelBatchResponse = {
1825
+ failed_ids: Array<string>;
1826
+ missing_ids: Array<string>;
1827
+ successful_ids: Array<string>;
1828
+ };
1829
+ /**
1830
+ * Request body for updating a thread's labels.
1831
+ */
1832
+ export type UpdateThreadLabelRequest = {
1833
+ label_id: string;
1834
+ value: boolean;
1835
+ };
1836
+ /**
1837
+ * Response body for updating a thread's labels.
1838
+ */
1839
+ export type UpdateThreadLabelsResponse = {
1840
+ failed_ids: Array<string>;
1841
+ successful_ids: Array<string>;
1842
+ };
1843
+ /**
1844
+ * Request body for updating a thread's project.
1845
+ */
1846
+ export type UpdateThreadProjectRequest = {
1847
+ /**
1848
+ * The project ID to assign to the thread, or null to remove from project.
1849
+ */
1850
+ projectId?: string | null;
1851
+ };
1852
+ /**
1853
+ * Response body for updating a thread's project.
1854
+ */
1855
+ export type UpdateThreadProjectResponse = {
1856
+ /**
1857
+ * The previous project ID of the thread.
1858
+ */
1859
+ oldProjectId?: string | null;
1860
+ };
1861
+ /**
1862
+ * Desired state for every applicable message in an authorized thread.
1863
+ */
1864
+ export type UpdateThreadStateRequest = {
1865
+ field: ThreadStateField;
1866
+ value: boolean;
1867
+ };
1868
+ /**
1869
+ * Request body for creating or updating an email filter.
1870
+ */
1871
+ export type UpsertEmailFilterRequest = {
1872
+ /**
1873
+ * Exact email address to match. Mutually exclusive with `email_domain`.
1874
+ */
1875
+ email_address?: string | null;
1876
+ /**
1877
+ * Email domain to match. Mutually exclusive with `email_address`.
1878
+ */
1879
+ email_domain?: string | null;
1880
+ /**
1881
+ * Whether matching senders should be considered important.
1882
+ */
1883
+ is_important: boolean;
1884
+ };
1885
+ /**
1886
+ * Response body for upsert email filter.
1887
+ */
1888
+ export type UpsertEmailFilterResponse = {
1889
+ filter: ApiEmailFilter;
1890
+ };
1891
+ export type UpsertScheduledRequest = {
1892
+ /**
1893
+ * Per-message signature override; absent uses the inbox's send defaults.
1894
+ */
1895
+ include_signature?: boolean | null;
1896
+ /**
1897
+ * The time to send the message (ISO 8601 format).
1898
+ */
1899
+ send_time: string;
1900
+ /**
1901
+ * The user's own reply approving this send, quoted verbatim. Required
1902
+ * from an agent's program, which is refused without it; ignored for a
1903
+ * person in the app, whose Send Later is their confirmation.
1904
+ */
1905
+ user_confirmation?: string | null;
1906
+ };
1907
+ export type UpsertScheduledResponse = {
1908
+ message_id: string;
1909
+ send_time: string;
1910
+ };
1911
+ export type UserProvider = 'GMAIL' | 'OUTLOOK' | 'ROX';
1912
+ export type Value = unknown;
1913
+ /**
1914
+ * What the viewing requester may do with an event.
1915
+ */
1916
+ export type ViewerCapabilities = {
1917
+ /**
1918
+ * Change the event's details (title, time, description, conference).
1919
+ */
1920
+ editDetails: boolean;
1921
+ /**
1922
+ * Add guests.
1923
+ */
1924
+ inviteGuests: boolean;
1925
+ /**
1926
+ * Act as the event's organizer: replace its whole guest list and manage
1927
+ * its conferencing.
1928
+ */
1929
+ organize: boolean;
1930
+ /**
1931
+ * Remove guests.
1932
+ */
1933
+ removeGuests: boolean;
1934
+ /**
1935
+ * Answer the invitation.
1936
+ */
1937
+ rsvp: boolean;
1938
+ /**
1939
+ * Change the event's guest policy, which only Google calendars have.
1940
+ */
1941
+ setGuestPolicy: boolean;
1942
+ };
1943
+ export type GetAttachmentData = {
1944
+ body?: never;
1945
+ path: {
1946
+ /**
1947
+ * Attachment ID.
1948
+ */
1949
+ id: string;
1950
+ };
1951
+ query?: never;
1952
+ url: '/email/attachments/{id}';
1953
+ };
1954
+ export type GetAttachmentErrors = {
1955
+ 400: ErrorResponse;
1956
+ 401: ErrorResponse;
1957
+ 403: ErrorResponse;
1958
+ 404: ErrorResponse;
1959
+ 409: ErrorResponse;
1960
+ 429: ErrorResponse;
1961
+ 500: ErrorResponse;
1962
+ };
1963
+ export type GetAttachmentError = GetAttachmentErrors[keyof GetAttachmentErrors];
1964
+ export type GetAttachmentResponses = {
1965
+ 200: GetAttachmentResponse;
1966
+ };
1967
+ export type GetAttachmentResponse2 = GetAttachmentResponses[keyof GetAttachmentResponses];
1968
+ export type GetAttachmentDocumentIdData = {
1969
+ body?: never;
1970
+ path: {
1971
+ /**
1972
+ * Attachment ID.
1973
+ */
1974
+ id: string;
1975
+ };
1976
+ query?: never;
1977
+ url: '/email/attachments/{id}/document_id';
1978
+ };
1979
+ export type GetAttachmentDocumentIdErrors = {
1980
+ 400: ErrorResponse;
1981
+ 401: ErrorResponse;
1982
+ 404: ErrorResponse;
1983
+ 500: ErrorResponse;
1984
+ };
1985
+ export type GetAttachmentDocumentIdError = GetAttachmentDocumentIdErrors[keyof GetAttachmentDocumentIdErrors];
1986
+ export type GetAttachmentDocumentIdResponses = {
1987
+ 200: GetAttachmentDocumentIdResponse;
1988
+ };
1989
+ export type GetAttachmentDocumentIdResponse2 = GetAttachmentDocumentIdResponses[keyof GetAttachmentDocumentIdResponses];
1990
+ export type CancelBackfillGmailData = {
1991
+ body: CancelBackfillParams;
1992
+ path?: never;
1993
+ query?: never;
1994
+ url: '/email/backfill/gmail';
1995
+ };
1996
+ export type CancelBackfillGmailErrors = {
1997
+ 404: ErrorResponse;
1998
+ 429: ErrorResponse;
1999
+ 500: ErrorResponse;
2000
+ };
2001
+ export type CancelBackfillGmailError = CancelBackfillGmailErrors[keyof CancelBackfillGmailErrors];
2002
+ export type CancelBackfillGmailResponses = {
2003
+ 201: EmptyResponse;
2004
+ };
2005
+ export type CancelBackfillGmailResponse = CancelBackfillGmailResponses[keyof CancelBackfillGmailResponses];
2006
+ export type ListBackfillGmailData = {
2007
+ body?: never;
2008
+ path?: never;
2009
+ query?: never;
2010
+ url: '/email/backfill/gmail';
2011
+ };
2012
+ export type ListBackfillGmailErrors = {
2013
+ 401: ErrorResponse;
2014
+ 500: ErrorResponse;
2015
+ };
2016
+ export type ListBackfillGmailError = ListBackfillGmailErrors[keyof ListBackfillGmailErrors];
2017
+ export type ListBackfillGmailResponses = {
2018
+ 200: ListBackfillJobsResponse;
2019
+ };
2020
+ export type ListBackfillGmailResponse = ListBackfillGmailResponses[keyof ListBackfillGmailResponses];
2021
+ export type GetBackfillGmailActiveData = {
2022
+ body?: never;
2023
+ path?: never;
2024
+ query?: never;
2025
+ url: '/email/backfill/gmail/active';
2026
+ };
2027
+ export type GetBackfillGmailActiveErrors = {
2028
+ 401: ErrorResponse;
2029
+ 500: ErrorResponse;
2030
+ };
2031
+ export type GetBackfillGmailActiveError = GetBackfillGmailActiveErrors[keyof GetBackfillGmailActiveErrors];
2032
+ export type GetBackfillGmailActiveResponses = {
2033
+ 200: GetActiveBackfillJobResponse;
2034
+ 204: EmptyResponse;
2035
+ };
2036
+ export type GetBackfillGmailActiveResponse = GetBackfillGmailActiveResponses[keyof GetBackfillGmailActiveResponses];
2037
+ export type GetBackfillGmailData = {
2038
+ body?: never;
2039
+ path: {
2040
+ /**
2041
+ * Job ID.
2042
+ */
2043
+ id: string;
2044
+ };
2045
+ query?: never;
2046
+ url: '/email/backfill/gmail/{id}';
2047
+ };
2048
+ export type GetBackfillGmailErrors = {
2049
+ 401: ErrorResponse;
2050
+ 404: ErrorResponse;
2051
+ 500: ErrorResponse;
2052
+ };
2053
+ export type GetBackfillGmailError = GetBackfillGmailErrors[keyof GetBackfillGmailErrors];
2054
+ export type GetBackfillGmailResponses = {
2055
+ 200: GetBackfillJobResponse;
2056
+ };
2057
+ export type GetBackfillGmailResponse = GetBackfillGmailResponses[keyof GetBackfillGmailResponses];
2058
+ export type ForwardCalendarEventData = {
2059
+ body: ForwardCalendarEventRequest;
2060
+ path: {
2061
+ /**
2062
+ * The viewer's copy of the event
2063
+ */
2064
+ event_id: string;
2065
+ };
2066
+ query?: never;
2067
+ url: '/email/calendar-events/{event_id}/forward';
2068
+ };
2069
+ export type ForwardCalendarEventErrors = {
2070
+ /**
2071
+ * No, too many, or invalid recipients
2072
+ */
2073
+ 400: ForwardCalendarEventError;
2074
+ /**
2075
+ * Authentication required
2076
+ */
2077
+ 401: unknown;
2078
+ /**
2079
+ * The inbox holding the copy cannot send for the viewer, or an agent's program asked to forward
2080
+ */
2081
+ 403: ForwardCalendarEventError;
2082
+ /**
2083
+ * No such event on one of the viewer's own inboxes
2084
+ */
2085
+ 404: ForwardCalendarEventError;
2086
+ /**
2087
+ * The email could not be sent
2088
+ */
2089
+ 502: ForwardCalendarEventError;
2090
+ };
2091
+ export type ForwardCalendarEventError2 = ForwardCalendarEventErrors[keyof ForwardCalendarEventErrors];
2092
+ export type ForwardCalendarEventResponses = {
2093
+ /**
2094
+ * The email is queued to send
2095
+ */
2096
+ 202: ForwardCalendarEventResponse;
2097
+ };
2098
+ export type ForwardCalendarEventResponse2 = ForwardCalendarEventResponses[keyof ForwardCalendarEventResponses];
2099
+ export type ListContactsData = {
2100
+ body?: never;
2101
+ path?: never;
2102
+ query?: never;
2103
+ url: '/email/contacts';
2104
+ };
2105
+ export type ListContactsErrors = {
2106
+ 401: ErrorResponse;
2107
+ 500: ErrorResponse;
2108
+ };
2109
+ export type ListContactsError = ListContactsErrors[keyof ListContactsErrors];
2110
+ export type ListContactsResponses = {
2111
+ 200: ListContactsResponse;
2112
+ };
2113
+ export type ListContactsResponse2 = ListContactsResponses[keyof ListContactsResponses];
2114
+ export type BlockSenderData = {
2115
+ body: BlockSenderRequest;
2116
+ path?: never;
2117
+ query?: never;
2118
+ url: '/email/contacts/block';
2119
+ };
2120
+ export type BlockSenderErrors = {
2121
+ 400: ErrorResponse;
2122
+ 401: ErrorResponse;
2123
+ 500: ErrorResponse;
2124
+ };
2125
+ export type BlockSenderError = BlockSenderErrors[keyof BlockSenderErrors];
2126
+ export type BlockSenderResponses = {
2127
+ 200: unknown;
2128
+ };
2129
+ export type ListBlockedSendersData = {
2130
+ body?: never;
2131
+ path?: never;
2132
+ query?: never;
2133
+ url: '/email/contacts/blocked';
2134
+ };
2135
+ export type ListBlockedSendersErrors = {
2136
+ 401: ErrorResponse;
2137
+ 403: ErrorResponse;
2138
+ 404: ErrorResponse;
2139
+ 409: ErrorResponse;
2140
+ 429: ErrorResponse;
2141
+ 500: ErrorResponse;
2142
+ };
2143
+ export type ListBlockedSendersError = ListBlockedSendersErrors[keyof ListBlockedSendersErrors];
2144
+ export type ListBlockedSendersResponses = {
2145
+ 200: ListBlockedResponse;
2146
+ };
2147
+ export type ListBlockedSendersResponse = ListBlockedSendersResponses[keyof ListBlockedSendersResponses];
2148
+ export type UnblockSenderData = {
2149
+ body: UnblockSenderRequest;
2150
+ path?: never;
2151
+ query?: never;
2152
+ url: '/email/contacts/unblock';
2153
+ };
2154
+ export type UnblockSenderErrors = {
2155
+ 400: ErrorResponse;
2156
+ 401: ErrorResponse;
2157
+ 500: ErrorResponse;
2158
+ };
2159
+ export type UnblockSenderError = UnblockSenderErrors[keyof UnblockSenderErrors];
2160
+ export type UnblockSenderResponses = {
2161
+ 204: void;
2162
+ };
2163
+ export type UnblockSenderResponse = UnblockSenderResponses[keyof UnblockSenderResponses];
2164
+ export type RecoverDraftTransferData = {
2165
+ body?: never;
2166
+ path: {
2167
+ id: string;
2168
+ };
2169
+ query?: never;
2170
+ url: '/email/draft-transfers/{id}/recover';
2171
+ };
2172
+ export type RecoverDraftTransferErrors = {
2173
+ 403: unknown;
2174
+ 500: unknown;
2175
+ };
2176
+ export type RecoverDraftTransferResponses = {
2177
+ 200: TransferRecoveryResponse;
2178
+ };
2179
+ export type RecoverDraftTransferResponse = RecoverDraftTransferResponses[keyof RecoverDraftTransferResponses];
2180
+ export type CreateDraftData = {
2181
+ body: CreateDraftRequest;
2182
+ path?: never;
2183
+ query?: never;
2184
+ url: '/email/drafts';
2185
+ };
2186
+ export type CreateDraftErrors = {
2187
+ 400: ErrorResponse;
2188
+ 404: ErrorResponse;
2189
+ 500: ErrorResponse;
2190
+ };
2191
+ export type CreateDraftError = CreateDraftErrors[keyof CreateDraftErrors];
2192
+ export type CreateDraftResponses = {
2193
+ 201: CreateDraftResponse;
2194
+ };
2195
+ export type CreateDraftResponse2 = CreateDraftResponses[keyof CreateDraftResponses];
2196
+ export type GetScheduledMessagesData = {
2197
+ body?: never;
2198
+ path?: never;
2199
+ query?: {
2200
+ /**
2201
+ * The number of scheduled messages to skip.
2202
+ */
2203
+ offset?: number;
2204
+ /**
2205
+ * The maximum number of scheduled messages to return.
2206
+ */
2207
+ limit?: number;
2208
+ };
2209
+ url: '/email/drafts/scheduled';
2210
+ };
2211
+ export type GetScheduledMessagesErrors = {
2212
+ 400: ErrorResponse;
2213
+ 401: ErrorResponse;
2214
+ 500: ErrorResponse;
2215
+ };
2216
+ export type GetScheduledMessagesError = GetScheduledMessagesErrors[keyof GetScheduledMessagesErrors];
2217
+ export type GetScheduledMessagesResponses = {
2218
+ 200: GetScheduledResponse;
2219
+ };
2220
+ export type GetScheduledMessagesResponse = GetScheduledMessagesResponses[keyof GetScheduledMessagesResponses];
2221
+ export type UpsertScheduledMessageData = {
2222
+ body: UpsertScheduledRequest;
2223
+ path: {
2224
+ /**
2225
+ * The ID of the draft message to schedule
2226
+ */
2227
+ id: string;
2228
+ };
2229
+ query?: {
2230
+ /**
2231
+ * Generation from the last loaded draft. Legacy clients use zero.
2232
+ */
2233
+ draft_generation?: number;
2234
+ };
2235
+ url: '/email/drafts/scheduled/{id}';
2236
+ };
2237
+ export type UpsertScheduledMessageErrors = {
2238
+ 400: ErrorResponse;
2239
+ 401: ErrorResponse;
2240
+ 403: ErrorResponse;
2241
+ 404: ErrorResponse;
2242
+ 500: ErrorResponse;
2243
+ };
2244
+ export type UpsertScheduledMessageError = UpsertScheduledMessageErrors[keyof UpsertScheduledMessageErrors];
2245
+ export type UpsertScheduledMessageResponses = {
2246
+ 200: UpsertScheduledResponse;
2247
+ };
2248
+ export type UpsertScheduledMessageResponse = UpsertScheduledMessageResponses[keyof UpsertScheduledMessageResponses];
2249
+ export type DeleteScheduledDraftData = {
2250
+ body?: never;
2251
+ path: {
2252
+ /**
2253
+ * The ID of the draft
2254
+ */
2255
+ message_id: string;
2256
+ };
2257
+ query?: {
2258
+ /**
2259
+ * Generation from the last loaded draft. Legacy clients use zero.
2260
+ */
2261
+ draft_generation?: number;
2262
+ };
2263
+ url: '/email/drafts/scheduled/{message_id}';
2264
+ };
2265
+ export type DeleteScheduledDraftErrors = {
2266
+ 400: ErrorResponse;
2267
+ 401: ErrorResponse;
2268
+ 403: ErrorResponse;
2269
+ 404: ErrorResponse;
2270
+ 500: ErrorResponse;
2271
+ };
2272
+ export type DeleteScheduledDraftError = DeleteScheduledDraftErrors[keyof DeleteScheduledDraftErrors];
2273
+ export type DeleteScheduledDraftResponses = {
2274
+ /**
2275
+ * Scheduled send deleted successfully
2276
+ */
2277
+ 204: void;
2278
+ };
2279
+ export type DeleteScheduledDraftResponse = DeleteScheduledDraftResponses[keyof DeleteScheduledDraftResponses];
2280
+ export type DeleteDraftData = {
2281
+ body?: never;
2282
+ path: {
2283
+ /**
2284
+ * Draft ID.
2285
+ */
2286
+ id: string;
2287
+ };
2288
+ query?: {
2289
+ /**
2290
+ * Generation from the last loaded draft. Legacy clients use zero.
2291
+ */
2292
+ draft_generation?: number;
2293
+ };
2294
+ url: '/email/drafts/{id}';
2295
+ };
2296
+ export type DeleteDraftErrors = {
2297
+ 400: ErrorResponse;
2298
+ 401: ErrorResponse;
2299
+ 404: ErrorResponse;
2300
+ 500: ErrorResponse;
2301
+ };
2302
+ export type DeleteDraftError = DeleteDraftErrors[keyof DeleteDraftErrors];
2303
+ export type DeleteDraftResponses = {
2304
+ 204: EmptyResponse;
2305
+ };
2306
+ export type DeleteDraftResponse = DeleteDraftResponses[keyof DeleteDraftResponses];
2307
+ export type AddDraftAttachmentData = {
2308
+ body: AddDraftAttachmentRequest;
2309
+ path: {
2310
+ /**
2311
+ * The ID of the draft to add the attachment to.
2312
+ */
2313
+ id: string;
2314
+ };
2315
+ query?: {
2316
+ /**
2317
+ * Generation from the last loaded draft. Legacy clients use zero.
2318
+ */
2319
+ draft_generation?: number;
2320
+ };
2321
+ url: '/email/drafts/{id}/attachments';
2322
+ };
2323
+ export type AddDraftAttachmentErrors = {
2324
+ 400: ErrorResponse;
2325
+ 401: ErrorResponse;
2326
+ 404: ErrorResponse;
2327
+ 500: ErrorResponse;
2328
+ };
2329
+ export type AddDraftAttachmentError = AddDraftAttachmentErrors[keyof AddDraftAttachmentErrors];
2330
+ export type AddDraftAttachmentResponses = {
2331
+ 201: AddDraftAttachmentResponse;
2332
+ };
2333
+ export type AddDraftAttachmentResponse2 = AddDraftAttachmentResponses[keyof AddDraftAttachmentResponses];
2334
+ export type RemoveDraftAttachmentData = {
2335
+ body?: never;
2336
+ path: {
2337
+ /**
2338
+ * The ID of the draft to remove the attachment from.
2339
+ */
2340
+ id: string;
2341
+ /**
2342
+ * The ID of the attachment to remove.
2343
+ */
2344
+ attachment_id: string;
2345
+ };
2346
+ query?: {
2347
+ /**
2348
+ * Generation from the last loaded draft. Legacy clients use zero.
2349
+ */
2350
+ draft_generation?: number;
2351
+ };
2352
+ url: '/email/drafts/{id}/attachments/{attachment_id}';
2353
+ };
2354
+ export type RemoveDraftAttachmentErrors = {
2355
+ 400: ErrorResponse;
2356
+ 401: ErrorResponse;
2357
+ 404: ErrorResponse;
2358
+ 500: ErrorResponse;
2359
+ };
2360
+ export type RemoveDraftAttachmentError = RemoveDraftAttachmentErrors[keyof RemoveDraftAttachmentErrors];
2361
+ export type RemoveDraftAttachmentResponses = {
2362
+ 201: EmptyResponse;
2363
+ };
2364
+ export type RemoveDraftAttachmentResponse = RemoveDraftAttachmentResponses[keyof RemoveDraftAttachmentResponses];
2365
+ export type CompleteDraftAttachmentData = {
2366
+ body?: never;
2367
+ path: {
2368
+ id: string;
2369
+ attachment_id: string;
2370
+ };
2371
+ query?: {
2372
+ /**
2373
+ * Generation from the last loaded draft. Legacy clients use zero.
2374
+ */
2375
+ draft_generation?: number;
2376
+ };
2377
+ url: '/email/drafts/{id}/attachments/{attachment_id}/complete';
2378
+ };
2379
+ export type CompleteDraftAttachmentErrors = {
2380
+ 400: unknown;
2381
+ 403: unknown;
2382
+ 404: unknown;
2383
+ 409: unknown;
2384
+ 500: unknown;
2385
+ };
2386
+ export type CompleteDraftAttachmentResponses = {
2387
+ 204: void;
2388
+ };
2389
+ export type CompleteDraftAttachmentResponse = CompleteDraftAttachmentResponses[keyof CompleteDraftAttachmentResponses];
2390
+ export type AddForwardedAttachmentData = {
2391
+ body: AddForwardedAttachmentRequest;
2392
+ path: {
2393
+ /**
2394
+ * The ID of the draft to add the forwarded attachment to.
2395
+ */
2396
+ id: string;
2397
+ };
2398
+ query?: {
2399
+ /**
2400
+ * Generation from the last loaded draft. Legacy clients use zero.
2401
+ */
2402
+ draft_generation?: number;
2403
+ };
2404
+ url: '/email/drafts/{id}/forwarded-attachments';
2405
+ };
2406
+ export type AddForwardedAttachmentErrors = {
2407
+ 404: ErrorResponse;
2408
+ 500: ErrorResponse;
2409
+ };
2410
+ export type AddForwardedAttachmentError = AddForwardedAttachmentErrors[keyof AddForwardedAttachmentErrors];
2411
+ export type AddForwardedAttachmentResponses = {
2412
+ 201: AddForwardedAttachmentResponse;
2413
+ };
2414
+ export type AddForwardedAttachmentResponse2 = AddForwardedAttachmentResponses[keyof AddForwardedAttachmentResponses];
2415
+ export type RemoveForwardedAttachmentData = {
2416
+ body?: never;
2417
+ path: {
2418
+ /**
2419
+ * The ID of the draft to remove the forwarded attachment from.
2420
+ */
2421
+ id: string;
2422
+ /**
2423
+ * The ID of the forwarded attachment to remove.
2424
+ */
2425
+ attachment_id: string;
2426
+ };
2427
+ query?: {
2428
+ /**
2429
+ * Generation from the last loaded draft. Legacy clients use zero.
2430
+ */
2431
+ draft_generation?: number;
2432
+ };
2433
+ url: '/email/drafts/{id}/forwarded-attachments/{attachment_id}';
2434
+ };
2435
+ export type RemoveForwardedAttachmentErrors = {
2436
+ 404: ErrorResponse;
2437
+ 500: ErrorResponse;
2438
+ };
2439
+ export type RemoveForwardedAttachmentError = RemoveForwardedAttachmentErrors[keyof RemoveForwardedAttachmentErrors];
2440
+ export type RemoveForwardedAttachmentResponses = {
2441
+ 204: void;
2442
+ };
2443
+ export type RemoveForwardedAttachmentResponse = RemoveForwardedAttachmentResponses[keyof RemoveForwardedAttachmentResponses];
2444
+ export type MessageOperationStatusData = {
2445
+ body?: never;
2446
+ path: {
2447
+ /**
2448
+ * Message ID
2449
+ */
2450
+ id: string;
2451
+ };
2452
+ query?: never;
2453
+ url: '/email/drafts/{id}/operation';
2454
+ };
2455
+ export type MessageOperationStatusErrors = {
2456
+ 403: ErrorResponse;
2457
+ 404: ErrorResponse;
2458
+ };
2459
+ export type MessageOperationStatusError = MessageOperationStatusErrors[keyof MessageOperationStatusErrors];
2460
+ export type MessageOperationStatusResponses = {
2461
+ 200: MessageOperationResponse;
2462
+ };
2463
+ export type MessageOperationStatusResponse = MessageOperationStatusResponses[keyof MessageOperationStatusResponses];
2464
+ export type ResolveMessageOperationData = {
2465
+ body: ResolveMessageOperationRequest;
2466
+ path: {
2467
+ /**
2468
+ * Message ID
2469
+ */
2470
+ id: string;
2471
+ };
2472
+ query?: never;
2473
+ url: '/email/drafts/{id}/resolve';
2474
+ };
2475
+ export type ResolveMessageOperationErrors = {
2476
+ 400: ErrorResponse;
2477
+ 403: ErrorResponse;
2478
+ 404: ErrorResponse;
2479
+ 409: ErrorResponse;
2480
+ };
2481
+ export type ResolveMessageOperationError = ResolveMessageOperationErrors[keyof ResolveMessageOperationErrors];
2482
+ export type ResolveMessageOperationResponses = {
2483
+ 204: void;
2484
+ };
2485
+ export type ResolveMessageOperationResponse = ResolveMessageOperationResponses[keyof ResolveMessageOperationResponses];
2486
+ export type TransferDraftData = {
2487
+ body: TransferDraftRequest;
2488
+ path: {
2489
+ id: string;
2490
+ };
2491
+ query?: never;
2492
+ url: '/email/drafts/{id}/transfer';
2493
+ };
2494
+ export type TransferDraftErrors = {
2495
+ 403: unknown;
2496
+ 404: unknown;
2497
+ 409: unknown;
2498
+ 500: unknown;
2499
+ };
2500
+ export type TransferDraftResponses = {
2501
+ 200: TransferDraftResponse;
2502
+ };
2503
+ export type TransferDraftResponse2 = TransferDraftResponses[keyof TransferDraftResponses];
2504
+ export type ListEmailFiltersData = {
2505
+ body?: never;
2506
+ path?: never;
2507
+ query?: never;
2508
+ url: '/email/filters';
2509
+ };
2510
+ export type ListEmailFiltersErrors = {
2511
+ 401: ErrorResponse;
2512
+ 500: ErrorResponse;
2513
+ };
2514
+ export type ListEmailFiltersError = ListEmailFiltersErrors[keyof ListEmailFiltersErrors];
2515
+ export type ListEmailFiltersResponses = {
2516
+ 200: ListEmailFiltersResponse;
2517
+ };
2518
+ export type ListEmailFiltersResponse2 = ListEmailFiltersResponses[keyof ListEmailFiltersResponses];
2519
+ export type UpsertEmailFilterData = {
2520
+ body: UpsertEmailFilterRequest;
2521
+ path?: never;
2522
+ query?: never;
2523
+ url: '/email/filters';
2524
+ };
2525
+ export type UpsertEmailFilterErrors = {
2526
+ 400: ErrorResponse;
2527
+ 401: ErrorResponse;
2528
+ 500: ErrorResponse;
2529
+ };
2530
+ export type UpsertEmailFilterError = UpsertEmailFilterErrors[keyof UpsertEmailFilterErrors];
2531
+ export type UpsertEmailFilterResponses = {
2532
+ 200: UpsertEmailFilterResponse;
2533
+ };
2534
+ export type UpsertEmailFilterResponse2 = UpsertEmailFilterResponses[keyof UpsertEmailFilterResponses];
2535
+ export type DeleteEmailFilterData = {
2536
+ body?: never;
2537
+ path: {
2538
+ /**
2539
+ * Filter ID.
2540
+ */
2541
+ id: string;
2542
+ };
2543
+ query?: never;
2544
+ url: '/email/filters/{id}';
2545
+ };
2546
+ export type DeleteEmailFilterErrors = {
2547
+ 401: ErrorResponse;
2548
+ 404: ErrorResponse;
2549
+ 500: ErrorResponse;
2550
+ };
2551
+ export type DeleteEmailFilterError = DeleteEmailFilterErrors[keyof DeleteEmailFilterErrors];
2552
+ export type DeleteEmailFilterResponses = {
2553
+ 204: void;
2554
+ };
2555
+ export type DeleteEmailFilterResponse = DeleteEmailFilterResponses[keyof DeleteEmailFilterResponses];
2556
+ export type InitUserData = {
2557
+ body?: never;
2558
+ path?: never;
2559
+ query?: {
2560
+ /**
2561
+ * **OPTIONAL**. The in_progress_user_link id from a /link/gmail flow.
2562
+ */
2563
+ link_id?: string;
2564
+ /**
2565
+ * **OPTIONAL**. Confirms promoting a mailbox already connected by another user into a shared inbox.
2566
+ */
2567
+ force_share?: boolean;
2568
+ };
2569
+ url: '/email/init';
2570
+ };
2571
+ export type InitUserErrors = {
2572
+ 400: InitErrorCodeResponse;
2573
+ 401: ErrorResponse;
2574
+ 402: ErrorResponse;
2575
+ 409: SharedInboxConflictResponse;
2576
+ 429: ErrorResponse;
2577
+ 500: ErrorResponse;
2578
+ };
2579
+ export type InitUserError = InitUserErrors[keyof InitUserErrors];
2580
+ export type InitUserResponses = {
2581
+ 200: InitResponse;
2582
+ };
2583
+ export type InitUserResponse = InitUserResponses[keyof InitUserResponses];
2584
+ export type ListLabelsData = {
2585
+ body?: never;
2586
+ path?: never;
2587
+ query?: never;
2588
+ url: '/email/labels';
2589
+ };
2590
+ export type ListLabelsErrors = {
2591
+ 401: ErrorResponse;
2592
+ 500: ErrorResponse;
2593
+ };
2594
+ export type ListLabelsError = ListLabelsErrors[keyof ListLabelsErrors];
2595
+ export type ListLabelsResponses = {
2596
+ 200: ListLabelsResponse;
2597
+ };
2598
+ export type ListLabelsResponse2 = ListLabelsResponses[keyof ListLabelsResponses];
2599
+ export type CreateLabelData = {
2600
+ body: CreateLabelRequest;
2601
+ path?: never;
2602
+ query?: never;
2603
+ url: '/email/labels';
2604
+ };
2605
+ export type CreateLabelErrors = {
2606
+ 400: ErrorResponse;
2607
+ 401: ErrorResponse;
2608
+ 403: ErrorResponse;
2609
+ 404: ErrorResponse;
2610
+ 409: ErrorResponse;
2611
+ 429: ErrorResponse;
2612
+ 500: ErrorResponse;
2613
+ };
2614
+ export type CreateLabelError = CreateLabelErrors[keyof CreateLabelErrors];
2615
+ export type CreateLabelResponses = {
2616
+ 201: CreateLabelResponse;
2617
+ };
2618
+ export type CreateLabelResponse2 = CreateLabelResponses[keyof CreateLabelResponses];
2619
+ export type DeleteLabelData = {
2620
+ body?: never;
2621
+ path: {
2622
+ /**
2623
+ * Label ID.
2624
+ */
2625
+ id: string;
2626
+ };
2627
+ query?: never;
2628
+ url: '/email/labels/{id}';
2629
+ };
2630
+ export type DeleteLabelErrors = {
2631
+ 400: ErrorResponse;
2632
+ 401: ErrorResponse;
2633
+ 404: ErrorResponse;
2634
+ 500: ErrorResponse;
2635
+ };
2636
+ export type DeleteLabelError = DeleteLabelErrors[keyof DeleteLabelErrors];
2637
+ export type DeleteLabelResponses = {
2638
+ 204: EmptyResponse;
2639
+ };
2640
+ export type DeleteLabelResponse = DeleteLabelResponses[keyof DeleteLabelResponses];
2641
+ export type ListLinksData = {
2642
+ body?: never;
2643
+ path?: never;
2644
+ query?: never;
2645
+ url: '/email/links';
2646
+ };
2647
+ export type ListLinksErrors = {
2648
+ 401: ErrorResponse;
2649
+ 404: ErrorResponse;
2650
+ 500: ErrorResponse;
2651
+ };
2652
+ export type ListLinksError = ListLinksErrors[keyof ListLinksErrors];
2653
+ export type ListLinksResponses = {
2654
+ 200: ListLinksResponse;
2655
+ };
2656
+ export type ListLinksResponse2 = ListLinksResponses[keyof ListLinksResponses];
2657
+ export type HealthCheckLinksData = {
2658
+ body?: never;
2659
+ path?: never;
2660
+ query?: never;
2661
+ url: '/email/links/health-check';
2662
+ };
2663
+ export type HealthCheckLinksErrors = {
2664
+ 401: ErrorResponse;
2665
+ 500: ErrorResponse;
2666
+ };
2667
+ export type HealthCheckLinksError = HealthCheckLinksErrors[keyof HealthCheckLinksErrors];
2668
+ export type HealthCheckLinksResponses = {
2669
+ 202: EmptyResponse;
2670
+ };
2671
+ export type HealthCheckLinksResponse = HealthCheckLinksResponses[keyof HealthCheckLinksResponses];
2672
+ export type DeleteLinkData = {
2673
+ body?: never;
2674
+ path: {
2675
+ /**
2676
+ * Inbox link ID.
2677
+ */
2678
+ link_id: string;
2679
+ };
2680
+ query?: never;
2681
+ url: '/email/links/{link_id}';
2682
+ };
2683
+ export type DeleteLinkErrors = {
2684
+ 401: ErrorResponse;
2685
+ 403: ErrorResponse;
2686
+ 404: ErrorResponse;
2687
+ 500: ErrorResponse;
2688
+ };
2689
+ export type DeleteLinkError = DeleteLinkErrors[keyof DeleteLinkErrors];
2690
+ export type DeleteLinkResponses = {
2691
+ 204: EmptyResponse;
2692
+ };
2693
+ export type DeleteLinkResponse = DeleteLinkResponses[keyof DeleteLinkResponses];
2694
+ export type DisableLinkCalendarData = {
2695
+ body?: never;
2696
+ path: {
2697
+ /**
2698
+ * Inbox link ID.
2699
+ */
2700
+ link_id: string;
2701
+ };
2702
+ query?: never;
2703
+ url: '/email/links/{link_id}/calendar';
2704
+ };
2705
+ export type DisableLinkCalendarErrors = {
2706
+ 401: ErrorResponse;
2707
+ 403: ErrorResponse;
2708
+ 404: ErrorResponse;
2709
+ 500: ErrorResponse;
2710
+ };
2711
+ export type DisableLinkCalendarError = DisableLinkCalendarErrors[keyof DisableLinkCalendarErrors];
2712
+ export type DisableLinkCalendarResponses = {
2713
+ 204: EmptyResponse;
2714
+ };
2715
+ export type DisableLinkCalendarResponse = DisableLinkCalendarResponses[keyof DisableLinkCalendarResponses];
2716
+ export type ResyncLinkData = {
2717
+ body?: never;
2718
+ path: {
2719
+ /**
2720
+ * Inbox link ID.
2721
+ */
2722
+ link_id: string;
2723
+ };
2724
+ query?: never;
2725
+ url: '/email/links/{link_id}/resync';
2726
+ };
2727
+ export type ResyncLinkErrors = {
2728
+ 401: ErrorResponse;
2729
+ 403: ErrorResponse;
2730
+ 404: ErrorResponse;
2731
+ 500: ErrorResponse;
2732
+ };
2733
+ export type ResyncLinkError = ResyncLinkErrors[keyof ResyncLinkErrors];
2734
+ export type ResyncLinkResponses = {
2735
+ 200: ResyncResponse;
2736
+ };
2737
+ export type ResyncLinkResponse = ResyncLinkResponses[keyof ResyncLinkResponses];
2738
+ export type SendMessageData = {
2739
+ body: SendMessageRequest;
2740
+ path?: never;
2741
+ query?: never;
2742
+ url: '/email/messages';
2743
+ };
2744
+ export type SendMessageErrors = {
2745
+ 400: ErrorResponse;
2746
+ /**
2747
+ * An agent's program asked to send; it must go through a review or a confirmed send
2748
+ */
2749
+ 403: ErrorResponse;
2750
+ 404: ErrorResponse;
2751
+ 500: ErrorResponse;
2752
+ };
2753
+ export type SendMessageError = SendMessageErrors[keyof SendMessageErrors];
2754
+ export type SendMessageResponses = {
2755
+ 201: SendMessageResponse;
2756
+ };
2757
+ export type SendMessageResponse2 = SendMessageResponses[keyof SendMessageResponses];
2758
+ export type GetMessagesBatchData = {
2759
+ body: Array<string>;
2760
+ path?: never;
2761
+ query?: never;
2762
+ url: '/email/messages/batch';
2763
+ };
2764
+ export type GetMessagesBatchErrors = {
2765
+ 400: ErrorResponse;
2766
+ 401: ErrorResponse;
2767
+ 404: ErrorResponse;
2768
+ 500: ErrorResponse;
2769
+ };
2770
+ export type GetMessagesBatchError = GetMessagesBatchErrors[keyof GetMessagesBatchErrors];
2771
+ export type GetMessagesBatchResponses = {
2772
+ 200: Array<ParsedMessage>;
2773
+ };
2774
+ export type GetMessagesBatchResponse = GetMessagesBatchResponses[keyof GetMessagesBatchResponses];
2775
+ export type AddRemoveLabelData = {
2776
+ body: UpdateLabelBatchRequest;
2777
+ path?: never;
2778
+ query?: never;
2779
+ url: '/email/messages/labels';
2780
+ };
2781
+ export type AddRemoveLabelErrors = {
2782
+ 400: ErrorResponse;
2783
+ 401: ErrorResponse;
2784
+ 404: ErrorResponse;
2785
+ 500: ErrorResponse;
2786
+ };
2787
+ export type AddRemoveLabelError = AddRemoveLabelErrors[keyof AddRemoveLabelErrors];
2788
+ export type AddRemoveLabelResponses = {
2789
+ 200: UpdateLabelBatchResponse;
2790
+ };
2791
+ export type AddRemoveLabelResponse = AddRemoveLabelResponses[keyof AddRemoveLabelResponses];
2792
+ export type GetMessageData = {
2793
+ body?: never;
2794
+ path: {
2795
+ /**
2796
+ * Message ID.
2797
+ */
2798
+ id: string;
2799
+ };
2800
+ query?: never;
2801
+ url: '/email/messages/{id}';
2802
+ };
2803
+ export type GetMessageErrors = {
2804
+ 400: ErrorResponse;
2805
+ 401: ErrorResponse;
2806
+ 404: ErrorResponse;
2807
+ 500: ErrorResponse;
2808
+ };
2809
+ export type GetMessageError = GetMessageErrors[keyof GetMessageErrors];
2810
+ export type GetMessageResponses = {
2811
+ 200: ParsedMessage;
2812
+ };
2813
+ export type GetMessageResponse = GetMessageResponses[keyof GetMessageResponses];
2814
+ export type GetMessageEmlData = {
2815
+ body?: never;
2816
+ path: {
2817
+ /**
2818
+ * Message ID.
2819
+ */
2820
+ id: string;
2821
+ };
2822
+ query?: never;
2823
+ url: '/email/messages/{id}/eml';
2824
+ };
2825
+ export type GetMessageEmlErrors = {
2826
+ 401: ErrorResponse;
2827
+ 403: ErrorResponse;
2828
+ 404: ErrorResponse;
2829
+ 409: ErrorResponse;
2830
+ 429: ErrorResponse;
2831
+ 503: ErrorResponse;
2832
+ };
2833
+ export type GetMessageEmlError = GetMessageEmlErrors[keyof GetMessageEmlErrors];
2834
+ export type GetMessageEmlResponses = {
2835
+ 200: EmlFile;
2836
+ };
2837
+ export type GetMessageEmlResponse = GetMessageEmlResponses[keyof GetMessageEmlResponses];
2838
+ export type PatchSettingsData = {
2839
+ body: PatchSettingsRequest;
2840
+ path?: never;
2841
+ query?: never;
2842
+ url: '/email/settings';
2843
+ };
2844
+ export type PatchSettingsErrors = {
2845
+ 400: ErrorResponse;
2846
+ 401: ErrorResponse;
2847
+ 422: UnresolvedSignatureImagesError;
2848
+ 500: ErrorResponse;
2849
+ };
2850
+ export type PatchSettingsError = PatchSettingsErrors[keyof PatchSettingsErrors];
2851
+ export type PatchSettingsResponses = {
2852
+ 200: PatchSettingsResponse;
2853
+ };
2854
+ export type PatchSettingsResponse2 = PatchSettingsResponses[keyof PatchSettingsResponses];
2855
+ export type MailboxSettingsOperationsData = {
2856
+ body?: never;
2857
+ path?: never;
2858
+ query?: never;
2859
+ url: '/email/settings/operations';
2860
+ };
2861
+ export type MailboxSettingsOperationsResponses = {
2862
+ 200: Array<MailboxSettingsOperation>;
2863
+ };
2864
+ export type MailboxSettingsOperationsResponse = MailboxSettingsOperationsResponses[keyof MailboxSettingsOperationsResponses];
2865
+ export type DisableSyncData = {
2866
+ body?: never;
2867
+ headers?: {
2868
+ /**
2869
+ * Inbox link ID to act on instead of the caller's primary inbox; may name a delegated inbox.
2870
+ */
2871
+ 'X-Email-Link-Id'?: string | null;
2872
+ };
2873
+ path?: never;
2874
+ query?: never;
2875
+ url: '/email/sync';
2876
+ };
2877
+ export type DisableSyncErrors = {
2878
+ 400: ErrorResponse;
2879
+ 401: ErrorResponse;
2880
+ 403: ErrorResponse;
2881
+ 404: ErrorResponse;
2882
+ 409: ErrorResponse;
2883
+ 500: ErrorResponse;
2884
+ };
2885
+ export type DisableSyncError = DisableSyncErrors[keyof DisableSyncErrors];
2886
+ export type DisableSyncResponses = {
2887
+ 204: EmptyResponse;
2888
+ };
2889
+ export type DisableSyncResponse = DisableSyncResponses[keyof DisableSyncResponses];
2890
+ export type ArchiveThreadsData = {
2891
+ body: ArchiveThreadsRequest;
2892
+ path?: never;
2893
+ query?: never;
2894
+ url: '/email/threads/archived';
2895
+ };
2896
+ export type ArchiveThreadsErrors = {
2897
+ 400: ErrorResponse;
2898
+ 401: ErrorResponse;
2899
+ 500: ErrorResponse;
2900
+ };
2901
+ export type ArchiveThreadsError = ArchiveThreadsErrors[keyof ArchiveThreadsErrors];
2902
+ export type ArchiveThreadsResponses = {
2903
+ 200: ArchiveThreadsResponse;
2904
+ };
2905
+ export type ArchiveThreadsResponse2 = ArchiveThreadsResponses[keyof ArchiveThreadsResponses];
2906
+ export type PreviewsInboxCursorData = {
2907
+ body?: never;
2908
+ path: {
2909
+ /**
2910
+ * View type. Supported values: inbox, sent, drafts, starred, all, important, other, user:<label>
2911
+ */
2912
+ view: string;
2913
+ };
2914
+ query?: {
2915
+ /**
2916
+ * Limit for pagination. Default is 20. Max is 500.
2917
+ */
2918
+ limit?: number;
2919
+ /**
2920
+ * Sort method. Options are viewed_at, created_at, updated_at, viewed_updated. Defaults to viewed_updated.
2921
+ */
2922
+ sort_method?: ApiSortMethod;
2923
+ /**
2924
+ * Cursor value. Base64 encoded timestamp and item id, separated by |.
2925
+ */
2926
+ cursor?: string;
2927
+ };
2928
+ url: '/email/threads/previews/cursor/{view}';
2929
+ };
2930
+ export type PreviewsInboxCursorErrors = {
2931
+ 400: ErrorResponse;
2932
+ 401: ErrorResponse;
2933
+ 500: ErrorResponse;
2934
+ };
2935
+ export type PreviewsInboxCursorError = PreviewsInboxCursorErrors[keyof PreviewsInboxCursorErrors];
2936
+ export type PreviewsInboxCursorResponses = {
2937
+ 200: ApiPaginatedThreadCursor;
2938
+ };
2939
+ export type PreviewsInboxCursorResponse = PreviewsInboxCursorResponses[keyof PreviewsInboxCursorResponses];
2940
+ export type ArchiveThreadData = {
2941
+ body: ArchiveThreadRequest;
2942
+ path: {
2943
+ id: string;
2944
+ };
2945
+ query?: never;
2946
+ url: '/email/threads/{id}/archived';
2947
+ };
2948
+ export type ArchiveThreadErrors = {
2949
+ 401: ErrorResponse;
2950
+ 404: ErrorResponse;
2951
+ 500: ErrorResponse;
2952
+ };
2953
+ export type ArchiveThreadError = ArchiveThreadErrors[keyof ArchiveThreadErrors];
2954
+ export type ArchiveThreadResponses = {
2955
+ 200: EmptyResponse;
2956
+ };
2957
+ export type ArchiveThreadResponse = ArchiveThreadResponses[keyof ArchiveThreadResponses];
2958
+ export type AddRemoveThreadLabelData = {
2959
+ body: UpdateThreadLabelRequest;
2960
+ path: {
2961
+ /**
2962
+ * Thread ID.
2963
+ */
2964
+ id: string;
2965
+ };
2966
+ query?: never;
2967
+ url: '/email/threads/{id}/labels';
2968
+ };
2969
+ export type AddRemoveThreadLabelErrors = {
2970
+ 400: ErrorResponse;
2971
+ 401: ErrorResponse;
2972
+ 404: ErrorResponse;
2973
+ 500: ErrorResponse;
2974
+ };
2975
+ export type AddRemoveThreadLabelError = AddRemoveThreadLabelErrors[keyof AddRemoveThreadLabelErrors];
2976
+ export type AddRemoveThreadLabelResponses = {
2977
+ 200: UpdateThreadLabelsResponse;
2978
+ };
2979
+ export type AddRemoveThreadLabelResponse = AddRemoveThreadLabelResponses[keyof AddRemoveThreadLabelResponses];
2980
+ export type GetThreadMessagesHandlerData = {
2981
+ body?: never;
2982
+ path: {
2983
+ /**
2984
+ * Thread ID
2985
+ */
2986
+ id: string;
2987
+ };
2988
+ query?: {
2989
+ /**
2990
+ * Filter messages after this date
2991
+ */
2992
+ since?: string;
2993
+ /**
2994
+ * Limit number of messages returned
2995
+ */
2996
+ limit?: number;
2997
+ };
2998
+ url: '/email/threads/{id}/messages';
2999
+ };
3000
+ export type GetThreadMessagesHandlerErrors = {
3001
+ /**
3002
+ * Bad Request
3003
+ */
3004
+ 400: ErrorResponse;
3005
+ /**
3006
+ * Unauthorized
3007
+ */
3008
+ 401: ErrorResponse;
3009
+ /**
3010
+ * Not Found
3011
+ */
3012
+ 404: ErrorResponse;
3013
+ /**
3014
+ * Internal Server Error
3015
+ */
3016
+ 500: ErrorResponse;
3017
+ };
3018
+ export type GetThreadMessagesHandlerError = GetThreadMessagesHandlerErrors[keyof GetThreadMessagesHandlerErrors];
3019
+ export type GetThreadMessagesHandlerResponses = {
3020
+ /**
3021
+ * OK
3022
+ */
3023
+ 200: Array<ParsedMessage>;
3024
+ };
3025
+ export type GetThreadMessagesHandlerResponse = GetThreadMessagesHandlerResponses[keyof GetThreadMessagesHandlerResponses];
3026
+ export type ThreadOperationsData = {
3027
+ body?: never;
3028
+ path: {
3029
+ /**
3030
+ * Thread ID
3031
+ */
3032
+ id: string;
3033
+ };
3034
+ query?: never;
3035
+ url: '/email/threads/{id}/operations';
3036
+ };
3037
+ export type ThreadOperationsErrors = {
3038
+ 404: ErrorResponse;
3039
+ };
3040
+ export type ThreadOperationsError = ThreadOperationsErrors[keyof ThreadOperationsErrors];
3041
+ export type ThreadOperationsResponses = {
3042
+ 200: Array<MailboxOperation>;
3043
+ };
3044
+ export type ThreadOperationsResponse = ThreadOperationsResponses[keyof ThreadOperationsResponses];
3045
+ export type ThreadSeenData = {
3046
+ body?: never;
3047
+ path: {
3048
+ /**
3049
+ * Thread ID.
3050
+ */
3051
+ id: string;
3052
+ };
3053
+ query?: never;
3054
+ url: '/email/threads/{id}/seen';
3055
+ };
3056
+ export type ThreadSeenErrors = {
3057
+ 401: ErrorResponse;
3058
+ 404: ErrorResponse;
3059
+ 500: ErrorResponse;
3060
+ };
3061
+ export type ThreadSeenError = ThreadSeenErrors[keyof ThreadSeenErrors];
3062
+ export type ThreadSeenResponses = {
3063
+ 200: EmptyResponse;
3064
+ };
3065
+ export type ThreadSeenResponse = ThreadSeenResponses[keyof ThreadSeenResponses];
3066
+ export type UpdateThreadStateData = {
3067
+ body: UpdateThreadStateRequest;
3068
+ path: {
3069
+ /**
3070
+ * Thread ID
3071
+ */
3072
+ id: string;
3073
+ };
3074
+ query?: never;
3075
+ url: '/email/threads/{id}/state';
3076
+ };
3077
+ export type UpdateThreadStateErrors = {
3078
+ 400: ErrorResponse;
3079
+ 401: ErrorResponse;
3080
+ 404: ErrorResponse;
3081
+ 409: ErrorResponse;
3082
+ };
3083
+ export type UpdateThreadStateError = UpdateThreadStateErrors[keyof UpdateThreadStateErrors];
3084
+ export type UpdateThreadStateResponses = {
3085
+ 204: void;
3086
+ };
3087
+ export type UpdateThreadStateResponse = UpdateThreadStateResponses[keyof UpdateThreadStateResponses];
3088
+ export type GetThreadData = {
3089
+ body?: never;
3090
+ path: {
3091
+ /**
3092
+ * Thread ID
3093
+ */
3094
+ thread_id: string;
3095
+ };
3096
+ query?: {
3097
+ /**
3098
+ * Offset for message pagination. Default is 0.
3099
+ */
3100
+ offset?: number;
3101
+ /**
3102
+ * Limit for message pagination. Default is 5, max 100.
3103
+ */
3104
+ limit?: number;
3105
+ };
3106
+ url: '/email/threads/{thread_id}';
3107
+ };
3108
+ export type GetThreadErrors = {
3109
+ 400: ErrorResponse;
3110
+ 401: ErrorResponse;
3111
+ 404: ErrorResponse;
3112
+ 500: ErrorResponse;
3113
+ };
3114
+ export type GetThreadError = GetThreadErrors[keyof GetThreadErrors];
3115
+ export type GetThreadResponses = {
3116
+ 200: GetThreadResponse;
3117
+ };
3118
+ export type GetThreadResponse2 = GetThreadResponses[keyof GetThreadResponses];
3119
+ export type GetThreadCalendarInvitationsData = {
3120
+ body?: never;
3121
+ path: {
3122
+ /**
3123
+ * Authorized email thread
3124
+ */
3125
+ thread_id: string;
3126
+ };
3127
+ query?: never;
3128
+ url: '/email/threads/{thread_id}/calendar-invitations';
3129
+ };
3130
+ export type GetThreadCalendarInvitationsErrors = {
3131
+ 401: unknown;
3132
+ 403: unknown;
3133
+ };
3134
+ export type GetThreadCalendarInvitationsResponses = {
3135
+ 200: {
3136
+ [key: string]: InvitationResolution;
3137
+ };
3138
+ };
3139
+ export type GetThreadCalendarInvitationsResponse = GetThreadCalendarInvitationsResponses[keyof GetThreadCalendarInvitationsResponses];
3140
+ export type CopyThreadCalendarInvitationData = {
3141
+ body: CopyCalendarEventRequest;
3142
+ path: {
3143
+ /**
3144
+ * Authorized email thread
3145
+ */
3146
+ thread_id: string;
3147
+ /**
3148
+ * Message carrying the event
3149
+ */
3150
+ message_id: string;
3151
+ /**
3152
+ * Saved event within the message
3153
+ */
3154
+ invitation_id: string;
3155
+ };
3156
+ query?: never;
3157
+ url: '/email/threads/{thread_id}/messages/{message_id}/calendar-invitations/{invitation_id}/copy';
3158
+ };
3159
+ export type CopyThreadCalendarInvitationErrors = {
3160
+ /**
3161
+ * The saved event cannot be added, or the calendar is not a Google calendar
3162
+ */
3163
+ 400: CalendarMutationApiError;
3164
+ /**
3165
+ * Authentication required
3166
+ */
3167
+ 401: unknown;
3168
+ /**
3169
+ * Calendar is read-only or needs reauthorization
3170
+ */
3171
+ 403: CalendarMutationApiError;
3172
+ /**
3173
+ * No such saved event in the thread
3174
+ */
3175
+ 404: CalendarMutationApiError;
3176
+ /**
3177
+ * Already on the viewer's calendar, no writable calendar, or the provider refused the copy
3178
+ */
3179
+ 409: CalendarMutationApiError;
3180
+ /**
3181
+ * Transient provider failure
3182
+ */
3183
+ 503: CalendarMutationApiError;
3184
+ };
3185
+ export type CopyThreadCalendarInvitationError = CopyThreadCalendarInvitationErrors[keyof CopyThreadCalendarInvitationErrors];
3186
+ export type CopyThreadCalendarInvitationResponses = {
3187
+ /**
3188
+ * The copy on the viewer's calendar
3189
+ */
3190
+ 201: CalendarEvent;
3191
+ };
3192
+ export type CopyThreadCalendarInvitationResponse = CopyThreadCalendarInvitationResponses[keyof CopyThreadCalendarInvitationResponses];
3193
+ export type UpdateThreadProjectData = {
3194
+ body: UpdateThreadProjectRequest;
3195
+ path: {
3196
+ /**
3197
+ * Thread ID
3198
+ */
3199
+ thread_id: string;
3200
+ };
3201
+ query?: never;
3202
+ url: '/email/threads/{thread_id}/project';
3203
+ };
3204
+ export type UpdateThreadProjectErrors = {
3205
+ 401: ErrorResponse;
3206
+ 404: ErrorResponse;
3207
+ 500: ErrorResponse;
3208
+ };
3209
+ export type UpdateThreadProjectError = UpdateThreadProjectErrors[keyof UpdateThreadProjectErrors];
3210
+ export type UpdateThreadProjectResponses = {
3211
+ 200: UpdateThreadProjectResponse;
3212
+ };
3213
+ export type UpdateThreadProjectResponse2 = UpdateThreadProjectResponses[keyof UpdateThreadProjectResponses];
3214
+ export type GetThreadReadReceiptsData = {
3215
+ body?: never;
3216
+ path: {
3217
+ /**
3218
+ * Authorized email thread
3219
+ */
3220
+ thread_id: string;
3221
+ };
3222
+ query?: never;
3223
+ url: '/email/threads/{thread_id}/read-receipts';
3224
+ };
3225
+ export type GetThreadReadReceiptsErrors = {
3226
+ 401: unknown;
3227
+ 403: unknown;
3228
+ };
3229
+ export type GetThreadReadReceiptsResponses = {
3230
+ 200: ThreadReadReceipts;
3231
+ };
3232
+ export type GetThreadReadReceiptsResponse = GetThreadReadReceiptsResponses[keyof GetThreadReadReceiptsResponses];
3233
+ export type HealthHandlerData = {
3234
+ body?: never;
3235
+ path?: never;
3236
+ query?: never;
3237
+ url: '/health';
3238
+ };
3239
+ export type HealthHandlerResponses = {
3240
+ /**
3241
+ * Health
3242
+ */
3243
+ 200: EmptyResponse;
3244
+ };
3245
+ export type HealthHandlerResponse = HealthHandlerResponses[keyof HealthHandlerResponses];
3246
+ export type GetReadReceiptPixelData = {
3247
+ body?: never;
3248
+ path: {
3249
+ /**
3250
+ * Opaque pixel token
3251
+ */
3252
+ token: string;
3253
+ };
3254
+ query?: never;
3255
+ url: '/opens/{token}';
3256
+ };
3257
+ export type GetReadReceiptPixelResponses = {
3258
+ /**
3259
+ * Transparent pixel, for any token
3260
+ */
3261
+ 200: unknown;
3262
+ };