samva 0.10.0 → 0.11.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 (71) hide show
  1. package/README.md +59 -9
  2. package/dist/client/sdk.gen.d.ts +1106 -215
  3. package/dist/client/types.gen.d.ts +11522 -6311
  4. package/dist/{client-mI4S99Ts.js → client-8YXjfsVc.js} +5079 -1655
  5. package/dist/{client-attribution-Bl4nTEsE.js → client-attribution-Ct2FKITg.js} +2 -2
  6. package/dist/effect/analytics.d.ts +18 -18
  7. package/dist/effect/analytics.js +1 -1
  8. package/dist/effect/api-keys.d.ts +99 -43
  9. package/dist/effect/api-keys.js +2 -4
  10. package/dist/effect/attachments.d.ts +5 -6
  11. package/dist/effect/attachments.js +1 -1
  12. package/dist/effect/brands.d.ts +4 -4
  13. package/dist/effect/brands.js +2 -2
  14. package/dist/effect/campaigns.d.ts +30 -60
  15. package/dist/effect/campaigns.js +1 -1
  16. package/dist/effect/client.js +1 -1
  17. package/dist/effect/contact-groups.d.ts +29 -46
  18. package/dist/effect/contact-groups.js +1 -1
  19. package/dist/effect/contacts.d.ts +324 -726
  20. package/dist/effect/contacts.js +10 -2
  21. package/dist/effect/conversations.d.ts +575 -1130
  22. package/dist/effect/conversations.js +14 -2
  23. package/dist/effect/custom-fields.d.ts +3 -53
  24. package/dist/effect/custom-fields.js +1 -1
  25. package/dist/effect/email.d.ts +263 -297
  26. package/dist/effect/email.js +5 -3
  27. package/dist/effect/extension-installations.d.ts +218 -0
  28. package/dist/effect/extension-installations.js +25 -0
  29. package/dist/effect/extensions.d.ts +192 -0
  30. package/dist/effect/extensions.js +19 -0
  31. package/dist/effect/feedback.d.ts +12 -0
  32. package/dist/effect/feedback.js +13 -0
  33. package/dist/effect/generated.d.ts +31266 -14269
  34. package/dist/effect/index.d.ts +6 -1
  35. package/dist/effect/index.js +7 -2
  36. package/dist/effect/internal/client.d.ts +3 -0
  37. package/dist/effect/internal/mailbox-events.d.ts +11 -0
  38. package/dist/effect/internal/operation.d.ts +20 -374
  39. package/dist/effect/mailboxes.d.ts +1676 -0
  40. package/dist/effect/mailboxes.js +3 -0
  41. package/dist/effect/media.d.ts +5 -5
  42. package/dist/effect/media.js +1 -1
  43. package/dist/effect/messages.d.ts +171 -938
  44. package/dist/effect/messages.js +6 -2
  45. package/dist/effect/namespaces.d.ts +82 -0
  46. package/dist/effect/namespaces.js +19 -0
  47. package/dist/effect/operations.d.ts +68 -12
  48. package/dist/effect/operations.js +1 -1
  49. package/dist/effect/organizations.d.ts +5 -4
  50. package/dist/effect/organizations.js +1 -1
  51. package/dist/effect/pagination.d.ts +16 -21
  52. package/dist/effect/scheduled-messages.d.ts +13 -23
  53. package/dist/effect/scheduled-messages.js +1 -1
  54. package/dist/effect/templates.d.ts +204 -281
  55. package/dist/effect/templates.js +2 -2
  56. package/dist/effect/unsubscribe-groups.d.ts +21 -75
  57. package/dist/effect/unsubscribe-groups.js +1 -1
  58. package/dist/effect/webhooks.d.ts +117 -39
  59. package/dist/effect/webhooks.js +2 -2
  60. package/dist/index.js +3 -2
  61. package/dist/mailbox-events-CcWm8lO4.js +617 -0
  62. package/dist/mailbox-events.d.ts +175 -0
  63. package/dist/mailboxes-4gJMAJh4.js +147 -0
  64. package/dist/{operation-DQWJO4jY.js → operation-BuyvAsZ1.js} +403 -67
  65. package/dist/promises/errors.gen.d.ts +5 -0
  66. package/dist/promises/index.d.ts +23 -1
  67. package/dist/promises/index.js +3 -2
  68. package/dist/promises/types.gen.d.ts +1 -1
  69. package/dist/{promises-C7D4oaHn.js → promises-CqAmI39P.js} +3242 -556
  70. package/dist/service-map.d.ts +458 -36
  71. package/package.json +22 -2
@@ -0,0 +1,1676 @@
1
+ export { events } from "./internal/mailbox-events";
2
+ export { type MailboxEvent, MailboxEventStreamError, type MailboxEventStreamErrorFields, type MailboxEventStreamErrorTag, type MailboxEventStreamFailure, type MailboxEventStreamOptions, type MailboxEventType, } from "../mailbox-events";
3
+ export declare const list: ((input?: {
4
+ readonly limit?: string | null | undefined;
5
+ readonly cursor?: string | null | undefined;
6
+ readonly after?: string | null | undefined;
7
+ readonly before?: string | null | undefined;
8
+ } | undefined) => import("effect/Effect").Effect<{
9
+ readonly items: readonly {
10
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
11
+ readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
12
+ readonly slug: string;
13
+ readonly displayName: string;
14
+ readonly status: "active" | "paused";
15
+ readonly primaryAddress: string | null;
16
+ readonly createdAt: string;
17
+ }[];
18
+ readonly nextCursor: string | null;
19
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>) & {
20
+ readonly pages: (input?: {
21
+ readonly limit?: string | null | undefined;
22
+ readonly cursor?: string | null | undefined;
23
+ readonly after?: string | null | undefined;
24
+ readonly before?: string | null | undefined;
25
+ } | undefined) => import("effect/Stream").Stream<{
26
+ readonly items: readonly {
27
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
28
+ readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
29
+ readonly slug: string;
30
+ readonly displayName: string;
31
+ readonly status: "active" | "paused";
32
+ readonly primaryAddress: string | null;
33
+ readonly createdAt: string;
34
+ }[];
35
+ readonly nextCursor: string | null;
36
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
37
+ readonly items: (input?: {
38
+ readonly limit?: string | null | undefined;
39
+ readonly cursor?: string | null | undefined;
40
+ readonly after?: string | null | undefined;
41
+ readonly before?: string | null | undefined;
42
+ } | undefined) => import("effect/Stream").Stream<{
43
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
44
+ readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
45
+ readonly slug: string;
46
+ readonly displayName: string;
47
+ readonly status: "active" | "paused";
48
+ readonly primaryAddress: string | null;
49
+ readonly createdAt: string;
50
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
51
+ };
52
+ export declare const create: (input: {
53
+ readonly namespaceId?: string | null | undefined;
54
+ readonly displayName: string;
55
+ readonly slug: string;
56
+ readonly addresses: readonly {
57
+ readonly address: string;
58
+ readonly displayName?: string | null | undefined;
59
+ readonly domainId?: string | null | undefined;
60
+ }[];
61
+ readonly defaultFrom?: {
62
+ readonly address: string;
63
+ readonly displayName?: string | null | undefined;
64
+ } | null | undefined;
65
+ readonly metadata?: {
66
+ readonly [x: string]: string | undefined;
67
+ } | null | undefined;
68
+ }) => import("effect/Effect").Effect<{
69
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
70
+ readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
71
+ readonly slug: string;
72
+ readonly displayName: string;
73
+ readonly status: "active" | "paused";
74
+ readonly primaryAddress: string | null;
75
+ readonly createdAt: string;
76
+ readonly description: string | null;
77
+ readonly metadata: {
78
+ readonly [x: string]: string;
79
+ };
80
+ readonly addresses: readonly {
81
+ readonly id: string & import("effect/Brand").Brand<"MailboxAddressId">;
82
+ readonly address: string;
83
+ readonly source: "samvaHosted" | "verifiedDomain";
84
+ readonly domainId: string | null;
85
+ readonly displayName: string | null;
86
+ }[];
87
+ readonly defaultFrom: {
88
+ readonly address: string;
89
+ readonly displayName: string | null;
90
+ } | null;
91
+ readonly updatedAt: string;
92
+ }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").PaymentRequiredError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
93
+ export declare const get: (input: {
94
+ readonly id: string;
95
+ }) => import("effect/Effect").Effect<{
96
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
97
+ readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
98
+ readonly slug: string;
99
+ readonly displayName: string;
100
+ readonly status: "active" | "paused";
101
+ readonly primaryAddress: string | null;
102
+ readonly createdAt: string;
103
+ readonly description: string | null;
104
+ readonly metadata: {
105
+ readonly [x: string]: string;
106
+ };
107
+ readonly addresses: readonly {
108
+ readonly id: string & import("effect/Brand").Brand<"MailboxAddressId">;
109
+ readonly address: string;
110
+ readonly source: "samvaHosted" | "verifiedDomain";
111
+ readonly domainId: string | null;
112
+ readonly displayName: string | null;
113
+ }[];
114
+ readonly defaultFrom: {
115
+ readonly address: string;
116
+ readonly displayName: string | null;
117
+ } | null;
118
+ readonly updatedAt: string;
119
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
120
+ export declare const update: (input: {
121
+ readonly id: string;
122
+ readonly displayName?: string | null | undefined;
123
+ readonly metadata?: {
124
+ readonly [x: string]: string | null | undefined;
125
+ } | null | undefined;
126
+ readonly defaultFrom?: {
127
+ readonly address: string;
128
+ readonly displayName?: string | null | undefined;
129
+ } | null | undefined;
130
+ }) => import("effect/Effect").Effect<{
131
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
132
+ readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
133
+ readonly slug: string;
134
+ readonly displayName: string;
135
+ readonly status: "active" | "paused";
136
+ readonly primaryAddress: string | null;
137
+ readonly createdAt: string;
138
+ readonly description: string | null;
139
+ readonly metadata: {
140
+ readonly [x: string]: string;
141
+ };
142
+ readonly addresses: readonly {
143
+ readonly id: string & import("effect/Brand").Brand<"MailboxAddressId">;
144
+ readonly address: string;
145
+ readonly source: "samvaHosted" | "verifiedDomain";
146
+ readonly domainId: string | null;
147
+ readonly displayName: string | null;
148
+ }[];
149
+ readonly defaultFrom: {
150
+ readonly address: string;
151
+ readonly displayName: string | null;
152
+ } | null;
153
+ readonly updatedAt: string;
154
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
155
+ export declare const remove: (input: {
156
+ readonly id: string;
157
+ }) => import("effect/Effect").Effect<{
158
+ readonly success: boolean;
159
+ }, import("./generated").BillingProviderError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
160
+ export declare const pause: (input: {
161
+ readonly id: string;
162
+ }) => import("effect/Effect").Effect<{
163
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
164
+ readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
165
+ readonly slug: string;
166
+ readonly displayName: string;
167
+ readonly status: "active" | "paused";
168
+ readonly primaryAddress: string | null;
169
+ readonly createdAt: string;
170
+ readonly description: string | null;
171
+ readonly metadata: {
172
+ readonly [x: string]: string;
173
+ };
174
+ readonly addresses: readonly {
175
+ readonly id: string & import("effect/Brand").Brand<"MailboxAddressId">;
176
+ readonly address: string;
177
+ readonly source: "samvaHosted" | "verifiedDomain";
178
+ readonly domainId: string | null;
179
+ readonly displayName: string | null;
180
+ }[];
181
+ readonly defaultFrom: {
182
+ readonly address: string;
183
+ readonly displayName: string | null;
184
+ } | null;
185
+ readonly updatedAt: string;
186
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
187
+ export declare const resume: (input: {
188
+ readonly id: string;
189
+ }) => import("effect/Effect").Effect<{
190
+ readonly id: string & import("effect/Brand").Brand<"MailboxId">;
191
+ readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
192
+ readonly slug: string;
193
+ readonly displayName: string;
194
+ readonly status: "active" | "paused";
195
+ readonly primaryAddress: string | null;
196
+ readonly createdAt: string;
197
+ readonly description: string | null;
198
+ readonly metadata: {
199
+ readonly [x: string]: string;
200
+ };
201
+ readonly addresses: readonly {
202
+ readonly id: string & import("effect/Brand").Brand<"MailboxAddressId">;
203
+ readonly address: string;
204
+ readonly source: "samvaHosted" | "verifiedDomain";
205
+ readonly domainId: string | null;
206
+ readonly displayName: string | null;
207
+ }[];
208
+ readonly defaultFrom: {
209
+ readonly address: string;
210
+ readonly displayName: string | null;
211
+ } | null;
212
+ readonly updatedAt: string;
213
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
214
+ export declare const getAgentActivity: (input: {
215
+ readonly id: string;
216
+ readonly after?: string | null | undefined;
217
+ readonly before?: string | null | undefined;
218
+ }) => import("effect/Effect").Effect<{
219
+ readonly actions: {
220
+ readonly byType: readonly {
221
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "reply" | "sendMessage" | "updateDraft";
222
+ readonly count: number;
223
+ }[];
224
+ readonly byState: readonly {
225
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
226
+ readonly count: number;
227
+ }[];
228
+ };
229
+ readonly events: {
230
+ readonly byType: readonly {
231
+ readonly type: "action.approval_requested" | "action.approval_resolved" | "action.executed" | "action.failed" | "action.policy_decided" | "action.proposed" | "address.attached" | "draft.created" | "draft.updated" | "email.received" | "email.released" | "email.sent" | "mailbox.created" | "thread.created" | "thread.updated";
232
+ readonly count: number;
233
+ }[];
234
+ };
235
+ readonly pendingApprovals: number;
236
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
237
+ export declare const listGrants: ((input: {
238
+ readonly id: string;
239
+ readonly limit?: string | null | undefined;
240
+ readonly cursor?: string | null | undefined;
241
+ }) => import("effect/Effect").Effect<{
242
+ readonly items: readonly {
243
+ readonly id: string & import("effect/Brand").Brand<"MailboxGrantId">;
244
+ readonly actor: {
245
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
246
+ readonly id: string;
247
+ readonly displayName?: string | null;
248
+ };
249
+ readonly permissions: readonly ("action:approve" | "action:propose" | "draft:write" | "label:write" | "mailbox:configure" | "mailbox:read" | "note:write" | "policy:read" | "quarantine:read" | "quarantine:release" | "thread:read" | "thread:write")[];
250
+ readonly sendMode: "approval" | "send";
251
+ readonly createdAt: string;
252
+ }[];
253
+ readonly nextCursor: string | null;
254
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>) & {
255
+ readonly pages: (input: {
256
+ readonly id: string;
257
+ readonly limit?: string | null | undefined;
258
+ readonly cursor?: string | null | undefined;
259
+ }) => import("effect/Stream").Stream<{
260
+ readonly items: readonly {
261
+ readonly id: string & import("effect/Brand").Brand<"MailboxGrantId">;
262
+ readonly actor: {
263
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
264
+ readonly id: string;
265
+ readonly displayName?: string | null;
266
+ };
267
+ readonly permissions: readonly ("action:approve" | "action:propose" | "draft:write" | "label:write" | "mailbox:configure" | "mailbox:read" | "note:write" | "policy:read" | "quarantine:read" | "quarantine:release" | "thread:read" | "thread:write")[];
268
+ readonly sendMode: "approval" | "send";
269
+ readonly createdAt: string;
270
+ }[];
271
+ readonly nextCursor: string | null;
272
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
273
+ readonly items: (input: {
274
+ readonly id: string;
275
+ readonly limit?: string | null | undefined;
276
+ readonly cursor?: string | null | undefined;
277
+ }) => import("effect/Stream").Stream<{
278
+ readonly id: string & import("effect/Brand").Brand<"MailboxGrantId">;
279
+ readonly actor: {
280
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
281
+ readonly id: string;
282
+ readonly displayName?: string | null;
283
+ };
284
+ readonly permissions: readonly ("action:approve" | "action:propose" | "draft:write" | "label:write" | "mailbox:configure" | "mailbox:read" | "note:write" | "policy:read" | "quarantine:read" | "quarantine:release" | "thread:read" | "thread:write")[];
285
+ readonly sendMode: "approval" | "send";
286
+ readonly createdAt: string;
287
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
288
+ };
289
+ export declare const createGrant: (input: {
290
+ readonly id: string;
291
+ readonly userId: string;
292
+ readonly role: string;
293
+ readonly sendMode?: string | null | undefined;
294
+ }) => import("effect/Effect").Effect<{
295
+ readonly id: string & import("effect/Brand").Brand<"MailboxGrantId">;
296
+ readonly actor: {
297
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
298
+ readonly id: string;
299
+ readonly displayName?: string | null;
300
+ };
301
+ readonly permissions: readonly ("action:approve" | "action:propose" | "draft:write" | "label:write" | "mailbox:configure" | "mailbox:read" | "note:write" | "policy:read" | "quarantine:read" | "quarantine:release" | "thread:read" | "thread:write")[];
302
+ readonly sendMode: "approval" | "send";
303
+ readonly createdAt: string;
304
+ }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
305
+ export declare const updateGrant: (input: {
306
+ readonly id: string;
307
+ readonly grantId: string;
308
+ readonly role?: string | null | undefined;
309
+ readonly sendMode?: string | null | undefined;
310
+ }) => import("effect/Effect").Effect<{
311
+ readonly id: string & import("effect/Brand").Brand<"MailboxGrantId">;
312
+ readonly actor: {
313
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
314
+ readonly id: string;
315
+ readonly displayName?: string | null;
316
+ };
317
+ readonly permissions: readonly ("action:approve" | "action:propose" | "draft:write" | "label:write" | "mailbox:configure" | "mailbox:read" | "note:write" | "policy:read" | "quarantine:read" | "quarantine:release" | "thread:read" | "thread:write")[];
318
+ readonly sendMode: "approval" | "send";
319
+ readonly createdAt: string;
320
+ }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
321
+ export declare const revokeGrant: (input: {
322
+ readonly id: string;
323
+ readonly grantId: string;
324
+ }) => import("effect/Effect").Effect<{
325
+ readonly success: boolean;
326
+ }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
327
+ export declare const listPolicies: (input: {
328
+ readonly id: string;
329
+ }) => import("effect/Effect").Effect<{
330
+ readonly items: readonly {
331
+ readonly id: string & import("effect/Brand").Brand<"MailboxPolicyId">;
332
+ readonly name: string;
333
+ readonly outcome: "deny" | "requireApproval";
334
+ readonly reason: string | null;
335
+ readonly enabled: boolean;
336
+ readonly createdAt: string;
337
+ readonly updatedAt: string;
338
+ }[];
339
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
340
+ export declare const createPolicy: (input: {
341
+ readonly id: string;
342
+ readonly name: string;
343
+ readonly outcome: string;
344
+ readonly reason?: string | null | undefined;
345
+ readonly enabled?: boolean | null | undefined;
346
+ }) => import("effect/Effect").Effect<{
347
+ readonly id: string & import("effect/Brand").Brand<"MailboxPolicyId">;
348
+ readonly name: string;
349
+ readonly outcome: "deny" | "requireApproval";
350
+ readonly reason: string | null;
351
+ readonly enabled: boolean;
352
+ readonly createdAt: string;
353
+ readonly updatedAt: string;
354
+ }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
355
+ export declare const getPolicy: (input: {
356
+ readonly id: string;
357
+ readonly policyId: string;
358
+ }) => import("effect/Effect").Effect<{
359
+ readonly id: string & import("effect/Brand").Brand<"MailboxPolicyId">;
360
+ readonly name: string;
361
+ readonly outcome: "deny" | "requireApproval";
362
+ readonly reason: string | null;
363
+ readonly enabled: boolean;
364
+ readonly createdAt: string;
365
+ readonly updatedAt: string;
366
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
367
+ export declare const updatePolicy: (input: {
368
+ readonly id: string;
369
+ readonly policyId: string;
370
+ readonly name?: string | null | undefined;
371
+ readonly outcome?: string | null | undefined;
372
+ readonly reason?: string | null | undefined;
373
+ readonly enabled?: boolean | null | undefined;
374
+ }) => import("effect/Effect").Effect<{
375
+ readonly id: string & import("effect/Brand").Brand<"MailboxPolicyId">;
376
+ readonly name: string;
377
+ readonly outcome: "deny" | "requireApproval";
378
+ readonly reason: string | null;
379
+ readonly enabled: boolean;
380
+ readonly createdAt: string;
381
+ readonly updatedAt: string;
382
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
383
+ export declare const deletePolicy: (input: {
384
+ readonly id: string;
385
+ readonly policyId: string;
386
+ }) => import("effect/Effect").Effect<{
387
+ readonly success: boolean;
388
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
389
+ export declare const listFolders: (input: {
390
+ readonly id: string;
391
+ }) => import("effect/Effect").Effect<{
392
+ readonly items: readonly {
393
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
394
+ readonly count: number;
395
+ readonly unreadCount: number;
396
+ }[];
397
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
398
+ export declare const listLabels: (input: {
399
+ readonly id: string;
400
+ }) => import("effect/Effect").Effect<{
401
+ readonly items: readonly {
402
+ readonly id: string & import("effect/Brand").Brand<"MailboxLabelId">;
403
+ readonly slug: string;
404
+ readonly displayName: string;
405
+ readonly color: "agent" | "billing" | "domain" | "important" | "neutral" | "routing" | null;
406
+ readonly createdAt: string;
407
+ readonly updatedAt: string;
408
+ }[];
409
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
410
+ export declare const createLabel: (input: {
411
+ readonly id: string;
412
+ readonly slug: string;
413
+ readonly displayName: string;
414
+ readonly color?: string | null | undefined;
415
+ }) => import("effect/Effect").Effect<{
416
+ readonly id: string & import("effect/Brand").Brand<"MailboxLabelId">;
417
+ readonly slug: string;
418
+ readonly displayName: string;
419
+ readonly color: "agent" | "billing" | "domain" | "important" | "neutral" | "routing" | null;
420
+ readonly createdAt: string;
421
+ readonly updatedAt: string;
422
+ }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
423
+ export declare const updateLabel: (input: {
424
+ readonly id: string;
425
+ readonly labelId: string;
426
+ readonly displayName?: string | null | undefined;
427
+ readonly color?: string | null | undefined;
428
+ }) => import("effect/Effect").Effect<{
429
+ readonly id: string & import("effect/Brand").Brand<"MailboxLabelId">;
430
+ readonly slug: string;
431
+ readonly displayName: string;
432
+ readonly color: "agent" | "billing" | "domain" | "important" | "neutral" | "routing" | null;
433
+ readonly createdAt: string;
434
+ readonly updatedAt: string;
435
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
436
+ export declare const deleteLabel: (input: {
437
+ readonly id: string;
438
+ readonly labelId: string;
439
+ }) => import("effect/Effect").Effect<{
440
+ readonly success: boolean;
441
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
442
+ export declare const listThreads: ((input: {
443
+ readonly id: string;
444
+ readonly limit?: string | null | undefined;
445
+ readonly cursor?: string | null | undefined;
446
+ readonly after?: string | null | undefined;
447
+ readonly before?: string | null | undefined;
448
+ readonly q?: string | null | undefined;
449
+ readonly folder?: string | null | undefined;
450
+ readonly label?: string | null | undefined;
451
+ readonly unread?: string | null | undefined;
452
+ readonly starred?: string | null | undefined;
453
+ readonly snoozed?: string | null | undefined;
454
+ }) => import("effect/Effect").Effect<{
455
+ readonly items: readonly {
456
+ readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
457
+ readonly subject: string | null;
458
+ readonly preview: string | null;
459
+ readonly from: {
460
+ readonly address: string | null;
461
+ readonly displayName: string | null;
462
+ } | null;
463
+ readonly messageCount: number;
464
+ readonly hasAttachments: boolean;
465
+ readonly hasDraft: boolean;
466
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
467
+ readonly priority: "high" | "low" | "normal" | "urgent";
468
+ readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
469
+ readonly read: boolean;
470
+ readonly starred: boolean;
471
+ readonly snoozedUntil: string | null;
472
+ readonly lastActivityAt: string;
473
+ }[];
474
+ readonly nextCursor: string | null;
475
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>) & {
476
+ readonly pages: (input: {
477
+ readonly id: string;
478
+ readonly limit?: string | null | undefined;
479
+ readonly cursor?: string | null | undefined;
480
+ readonly after?: string | null | undefined;
481
+ readonly before?: string | null | undefined;
482
+ readonly q?: string | null | undefined;
483
+ readonly folder?: string | null | undefined;
484
+ readonly label?: string | null | undefined;
485
+ readonly unread?: string | null | undefined;
486
+ readonly starred?: string | null | undefined;
487
+ readonly snoozed?: string | null | undefined;
488
+ }) => import("effect/Stream").Stream<{
489
+ readonly items: readonly {
490
+ readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
491
+ readonly subject: string | null;
492
+ readonly preview: string | null;
493
+ readonly from: {
494
+ readonly address: string | null;
495
+ readonly displayName: string | null;
496
+ } | null;
497
+ readonly messageCount: number;
498
+ readonly hasAttachments: boolean;
499
+ readonly hasDraft: boolean;
500
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
501
+ readonly priority: "high" | "low" | "normal" | "urgent";
502
+ readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
503
+ readonly read: boolean;
504
+ readonly starred: boolean;
505
+ readonly snoozedUntil: string | null;
506
+ readonly lastActivityAt: string;
507
+ }[];
508
+ readonly nextCursor: string | null;
509
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
510
+ readonly items: (input: {
511
+ readonly id: string;
512
+ readonly limit?: string | null | undefined;
513
+ readonly cursor?: string | null | undefined;
514
+ readonly after?: string | null | undefined;
515
+ readonly before?: string | null | undefined;
516
+ readonly q?: string | null | undefined;
517
+ readonly folder?: string | null | undefined;
518
+ readonly label?: string | null | undefined;
519
+ readonly unread?: string | null | undefined;
520
+ readonly starred?: string | null | undefined;
521
+ readonly snoozed?: string | null | undefined;
522
+ }) => import("effect/Stream").Stream<{
523
+ readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
524
+ readonly subject: string | null;
525
+ readonly preview: string | null;
526
+ readonly from: {
527
+ readonly address: string | null;
528
+ readonly displayName: string | null;
529
+ } | null;
530
+ readonly messageCount: number;
531
+ readonly hasAttachments: boolean;
532
+ readonly hasDraft: boolean;
533
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
534
+ readonly priority: "high" | "low" | "normal" | "urgent";
535
+ readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
536
+ readonly read: boolean;
537
+ readonly starred: boolean;
538
+ readonly snoozedUntil: string | null;
539
+ readonly lastActivityAt: string;
540
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
541
+ };
542
+ export declare const getThread: (input: {
543
+ readonly id: string;
544
+ readonly threadId: string;
545
+ }) => import("effect/Effect").Effect<{
546
+ readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
547
+ readonly subject: string | null;
548
+ readonly preview: string | null;
549
+ readonly from: {
550
+ readonly address: string | null;
551
+ readonly displayName: string | null;
552
+ } | null;
553
+ readonly messageCount: number;
554
+ readonly hasAttachments: boolean;
555
+ readonly hasDraft: boolean;
556
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
557
+ readonly priority: "high" | "low" | "normal" | "urgent";
558
+ readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
559
+ readonly read: boolean;
560
+ readonly starred: boolean;
561
+ readonly snoozedUntil: string | null;
562
+ readonly lastActivityAt: string;
563
+ readonly conversationId: string & import("effect/Brand").Brand<"ConversationId">;
564
+ readonly participants: readonly {
565
+ readonly actor: {
566
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
567
+ readonly id: string;
568
+ readonly displayName?: string | null;
569
+ };
570
+ readonly role: "assignee" | "observer" | "recipient" | "sender";
571
+ readonly address?: string | null;
572
+ }[];
573
+ readonly createdAt: string;
574
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
575
+ export declare const updateThread: (input: {
576
+ readonly id: string;
577
+ readonly threadId: string;
578
+ readonly folder?: string | null | undefined;
579
+ readonly priority?: string | null | undefined;
580
+ readonly read?: boolean | null | undefined;
581
+ readonly starred?: boolean | null | undefined;
582
+ readonly snoozedUntil?: string | null | undefined;
583
+ }) => import("effect/Effect").Effect<{
584
+ readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
585
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
586
+ readonly priority: "high" | "low" | "normal" | "urgent";
587
+ readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
588
+ readonly read: boolean;
589
+ readonly starred: boolean;
590
+ readonly snoozedUntil: string | null;
591
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
592
+ export declare const addThreadLabels: (input: {
593
+ readonly id: string;
594
+ readonly threadId: string;
595
+ readonly labels: readonly string[];
596
+ }) => import("effect/Effect").Effect<{
597
+ readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
598
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
599
+ readonly priority: "high" | "low" | "normal" | "urgent";
600
+ readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
601
+ readonly read: boolean;
602
+ readonly starred: boolean;
603
+ readonly snoozedUntil: string | null;
604
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
605
+ export declare const removeThreadLabels: (input: {
606
+ readonly id: string;
607
+ readonly threadId: string;
608
+ readonly labels: readonly string[];
609
+ }) => import("effect/Effect").Effect<{
610
+ readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
611
+ readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
612
+ readonly priority: "high" | "low" | "normal" | "urgent";
613
+ readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
614
+ readonly read: boolean;
615
+ readonly starred: boolean;
616
+ readonly snoozedUntil: string | null;
617
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
618
+ export declare const listThreadMessages: ((input: {
619
+ readonly id: string;
620
+ readonly threadId: string;
621
+ readonly limit?: string | null | undefined;
622
+ readonly cursor?: string | null | undefined;
623
+ }) => import("effect/Effect").Effect<{
624
+ readonly items: readonly {
625
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
626
+ readonly direction: "inbound" | "outbound";
627
+ readonly from: {
628
+ readonly actor?: {
629
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
630
+ readonly id: string;
631
+ readonly displayName?: string | null;
632
+ } | null;
633
+ readonly displayName?: string | null;
634
+ readonly address: string;
635
+ };
636
+ readonly to: readonly string[];
637
+ readonly subject: string | null;
638
+ readonly preview: string | null;
639
+ readonly hasAttachments: boolean;
640
+ readonly occurredAt: string;
641
+ }[];
642
+ readonly nextCursor: string | null;
643
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>) & {
644
+ readonly pages: (input: {
645
+ readonly id: string;
646
+ readonly threadId: string;
647
+ readonly limit?: string | null | undefined;
648
+ readonly cursor?: string | null | undefined;
649
+ }) => import("effect/Stream").Stream<{
650
+ readonly items: readonly {
651
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
652
+ readonly direction: "inbound" | "outbound";
653
+ readonly from: {
654
+ readonly actor?: {
655
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
656
+ readonly id: string;
657
+ readonly displayName?: string | null;
658
+ } | null;
659
+ readonly displayName?: string | null;
660
+ readonly address: string;
661
+ };
662
+ readonly to: readonly string[];
663
+ readonly subject: string | null;
664
+ readonly preview: string | null;
665
+ readonly hasAttachments: boolean;
666
+ readonly occurredAt: string;
667
+ }[];
668
+ readonly nextCursor: string | null;
669
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
670
+ readonly items: (input: {
671
+ readonly id: string;
672
+ readonly threadId: string;
673
+ readonly limit?: string | null | undefined;
674
+ readonly cursor?: string | null | undefined;
675
+ }) => import("effect/Stream").Stream<{
676
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
677
+ readonly direction: "inbound" | "outbound";
678
+ readonly from: {
679
+ readonly actor?: {
680
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
681
+ readonly id: string;
682
+ readonly displayName?: string | null;
683
+ } | null;
684
+ readonly displayName?: string | null;
685
+ readonly address: string;
686
+ };
687
+ readonly to: readonly string[];
688
+ readonly subject: string | null;
689
+ readonly preview: string | null;
690
+ readonly hasAttachments: boolean;
691
+ readonly occurredAt: string;
692
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
693
+ };
694
+ export declare const getThreadContent: ((input: {
695
+ readonly id: string;
696
+ readonly threadId: string;
697
+ readonly limit?: string | null | undefined;
698
+ readonly cursor?: string | null | undefined;
699
+ }) => import("effect/Effect").Effect<{
700
+ readonly items: readonly {
701
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
702
+ readonly threadId: string & import("effect/Brand").Brand<"MailboxThreadId">;
703
+ readonly conversationId: string & import("effect/Brand").Brand<"ConversationId">;
704
+ readonly direction: "inbound" | "outbound";
705
+ readonly from: {
706
+ readonly actor?: {
707
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
708
+ readonly id: string;
709
+ readonly displayName?: string | null;
710
+ } | null;
711
+ readonly displayName?: string | null;
712
+ readonly address: string;
713
+ };
714
+ readonly recipients: readonly {
715
+ readonly kind: "bcc" | "cc" | "to";
716
+ readonly actor?: {
717
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
718
+ readonly id: string;
719
+ readonly displayName?: string | null;
720
+ } | null;
721
+ readonly displayName?: string | null;
722
+ readonly address: string;
723
+ }[];
724
+ readonly replyTo: readonly string[];
725
+ readonly subject?: string | null;
726
+ readonly text?: string | null;
727
+ readonly html?: string | null;
728
+ readonly replyText?: string | null;
729
+ readonly headers: {
730
+ readonly messageId: string | null;
731
+ readonly inReplyTo: string | null;
732
+ readonly references: readonly string[];
733
+ };
734
+ readonly authentication: {
735
+ readonly spf: string | null;
736
+ readonly dkim: string | null;
737
+ readonly dmarc: string | null;
738
+ } | null;
739
+ readonly attachments: readonly {
740
+ readonly id: string & import("effect/Brand").Brand<"AttachmentId">;
741
+ readonly filename: string;
742
+ readonly contentType: string;
743
+ readonly size: number;
744
+ readonly isInline: boolean;
745
+ }[];
746
+ readonly sentBy?: {
747
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
748
+ readonly id: string;
749
+ readonly displayName?: string | null;
750
+ } | null;
751
+ readonly occurredAt: string;
752
+ }[];
753
+ readonly nextCursor: string | null;
754
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>) & {
755
+ readonly pages: (input: {
756
+ readonly id: string;
757
+ readonly threadId: string;
758
+ readonly limit?: string | null | undefined;
759
+ readonly cursor?: string | null | undefined;
760
+ }) => import("effect/Stream").Stream<{
761
+ readonly items: readonly {
762
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
763
+ readonly threadId: string & import("effect/Brand").Brand<"MailboxThreadId">;
764
+ readonly conversationId: string & import("effect/Brand").Brand<"ConversationId">;
765
+ readonly direction: "inbound" | "outbound";
766
+ readonly from: {
767
+ readonly actor?: {
768
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
769
+ readonly id: string;
770
+ readonly displayName?: string | null;
771
+ } | null;
772
+ readonly displayName?: string | null;
773
+ readonly address: string;
774
+ };
775
+ readonly recipients: readonly {
776
+ readonly kind: "bcc" | "cc" | "to";
777
+ readonly actor?: {
778
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
779
+ readonly id: string;
780
+ readonly displayName?: string | null;
781
+ } | null;
782
+ readonly displayName?: string | null;
783
+ readonly address: string;
784
+ }[];
785
+ readonly replyTo: readonly string[];
786
+ readonly subject?: string | null;
787
+ readonly text?: string | null;
788
+ readonly html?: string | null;
789
+ readonly replyText?: string | null;
790
+ readonly headers: {
791
+ readonly messageId: string | null;
792
+ readonly inReplyTo: string | null;
793
+ readonly references: readonly string[];
794
+ };
795
+ readonly authentication: {
796
+ readonly spf: string | null;
797
+ readonly dkim: string | null;
798
+ readonly dmarc: string | null;
799
+ } | null;
800
+ readonly attachments: readonly {
801
+ readonly id: string & import("effect/Brand").Brand<"AttachmentId">;
802
+ readonly filename: string;
803
+ readonly contentType: string;
804
+ readonly size: number;
805
+ readonly isInline: boolean;
806
+ }[];
807
+ readonly sentBy?: {
808
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
809
+ readonly id: string;
810
+ readonly displayName?: string | null;
811
+ } | null;
812
+ readonly occurredAt: string;
813
+ }[];
814
+ readonly nextCursor: string | null;
815
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
816
+ readonly items: (input: {
817
+ readonly id: string;
818
+ readonly threadId: string;
819
+ readonly limit?: string | null | undefined;
820
+ readonly cursor?: string | null | undefined;
821
+ }) => import("effect/Stream").Stream<{
822
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
823
+ readonly threadId: string & import("effect/Brand").Brand<"MailboxThreadId">;
824
+ readonly conversationId: string & import("effect/Brand").Brand<"ConversationId">;
825
+ readonly direction: "inbound" | "outbound";
826
+ readonly from: {
827
+ readonly actor?: {
828
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
829
+ readonly id: string;
830
+ readonly displayName?: string | null;
831
+ } | null;
832
+ readonly displayName?: string | null;
833
+ readonly address: string;
834
+ };
835
+ readonly recipients: readonly {
836
+ readonly kind: "bcc" | "cc" | "to";
837
+ readonly actor?: {
838
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
839
+ readonly id: string;
840
+ readonly displayName?: string | null;
841
+ } | null;
842
+ readonly displayName?: string | null;
843
+ readonly address: string;
844
+ }[];
845
+ readonly replyTo: readonly string[];
846
+ readonly subject?: string | null;
847
+ readonly text?: string | null;
848
+ readonly html?: string | null;
849
+ readonly replyText?: string | null;
850
+ readonly headers: {
851
+ readonly messageId: string | null;
852
+ readonly inReplyTo: string | null;
853
+ readonly references: readonly string[];
854
+ };
855
+ readonly authentication: {
856
+ readonly spf: string | null;
857
+ readonly dkim: string | null;
858
+ readonly dmarc: string | null;
859
+ } | null;
860
+ readonly attachments: readonly {
861
+ readonly id: string & import("effect/Brand").Brand<"AttachmentId">;
862
+ readonly filename: string;
863
+ readonly contentType: string;
864
+ readonly size: number;
865
+ readonly isInline: boolean;
866
+ }[];
867
+ readonly sentBy?: {
868
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
869
+ readonly id: string;
870
+ readonly displayName?: string | null;
871
+ } | null;
872
+ readonly occurredAt: string;
873
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
874
+ };
875
+ export declare const listThreadNotes: ((input: {
876
+ readonly id: string;
877
+ readonly threadId: string;
878
+ readonly limit?: string | null | undefined;
879
+ readonly cursor?: string | null | undefined;
880
+ }) => import("effect/Effect").Effect<{
881
+ readonly items: readonly {
882
+ readonly id: string & import("effect/Brand").Brand<"MailboxNoteId">;
883
+ readonly author: {
884
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
885
+ readonly id: string;
886
+ readonly displayName?: string | null;
887
+ };
888
+ readonly body: string;
889
+ readonly color: string | null;
890
+ readonly pinned: boolean;
891
+ readonly createdAt: string;
892
+ readonly updatedAt: string;
893
+ }[];
894
+ readonly nextCursor: string | null;
895
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>) & {
896
+ readonly pages: (input: {
897
+ readonly id: string;
898
+ readonly threadId: string;
899
+ readonly limit?: string | null | undefined;
900
+ readonly cursor?: string | null | undefined;
901
+ }) => import("effect/Stream").Stream<{
902
+ readonly items: readonly {
903
+ readonly id: string & import("effect/Brand").Brand<"MailboxNoteId">;
904
+ readonly author: {
905
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
906
+ readonly id: string;
907
+ readonly displayName?: string | null;
908
+ };
909
+ readonly body: string;
910
+ readonly color: string | null;
911
+ readonly pinned: boolean;
912
+ readonly createdAt: string;
913
+ readonly updatedAt: string;
914
+ }[];
915
+ readonly nextCursor: string | null;
916
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
917
+ readonly items: (input: {
918
+ readonly id: string;
919
+ readonly threadId: string;
920
+ readonly limit?: string | null | undefined;
921
+ readonly cursor?: string | null | undefined;
922
+ }) => import("effect/Stream").Stream<{
923
+ readonly id: string & import("effect/Brand").Brand<"MailboxNoteId">;
924
+ readonly author: {
925
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
926
+ readonly id: string;
927
+ readonly displayName?: string | null;
928
+ };
929
+ readonly body: string;
930
+ readonly color: string | null;
931
+ readonly pinned: boolean;
932
+ readonly createdAt: string;
933
+ readonly updatedAt: string;
934
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
935
+ };
936
+ export declare const createNote: (input: {
937
+ readonly id: string;
938
+ readonly threadId: string;
939
+ readonly body: string;
940
+ readonly color?: string | null | undefined;
941
+ readonly pinned?: boolean | null | undefined;
942
+ }) => import("effect/Effect").Effect<{
943
+ readonly id: string & import("effect/Brand").Brand<"MailboxNoteId">;
944
+ readonly author: {
945
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
946
+ readonly id: string;
947
+ readonly displayName?: string | null;
948
+ };
949
+ readonly body: string;
950
+ readonly color: string | null;
951
+ readonly pinned: boolean;
952
+ readonly createdAt: string;
953
+ readonly updatedAt: string;
954
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
955
+ export declare const updateNote: (input: {
956
+ readonly id: string;
957
+ readonly threadId: string;
958
+ readonly noteId: string;
959
+ readonly body?: string | null | undefined;
960
+ readonly color?: string | null | undefined;
961
+ readonly pinned?: boolean | null | undefined;
962
+ }) => import("effect/Effect").Effect<{
963
+ readonly id: string & import("effect/Brand").Brand<"MailboxNoteId">;
964
+ readonly author: {
965
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
966
+ readonly id: string;
967
+ readonly displayName?: string | null;
968
+ };
969
+ readonly body: string;
970
+ readonly color: string | null;
971
+ readonly pinned: boolean;
972
+ readonly createdAt: string;
973
+ readonly updatedAt: string;
974
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
975
+ export declare const deleteNote: (input: {
976
+ readonly id: string;
977
+ readonly threadId: string;
978
+ readonly noteId: string;
979
+ }) => import("effect/Effect").Effect<{
980
+ readonly success: boolean;
981
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
982
+ export declare const sendMessage: (input: {
983
+ readonly id: string;
984
+ readonly to: readonly string[];
985
+ readonly cc?: readonly string[] | null | undefined;
986
+ readonly bcc?: readonly string[] | null | undefined;
987
+ readonly replyTo?: readonly string[] | null | undefined;
988
+ readonly subject: string;
989
+ readonly text?: string | null | undefined;
990
+ readonly html?: string | null | undefined;
991
+ readonly attachments?: readonly {
992
+ readonly filename: string;
993
+ readonly content?: string | null | undefined;
994
+ readonly mediaId?: string | null | undefined;
995
+ readonly contentType: string;
996
+ readonly size: number;
997
+ }[] | null | undefined;
998
+ } & {
999
+ readonly idempotencyKey?: string | undefined;
1000
+ }) => import("effect/Effect").Effect<{
1001
+ readonly actionId: string & import("effect/Brand").Brand<"MailboxActionId">;
1002
+ readonly messageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1003
+ readonly threadId: string & import("effect/Brand").Brand<"MailboxThreadId">;
1004
+ readonly status: "pending_approval" | "sent";
1005
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
1006
+ readonly reviewExpectedAt: string | null;
1007
+ readonly skippedRecipients: readonly {
1008
+ readonly address: string;
1009
+ readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
1010
+ readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
1011
+ }[];
1012
+ readonly createdAt: string;
1013
+ }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").PaymentRequiredError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1014
+ export declare const getMessage: (input: {
1015
+ readonly id: string;
1016
+ readonly messageId: string;
1017
+ }) => import("effect/Effect").Effect<{
1018
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
1019
+ readonly threadId: string & import("effect/Brand").Brand<"MailboxThreadId">;
1020
+ readonly conversationId: string & import("effect/Brand").Brand<"ConversationId">;
1021
+ readonly direction: "inbound" | "outbound";
1022
+ readonly from: {
1023
+ readonly actor?: {
1024
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1025
+ readonly id: string;
1026
+ readonly displayName?: string | null;
1027
+ } | null;
1028
+ readonly displayName?: string | null;
1029
+ readonly address: string;
1030
+ };
1031
+ readonly recipients: readonly {
1032
+ readonly kind: "bcc" | "cc" | "to";
1033
+ readonly actor?: {
1034
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1035
+ readonly id: string;
1036
+ readonly displayName?: string | null;
1037
+ } | null;
1038
+ readonly displayName?: string | null;
1039
+ readonly address: string;
1040
+ }[];
1041
+ readonly replyTo: readonly string[];
1042
+ readonly subject?: string | null;
1043
+ readonly text?: string | null;
1044
+ readonly html?: string | null;
1045
+ readonly replyText?: string | null;
1046
+ readonly headers: {
1047
+ readonly messageId: string | null;
1048
+ readonly inReplyTo: string | null;
1049
+ readonly references: readonly string[];
1050
+ };
1051
+ readonly authentication: {
1052
+ readonly spf: string | null;
1053
+ readonly dkim: string | null;
1054
+ readonly dmarc: string | null;
1055
+ } | null;
1056
+ readonly attachments: readonly {
1057
+ readonly id: string & import("effect/Brand").Brand<"AttachmentId">;
1058
+ readonly filename: string;
1059
+ readonly contentType: string;
1060
+ readonly size: number;
1061
+ readonly isInline: boolean;
1062
+ }[];
1063
+ readonly sentBy?: {
1064
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1065
+ readonly id: string;
1066
+ readonly displayName?: string | null;
1067
+ } | null;
1068
+ readonly occurredAt: string;
1069
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1070
+ export declare const getMessageRaw: (input: {
1071
+ readonly id: string;
1072
+ readonly messageId: string;
1073
+ }) => import("effect/Effect").Effect<{
1074
+ readonly url: string;
1075
+ readonly expiresAt: string;
1076
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1077
+ export declare const getMessageAttachment: (input: {
1078
+ readonly id: string;
1079
+ readonly messageId: string;
1080
+ readonly attachmentId: string;
1081
+ }) => import("effect/Effect").Effect<{
1082
+ readonly url: string;
1083
+ readonly expiresAt: string;
1084
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1085
+ export declare const reply: (input: {
1086
+ readonly id: string;
1087
+ readonly messageId: string;
1088
+ readonly cc?: readonly string[] | null | undefined;
1089
+ readonly bcc?: readonly string[] | null | undefined;
1090
+ readonly text?: string | null | undefined;
1091
+ readonly html?: string | null | undefined;
1092
+ readonly attachments?: readonly {
1093
+ readonly filename: string;
1094
+ readonly content?: string | null | undefined;
1095
+ readonly mediaId?: string | null | undefined;
1096
+ readonly contentType: string;
1097
+ readonly size: number;
1098
+ }[] | null | undefined;
1099
+ } & {
1100
+ readonly idempotencyKey?: string | undefined;
1101
+ }) => import("effect/Effect").Effect<{
1102
+ readonly actionId: string & import("effect/Brand").Brand<"MailboxActionId">;
1103
+ readonly messageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1104
+ readonly threadId: string & import("effect/Brand").Brand<"MailboxThreadId">;
1105
+ readonly status: "pending_approval" | "sent";
1106
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
1107
+ readonly reviewExpectedAt: string | null;
1108
+ readonly skippedRecipients: readonly {
1109
+ readonly address: string;
1110
+ readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
1111
+ readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
1112
+ }[];
1113
+ readonly createdAt: string;
1114
+ }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").PaymentRequiredError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1115
+ export declare const replyAll: (input: {
1116
+ readonly id: string;
1117
+ readonly messageId: string;
1118
+ readonly cc?: readonly string[] | null | undefined;
1119
+ readonly bcc?: readonly string[] | null | undefined;
1120
+ readonly text?: string | null | undefined;
1121
+ readonly html?: string | null | undefined;
1122
+ readonly attachments?: readonly {
1123
+ readonly filename: string;
1124
+ readonly content?: string | null | undefined;
1125
+ readonly mediaId?: string | null | undefined;
1126
+ readonly contentType: string;
1127
+ readonly size: number;
1128
+ }[] | null | undefined;
1129
+ } & {
1130
+ readonly idempotencyKey?: string | undefined;
1131
+ }) => import("effect/Effect").Effect<{
1132
+ readonly actionId: string & import("effect/Brand").Brand<"MailboxActionId">;
1133
+ readonly messageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1134
+ readonly threadId: string & import("effect/Brand").Brand<"MailboxThreadId">;
1135
+ readonly status: "pending_approval" | "sent";
1136
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
1137
+ readonly reviewExpectedAt: string | null;
1138
+ readonly skippedRecipients: readonly {
1139
+ readonly address: string;
1140
+ readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
1141
+ readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
1142
+ }[];
1143
+ readonly createdAt: string;
1144
+ }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").PaymentRequiredError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1145
+ export declare const forward: (input: {
1146
+ readonly id: string;
1147
+ readonly messageId: string;
1148
+ readonly to: readonly string[];
1149
+ readonly cc?: readonly string[] | null | undefined;
1150
+ readonly bcc?: readonly string[] | null | undefined;
1151
+ readonly text?: string | null | undefined;
1152
+ readonly html?: string | null | undefined;
1153
+ readonly attachments?: readonly {
1154
+ readonly filename: string;
1155
+ readonly content?: string | null | undefined;
1156
+ readonly mediaId?: string | null | undefined;
1157
+ readonly contentType: string;
1158
+ readonly size: number;
1159
+ }[] | null | undefined;
1160
+ } & {
1161
+ readonly idempotencyKey?: string | undefined;
1162
+ }) => import("effect/Effect").Effect<{
1163
+ readonly actionId: string & import("effect/Brand").Brand<"MailboxActionId">;
1164
+ readonly messageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1165
+ readonly threadId: string & import("effect/Brand").Brand<"MailboxThreadId">;
1166
+ readonly status: "pending_approval" | "sent";
1167
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
1168
+ readonly reviewExpectedAt: string | null;
1169
+ readonly skippedRecipients: readonly {
1170
+ readonly address: string;
1171
+ readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
1172
+ readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
1173
+ }[];
1174
+ readonly createdAt: string;
1175
+ }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").PaymentRequiredError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1176
+ export declare const listQuarantine: ((input: {
1177
+ readonly id: string;
1178
+ readonly limit?: string | null | undefined;
1179
+ readonly cursor?: string | null | undefined;
1180
+ readonly after?: string | null | undefined;
1181
+ readonly before?: string | null | undefined;
1182
+ }) => import("effect/Effect").Effect<{
1183
+ readonly items: readonly {
1184
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
1185
+ readonly disposition: "isolated" | "quarantined";
1186
+ readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "virus" | "virus_unscanned";
1187
+ readonly source: "classifier" | "receipt";
1188
+ readonly from: {
1189
+ readonly address: string;
1190
+ readonly name: string | null;
1191
+ };
1192
+ readonly subject: string | null;
1193
+ readonly receivedAt: string;
1194
+ readonly heldAt: string;
1195
+ readonly releasedAt: string | null;
1196
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1197
+ readonly discardedAt: string | null;
1198
+ }[];
1199
+ readonly nextCursor: string | null;
1200
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>) & {
1201
+ readonly pages: (input: {
1202
+ readonly id: string;
1203
+ readonly limit?: string | null | undefined;
1204
+ readonly cursor?: string | null | undefined;
1205
+ readonly after?: string | null | undefined;
1206
+ readonly before?: string | null | undefined;
1207
+ }) => import("effect/Stream").Stream<{
1208
+ readonly items: readonly {
1209
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
1210
+ readonly disposition: "isolated" | "quarantined";
1211
+ readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "virus" | "virus_unscanned";
1212
+ readonly source: "classifier" | "receipt";
1213
+ readonly from: {
1214
+ readonly address: string;
1215
+ readonly name: string | null;
1216
+ };
1217
+ readonly subject: string | null;
1218
+ readonly receivedAt: string;
1219
+ readonly heldAt: string;
1220
+ readonly releasedAt: string | null;
1221
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1222
+ readonly discardedAt: string | null;
1223
+ }[];
1224
+ readonly nextCursor: string | null;
1225
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1226
+ readonly items: (input: {
1227
+ readonly id: string;
1228
+ readonly limit?: string | null | undefined;
1229
+ readonly cursor?: string | null | undefined;
1230
+ readonly after?: string | null | undefined;
1231
+ readonly before?: string | null | undefined;
1232
+ }) => import("effect/Stream").Stream<{
1233
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
1234
+ readonly disposition: "isolated" | "quarantined";
1235
+ readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "virus" | "virus_unscanned";
1236
+ readonly source: "classifier" | "receipt";
1237
+ readonly from: {
1238
+ readonly address: string;
1239
+ readonly name: string | null;
1240
+ };
1241
+ readonly subject: string | null;
1242
+ readonly receivedAt: string;
1243
+ readonly heldAt: string;
1244
+ readonly releasedAt: string | null;
1245
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1246
+ readonly discardedAt: string | null;
1247
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1248
+ };
1249
+ export declare const releaseMessage: (input: {
1250
+ readonly id: string;
1251
+ readonly messageId: string;
1252
+ }) => import("effect/Effect").Effect<{
1253
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
1254
+ readonly disposition: "isolated" | "quarantined";
1255
+ readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "virus" | "virus_unscanned";
1256
+ readonly source: "classifier" | "receipt";
1257
+ readonly from: {
1258
+ readonly address: string;
1259
+ readonly name: string | null;
1260
+ };
1261
+ readonly subject: string | null;
1262
+ readonly receivedAt: string;
1263
+ readonly heldAt: string;
1264
+ readonly releasedAt: string | null;
1265
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1266
+ readonly discardedAt: string | null;
1267
+ }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1268
+ export declare const discardMessage: (input: {
1269
+ readonly id: string;
1270
+ readonly messageId: string;
1271
+ }) => import("effect/Effect").Effect<{
1272
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
1273
+ readonly disposition: "isolated" | "quarantined";
1274
+ readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "virus" | "virus_unscanned";
1275
+ readonly source: "classifier" | "receipt";
1276
+ readonly from: {
1277
+ readonly address: string;
1278
+ readonly name: string | null;
1279
+ };
1280
+ readonly subject: string | null;
1281
+ readonly receivedAt: string;
1282
+ readonly heldAt: string;
1283
+ readonly releasedAt: string | null;
1284
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1285
+ readonly discardedAt: string | null;
1286
+ }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1287
+ export declare const listDrafts: ((input: {
1288
+ readonly id: string;
1289
+ readonly limit?: string | null | undefined;
1290
+ readonly cursor?: string | null | undefined;
1291
+ readonly threadId?: string | null | undefined;
1292
+ }) => import("effect/Effect").Effect<{
1293
+ readonly items: readonly {
1294
+ readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
1295
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1296
+ readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1297
+ readonly state: "approvalPending" | "saved" | "sent";
1298
+ readonly to: readonly string[];
1299
+ readonly subject: string | null;
1300
+ readonly createdAt: string;
1301
+ readonly updatedAt: string;
1302
+ }[];
1303
+ readonly nextCursor: string | null;
1304
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>) & {
1305
+ readonly pages: (input: {
1306
+ readonly id: string;
1307
+ readonly limit?: string | null | undefined;
1308
+ readonly cursor?: string | null | undefined;
1309
+ readonly threadId?: string | null | undefined;
1310
+ }) => import("effect/Stream").Stream<{
1311
+ readonly items: readonly {
1312
+ readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
1313
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1314
+ readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1315
+ readonly state: "approvalPending" | "saved" | "sent";
1316
+ readonly to: readonly string[];
1317
+ readonly subject: string | null;
1318
+ readonly createdAt: string;
1319
+ readonly updatedAt: string;
1320
+ }[];
1321
+ readonly nextCursor: string | null;
1322
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1323
+ readonly items: (input: {
1324
+ readonly id: string;
1325
+ readonly limit?: string | null | undefined;
1326
+ readonly cursor?: string | null | undefined;
1327
+ readonly threadId?: string | null | undefined;
1328
+ }) => import("effect/Stream").Stream<{
1329
+ readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
1330
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1331
+ readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1332
+ readonly state: "approvalPending" | "saved" | "sent";
1333
+ readonly to: readonly string[];
1334
+ readonly subject: string | null;
1335
+ readonly createdAt: string;
1336
+ readonly updatedAt: string;
1337
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1338
+ };
1339
+ export declare const createDraft: (input: {
1340
+ readonly id: string;
1341
+ readonly to?: readonly string[] | null | undefined;
1342
+ readonly cc?: readonly string[] | null | undefined;
1343
+ readonly bcc?: readonly string[] | null | undefined;
1344
+ readonly replyTo?: readonly string[] | null | undefined;
1345
+ readonly subject?: string | null | undefined;
1346
+ readonly text?: string | null | undefined;
1347
+ readonly html?: string | null | undefined;
1348
+ readonly attachments?: readonly {
1349
+ readonly filename: string;
1350
+ readonly content?: string | null | undefined;
1351
+ readonly mediaId?: string | null | undefined;
1352
+ readonly contentType: string;
1353
+ readonly size: number;
1354
+ }[] | null | undefined;
1355
+ readonly inReplyToMessageId?: string | null | undefined;
1356
+ }) => import("effect/Effect").Effect<{
1357
+ readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
1358
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1359
+ readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1360
+ readonly state: "approvalPending" | "saved" | "sent";
1361
+ readonly to: readonly string[];
1362
+ readonly subject: string | null;
1363
+ readonly createdAt: string;
1364
+ readonly updatedAt: string;
1365
+ readonly cc: readonly string[];
1366
+ readonly bcc: readonly string[];
1367
+ readonly replyTo: readonly string[];
1368
+ readonly html: string | null;
1369
+ readonly text: string | null;
1370
+ readonly attachments: readonly {
1371
+ readonly filename: string;
1372
+ readonly content?: string | null;
1373
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
1374
+ readonly contentType: string;
1375
+ readonly size: number;
1376
+ }[];
1377
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1378
+ export declare const getDraft: (input: {
1379
+ readonly id: string;
1380
+ readonly draftId: string;
1381
+ }) => import("effect/Effect").Effect<{
1382
+ readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
1383
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1384
+ readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1385
+ readonly state: "approvalPending" | "saved" | "sent";
1386
+ readonly to: readonly string[];
1387
+ readonly subject: string | null;
1388
+ readonly createdAt: string;
1389
+ readonly updatedAt: string;
1390
+ readonly cc: readonly string[];
1391
+ readonly bcc: readonly string[];
1392
+ readonly replyTo: readonly string[];
1393
+ readonly html: string | null;
1394
+ readonly text: string | null;
1395
+ readonly attachments: readonly {
1396
+ readonly filename: string;
1397
+ readonly content?: string | null;
1398
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
1399
+ readonly contentType: string;
1400
+ readonly size: number;
1401
+ }[];
1402
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1403
+ export declare const updateDraft: (input: {
1404
+ readonly id: string;
1405
+ readonly draftId: string;
1406
+ readonly to?: readonly string[] | null | undefined;
1407
+ readonly cc?: readonly string[] | null | undefined;
1408
+ readonly bcc?: readonly string[] | null | undefined;
1409
+ readonly replyTo?: readonly string[] | null | undefined;
1410
+ readonly subject?: string | null | undefined;
1411
+ readonly text?: string | null | undefined;
1412
+ readonly html?: string | null | undefined;
1413
+ readonly attachments?: readonly {
1414
+ readonly filename: string;
1415
+ readonly content?: string | null | undefined;
1416
+ readonly mediaId?: string | null | undefined;
1417
+ readonly contentType: string;
1418
+ readonly size: number;
1419
+ }[] | null | undefined;
1420
+ }) => import("effect/Effect").Effect<{
1421
+ readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
1422
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1423
+ readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1424
+ readonly state: "approvalPending" | "saved" | "sent";
1425
+ readonly to: readonly string[];
1426
+ readonly subject: string | null;
1427
+ readonly createdAt: string;
1428
+ readonly updatedAt: string;
1429
+ readonly cc: readonly string[];
1430
+ readonly bcc: readonly string[];
1431
+ readonly replyTo: readonly string[];
1432
+ readonly html: string | null;
1433
+ readonly text: string | null;
1434
+ readonly attachments: readonly {
1435
+ readonly filename: string;
1436
+ readonly content?: string | null;
1437
+ readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
1438
+ readonly contentType: string;
1439
+ readonly size: number;
1440
+ }[];
1441
+ }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1442
+ export declare const deleteDraft: (input: {
1443
+ readonly id: string;
1444
+ readonly draftId: string;
1445
+ }) => import("effect/Effect").Effect<{
1446
+ readonly success: boolean;
1447
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1448
+ export declare const sendDraft: (input: {
1449
+ readonly id: string;
1450
+ readonly draftId: string;
1451
+ } & {
1452
+ readonly idempotencyKey?: string | undefined;
1453
+ }) => import("effect/Effect").Effect<{
1454
+ readonly actionId: string & import("effect/Brand").Brand<"MailboxActionId">;
1455
+ readonly messageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1456
+ readonly threadId: string & import("effect/Brand").Brand<"MailboxThreadId">;
1457
+ readonly status: "pending_approval" | "sent";
1458
+ readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
1459
+ readonly reviewExpectedAt: string | null;
1460
+ readonly skippedRecipients: readonly {
1461
+ readonly address: string;
1462
+ readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
1463
+ readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
1464
+ }[];
1465
+ readonly createdAt: string;
1466
+ }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").PaymentRequiredError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1467
+ export declare const listActions: ((input: {
1468
+ readonly id: string;
1469
+ readonly limit?: string | null | undefined;
1470
+ readonly cursor?: string | null | undefined;
1471
+ readonly state?: string | null | undefined;
1472
+ readonly after?: string | null | undefined;
1473
+ readonly before?: string | null | undefined;
1474
+ }) => import("effect/Effect").Effect<{
1475
+ readonly items: readonly {
1476
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1477
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "reply" | "sendMessage" | "updateDraft";
1478
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
1479
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1480
+ readonly proposedBy: {
1481
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1482
+ readonly id: string;
1483
+ readonly displayName?: string | null;
1484
+ };
1485
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1486
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1487
+ readonly decision: {
1488
+ readonly outcome: "allow" | "deny" | "requireApproval";
1489
+ readonly reason: string | null;
1490
+ readonly policyId: (string & import("effect/Brand").Brand<"MailboxPolicyId">) | null;
1491
+ readonly decidedAt: string;
1492
+ } | null;
1493
+ readonly createdAt: string;
1494
+ readonly updatedAt: string;
1495
+ }[];
1496
+ readonly nextCursor: string | null;
1497
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>) & {
1498
+ readonly pages: (input: {
1499
+ readonly id: string;
1500
+ readonly limit?: string | null | undefined;
1501
+ readonly cursor?: string | null | undefined;
1502
+ readonly state?: string | null | undefined;
1503
+ readonly after?: string | null | undefined;
1504
+ readonly before?: string | null | undefined;
1505
+ }) => import("effect/Stream").Stream<{
1506
+ readonly items: readonly {
1507
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1508
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "reply" | "sendMessage" | "updateDraft";
1509
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
1510
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1511
+ readonly proposedBy: {
1512
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1513
+ readonly id: string;
1514
+ readonly displayName?: string | null;
1515
+ };
1516
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1517
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1518
+ readonly decision: {
1519
+ readonly outcome: "allow" | "deny" | "requireApproval";
1520
+ readonly reason: string | null;
1521
+ readonly policyId: (string & import("effect/Brand").Brand<"MailboxPolicyId">) | null;
1522
+ readonly decidedAt: string;
1523
+ } | null;
1524
+ readonly createdAt: string;
1525
+ readonly updatedAt: string;
1526
+ }[];
1527
+ readonly nextCursor: string | null;
1528
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1529
+ readonly items: (input: {
1530
+ readonly id: string;
1531
+ readonly limit?: string | null | undefined;
1532
+ readonly cursor?: string | null | undefined;
1533
+ readonly state?: string | null | undefined;
1534
+ readonly after?: string | null | undefined;
1535
+ readonly before?: string | null | undefined;
1536
+ }) => import("effect/Stream").Stream<{
1537
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1538
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "reply" | "sendMessage" | "updateDraft";
1539
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
1540
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1541
+ readonly proposedBy: {
1542
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1543
+ readonly id: string;
1544
+ readonly displayName?: string | null;
1545
+ };
1546
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1547
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1548
+ readonly decision: {
1549
+ readonly outcome: "allow" | "deny" | "requireApproval";
1550
+ readonly reason: string | null;
1551
+ readonly policyId: (string & import("effect/Brand").Brand<"MailboxPolicyId">) | null;
1552
+ readonly decidedAt: string;
1553
+ } | null;
1554
+ readonly createdAt: string;
1555
+ readonly updatedAt: string;
1556
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1557
+ };
1558
+ export declare const approveAction: (input: {
1559
+ readonly id: string;
1560
+ readonly actionId: string;
1561
+ }) => import("effect/Effect").Effect<{
1562
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1563
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "reply" | "sendMessage" | "updateDraft";
1564
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
1565
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1566
+ readonly proposedBy: {
1567
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1568
+ readonly id: string;
1569
+ readonly displayName?: string | null;
1570
+ };
1571
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1572
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1573
+ readonly decision: {
1574
+ readonly outcome: "allow" | "deny" | "requireApproval";
1575
+ readonly reason: string | null;
1576
+ readonly policyId: (string & import("effect/Brand").Brand<"MailboxPolicyId">) | null;
1577
+ readonly decidedAt: string;
1578
+ } | null;
1579
+ readonly createdAt: string;
1580
+ readonly updatedAt: string;
1581
+ }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").PaymentRequiredError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1582
+ export declare const denyAction: (input: {
1583
+ readonly id: string;
1584
+ readonly actionId: string;
1585
+ readonly reason: string;
1586
+ }) => import("effect/Effect").Effect<{
1587
+ readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
1588
+ readonly type: "assignThread" | "call" | "changeThreadState" | "createNote" | "extensionRequest" | "reply" | "sendMessage" | "updateDraft";
1589
+ readonly state: "allowed" | "approvalDenied" | "approvalRequired" | "approved" | "executed" | "executing" | "failed" | "policyDenied" | "proposed";
1590
+ readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
1591
+ readonly proposedBy: {
1592
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1593
+ readonly id: string;
1594
+ readonly displayName?: string | null;
1595
+ };
1596
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1597
+ readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
1598
+ readonly decision: {
1599
+ readonly outcome: "allow" | "deny" | "requireApproval";
1600
+ readonly reason: string | null;
1601
+ readonly policyId: (string & import("effect/Brand").Brand<"MailboxPolicyId">) | null;
1602
+ readonly decidedAt: string;
1603
+ } | null;
1604
+ readonly createdAt: string;
1605
+ readonly updatedAt: string;
1606
+ }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1607
+ export declare const listEvents: ((input: {
1608
+ readonly id: string;
1609
+ readonly limit?: string | null | undefined;
1610
+ readonly cursor?: string | null | undefined;
1611
+ readonly after?: string | null | undefined;
1612
+ readonly before?: string | null | undefined;
1613
+ }) => import("effect/Effect").Effect<{
1614
+ readonly items: readonly {
1615
+ readonly id: string & import("effect/Brand").Brand<"MailboxEventId">;
1616
+ readonly type: "action.approval_requested" | "action.approval_resolved" | "action.executed" | "action.failed" | "action.policy_decided" | "action.proposed" | "address.attached" | "draft.created" | "draft.updated" | "email.received" | "email.released" | "email.sent" | "mailbox.created" | "thread.created" | "thread.updated";
1617
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1618
+ readonly actionId: (string & import("effect/Brand").Brand<"MailboxActionId">) | null;
1619
+ readonly actor: {
1620
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1621
+ readonly id: string;
1622
+ readonly displayName?: string | null;
1623
+ };
1624
+ readonly payload: {
1625
+ readonly [x: string]: import("./generated").JsonValue;
1626
+ };
1627
+ readonly occurredAt: string;
1628
+ }[];
1629
+ readonly nextCursor: string | null;
1630
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>) & {
1631
+ readonly pages: (input: {
1632
+ readonly id: string;
1633
+ readonly limit?: string | null | undefined;
1634
+ readonly cursor?: string | null | undefined;
1635
+ readonly after?: string | null | undefined;
1636
+ readonly before?: string | null | undefined;
1637
+ }) => import("effect/Stream").Stream<{
1638
+ readonly items: readonly {
1639
+ readonly id: string & import("effect/Brand").Brand<"MailboxEventId">;
1640
+ readonly type: "action.approval_requested" | "action.approval_resolved" | "action.executed" | "action.failed" | "action.policy_decided" | "action.proposed" | "address.attached" | "draft.created" | "draft.updated" | "email.received" | "email.released" | "email.sent" | "mailbox.created" | "thread.created" | "thread.updated";
1641
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1642
+ readonly actionId: (string & import("effect/Brand").Brand<"MailboxActionId">) | null;
1643
+ readonly actor: {
1644
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1645
+ readonly id: string;
1646
+ readonly displayName?: string | null;
1647
+ };
1648
+ readonly payload: {
1649
+ readonly [x: string]: import("./generated").JsonValue;
1650
+ };
1651
+ readonly occurredAt: string;
1652
+ }[];
1653
+ readonly nextCursor: string | null;
1654
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1655
+ readonly items: (input: {
1656
+ readonly id: string;
1657
+ readonly limit?: string | null | undefined;
1658
+ readonly cursor?: string | null | undefined;
1659
+ readonly after?: string | null | undefined;
1660
+ readonly before?: string | null | undefined;
1661
+ }) => import("effect/Stream").Stream<{
1662
+ readonly id: string & import("effect/Brand").Brand<"MailboxEventId">;
1663
+ readonly type: "action.approval_requested" | "action.approval_resolved" | "action.executed" | "action.failed" | "action.policy_decided" | "action.proposed" | "address.attached" | "draft.created" | "draft.updated" | "email.received" | "email.released" | "email.sent" | "mailbox.created" | "thread.created" | "thread.updated";
1664
+ readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
1665
+ readonly actionId: (string & import("effect/Brand").Brand<"MailboxActionId">) | null;
1666
+ readonly actor: {
1667
+ readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
1668
+ readonly id: string;
1669
+ readonly displayName?: string | null;
1670
+ };
1671
+ readonly payload: {
1672
+ readonly [x: string]: import("./generated").JsonValue;
1673
+ };
1674
+ readonly occurredAt: string;
1675
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1676
+ };