carlyemail 0.2.0 → 0.3.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 (5) hide show
  1. package/README.md +49 -5
  2. package/carlyemail.js +107 -11
  3. package/package.json +9 -3
  4. package/sdk.d.ts +777 -0
  5. package/sdk.js +791 -0
package/sdk.d.ts ADDED
@@ -0,0 +1,777 @@
1
+ // Generated by scripts/build_sdk.py from the OpenAPI spec. Do not edit.
2
+
3
+ export interface AgentSignupRequest {
4
+ human_email: string;
5
+ username: string;
6
+ source?: string | null;
7
+ referrer?: string | null;
8
+ }
9
+
10
+ export interface AgentSignupResponse {
11
+ organization_id: string;
12
+ inbox_id: string;
13
+ api_key: string;
14
+ }
15
+
16
+ export interface AgentVerifyRequest {
17
+ otp_code: string;
18
+ }
19
+
20
+ export interface AgentVerifyResponse {
21
+ organization_id: string;
22
+ verified: boolean;
23
+ }
24
+
25
+ export interface ApiKeyOut {
26
+ api_key_id: string;
27
+ prefix: string;
28
+ name?: string | null;
29
+ pod_id?: string | null;
30
+ inbox_id?: string | null;
31
+ used_at?: string | null;
32
+ permissions?: Record<string, boolean> | null;
33
+ created_at: string;
34
+ }
35
+
36
+ export interface AttachmentOut {
37
+ attachment_id: string;
38
+ filename?: string | null;
39
+ size?: number;
40
+ content_type?: string | null;
41
+ content_disposition?: string | null;
42
+ content_id?: string | null;
43
+ }
44
+
45
+ export interface AttachmentResponse {
46
+ attachment_id: string;
47
+ filename?: string | null;
48
+ size?: number;
49
+ content_type?: string | null;
50
+ content_disposition?: string | null;
51
+ content_id?: string | null;
52
+ download_url: string;
53
+ expires_at: string;
54
+ }
55
+
56
+ export interface BatchGetMessagesRequest {
57
+ message_ids: Array<string>;
58
+ }
59
+
60
+ export interface BatchGetMessagesResponse {
61
+ limit?: number | null;
62
+ count: number;
63
+ messages: Array<MessageOut>;
64
+ }
65
+
66
+ export interface BatchUpdateMessagesRequest {
67
+ message_ids: Array<string>;
68
+ add_labels?: Array<string> | null;
69
+ remove_labels?: Array<string> | null;
70
+ }
71
+
72
+ export interface BatchUpdateMessagesResponse {
73
+ limit?: number | null;
74
+ count: number;
75
+ updates: Array<UpdateMessageResponse>;
76
+ }
77
+
78
+ export interface CreateApiKeyRequest {
79
+ name?: string | null;
80
+ permissions?: Record<string, boolean> | null;
81
+ }
82
+
83
+ export interface CreateApiKeyResponse {
84
+ api_key_id: string;
85
+ api_key: string;
86
+ prefix: string;
87
+ name?: string | null;
88
+ pod_id?: string | null;
89
+ inbox_id?: string | null;
90
+ permissions?: Record<string, boolean> | null;
91
+ created_at: string;
92
+ }
93
+
94
+ export interface CreateDomainRequest {
95
+ domain: string;
96
+ feedback_enabled?: boolean;
97
+ subdomains_enabled?: boolean;
98
+ client_id?: string | null;
99
+ }
100
+
101
+ export interface CreateDraftRequest {
102
+ to?: Array<string> | string | null;
103
+ cc?: Array<string> | string | null;
104
+ bcc?: Array<string> | string | null;
105
+ reply_to?: Array<string> | string | null;
106
+ subject?: string | null;
107
+ text?: string | null;
108
+ html?: string | null;
109
+ labels?: Array<string> | null;
110
+ attachments?: Array<SendAttachment> | null;
111
+ in_reply_to?: string | null;
112
+ forward_of?: string | null;
113
+ reply_all?: boolean;
114
+ send_at?: string | null;
115
+ client_id?: string | null;
116
+ }
117
+
118
+ export interface CreateInboxRequest {
119
+ username?: string | null;
120
+ domain?: string | null;
121
+ display_name?: string | null;
122
+ client_id?: string | null;
123
+ metadata?: Record<string, unknown> | null;
124
+ }
125
+
126
+ export interface CreateInboxWebhookRequest {
127
+ url: string;
128
+ event_types?: Array<string> | null;
129
+ client_id?: string | null;
130
+ }
131
+
132
+ export interface CreateListEntryRequest {
133
+ entry: string;
134
+ reason?: string | null;
135
+ }
136
+
137
+ export interface CreatePodRequest {
138
+ name?: string | null;
139
+ client_id?: string | null;
140
+ }
141
+
142
+ export interface CreateWebhookRequest {
143
+ url: string;
144
+ event_types?: Array<string> | null;
145
+ client_id?: string | null;
146
+ inbox_ids?: Array<string> | null;
147
+ pod_ids?: Array<string> | null;
148
+ }
149
+
150
+ export interface DomainOut {
151
+ pod_id: string;
152
+ domain_id: string;
153
+ domain: string;
154
+ status: "NOT_STARTED" | "PENDING" | "INVALID" | "FAILED" | "VERIFYING" | "VERIFIED";
155
+ feedback_enabled?: boolean;
156
+ subdomains_enabled?: boolean;
157
+ records?: Array<VerificationRecord>;
158
+ client_id?: string | null;
159
+ updated_at: string;
160
+ created_at: string;
161
+ }
162
+
163
+ export interface DraftOut {
164
+ inbox_id: string;
165
+ draft_id: string;
166
+ client_id?: string | null;
167
+ labels?: Array<string>;
168
+ reply_to?: Array<string>;
169
+ to?: Array<string>;
170
+ cc?: Array<string>;
171
+ bcc?: Array<string>;
172
+ subject?: string | null;
173
+ preview?: string | null;
174
+ text?: string | null;
175
+ html?: string | null;
176
+ attachments?: Array<AttachmentOut>;
177
+ in_reply_to?: string | null;
178
+ forward_of?: string | null;
179
+ references?: Array<string>;
180
+ send_status?: string | null;
181
+ send_at?: string | null;
182
+ updated_at: string;
183
+ created_at: string;
184
+ }
185
+
186
+ export interface ForwardMessageRequest {
187
+ to?: Array<string> | string | null;
188
+ cc?: Array<string> | string | null;
189
+ bcc?: Array<string> | string | null;
190
+ reply_to?: Array<string> | string | null;
191
+ subject?: string | null;
192
+ text?: string | null;
193
+ html?: string | null;
194
+ labels?: Array<string> | null;
195
+ attachments?: Array<SendAttachment> | null;
196
+ headers?: Record<string, string> | null;
197
+ }
198
+
199
+ export interface HTTPValidationError {
200
+ detail?: Array<ValidationError>;
201
+ }
202
+
203
+ export interface Identity {
204
+ scope_type: string;
205
+ scope_id?: string | null;
206
+ organization_id: string;
207
+ pod_id?: string | null;
208
+ inbox_id?: string | null;
209
+ api_key_id?: string | null;
210
+ }
211
+
212
+ export interface InboxEventOut {
213
+ organization_id: string;
214
+ pod_id?: string | null;
215
+ inbox_id: string;
216
+ event_id: string;
217
+ event_type: "label.added" | "label.removed";
218
+ message_id?: string | null;
219
+ label?: string | null;
220
+ event_at: string;
221
+ created_at: string;
222
+ }
223
+
224
+ export interface InboxOut {
225
+ pod_id: string;
226
+ inbox_id: string;
227
+ email: string;
228
+ display_name?: string | null;
229
+ client_id?: string | null;
230
+ metadata?: Record<string, unknown>;
231
+ updated_at: string;
232
+ created_at: string;
233
+ }
234
+
235
+ export interface ListApiKeysResponse {
236
+ count: number;
237
+ next_page_token?: string | null;
238
+ api_keys: Array<ApiKeyOut>;
239
+ }
240
+
241
+ export interface ListDomainsResponse {
242
+ count: number;
243
+ limit?: number | null;
244
+ next_page_token?: string | null;
245
+ domains: Array<DomainOut>;
246
+ }
247
+
248
+ export interface ListDraftsResponse {
249
+ count: number;
250
+ limit?: number | null;
251
+ next_page_token?: string | null;
252
+ drafts: Array<DraftOut>;
253
+ }
254
+
255
+ export interface ListEntryOut {
256
+ entry: string;
257
+ organization_id: string;
258
+ reason?: string | null;
259
+ direction: "send" | "receive" | "reply";
260
+ list_type: "allow" | "block";
261
+ entry_type: "email" | "domain";
262
+ read_only?: boolean;
263
+ pod_id?: string | null;
264
+ inbox_id?: string | null;
265
+ created_at: string;
266
+ }
267
+
268
+ export interface ListInboxEventsResponse {
269
+ count: number;
270
+ limit?: number | null;
271
+ next_page_token?: string | null;
272
+ events: Array<InboxEventOut>;
273
+ }
274
+
275
+ export interface ListInboxesResponse {
276
+ count: number;
277
+ limit?: number | null;
278
+ next_page_token?: string | null;
279
+ inboxes: Array<InboxOut>;
280
+ }
281
+
282
+ export interface ListListEntriesResponse {
283
+ count: number;
284
+ limit?: number | null;
285
+ next_page_token?: string | null;
286
+ entries: Array<ListEntryOut>;
287
+ }
288
+
289
+ export interface ListMessagesResponse {
290
+ count: number;
291
+ limit?: number | null;
292
+ next_page_token?: string | null;
293
+ messages: Array<MessageItem>;
294
+ }
295
+
296
+ export interface ListPodsResponse {
297
+ count: number;
298
+ limit?: number | null;
299
+ next_page_token?: string | null;
300
+ pods: Array<PodOut>;
301
+ }
302
+
303
+ export interface ListThreadsResponse {
304
+ count: number;
305
+ limit?: number | null;
306
+ next_page_token?: string | null;
307
+ threads: Array<ThreadItem>;
308
+ }
309
+
310
+ export interface ListWebhooksResponse {
311
+ count: number;
312
+ limit?: number | null;
313
+ next_page_token?: string | null;
314
+ webhooks: Array<WebhookOut>;
315
+ }
316
+
317
+ export interface MessageItem {
318
+ inbox_id: string;
319
+ thread_id: string;
320
+ message_id: string;
321
+ labels?: Array<string>;
322
+ timestamp: string;
323
+ from: string;
324
+ to?: Array<string>;
325
+ cc?: Array<string>;
326
+ bcc?: Array<string>;
327
+ reply_to?: Array<string>;
328
+ subject?: string | null;
329
+ preview?: string | null;
330
+ attachments?: Array<AttachmentOut>;
331
+ size?: number;
332
+ updated_at: string;
333
+ created_at: string;
334
+ }
335
+
336
+ export interface MessageOut {
337
+ inbox_id: string;
338
+ thread_id: string;
339
+ message_id: string;
340
+ labels?: Array<string>;
341
+ timestamp: string;
342
+ from: string;
343
+ to?: Array<string>;
344
+ cc?: Array<string>;
345
+ bcc?: Array<string>;
346
+ reply_to?: Array<string>;
347
+ subject?: string | null;
348
+ preview?: string | null;
349
+ attachments?: Array<AttachmentOut>;
350
+ size?: number;
351
+ updated_at: string;
352
+ created_at: string;
353
+ text?: string | null;
354
+ html?: string | null;
355
+ extracted_text?: string | null;
356
+ extracted_html?: string | null;
357
+ in_reply_to?: string | null;
358
+ references?: Array<string>;
359
+ headers?: Record<string, unknown>;
360
+ }
361
+
362
+ export interface OrganizationOut {
363
+ organization_id: string;
364
+ inbox_count: number;
365
+ domain_count: number;
366
+ pod_count?: number;
367
+ webhook_count?: number;
368
+ storage_bytes?: number;
369
+ inbox_limit?: number | null;
370
+ domain_limit?: number | null;
371
+ pod_limit?: number | null;
372
+ webhook_limit?: number | null;
373
+ storage_limit_bytes?: number | null;
374
+ plan?: string | null;
375
+ billing_id?: string | null;
376
+ billing_type?: string | null;
377
+ billing_subscription_id?: string | null;
378
+ authentication_id?: string | null;
379
+ authentication_type?: string | null;
380
+ updated_at: string;
381
+ created_at: string;
382
+ }
383
+
384
+ export interface PodOut {
385
+ pod_id: string;
386
+ name?: string | null;
387
+ client_id?: string | null;
388
+ updated_at: string;
389
+ created_at: string;
390
+ }
391
+
392
+ export interface RawMessageResponse {
393
+ message_id: string;
394
+ size: number;
395
+ download_url: string;
396
+ expires_at: string;
397
+ }
398
+
399
+ export interface ReplyAllMessageRequest {
400
+ reply_to?: Array<string> | string | null;
401
+ text?: string | null;
402
+ html?: string | null;
403
+ labels?: Array<string> | null;
404
+ attachments?: Array<SendAttachment> | null;
405
+ headers?: Record<string, string> | null;
406
+ }
407
+
408
+ export interface ReplyMessageRequest {
409
+ to?: Array<string> | string | null;
410
+ cc?: Array<string> | string | null;
411
+ bcc?: Array<string> | string | null;
412
+ reply_to?: Array<string> | string | null;
413
+ reply_all?: boolean;
414
+ text?: string | null;
415
+ html?: string | null;
416
+ labels?: Array<string> | null;
417
+ attachments?: Array<SendAttachment> | null;
418
+ headers?: Record<string, string> | null;
419
+ }
420
+
421
+ export interface SendAttachment {
422
+ filename: string;
423
+ content_type?: string | null;
424
+ content: string;
425
+ content_id?: string | null;
426
+ inline?: boolean;
427
+ }
428
+
429
+ export interface SendDraftRequest {
430
+ add_labels?: Array<string> | null;
431
+ remove_labels?: Array<string> | null;
432
+ }
433
+
434
+ export interface SendMessageRequest {
435
+ to?: Array<string> | string | null;
436
+ cc?: Array<string> | string | null;
437
+ bcc?: Array<string> | string | null;
438
+ reply_to?: Array<string> | string | null;
439
+ subject?: string | null;
440
+ text?: string | null;
441
+ html?: string | null;
442
+ labels?: Array<string> | null;
443
+ attachments?: Array<SendAttachment> | null;
444
+ headers?: Record<string, string> | null;
445
+ }
446
+
447
+ export interface SendMessageResponse {
448
+ message_id: string;
449
+ thread_id: string;
450
+ }
451
+
452
+ export interface ThreadItem {
453
+ inbox_id: string;
454
+ thread_id: string;
455
+ labels?: Array<string>;
456
+ timestamp: string;
457
+ received_timestamp?: string | null;
458
+ sent_timestamp?: string | null;
459
+ senders?: Array<string>;
460
+ recipients?: Array<string>;
461
+ subject?: string | null;
462
+ preview?: string | null;
463
+ attachments?: Array<AttachmentOut>;
464
+ last_message_id?: string | null;
465
+ message_count?: number;
466
+ size?: number;
467
+ updated_at: string;
468
+ created_at: string;
469
+ }
470
+
471
+ export interface ThreadOut {
472
+ inbox_id: string;
473
+ thread_id: string;
474
+ labels?: Array<string>;
475
+ timestamp: string;
476
+ received_timestamp?: string | null;
477
+ sent_timestamp?: string | null;
478
+ senders?: Array<string>;
479
+ recipients?: Array<string>;
480
+ subject?: string | null;
481
+ preview?: string | null;
482
+ attachments?: Array<AttachmentOut>;
483
+ last_message_id?: string | null;
484
+ message_count?: number;
485
+ size?: number;
486
+ updated_at: string;
487
+ created_at: string;
488
+ messages?: Array<MessageOut>;
489
+ }
490
+
491
+ export interface UpdateDomainRequest {
492
+ feedback_enabled?: boolean | null;
493
+ subdomains_enabled?: boolean | null;
494
+ }
495
+
496
+ export interface UpdateDraftRequest {
497
+ to?: Array<string> | string | null;
498
+ cc?: Array<string> | string | null;
499
+ bcc?: Array<string> | string | null;
500
+ reply_to?: Array<string> | string | null;
501
+ subject?: string | null;
502
+ text?: string | null;
503
+ html?: string | null;
504
+ add_attachments?: Array<SendAttachment> | null;
505
+ remove_attachments?: Array<string> | null;
506
+ add_labels?: Array<string> | null;
507
+ remove_labels?: Array<string> | null;
508
+ send_at?: string | null;
509
+ }
510
+
511
+ export interface UpdateInboxRequest {
512
+ display_name?: string | null;
513
+ metadata?: Record<string, unknown> | null;
514
+ }
515
+
516
+ export interface UpdateInboxWebhookRequest {
517
+ event_types?: Array<string> | null;
518
+ }
519
+
520
+ export interface UpdateMessageRequest {
521
+ add_labels?: Array<string> | null;
522
+ remove_labels?: Array<string> | null;
523
+ }
524
+
525
+ export interface UpdateMessageResponse {
526
+ message_id: string;
527
+ labels: Array<string>;
528
+ }
529
+
530
+ export interface UpdateThreadRequest {
531
+ add_labels?: Array<string> | null;
532
+ remove_labels?: Array<string> | null;
533
+ }
534
+
535
+ export interface UpdateThreadResponse {
536
+ thread_id: string;
537
+ labels: Array<string>;
538
+ }
539
+
540
+ export interface UpdateWebhookRequest {
541
+ event_types?: Array<string> | null;
542
+ add_inbox_ids?: Array<string> | null;
543
+ remove_inbox_ids?: Array<string> | null;
544
+ add_pod_ids?: Array<string> | null;
545
+ remove_pod_ids?: Array<string> | null;
546
+ }
547
+
548
+ export interface ValidationError {
549
+ loc: Array<string | number>;
550
+ msg: string;
551
+ type: string;
552
+ input?: unknown;
553
+ ctx?: Record<string, unknown>;
554
+ }
555
+
556
+ export interface VerificationRecord {
557
+ type: "TXT" | "CNAME" | "MX";
558
+ name: string;
559
+ value: string;
560
+ status: "MISSING" | "INVALID" | "VALID";
561
+ priority?: number | null;
562
+ }
563
+
564
+ export interface WebhookOut {
565
+ webhook_id: string;
566
+ url: string;
567
+ event_types?: Array<string>;
568
+ pod_ids?: Array<string>;
569
+ inbox_ids?: Array<string>;
570
+ secret?: string | null;
571
+ enabled?: boolean;
572
+ client_id?: string | null;
573
+ updated_at: string;
574
+ created_at: string;
575
+ }
576
+
577
+ export declare class CarlyEmailError extends Error {
578
+ status: number;
579
+ code?: string;
580
+ fix?: string;
581
+ docs?: string;
582
+ body?: unknown;
583
+ }
584
+
585
+ export interface ClientOptions {
586
+ apiKey?: string;
587
+ baseUrl?: string;
588
+ fetch?: typeof fetch;
589
+ }
590
+
591
+ export declare class Agent {
592
+ signUp(body: AgentSignupRequest): Promise<AgentSignupResponse>;
593
+ verify(body: AgentVerifyRequest): Promise<AgentVerifyResponse>;
594
+ }
595
+
596
+ export declare class Auth {
597
+ whoami(): Promise<Identity>;
598
+ }
599
+
600
+ export declare class Billing {
601
+ createCheckout(body: Record<string, unknown>): Promise<Record<string, unknown>>;
602
+ createPortal(): Promise<Record<string, unknown>>;
603
+ current(): Promise<Record<string, unknown>>;
604
+ }
605
+
606
+ export declare class Inboxes {
607
+ list(query?: { limit?: number | null; pageToken?: string | null; ascending?: boolean }): Promise<ListInboxesResponse>;
608
+ create(body: CreateInboxRequest): Promise<InboxOut>;
609
+ get(inboxId: string): Promise<InboxOut>;
610
+ update(inboxId: string, body: UpdateInboxRequest): Promise<InboxOut>;
611
+ delete(inboxId: string): Promise<void>;
612
+ }
613
+
614
+ export declare class Messages {
615
+ list(inboxId: string, query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean; includeSpam?: boolean; includeBlocked?: boolean; includeUnauthenticated?: boolean; includeTrash?: boolean; from?: string | null; to?: string | null; subject?: string | null }): Promise<ListMessagesResponse>;
616
+ search(inboxId: string, query?: { q?: string; limit?: number | null; pageToken?: string | null; before?: string | null; after?: string | null }): Promise<ListMessagesResponse>;
617
+ send(inboxId: string, body: SendMessageRequest): Promise<SendMessageResponse>;
618
+ reply(inboxId: string, messageId: string, body: ReplyMessageRequest): Promise<SendMessageResponse>;
619
+ batchGet(inboxId: string, body: BatchGetMessagesRequest): Promise<BatchGetMessagesResponse>;
620
+ batchUpdate(inboxId: string, body: BatchUpdateMessagesRequest): Promise<BatchUpdateMessagesResponse>;
621
+ replyAll(inboxId: string, messageId: string, body: ReplyAllMessageRequest): Promise<SendMessageResponse>;
622
+ forward(inboxId: string, messageId: string, body: ForwardMessageRequest): Promise<SendMessageResponse>;
623
+ get(inboxId: string, messageId: string): Promise<MessageOut>;
624
+ update(inboxId: string, messageId: string, body: UpdateMessageRequest): Promise<UpdateMessageResponse>;
625
+ delete(inboxId: string, messageId: string): Promise<void>;
626
+ getRaw(inboxId: string, messageId: string): Promise<RawMessageResponse>;
627
+ getAttachment(inboxId: string, messageId: string, attachmentId: string): Promise<AttachmentResponse>;
628
+ }
629
+
630
+ export declare class Threads {
631
+ list(inboxId: string, query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean; senders?: Array<string> | null; recipients?: Array<string> | null; subject?: string | null }): Promise<ListThreadsResponse>;
632
+ search(inboxId: string, query?: { q?: string; limit?: number | null; pageToken?: string | null; before?: string | null; after?: string | null }): Promise<ListThreadsResponse>;
633
+ getAttachment(inboxId: string, threadId: string, attachmentId: string): Promise<AttachmentResponse>;
634
+ get(inboxId: string, threadId: string): Promise<ThreadOut>;
635
+ update(inboxId: string, threadId: string, body: UpdateThreadRequest): Promise<UpdateThreadResponse>;
636
+ delete(inboxId: string, threadId: string): Promise<void>;
637
+ listOrg(query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean; includeSpam?: boolean; includeBlocked?: boolean; includeUnauthenticated?: boolean; includeTrash?: boolean; senders?: Array<string> | null; recipients?: Array<string> | null; subject?: string | null }): Promise<ListThreadsResponse>;
638
+ searchOrg(query?: { q?: string; limit?: number | null; pageToken?: string | null; before?: string | null; after?: string | null }): Promise<ListThreadsResponse>;
639
+ getOrg(threadId: string): Promise<ThreadOut>;
640
+ updateOrg(threadId: string, body: UpdateThreadRequest): Promise<UpdateThreadResponse>;
641
+ deleteOrg(threadId: string): Promise<void>;
642
+ getOrgAttachment(threadId: string, attachmentId: string): Promise<AttachmentResponse>;
643
+ }
644
+
645
+ export declare class Drafts {
646
+ list(inboxId: string, query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean }): Promise<ListDraftsResponse>;
647
+ create(inboxId: string, body: CreateDraftRequest): Promise<DraftOut>;
648
+ get(inboxId: string, draftId: string): Promise<DraftOut>;
649
+ update(inboxId: string, draftId: string, body: UpdateDraftRequest): Promise<DraftOut>;
650
+ delete(inboxId: string, draftId: string): Promise<void>;
651
+ send(inboxId: string, draftId: string, body: SendDraftRequest): Promise<SendMessageResponse>;
652
+ getAttachment(inboxId: string, draftId: string, attachmentId: string): Promise<AttachmentResponse>;
653
+ listOrg(query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean }): Promise<ListDraftsResponse>;
654
+ getOrg(draftId: string): Promise<DraftOut>;
655
+ getOrgAttachment(draftId: string, attachmentId: string): Promise<AttachmentResponse>;
656
+ }
657
+
658
+ export declare class Lists {
659
+ listInboxEntries(inboxId: string, direction: string, type: string, query?: { limit?: number | null; pageToken?: string | null }): Promise<ListListEntriesResponse>;
660
+ createInboxEntry(inboxId: string, direction: string, type: string, body: CreateListEntryRequest): Promise<ListEntryOut>;
661
+ getInboxEntry(inboxId: string, entry: string, direction: string, type: string): Promise<ListEntryOut>;
662
+ deleteInboxEntry(inboxId: string, entry: string, direction: string, type: string): Promise<void>;
663
+ listOrgEntries(direction: string, type: string, query?: { limit?: number | null; pageToken?: string | null }): Promise<ListListEntriesResponse>;
664
+ createOrgEntry(direction: string, type: string, body: CreateListEntryRequest): Promise<ListEntryOut>;
665
+ getOrgEntry(entry: string, direction: string, type: string): Promise<ListEntryOut>;
666
+ deleteOrgEntry(entry: string, direction: string, type: string): Promise<void>;
667
+ }
668
+
669
+ export declare class Domains {
670
+ list(query?: { limit?: number | null; pageToken?: string | null; ascending?: boolean }): Promise<ListDomainsResponse>;
671
+ create(body: CreateDomainRequest): Promise<DomainOut>;
672
+ get(domainId: string): Promise<DomainOut>;
673
+ update(domainId: string, body: UpdateDomainRequest): Promise<DomainOut>;
674
+ delete(domainId: string): Promise<void>;
675
+ verify(domainId: string): Promise<DomainOut>;
676
+ getZoneFile(domainId: string): Promise<void>;
677
+ }
678
+
679
+ export declare class ApiKeys {
680
+ list(query?: { limit?: number | null; pageToken?: string | null }): Promise<ListApiKeysResponse>;
681
+ create(body: CreateApiKeyRequest): Promise<CreateApiKeyResponse>;
682
+ delete(apiKeyId: string): Promise<void>;
683
+ listInbox(inboxId: string, query?: { limit?: number | null; pageToken?: string | null }): Promise<ListApiKeysResponse>;
684
+ createInbox(inboxId: string, body: CreateApiKeyRequest): Promise<CreateApiKeyResponse>;
685
+ deleteInbox(inboxId: string, apiKeyId: string): Promise<void>;
686
+ }
687
+
688
+ export declare class Metrics {
689
+ orgEvents(query?: { eventTypes?: Array<string> | null; start?: string | null; end?: string | null; period?: number | null; limit?: number | null; descending?: boolean }): Promise<Record<string, unknown>>;
690
+ orgUsage(query?: { usageTypes?: Array<string> | null; start?: string | null; end?: string | null; period?: number | null; limit?: number | null; descending?: boolean }): Promise<Record<string, unknown>>;
691
+ inboxEvents(inboxId: string, query?: { eventTypes?: Array<string> | null; start?: string | null; end?: string | null; period?: number | null; limit?: number | null; descending?: boolean }): Promise<Record<string, unknown>>;
692
+ inboxUsage(inboxId: string, query?: { usageTypes?: Array<string> | null; start?: string | null; end?: string | null; period?: number | null; limit?: number | null; descending?: boolean }): Promise<Record<string, unknown>>;
693
+ }
694
+
695
+ export declare class Pods {
696
+ list(query?: { limit?: number | null; pageToken?: string | null; ascending?: boolean }): Promise<ListPodsResponse>;
697
+ create(body: CreatePodRequest): Promise<PodOut>;
698
+ get(podId: string): Promise<PodOut>;
699
+ delete(podId: string): Promise<void>;
700
+ listInboxes(podId: string, query?: { limit?: number | null; pageToken?: string | null; ascending?: boolean }): Promise<ListInboxesResponse>;
701
+ createInbox(podId: string, body: CreateInboxRequest): Promise<InboxOut>;
702
+ getInbox(inboxId: string, podId: string): Promise<InboxOut>;
703
+ updateInbox(inboxId: string, podId: string, body: UpdateInboxRequest): Promise<InboxOut>;
704
+ deleteInbox(inboxId: string, podId: string): Promise<void>;
705
+ listThreads(podId: string, query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean; includeSpam?: boolean; includeBlocked?: boolean; includeUnauthenticated?: boolean; includeTrash?: boolean; senders?: Array<string> | null; recipients?: Array<string> | null; subject?: string | null }): Promise<ListThreadsResponse>;
706
+ searchThreads(podId: string, query?: { q?: string; limit?: number | null; pageToken?: string | null; before?: string | null; after?: string | null }): Promise<ListThreadsResponse>;
707
+ getThread(threadId: string, podId: string): Promise<ThreadOut>;
708
+ updateThread(threadId: string, podId: string, body: UpdateThreadRequest): Promise<UpdateThreadResponse>;
709
+ deleteThread(threadId: string, podId: string): Promise<void>;
710
+ getThreadAttachment(threadId: string, attachmentId: string, podId: string): Promise<AttachmentResponse>;
711
+ listDrafts(podId: string, query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean }): Promise<ListDraftsResponse>;
712
+ getDraft(draftId: string, podId: string): Promise<DraftOut>;
713
+ getDraftAttachment(draftId: string, attachmentId: string, podId: string): Promise<AttachmentResponse>;
714
+ listEntries(direction: string, type: string, podId: string, query?: { limit?: number | null; pageToken?: string | null }): Promise<ListListEntriesResponse>;
715
+ createEntry(direction: string, type: string, podId: string, body: CreateListEntryRequest): Promise<ListEntryOut>;
716
+ getEntry(entry: string, direction: string, type: string, podId: string): Promise<ListEntryOut>;
717
+ deleteEntry(entry: string, direction: string, type: string, podId: string): Promise<void>;
718
+ listDomains(podId: string, query?: { limit?: number | null; pageToken?: string | null; ascending?: boolean }): Promise<ListDomainsResponse>;
719
+ createDomain(podId: string, body: CreateDomainRequest): Promise<DomainOut>;
720
+ getDomain(domainId: string, podId: string): Promise<DomainOut>;
721
+ updateDomain(domainId: string, podId: string, body: UpdateDomainRequest): Promise<DomainOut>;
722
+ deleteDomain(domainId: string, podId: string): Promise<void>;
723
+ verifyDomain(domainId: string, podId: string): Promise<DomainOut>;
724
+ getZoneFile(domainId: string, podId: string): Promise<void>;
725
+ listWebhooks(podId: string, query?: { limit?: number | null; pageToken?: string | null; ascending?: boolean }): Promise<ListWebhooksResponse>;
726
+ createWebhook(podId: string, body: CreateWebhookRequest): Promise<WebhookOut>;
727
+ getWebhook(webhookId: string, podId: string): Promise<WebhookOut>;
728
+ updateWebhook(webhookId: string, podId: string, body: UpdateWebhookRequest): Promise<WebhookOut>;
729
+ deleteWebhook(webhookId: string, podId: string): Promise<void>;
730
+ listApiKeys(podId: string, query?: { limit?: number | null; pageToken?: string | null }): Promise<ListApiKeysResponse>;
731
+ createApiKey(podId: string, body: CreateApiKeyRequest): Promise<CreateApiKeyResponse>;
732
+ deleteApiKey(apiKeyId: string, podId: string): Promise<void>;
733
+ metricEvents(podId: string, query?: { eventTypes?: Array<string> | null; start?: string | null; end?: string | null; period?: number | null; limit?: number | null; descending?: boolean }): Promise<Record<string, unknown>>;
734
+ metricUsage(podId: string, query?: { usageTypes?: Array<string> | null; start?: string | null; end?: string | null; period?: number | null; limit?: number | null; descending?: boolean }): Promise<Record<string, unknown>>;
735
+ }
736
+
737
+ export declare class Organizations {
738
+ get(): Promise<OrganizationOut>;
739
+ }
740
+
741
+ export declare class InboxEvents {
742
+ list(inboxId: string, query?: { limit?: number | null; pageToken?: string | null; ascending?: boolean }): Promise<ListInboxEventsResponse>;
743
+ }
744
+
745
+ export declare class Webhooks {
746
+ list(query?: { limit?: number | null; pageToken?: string | null; ascending?: boolean }): Promise<ListWebhooksResponse>;
747
+ create(body: CreateWebhookRequest): Promise<WebhookOut>;
748
+ get(webhookId: string): Promise<WebhookOut>;
749
+ update(webhookId: string, body: UpdateWebhookRequest): Promise<WebhookOut>;
750
+ delete(webhookId: string): Promise<void>;
751
+ listInbox(inboxId: string, query?: { limit?: number | null; pageToken?: string | null; ascending?: boolean }): Promise<ListWebhooksResponse>;
752
+ createInbox(inboxId: string, body: CreateInboxWebhookRequest): Promise<WebhookOut>;
753
+ getInbox(inboxId: string, webhookId: string): Promise<WebhookOut>;
754
+ updateInbox(inboxId: string, webhookId: string, body: UpdateInboxWebhookRequest): Promise<WebhookOut>;
755
+ deleteInbox(inboxId: string, webhookId: string): Promise<void>;
756
+ }
757
+
758
+ export declare class CarlyEmail {
759
+ constructor(options?: ClientOptions);
760
+ agent: Agent;
761
+ auth: Auth;
762
+ billing: Billing;
763
+ inboxes: Inboxes;
764
+ messages: Messages;
765
+ threads: Threads;
766
+ drafts: Drafts;
767
+ lists: Lists;
768
+ domains: Domains;
769
+ apiKeys: ApiKeys;
770
+ metrics: Metrics;
771
+ pods: Pods;
772
+ organizations: Organizations;
773
+ inboxEvents: InboxEvents;
774
+ webhooks: Webhooks;
775
+ }
776
+
777
+ export default CarlyEmail;