@automate.ax/integration-contracts 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/airtable/api.d.ts +19 -0
  2. package/dist/airtable/api.js +44 -0
  3. package/dist/airtable/index.d.ts +353 -0
  4. package/dist/airtable/index.js +32 -0
  5. package/dist/airtable/schemas.d.ts +716 -0
  6. package/dist/airtable/schemas.js +184 -0
  7. package/dist/asana/api.d.ts +70 -0
  8. package/dist/asana/api.js +119 -0
  9. package/dist/asana/index.d.ts +384 -0
  10. package/dist/asana/index.js +38 -0
  11. package/dist/asana/schemas.d.ts +1060 -0
  12. package/dist/asana/schemas.js +512 -0
  13. package/dist/brevo/api.d.ts +31 -0
  14. package/dist/brevo/api.js +64 -0
  15. package/dist/brevo/index.d.ts +822 -0
  16. package/dist/brevo/index.js +51 -0
  17. package/dist/brevo/schemas.d.ts +1217 -0
  18. package/dist/brevo/schemas.js +332 -0
  19. package/dist/github/index.d.ts +37 -0
  20. package/dist/github/index.js +106 -0
  21. package/dist/github/schemas.d.ts +8014 -0
  22. package/dist/github/schemas.js +113 -0
  23. package/dist/gmail/gmail.d.ts +172 -0
  24. package/dist/gmail/gmail.js +405 -0
  25. package/dist/gmail/index.d.ts +262 -0
  26. package/dist/gmail/index.js +23 -0
  27. package/dist/gmail/schemas.d.ts +444 -0
  28. package/dist/gmail/schemas.js +242 -0
  29. package/dist/google-calendar/event-schemas.d.ts +117 -0
  30. package/dist/google-calendar/event-schemas.js +13 -0
  31. package/dist/google-calendar/google-calendar.d.ts +147 -0
  32. package/dist/google-calendar/google-calendar.js +583 -0
  33. package/dist/google-calendar/index.d.ts +365 -0
  34. package/dist/google-calendar/index.js +24 -0
  35. package/dist/google-calendar/schemas.d.ts +592 -0
  36. package/dist/google-calendar/schemas.js +379 -0
  37. package/dist/google-forms/event-schemas.d.ts +105 -0
  38. package/dist/google-forms/event-schemas.js +20 -0
  39. package/dist/google-forms/google-forms.d.ts +243 -0
  40. package/dist/google-forms/google-forms.js +581 -0
  41. package/dist/google-forms/index.d.ts +141 -0
  42. package/dist/google-forms/index.js +20 -0
  43. package/dist/google-forms/schemas.d.ts +618 -0
  44. package/dist/google-forms/schemas.js +383 -0
  45. package/dist/linear/api.d.ts +63 -0
  46. package/dist/linear/api.js +88 -0
  47. package/dist/linear/index.d.ts +1338 -0
  48. package/dist/linear/index.js +55 -0
  49. package/dist/linear/schemas.d.ts +1795 -0
  50. package/dist/linear/schemas.js +760 -0
  51. package/dist/outlook/graph.d.ts +34 -0
  52. package/dist/outlook/graph.js +98 -0
  53. package/dist/outlook/index.d.ts +115 -0
  54. package/dist/outlook/index.js +11 -0
  55. package/dist/outlook/schemas.d.ts +529 -0
  56. package/dist/outlook/schemas.js +312 -0
  57. package/dist/resend/index.d.ts +707 -0
  58. package/dist/resend/index.js +54 -0
  59. package/dist/resend/schemas.d.ts +1033 -0
  60. package/dist/resend/schemas.js +377 -0
  61. package/dist/slack/index.d.ts +151 -0
  62. package/dist/slack/index.js +22 -0
  63. package/dist/slack/schemas.d.ts +641 -0
  64. package/dist/slack/schemas.js +581 -0
  65. package/dist/teams/graph.d.ts +33 -0
  66. package/dist/teams/graph.js +95 -0
  67. package/dist/teams/index.d.ts +164 -0
  68. package/dist/teams/index.js +21 -0
  69. package/dist/teams/schemas.d.ts +675 -0
  70. package/dist/teams/schemas.js +365 -0
  71. package/dist/trello/api.d.ts +69 -0
  72. package/dist/trello/api.js +140 -0
  73. package/dist/trello/event-schemas.d.ts +1101 -0
  74. package/dist/trello/event-schemas.js +233 -0
  75. package/dist/trello/index.d.ts +721 -0
  76. package/dist/trello/index.js +35 -0
  77. package/dist/trello/schemas.d.ts +283 -0
  78. package/dist/trello/schemas.js +401 -0
  79. package/dist/triggers.d.ts +26 -0
  80. package/dist/triggers.js +33 -0
  81. package/dist/vercel/index.d.ts +1065 -0
  82. package/dist/vercel/index.js +114 -0
  83. package/dist/vercel/schemas.d.ts +1518 -0
  84. package/dist/vercel/schemas.js +335 -0
  85. package/dist/whatsapp/api.d.ts +62 -0
  86. package/dist/whatsapp/api.js +121 -0
  87. package/dist/whatsapp/index.d.ts +614 -0
  88. package/dist/whatsapp/index.js +35 -0
  89. package/dist/whatsapp/schemas.d.ts +926 -0
  90. package/dist/whatsapp/schemas.js +326 -0
  91. package/package.json +169 -0
  92. package/src/airtable/api.ts +66 -0
  93. package/src/airtable/index.ts +41 -0
  94. package/src/airtable/schemas.ts +231 -0
  95. package/src/asana/api.ts +171 -0
  96. package/src/asana/index.ts +49 -0
  97. package/src/asana/schemas.ts +655 -0
  98. package/src/brevo/api.ts +89 -0
  99. package/src/brevo/index.ts +66 -0
  100. package/src/brevo/schemas.ts +449 -0
  101. package/src/github/index.ts +217 -0
  102. package/src/github/schemas.ts +435 -0
  103. package/src/gmail/gmail.ts +577 -0
  104. package/src/gmail/index.ts +26 -0
  105. package/src/gmail/schemas.ts +327 -0
  106. package/src/google-calendar/event-schemas.ts +16 -0
  107. package/src/google-calendar/google-calendar.ts +727 -0
  108. package/src/google-calendar/index.ts +27 -0
  109. package/src/google-calendar/schemas.ts +529 -0
  110. package/src/google-forms/event-schemas.ts +26 -0
  111. package/src/google-forms/google-forms.ts +683 -0
  112. package/src/google-forms/index.ts +23 -0
  113. package/src/google-forms/schemas.ts +499 -0
  114. package/src/linear/api.ts +141 -0
  115. package/src/linear/index.ts +71 -0
  116. package/src/linear/schemas.ts +1060 -0
  117. package/src/outlook/graph.ts +132 -0
  118. package/src/outlook/index.ts +14 -0
  119. package/src/outlook/schemas.ts +388 -0
  120. package/src/resend/index.ts +70 -0
  121. package/src/resend/schemas.ts +462 -0
  122. package/src/slack/index.ts +29 -0
  123. package/src/slack/schemas.ts +737 -0
  124. package/src/teams/graph.ts +130 -0
  125. package/src/teams/index.ts +27 -0
  126. package/src/teams/schemas.ts +463 -0
  127. package/src/trello/api.ts +190 -0
  128. package/src/trello/event-schemas.ts +290 -0
  129. package/src/trello/index.ts +45 -0
  130. package/src/trello/schemas.ts +507 -0
  131. package/src/triggers.ts +68 -0
  132. package/src/vercel/index.ts +147 -0
  133. package/src/vercel/schemas.ts +594 -0
  134. package/src/whatsapp/api.ts +171 -0
  135. package/src/whatsapp/index.ts +46 -0
  136. package/src/whatsapp/schemas.ts +341 -0
@@ -0,0 +1,444 @@
1
+ import { z } from "zod";
2
+ export declare const PRIORITY_SCHEMA: z.ZodEnum<{
3
+ high: "high";
4
+ normal: "normal";
5
+ low: "low";
6
+ }>;
7
+ export declare const LABEL_LIST_VISIBILITY_SCHEMA: z.ZodEnum<{
8
+ labelHide: "labelHide";
9
+ labelShow: "labelShow";
10
+ labelShowIfUnread: "labelShowIfUnread";
11
+ }>;
12
+ export declare const MESSAGE_LIST_VISIBILITY_SCHEMA: z.ZodEnum<{
13
+ hide: "hide";
14
+ show: "show";
15
+ }>;
16
+ export declare const HEADERS_SCHEMA: z.ZodRecord<z.ZodString, z.ZodString>;
17
+ export declare const LABEL_COLOR_SCHEMA: z.ZodObject<{
18
+ backgroundColor: z.ZodString;
19
+ textColor: z.ZodString;
20
+ }, z.core.$strip>;
21
+ export declare const MAILBOX_SCHEMA: z.ZodObject<{
22
+ address: z.ZodString;
23
+ name: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>;
25
+ export declare const RECIPIENT_SCHEMA: z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
26
+ address: z.ZodString;
27
+ name: z.ZodOptional<z.ZodString>;
28
+ }, z.core.$strip>]>;
29
+ export declare const RECIPIENTS_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
30
+ address: z.ZodString;
31
+ name: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
33
+ address: z.ZodString;
34
+ name: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strip>]>>]>;
36
+ export declare const ATTACHMENT_INPUT_SCHEMA: z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodObject<{
37
+ contentId: z.ZodOptional<z.ZodString>;
38
+ disposition: z.ZodOptional<z.ZodEnum<{
39
+ attachment: "attachment";
40
+ inline: "inline";
41
+ }>>;
42
+ file: z.ZodCustom<File, File>;
43
+ filename: z.ZodOptional<z.ZodString>;
44
+ }, z.core.$strip>]>;
45
+ export declare const COMPOSE_OPTIONS_SCHEMA: z.ZodObject<{
46
+ attachments: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodObject<{
47
+ contentId: z.ZodOptional<z.ZodString>;
48
+ disposition: z.ZodOptional<z.ZodEnum<{
49
+ attachment: "attachment";
50
+ inline: "inline";
51
+ }>>;
52
+ file: z.ZodCustom<File, File>;
53
+ filename: z.ZodOptional<z.ZodString>;
54
+ }, z.core.$strip>]>>>;
55
+ bcc: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
56
+ address: z.ZodString;
57
+ name: z.ZodOptional<z.ZodString>;
58
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
59
+ address: z.ZodString;
60
+ name: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>]>>]>>;
62
+ cc: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
63
+ address: z.ZodString;
64
+ name: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
66
+ address: z.ZodString;
67
+ name: z.ZodOptional<z.ZodString>;
68
+ }, z.core.$strip>]>>]>>;
69
+ from: z.ZodOptional<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
70
+ address: z.ZodString;
71
+ name: z.ZodOptional<z.ZodString>;
72
+ }, z.core.$strip>]>>;
73
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
74
+ priority: z.ZodOptional<z.ZodEnum<{
75
+ high: "high";
76
+ normal: "normal";
77
+ low: "low";
78
+ }>>;
79
+ replyTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
80
+ address: z.ZodString;
81
+ name: z.ZodOptional<z.ZodString>;
82
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
83
+ address: z.ZodString;
84
+ name: z.ZodOptional<z.ZodString>;
85
+ }, z.core.$strip>]>>]>>;
86
+ subject: z.ZodOptional<z.ZodString>;
87
+ to: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
88
+ address: z.ZodString;
89
+ name: z.ZodOptional<z.ZodString>;
90
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
91
+ address: z.ZodString;
92
+ name: z.ZodOptional<z.ZodString>;
93
+ }, z.core.$strip>]>>]>>;
94
+ }, z.core.$strip>;
95
+ export declare const REPLY_OPTIONS_SCHEMA: z.ZodObject<{
96
+ attachments: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodObject<{
97
+ contentId: z.ZodOptional<z.ZodString>;
98
+ disposition: z.ZodOptional<z.ZodEnum<{
99
+ attachment: "attachment";
100
+ inline: "inline";
101
+ }>>;
102
+ file: z.ZodCustom<File, File>;
103
+ filename: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strip>]>>>;
105
+ bcc: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
106
+ address: z.ZodString;
107
+ name: z.ZodOptional<z.ZodString>;
108
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
109
+ address: z.ZodString;
110
+ name: z.ZodOptional<z.ZodString>;
111
+ }, z.core.$strip>]>>]>>;
112
+ cc: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
113
+ address: z.ZodString;
114
+ name: z.ZodOptional<z.ZodString>;
115
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
116
+ address: z.ZodString;
117
+ name: z.ZodOptional<z.ZodString>;
118
+ }, z.core.$strip>]>>]>>;
119
+ from: z.ZodOptional<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
120
+ address: z.ZodString;
121
+ name: z.ZodOptional<z.ZodString>;
122
+ }, z.core.$strip>]>>;
123
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
124
+ html: z.ZodOptional<z.ZodString>;
125
+ priority: z.ZodOptional<z.ZodEnum<{
126
+ high: "high";
127
+ normal: "normal";
128
+ low: "low";
129
+ }>>;
130
+ replyAll: z.ZodOptional<z.ZodBoolean>;
131
+ replyTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
132
+ address: z.ZodString;
133
+ name: z.ZodOptional<z.ZodString>;
134
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
135
+ address: z.ZodString;
136
+ name: z.ZodOptional<z.ZodString>;
137
+ }, z.core.$strip>]>>]>>;
138
+ text: z.ZodOptional<z.ZodString>;
139
+ to: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
140
+ address: z.ZodString;
141
+ name: z.ZodOptional<z.ZodString>;
142
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
143
+ address: z.ZodString;
144
+ name: z.ZodOptional<z.ZodString>;
145
+ }, z.core.$strip>]>>]>>;
146
+ }, z.core.$strip>;
147
+ export declare const MESSAGE_IDS_SCHEMA: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>;
148
+ export declare const LABELS_SCHEMA: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>;
149
+ export declare const MESSAGE_IDENTIFIER_SCHEMA: z.ZodObject<{
150
+ messageId: z.ZodString;
151
+ threadId: z.ZodString;
152
+ }, z.core.$strip>;
153
+ export declare const MESSAGE_METADATA_SCHEMA: z.ZodObject<{
154
+ messageId: z.ZodString;
155
+ threadId: z.ZodString;
156
+ historyId: z.ZodOptional<z.ZodString>;
157
+ labelIds: z.ZodArray<z.ZodString>;
158
+ }, z.core.$strip>;
159
+ export declare const DRAFT_IDENTIFIER_SCHEMA: z.ZodObject<{
160
+ messageId: z.ZodString;
161
+ threadId: z.ZodString;
162
+ historyId: z.ZodOptional<z.ZodString>;
163
+ labelIds: z.ZodArray<z.ZodString>;
164
+ draftId: z.ZodString;
165
+ }, z.core.$strip>;
166
+ export declare const MESSAGE_SCHEMA: z.ZodObject<{
167
+ messageId: z.ZodString;
168
+ threadId: z.ZodString;
169
+ historyId: z.ZodOptional<z.ZodString>;
170
+ labelIds: z.ZodArray<z.ZodString>;
171
+ attachments: z.ZodArray<z.ZodObject<{
172
+ contentId: z.ZodOptional<z.ZodString>;
173
+ description: z.ZodOptional<z.ZodString>;
174
+ disposition: z.ZodOptional<z.ZodEnum<{
175
+ attachment: "attachment";
176
+ inline: "inline";
177
+ }>>;
178
+ file: z.ZodCustom<File, File>;
179
+ filename: z.ZodString;
180
+ mimeType: z.ZodString;
181
+ related: z.ZodBoolean;
182
+ }, z.core.$strip>>;
183
+ bcc: z.ZodArray<z.ZodObject<{
184
+ address: z.ZodString;
185
+ name: z.ZodOptional<z.ZodString>;
186
+ }, z.core.$strip>>;
187
+ cc: z.ZodArray<z.ZodObject<{
188
+ address: z.ZodString;
189
+ name: z.ZodOptional<z.ZodString>;
190
+ }, z.core.$strip>>;
191
+ deliveredTo: z.ZodOptional<z.ZodString>;
192
+ from: z.ZodOptional<z.ZodObject<{
193
+ address: z.ZodString;
194
+ name: z.ZodOptional<z.ZodString>;
195
+ }, z.core.$strip>>;
196
+ headers: z.ZodArray<z.ZodObject<{
197
+ name: z.ZodString;
198
+ value: z.ZodString;
199
+ }, z.core.$strip>>;
200
+ html: z.ZodOptional<z.ZodString>;
201
+ inReplyTo: z.ZodOptional<z.ZodString>;
202
+ rfc822MessageId: z.ZodOptional<z.ZodString>;
203
+ receivedAt: z.ZodNullable<z.ZodDate>;
204
+ references: z.ZodArray<z.ZodString>;
205
+ replyTo: z.ZodArray<z.ZodObject<{
206
+ address: z.ZodString;
207
+ name: z.ZodOptional<z.ZodString>;
208
+ }, z.core.$strip>>;
209
+ returnPath: z.ZodOptional<z.ZodString>;
210
+ sender: z.ZodOptional<z.ZodObject<{
211
+ address: z.ZodString;
212
+ name: z.ZodOptional<z.ZodString>;
213
+ }, z.core.$strip>>;
214
+ sentAt: z.ZodOptional<z.ZodDate>;
215
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
216
+ snippet: z.ZodOptional<z.ZodString>;
217
+ subject: z.ZodString;
218
+ text: z.ZodOptional<z.ZodString>;
219
+ to: z.ZodArray<z.ZodObject<{
220
+ address: z.ZodString;
221
+ name: z.ZodOptional<z.ZodString>;
222
+ }, z.core.$strip>>;
223
+ }, z.core.$strip>;
224
+ export declare const LABEL_CHANGE_SCHEMA: z.ZodObject<{
225
+ labels: z.ZodArray<z.ZodObject<{
226
+ labelId: z.ZodString;
227
+ name: z.ZodOptional<z.ZodString>;
228
+ }, z.core.$strip>>;
229
+ message: z.ZodObject<{
230
+ messageId: z.ZodString;
231
+ threadId: z.ZodString;
232
+ historyId: z.ZodOptional<z.ZodString>;
233
+ labelIds: z.ZodArray<z.ZodString>;
234
+ attachments: z.ZodArray<z.ZodObject<{
235
+ contentId: z.ZodOptional<z.ZodString>;
236
+ description: z.ZodOptional<z.ZodString>;
237
+ disposition: z.ZodOptional<z.ZodEnum<{
238
+ attachment: "attachment";
239
+ inline: "inline";
240
+ }>>;
241
+ file: z.ZodCustom<File, File>;
242
+ filename: z.ZodString;
243
+ mimeType: z.ZodString;
244
+ related: z.ZodBoolean;
245
+ }, z.core.$strip>>;
246
+ bcc: z.ZodArray<z.ZodObject<{
247
+ address: z.ZodString;
248
+ name: z.ZodOptional<z.ZodString>;
249
+ }, z.core.$strip>>;
250
+ cc: z.ZodArray<z.ZodObject<{
251
+ address: z.ZodString;
252
+ name: z.ZodOptional<z.ZodString>;
253
+ }, z.core.$strip>>;
254
+ deliveredTo: z.ZodOptional<z.ZodString>;
255
+ from: z.ZodOptional<z.ZodObject<{
256
+ address: z.ZodString;
257
+ name: z.ZodOptional<z.ZodString>;
258
+ }, z.core.$strip>>;
259
+ headers: z.ZodArray<z.ZodObject<{
260
+ name: z.ZodString;
261
+ value: z.ZodString;
262
+ }, z.core.$strip>>;
263
+ html: z.ZodOptional<z.ZodString>;
264
+ inReplyTo: z.ZodOptional<z.ZodString>;
265
+ rfc822MessageId: z.ZodOptional<z.ZodString>;
266
+ receivedAt: z.ZodNullable<z.ZodDate>;
267
+ references: z.ZodArray<z.ZodString>;
268
+ replyTo: z.ZodArray<z.ZodObject<{
269
+ address: z.ZodString;
270
+ name: z.ZodOptional<z.ZodString>;
271
+ }, z.core.$strip>>;
272
+ returnPath: z.ZodOptional<z.ZodString>;
273
+ sender: z.ZodOptional<z.ZodObject<{
274
+ address: z.ZodString;
275
+ name: z.ZodOptional<z.ZodString>;
276
+ }, z.core.$strip>>;
277
+ sentAt: z.ZodOptional<z.ZodDate>;
278
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
279
+ snippet: z.ZodOptional<z.ZodString>;
280
+ subject: z.ZodString;
281
+ text: z.ZodOptional<z.ZodString>;
282
+ to: z.ZodArray<z.ZodObject<{
283
+ address: z.ZodString;
284
+ name: z.ZodOptional<z.ZodString>;
285
+ }, z.core.$strip>>;
286
+ }, z.core.$strip>;
287
+ }, z.core.$strip>;
288
+ export declare const THREAD_IDENTIFIER_SCHEMA: z.ZodObject<{
289
+ threadId: z.ZodString;
290
+ }, z.core.$strip>;
291
+ export declare const THREAD_SCHEMA: z.ZodObject<{
292
+ threadId: z.ZodString;
293
+ historyId: z.ZodOptional<z.ZodString>;
294
+ messages: z.ZodArray<z.ZodObject<{
295
+ messageId: z.ZodString;
296
+ threadId: z.ZodString;
297
+ historyId: z.ZodOptional<z.ZodString>;
298
+ labelIds: z.ZodArray<z.ZodString>;
299
+ attachments: z.ZodArray<z.ZodObject<{
300
+ contentId: z.ZodOptional<z.ZodString>;
301
+ description: z.ZodOptional<z.ZodString>;
302
+ disposition: z.ZodOptional<z.ZodEnum<{
303
+ attachment: "attachment";
304
+ inline: "inline";
305
+ }>>;
306
+ file: z.ZodCustom<File, File>;
307
+ filename: z.ZodString;
308
+ mimeType: z.ZodString;
309
+ related: z.ZodBoolean;
310
+ }, z.core.$strip>>;
311
+ bcc: z.ZodArray<z.ZodObject<{
312
+ address: z.ZodString;
313
+ name: z.ZodOptional<z.ZodString>;
314
+ }, z.core.$strip>>;
315
+ cc: z.ZodArray<z.ZodObject<{
316
+ address: z.ZodString;
317
+ name: z.ZodOptional<z.ZodString>;
318
+ }, z.core.$strip>>;
319
+ deliveredTo: z.ZodOptional<z.ZodString>;
320
+ from: z.ZodOptional<z.ZodObject<{
321
+ address: z.ZodString;
322
+ name: z.ZodOptional<z.ZodString>;
323
+ }, z.core.$strip>>;
324
+ headers: z.ZodArray<z.ZodObject<{
325
+ name: z.ZodString;
326
+ value: z.ZodString;
327
+ }, z.core.$strip>>;
328
+ html: z.ZodOptional<z.ZodString>;
329
+ inReplyTo: z.ZodOptional<z.ZodString>;
330
+ rfc822MessageId: z.ZodOptional<z.ZodString>;
331
+ receivedAt: z.ZodNullable<z.ZodDate>;
332
+ references: z.ZodArray<z.ZodString>;
333
+ replyTo: z.ZodArray<z.ZodObject<{
334
+ address: z.ZodString;
335
+ name: z.ZodOptional<z.ZodString>;
336
+ }, z.core.$strip>>;
337
+ returnPath: z.ZodOptional<z.ZodString>;
338
+ sender: z.ZodOptional<z.ZodObject<{
339
+ address: z.ZodString;
340
+ name: z.ZodOptional<z.ZodString>;
341
+ }, z.core.$strip>>;
342
+ sentAt: z.ZodOptional<z.ZodDate>;
343
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
344
+ snippet: z.ZodOptional<z.ZodString>;
345
+ subject: z.ZodString;
346
+ text: z.ZodOptional<z.ZodString>;
347
+ to: z.ZodArray<z.ZodObject<{
348
+ address: z.ZodString;
349
+ name: z.ZodOptional<z.ZodString>;
350
+ }, z.core.$strip>>;
351
+ }, z.core.$strip>>;
352
+ }, z.core.$strip>;
353
+ export declare const DRAFT_SCHEMA: z.ZodObject<{
354
+ draftId: z.ZodString;
355
+ message: z.ZodObject<{
356
+ messageId: z.ZodString;
357
+ threadId: z.ZodString;
358
+ historyId: z.ZodOptional<z.ZodString>;
359
+ labelIds: z.ZodArray<z.ZodString>;
360
+ attachments: z.ZodArray<z.ZodObject<{
361
+ contentId: z.ZodOptional<z.ZodString>;
362
+ description: z.ZodOptional<z.ZodString>;
363
+ disposition: z.ZodOptional<z.ZodEnum<{
364
+ attachment: "attachment";
365
+ inline: "inline";
366
+ }>>;
367
+ file: z.ZodCustom<File, File>;
368
+ filename: z.ZodString;
369
+ mimeType: z.ZodString;
370
+ related: z.ZodBoolean;
371
+ }, z.core.$strip>>;
372
+ bcc: z.ZodArray<z.ZodObject<{
373
+ address: z.ZodString;
374
+ name: z.ZodOptional<z.ZodString>;
375
+ }, z.core.$strip>>;
376
+ cc: z.ZodArray<z.ZodObject<{
377
+ address: z.ZodString;
378
+ name: z.ZodOptional<z.ZodString>;
379
+ }, z.core.$strip>>;
380
+ deliveredTo: z.ZodOptional<z.ZodString>;
381
+ from: z.ZodOptional<z.ZodObject<{
382
+ address: z.ZodString;
383
+ name: z.ZodOptional<z.ZodString>;
384
+ }, z.core.$strip>>;
385
+ headers: z.ZodArray<z.ZodObject<{
386
+ name: z.ZodString;
387
+ value: z.ZodString;
388
+ }, z.core.$strip>>;
389
+ html: z.ZodOptional<z.ZodString>;
390
+ inReplyTo: z.ZodOptional<z.ZodString>;
391
+ rfc822MessageId: z.ZodOptional<z.ZodString>;
392
+ receivedAt: z.ZodNullable<z.ZodDate>;
393
+ references: z.ZodArray<z.ZodString>;
394
+ replyTo: z.ZodArray<z.ZodObject<{
395
+ address: z.ZodString;
396
+ name: z.ZodOptional<z.ZodString>;
397
+ }, z.core.$strip>>;
398
+ returnPath: z.ZodOptional<z.ZodString>;
399
+ sender: z.ZodOptional<z.ZodObject<{
400
+ address: z.ZodString;
401
+ name: z.ZodOptional<z.ZodString>;
402
+ }, z.core.$strip>>;
403
+ sentAt: z.ZodOptional<z.ZodDate>;
404
+ sizeEstimate: z.ZodOptional<z.ZodNumber>;
405
+ snippet: z.ZodOptional<z.ZodString>;
406
+ subject: z.ZodString;
407
+ text: z.ZodOptional<z.ZodString>;
408
+ to: z.ZodArray<z.ZodObject<{
409
+ address: z.ZodString;
410
+ name: z.ZodOptional<z.ZodString>;
411
+ }, z.core.$strip>>;
412
+ }, z.core.$strip>;
413
+ }, z.core.$strip>;
414
+ export declare const LABEL_SCHEMA: z.ZodObject<{
415
+ color: z.ZodOptional<z.ZodObject<{
416
+ backgroundColor: z.ZodString;
417
+ textColor: z.ZodString;
418
+ }, z.core.$strip>>;
419
+ labelId: z.ZodString;
420
+ labelListVisibility: z.ZodOptional<z.ZodEnum<{
421
+ labelHide: "labelHide";
422
+ labelShow: "labelShow";
423
+ labelShowIfUnread: "labelShowIfUnread";
424
+ }>>;
425
+ messageListVisibility: z.ZodOptional<z.ZodEnum<{
426
+ hide: "hide";
427
+ show: "show";
428
+ }>>;
429
+ messagesTotal: z.ZodOptional<z.ZodNumber>;
430
+ messagesUnread: z.ZodOptional<z.ZodNumber>;
431
+ name: z.ZodString;
432
+ threadsTotal: z.ZodOptional<z.ZodNumber>;
433
+ threadsUnread: z.ZodOptional<z.ZodNumber>;
434
+ type: z.ZodOptional<z.ZodEnum<{
435
+ user: "user";
436
+ system: "system";
437
+ }>>;
438
+ }, z.core.$strip>;
439
+ export declare const PROFILE_SCHEMA: z.ZodObject<{
440
+ emailAddress: z.ZodString;
441
+ historyId: z.ZodOptional<z.ZodString>;
442
+ messagesTotal: z.ZodOptional<z.ZodNumber>;
443
+ threadsTotal: z.ZodOptional<z.ZodNumber>;
444
+ }, z.core.$strip>;
@@ -0,0 +1,242 @@
1
+ import { z } from "zod";
2
+ export const PRIORITY_SCHEMA = z.enum(["high", "normal", "low"]);
3
+ const DISPOSITION_SCHEMA = z.enum(["attachment", "inline"]);
4
+ export const LABEL_LIST_VISIBILITY_SCHEMA = z.enum([
5
+ "labelHide",
6
+ "labelShow",
7
+ "labelShowIfUnread",
8
+ ]);
9
+ export const MESSAGE_LIST_VISIBILITY_SCHEMA = z.enum(["hide", "show"]);
10
+ const LABEL_TYPE_SCHEMA = z.enum(["system", "user"]);
11
+ export const HEADERS_SCHEMA = z.record(z.string(), z.string());
12
+ export const LABEL_COLOR_SCHEMA = z.object({
13
+ /** Hex background color selected from Gmail's supported palette. */
14
+ backgroundColor: z.string().min(1),
15
+ /** Hex text color selected from Gmail's supported palette. */
16
+ textColor: z.string().min(1),
17
+ });
18
+ export const MAILBOX_SCHEMA = z.object({
19
+ /** RFC 5322 email address. */
20
+ address: z.string(),
21
+ /** Optional human-readable display name. */
22
+ name: z.string().optional(),
23
+ });
24
+ export const RECIPIENT_SCHEMA = z.union([z.email(), MAILBOX_SCHEMA]);
25
+ export const RECIPIENTS_SCHEMA = z.union([
26
+ RECIPIENT_SCHEMA,
27
+ RECIPIENT_SCHEMA.array().min(1),
28
+ ]);
29
+ const ATTACHMENT_OPTIONS_SCHEMA = z.object({
30
+ /** Content-ID used to reference an inline attachment from HTML. */
31
+ contentId: z.string().min(1).optional(),
32
+ /** Whether the file is a regular attachment or inline MIME part. */
33
+ disposition: DISPOSITION_SCHEMA.optional(),
34
+ /** File contents, media type, and default filename. */
35
+ file: z.instanceof(File),
36
+ /** Filename presented to recipients instead of the File's name. */
37
+ filename: z.string().min(1).optional(),
38
+ });
39
+ export const ATTACHMENT_INPUT_SCHEMA = z.union([
40
+ z.instanceof(File),
41
+ ATTACHMENT_OPTIONS_SCHEMA,
42
+ ]);
43
+ export const COMPOSE_OPTIONS_SCHEMA = z.object({
44
+ /** Files and inline MIME parts attached to the message. */
45
+ attachments: ATTACHMENT_INPUT_SCHEMA.array().optional(),
46
+ /** Blind-copy recipients hidden from other recipients. */
47
+ bcc: RECIPIENTS_SCHEMA.optional(),
48
+ /** Carbon-copy recipients. */
49
+ cc: RECIPIENTS_SCHEMA.optional(),
50
+ /**
51
+ * Sender address or configured Gmail send-as alias.
52
+ *
53
+ * Gmail may reject or replace addresses not configured on the account.
54
+ */
55
+ from: RECIPIENT_SCHEMA.optional(),
56
+ /** Additional RFC 5322 headers added to the message. */
57
+ headers: HEADERS_SCHEMA.optional(),
58
+ /** Importance priority encoded into standard message headers. */
59
+ priority: PRIORITY_SCHEMA.optional(),
60
+ /** Addresses that should receive replies to the outgoing message. */
61
+ replyTo: RECIPIENTS_SCHEMA.optional(),
62
+ /** Message subject line. */
63
+ subject: z.string().optional(),
64
+ /** Primary recipients. */
65
+ to: RECIPIENTS_SCHEMA.optional(),
66
+ });
67
+ export const REPLY_OPTIONS_SCHEMA = z.object({
68
+ /** Additional files and inline MIME parts attached to the reply. */
69
+ attachments: ATTACHMENT_INPUT_SCHEMA.array().optional(),
70
+ /** Additional blind-copy recipients. */
71
+ bcc: RECIPIENTS_SCHEMA.optional(),
72
+ /** Additional carbon-copy recipients. */
73
+ cc: RECIPIENTS_SCHEMA.optional(),
74
+ /** Sender address or configured Gmail send-as alias. */
75
+ from: RECIPIENT_SCHEMA.optional(),
76
+ /** Additional RFC 5322 headers added to the reply. */
77
+ headers: HEADERS_SCHEMA.optional(),
78
+ /** Optional HTML reply body. */
79
+ html: z.string().optional(),
80
+ /** Importance priority encoded into standard message headers. */
81
+ priority: PRIORITY_SCHEMA.optional(),
82
+ /** Whether to include the original To and Cc recipients. */
83
+ replyAll: z.boolean().optional(),
84
+ /** Addresses that should receive replies to this outgoing reply. */
85
+ replyTo: RECIPIENTS_SCHEMA.optional(),
86
+ /** Optional plain-text reply body. */
87
+ text: z.string().optional(),
88
+ /** Additional primary recipients appended to the derived reply recipient. */
89
+ to: RECIPIENTS_SCHEMA.optional(),
90
+ });
91
+ const MESSAGE_ID_SCHEMA = z.string().min(1);
92
+ const LABEL_INPUT_SCHEMA = z.string().min(1);
93
+ export const MESSAGE_IDS_SCHEMA = z
94
+ .union([MESSAGE_ID_SCHEMA, MESSAGE_ID_SCHEMA.array().min(1).max(1000)])
95
+ .transform((messageIds) => typeof messageIds === "string" ? [messageIds] : messageIds);
96
+ export const LABELS_SCHEMA = z
97
+ .union([LABEL_INPUT_SCHEMA, LABEL_INPUT_SCHEMA.array().min(1)])
98
+ .transform((labels) => (typeof labels === "string" ? [labels] : labels));
99
+ export const MESSAGE_IDENTIFIER_SCHEMA = z.object({
100
+ /** Immutable Gmail message ID. */
101
+ messageId: z.string(),
102
+ /** Immutable Gmail thread ID containing the message. */
103
+ threadId: z.string(),
104
+ });
105
+ export const MESSAGE_METADATA_SCHEMA = MESSAGE_IDENTIFIER_SCHEMA.extend({
106
+ /** ID of the latest mailbox history record affecting the message. */
107
+ historyId: z.string().optional(),
108
+ /** Gmail system and user label IDs currently applied to the message. */
109
+ labelIds: z.string().array(),
110
+ });
111
+ export const DRAFT_IDENTIFIER_SCHEMA = MESSAGE_METADATA_SCHEMA.extend({
112
+ /** Immutable Gmail draft ID. */
113
+ draftId: z.string(),
114
+ });
115
+ const MESSAGE_HEADER_SCHEMA = z.object({
116
+ /** Header name with its original casing preserved. */
117
+ name: z.string(),
118
+ /** Decoded header value. */
119
+ value: z.string(),
120
+ });
121
+ const ATTACHMENT_SCHEMA = z.object({
122
+ /** MIME Content-ID used by related HTML content. */
123
+ contentId: z.string().optional(),
124
+ /** Optional human-readable MIME description. */
125
+ description: z.string().optional(),
126
+ /** Whether the MIME part is presented as an attachment or inline content. */
127
+ disposition: DISPOSITION_SCHEMA.optional(),
128
+ /** Parsed attachment contents and metadata. */
129
+ file: z.instanceof(File),
130
+ /** Attachment filename presented by the sender. */
131
+ filename: z.string(),
132
+ /** Attachment MIME media type. */
133
+ mimeType: z.string(),
134
+ /** Whether the attachment belongs to a multipart/related body. */
135
+ related: z.boolean(),
136
+ });
137
+ export const MESSAGE_SCHEMA = MESSAGE_METADATA_SCHEMA.extend({
138
+ /** Attachments and inline MIME parts included with the message. */
139
+ attachments: ATTACHMENT_SCHEMA.array(),
140
+ /** Blind-copy recipients retained in the raw message, when available. */
141
+ bcc: MAILBOX_SCHEMA.array(),
142
+ /** Carbon-copy recipients. */
143
+ cc: MAILBOX_SCHEMA.array(),
144
+ /** Address recorded by the Delivered-To header. */
145
+ deliveredTo: z.string().optional(),
146
+ /** Parsed sender from the From header. */
147
+ from: MAILBOX_SCHEMA.optional(),
148
+ /** Original RFC 5322 headers with duplicates preserved. */
149
+ headers: MESSAGE_HEADER_SCHEMA.array(),
150
+ /** HTML message body, when present. */
151
+ html: z.string().optional(),
152
+ /** RFC 5322 Message-ID of the message this message replies to. */
153
+ inReplyTo: z.string().optional(),
154
+ /** RFC 5322 Message-ID from the original message headers. */
155
+ rfc822MessageId: z.string().optional(),
156
+ /** Mailbox time used by Gmail to order the message. */
157
+ receivedAt: z.date().nullable(),
158
+ /** RFC 5322 Message-IDs referenced by this message. */
159
+ references: z.string().array(),
160
+ /** Addresses from the Reply-To header. */
161
+ replyTo: MAILBOX_SCHEMA.array(),
162
+ /** Address from the Return-Path header. */
163
+ returnPath: z.string().optional(),
164
+ /** Sender header, when distinct from From. */
165
+ sender: MAILBOX_SCHEMA.optional(),
166
+ /** Date supplied by the sender, when valid. */
167
+ sentAt: z.date().optional(),
168
+ /** Estimated raw message size in bytes. */
169
+ sizeEstimate: z.number().optional(),
170
+ /** Short message preview generated by Gmail. */
171
+ snippet: z.string().optional(),
172
+ /** Decoded message subject. */
173
+ subject: z.string(),
174
+ /**
175
+ * Plain-text message body.
176
+ *
177
+ * Derived from HTML when the source message has no text alternative.
178
+ */
179
+ text: z.string().optional(),
180
+ /** Primary recipients. */
181
+ to: MAILBOX_SCHEMA.array(),
182
+ });
183
+ const LABEL_REFERENCE_SCHEMA = z.object({
184
+ /** Immutable Gmail label ID. */
185
+ labelId: z.string(),
186
+ /** Human-readable label name, when the label still exists. */
187
+ name: z.string().optional(),
188
+ });
189
+ export const LABEL_CHANGE_SCHEMA = z.object({
190
+ /** Labels added to or removed from the message. */
191
+ labels: LABEL_REFERENCE_SCHEMA.array().min(1),
192
+ /** Fully parsed message affected by the label change. */
193
+ message: MESSAGE_SCHEMA,
194
+ });
195
+ export const THREAD_IDENTIFIER_SCHEMA = z.object({
196
+ /** Immutable Gmail thread ID. */
197
+ threadId: z.string(),
198
+ });
199
+ export const THREAD_SCHEMA = THREAD_IDENTIFIER_SCHEMA.extend({
200
+ /** ID of the latest mailbox history record affecting the thread. */
201
+ historyId: z.string().optional(),
202
+ /** Messages ordered as returned by Gmail. */
203
+ messages: MESSAGE_SCHEMA.array(),
204
+ });
205
+ export const DRAFT_SCHEMA = z.object({
206
+ /** Immutable Gmail draft ID. */
207
+ draftId: z.string(),
208
+ /** Parsed message currently stored in the draft. */
209
+ message: MESSAGE_SCHEMA,
210
+ });
211
+ export const LABEL_SCHEMA = z.object({
212
+ /** Optional label color configuration. */
213
+ color: LABEL_COLOR_SCHEMA.optional(),
214
+ /** Immutable Gmail label ID. */
215
+ labelId: z.string(),
216
+ /** Visibility in Gmail's label list. */
217
+ labelListVisibility: LABEL_LIST_VISIBILITY_SCHEMA.optional(),
218
+ /** Visibility beside messages in Gmail's message list. */
219
+ messageListVisibility: MESSAGE_LIST_VISIBILITY_SCHEMA.optional(),
220
+ /** Total messages carrying the label, when supplied by Gmail. */
221
+ messagesTotal: z.number().optional(),
222
+ /** Unread messages carrying the label, when supplied by Gmail. */
223
+ messagesUnread: z.number().optional(),
224
+ /** Human-readable label name. */
225
+ name: z.string(),
226
+ /** Total threads carrying the label, when supplied by Gmail. */
227
+ threadsTotal: z.number().optional(),
228
+ /** Unread threads carrying the label, when supplied by Gmail. */
229
+ threadsUnread: z.number().optional(),
230
+ /** Whether Gmail or the user owns the label. */
231
+ type: LABEL_TYPE_SCHEMA.optional(),
232
+ });
233
+ export const PROFILE_SCHEMA = z.object({
234
+ /** Primary email address of the authenticated Gmail account. */
235
+ emailAddress: z.string(),
236
+ /** ID of the account's current mailbox history record. */
237
+ historyId: z.string().optional(),
238
+ /** Total messages in the mailbox. */
239
+ messagesTotal: z.number().optional(),
240
+ /** Total threads in the mailbox. */
241
+ threadsTotal: z.number().optional(),
242
+ });