@macro-inc/sdk 0.0.1

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 (296) hide show
  1. package/README.md +177 -0
  2. package/dist/chunk-5HAKQN23.js +1263 -0
  3. package/dist/chunk-77EI4LSQ.js +2492 -0
  4. package/dist/chunk-CTKR64MY.js +1436 -0
  5. package/dist/chunk-JXIQT5TH.js +1467 -0
  6. package/dist/chunk-P4DTO6VD.js +830 -0
  7. package/dist/chunk-PAAFJYGO.js +967 -0
  8. package/dist/chunk-QNUS5BC5.js +913 -0
  9. package/dist/chunk-SGAHIERJ.js +1235 -0
  10. package/dist/chunk-V45LUJDI.js +838 -0
  11. package/dist/chunk-YRUXFEZM.js +1044 -0
  12. package/dist/generated/agent-harness/client/client.gen.d.ts +2 -0
  13. package/dist/generated/agent-harness/client/index.d.ts +10 -0
  14. package/dist/generated/agent-harness/client/types.gen.d.ts +120 -0
  15. package/dist/generated/agent-harness/client/utils.gen.d.ts +37 -0
  16. package/dist/generated/agent-harness/client.gen.d.ts +12 -0
  17. package/dist/generated/agent-harness/core/auth.gen.d.ts +25 -0
  18. package/dist/generated/agent-harness/core/bodySerializer.gen.d.ts +25 -0
  19. package/dist/generated/agent-harness/core/params.gen.d.ts +43 -0
  20. package/dist/generated/agent-harness/core/pathSerializer.gen.d.ts +33 -0
  21. package/dist/generated/agent-harness/core/queryKeySerializer.gen.d.ts +18 -0
  22. package/dist/generated/agent-harness/core/serverSentEvents.gen.d.ts +71 -0
  23. package/dist/generated/agent-harness/core/types.gen.d.ts +83 -0
  24. package/dist/generated/agent-harness/core/utils.gen.d.ts +19 -0
  25. package/dist/generated/agent-harness/index.d.ts +2 -0
  26. package/dist/generated/agent-harness/index.js +6 -0
  27. package/dist/generated/agent-harness/sdk.gen.d.ts +84 -0
  28. package/dist/generated/agent-harness/types.gen.d.ts +539 -0
  29. package/dist/generated/auth/client/client.gen.d.ts +2 -0
  30. package/dist/generated/auth/client/index.d.ts +10 -0
  31. package/dist/generated/auth/client/types.gen.d.ts +120 -0
  32. package/dist/generated/auth/client/utils.gen.d.ts +37 -0
  33. package/dist/generated/auth/client.gen.d.ts +12 -0
  34. package/dist/generated/auth/core/auth.gen.d.ts +25 -0
  35. package/dist/generated/auth/core/bodySerializer.gen.d.ts +25 -0
  36. package/dist/generated/auth/core/params.gen.d.ts +43 -0
  37. package/dist/generated/auth/core/pathSerializer.gen.d.ts +33 -0
  38. package/dist/generated/auth/core/queryKeySerializer.gen.d.ts +18 -0
  39. package/dist/generated/auth/core/serverSentEvents.gen.d.ts +71 -0
  40. package/dist/generated/auth/core/types.gen.d.ts +83 -0
  41. package/dist/generated/auth/core/utils.gen.d.ts +19 -0
  42. package/dist/generated/auth/index.d.ts +2 -0
  43. package/dist/generated/auth/index.js +6 -0
  44. package/dist/generated/auth/sdk.gen.d.ts +383 -0
  45. package/dist/generated/auth/types.gen.d.ts +2175 -0
  46. package/dist/generated/cognition/client/client.gen.d.ts +2 -0
  47. package/dist/generated/cognition/client/index.d.ts +10 -0
  48. package/dist/generated/cognition/client/types.gen.d.ts +120 -0
  49. package/dist/generated/cognition/client/utils.gen.d.ts +37 -0
  50. package/dist/generated/cognition/client.gen.d.ts +12 -0
  51. package/dist/generated/cognition/core/auth.gen.d.ts +25 -0
  52. package/dist/generated/cognition/core/bodySerializer.gen.d.ts +25 -0
  53. package/dist/generated/cognition/core/params.gen.d.ts +43 -0
  54. package/dist/generated/cognition/core/pathSerializer.gen.d.ts +33 -0
  55. package/dist/generated/cognition/core/queryKeySerializer.gen.d.ts +18 -0
  56. package/dist/generated/cognition/core/serverSentEvents.gen.d.ts +71 -0
  57. package/dist/generated/cognition/core/types.gen.d.ts +83 -0
  58. package/dist/generated/cognition/core/utils.gen.d.ts +19 -0
  59. package/dist/generated/cognition/index.d.ts +2 -0
  60. package/dist/generated/cognition/index.js +6 -0
  61. package/dist/generated/cognition/sdk.gen.d.ts +224 -0
  62. package/dist/generated/cognition/types.gen.d.ts +2484 -0
  63. package/dist/generated/connection/client/client.gen.d.ts +2 -0
  64. package/dist/generated/connection/client/index.d.ts +10 -0
  65. package/dist/generated/connection/client/types.gen.d.ts +120 -0
  66. package/dist/generated/connection/client/utils.gen.d.ts +37 -0
  67. package/dist/generated/connection/client.gen.d.ts +12 -0
  68. package/dist/generated/connection/core/auth.gen.d.ts +25 -0
  69. package/dist/generated/connection/core/bodySerializer.gen.d.ts +25 -0
  70. package/dist/generated/connection/core/params.gen.d.ts +43 -0
  71. package/dist/generated/connection/core/pathSerializer.gen.d.ts +33 -0
  72. package/dist/generated/connection/core/queryKeySerializer.gen.d.ts +18 -0
  73. package/dist/generated/connection/core/serverSentEvents.gen.d.ts +71 -0
  74. package/dist/generated/connection/core/types.gen.d.ts +83 -0
  75. package/dist/generated/connection/core/utils.gen.d.ts +19 -0
  76. package/dist/generated/connection/index.d.ts +2 -0
  77. package/dist/generated/connection/index.js +839 -0
  78. package/dist/generated/connection/sdk.gen.d.ts +38 -0
  79. package/dist/generated/connection/types.gen.d.ts +235 -0
  80. package/dist/generated/contacts/client/client.gen.d.ts +2 -0
  81. package/dist/generated/contacts/client/index.d.ts +10 -0
  82. package/dist/generated/contacts/client/types.gen.d.ts +120 -0
  83. package/dist/generated/contacts/client/utils.gen.d.ts +37 -0
  84. package/dist/generated/contacts/client.gen.d.ts +12 -0
  85. package/dist/generated/contacts/core/auth.gen.d.ts +25 -0
  86. package/dist/generated/contacts/core/bodySerializer.gen.d.ts +25 -0
  87. package/dist/generated/contacts/core/params.gen.d.ts +43 -0
  88. package/dist/generated/contacts/core/pathSerializer.gen.d.ts +33 -0
  89. package/dist/generated/contacts/core/queryKeySerializer.gen.d.ts +18 -0
  90. package/dist/generated/contacts/core/serverSentEvents.gen.d.ts +71 -0
  91. package/dist/generated/contacts/core/types.gen.d.ts +83 -0
  92. package/dist/generated/contacts/core/utils.gen.d.ts +19 -0
  93. package/dist/generated/contacts/index.d.ts +2 -0
  94. package/dist/generated/contacts/index.js +6 -0
  95. package/dist/generated/contacts/sdk.gen.d.ts +43 -0
  96. package/dist/generated/contacts/types.gen.d.ts +52 -0
  97. package/dist/generated/email/client/client.gen.d.ts +2 -0
  98. package/dist/generated/email/client/index.d.ts +10 -0
  99. package/dist/generated/email/client/types.gen.d.ts +120 -0
  100. package/dist/generated/email/client/utils.gen.d.ts +37 -0
  101. package/dist/generated/email/client.gen.d.ts +12 -0
  102. package/dist/generated/email/core/auth.gen.d.ts +25 -0
  103. package/dist/generated/email/core/bodySerializer.gen.d.ts +25 -0
  104. package/dist/generated/email/core/params.gen.d.ts +43 -0
  105. package/dist/generated/email/core/pathSerializer.gen.d.ts +33 -0
  106. package/dist/generated/email/core/queryKeySerializer.gen.d.ts +18 -0
  107. package/dist/generated/email/core/serverSentEvents.gen.d.ts +71 -0
  108. package/dist/generated/email/core/types.gen.d.ts +83 -0
  109. package/dist/generated/email/core/utils.gen.d.ts +19 -0
  110. package/dist/generated/email/index.d.ts +2 -0
  111. package/dist/generated/email/index.js +6 -0
  112. package/dist/generated/email/sdk.gen.d.ts +254 -0
  113. package/dist/generated/email/types.gen.d.ts +2614 -0
  114. package/dist/generated/notification/client/client.gen.d.ts +2 -0
  115. package/dist/generated/notification/client/index.d.ts +10 -0
  116. package/dist/generated/notification/client/types.gen.d.ts +120 -0
  117. package/dist/generated/notification/client/utils.gen.d.ts +37 -0
  118. package/dist/generated/notification/client.gen.d.ts +12 -0
  119. package/dist/generated/notification/core/auth.gen.d.ts +25 -0
  120. package/dist/generated/notification/core/bodySerializer.gen.d.ts +25 -0
  121. package/dist/generated/notification/core/params.gen.d.ts +43 -0
  122. package/dist/generated/notification/core/pathSerializer.gen.d.ts +33 -0
  123. package/dist/generated/notification/core/queryKeySerializer.gen.d.ts +18 -0
  124. package/dist/generated/notification/core/serverSentEvents.gen.d.ts +71 -0
  125. package/dist/generated/notification/core/types.gen.d.ts +83 -0
  126. package/dist/generated/notification/core/utils.gen.d.ts +19 -0
  127. package/dist/generated/notification/index.d.ts +2 -0
  128. package/dist/generated/notification/index.js +6 -0
  129. package/dist/generated/notification/sdk.gen.d.ts +118 -0
  130. package/dist/generated/notification/types.gen.d.ts +1352 -0
  131. package/dist/generated/properties/client/client.gen.d.ts +2 -0
  132. package/dist/generated/properties/client/index.d.ts +10 -0
  133. package/dist/generated/properties/client/types.gen.d.ts +120 -0
  134. package/dist/generated/properties/client/utils.gen.d.ts +37 -0
  135. package/dist/generated/properties/client.gen.d.ts +12 -0
  136. package/dist/generated/properties/core/auth.gen.d.ts +25 -0
  137. package/dist/generated/properties/core/bodySerializer.gen.d.ts +25 -0
  138. package/dist/generated/properties/core/params.gen.d.ts +43 -0
  139. package/dist/generated/properties/core/pathSerializer.gen.d.ts +33 -0
  140. package/dist/generated/properties/core/queryKeySerializer.gen.d.ts +18 -0
  141. package/dist/generated/properties/core/serverSentEvents.gen.d.ts +71 -0
  142. package/dist/generated/properties/core/types.gen.d.ts +83 -0
  143. package/dist/generated/properties/core/utils.gen.d.ts +19 -0
  144. package/dist/generated/properties/index.d.ts +2 -0
  145. package/dist/generated/properties/index.js +6 -0
  146. package/dist/generated/properties/sdk.gen.d.ts +158 -0
  147. package/dist/generated/properties/types.gen.d.ts +1288 -0
  148. package/dist/generated/scheduled-action/client/client.gen.d.ts +2 -0
  149. package/dist/generated/scheduled-action/client/index.d.ts +10 -0
  150. package/dist/generated/scheduled-action/client/types.gen.d.ts +120 -0
  151. package/dist/generated/scheduled-action/client/utils.gen.d.ts +37 -0
  152. package/dist/generated/scheduled-action/client.gen.d.ts +12 -0
  153. package/dist/generated/scheduled-action/core/auth.gen.d.ts +25 -0
  154. package/dist/generated/scheduled-action/core/bodySerializer.gen.d.ts +25 -0
  155. package/dist/generated/scheduled-action/core/params.gen.d.ts +43 -0
  156. package/dist/generated/scheduled-action/core/pathSerializer.gen.d.ts +33 -0
  157. package/dist/generated/scheduled-action/core/queryKeySerializer.gen.d.ts +18 -0
  158. package/dist/generated/scheduled-action/core/serverSentEvents.gen.d.ts +71 -0
  159. package/dist/generated/scheduled-action/core/types.gen.d.ts +83 -0
  160. package/dist/generated/scheduled-action/core/utils.gen.d.ts +19 -0
  161. package/dist/generated/scheduled-action/index.d.ts +2 -0
  162. package/dist/generated/scheduled-action/index.js +845 -0
  163. package/dist/generated/scheduled-action/sdk.gen.d.ts +42 -0
  164. package/dist/generated/scheduled-action/types.gen.d.ts +241 -0
  165. package/dist/generated/search/client/client.gen.d.ts +2 -0
  166. package/dist/generated/search/client/index.d.ts +10 -0
  167. package/dist/generated/search/client/types.gen.d.ts +120 -0
  168. package/dist/generated/search/client/utils.gen.d.ts +37 -0
  169. package/dist/generated/search/client.gen.d.ts +12 -0
  170. package/dist/generated/search/core/auth.gen.d.ts +25 -0
  171. package/dist/generated/search/core/bodySerializer.gen.d.ts +25 -0
  172. package/dist/generated/search/core/params.gen.d.ts +43 -0
  173. package/dist/generated/search/core/pathSerializer.gen.d.ts +33 -0
  174. package/dist/generated/search/core/queryKeySerializer.gen.d.ts +18 -0
  175. package/dist/generated/search/core/serverSentEvents.gen.d.ts +71 -0
  176. package/dist/generated/search/core/types.gen.d.ts +83 -0
  177. package/dist/generated/search/core/utils.gen.d.ts +19 -0
  178. package/dist/generated/search/index.d.ts +2 -0
  179. package/dist/generated/search/index.js +6 -0
  180. package/dist/generated/search/sdk.gen.d.ts +44 -0
  181. package/dist/generated/search/types.gen.d.ts +2194 -0
  182. package/dist/generated/static-files/client/client.gen.d.ts +2 -0
  183. package/dist/generated/static-files/client/index.d.ts +10 -0
  184. package/dist/generated/static-files/client/types.gen.d.ts +120 -0
  185. package/dist/generated/static-files/client/utils.gen.d.ts +37 -0
  186. package/dist/generated/static-files/client.gen.d.ts +12 -0
  187. package/dist/generated/static-files/core/auth.gen.d.ts +25 -0
  188. package/dist/generated/static-files/core/bodySerializer.gen.d.ts +25 -0
  189. package/dist/generated/static-files/core/params.gen.d.ts +43 -0
  190. package/dist/generated/static-files/core/pathSerializer.gen.d.ts +33 -0
  191. package/dist/generated/static-files/core/queryKeySerializer.gen.d.ts +18 -0
  192. package/dist/generated/static-files/core/serverSentEvents.gen.d.ts +71 -0
  193. package/dist/generated/static-files/core/types.gen.d.ts +83 -0
  194. package/dist/generated/static-files/core/utils.gen.d.ts +19 -0
  195. package/dist/generated/static-files/index.d.ts +2 -0
  196. package/dist/generated/static-files/index.js +842 -0
  197. package/dist/generated/static-files/sdk.gen.d.ts +43 -0
  198. package/dist/generated/static-files/types.gen.d.ts +214 -0
  199. package/dist/generated/storage/client/client.gen.d.ts +2 -0
  200. package/dist/generated/storage/client/index.d.ts +10 -0
  201. package/dist/generated/storage/client/types.gen.d.ts +120 -0
  202. package/dist/generated/storage/client/utils.gen.d.ts +37 -0
  203. package/dist/generated/storage/client.gen.d.ts +12 -0
  204. package/dist/generated/storage/core/auth.gen.d.ts +25 -0
  205. package/dist/generated/storage/core/bodySerializer.gen.d.ts +25 -0
  206. package/dist/generated/storage/core/params.gen.d.ts +43 -0
  207. package/dist/generated/storage/core/pathSerializer.gen.d.ts +33 -0
  208. package/dist/generated/storage/core/queryKeySerializer.gen.d.ts +18 -0
  209. package/dist/generated/storage/core/serverSentEvents.gen.d.ts +71 -0
  210. package/dist/generated/storage/core/types.gen.d.ts +83 -0
  211. package/dist/generated/storage/core/utils.gen.d.ts +19 -0
  212. package/dist/generated/storage/index.d.ts +2 -0
  213. package/dist/generated/storage/index.js +6 -0
  214. package/dist/generated/storage/sdk.gen.d.ts +858 -0
  215. package/dist/generated/storage/types.gen.d.ts +12105 -0
  216. package/dist/generated/unfurl/client/client.gen.d.ts +2 -0
  217. package/dist/generated/unfurl/client/index.d.ts +10 -0
  218. package/dist/generated/unfurl/client/types.gen.d.ts +120 -0
  219. package/dist/generated/unfurl/client/utils.gen.d.ts +37 -0
  220. package/dist/generated/unfurl/client.gen.d.ts +12 -0
  221. package/dist/generated/unfurl/core/auth.gen.d.ts +25 -0
  222. package/dist/generated/unfurl/core/bodySerializer.gen.d.ts +25 -0
  223. package/dist/generated/unfurl/core/params.gen.d.ts +43 -0
  224. package/dist/generated/unfurl/core/pathSerializer.gen.d.ts +33 -0
  225. package/dist/generated/unfurl/core/queryKeySerializer.gen.d.ts +18 -0
  226. package/dist/generated/unfurl/core/serverSentEvents.gen.d.ts +71 -0
  227. package/dist/generated/unfurl/core/types.gen.d.ts +83 -0
  228. package/dist/generated/unfurl/core/utils.gen.d.ts +19 -0
  229. package/dist/generated/unfurl/index.d.ts +2 -0
  230. package/dist/generated/unfurl/index.js +835 -0
  231. package/dist/generated/unfurl/sdk.gen.d.ts +47 -0
  232. package/dist/generated/unfurl/types.gen.d.ts +125 -0
  233. package/dist/src/config.d.ts +51 -0
  234. package/dist/src/entities/agent-sessions/agent-session.d.ts +45 -0
  235. package/dist/src/entities/agent-sessions/namespace.d.ts +18 -0
  236. package/dist/src/entities/bots/namespace.d.ts +25 -0
  237. package/dist/src/entities/calls/call-record.d.ts +55 -0
  238. package/dist/src/entities/calls/namespace.d.ts +9 -0
  239. package/dist/src/entities/channels/channel.d.ts +88 -0
  240. package/dist/src/entities/channels/message.d.ts +64 -0
  241. package/dist/src/entities/channels/namespace.d.ts +30 -0
  242. package/dist/src/entities/channels/post.d.ts +20 -0
  243. package/dist/src/entities/channels/thread.d.ts +30 -0
  244. package/dist/src/entities/chats/chat.d.ts +55 -0
  245. package/dist/src/entities/chats/namespace.d.ts +14 -0
  246. package/dist/src/entities/crm/comment.d.ts +43 -0
  247. package/dist/src/entities/crm/company.d.ts +70 -0
  248. package/dist/src/entities/crm/contact.d.ts +48 -0
  249. package/dist/src/entities/crm/namespace.d.ts +22 -0
  250. package/dist/src/entities/documents/comment.d.ts +41 -0
  251. package/dist/src/entities/documents/document.d.ts +130 -0
  252. package/dist/src/entities/documents/namespace.d.ts +43 -0
  253. package/dist/src/entities/documents/system-skill.d.ts +16 -0
  254. package/dist/src/entities/email/attachment.d.ts +36 -0
  255. package/dist/src/entities/email/label.d.ts +31 -0
  256. package/dist/src/entities/email/link.d.ts +29 -0
  257. package/dist/src/entities/email/message.d.ts +58 -0
  258. package/dist/src/entities/email/namespace.d.ts +49 -0
  259. package/dist/src/entities/email/thread.d.ts +88 -0
  260. package/dist/src/entities/entity.d.ts +101 -0
  261. package/dist/src/entities/favorites/namespace.d.ts +19 -0
  262. package/dist/src/entities/foreign/foreign-entity.d.ts +30 -0
  263. package/dist/src/entities/foreign/namespace.d.ts +7 -0
  264. package/dist/src/entities/notifications/namespace.d.ts +29 -0
  265. package/dist/src/entities/notifications/notification.d.ts +50 -0
  266. package/dist/src/entities/pins/namespace.d.ts +19 -0
  267. package/dist/src/entities/projects/namespace.d.ts +13 -0
  268. package/dist/src/entities/projects/project.d.ts +42 -0
  269. package/dist/src/entities/properties/namespace.d.ts +47 -0
  270. package/dist/src/entities/properties/property-definition.d.ts +45 -0
  271. package/dist/src/entities/properties/property-option.d.ts +32 -0
  272. package/dist/src/entities/search.d.ts +23 -0
  273. package/dist/src/entities/tasks/namespace.d.ts +21 -0
  274. package/dist/src/entities/tasks/task.d.ts +34 -0
  275. package/dist/src/entities/teams/namespace.d.ts +12 -0
  276. package/dist/src/entities/teams/team.d.ts +40 -0
  277. package/dist/src/entities/users/namespace.d.ts +10 -0
  278. package/dist/src/entities/users/user.d.ts +43 -0
  279. package/dist/src/entities/webhooks/namespace.d.ts +31 -0
  280. package/dist/src/entities/webhooks/webhook.d.ts +88 -0
  281. package/dist/src/events/hydrate/channel.d.ts +85 -0
  282. package/dist/src/events/hydrate/document.d.ts +54 -0
  283. package/dist/src/events/receiver.d.ts +51 -0
  284. package/dist/src/events/types.d.ts +40 -0
  285. package/dist/src/events/verify.d.ts +13 -0
  286. package/dist/src/local-portmap.d.ts +8 -0
  287. package/dist/src/macro.d.ts +62 -0
  288. package/dist/src/macro.js +4215 -0
  289. package/dist/src/mentions.d.ts +37 -0
  290. package/dist/src/raw.d.ts +12 -0
  291. package/dist/src/utils/client.d.ts +53 -0
  292. package/dist/src/utils/index.d.ts +4 -0
  293. package/dist/src/utils/lazy.d.ts +18 -0
  294. package/dist/src/utils/pagination.d.ts +7 -0
  295. package/dist/src/utils/unwrap.d.ts +23 -0
  296. package/package.json +49 -0
@@ -0,0 +1,2614 @@
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
+ export type AddDraftAttachmentResponse = {
26
+ /**
27
+ * The ID of the attachment in the database.
28
+ */
29
+ attachment_id: string;
30
+ /**
31
+ * The MIME type of the attachment.
32
+ */
33
+ content_type: string;
34
+ /**
35
+ * The URL to upload the attachment to.
36
+ */
37
+ upload_url: string;
38
+ };
39
+ export type AddForwardedAttachmentRequest = {
40
+ /**
41
+ * The ID of the original attachment to forward.
42
+ */
43
+ attachment_id: string;
44
+ };
45
+ export type AddForwardedAttachmentResponse = {
46
+ /**
47
+ * The ID of the original attachment.
48
+ */
49
+ attachment_id: string;
50
+ /**
51
+ * Original file name of the attachment.
52
+ */
53
+ filename?: string | null;
54
+ /**
55
+ * MIME type of the attachment.
56
+ */
57
+ mime_type?: string | null;
58
+ /**
59
+ * File size in bytes.
60
+ */
61
+ size_bytes?: number | null;
62
+ };
63
+ export type ApiAttachment = {
64
+ contentId?: string | null;
65
+ createdAt: string;
66
+ filename?: string | null;
67
+ id: string;
68
+ messageId: string;
69
+ mimeType?: string | null;
70
+ providerAttachmentId?: string | null;
71
+ sizeBytes?: number | null;
72
+ };
73
+ /**
74
+ * API representation of a draft attachment on a message.
75
+ */
76
+ export type ApiAttachmentDraft = {
77
+ content_type: string;
78
+ draft_id: string;
79
+ file_name: string;
80
+ id: string;
81
+ s3_key: string;
82
+ sha: string;
83
+ size: number;
84
+ };
85
+ /**
86
+ * API representation of a forwarded attachment on a message.
87
+ */
88
+ export type ApiAttachmentForwarded = {
89
+ attachment_id: string;
90
+ draft_id: string;
91
+ filename?: string | null;
92
+ message_provider_id: string;
93
+ mime_type?: string | null;
94
+ provider_attachment_id?: string | null;
95
+ size_bytes?: number | null;
96
+ };
97
+ export type ApiContact = {
98
+ emailAddress?: string | null;
99
+ id: string;
100
+ linkId: string;
101
+ name?: string | null;
102
+ sfsPhotoUrl?: string | null;
103
+ };
104
+ /**
105
+ * API representation of a contact (sender or recipient).
106
+ */
107
+ export type ApiContactInfo = {
108
+ email: string;
109
+ name?: string | null;
110
+ photo_url?: string | null;
111
+ };
112
+ /**
113
+ * Contact info for draft request/response (backward-compatible with MessageToSend shape).
114
+ */
115
+ export type ApiDraftContactInfo = {
116
+ /**
117
+ * Email address.
118
+ */
119
+ email: string;
120
+ /**
121
+ * Display name.
122
+ */
123
+ name?: string | null;
124
+ /**
125
+ * Profile photo URL.
126
+ */
127
+ photo_url?: string | null;
128
+ };
129
+ /**
130
+ * The draft input matching the current `MessageToSend` JSON shape for backward compat.
131
+ */
132
+ export type ApiDraftInput = {
133
+ /**
134
+ * Bcc recipients.
135
+ */
136
+ bcc?: Array<ApiDraftContactInfo> | null;
137
+ /**
138
+ * HTML body (base64 URL_SAFE_NO_PAD encoded). Sanitized before storage.
139
+ */
140
+ body_html?: string | null;
141
+ /**
142
+ * Macro body format.
143
+ */
144
+ body_macro?: string | null;
145
+ /**
146
+ * Plain text body.
147
+ */
148
+ body_text?: string | null;
149
+ /**
150
+ * Cc recipients.
151
+ */
152
+ cc?: Array<ApiDraftContactInfo> | null;
153
+ /**
154
+ * Existing message DB ID (for updating an existing draft).
155
+ */
156
+ db_id?: string | null;
157
+ headers_json?: null | Value;
158
+ /**
159
+ * Per-message override for whether to include the signature on send:
160
+ * `Some(false)` to exclude (user dismissed it). Omit to use the inbox's
161
+ * default policy. Ignored for drafts.
162
+ */
163
+ include_signature?: boolean | null;
164
+ /**
165
+ * Provider message ID.
166
+ */
167
+ provider_id?: string | null;
168
+ /**
169
+ * Provider thread ID.
170
+ */
171
+ provider_thread_id?: string | null;
172
+ /**
173
+ * ID of the message this draft is replying to.
174
+ */
175
+ replying_to_id?: string | null;
176
+ /**
177
+ * Subject line.
178
+ */
179
+ subject: string;
180
+ /**
181
+ * Thread DB ID.
182
+ */
183
+ thread_db_id?: string | null;
184
+ /**
185
+ * To recipients.
186
+ */
187
+ to?: Array<ApiDraftContactInfo> | null;
188
+ };
189
+ /**
190
+ * The draft output matching the current `MessageToSend` JSON shape for backward compat.
191
+ */
192
+ export type ApiDraftOutput = {
193
+ /**
194
+ * Bcc recipients.
195
+ */
196
+ bcc?: Array<ApiDraftContactInfo> | null;
197
+ /**
198
+ * HTML body (decoded).
199
+ */
200
+ body_html?: string | null;
201
+ /**
202
+ * Macro body.
203
+ */
204
+ body_macro?: string | null;
205
+ /**
206
+ * Plain text body.
207
+ */
208
+ body_text?: string | null;
209
+ /**
210
+ * Cc recipients.
211
+ */
212
+ cc?: Array<ApiDraftContactInfo> | null;
213
+ /**
214
+ * Message DB ID.
215
+ */
216
+ db_id?: string | null;
217
+ headers_json?: null | Value;
218
+ /**
219
+ * Link ID.
220
+ */
221
+ link_id: string;
222
+ /**
223
+ * Provider message ID.
224
+ */
225
+ provider_id?: string | null;
226
+ /**
227
+ * Provider thread ID.
228
+ */
229
+ provider_thread_id?: string | null;
230
+ /**
231
+ * ID of the message this draft is replying to.
232
+ */
233
+ replying_to_id?: string | null;
234
+ /**
235
+ * Send time.
236
+ */
237
+ send_time?: string | null;
238
+ /**
239
+ * Subject line.
240
+ */
241
+ subject: string;
242
+ /**
243
+ * Thread DB ID.
244
+ */
245
+ thread_db_id?: string | null;
246
+ /**
247
+ * To recipients.
248
+ */
249
+ to?: Array<ApiDraftContactInfo> | null;
250
+ };
251
+ /**
252
+ * A single email filter in API responses.
253
+ */
254
+ export type ApiEmailFilter = {
255
+ created_at: string;
256
+ email_address?: string | null;
257
+ email_domain?: string | null;
258
+ id: string;
259
+ is_important: boolean;
260
+ };
261
+ export type ApiLabel = {
262
+ createdAt: string;
263
+ id: string;
264
+ labelListVisibility: ApiLabelListVisibility;
265
+ linkId: string;
266
+ messageListVisibility: ApiMessageListVisibility;
267
+ name: string;
268
+ providerLabelId: string;
269
+ type: ApiLabelType;
270
+ };
271
+ export type ApiLabelListVisibility = 'LabelShow' | 'LabelShowIfUnread' | 'LabelHide';
272
+ export type ApiLabelType = 'System' | 'User';
273
+ /**
274
+ * API representation of a fully assembled email message.
275
+ */
276
+ export type ApiMessage = {
277
+ attachments: Array<ApiMessageAttachment>;
278
+ attachments_draft: Array<ApiAttachmentDraft>;
279
+ attachments_forwarded: Array<ApiAttachmentForwarded>;
280
+ bcc: Array<ApiContactInfo>;
281
+ body_html_sanitized?: string | null;
282
+ body_macro?: string | null;
283
+ body_replyless?: string | null;
284
+ body_text?: string | null;
285
+ cc: Array<ApiContactInfo>;
286
+ created_at: string;
287
+ db_id: string;
288
+ from?: null | ApiContactInfo;
289
+ global_id?: string | null;
290
+ has_attachments: boolean;
291
+ headers_json?: unknown;
292
+ internal_date_ts?: string | null;
293
+ is_draft: boolean;
294
+ is_read: boolean;
295
+ is_sent: boolean;
296
+ is_starred: boolean;
297
+ labels: Array<ApiMessageLabel>;
298
+ link_id: string;
299
+ provider_history_id?: string | null;
300
+ provider_id?: string | null;
301
+ provider_thread_id?: string | null;
302
+ replying_to_id?: string | null;
303
+ scheduled_send_time?: string | null;
304
+ sent_at?: string | null;
305
+ size_estimate?: number | null;
306
+ snippet?: string | null;
307
+ subject?: string | null;
308
+ thread_db_id: string;
309
+ to: Array<ApiContactInfo>;
310
+ updated_at: string;
311
+ };
312
+ /**
313
+ * API representation of a provider attachment on a message.
314
+ */
315
+ export type ApiMessageAttachment = {
316
+ content_id?: string | null;
317
+ data_url?: string | null;
318
+ db_id: string;
319
+ filename?: string | null;
320
+ mime_type?: string | null;
321
+ provider_id?: string | null;
322
+ sfs_id?: string | null;
323
+ size_bytes?: number | null;
324
+ };
325
+ /**
326
+ * API representation of a label on a message.
327
+ */
328
+ export type ApiMessageLabel = {
329
+ created_at: string;
330
+ id?: string | null;
331
+ label_list_visibility?: null | ApiLabelListVisibility;
332
+ link_id: string;
333
+ message_list_visibility?: null | ApiMessageListVisibility;
334
+ name?: string | null;
335
+ provider_label_id: string;
336
+ type_?: null | ApiLabelType;
337
+ };
338
+ export type ApiMessageListVisibility = 'Show' | 'Hide';
339
+ export type ApiPaginatedThreadCursor = {
340
+ items: Array<ApiThreadPreviewCursor>;
341
+ next_cursor?: string | null;
342
+ };
343
+ /**
344
+ * common types of sorts based on timestamps
345
+ */
346
+ export type ApiSortMethod = 'viewed_at' | 'updated_at' | 'created_at' | 'viewed_updated';
347
+ /**
348
+ * API representation of a fully assembled email thread.
349
+ */
350
+ export type ApiThread = {
351
+ access_level: AccessLevel;
352
+ created_at: string;
353
+ db_id: string;
354
+ inbox_visible: boolean;
355
+ is_read: boolean;
356
+ latest_inbound_message_ts?: string | null;
357
+ latest_non_spam_message_ts?: string | null;
358
+ latest_outbound_message_ts?: string | null;
359
+ link_id: string;
360
+ messages: Array<ApiMessage>;
361
+ project_id?: string | null;
362
+ provider_id?: string | null;
363
+ updated_at: string;
364
+ };
365
+ export type ApiThreadPreviewCursor = ApiThreadPreviewCursorInner & {
366
+ attachments: Array<ApiAttachment>;
367
+ contacts: Array<ApiContact>;
368
+ frecencyScore?: number | null;
369
+ labels: Array<ApiLabel>;
370
+ };
371
+ export type ApiThreadPreviewCursorInner = {
372
+ createdAt: string;
373
+ id: string;
374
+ inboxVisible: boolean;
375
+ isDraft: boolean;
376
+ isImportant: boolean;
377
+ isRead: boolean;
378
+ linkId: string;
379
+ name?: string | null;
380
+ ownerId: string;
381
+ providerId?: string | null;
382
+ senderEmail?: string | null;
383
+ senderName?: string | null;
384
+ senderPhotoUrl?: string | null;
385
+ snippet?: string | null;
386
+ sortTs: string;
387
+ updatedAt: string;
388
+ viewedAt?: string | null;
389
+ };
390
+ export type ArchiveThreadRequest = {
391
+ value: boolean;
392
+ };
393
+ /**
394
+ * Attachments of a message, as sent to us by the provider.
395
+ */
396
+ export type Attachment = {
397
+ content_id?: string | null;
398
+ data_url?: string | null;
399
+ db_id: string;
400
+ filename?: string | null;
401
+ mime_type?: string | null;
402
+ provider_id?: string | null;
403
+ sfs_id?: string | null;
404
+ size_bytes?: number | null;
405
+ };
406
+ export type AttachmentDraft = {
407
+ /**
408
+ * MIME type of the attachment (e.g., "application/pdf", "image/png").
409
+ */
410
+ content_type: string;
411
+ /**
412
+ * The ID of the draft message this attachment belongs to.
413
+ */
414
+ draft_id: string;
415
+ /**
416
+ * Original file name of the attachment.
417
+ */
418
+ file_name: string;
419
+ /**
420
+ * Unique identifier for the attachment.
421
+ */
422
+ id: string;
423
+ /**
424
+ * S3 object key where the attachment content is stored.
425
+ */
426
+ s3_key: string;
427
+ /**
428
+ * SHA-256 hash of the file content for integrity verification.
429
+ */
430
+ sha: string;
431
+ /**
432
+ * File size in bytes.
433
+ */
434
+ size: number;
435
+ };
436
+ /**
437
+ * A forwarded attachment linking a draft to an original message's attachment.
438
+ * Data is fetched from Gmail at send time rather than stored in S3.
439
+ */
440
+ export type AttachmentForwarded = {
441
+ /**
442
+ * The UUID of the original attachment in email_attachments.
443
+ */
444
+ attachment_id: string;
445
+ /**
446
+ * The ID of the draft message this forwarded attachment belongs to.
447
+ */
448
+ draft_id: string;
449
+ /**
450
+ * Original file name of the attachment.
451
+ */
452
+ filename?: string | null;
453
+ /**
454
+ * The Gmail message ID of the original message containing the attachment.
455
+ */
456
+ message_provider_id: string;
457
+ /**
458
+ * MIME type of the attachment.
459
+ */
460
+ mime_type?: string | null;
461
+ /**
462
+ * The Gmail attachment ID for fetching data from Gmail API.
463
+ */
464
+ provider_attachment_id?: string | null;
465
+ /**
466
+ * File size in bytes.
467
+ */
468
+ size_bytes?: number | null;
469
+ };
470
+ /**
471
+ * RSVP state for an attendee.
472
+ */
473
+ export type AttendeeResponseStatus = 'needs_action' | 'accepted' | 'declined' | 'tentative';
474
+ export type BackfillJob = {
475
+ created_at: string;
476
+ fusionauth_user_id: string;
477
+ id: string;
478
+ link_id?: string | null;
479
+ status: BackfillJobStatus;
480
+ threads_requested_limit?: number | null;
481
+ threads_retrieved_count: number;
482
+ total_threads: number;
483
+ updated_at: string;
484
+ };
485
+ export type BackfillJobStatus = 'Init' | 'InProgress' | 'Complete' | 'Cancelled' | 'Failed';
486
+ /**
487
+ * Progress/terminal state of a backfill job for [`RefreshEmailEvent::Backfill`].
488
+ */
489
+ export type BackfillStatus = 'progress' | 'complete' | 'failed';
490
+ /**
491
+ * Request to block a sender.
492
+ */
493
+ export type BlockSenderRequest = {
494
+ /**
495
+ * The email address of the sender to block.
496
+ */
497
+ email_address: string;
498
+ };
499
+ /**
500
+ * An attendee on a calendar event.
501
+ */
502
+ export type CalendarAttendee = {
503
+ /**
504
+ * Optional attendee comment.
505
+ */
506
+ comment?: string | null;
507
+ /**
508
+ * Provider display name.
509
+ */
510
+ displayName?: string | null;
511
+ /**
512
+ * Normalized email address.
513
+ */
514
+ email: string;
515
+ /**
516
+ * Whether attendance is optional.
517
+ */
518
+ isOptional: boolean;
519
+ /**
520
+ * Whether this attendee is the organizer.
521
+ */
522
+ isOrganizer: boolean;
523
+ /**
524
+ * Whether this attendee is one of the viewing requester's inboxes.
525
+ */
526
+ isSelf: boolean;
527
+ /**
528
+ * RSVP state.
529
+ */
530
+ responseStatus: AttendeeResponseStatus;
531
+ };
532
+ /**
533
+ * An attendee supplied to a calendar mutation.
534
+ */
535
+ export type CalendarAttendeeInputBody = {
536
+ /**
537
+ * Attendee email address.
538
+ */
539
+ email: string;
540
+ /**
541
+ * Whether attendance is optional.
542
+ */
543
+ isOptional?: boolean;
544
+ };
545
+ /**
546
+ * How much of a recurring series a deletion removes.
547
+ */
548
+ export type CalendarDeletionScopeParam = 'all' | 'this_event' | 'this_and_following';
549
+ /**
550
+ * A stable, first-class Macro calendar event entity.
551
+ */
552
+ export type CalendarEvent = {
553
+ /**
554
+ * Attendees, keyed by email during persistence.
555
+ */
556
+ attendees: Array<CalendarAttendee>;
557
+ /**
558
+ * Calendar the canonical source belongs to, when known. Absent only in
559
+ * projections stored before calendars were attributed.
560
+ */
561
+ calendarId?: string | null;
562
+ conferenceProvider?: null | ConferenceProvider;
563
+ /**
564
+ * Direct join URL when known.
565
+ */
566
+ conferenceUrl?: string | null;
567
+ /**
568
+ * Entity creation time.
569
+ */
570
+ createdAt: string;
571
+ /**
572
+ * Provider-reported creator email. Distinct from the organizer when
573
+ * someone writes onto a calendar they do not own. Omitted from stored
574
+ * projections when unknown so events ingested before this field still
575
+ * compare equal.
576
+ */
577
+ creatorEmail?: string | null;
578
+ /**
579
+ * Provider-reported creator display name.
580
+ */
581
+ creatorName?: string | null;
582
+ /**
583
+ * Optional event body.
584
+ */
585
+ description?: string | null;
586
+ /**
587
+ * Provider event type. Skipped when it is the regular type so
588
+ * projections stored before event types were modeled still compare
589
+ * equal.
590
+ */
591
+ eventType?: EventType;
592
+ /**
593
+ * RFC 5545 UID used to reconcile provider and email sources.
594
+ */
595
+ icalUid: string;
596
+ /**
597
+ * Macro entity identifier.
598
+ */
599
+ id: string;
600
+ /**
601
+ * Whether the current user can edit the canonical source.
602
+ */
603
+ isReadOnly: boolean;
604
+ /**
605
+ * Optional physical or virtual location label.
606
+ */
607
+ location?: string | null;
608
+ /**
609
+ * Organizer email.
610
+ */
611
+ organizerEmail?: string | null;
612
+ /**
613
+ * Organizer display name.
614
+ */
615
+ organizerName?: string | null;
616
+ /**
617
+ * Macro user who owns this event entity.
618
+ */
619
+ ownerId: string;
620
+ /**
621
+ * Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`).
622
+ */
623
+ recurrenceLines: Array<string>;
624
+ /**
625
+ * Per-user reminder configuration. Skipped when it is the provider
626
+ * default so projections stored before reminders were modeled still
627
+ * compare equal.
628
+ */
629
+ reminders?: EventReminders;
630
+ /**
631
+ * Provider/iCalendar sequence number.
632
+ */
633
+ sequence: number;
634
+ /**
635
+ * Event status.
636
+ */
637
+ status: EventStatus;
638
+ /**
639
+ * Timed or all-day shape.
640
+ */
641
+ time: EventTime;
642
+ /**
643
+ * Display title.
644
+ */
645
+ title: string;
646
+ /**
647
+ * Availability behavior.
648
+ */
649
+ transparency: EventTransparency;
650
+ /**
651
+ * Entity update time.
652
+ */
653
+ updatedAt: string;
654
+ /**
655
+ * Event visibility.
656
+ */
657
+ visibility: EventVisibility;
658
+ };
659
+ /**
660
+ * HTTP error body returned by calendar mutation endpoints.
661
+ */
662
+ export type CalendarMutationApiError = {
663
+ /**
664
+ * Machine-readable failure category.
665
+ */
666
+ code: CalendarMutationErrorCode;
667
+ /**
668
+ * Human-readable failure description.
669
+ */
670
+ message: string;
671
+ };
672
+ /**
673
+ * Machine-readable failure category for calendar mutations.
674
+ */
675
+ export type CalendarMutationErrorCode = 'not_found' | 'occurrence_not_found' | 'read_only' | 'no_writable_calendar' | 'not_attendee' | 'invalid_input' | 'reauth_required' | 'provider_rejected' | 'retryable' | 'persist_failed';
676
+ /**
677
+ * How much of a recurring series an RSVP applies to.
678
+ *
679
+ * Unlike deletion there is no this-and-following variant: the provider
680
+ * cannot express a forward-scoped response, so offering one would be a
681
+ * promise sync could not keep.
682
+ */
683
+ export type CalendarRsvpScopeParam = 'all' | 'this_event';
684
+ /**
685
+ * How much of a recurring series an update applies to.
686
+ *
687
+ * Like RSVPs there is no this-and-following variant: the provider cannot
688
+ * express a forward-scoped edit as one write, and emulating it (truncate
689
+ * the series, insert an edited clone) is non-atomic and re-invites the
690
+ * attendees of the clone. Compose it from a this-and-following deletion
691
+ * and a create when that shape is wanted.
692
+ */
693
+ export type CalendarUpdateScopeParam = 'all' | 'this_event';
694
+ export type CancelBackfillParams = {
695
+ job_id: string;
696
+ };
697
+ /**
698
+ * A requested change to an event's conferencing. Omitting the field leaves
699
+ * the existing conference untouched; only these values change it.
700
+ */
701
+ export type ConferenceChange = 'google_meet' | 'none';
702
+ /**
703
+ * The conferencing system backing an event's join URL.
704
+ *
705
+ * Macro generates only Google Meet conferences, so this distinguishes one it
706
+ * created from a third party's — Zoom and friends arriving as `addOn`
707
+ * conference data, or a legacy classic Hangout. Clients use it to label the
708
+ * conference and to tell whether the Meet toggle reflects a Macro-managed
709
+ * conference.
710
+ *
711
+ * It does not gate mutation. An explicit request replaces or detaches any
712
+ * conference, third-party included, exactly as deleting the event would;
713
+ * what protects a conference is that omitting the field leaves it untouched,
714
+ * so an unrelated edit never disturbs it.
715
+ */
716
+ export type ConferenceProvider = 'google_meet' | 'other';
717
+ export type Contact = {
718
+ email_address?: string | null;
719
+ id: string;
720
+ link_id: string;
721
+ name?: string | null;
722
+ original_photo_url?: string | null;
723
+ sfs_photo_url?: string | null;
724
+ };
725
+ export type ContactInfo = {
726
+ email: string;
727
+ name?: string | null;
728
+ photo_url?: string | null;
729
+ };
730
+ export type ContactInfoLegacy = {
731
+ email: string;
732
+ email_address: string;
733
+ name?: string | null;
734
+ photo_url?: string | null;
735
+ };
736
+ export type ContactInfoWithInteraction = ContactInfoLegacy & {
737
+ last_interaction: string;
738
+ };
739
+ /**
740
+ * Request body creating a calendar event on the requester's calendar.
741
+ */
742
+ export type CreateCalendarEventRequest = {
743
+ /**
744
+ * Invited attendees.
745
+ */
746
+ attendees?: Array<CalendarAttendeeInputBody>;
747
+ /**
748
+ * Exact calendar to create the event on; takes precedence over the
749
+ * inbox default.
750
+ */
751
+ calendarId?: string | null;
752
+ conference?: null | ConferenceChange;
753
+ /**
754
+ * Optional event body.
755
+ */
756
+ description?: string | null;
757
+ /**
758
+ * Connected inbox whose primary calendar receives the event; defaults
759
+ * to the requester's primary inbox.
760
+ */
761
+ emailLinkId?: string | null;
762
+ /**
763
+ * Optional location label.
764
+ */
765
+ location?: string | null;
766
+ /**
767
+ * Raw RFC 5545 recurrence properties (`RRULE`, `RDATE`, `EXDATE`).
768
+ */
769
+ recurrenceLines?: Array<string>;
770
+ reminders?: null | EventReminders;
771
+ /**
772
+ * Timed or all-day shape.
773
+ */
774
+ time: EventTime;
775
+ /**
776
+ * Display title.
777
+ */
778
+ title: string;
779
+ transparency?: null | EventTransparency;
780
+ visibility?: null | EventVisibility;
781
+ };
782
+ /**
783
+ * Request body for creating a draft.
784
+ */
785
+ export type CreateDraftRequest = {
786
+ /**
787
+ * The draft content.
788
+ */
789
+ draft: ApiDraftInput;
790
+ /**
791
+ * Scheduled send time.
792
+ */
793
+ send_time?: string | null;
794
+ };
795
+ /**
796
+ * Response body for creating a draft.
797
+ */
798
+ export type CreateDraftResponse = {
799
+ /**
800
+ * The created draft.
801
+ */
802
+ draft: ApiDraftOutput;
803
+ };
804
+ export type CreateLabelRequest = {
805
+ label_name: string;
806
+ };
807
+ /**
808
+ * The response returned from the create label endpoint
809
+ */
810
+ export type CreateLabelResponse = {
811
+ /**
812
+ * the thread, with messages inside
813
+ */
814
+ label: Label;
815
+ };
816
+ /**
817
+ * Empty response is required due to custom fetch forcing `response.json()`
818
+ */
819
+ export type EmptyResponse = {
820
+ [key: string]: unknown;
821
+ };
822
+ /**
823
+ * A plain old json error response for use with axum.
824
+ * yup, thats it.
825
+ */
826
+ export type ErrorResponse = {
827
+ /**
828
+ * Message to explain failure
829
+ */
830
+ message: string;
831
+ };
832
+ /**
833
+ * One reminder: how it alerts and how many minutes before the event start
834
+ * (before midnight in the calendar's zone for all-day events) it fires.
835
+ */
836
+ export type EventReminderOverride = {
837
+ /**
838
+ * Provider method, stored verbatim; only `popup` fires Macro
839
+ * notifications.
840
+ */
841
+ method: string;
842
+ /**
843
+ * Minutes before the event start.
844
+ */
845
+ minutes: number;
846
+ };
847
+ /**
848
+ * Per-user reminder configuration for an event, mirroring Google's model:
849
+ * either the calendar's default reminders apply, or the explicit overrides
850
+ * replace them entirely.
851
+ */
852
+ export type EventReminders = {
853
+ /**
854
+ * Explicit reminders replacing the defaults when `use_default` is off.
855
+ */
856
+ overrides?: Array<EventReminderOverride>;
857
+ /**
858
+ * Whether the calendar's default reminders apply.
859
+ */
860
+ useDefault: boolean;
861
+ };
862
+ /**
863
+ * Canonical event status.
864
+ */
865
+ export type EventStatus = 'confirmed' | 'tentative' | 'cancelled';
866
+ /**
867
+ * The mutually exclusive time shape of a calendar event.
868
+ *
869
+ * Fields are renamed per variant rather than with `rename_all_fields`
870
+ * because utoipa only honors variant-level serde renames when it
871
+ * derives the OpenAPI schema.
872
+ */
873
+ export type EventTime = {
874
+ /**
875
+ * Exclusive end instant.
876
+ */
877
+ endsAt: string;
878
+ kind: 'timed';
879
+ /**
880
+ * Inclusive start instant.
881
+ */
882
+ startsAt: string;
883
+ /**
884
+ * Original IANA time-zone identifier, when supplied.
885
+ */
886
+ timeZone?: string | null;
887
+ } | {
888
+ /**
889
+ * Exclusive local end date.
890
+ */
891
+ endDate: string;
892
+ kind: 'allDay';
893
+ /**
894
+ * Inclusive local start date.
895
+ */
896
+ startDate: string;
897
+ };
898
+ /**
899
+ * Whether an event blocks availability.
900
+ */
901
+ export type EventTransparency = 'opaque' | 'transparent';
902
+ /**
903
+ * Google's event type: ordinary meetings versus the status-style entries
904
+ * (working location, out of office, focus time, birthdays) Google renders
905
+ * and notifies differently. Immutable at the provider after creation.
906
+ */
907
+ export type EventType = 'default' | 'out_of_office' | 'focus_time' | 'working_location' | 'birthday' | 'from_gmail';
908
+ /**
909
+ * Visibility of event details.
910
+ */
911
+ export type EventVisibility = 'default' | 'public' | 'private' | 'confidential';
912
+ /**
913
+ * The response returned from the get backfill job endpoint
914
+ */
915
+ export type GetActiveBackfillJobResponse = {
916
+ job: BackfillJob;
917
+ };
918
+ /**
919
+ * The response returned from the get attachment endpoint
920
+ */
921
+ export type GetAttachmentDocumentIdResponse = {
922
+ attachment_id: string;
923
+ document_id: string;
924
+ };
925
+ /**
926
+ * The response returned from the get attachment endpoint
927
+ */
928
+ export type GetAttachmentResponse = {
929
+ attachment: Attachment;
930
+ };
931
+ /**
932
+ * The response returned from the get backfill job endpoint
933
+ */
934
+ export type GetBackfillJobResponse = {
935
+ job: BackfillJob;
936
+ };
937
+ /**
938
+ * Parameters for getting thread previews with cursor-based pagination.
939
+ */
940
+ export type GetPreviewsCursorParams = {
941
+ /**
942
+ * Limit for pagination. Default is 20. Max is 500.
943
+ */
944
+ limit?: number | null;
945
+ sort_method?: null | ApiSortMethod;
946
+ };
947
+ export type GetScheduledResponse = {
948
+ messages: Array<Message>;
949
+ };
950
+ /**
951
+ * Response body for the get-thread endpoint.
952
+ */
953
+ export type GetThreadResponse = {
954
+ thread: ApiThread;
955
+ };
956
+ /**
957
+ * Structured 400 body carrying a machine-readable code. Clients branch on
958
+ * `code` instead of parsing the human message.
959
+ */
960
+ export type InitErrorCodeResponse = {
961
+ /**
962
+ * Stable machine-readable error code.
963
+ */
964
+ code: string;
965
+ /**
966
+ * Human-readable explanation.
967
+ */
968
+ message: string;
969
+ };
970
+ export type InitResponse = {
971
+ /**
972
+ * Present when init enqueued a backfill job. Absent for cross-user delegation,
973
+ * where the child link's backfill already ran under its own macro_id; present for
974
+ * the self-link bootstrap, where a fresh link is provisioned and backfilled.
975
+ */
976
+ backfill_job_id?: string | null;
977
+ /**
978
+ * The email_links row id for the now-accessible inbox. For cross-user delegation
979
+ * this is the *existing* child link the caller now delegates over; for the
980
+ * self-link bootstrap and the data-source path it's a freshly upserted row.
981
+ */
982
+ link_id: string;
983
+ };
984
+ export type Label = {
985
+ created_at: string;
986
+ id?: string | null;
987
+ label_list_visibility?: null | LabelListVisibility;
988
+ link_id: string;
989
+ message_list_visibility?: null | MessageListVisibility;
990
+ name?: string | null;
991
+ provider_label_id: string;
992
+ type_?: null | LabelType;
993
+ };
994
+ export type LabelInfo = {
995
+ name: string;
996
+ provider_id: string;
997
+ };
998
+ export type LabelListVisibility = 'LabelShow' | 'LabelShowIfUnread' | 'LabelHide';
999
+ export type LabelType = 'System' | 'User';
1000
+ export type Link = {
1001
+ /**
1002
+ * Whether the user turned calendar off for this inbox, which also removed
1003
+ * its calendar data. `needs_calendar_permission` is true either way, so
1004
+ * this is what separates "never granted" from "deliberately off" —
1005
+ * unprompted calendar nags must stay quiet for the latter.
1006
+ */
1007
+ calendar_disabled: boolean;
1008
+ created_at: string;
1009
+ email_address: string;
1010
+ fusionauth_user_id: string;
1011
+ /**
1012
+ * Whether Macro holds calendar data for this inbox. Drives the turn-off
1013
+ * control on its own, so removing that data never depends on the recorded
1014
+ * scopes still matching the set Macro requests today — a set that changes
1015
+ * as the integration narrows, stranding data behind a capability check
1016
+ * that no longer recognizes an older grant.
1017
+ */
1018
+ has_calendar_data: boolean;
1019
+ id: string;
1020
+ is_primary: boolean;
1021
+ is_sync_active: boolean;
1022
+ macro_id: string;
1023
+ /**
1024
+ * Whether the link's Google grant is missing the calendar scope. True for
1025
+ * inboxes connected before the calendar capability existed (and for
1026
+ * grants where the user declined it); drives the per-inbox calendar
1027
+ * upgrade prompt. Re-running the connect flow records the new grant.
1028
+ */
1029
+ needs_calendar_permission: boolean;
1030
+ /**
1031
+ * Whether the link's Google grant needs to be reconnected. Drives the
1032
+ * per-inbox reconnect prompt independently of the sync-status badge.
1033
+ */
1034
+ needs_reauth: boolean;
1035
+ /**
1036
+ * The inbox's own profile photo (its self-contact's SFS photo), if synced.
1037
+ */
1038
+ photo_url?: string | null;
1039
+ provider: UserProvider;
1040
+ settings: Settings;
1041
+ sync_status: SyncStatus;
1042
+ updated_at: string;
1043
+ };
1044
+ /**
1045
+ * The response returned from the list backfill jobs endpoint
1046
+ */
1047
+ export type ListBackfillJobsResponse = {
1048
+ jobs: Array<BackfillJob>;
1049
+ };
1050
+ /**
1051
+ * Response containing list of blocked email addresses.
1052
+ */
1053
+ export type ListBlockedResponse = {
1054
+ /**
1055
+ * List of email addresses that are currently blocked.
1056
+ */
1057
+ blocked_emails: Array<string>;
1058
+ };
1059
+ /**
1060
+ * Calendars visible to the requester across connected and delegated inboxes.
1061
+ */
1062
+ export type ListCalendarsResponse = {
1063
+ /**
1064
+ * Primaries and writable calendars first.
1065
+ */
1066
+ calendars: Array<VisibleCalendar>;
1067
+ };
1068
+ export type ListContactsResponse = {
1069
+ /**
1070
+ * the thread, with messages inside
1071
+ */
1072
+ contacts: {
1073
+ [key: string]: Array<ContactInfoWithInteraction>;
1074
+ };
1075
+ };
1076
+ /**
1077
+ * Response body for listing email filters.
1078
+ */
1079
+ export type ListEmailFiltersResponse = {
1080
+ filters: Array<ApiEmailFilter>;
1081
+ };
1082
+ /**
1083
+ * Response body for listing labels.
1084
+ */
1085
+ export type ListLabelsResponse = {
1086
+ labels: Array<ApiLabel>;
1087
+ };
1088
+ /**
1089
+ * The response returned from the list links endpoint
1090
+ */
1091
+ export type ListLinksResponse = {
1092
+ /**
1093
+ * the thread, with messages inside
1094
+ */
1095
+ links: Array<Link>;
1096
+ };
1097
+ export type Message = {
1098
+ attachments: Array<Attachment>;
1099
+ /**
1100
+ * Uploaded file attachments for the message, if it is a draft
1101
+ */
1102
+ attachments_draft: Array<AttachmentDraft>;
1103
+ /**
1104
+ * Forwarded attachments from original messages, if it is a draft
1105
+ */
1106
+ attachments_forwarded: Array<AttachmentForwarded>;
1107
+ bcc: Array<ContactInfo>;
1108
+ body_html_sanitized?: string | null;
1109
+ body_macro?: string | null;
1110
+ body_text?: string | null;
1111
+ cc: Array<ContactInfo>;
1112
+ created_at: string;
1113
+ db_id: string;
1114
+ from?: null | ContactInfo;
1115
+ /**
1116
+ * The globally unique Message-ID header value created by the sender to uniquely identify this email
1117
+ * Used for threading across all providers (In-Reply-To header, References header)
1118
+ */
1119
+ global_id?: string | null;
1120
+ has_attachments: boolean;
1121
+ headers_json?: null | Value;
1122
+ internal_date_ts?: string | null;
1123
+ is_draft: boolean;
1124
+ is_read: boolean;
1125
+ is_sent: boolean;
1126
+ is_starred: boolean;
1127
+ labels: Array<Label>;
1128
+ link_id: string;
1129
+ provider_history_id?: string | null;
1130
+ provider_id?: string | null;
1131
+ provider_thread_id?: string | null;
1132
+ replying_to_id?: string | null;
1133
+ scheduled_send_time?: string | null;
1134
+ sent_at?: string | null;
1135
+ size_estimate?: number | null;
1136
+ snippet?: string | null;
1137
+ subject?: string | null;
1138
+ thread_db_id: string;
1139
+ to: Array<ContactInfo>;
1140
+ updated_at: string;
1141
+ };
1142
+ export type MessageListVisibility = 'Show' | 'Hide';
1143
+ export type ParsedMessage = {
1144
+ bcc: Array<ContactInfo>;
1145
+ body_parsed?: string | null;
1146
+ cc: Array<ContactInfo>;
1147
+ db_id: string;
1148
+ from?: null | ContactInfo;
1149
+ internal_date_ts?: string | null;
1150
+ labels: Array<LabelInfo>;
1151
+ link_id: string;
1152
+ subject?: string | null;
1153
+ thread_db_id: string;
1154
+ to: Array<ContactInfo>;
1155
+ };
1156
+ export type PatchSettingsRequest = {
1157
+ settings: Settings;
1158
+ };
1159
+ export type PatchSettingsResponse = {
1160
+ settings: Settings;
1161
+ };
1162
+ /**
1163
+ * View type. Supported values include standard labels and a custom user label user:<label>
1164
+ */
1165
+ export type PreviewView = 'inbox' | 'sent' | 'drafts' | 'starred' | 'all' | 'important' | 'other' | string;
1166
+ export type PreviewViewStandardLabel = 'inbox' | 'sent' | 'drafts' | 'starred' | 'all' | 'important' | 'other';
1167
+ /**
1168
+ * A sync run committed changes for `link_id`; viewers should refetch.
1169
+ */
1170
+ export type RefreshCalendarEvent = {
1171
+ event: 'synced';
1172
+ /**
1173
+ * Connected inbox whose calendars changed.
1174
+ */
1175
+ link_id: string;
1176
+ };
1177
+ /**
1178
+ * Payload for the `refresh_email` connection gateway event: identifies the
1179
+ * inbox that changed and the kind of change.
1180
+ */
1181
+ export type RefreshEmailEvent = {
1182
+ event: 'backfill';
1183
+ link_id: string;
1184
+ status: BackfillStatus;
1185
+ } | {
1186
+ event: 'upsert_message';
1187
+ link_id: string;
1188
+ } | {
1189
+ event: 'update_labels';
1190
+ link_id: string;
1191
+ } | {
1192
+ event: 'delete_message';
1193
+ link_id: string;
1194
+ } | {
1195
+ event: 'link_removed';
1196
+ link_id: string;
1197
+ } | {
1198
+ event: 'photo_synced';
1199
+ link_id: string;
1200
+ } | {
1201
+ completed_threads: number;
1202
+ event: 'backfill_progress';
1203
+ link_id: string;
1204
+ status: BackfillStatus;
1205
+ total_threads: number;
1206
+ };
1207
+ /**
1208
+ * The response returned from the resync endpoint.
1209
+ */
1210
+ export type ResyncResponse = {
1211
+ /**
1212
+ * True when a backfill was already running and this call was a no-op.
1213
+ */
1214
+ already_in_progress: boolean;
1215
+ /**
1216
+ * The backfill job driving the (re-)sync. Either the freshly enqueued job or
1217
+ * the one already in progress.
1218
+ */
1219
+ backfill_job_id: string;
1220
+ };
1221
+ /**
1222
+ * Request body setting the requester's RSVP on an event.
1223
+ */
1224
+ export type RsvpCalendarEventRequest = {
1225
+ /**
1226
+ * Original-start key of the occurrence the response targets.
1227
+ */
1228
+ recurrenceId?: string | null;
1229
+ /**
1230
+ * The response to record for the connected account.
1231
+ */
1232
+ response: AttendeeResponseStatus;
1233
+ scope?: null | CalendarRsvpScopeParam;
1234
+ };
1235
+ /**
1236
+ * Request body for sending a message (backward-compatible with `{ message: MessageToSend }`).
1237
+ */
1238
+ export type SendMessageRequest = {
1239
+ /**
1240
+ * The message content.
1241
+ */
1242
+ message: ApiDraftInput;
1243
+ };
1244
+ /**
1245
+ * Response body for sending a message.
1246
+ */
1247
+ export type SendMessageResponse = {
1248
+ /**
1249
+ * The created message.
1250
+ */
1251
+ message: ApiDraftOutput;
1252
+ };
1253
+ export type Settings = {
1254
+ /**
1255
+ * The user's email signature content (HTML). On a patch, omit or send
1256
+ * `null` to leave unchanged (both deserialize to `None`); pass an empty
1257
+ * string to clear it. The column cannot be set to SQL NULL via patch.
1258
+ */
1259
+ signature?: string | null;
1260
+ signature_on_replies_forwards?: boolean | null;
1261
+ };
1262
+ /**
1263
+ * Returned with a `409 Conflict` when a connect targets an external mailbox another
1264
+ * macro user has already connected. The client surfaces a confirmation; on confirm it
1265
+ * retries `/email/init` with `force_share=true` to promote the mailbox to a shared inbox.
1266
+ */
1267
+ export type SharedInboxConflictResponse = {
1268
+ /**
1269
+ * The mailbox address that is already connected.
1270
+ */
1271
+ email_address: string;
1272
+ /**
1273
+ * The existing link that would be shared if the caller confirms.
1274
+ */
1275
+ existing_link_id: string;
1276
+ /**
1277
+ * The email of the macro user who first connected the mailbox.
1278
+ */
1279
+ existing_owner_email: string;
1280
+ };
1281
+ /**
1282
+ * Coarse sync state for an inbox, used to render a one-line hint in the
1283
+ * multi-inbox settings list. Derived from the link's `is_sync_active` flag, its
1284
+ * reauth health, and its most recent backfill job.
1285
+ */
1286
+ export type SyncStatus = 'SYNCING' | 'UP_TO_DATE' | 'ERROR' | 'NEEDS_REAUTH' | 'INACTIVE';
1287
+ export type Thread = {
1288
+ created_at: string;
1289
+ db_id: string;
1290
+ inbox_visible: boolean;
1291
+ is_read: boolean;
1292
+ latest_inbound_message_ts?: string | null;
1293
+ latest_non_spam_message_ts?: string | null;
1294
+ latest_outbound_message_ts?: string | null;
1295
+ link_id: string;
1296
+ messages: Array<Message>;
1297
+ provider_id?: string | null;
1298
+ updated_at: string;
1299
+ };
1300
+ export type ThreadList = {
1301
+ next_page_token?: string | null;
1302
+ threads: Array<ThreadSummary>;
1303
+ };
1304
+ /**
1305
+ * thread summary returned in preview cursor endpoint
1306
+ */
1307
+ export type ThreadPreviewCursor = {
1308
+ attachments: Array<Attachment>;
1309
+ createdAt: string;
1310
+ id: string;
1311
+ inboxVisible: boolean;
1312
+ isDraft: boolean;
1313
+ isImportant: boolean;
1314
+ isRead: boolean;
1315
+ name?: string | null;
1316
+ ownerId: string;
1317
+ participants: Array<Contact>;
1318
+ providerId?: string | null;
1319
+ senderEmail?: string | null;
1320
+ senderName?: string | null;
1321
+ senderPhotoUrl?: string | null;
1322
+ snippet?: string | null;
1323
+ sortTs: string;
1324
+ updatedAt: string;
1325
+ viewedAt?: string | null;
1326
+ };
1327
+ export type ThreadSummary = {
1328
+ provider_id: string;
1329
+ };
1330
+ /**
1331
+ * Request to unblock a sender.
1332
+ */
1333
+ export type UnblockSenderRequest = {
1334
+ /**
1335
+ * The email address of the sender to unblock.
1336
+ */
1337
+ email_address: string;
1338
+ };
1339
+ /**
1340
+ * Body returned with a 422 when signature images can't be loaded.
1341
+ */
1342
+ export type UnresolvedSignatureImagesError = {
1343
+ unresolved_image_count: number;
1344
+ };
1345
+ /**
1346
+ * Request body patching an event; omitted fields are left untouched.
1347
+ */
1348
+ export type UpdateCalendarEventRequest = {
1349
+ /**
1350
+ * Replacement attendee list.
1351
+ */
1352
+ attendees?: Array<CalendarAttendeeInputBody> | null;
1353
+ conference?: null | ConferenceChange;
1354
+ /**
1355
+ * Replacement description; an empty string clears it.
1356
+ */
1357
+ description?: string | null;
1358
+ /**
1359
+ * Replacement location; an empty string clears it.
1360
+ */
1361
+ location?: string | null;
1362
+ /**
1363
+ * Original-start key of the occurrence the update targets.
1364
+ */
1365
+ recurrenceId?: string | null;
1366
+ /**
1367
+ * Replacement recurrence properties; an empty list clears them.
1368
+ */
1369
+ recurrenceLines?: Array<string> | null;
1370
+ reminders?: null | EventReminders;
1371
+ scope?: null | CalendarUpdateScopeParam;
1372
+ time?: null | EventTime;
1373
+ /**
1374
+ * Replacement title; an empty string clears it.
1375
+ */
1376
+ title?: string | null;
1377
+ transparency?: null | EventTransparency;
1378
+ visibility?: null | EventVisibility;
1379
+ };
1380
+ export type UpdateLabelBatchRequest = {
1381
+ label_id: string;
1382
+ message_ids: Array<string>;
1383
+ value: boolean;
1384
+ };
1385
+ export type UpdateLabelBatchResponse = {
1386
+ failed_ids: Array<string>;
1387
+ missing_ids: Array<string>;
1388
+ successful_ids: Array<string>;
1389
+ };
1390
+ /**
1391
+ * Request body for updating a thread's labels.
1392
+ */
1393
+ export type UpdateThreadLabelRequest = {
1394
+ label_id: string;
1395
+ value: boolean;
1396
+ };
1397
+ /**
1398
+ * Response body for updating a thread's labels.
1399
+ */
1400
+ export type UpdateThreadLabelsResponse = {
1401
+ failed_ids: Array<string>;
1402
+ successful_ids: Array<string>;
1403
+ };
1404
+ /**
1405
+ * Request body for updating a thread's project.
1406
+ */
1407
+ export type UpdateThreadProjectRequest = {
1408
+ /**
1409
+ * The project ID to assign to the thread, or null to remove from project.
1410
+ */
1411
+ projectId?: string | null;
1412
+ };
1413
+ /**
1414
+ * Response body for updating a thread's project.
1415
+ */
1416
+ export type UpdateThreadProjectResponse = {
1417
+ /**
1418
+ * The previous project ID of the thread.
1419
+ */
1420
+ oldProjectId?: string | null;
1421
+ };
1422
+ /**
1423
+ * Request body for creating or updating an email filter.
1424
+ */
1425
+ export type UpsertEmailFilterRequest = {
1426
+ /**
1427
+ * Exact email address to match. Mutually exclusive with `email_domain`.
1428
+ */
1429
+ email_address?: string | null;
1430
+ /**
1431
+ * Email domain to match. Mutually exclusive with `email_address`.
1432
+ */
1433
+ email_domain?: string | null;
1434
+ /**
1435
+ * Whether matching senders should be considered important.
1436
+ */
1437
+ is_important: boolean;
1438
+ };
1439
+ /**
1440
+ * Response body for upsert email filter.
1441
+ */
1442
+ export type UpsertEmailFilterResponse = {
1443
+ filter: ApiEmailFilter;
1444
+ };
1445
+ export type UpsertScheduledRequest = {
1446
+ /**
1447
+ * The time to send the message (ISO 8601 format)
1448
+ */
1449
+ send_time: string;
1450
+ };
1451
+ export type UpsertScheduledResponse = {
1452
+ message_id: string;
1453
+ send_time: string;
1454
+ };
1455
+ export type UserProvider = 'GMAIL';
1456
+ export type Value = unknown;
1457
+ /**
1458
+ * A calendar visible to a requester, listed for pickers and filters.
1459
+ */
1460
+ export type VisibleCalendar = {
1461
+ /**
1462
+ * Provider color.
1463
+ */
1464
+ color?: string | null;
1465
+ /**
1466
+ * Default reminders applied to events that keep `useDefault`.
1467
+ */
1468
+ defaultReminders: Array<EventReminderOverride>;
1469
+ /**
1470
+ * Connected inbox address, for grouping in multi-inbox pickers.
1471
+ */
1472
+ emailAddress: string;
1473
+ /**
1474
+ * Connected inbox that syncs this calendar.
1475
+ */
1476
+ emailLinkId: string;
1477
+ /**
1478
+ * Persisted Macro calendar identifier.
1479
+ */
1480
+ id: string;
1481
+ /**
1482
+ * Whether this is its account's primary calendar.
1483
+ */
1484
+ isPrimary: boolean;
1485
+ /**
1486
+ * Whether the grant can create and modify events on this calendar.
1487
+ */
1488
+ isWritable: boolean;
1489
+ /**
1490
+ * Provider display name.
1491
+ */
1492
+ name: string;
1493
+ };
1494
+ export type ListCalendarsData = {
1495
+ body?: never;
1496
+ path?: never;
1497
+ query?: never;
1498
+ url: '/calendar/calendars';
1499
+ };
1500
+ export type ListCalendarsErrors = {
1501
+ /**
1502
+ * Authentication required
1503
+ */
1504
+ 401: unknown;
1505
+ /**
1506
+ * Transient failure
1507
+ */
1508
+ 503: CalendarMutationApiError;
1509
+ };
1510
+ export type ListCalendarsError = ListCalendarsErrors[keyof ListCalendarsErrors];
1511
+ export type ListCalendarsResponses = {
1512
+ /**
1513
+ * Calendars visible to the requester
1514
+ */
1515
+ 200: ListCalendarsResponse;
1516
+ };
1517
+ export type ListCalendarsResponse2 = ListCalendarsResponses[keyof ListCalendarsResponses];
1518
+ export type CreateCalendarEventData = {
1519
+ body: CreateCalendarEventRequest;
1520
+ path?: never;
1521
+ query?: never;
1522
+ url: '/calendar/events';
1523
+ };
1524
+ export type CreateCalendarEventErrors = {
1525
+ /**
1526
+ * Invalid event fields
1527
+ */
1528
+ 400: CalendarMutationApiError;
1529
+ /**
1530
+ * Authentication required
1531
+ */
1532
+ 401: unknown;
1533
+ /**
1534
+ * Calendar is read-only or needs reauthorization
1535
+ */
1536
+ 403: CalendarMutationApiError;
1537
+ /**
1538
+ * No writable calendar or the provider rejected the event
1539
+ */
1540
+ 409: CalendarMutationApiError;
1541
+ /**
1542
+ * Transient provider failure
1543
+ */
1544
+ 503: CalendarMutationApiError;
1545
+ };
1546
+ export type CreateCalendarEventError = CreateCalendarEventErrors[keyof CreateCalendarEventErrors];
1547
+ export type CreateCalendarEventResponses = {
1548
+ /**
1549
+ * The created calendar event
1550
+ */
1551
+ 201: CalendarEvent;
1552
+ };
1553
+ export type CreateCalendarEventResponse = CreateCalendarEventResponses[keyof CreateCalendarEventResponses];
1554
+ export type DeleteCalendarEventData = {
1555
+ body?: never;
1556
+ path: {
1557
+ /**
1558
+ * Calendar event entity id
1559
+ */
1560
+ event_id: string;
1561
+ };
1562
+ query?: {
1563
+ /**
1564
+ * Deletion scope; defaults to the entire event or series.
1565
+ */
1566
+ scope?: CalendarDeletionScopeParam;
1567
+ /**
1568
+ * Original-start key of the occurrence a scoped deletion targets.
1569
+ */
1570
+ recurrenceId?: string;
1571
+ };
1572
+ url: '/calendar/events/{event_id}';
1573
+ };
1574
+ export type DeleteCalendarEventErrors = {
1575
+ /**
1576
+ * Authentication required
1577
+ */
1578
+ 401: unknown;
1579
+ /**
1580
+ * Calendar is read-only or needs reauthorization
1581
+ */
1582
+ 403: CalendarMutationApiError;
1583
+ /**
1584
+ * Event not found
1585
+ */
1586
+ 404: CalendarMutationApiError;
1587
+ /**
1588
+ * The provider rejected the deletion
1589
+ */
1590
+ 409: CalendarMutationApiError;
1591
+ /**
1592
+ * Transient provider failure
1593
+ */
1594
+ 503: CalendarMutationApiError;
1595
+ };
1596
+ export type DeleteCalendarEventError = DeleteCalendarEventErrors[keyof DeleteCalendarEventErrors];
1597
+ export type DeleteCalendarEventResponses = {
1598
+ /**
1599
+ * The event was deleted
1600
+ */
1601
+ 204: void;
1602
+ };
1603
+ export type DeleteCalendarEventResponse = DeleteCalendarEventResponses[keyof DeleteCalendarEventResponses];
1604
+ export type UpdateCalendarEventData = {
1605
+ body: UpdateCalendarEventRequest;
1606
+ path: {
1607
+ /**
1608
+ * Calendar event entity id
1609
+ */
1610
+ event_id: string;
1611
+ };
1612
+ query?: never;
1613
+ url: '/calendar/events/{event_id}';
1614
+ };
1615
+ export type UpdateCalendarEventErrors = {
1616
+ /**
1617
+ * Invalid event fields
1618
+ */
1619
+ 400: CalendarMutationApiError;
1620
+ /**
1621
+ * Authentication required
1622
+ */
1623
+ 401: unknown;
1624
+ /**
1625
+ * Calendar is read-only or needs reauthorization
1626
+ */
1627
+ 403: CalendarMutationApiError;
1628
+ /**
1629
+ * Event or targeted occurrence not found
1630
+ */
1631
+ 404: CalendarMutationApiError;
1632
+ /**
1633
+ * The provider rejected the update
1634
+ */
1635
+ 409: CalendarMutationApiError;
1636
+ /**
1637
+ * Transient provider failure
1638
+ */
1639
+ 503: CalendarMutationApiError;
1640
+ };
1641
+ export type UpdateCalendarEventError = UpdateCalendarEventErrors[keyof UpdateCalendarEventErrors];
1642
+ export type UpdateCalendarEventResponses = {
1643
+ /**
1644
+ * The updated calendar event
1645
+ */
1646
+ 200: CalendarEvent;
1647
+ };
1648
+ export type UpdateCalendarEventResponse = UpdateCalendarEventResponses[keyof UpdateCalendarEventResponses];
1649
+ export type RsvpCalendarEventData = {
1650
+ body: RsvpCalendarEventRequest;
1651
+ path: {
1652
+ /**
1653
+ * Calendar event entity id
1654
+ */
1655
+ event_id: string;
1656
+ };
1657
+ query?: never;
1658
+ url: '/calendar/events/{event_id}/rsvp';
1659
+ };
1660
+ export type RsvpCalendarEventErrors = {
1661
+ /**
1662
+ * Authentication required
1663
+ */
1664
+ 401: unknown;
1665
+ /**
1666
+ * Calendar is read-only or needs reauthorization
1667
+ */
1668
+ 403: CalendarMutationApiError;
1669
+ /**
1670
+ * Event not found
1671
+ */
1672
+ 404: CalendarMutationApiError;
1673
+ /**
1674
+ * The connected account is not an attendee
1675
+ */
1676
+ 409: CalendarMutationApiError;
1677
+ /**
1678
+ * Transient provider failure
1679
+ */
1680
+ 503: CalendarMutationApiError;
1681
+ };
1682
+ export type RsvpCalendarEventError = RsvpCalendarEventErrors[keyof RsvpCalendarEventErrors];
1683
+ export type RsvpCalendarEventResponses = {
1684
+ /**
1685
+ * The updated calendar event
1686
+ */
1687
+ 200: CalendarEvent;
1688
+ };
1689
+ export type RsvpCalendarEventResponse = RsvpCalendarEventResponses[keyof RsvpCalendarEventResponses];
1690
+ export type GetAttachmentData = {
1691
+ body?: never;
1692
+ path: {
1693
+ /**
1694
+ * Attachment ID.
1695
+ */
1696
+ id: string;
1697
+ };
1698
+ query?: never;
1699
+ url: '/email/attachments/{id}';
1700
+ };
1701
+ export type GetAttachmentErrors = {
1702
+ 400: ErrorResponse;
1703
+ 401: ErrorResponse;
1704
+ 403: ErrorResponse;
1705
+ 404: ErrorResponse;
1706
+ 409: ErrorResponse;
1707
+ 429: ErrorResponse;
1708
+ 500: ErrorResponse;
1709
+ };
1710
+ export type GetAttachmentError = GetAttachmentErrors[keyof GetAttachmentErrors];
1711
+ export type GetAttachmentResponses = {
1712
+ 200: GetAttachmentResponse;
1713
+ };
1714
+ export type GetAttachmentResponse2 = GetAttachmentResponses[keyof GetAttachmentResponses];
1715
+ export type GetAttachmentDocumentIdData = {
1716
+ body?: never;
1717
+ path: {
1718
+ /**
1719
+ * Attachment ID.
1720
+ */
1721
+ id: string;
1722
+ };
1723
+ query?: never;
1724
+ url: '/email/attachments/{id}/document_id';
1725
+ };
1726
+ export type GetAttachmentDocumentIdErrors = {
1727
+ 400: ErrorResponse;
1728
+ 401: ErrorResponse;
1729
+ 404: ErrorResponse;
1730
+ 500: ErrorResponse;
1731
+ };
1732
+ export type GetAttachmentDocumentIdError = GetAttachmentDocumentIdErrors[keyof GetAttachmentDocumentIdErrors];
1733
+ export type GetAttachmentDocumentIdResponses = {
1734
+ 200: GetAttachmentDocumentIdResponse;
1735
+ };
1736
+ export type GetAttachmentDocumentIdResponse2 = GetAttachmentDocumentIdResponses[keyof GetAttachmentDocumentIdResponses];
1737
+ export type CancelBackfillGmailData = {
1738
+ body: CancelBackfillParams;
1739
+ path?: never;
1740
+ query?: never;
1741
+ url: '/email/backfill/gmail';
1742
+ };
1743
+ export type CancelBackfillGmailErrors = {
1744
+ 404: ErrorResponse;
1745
+ 429: ErrorResponse;
1746
+ 500: ErrorResponse;
1747
+ };
1748
+ export type CancelBackfillGmailError = CancelBackfillGmailErrors[keyof CancelBackfillGmailErrors];
1749
+ export type CancelBackfillGmailResponses = {
1750
+ 201: EmptyResponse;
1751
+ };
1752
+ export type CancelBackfillGmailResponse = CancelBackfillGmailResponses[keyof CancelBackfillGmailResponses];
1753
+ export type ListBackfillGmailData = {
1754
+ body?: never;
1755
+ path?: never;
1756
+ query?: never;
1757
+ url: '/email/backfill/gmail';
1758
+ };
1759
+ export type ListBackfillGmailErrors = {
1760
+ 401: ErrorResponse;
1761
+ 500: ErrorResponse;
1762
+ };
1763
+ export type ListBackfillGmailError = ListBackfillGmailErrors[keyof ListBackfillGmailErrors];
1764
+ export type ListBackfillGmailResponses = {
1765
+ 200: ListBackfillJobsResponse;
1766
+ };
1767
+ export type ListBackfillGmailResponse = ListBackfillGmailResponses[keyof ListBackfillGmailResponses];
1768
+ export type GetBackfillGmailActiveData = {
1769
+ body?: never;
1770
+ path?: never;
1771
+ query?: never;
1772
+ url: '/email/backfill/gmail/active';
1773
+ };
1774
+ export type GetBackfillGmailActiveErrors = {
1775
+ 401: ErrorResponse;
1776
+ 500: ErrorResponse;
1777
+ };
1778
+ export type GetBackfillGmailActiveError = GetBackfillGmailActiveErrors[keyof GetBackfillGmailActiveErrors];
1779
+ export type GetBackfillGmailActiveResponses = {
1780
+ 200: GetActiveBackfillJobResponse;
1781
+ 204: EmptyResponse;
1782
+ };
1783
+ export type GetBackfillGmailActiveResponse = GetBackfillGmailActiveResponses[keyof GetBackfillGmailActiveResponses];
1784
+ export type GetBackfillGmailData = {
1785
+ body?: never;
1786
+ path: {
1787
+ /**
1788
+ * Job ID.
1789
+ */
1790
+ id: string;
1791
+ };
1792
+ query?: never;
1793
+ url: '/email/backfill/gmail/{id}';
1794
+ };
1795
+ export type GetBackfillGmailErrors = {
1796
+ 401: ErrorResponse;
1797
+ 404: ErrorResponse;
1798
+ 500: ErrorResponse;
1799
+ };
1800
+ export type GetBackfillGmailError = GetBackfillGmailErrors[keyof GetBackfillGmailErrors];
1801
+ export type GetBackfillGmailResponses = {
1802
+ 200: GetBackfillJobResponse;
1803
+ };
1804
+ export type GetBackfillGmailResponse = GetBackfillGmailResponses[keyof GetBackfillGmailResponses];
1805
+ export type ListContactsData = {
1806
+ body?: never;
1807
+ path?: never;
1808
+ query?: never;
1809
+ url: '/email/contacts';
1810
+ };
1811
+ export type ListContactsErrors = {
1812
+ 401: ErrorResponse;
1813
+ 500: ErrorResponse;
1814
+ };
1815
+ export type ListContactsError = ListContactsErrors[keyof ListContactsErrors];
1816
+ export type ListContactsResponses = {
1817
+ 200: ListContactsResponse;
1818
+ };
1819
+ export type ListContactsResponse2 = ListContactsResponses[keyof ListContactsResponses];
1820
+ export type BlockSenderData = {
1821
+ body: BlockSenderRequest;
1822
+ path?: never;
1823
+ query?: never;
1824
+ url: '/email/contacts/block';
1825
+ };
1826
+ export type BlockSenderErrors = {
1827
+ 400: ErrorResponse;
1828
+ 401: ErrorResponse;
1829
+ 500: ErrorResponse;
1830
+ };
1831
+ export type BlockSenderError = BlockSenderErrors[keyof BlockSenderErrors];
1832
+ export type BlockSenderResponses = {
1833
+ 200: unknown;
1834
+ };
1835
+ export type ListBlockedSendersData = {
1836
+ body?: never;
1837
+ path?: never;
1838
+ query?: never;
1839
+ url: '/email/contacts/blocked';
1840
+ };
1841
+ export type ListBlockedSendersErrors = {
1842
+ 401: ErrorResponse;
1843
+ 403: ErrorResponse;
1844
+ 404: ErrorResponse;
1845
+ 409: ErrorResponse;
1846
+ 429: ErrorResponse;
1847
+ 500: ErrorResponse;
1848
+ };
1849
+ export type ListBlockedSendersError = ListBlockedSendersErrors[keyof ListBlockedSendersErrors];
1850
+ export type ListBlockedSendersResponses = {
1851
+ 200: ListBlockedResponse;
1852
+ };
1853
+ export type ListBlockedSendersResponse = ListBlockedSendersResponses[keyof ListBlockedSendersResponses];
1854
+ export type UnblockSenderData = {
1855
+ body: UnblockSenderRequest;
1856
+ path?: never;
1857
+ query?: never;
1858
+ url: '/email/contacts/unblock';
1859
+ };
1860
+ export type UnblockSenderErrors = {
1861
+ 400: ErrorResponse;
1862
+ 401: ErrorResponse;
1863
+ 500: ErrorResponse;
1864
+ };
1865
+ export type UnblockSenderError = UnblockSenderErrors[keyof UnblockSenderErrors];
1866
+ export type UnblockSenderResponses = {
1867
+ 204: void;
1868
+ };
1869
+ export type UnblockSenderResponse = UnblockSenderResponses[keyof UnblockSenderResponses];
1870
+ export type CreateDraftData = {
1871
+ body: CreateDraftRequest;
1872
+ path?: never;
1873
+ query?: never;
1874
+ url: '/email/drafts';
1875
+ };
1876
+ export type CreateDraftErrors = {
1877
+ 400: ErrorResponse;
1878
+ 404: ErrorResponse;
1879
+ 500: ErrorResponse;
1880
+ };
1881
+ export type CreateDraftError = CreateDraftErrors[keyof CreateDraftErrors];
1882
+ export type CreateDraftResponses = {
1883
+ 201: CreateDraftResponse;
1884
+ };
1885
+ export type CreateDraftResponse2 = CreateDraftResponses[keyof CreateDraftResponses];
1886
+ export type GetScheduledMessagesData = {
1887
+ body?: never;
1888
+ path?: never;
1889
+ query?: {
1890
+ /**
1891
+ * The number of scheduled messages to skip.
1892
+ */
1893
+ offset?: number;
1894
+ /**
1895
+ * The maximum number of scheduled messages to return.
1896
+ */
1897
+ limit?: number;
1898
+ };
1899
+ url: '/email/drafts/scheduled';
1900
+ };
1901
+ export type GetScheduledMessagesErrors = {
1902
+ 400: ErrorResponse;
1903
+ 401: ErrorResponse;
1904
+ 500: ErrorResponse;
1905
+ };
1906
+ export type GetScheduledMessagesError = GetScheduledMessagesErrors[keyof GetScheduledMessagesErrors];
1907
+ export type GetScheduledMessagesResponses = {
1908
+ 200: GetScheduledResponse;
1909
+ };
1910
+ export type GetScheduledMessagesResponse = GetScheduledMessagesResponses[keyof GetScheduledMessagesResponses];
1911
+ export type UpsertScheduledMessageData = {
1912
+ body: UpsertScheduledRequest;
1913
+ path: {
1914
+ /**
1915
+ * The ID of the draft message to schedule
1916
+ */
1917
+ id: string;
1918
+ };
1919
+ query?: never;
1920
+ url: '/email/drafts/scheduled/{id}';
1921
+ };
1922
+ export type UpsertScheduledMessageErrors = {
1923
+ 401: ErrorResponse;
1924
+ 404: ErrorResponse;
1925
+ 500: ErrorResponse;
1926
+ };
1927
+ export type UpsertScheduledMessageError = UpsertScheduledMessageErrors[keyof UpsertScheduledMessageErrors];
1928
+ export type UpsertScheduledMessageResponses = {
1929
+ 200: UpsertScheduledResponse;
1930
+ };
1931
+ export type UpsertScheduledMessageResponse = UpsertScheduledMessageResponses[keyof UpsertScheduledMessageResponses];
1932
+ export type DeleteScheduledDraftData = {
1933
+ body?: never;
1934
+ path: {
1935
+ /**
1936
+ * The ID of the draft
1937
+ */
1938
+ message_id: string;
1939
+ };
1940
+ query?: never;
1941
+ url: '/email/drafts/scheduled/{message_id}';
1942
+ };
1943
+ export type DeleteScheduledDraftErrors = {
1944
+ 400: ErrorResponse;
1945
+ 401: ErrorResponse;
1946
+ 404: ErrorResponse;
1947
+ 500: ErrorResponse;
1948
+ };
1949
+ export type DeleteScheduledDraftError = DeleteScheduledDraftErrors[keyof DeleteScheduledDraftErrors];
1950
+ export type DeleteScheduledDraftResponses = {
1951
+ /**
1952
+ * Scheduled send deleted successfully
1953
+ */
1954
+ 204: void;
1955
+ };
1956
+ export type DeleteScheduledDraftResponse = DeleteScheduledDraftResponses[keyof DeleteScheduledDraftResponses];
1957
+ export type DeleteDraftData = {
1958
+ body?: never;
1959
+ path: {
1960
+ /**
1961
+ * Draft ID.
1962
+ */
1963
+ id: string;
1964
+ };
1965
+ query?: never;
1966
+ url: '/email/drafts/{id}';
1967
+ };
1968
+ export type DeleteDraftErrors = {
1969
+ 400: ErrorResponse;
1970
+ 401: ErrorResponse;
1971
+ 404: ErrorResponse;
1972
+ 500: ErrorResponse;
1973
+ };
1974
+ export type DeleteDraftError = DeleteDraftErrors[keyof DeleteDraftErrors];
1975
+ export type DeleteDraftResponses = {
1976
+ 204: EmptyResponse;
1977
+ };
1978
+ export type DeleteDraftResponse = DeleteDraftResponses[keyof DeleteDraftResponses];
1979
+ export type AddDraftAttachmentData = {
1980
+ body: AddDraftAttachmentRequest;
1981
+ path: {
1982
+ /**
1983
+ * The ID of the draft to add the attachment to.
1984
+ */
1985
+ id: string;
1986
+ };
1987
+ query?: never;
1988
+ url: '/email/drafts/{id}/attachments';
1989
+ };
1990
+ export type AddDraftAttachmentErrors = {
1991
+ 400: ErrorResponse;
1992
+ 401: ErrorResponse;
1993
+ 404: ErrorResponse;
1994
+ 500: ErrorResponse;
1995
+ };
1996
+ export type AddDraftAttachmentError = AddDraftAttachmentErrors[keyof AddDraftAttachmentErrors];
1997
+ export type AddDraftAttachmentResponses = {
1998
+ 201: AddDraftAttachmentResponse;
1999
+ };
2000
+ export type AddDraftAttachmentResponse2 = AddDraftAttachmentResponses[keyof AddDraftAttachmentResponses];
2001
+ export type RemoveDraftAttachmentData = {
2002
+ body?: never;
2003
+ path: {
2004
+ /**
2005
+ * The ID of the draft to remove the attachment from.
2006
+ */
2007
+ id: string;
2008
+ /**
2009
+ * The ID of the attachment to remove.
2010
+ */
2011
+ attachment_id: string;
2012
+ };
2013
+ query?: never;
2014
+ url: '/email/drafts/{id}/attachments/{attachment_id}';
2015
+ };
2016
+ export type RemoveDraftAttachmentErrors = {
2017
+ 400: ErrorResponse;
2018
+ 401: ErrorResponse;
2019
+ 404: ErrorResponse;
2020
+ 500: ErrorResponse;
2021
+ };
2022
+ export type RemoveDraftAttachmentError = RemoveDraftAttachmentErrors[keyof RemoveDraftAttachmentErrors];
2023
+ export type RemoveDraftAttachmentResponses = {
2024
+ 201: EmptyResponse;
2025
+ };
2026
+ export type RemoveDraftAttachmentResponse = RemoveDraftAttachmentResponses[keyof RemoveDraftAttachmentResponses];
2027
+ export type AddForwardedAttachmentData = {
2028
+ body: AddForwardedAttachmentRequest;
2029
+ path: {
2030
+ /**
2031
+ * The ID of the draft to add the forwarded attachment to.
2032
+ */
2033
+ id: string;
2034
+ };
2035
+ query?: never;
2036
+ url: '/email/drafts/{id}/forwarded-attachments';
2037
+ };
2038
+ export type AddForwardedAttachmentErrors = {
2039
+ 404: ErrorResponse;
2040
+ 500: ErrorResponse;
2041
+ };
2042
+ export type AddForwardedAttachmentError = AddForwardedAttachmentErrors[keyof AddForwardedAttachmentErrors];
2043
+ export type AddForwardedAttachmentResponses = {
2044
+ 201: AddForwardedAttachmentResponse;
2045
+ };
2046
+ export type AddForwardedAttachmentResponse2 = AddForwardedAttachmentResponses[keyof AddForwardedAttachmentResponses];
2047
+ export type RemoveForwardedAttachmentData = {
2048
+ body?: never;
2049
+ path: {
2050
+ /**
2051
+ * The ID of the draft to remove the forwarded attachment from.
2052
+ */
2053
+ id: string;
2054
+ /**
2055
+ * The ID of the forwarded attachment to remove.
2056
+ */
2057
+ attachment_id: string;
2058
+ };
2059
+ query?: never;
2060
+ url: '/email/drafts/{id}/forwarded-attachments/{attachment_id}';
2061
+ };
2062
+ export type RemoveForwardedAttachmentErrors = {
2063
+ 404: ErrorResponse;
2064
+ 500: ErrorResponse;
2065
+ };
2066
+ export type RemoveForwardedAttachmentError = RemoveForwardedAttachmentErrors[keyof RemoveForwardedAttachmentErrors];
2067
+ export type RemoveForwardedAttachmentResponses = {
2068
+ 204: void;
2069
+ };
2070
+ export type RemoveForwardedAttachmentResponse = RemoveForwardedAttachmentResponses[keyof RemoveForwardedAttachmentResponses];
2071
+ export type ListEmailFiltersData = {
2072
+ body?: never;
2073
+ path?: never;
2074
+ query?: never;
2075
+ url: '/email/filters';
2076
+ };
2077
+ export type ListEmailFiltersErrors = {
2078
+ 401: ErrorResponse;
2079
+ 500: ErrorResponse;
2080
+ };
2081
+ export type ListEmailFiltersError = ListEmailFiltersErrors[keyof ListEmailFiltersErrors];
2082
+ export type ListEmailFiltersResponses = {
2083
+ 200: ListEmailFiltersResponse;
2084
+ };
2085
+ export type ListEmailFiltersResponse2 = ListEmailFiltersResponses[keyof ListEmailFiltersResponses];
2086
+ export type UpsertEmailFilterData = {
2087
+ body: UpsertEmailFilterRequest;
2088
+ path?: never;
2089
+ query?: never;
2090
+ url: '/email/filters';
2091
+ };
2092
+ export type UpsertEmailFilterErrors = {
2093
+ 400: ErrorResponse;
2094
+ 401: ErrorResponse;
2095
+ 500: ErrorResponse;
2096
+ };
2097
+ export type UpsertEmailFilterError = UpsertEmailFilterErrors[keyof UpsertEmailFilterErrors];
2098
+ export type UpsertEmailFilterResponses = {
2099
+ 200: UpsertEmailFilterResponse;
2100
+ };
2101
+ export type UpsertEmailFilterResponse2 = UpsertEmailFilterResponses[keyof UpsertEmailFilterResponses];
2102
+ export type DeleteEmailFilterData = {
2103
+ body?: never;
2104
+ path: {
2105
+ /**
2106
+ * Filter ID.
2107
+ */
2108
+ id: string;
2109
+ };
2110
+ query?: never;
2111
+ url: '/email/filters/{id}';
2112
+ };
2113
+ export type DeleteEmailFilterErrors = {
2114
+ 401: ErrorResponse;
2115
+ 404: ErrorResponse;
2116
+ 500: ErrorResponse;
2117
+ };
2118
+ export type DeleteEmailFilterError = DeleteEmailFilterErrors[keyof DeleteEmailFilterErrors];
2119
+ export type DeleteEmailFilterResponses = {
2120
+ 204: void;
2121
+ };
2122
+ export type DeleteEmailFilterResponse = DeleteEmailFilterResponses[keyof DeleteEmailFilterResponses];
2123
+ export type InitUserData = {
2124
+ body?: never;
2125
+ path?: never;
2126
+ query?: {
2127
+ /**
2128
+ * **OPTIONAL**. The in_progress_user_link id from a /link/gmail flow.
2129
+ */
2130
+ link_id?: string;
2131
+ /**
2132
+ * **OPTIONAL**. Confirms promoting a mailbox already connected by another user into a shared inbox.
2133
+ */
2134
+ force_share?: boolean;
2135
+ };
2136
+ url: '/email/init';
2137
+ };
2138
+ export type InitUserErrors = {
2139
+ 400: InitErrorCodeResponse;
2140
+ 401: ErrorResponse;
2141
+ 409: SharedInboxConflictResponse;
2142
+ 429: ErrorResponse;
2143
+ 500: ErrorResponse;
2144
+ };
2145
+ export type InitUserError = InitUserErrors[keyof InitUserErrors];
2146
+ export type InitUserResponses = {
2147
+ 200: InitResponse;
2148
+ };
2149
+ export type InitUserResponse = InitUserResponses[keyof InitUserResponses];
2150
+ export type ListLabelsData = {
2151
+ body?: never;
2152
+ path?: never;
2153
+ query?: never;
2154
+ url: '/email/labels';
2155
+ };
2156
+ export type ListLabelsErrors = {
2157
+ 401: ErrorResponse;
2158
+ 500: ErrorResponse;
2159
+ };
2160
+ export type ListLabelsError = ListLabelsErrors[keyof ListLabelsErrors];
2161
+ export type ListLabelsResponses = {
2162
+ 200: ListLabelsResponse;
2163
+ };
2164
+ export type ListLabelsResponse2 = ListLabelsResponses[keyof ListLabelsResponses];
2165
+ export type CreateLabelData = {
2166
+ body: CreateLabelRequest;
2167
+ path?: never;
2168
+ query?: never;
2169
+ url: '/email/labels';
2170
+ };
2171
+ export type CreateLabelErrors = {
2172
+ 400: ErrorResponse;
2173
+ 401: ErrorResponse;
2174
+ 403: ErrorResponse;
2175
+ 404: ErrorResponse;
2176
+ 409: ErrorResponse;
2177
+ 429: ErrorResponse;
2178
+ 500: ErrorResponse;
2179
+ };
2180
+ export type CreateLabelError = CreateLabelErrors[keyof CreateLabelErrors];
2181
+ export type CreateLabelResponses = {
2182
+ 201: CreateLabelResponse;
2183
+ };
2184
+ export type CreateLabelResponse2 = CreateLabelResponses[keyof CreateLabelResponses];
2185
+ export type DeleteLabelData = {
2186
+ body?: never;
2187
+ path: {
2188
+ /**
2189
+ * Label ID.
2190
+ */
2191
+ id: string;
2192
+ };
2193
+ query?: never;
2194
+ url: '/email/labels/{id}';
2195
+ };
2196
+ export type DeleteLabelErrors = {
2197
+ 400: ErrorResponse;
2198
+ 401: ErrorResponse;
2199
+ 404: ErrorResponse;
2200
+ 500: ErrorResponse;
2201
+ };
2202
+ export type DeleteLabelError = DeleteLabelErrors[keyof DeleteLabelErrors];
2203
+ export type DeleteLabelResponses = {
2204
+ 204: EmptyResponse;
2205
+ };
2206
+ export type DeleteLabelResponse = DeleteLabelResponses[keyof DeleteLabelResponses];
2207
+ export type ListLinksData = {
2208
+ body?: never;
2209
+ path?: never;
2210
+ query?: never;
2211
+ url: '/email/links';
2212
+ };
2213
+ export type ListLinksErrors = {
2214
+ 401: ErrorResponse;
2215
+ 404: ErrorResponse;
2216
+ 500: ErrorResponse;
2217
+ };
2218
+ export type ListLinksError = ListLinksErrors[keyof ListLinksErrors];
2219
+ export type ListLinksResponses = {
2220
+ 200: ListLinksResponse;
2221
+ };
2222
+ export type ListLinksResponse2 = ListLinksResponses[keyof ListLinksResponses];
2223
+ export type HealthCheckLinksData = {
2224
+ body?: never;
2225
+ path?: never;
2226
+ query?: never;
2227
+ url: '/email/links/health-check';
2228
+ };
2229
+ export type HealthCheckLinksErrors = {
2230
+ 401: ErrorResponse;
2231
+ 500: ErrorResponse;
2232
+ };
2233
+ export type HealthCheckLinksError = HealthCheckLinksErrors[keyof HealthCheckLinksErrors];
2234
+ export type HealthCheckLinksResponses = {
2235
+ 202: EmptyResponse;
2236
+ };
2237
+ export type HealthCheckLinksResponse = HealthCheckLinksResponses[keyof HealthCheckLinksResponses];
2238
+ export type DeleteLinkData = {
2239
+ body?: never;
2240
+ path: {
2241
+ /**
2242
+ * Inbox link ID.
2243
+ */
2244
+ link_id: string;
2245
+ };
2246
+ query?: never;
2247
+ url: '/email/links/{link_id}';
2248
+ };
2249
+ export type DeleteLinkErrors = {
2250
+ 401: ErrorResponse;
2251
+ 403: ErrorResponse;
2252
+ 404: ErrorResponse;
2253
+ 500: ErrorResponse;
2254
+ };
2255
+ export type DeleteLinkError = DeleteLinkErrors[keyof DeleteLinkErrors];
2256
+ export type DeleteLinkResponses = {
2257
+ 204: EmptyResponse;
2258
+ };
2259
+ export type DeleteLinkResponse = DeleteLinkResponses[keyof DeleteLinkResponses];
2260
+ export type DisableLinkCalendarData = {
2261
+ body?: never;
2262
+ path: {
2263
+ /**
2264
+ * Inbox link ID.
2265
+ */
2266
+ link_id: string;
2267
+ };
2268
+ query?: never;
2269
+ url: '/email/links/{link_id}/calendar';
2270
+ };
2271
+ export type DisableLinkCalendarErrors = {
2272
+ 401: ErrorResponse;
2273
+ 403: ErrorResponse;
2274
+ 404: ErrorResponse;
2275
+ 500: ErrorResponse;
2276
+ };
2277
+ export type DisableLinkCalendarError = DisableLinkCalendarErrors[keyof DisableLinkCalendarErrors];
2278
+ export type DisableLinkCalendarResponses = {
2279
+ 204: EmptyResponse;
2280
+ };
2281
+ export type DisableLinkCalendarResponse = DisableLinkCalendarResponses[keyof DisableLinkCalendarResponses];
2282
+ export type ResyncLinkData = {
2283
+ body?: never;
2284
+ path: {
2285
+ /**
2286
+ * Inbox link ID.
2287
+ */
2288
+ link_id: string;
2289
+ };
2290
+ query?: never;
2291
+ url: '/email/links/{link_id}/resync';
2292
+ };
2293
+ export type ResyncLinkErrors = {
2294
+ 401: ErrorResponse;
2295
+ 403: ErrorResponse;
2296
+ 404: ErrorResponse;
2297
+ 500: ErrorResponse;
2298
+ };
2299
+ export type ResyncLinkError = ResyncLinkErrors[keyof ResyncLinkErrors];
2300
+ export type ResyncLinkResponses = {
2301
+ 200: ResyncResponse;
2302
+ };
2303
+ export type ResyncLinkResponse = ResyncLinkResponses[keyof ResyncLinkResponses];
2304
+ export type SendMessageData = {
2305
+ body: SendMessageRequest;
2306
+ path?: never;
2307
+ query?: never;
2308
+ url: '/email/messages';
2309
+ };
2310
+ export type SendMessageErrors = {
2311
+ 400: ErrorResponse;
2312
+ 404: ErrorResponse;
2313
+ 500: ErrorResponse;
2314
+ };
2315
+ export type SendMessageError = SendMessageErrors[keyof SendMessageErrors];
2316
+ export type SendMessageResponses = {
2317
+ 201: SendMessageResponse;
2318
+ };
2319
+ export type SendMessageResponse2 = SendMessageResponses[keyof SendMessageResponses];
2320
+ export type GetMessagesBatchData = {
2321
+ body: Array<string>;
2322
+ path?: never;
2323
+ query?: never;
2324
+ url: '/email/messages/batch';
2325
+ };
2326
+ export type GetMessagesBatchErrors = {
2327
+ 400: ErrorResponse;
2328
+ 401: ErrorResponse;
2329
+ 404: ErrorResponse;
2330
+ 500: ErrorResponse;
2331
+ };
2332
+ export type GetMessagesBatchError = GetMessagesBatchErrors[keyof GetMessagesBatchErrors];
2333
+ export type GetMessagesBatchResponses = {
2334
+ 200: Array<ParsedMessage>;
2335
+ };
2336
+ export type GetMessagesBatchResponse = GetMessagesBatchResponses[keyof GetMessagesBatchResponses];
2337
+ export type AddRemoveLabelData = {
2338
+ body: UpdateLabelBatchRequest;
2339
+ path?: never;
2340
+ query?: never;
2341
+ url: '/email/messages/labels';
2342
+ };
2343
+ export type AddRemoveLabelErrors = {
2344
+ 400: ErrorResponse;
2345
+ 401: ErrorResponse;
2346
+ 404: ErrorResponse;
2347
+ 500: ErrorResponse;
2348
+ };
2349
+ export type AddRemoveLabelError = AddRemoveLabelErrors[keyof AddRemoveLabelErrors];
2350
+ export type AddRemoveLabelResponses = {
2351
+ 200: UpdateLabelBatchResponse;
2352
+ };
2353
+ export type AddRemoveLabelResponse = AddRemoveLabelResponses[keyof AddRemoveLabelResponses];
2354
+ export type GetMessageData = {
2355
+ body?: never;
2356
+ path: {
2357
+ /**
2358
+ * Message ID.
2359
+ */
2360
+ id: string;
2361
+ };
2362
+ query?: never;
2363
+ url: '/email/messages/{id}';
2364
+ };
2365
+ export type GetMessageErrors = {
2366
+ 400: ErrorResponse;
2367
+ 401: ErrorResponse;
2368
+ 404: ErrorResponse;
2369
+ 500: ErrorResponse;
2370
+ };
2371
+ export type GetMessageError = GetMessageErrors[keyof GetMessageErrors];
2372
+ export type GetMessageResponses = {
2373
+ 200: ParsedMessage;
2374
+ };
2375
+ export type GetMessageResponse = GetMessageResponses[keyof GetMessageResponses];
2376
+ export type PatchSettingsData = {
2377
+ body: PatchSettingsRequest;
2378
+ path?: never;
2379
+ query?: never;
2380
+ url: '/email/settings';
2381
+ };
2382
+ export type PatchSettingsErrors = {
2383
+ 400: ErrorResponse;
2384
+ 401: ErrorResponse;
2385
+ 422: UnresolvedSignatureImagesError;
2386
+ 500: ErrorResponse;
2387
+ };
2388
+ export type PatchSettingsError = PatchSettingsErrors[keyof PatchSettingsErrors];
2389
+ export type PatchSettingsResponses = {
2390
+ 200: PatchSettingsResponse;
2391
+ };
2392
+ export type PatchSettingsResponse2 = PatchSettingsResponses[keyof PatchSettingsResponses];
2393
+ export type DisableSyncData = {
2394
+ body?: never;
2395
+ path?: never;
2396
+ query?: never;
2397
+ url: '/email/sync';
2398
+ };
2399
+ export type DisableSyncErrors = {
2400
+ 400: ErrorResponse;
2401
+ 401: ErrorResponse;
2402
+ 500: ErrorResponse;
2403
+ };
2404
+ export type DisableSyncError = DisableSyncErrors[keyof DisableSyncErrors];
2405
+ export type DisableSyncResponses = {
2406
+ 204: EmptyResponse;
2407
+ };
2408
+ export type DisableSyncResponse = DisableSyncResponses[keyof DisableSyncResponses];
2409
+ export type PreviewsInboxCursorData = {
2410
+ body?: never;
2411
+ path: {
2412
+ /**
2413
+ * View type. Supported values: inbox, sent, drafts, starred, all, important, other, user:<label>
2414
+ */
2415
+ view: string;
2416
+ };
2417
+ query?: {
2418
+ /**
2419
+ * Limit for pagination. Default is 20. Max is 500.
2420
+ */
2421
+ limit?: number;
2422
+ /**
2423
+ * Sort method. Options are viewed_at, created_at, updated_at, viewed_updated. Defaults to viewed_updated.
2424
+ */
2425
+ sort_method?: ApiSortMethod;
2426
+ /**
2427
+ * Cursor value. Base64 encoded timestamp and item id, separated by |.
2428
+ */
2429
+ cursor?: string;
2430
+ };
2431
+ url: '/email/threads/previews/cursor/{view}';
2432
+ };
2433
+ export type PreviewsInboxCursorErrors = {
2434
+ 400: ErrorResponse;
2435
+ 401: ErrorResponse;
2436
+ 500: ErrorResponse;
2437
+ };
2438
+ export type PreviewsInboxCursorError = PreviewsInboxCursorErrors[keyof PreviewsInboxCursorErrors];
2439
+ export type PreviewsInboxCursorResponses = {
2440
+ 200: ApiPaginatedThreadCursor;
2441
+ };
2442
+ export type PreviewsInboxCursorResponse = PreviewsInboxCursorResponses[keyof PreviewsInboxCursorResponses];
2443
+ export type ArchiveThreadData = {
2444
+ body: ArchiveThreadRequest;
2445
+ path: {
2446
+ id: string;
2447
+ };
2448
+ query?: never;
2449
+ url: '/email/threads/{id}/archived';
2450
+ };
2451
+ export type ArchiveThreadErrors = {
2452
+ 401: ErrorResponse;
2453
+ 404: ErrorResponse;
2454
+ 500: ErrorResponse;
2455
+ };
2456
+ export type ArchiveThreadError = ArchiveThreadErrors[keyof ArchiveThreadErrors];
2457
+ export type ArchiveThreadResponses = {
2458
+ 200: EmptyResponse;
2459
+ };
2460
+ export type ArchiveThreadResponse = ArchiveThreadResponses[keyof ArchiveThreadResponses];
2461
+ export type AddRemoveThreadLabelData = {
2462
+ body: UpdateThreadLabelRequest;
2463
+ path: {
2464
+ /**
2465
+ * Thread ID.
2466
+ */
2467
+ id: string;
2468
+ };
2469
+ query?: never;
2470
+ url: '/email/threads/{id}/labels';
2471
+ };
2472
+ export type AddRemoveThreadLabelErrors = {
2473
+ 400: ErrorResponse;
2474
+ 401: ErrorResponse;
2475
+ 404: ErrorResponse;
2476
+ 500: ErrorResponse;
2477
+ };
2478
+ export type AddRemoveThreadLabelError = AddRemoveThreadLabelErrors[keyof AddRemoveThreadLabelErrors];
2479
+ export type AddRemoveThreadLabelResponses = {
2480
+ 200: UpdateThreadLabelsResponse;
2481
+ };
2482
+ export type AddRemoveThreadLabelResponse = AddRemoveThreadLabelResponses[keyof AddRemoveThreadLabelResponses];
2483
+ export type GetThreadMessagesHandlerData = {
2484
+ body?: never;
2485
+ path: {
2486
+ /**
2487
+ * Thread ID
2488
+ */
2489
+ id: string;
2490
+ };
2491
+ query?: {
2492
+ /**
2493
+ * Filter messages after this date
2494
+ */
2495
+ since?: string;
2496
+ /**
2497
+ * Limit number of messages returned
2498
+ */
2499
+ limit?: number;
2500
+ };
2501
+ url: '/email/threads/{id}/messages';
2502
+ };
2503
+ export type GetThreadMessagesHandlerErrors = {
2504
+ /**
2505
+ * Bad Request
2506
+ */
2507
+ 400: ErrorResponse;
2508
+ /**
2509
+ * Unauthorized
2510
+ */
2511
+ 401: ErrorResponse;
2512
+ /**
2513
+ * Not Found
2514
+ */
2515
+ 404: ErrorResponse;
2516
+ /**
2517
+ * Internal Server Error
2518
+ */
2519
+ 500: ErrorResponse;
2520
+ };
2521
+ export type GetThreadMessagesHandlerError = GetThreadMessagesHandlerErrors[keyof GetThreadMessagesHandlerErrors];
2522
+ export type GetThreadMessagesHandlerResponses = {
2523
+ /**
2524
+ * OK
2525
+ */
2526
+ 200: Array<ParsedMessage>;
2527
+ };
2528
+ export type GetThreadMessagesHandlerResponse = GetThreadMessagesHandlerResponses[keyof GetThreadMessagesHandlerResponses];
2529
+ export type ThreadSeenData = {
2530
+ body?: never;
2531
+ path: {
2532
+ /**
2533
+ * Thread ID.
2534
+ */
2535
+ id: string;
2536
+ };
2537
+ query?: never;
2538
+ url: '/email/threads/{id}/seen';
2539
+ };
2540
+ export type ThreadSeenErrors = {
2541
+ 401: ErrorResponse;
2542
+ 404: ErrorResponse;
2543
+ 500: ErrorResponse;
2544
+ };
2545
+ export type ThreadSeenError = ThreadSeenErrors[keyof ThreadSeenErrors];
2546
+ export type ThreadSeenResponses = {
2547
+ 200: EmptyResponse;
2548
+ };
2549
+ export type ThreadSeenResponse = ThreadSeenResponses[keyof ThreadSeenResponses];
2550
+ export type GetThreadData = {
2551
+ body?: never;
2552
+ path: {
2553
+ /**
2554
+ * Thread ID
2555
+ */
2556
+ thread_id: string;
2557
+ };
2558
+ query?: {
2559
+ /**
2560
+ * Offset for message pagination. Default is 0.
2561
+ */
2562
+ offset?: number;
2563
+ /**
2564
+ * Limit for message pagination. Default is 5, max 100.
2565
+ */
2566
+ limit?: number;
2567
+ };
2568
+ url: '/email/threads/{thread_id}';
2569
+ };
2570
+ export type GetThreadErrors = {
2571
+ 400: ErrorResponse;
2572
+ 401: ErrorResponse;
2573
+ 404: ErrorResponse;
2574
+ 500: ErrorResponse;
2575
+ };
2576
+ export type GetThreadError = GetThreadErrors[keyof GetThreadErrors];
2577
+ export type GetThreadResponses = {
2578
+ 200: GetThreadResponse;
2579
+ };
2580
+ export type GetThreadResponse2 = GetThreadResponses[keyof GetThreadResponses];
2581
+ export type UpdateThreadProjectData = {
2582
+ body: UpdateThreadProjectRequest;
2583
+ path: {
2584
+ /**
2585
+ * Thread ID
2586
+ */
2587
+ thread_id: string;
2588
+ };
2589
+ query?: never;
2590
+ url: '/email/threads/{thread_id}/project';
2591
+ };
2592
+ export type UpdateThreadProjectErrors = {
2593
+ 401: ErrorResponse;
2594
+ 404: ErrorResponse;
2595
+ 500: ErrorResponse;
2596
+ };
2597
+ export type UpdateThreadProjectError = UpdateThreadProjectErrors[keyof UpdateThreadProjectErrors];
2598
+ export type UpdateThreadProjectResponses = {
2599
+ 200: UpdateThreadProjectResponse;
2600
+ };
2601
+ export type UpdateThreadProjectResponse2 = UpdateThreadProjectResponses[keyof UpdateThreadProjectResponses];
2602
+ export type HealthHandlerData = {
2603
+ body?: never;
2604
+ path?: never;
2605
+ query?: never;
2606
+ url: '/health';
2607
+ };
2608
+ export type HealthHandlerResponses = {
2609
+ /**
2610
+ * Health
2611
+ */
2612
+ 200: EmptyResponse;
2613
+ };
2614
+ export type HealthHandlerResponse = HealthHandlerResponses[keyof HealthHandlerResponses];