@pidgeon-ai/sdk 1.2.0 → 1.4.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.
package/dist/index.d.cts CHANGED
@@ -416,6 +416,10 @@ type Identity = {
416
416
  type Message = {
417
417
  id: string;
418
418
  thread_id: string;
419
+ /**
420
+ * The mailbox this message is in, as an id. What `POST /attachments` and the other endpoints that take a mailbox expect — `identity` below is the same address as text.
421
+ */
422
+ identity_id: string | null;
419
423
  identity: string | null;
420
424
  direction: string;
421
425
  /**
@@ -457,6 +461,20 @@ type Message = {
457
461
  reply_text: string;
458
462
  is_read: boolean;
459
463
  is_spam: boolean;
464
+ /**
465
+ * The headers we keep, lowercased: `message-id`, `in-reply-to`, `references`, `date`, `reply-to`, `return-path`, `list-id`, `list-unsubscribe`, `precedence`, `auto-submitted`, `x-auto-response-suppress`, `x-mailer` and `x-priority`. Not the whole envelope — that is `GET /messages/{id}/raw`. Empty when none were present.
466
+ */
467
+ headers: {
468
+ [key: string]: string;
469
+ };
470
+ /**
471
+ * What the receiving transport said about the sending domain. Null means it did not report, not that the check failed — normal on outbound, and on inbound it is the difference between unknown and forged.
472
+ */
473
+ authentication: {
474
+ spf: string | null;
475
+ dkim: string | null;
476
+ dmarc: string | null;
477
+ };
460
478
  attachments: Array<{
461
479
  id: string;
462
480
  filename: string;
@@ -520,6 +538,20 @@ type Thread = {
520
538
  assignee_id: string | null;
521
539
  assigned_at: string | null;
522
540
  message_count: number;
541
+ /**
542
+ * Where the newest message is filed. Null on a thread with no messages.
543
+ */
544
+ folder: 'inbox' | 'starred' | 'sent' | 'drafts' | 'scheduled' | 'snoozed' | 'archive' | 'spam' | 'trash' | 'unauthenticated' | null;
545
+ /**
546
+ * Who sent the newest message.
547
+ */
548
+ from: string | null;
549
+ from_name: string | null;
550
+ /**
551
+ * The first line of the newest message.
552
+ */
553
+ preview: string | null;
554
+ has_attachments: boolean;
523
555
  last_message_at: string | null;
524
556
  /**
525
557
  * ISO-8601, UTC.
@@ -847,6 +879,7 @@ type Domain = {
847
879
  domain: string;
848
880
  status: string;
849
881
  catch_all_enabled: boolean;
882
+ inbound_enabled: boolean;
850
883
  identity_count: number;
851
884
  verified_at: string | null;
852
885
  /**
@@ -859,6 +892,7 @@ type DomainDetail = {
859
892
  domain: string;
860
893
  status: string;
861
894
  catch_all_enabled: boolean;
895
+ inbound_enabled: boolean;
862
896
  identity_count: number;
863
897
  verified_at: string | null;
864
898
  /**
@@ -977,6 +1011,53 @@ type Workspace = {
977
1011
  plan: string;
978
1012
  status: string;
979
1013
  };
1014
+ type Me = {
1015
+ /**
1016
+ * What is calling. Only API keys reach this API.
1017
+ */
1018
+ kind: 'key';
1019
+ /**
1020
+ * Null only if the key was deleted between authenticating and this read.
1021
+ */
1022
+ key: {
1023
+ id: string;
1024
+ /**
1025
+ * What somebody called it, for telling two keys apart.
1026
+ */
1027
+ name: string;
1028
+ /**
1029
+ * The visible start of the token, e.g. `pgn_live_a1b2`.
1030
+ */
1031
+ prefix: string;
1032
+ /**
1033
+ * The highest rung this key reaches on any address. Composed with the grant on the address itself — the lower of the two wins — so this is a ceiling, not a promise.
1034
+ */
1035
+ access: 'read' | 'send' | 'admin';
1036
+ /**
1037
+ * True when it reaches every address the workspace owns, including ones created after it. False when it reaches a fixed list.
1038
+ */
1039
+ reaches_all_addresses: boolean;
1040
+ /**
1041
+ * When it stops authenticating, or null.
1042
+ */
1043
+ expires_at: string | null;
1044
+ /**
1045
+ * ISO-8601, UTC.
1046
+ */
1047
+ created_at: string;
1048
+ } | null;
1049
+ workspace: {
1050
+ id: string;
1051
+ /**
1052
+ * Which entitlements apply. See /docs/limits.
1053
+ */
1054
+ plan: string;
1055
+ };
1056
+ /**
1057
+ * How many addresses this key can read. `GET /identities` lists them; this is the count, which is what tells a key that reaches nothing apart from one that is misconfigured.
1058
+ */
1059
+ reaches: number;
1060
+ };
980
1061
  type Deleted = {
981
1062
  id: string;
982
1063
  deleted: true;
@@ -1022,13 +1103,29 @@ type Undo = {
1022
1103
  };
1023
1104
  type MessageListItem = {
1024
1105
  id: string;
1106
+ identity_id: string | null;
1025
1107
  thread_id: string;
1026
1108
  direction: string;
1027
1109
  /**
1028
- * Who the row is about: the sender in inbox, the recipient in sent.
1110
+ * The address that sent it.
1029
1111
  */
1030
1112
  from: string;
1031
- from_name: string;
1113
+ /**
1114
+ * The sender’s display name, when it had one.
1115
+ */
1116
+ from_name: string | null;
1117
+ /**
1118
+ * Every address it was sent to.
1119
+ */
1120
+ to: Array<string>;
1121
+ /**
1122
+ * Who the row is about: the sender on a received message, the recipient on a sent one. What a mail client prints in the list.
1123
+ */
1124
+ counterparty: string;
1125
+ /**
1126
+ * The same party, as a name to show.
1127
+ */
1128
+ counterparty_name: string;
1032
1129
  subject: string | null;
1033
1130
  preview: string | null;
1034
1131
  is_read: boolean;
@@ -1045,6 +1142,9 @@ type MessageListItem = {
1045
1142
  timestamp: string;
1046
1143
  };
1047
1144
  type Member = {
1145
+ /**
1146
+ * The person’s user id. This is what `user_id` takes when granting access to an address. On a workspace nobody was invited to it equals the workspace’s own id, because a personal workspace is created with its founder’s id — the two matching is expected and the value is still the user id.
1147
+ */
1048
1148
  id: string;
1049
1149
  email: string;
1050
1150
  name: string | null;
@@ -1139,11 +1239,59 @@ type Revoked = {
1139
1239
  grant_id: string;
1140
1240
  revoked: boolean;
1141
1241
  };
1242
+ type SearchHit = {
1243
+ id: string;
1244
+ identity_id: string | null;
1245
+ thread_id: string;
1246
+ direction: string;
1247
+ /**
1248
+ * The address that sent it.
1249
+ */
1250
+ from: string;
1251
+ /**
1252
+ * The sender’s display name, when it had one.
1253
+ */
1254
+ from_name: string | null;
1255
+ /**
1256
+ * Every address it was sent to.
1257
+ */
1258
+ to: Array<string>;
1259
+ /**
1260
+ * Who the row is about: the sender on a received message, the recipient on a sent one. What a mail client prints in the list.
1261
+ */
1262
+ counterparty: string;
1263
+ /**
1264
+ * The same party, as a name to show.
1265
+ */
1266
+ counterparty_name: string;
1267
+ subject: string | null;
1268
+ preview: string | null;
1269
+ is_read: boolean;
1270
+ is_starred: boolean;
1271
+ is_draft: boolean;
1272
+ is_spam: boolean;
1273
+ has_attachments: boolean;
1274
+ attachment_count: number;
1275
+ message_count: number;
1276
+ assignee_id: string | null;
1277
+ /**
1278
+ * ISO-8601, UTC.
1279
+ */
1280
+ timestamp: string;
1281
+ /**
1282
+ * The folder the hit was found in.
1283
+ */
1284
+ folder: 'inbox' | 'starred' | 'sent' | 'drafts' | 'scheduled' | 'snoozed' | 'archive' | 'spam' | 'trash' | 'unauthenticated';
1285
+ /**
1286
+ * The mailbox it was found in, as the address. `identity_id` is the same row.
1287
+ */
1288
+ identity: string | null;
1289
+ };
1142
1290
  type Label = {
1143
1291
  id: string;
1144
1292
  identity_id: string;
1145
1293
  name: string;
1146
- colour: string;
1294
+ colour: 'slate' | 'red' | 'amber' | 'green' | 'teal' | 'blue' | 'violet' | 'pink';
1147
1295
  /**
1148
1296
  * ISO-8601, UTC.
1149
1297
  */
@@ -1914,7 +2062,7 @@ type LabelsCreateData = {
1914
2062
  */
1915
2063
  identity_id: string;
1916
2064
  name: string;
1917
- colour?: string;
2065
+ colour?: 'slate' | 'red' | 'amber' | 'green' | 'teal' | 'blue' | 'violet' | 'pink';
1918
2066
  };
1919
2067
  path?: never;
1920
2068
  query?: never;
@@ -1979,7 +2127,7 @@ type LabelsDeleteResponse = LabelsDeleteResponses[keyof LabelsDeleteResponses];
1979
2127
  type LabelsUpdateData = {
1980
2128
  body: {
1981
2129
  name?: string;
1982
- colour?: string;
2130
+ colour?: 'slate' | 'red' | 'amber' | 'green' | 'teal' | 'blue' | 'violet' | 'pink';
1983
2131
  };
1984
2132
  path: {
1985
2133
  id: string;
@@ -2201,6 +2349,10 @@ type MessagesSendData = {
2201
2349
  * The message being answered. Keeps the conversation together in the recipient’s client too.
2202
2350
  */
2203
2351
  in_reply_to?: string | null;
2352
+ /**
2353
+ * The same field as `in_reply_to`, under the name this endpoint has always used. Both names work on both endpoints; reach for `in_reply_to`.
2354
+ */
2355
+ in_reply_to_message_id?: string | null;
2204
2356
  };
2205
2357
  path?: never;
2206
2358
  query?: never;
@@ -2233,8 +2385,8 @@ type MessagesSendResponse = MessagesSendResponses[keyof MessagesSendResponses];
2233
2385
  type MessagesSearchData = {
2234
2386
  body?: never;
2235
2387
  path?: never;
2236
- query: {
2237
- identity_id: string;
2388
+ query?: {
2389
+ identity_id?: string;
2238
2390
  q?: string;
2239
2391
  in?: 'inbox' | 'starred' | 'sent' | 'drafts' | 'scheduled' | 'snoozed' | 'archive' | 'spam' | 'trash' | 'unauthenticated';
2240
2392
  from?: string;
@@ -2267,7 +2419,7 @@ type MessagesSearchResponses = {
2267
2419
  * What matched.
2268
2420
  */
2269
2421
  200: {
2270
- data: Array<MessageListItem>;
2422
+ data: Array<SearchHit>;
2271
2423
  has_more: boolean;
2272
2424
  /**
2273
2425
  * Pass as `cursor` to continue. Null on the last page.
@@ -2279,6 +2431,9 @@ type MessagesSearchResponse = MessagesSearchResponses[keyof MessagesSearchRespon
2279
2431
  type MessagesActData = {
2280
2432
  body: {
2281
2433
  message_ids: Array<string>;
2434
+ /**
2435
+ * `read` and `unread` are refused for an API key: read state belongs to a person and a key is not one. Every other action works.
2436
+ */
2282
2437
  action: 'read' | 'unread' | 'star' | 'unstar' | 'archive' | 'unarchive' | 'delete' | 'restore' | 'spam' | 'not_spam' | 'delete_forever';
2283
2438
  };
2284
2439
  path?: never;
@@ -2375,6 +2530,9 @@ type MessagesGetResponses = {
2375
2530
  type MessagesGetResponse = MessagesGetResponses[keyof MessagesGetResponses];
2376
2531
  type MessagesUpdateData = {
2377
2532
  body: {
2533
+ /**
2534
+ * Refused for an API key: read state belongs to a person and a key is not one. Archive the message, or track what you have seen with `GET /v1/mailboxes/changes`. A person signed in to the dashboard sets this.
2535
+ */
2378
2536
  is_read?: boolean;
2379
2537
  is_starred?: boolean;
2380
2538
  folder?: 'inbox' | 'archive' | 'spam' | 'trash';
@@ -2773,6 +2931,7 @@ type DomainsCreateData = {
2773
2931
  * A domain name you own, or the shared one. An alternative to `domain_id`.
2774
2932
  */
2775
2933
  domain: string;
2934
+ inbound_enabled?: boolean;
2776
2935
  };
2777
2936
  path?: never;
2778
2937
  query?: never;
@@ -3301,6 +3460,10 @@ type MailboxesListFolderResponses = {
3301
3460
  * Pass as `cursor` to continue. Null on the last page.
3302
3461
  */
3303
3462
  next_cursor: string | null;
3463
+ /**
3464
+ * Hand to `GET /mailboxes/changes` as `since` to be told what has changed since this page, rather than fetching it again. Not a page cursor — the two are different reads and each refuses the other.
3465
+ */
3466
+ sync_cursor: string;
3304
3467
  };
3305
3468
  };
3306
3469
  type MailboxesListFolderResponse = MailboxesListFolderResponses[keyof MailboxesListFolderResponses];
@@ -3583,6 +3746,36 @@ type AppPasswordsRevokeResponses = {
3583
3746
  };
3584
3747
  };
3585
3748
  type AppPasswordsRevokeResponse = AppPasswordsRevokeResponses[keyof AppPasswordsRevokeResponses];
3749
+ type MeGetData = {
3750
+ body?: never;
3751
+ path?: never;
3752
+ query?: never;
3753
+ url: '/me';
3754
+ };
3755
+ type MeGetErrors = {
3756
+ /**
3757
+ * No API key, or one that is not valid.
3758
+ */
3759
+ 401: Error;
3760
+ /**
3761
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3762
+ */
3763
+ 404: Error;
3764
+ /**
3765
+ * Rate limited. `X-RateLimit-Reset` says when to retry.
3766
+ */
3767
+ 429: Error;
3768
+ };
3769
+ type MeGetError = MeGetErrors[keyof MeGetErrors];
3770
+ type MeGetResponses = {
3771
+ /**
3772
+ * The calling credential.
3773
+ */
3774
+ 200: {
3775
+ data: Me;
3776
+ };
3777
+ };
3778
+ type MeGetResponse = MeGetResponses[keyof MeGetResponses];
3586
3779
  type WorkspaceGetData = {
3587
3780
  body?: never;
3588
3781
  path?: never;
@@ -3692,6 +3885,43 @@ type EventsListResponses = {
3692
3885
  };
3693
3886
  };
3694
3887
  type EventsListResponse = EventsListResponses[keyof EventsListResponses];
3888
+ type EventsStreamData = {
3889
+ body?: never;
3890
+ path?: never;
3891
+ query?: {
3892
+ limit?: number;
3893
+ /**
3894
+ * From a previous page’s `next_cursor`. Opaque — do not parse it.
3895
+ */
3896
+ cursor?: string;
3897
+ type?: string;
3898
+ identity_id?: string;
3899
+ after?: string;
3900
+ };
3901
+ url: '/events/stream';
3902
+ };
3903
+ type EventsStreamErrors = {
3904
+ /**
3905
+ * No API key, or one that is not valid.
3906
+ */
3907
+ 401: Error;
3908
+ /**
3909
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3910
+ */
3911
+ 404: Error;
3912
+ /**
3913
+ * Rate limited. `X-RateLimit-Reset` says when to retry.
3914
+ */
3915
+ 429: Error;
3916
+ };
3917
+ type EventsStreamError = EventsStreamErrors[keyof EventsStreamErrors];
3918
+ type EventsStreamResponses = {
3919
+ /**
3920
+ * An open stream of events.
3921
+ */
3922
+ 200: string;
3923
+ };
3924
+ type EventsStreamResponse = EventsStreamResponses[keyof EventsStreamResponses];
3695
3925
  type EventsGetData = {
3696
3926
  body?: never;
3697
3927
  path: {
@@ -4598,7 +4828,14 @@ type DraftsCreateData = {
4598
4828
  * The plain-text body. Send this even when you send `html` — some clients only read it.
4599
4829
  */
4600
4830
  text?: string | null;
4831
+ /**
4832
+ * The same field as `in_reply_to`, under the name this endpoint has always used. Both names work on both endpoints; reach for `in_reply_to`.
4833
+ */
4601
4834
  in_reply_to_message_id?: string | null;
4835
+ /**
4836
+ * The message being answered. Keeps the conversation together in the recipient’s client too.
4837
+ */
4838
+ in_reply_to?: string | null;
4602
4839
  /**
4603
4840
  * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
4604
4841
  */
@@ -5153,15 +5390,15 @@ declare const messagesListInThread: <ThrowOnError extends boolean = false>(optio
5153
5390
  /**
5154
5391
  * Send a message
5155
5392
  *
5156
- * Idempotent with an `Idempotency-Key` header. Answers `202` with the id, the thread and anything **rejected** — a recipient the address is not allowed to write to is refused here rather than failing later, so read `rejected` before assuming it went.
5393
+ * Idempotent with an `Idempotency-Key` header. Answers `202` with the id, the thread and anything **rejected** — addresses the provider would not accept at hand-off, so read it before assuming every recipient got it. A recipient this address is not allowed to write to is a different thing and refuses the whole send: `403` with `blocked` when a rule says no, `not_permitted` when the send policy does. Nothing is sent to anybody in that case.
5157
5394
  */
5158
5395
  declare const messagesSend: <ThrowOnError extends boolean = false>(options: Options<MessagesSendData, ThrowOnError>) => RequestResult<MessagesSendResponses, MessagesSendErrors, ThrowOnError>;
5159
5396
  /**
5160
- * Search one mailbox
5397
+ * Search messages
5161
5398
  *
5162
- * Full-text, ranked by relevance, one mailbox at a time. Results carry the folder they were found in. Not paged: page two of a relevance ranking is a place nobody goes, so narrow the query instead.
5399
+ * Full-text, ranked by relevance, across every address this credential can reach. Name an `identity_id` to search exactly one. Every result carries the address it was found in and the folder it is in, because a hit you cannot attribute to a mailbox is a hit you cannot open. Not paged: page two of a relevance ranking is a place nobody goes, so narrow the query instead.
5163
5400
  */
5164
- declare const messagesSearch: <ThrowOnError extends boolean = false>(options: Options<MessagesSearchData, ThrowOnError>) => RequestResult<MessagesSearchResponses, MessagesSearchErrors, ThrowOnError>;
5401
+ declare const messagesSearch: <ThrowOnError extends boolean = false>(options?: Options<MessagesSearchData, ThrowOnError>) => RequestResult<MessagesSearchResponses, MessagesSearchErrors, ThrowOnError>;
5165
5402
  /**
5166
5403
  * Apply one action to many conversations
5167
5404
  *
@@ -5366,6 +5603,12 @@ declare const appPasswordsCreate: <ThrowOnError extends boolean = false>(options
5366
5603
  * Revoke an app password
5367
5604
  */
5368
5605
  declare const appPasswordsRevoke: <ThrowOnError extends boolean = false>(options: Options<AppPasswordsRevokeData, ThrowOnError>) => RequestResult<AppPasswordsRevokeResponses, AppPasswordsRevokeErrors, ThrowOnError>;
5606
+ /**
5607
+ * What this key is, and what it may do
5608
+ *
5609
+ * The one question a credential could not ask. Everything else here answers what is *in* the account, so the only way to learn your own access was to try something and read the refusal — and a key that reaches nothing looks exactly like a key that is broken. Free: no write, no side effect, and the three facts that decide whether your next call works.
5610
+ */
5611
+ declare const meGet: <ThrowOnError extends boolean = false>(options?: Options<MeGetData, ThrowOnError>) => RequestResult<MeGetResponses, MeGetErrors, ThrowOnError>;
5369
5612
  /**
5370
5613
  * Which account this key is for
5371
5614
  *
@@ -5385,9 +5628,23 @@ declare const workspaceMembers: <ThrowOnError extends boolean = false>(options?:
5385
5628
  *
5386
5629
  * **Two directions.** `cursor` pages backwards through history, newest first, which is what a dashboard shows. `after` tails the log forwards, oldest first, which is what a caller that cannot receive a webhook does: ask for everything since the last event you saw, act on it, and keep the last `created_at` as the next cursor. Naming both is refused — they are different reads.
5387
5630
  *
5631
+ * **Starting from nothing: pass `after=1970-01-01T00:00:00Z`.** With neither parameter this answers newest first, so a first-time consumer that takes the last row as its high-water mark stores the *oldest* event in the log and never advances. Any timestamp at or before the oldest event you hold will do; the epoch is the one nobody has to think about.
5632
+ *
5388
5633
  * A forward page is ordered oldest first precisely so its **last** row is the high-water mark to resume from; `next_cursor` is that row either way.
5389
5634
  */
5390
5635
  declare const eventsList: <ThrowOnError extends boolean = false>(options?: Options<EventsListData, ThrowOnError>) => RequestResult<EventsListResponses, EventsListErrors, ThrowOnError>;
5636
+ /**
5637
+ * Stream events as they happen
5638
+ *
5639
+ * The event log held open, for a caller that cannot host a webhook endpoint — a script on a laptop, a notebook, an agent runtime with no public address.
5640
+ *
5641
+ * **Server-sent events.** Each message carries the event as `data`, the event type as `event:`, and the cursor to resume from as `id:`. Authentication, filtering by `type` and `identity_id`, and the `after` cursor are all exactly as on `GET /events` — this is that read, held open.
5642
+ *
5643
+ * **Reconnection is automatic and lossless.** A compliant client resends the last `id:` it saw as `Last-Event-ID`, which is preferred over `after`, so a dropped connection resumes with no gap and no repeat. The connection closes itself after about 280 seconds so that the last thing you receive is a cursor rather than a socket error; reconnect and carry on.
5644
+ *
5645
+ * **It polls, every two seconds, on our side of the wire.** No push exists in the database. What this buys is one held connection instead of a request from your network on a timer, and being woken only when something happened.
5646
+ */
5647
+ declare const eventsStream: <ThrowOnError extends boolean = false>(options?: Options<EventsStreamData, ThrowOnError, EventsStreamResponse>) => Promise<ServerSentEventsResult<EventsStreamResponses>>;
5391
5648
  /**
5392
5649
  * Fetch one event
5393
5650
  */
@@ -5622,4 +5879,78 @@ declare function verifyWebhook(input: {
5622
5879
  now?: Date;
5623
5880
  }): Promise<WebhookEnvelope>;
5624
5881
 
5625
- export { type Address, type AgentAttachHumanData, type AgentAttachHumanError, type AgentAttachHumanErrors, type AgentAttachHumanResponse, type AgentAttachHumanResponses, type AgentSignUpData, type AgentSignUpError, type AgentSignUpErrors, type AgentSignUpResponse, type AgentSignUpResponses, type AgentSignup, type AgentVerified, type AgentVerifyData, type AgentVerifyError, type AgentVerifyErrors, type AgentVerifyResponse, type AgentVerifyResponses, type ApiKey, type AppPassword, type AppPasswordsCreateData, type AppPasswordsCreateError, type AppPasswordsCreateErrors, type AppPasswordsCreateResponse, type AppPasswordsCreateResponses, type AppPasswordsListData, type AppPasswordsListError, type AppPasswordsListErrors, type AppPasswordsListResponse, type AppPasswordsListResponses, type AppPasswordsRevokeData, type AppPasswordsRevokeError, type AppPasswordsRevokeErrors, type AppPasswordsRevokeResponse, type AppPasswordsRevokeResponses, type Attachment, type AttachmentUrl, type AttachmentsDownloadUrlData, type AttachmentsDownloadUrlError, type AttachmentsDownloadUrlErrors, type AttachmentsDownloadUrlResponse, type AttachmentsDownloadUrlResponses, type AttachmentsUploadData, type AttachmentsUploadError, type AttachmentsUploadErrors, type AttachmentsUploadResponse, type AttachmentsUploadResponses, type Calendar, type CalendarCreateEventData, type CalendarCreateEventError, type CalendarCreateEventErrors, type CalendarCreateEventResponse, type CalendarCreateEventResponses, type CalendarDeleteEventData, type CalendarDeleteEventError, type CalendarDeleteEventErrors, type CalendarDeleteEventResponse, type CalendarDeleteEventResponses, type CalendarEvent, type CalendarGetAgendaData, type CalendarGetAgendaError, type CalendarGetAgendaErrors, type CalendarGetAgendaResponse, type CalendarGetAgendaResponses, type CalendarGetData, type CalendarGetError, type CalendarGetErrors, type CalendarGetEventData, type CalendarGetEventError, type CalendarGetEventErrors, type CalendarGetEventResponse, type CalendarGetEventResponses, type CalendarGetResponse, type CalendarGetResponses, type CalendarListEventInstancesData, type CalendarListEventInstancesError, type CalendarListEventInstancesErrors, type CalendarListEventInstancesResponse, type CalendarListEventInstancesResponses, type CalendarListEventsData, type CalendarListEventsError, type CalendarListEventsErrors, type CalendarListEventsResponse, type CalendarListEventsResponses, type CalendarRespondToEventData, type CalendarRespondToEventError, type CalendarRespondToEventErrors, type CalendarRespondToEventResponse, type CalendarRespondToEventResponses, type CalendarUpdateData, type CalendarUpdateError, type CalendarUpdateErrors, type CalendarUpdateEventData, type CalendarUpdateEventError, type CalendarUpdateEventErrors, type CalendarUpdateEventResponse, type CalendarUpdateEventResponses, type CalendarUpdateResponse, type CalendarUpdateResponses, type ClientOptions, type CreateClientConfig, type Deleted, type Delivery, type DnsRecord, type Domain, type DomainDetail, type DomainsCreateData, type DomainsCreateError, type DomainsCreateErrors, type DomainsCreateResponse, type DomainsCreateResponses, type DomainsDeleteData, type DomainsDeleteError, type DomainsDeleteErrors, type DomainsDeleteResponse, type DomainsDeleteResponses, type DomainsGetData, type DomainsGetError, type DomainsGetErrors, type DomainsGetResponse, type DomainsGetResponses, type DomainsGetSetupLinkData, type DomainsGetSetupLinkError, type DomainsGetSetupLinkErrors, type DomainsGetSetupLinkResponse, type DomainsGetSetupLinkResponses, type DomainsListData, type DomainsListError, type DomainsListErrors, type DomainsListResponse, type DomainsListResponses, type DomainsUpdateData, type DomainsUpdateError, type DomainsUpdateErrors, type DomainsUpdateResponse, type DomainsUpdateResponses, type DomainsVerifyData, type DomainsVerifyError, type DomainsVerifyErrors, type DomainsVerifyResponse, type DomainsVerifyResponses, type DomainsZoneFileData, type DomainsZoneFileError, type DomainsZoneFileErrors, type DomainsZoneFileResponse, type DomainsZoneFileResponses, type Draft, type DraftsCancelScheduleData, type DraftsCancelScheduleError, type DraftsCancelScheduleErrors, type DraftsCancelScheduleResponse, type DraftsCancelScheduleResponses, type DraftsCreateData, type DraftsCreateError, type DraftsCreateErrors, type DraftsCreateResponse, type DraftsCreateResponses, type DraftsDeleteData, type DraftsDeleteError, type DraftsDeleteErrors, type DraftsDeleteResponse, type DraftsDeleteResponses, type DraftsGetData, type DraftsGetError, type DraftsGetErrors, type DraftsGetResponse, type DraftsGetResponses, type DraftsListData, type DraftsListError, type DraftsListErrors, type DraftsListResponse, type DraftsListResponses, type DraftsRemoveAttachmentData, type DraftsRemoveAttachmentError, type DraftsRemoveAttachmentErrors, type DraftsRemoveAttachmentResponse, type DraftsRemoveAttachmentResponses, type DraftsScheduleData, type DraftsScheduleError, type DraftsScheduleErrors, type DraftsScheduleResponse, type DraftsScheduleResponses, type DraftsSendData, type DraftsSendError, type DraftsSendErrors, type DraftsSendResponse, type DraftsSendResponses, type DraftsUpdateData, type DraftsUpdateError, type DraftsUpdateErrors, type DraftsUpdateResponse, type DraftsUpdateResponses, type Emptied, type Error, type Event, type EventResponse, type EventsGetData, type EventsGetError, type EventsGetErrors, type EventsGetResponse, type EventsGetResponses, type EventsListData, type EventsListError, type EventsListErrors, type EventsListResponse, type EventsListResponses, type IdentitiesAccessCreateData, type IdentitiesAccessCreateError, type IdentitiesAccessCreateErrors, type IdentitiesAccessCreateResponse, type IdentitiesAccessCreateResponses, type IdentitiesAccessDeleteData, type IdentitiesAccessDeleteError, type IdentitiesAccessDeleteErrors, type IdentitiesAccessDeleteResponse, type IdentitiesAccessDeleteResponses, type IdentitiesAccessGetData, type IdentitiesAccessGetError, type IdentitiesAccessGetErrors, type IdentitiesAccessGetResponse, type IdentitiesAccessGetResponses, type IdentitiesCreateData, type IdentitiesCreateError, type IdentitiesCreateErrors, type IdentitiesCreateResponse, type IdentitiesCreateResponses, type IdentitiesDeleteData, type IdentitiesDeleteError, type IdentitiesDeleteErrors, type IdentitiesDeleteResponse, type IdentitiesDeleteResponses, type IdentitiesGetData, type IdentitiesGetError, type IdentitiesGetErrors, type IdentitiesGetResponse, type IdentitiesGetResponses, type IdentitiesListData, type IdentitiesListError, type IdentitiesListErrors, type IdentitiesListResponse, type IdentitiesListResponses, type IdentitiesReceiveRulesCreateData, type IdentitiesReceiveRulesCreateError, type IdentitiesReceiveRulesCreateErrors, type IdentitiesReceiveRulesCreateResponse, type IdentitiesReceiveRulesCreateResponses, type IdentitiesReceiveRulesDeleteData, type IdentitiesReceiveRulesDeleteError, type IdentitiesReceiveRulesDeleteErrors, type IdentitiesReceiveRulesDeleteResponse, type IdentitiesReceiveRulesDeleteResponses, type IdentitiesReceiveRulesGetData, type IdentitiesReceiveRulesGetError, type IdentitiesReceiveRulesGetErrors, type IdentitiesReceiveRulesGetResponse, type IdentitiesReceiveRulesGetResponses, type IdentitiesSendRulesCreateData, type IdentitiesSendRulesCreateError, type IdentitiesSendRulesCreateErrors, type IdentitiesSendRulesCreateResponse, type IdentitiesSendRulesCreateResponses, type IdentitiesSendRulesDeleteData, type IdentitiesSendRulesDeleteError, type IdentitiesSendRulesDeleteErrors, type IdentitiesSendRulesDeleteResponse, type IdentitiesSendRulesDeleteResponses, type IdentitiesSendRulesGetData, type IdentitiesSendRulesGetError, type IdentitiesSendRulesGetErrors, type IdentitiesSendRulesGetResponse, type IdentitiesSendRulesGetResponses, type IdentitiesSuspendTenantData, type IdentitiesSuspendTenantError, type IdentitiesSuspendTenantErrors, type IdentitiesSuspendTenantResponse, type IdentitiesSuspendTenantResponses, type IdentitiesUpdateData, type IdentitiesUpdateError, type IdentitiesUpdateErrors, type IdentitiesUpdateResponse, type IdentitiesUpdateResponses, type Identity, type Invitation, type InvitationResponse, type KeysCreateData, type KeysCreateError, type KeysCreateErrors, type KeysCreateResponse, type KeysCreateResponses, type KeysGetData, type KeysGetError, type KeysGetErrors, type KeysGetResponse, type KeysGetResponses, type KeysListData, type KeysListError, type KeysListErrors, type KeysListResponse, type KeysListResponses, type KeysRevokeData, type KeysRevokeError, type KeysRevokeErrors, type KeysRevokeResponse, type KeysRevokeResponses, type KeysUpdateData, type KeysUpdateError, type KeysUpdateErrors, type KeysUpdateResponse, type KeysUpdateResponses, type Label, type LabelRemoved, type LabelsCreateData, type LabelsCreateError, type LabelsCreateErrors, type LabelsCreateResponse, type LabelsCreateResponses, type LabelsDeleteData, type LabelsDeleteError, type LabelsDeleteErrors, type LabelsDeleteResponse, type LabelsDeleteResponses, type LabelsListData, type LabelsListError, type LabelsListErrors, type LabelsListResponse, type LabelsListResponses, type LabelsUpdateData, type LabelsUpdateError, type LabelsUpdateErrors, type LabelsUpdateResponse, type LabelsUpdateResponses, type Mailbox, type MailboxAccess, type MailboxChange, type MailboxesChangesData, type MailboxesChangesError, type MailboxesChangesErrors, type MailboxesChangesResponse, type MailboxesChangesResponses, type MailboxesEmptyTrashData, type MailboxesEmptyTrashError, type MailboxesEmptyTrashErrors, type MailboxesEmptyTrashResponse, type MailboxesEmptyTrashResponses, type MailboxesListData, type MailboxesListError, type MailboxesListErrors, type MailboxesListFolderData, type MailboxesListFolderError, type MailboxesListFolderErrors, type MailboxesListFolderResponse, type MailboxesListFolderResponses, type MailboxesListResponse, type MailboxesListResponses, type Member, type Message, type MessageListItem, type MessagesActData, type MessagesActError, type MessagesActErrors, type MessagesActResponse, type MessagesActResponses, type MessagesForwardData, type MessagesForwardError, type MessagesForwardErrors, type MessagesForwardResponse, type MessagesForwardResponses, type MessagesGetData, type MessagesGetError, type MessagesGetErrors, type MessagesGetResponse, type MessagesGetResponses, type MessagesListInThreadData, type MessagesListInThreadError, type MessagesListInThreadErrors, type MessagesListInThreadResponse, type MessagesListInThreadResponses, type MessagesRawData, type MessagesRawError, type MessagesRawErrors, type MessagesRawResponse, type MessagesRawResponses, type MessagesReplyAllData, type MessagesReplyAllError, type MessagesReplyAllErrors, type MessagesReplyAllResponse, type MessagesReplyAllResponses, type MessagesReplyData, type MessagesReplyError, type MessagesReplyErrors, type MessagesReplyResponse, type MessagesReplyResponses, type MessagesRespondToInvitationData, type MessagesRespondToInvitationError, type MessagesRespondToInvitationErrors, type MessagesRespondToInvitationResponse, type MessagesRespondToInvitationResponses, type MessagesSearchData, type MessagesSearchError, type MessagesSearchErrors, type MessagesSearchResponse, type MessagesSearchResponses, type MessagesSendData, type MessagesSendError, type MessagesSendErrors, type MessagesSendResponse, type MessagesSendResponses, type MessagesUndoData, type MessagesUndoError, type MessagesUndoErrors, type MessagesUndoResponse, type MessagesUndoResponses, type MessagesUpdateData, type MessagesUpdateError, type MessagesUpdateErrors, type MessagesUpdateResponse, type MessagesUpdateResponses, type Metrics, type MetricsQueryData, type MetricsQueryError, type MetricsQueryErrors, type MetricsQueryResponse, type MetricsQueryResponses, type Options, type ReceiveRuleRemoved, type ReceiveRules, type Replayed, type Restored, type Revoked, type RoutingCreateData, type RoutingCreateError, type RoutingCreateErrors, type RoutingCreateResponse, type RoutingCreateResponses, type RoutingDeleteData, type RoutingDeleteError, type RoutingDeleteErrors, type RoutingDeleteResponse, type RoutingDeleteResponses, type RoutingListData, type RoutingListError, type RoutingListErrors, type RoutingListResponse, type RoutingListResponses, type RoutingRule, type RoutingUpdateData, type RoutingUpdateError, type RoutingUpdateErrors, type RoutingUpdateResponse, type RoutingUpdateResponses, SIGNATURE_HEADER, type SendRuleRemoved, type SendRules, type Sent, type SetupLink, TIMESTAMP_HEADER, type TenantSuspended, type Thread, type ThreadsGetData, type ThreadsGetError, type ThreadsGetErrors, type ThreadsGetResponse, type ThreadsGetResponses, type ThreadsLabelsCreateData, type ThreadsLabelsCreateError, type ThreadsLabelsCreateErrors, type ThreadsLabelsCreateResponse, type ThreadsLabelsCreateResponses, type ThreadsLabelsDeleteData, type ThreadsLabelsDeleteError, type ThreadsLabelsDeleteErrors, type ThreadsLabelsDeleteResponse, type ThreadsLabelsDeleteResponses, type ThreadsLabelsGetData, type ThreadsLabelsGetError, type ThreadsLabelsGetErrors, type ThreadsLabelsGetResponse, type ThreadsLabelsGetResponses, type ThreadsListData, type ThreadsListError, type ThreadsListErrors, type ThreadsListResponse, type ThreadsListResponses, type ThreadsUpdateData, type ThreadsUpdateError, type ThreadsUpdateErrors, type ThreadsUpdateResponse, type ThreadsUpdateResponses, type Undo, type UploadedAttachment, type Verification, type Webhook, type WebhookCreated, type WebhookEnvelope, type WebhookHeaders, type WebhooksCreateData, type WebhooksCreateError, type WebhooksCreateErrors, type WebhooksCreateResponse, type WebhooksCreateResponses, type WebhooksDeleteData, type WebhooksDeleteError, type WebhooksDeleteErrors, type WebhooksDeleteResponse, type WebhooksDeleteResponses, type WebhooksDeliveriesData, type WebhooksDeliveriesError, type WebhooksDeliveriesErrors, type WebhooksDeliveriesResponse, type WebhooksDeliveriesResponses, type WebhooksGetData, type WebhooksGetError, type WebhooksGetErrors, type WebhooksGetHeadersData, type WebhooksGetHeadersError, type WebhooksGetHeadersErrors, type WebhooksGetHeadersResponse, type WebhooksGetHeadersResponses, type WebhooksGetResponse, type WebhooksGetResponses, type WebhooksListData, type WebhooksListError, type WebhooksListErrors, type WebhooksListResponse, type WebhooksListResponses, type WebhooksReplayData, type WebhooksReplayError, type WebhooksReplayErrors, type WebhooksReplayResponse, type WebhooksReplayResponses, type WebhooksUpdateData, type WebhooksUpdateError, type WebhooksUpdateErrors, type WebhooksUpdateHeadersData, type WebhooksUpdateHeadersError, type WebhooksUpdateHeadersErrors, type WebhooksUpdateHeadersResponse, type WebhooksUpdateHeadersResponses, type WebhooksUpdateResponse, type WebhooksUpdateResponses, type Workspace, type WorkspaceGetData, type WorkspaceGetError, type WorkspaceGetErrors, type WorkspaceGetResponse, type WorkspaceGetResponses, type WorkspaceMembersData, type WorkspaceMembersError, type WorkspaceMembersErrors, type WorkspaceMembersResponse, type WorkspaceMembersResponses, agentAttachHuman, agentSignUp, agentVerify, appPasswordsCreate, appPasswordsList, appPasswordsRevoke, attachmentsDownloadUrl, attachmentsUpload, calendarCreateEvent, calendarDeleteEvent, calendarGet, calendarGetAgenda, calendarGetEvent, calendarListEventInstances, calendarListEvents, calendarRespondToEvent, calendarUpdate, calendarUpdateEvent, client, createClient, createConfig, domainsCreate, domainsDelete, domainsGet, domainsGetSetupLink, domainsList, domainsUpdate, domainsVerify, domainsZoneFile, draftsCancelSchedule, draftsCreate, draftsDelete, draftsGet, draftsList, draftsRemoveAttachment, draftsSchedule, draftsSend, draftsUpdate, eventsGet, eventsList, identitiesAccessCreate, identitiesAccessDelete, identitiesAccessGet, identitiesCreate, identitiesDelete, identitiesGet, identitiesList, identitiesReceiveRulesCreate, identitiesReceiveRulesDelete, identitiesReceiveRulesGet, identitiesSendRulesCreate, identitiesSendRulesDelete, identitiesSendRulesGet, identitiesSuspendTenant, identitiesUpdate, keysCreate, keysGet, keysList, keysRevoke, keysUpdate, labelsCreate, labelsDelete, labelsList, labelsUpdate, mailboxesChanges, mailboxesEmptyTrash, mailboxesList, mailboxesListFolder, messagesAct, messagesForward, messagesGet, messagesListInThread, messagesRaw, messagesReply, messagesReplyAll, messagesRespondToInvitation, messagesSearch, messagesSend, messagesUndo, messagesUpdate, metricsQuery, routingCreate, routingDelete, routingList, routingUpdate, threadsGet, threadsLabelsCreate, threadsLabelsDelete, threadsLabelsGet, threadsList, threadsUpdate, verifyWebhook, webhooksCreate, webhooksDelete, webhooksDeliveries, webhooksGet, webhooksGetHeaders, webhooksList, webhooksReplay, webhooksUpdate, webhooksUpdateHeaders, workspaceGet, workspaceMembers };
5882
+ /**
5883
+ * Holding the event log open.
5884
+ *
5885
+ * **The second thing a generator cannot produce**, for the same reason as
5886
+ * `webhooks.ts`: `GET /events/stream` answers `text/event-stream` and
5887
+ * `openapi-ts` builds a typed `fetch` that resolves once with a body. There
5888
+ * is nowhere in a generated client to put a connection that stays open, so
5889
+ * `eventsStream` exists in the types and does nothing useful, and the
5890
+ * endpoint the documentation recommends for *"a caller that cannot host a
5891
+ * webhook endpoint — a script on a laptop, a notebook, an agent runtime with
5892
+ * no public address"* was the one endpoint every customer hand-rolled.
5893
+ *
5894
+ * A field test on 15 October wrote forty lines of it and they worked first
5895
+ * try, which is the argument both ways: the protocol is simple, and nobody
5896
+ * should write it twice. These are those forty lines, once.
5897
+ *
5898
+ * `EventSource` is not used. It cannot send an `Authorization` header — the
5899
+ * browser API takes a URL and nothing else — and putting an API key in a
5900
+ * query string is the one place it must never go. So this is `fetch` with a
5901
+ * reader, which also works unchanged in Node, Bun, Deno, Workers and Vercel
5902
+ * functions.
5903
+ */
5904
+ /** A row of `GET /events`, delivered as it happens. The same shape either way. */
5905
+ interface StreamedEvent {
5906
+ id: string;
5907
+ type: string;
5908
+ identity: string | null;
5909
+ message_id: string | null;
5910
+ thread_id: string | null;
5911
+ data: Record<string, unknown>;
5912
+ created_at: string;
5913
+ }
5914
+ interface StreamOptions {
5915
+ /** `https://pidgeon.ai/api/v1` unless you are pointing at something else. */
5916
+ baseUrl?: string;
5917
+ apiKey: string;
5918
+ /** Narrow to one mailbox. Omitted, the stream spans every one the key reaches. */
5919
+ identityId?: string;
5920
+ /** A comma-separated list, exactly as `GET /events` takes it. */
5921
+ type?: string;
5922
+ /**
5923
+ * Where to start, as an ISO timestamp.
5924
+ *
5925
+ * **`1970-01-01T00:00:00Z` reads the whole log from the beginning**, which
5926
+ * is the answer to a question the API otherwise makes you guess at: with
5927
+ * no cursor at all the plain listing pages *backwards*, so a first-time
5928
+ * consumer that stores its last row stores the oldest event and never
5929
+ * advances. Omit this and the stream starts from now.
5930
+ */
5931
+ after?: string;
5932
+ /** Stop the stream. Aborting mid-event drops that event rather than half of it. */
5933
+ signal?: AbortSignal;
5934
+ }
5935
+ /**
5936
+ * Every event, as it happens, until you stop asking.
5937
+ *
5938
+ * ```ts
5939
+ * for await (const event of streamEvents({ apiKey })) {
5940
+ * if (event.type === 'message.received' && !event.data.from_self) {
5941
+ * await answer(event.data.message_id as string);
5942
+ * }
5943
+ * }
5944
+ * ```
5945
+ *
5946
+ * **Reconnection is this function's job and it is lossless.** The server
5947
+ * closes the connection itself after about 280 seconds so that the last
5948
+ * thing you receive is a cursor rather than a socket error; this reconnects
5949
+ * with `Last-Event-ID`, which the server prefers over `after`, so there is
5950
+ * no gap and no repeat. A network failure is retried the same way with a
5951
+ * short backoff. The loop ends when `signal` aborts and in no other case —
5952
+ * a stream that gave up quietly would be worse than one that never started.
5953
+ */
5954
+ declare function streamEvents(options: StreamOptions): AsyncGenerator<StreamedEvent>;
5955
+
5956
+ export { type Address, type AgentAttachHumanData, type AgentAttachHumanError, type AgentAttachHumanErrors, type AgentAttachHumanResponse, type AgentAttachHumanResponses, type AgentSignUpData, type AgentSignUpError, type AgentSignUpErrors, type AgentSignUpResponse, type AgentSignUpResponses, type AgentSignup, type AgentVerified, type AgentVerifyData, type AgentVerifyError, type AgentVerifyErrors, type AgentVerifyResponse, type AgentVerifyResponses, type ApiKey, type AppPassword, type AppPasswordsCreateData, type AppPasswordsCreateError, type AppPasswordsCreateErrors, type AppPasswordsCreateResponse, type AppPasswordsCreateResponses, type AppPasswordsListData, type AppPasswordsListError, type AppPasswordsListErrors, type AppPasswordsListResponse, type AppPasswordsListResponses, type AppPasswordsRevokeData, type AppPasswordsRevokeError, type AppPasswordsRevokeErrors, type AppPasswordsRevokeResponse, type AppPasswordsRevokeResponses, type Attachment, type AttachmentUrl, type AttachmentsDownloadUrlData, type AttachmentsDownloadUrlError, type AttachmentsDownloadUrlErrors, type AttachmentsDownloadUrlResponse, type AttachmentsDownloadUrlResponses, type AttachmentsUploadData, type AttachmentsUploadError, type AttachmentsUploadErrors, type AttachmentsUploadResponse, type AttachmentsUploadResponses, type Calendar, type CalendarCreateEventData, type CalendarCreateEventError, type CalendarCreateEventErrors, type CalendarCreateEventResponse, type CalendarCreateEventResponses, type CalendarDeleteEventData, type CalendarDeleteEventError, type CalendarDeleteEventErrors, type CalendarDeleteEventResponse, type CalendarDeleteEventResponses, type CalendarEvent, type CalendarGetAgendaData, type CalendarGetAgendaError, type CalendarGetAgendaErrors, type CalendarGetAgendaResponse, type CalendarGetAgendaResponses, type CalendarGetData, type CalendarGetError, type CalendarGetErrors, type CalendarGetEventData, type CalendarGetEventError, type CalendarGetEventErrors, type CalendarGetEventResponse, type CalendarGetEventResponses, type CalendarGetResponse, type CalendarGetResponses, type CalendarListEventInstancesData, type CalendarListEventInstancesError, type CalendarListEventInstancesErrors, type CalendarListEventInstancesResponse, type CalendarListEventInstancesResponses, type CalendarListEventsData, type CalendarListEventsError, type CalendarListEventsErrors, type CalendarListEventsResponse, type CalendarListEventsResponses, type CalendarRespondToEventData, type CalendarRespondToEventError, type CalendarRespondToEventErrors, type CalendarRespondToEventResponse, type CalendarRespondToEventResponses, type CalendarUpdateData, type CalendarUpdateError, type CalendarUpdateErrors, type CalendarUpdateEventData, type CalendarUpdateEventError, type CalendarUpdateEventErrors, type CalendarUpdateEventResponse, type CalendarUpdateEventResponses, type CalendarUpdateResponse, type CalendarUpdateResponses, type ClientOptions, type CreateClientConfig, type Deleted, type Delivery, type DnsRecord, type Domain, type DomainDetail, type DomainsCreateData, type DomainsCreateError, type DomainsCreateErrors, type DomainsCreateResponse, type DomainsCreateResponses, type DomainsDeleteData, type DomainsDeleteError, type DomainsDeleteErrors, type DomainsDeleteResponse, type DomainsDeleteResponses, type DomainsGetData, type DomainsGetError, type DomainsGetErrors, type DomainsGetResponse, type DomainsGetResponses, type DomainsGetSetupLinkData, type DomainsGetSetupLinkError, type DomainsGetSetupLinkErrors, type DomainsGetSetupLinkResponse, type DomainsGetSetupLinkResponses, type DomainsListData, type DomainsListError, type DomainsListErrors, type DomainsListResponse, type DomainsListResponses, type DomainsUpdateData, type DomainsUpdateError, type DomainsUpdateErrors, type DomainsUpdateResponse, type DomainsUpdateResponses, type DomainsVerifyData, type DomainsVerifyError, type DomainsVerifyErrors, type DomainsVerifyResponse, type DomainsVerifyResponses, type DomainsZoneFileData, type DomainsZoneFileError, type DomainsZoneFileErrors, type DomainsZoneFileResponse, type DomainsZoneFileResponses, type Draft, type DraftsCancelScheduleData, type DraftsCancelScheduleError, type DraftsCancelScheduleErrors, type DraftsCancelScheduleResponse, type DraftsCancelScheduleResponses, type DraftsCreateData, type DraftsCreateError, type DraftsCreateErrors, type DraftsCreateResponse, type DraftsCreateResponses, type DraftsDeleteData, type DraftsDeleteError, type DraftsDeleteErrors, type DraftsDeleteResponse, type DraftsDeleteResponses, type DraftsGetData, type DraftsGetError, type DraftsGetErrors, type DraftsGetResponse, type DraftsGetResponses, type DraftsListData, type DraftsListError, type DraftsListErrors, type DraftsListResponse, type DraftsListResponses, type DraftsRemoveAttachmentData, type DraftsRemoveAttachmentError, type DraftsRemoveAttachmentErrors, type DraftsRemoveAttachmentResponse, type DraftsRemoveAttachmentResponses, type DraftsScheduleData, type DraftsScheduleError, type DraftsScheduleErrors, type DraftsScheduleResponse, type DraftsScheduleResponses, type DraftsSendData, type DraftsSendError, type DraftsSendErrors, type DraftsSendResponse, type DraftsSendResponses, type DraftsUpdateData, type DraftsUpdateError, type DraftsUpdateErrors, type DraftsUpdateResponse, type DraftsUpdateResponses, type Emptied, type Error, type Event, type EventResponse, type EventsGetData, type EventsGetError, type EventsGetErrors, type EventsGetResponse, type EventsGetResponses, type EventsListData, type EventsListError, type EventsListErrors, type EventsListResponse, type EventsListResponses, type EventsStreamData, type EventsStreamError, type EventsStreamErrors, type EventsStreamResponse, type EventsStreamResponses, type IdentitiesAccessCreateData, type IdentitiesAccessCreateError, type IdentitiesAccessCreateErrors, type IdentitiesAccessCreateResponse, type IdentitiesAccessCreateResponses, type IdentitiesAccessDeleteData, type IdentitiesAccessDeleteError, type IdentitiesAccessDeleteErrors, type IdentitiesAccessDeleteResponse, type IdentitiesAccessDeleteResponses, type IdentitiesAccessGetData, type IdentitiesAccessGetError, type IdentitiesAccessGetErrors, type IdentitiesAccessGetResponse, type IdentitiesAccessGetResponses, type IdentitiesCreateData, type IdentitiesCreateError, type IdentitiesCreateErrors, type IdentitiesCreateResponse, type IdentitiesCreateResponses, type IdentitiesDeleteData, type IdentitiesDeleteError, type IdentitiesDeleteErrors, type IdentitiesDeleteResponse, type IdentitiesDeleteResponses, type IdentitiesGetData, type IdentitiesGetError, type IdentitiesGetErrors, type IdentitiesGetResponse, type IdentitiesGetResponses, type IdentitiesListData, type IdentitiesListError, type IdentitiesListErrors, type IdentitiesListResponse, type IdentitiesListResponses, type IdentitiesReceiveRulesCreateData, type IdentitiesReceiveRulesCreateError, type IdentitiesReceiveRulesCreateErrors, type IdentitiesReceiveRulesCreateResponse, type IdentitiesReceiveRulesCreateResponses, type IdentitiesReceiveRulesDeleteData, type IdentitiesReceiveRulesDeleteError, type IdentitiesReceiveRulesDeleteErrors, type IdentitiesReceiveRulesDeleteResponse, type IdentitiesReceiveRulesDeleteResponses, type IdentitiesReceiveRulesGetData, type IdentitiesReceiveRulesGetError, type IdentitiesReceiveRulesGetErrors, type IdentitiesReceiveRulesGetResponse, type IdentitiesReceiveRulesGetResponses, type IdentitiesSendRulesCreateData, type IdentitiesSendRulesCreateError, type IdentitiesSendRulesCreateErrors, type IdentitiesSendRulesCreateResponse, type IdentitiesSendRulesCreateResponses, type IdentitiesSendRulesDeleteData, type IdentitiesSendRulesDeleteError, type IdentitiesSendRulesDeleteErrors, type IdentitiesSendRulesDeleteResponse, type IdentitiesSendRulesDeleteResponses, type IdentitiesSendRulesGetData, type IdentitiesSendRulesGetError, type IdentitiesSendRulesGetErrors, type IdentitiesSendRulesGetResponse, type IdentitiesSendRulesGetResponses, type IdentitiesSuspendTenantData, type IdentitiesSuspendTenantError, type IdentitiesSuspendTenantErrors, type IdentitiesSuspendTenantResponse, type IdentitiesSuspendTenantResponses, type IdentitiesUpdateData, type IdentitiesUpdateError, type IdentitiesUpdateErrors, type IdentitiesUpdateResponse, type IdentitiesUpdateResponses, type Identity, type Invitation, type InvitationResponse, type KeysCreateData, type KeysCreateError, type KeysCreateErrors, type KeysCreateResponse, type KeysCreateResponses, type KeysGetData, type KeysGetError, type KeysGetErrors, type KeysGetResponse, type KeysGetResponses, type KeysListData, type KeysListError, type KeysListErrors, type KeysListResponse, type KeysListResponses, type KeysRevokeData, type KeysRevokeError, type KeysRevokeErrors, type KeysRevokeResponse, type KeysRevokeResponses, type KeysUpdateData, type KeysUpdateError, type KeysUpdateErrors, type KeysUpdateResponse, type KeysUpdateResponses, type Label, type LabelRemoved, type LabelsCreateData, type LabelsCreateError, type LabelsCreateErrors, type LabelsCreateResponse, type LabelsCreateResponses, type LabelsDeleteData, type LabelsDeleteError, type LabelsDeleteErrors, type LabelsDeleteResponse, type LabelsDeleteResponses, type LabelsListData, type LabelsListError, type LabelsListErrors, type LabelsListResponse, type LabelsListResponses, type LabelsUpdateData, type LabelsUpdateError, type LabelsUpdateErrors, type LabelsUpdateResponse, type LabelsUpdateResponses, type Mailbox, type MailboxAccess, type MailboxChange, type MailboxesChangesData, type MailboxesChangesError, type MailboxesChangesErrors, type MailboxesChangesResponse, type MailboxesChangesResponses, type MailboxesEmptyTrashData, type MailboxesEmptyTrashError, type MailboxesEmptyTrashErrors, type MailboxesEmptyTrashResponse, type MailboxesEmptyTrashResponses, type MailboxesListData, type MailboxesListError, type MailboxesListErrors, type MailboxesListFolderData, type MailboxesListFolderError, type MailboxesListFolderErrors, type MailboxesListFolderResponse, type MailboxesListFolderResponses, type MailboxesListResponse, type MailboxesListResponses, type Me, type MeGetData, type MeGetError, type MeGetErrors, type MeGetResponse, type MeGetResponses, type Member, type Message, type MessageListItem, type MessagesActData, type MessagesActError, type MessagesActErrors, type MessagesActResponse, type MessagesActResponses, type MessagesForwardData, type MessagesForwardError, type MessagesForwardErrors, type MessagesForwardResponse, type MessagesForwardResponses, type MessagesGetData, type MessagesGetError, type MessagesGetErrors, type MessagesGetResponse, type MessagesGetResponses, type MessagesListInThreadData, type MessagesListInThreadError, type MessagesListInThreadErrors, type MessagesListInThreadResponse, type MessagesListInThreadResponses, type MessagesRawData, type MessagesRawError, type MessagesRawErrors, type MessagesRawResponse, type MessagesRawResponses, type MessagesReplyAllData, type MessagesReplyAllError, type MessagesReplyAllErrors, type MessagesReplyAllResponse, type MessagesReplyAllResponses, type MessagesReplyData, type MessagesReplyError, type MessagesReplyErrors, type MessagesReplyResponse, type MessagesReplyResponses, type MessagesRespondToInvitationData, type MessagesRespondToInvitationError, type MessagesRespondToInvitationErrors, type MessagesRespondToInvitationResponse, type MessagesRespondToInvitationResponses, type MessagesSearchData, type MessagesSearchError, type MessagesSearchErrors, type MessagesSearchResponse, type MessagesSearchResponses, type MessagesSendData, type MessagesSendError, type MessagesSendErrors, type MessagesSendResponse, type MessagesSendResponses, type MessagesUndoData, type MessagesUndoError, type MessagesUndoErrors, type MessagesUndoResponse, type MessagesUndoResponses, type MessagesUpdateData, type MessagesUpdateError, type MessagesUpdateErrors, type MessagesUpdateResponse, type MessagesUpdateResponses, type Metrics, type MetricsQueryData, type MetricsQueryError, type MetricsQueryErrors, type MetricsQueryResponse, type MetricsQueryResponses, type Options, type ReceiveRuleRemoved, type ReceiveRules, type Replayed, type Restored, type Revoked, type RoutingCreateData, type RoutingCreateError, type RoutingCreateErrors, type RoutingCreateResponse, type RoutingCreateResponses, type RoutingDeleteData, type RoutingDeleteError, type RoutingDeleteErrors, type RoutingDeleteResponse, type RoutingDeleteResponses, type RoutingListData, type RoutingListError, type RoutingListErrors, type RoutingListResponse, type RoutingListResponses, type RoutingRule, type RoutingUpdateData, type RoutingUpdateError, type RoutingUpdateErrors, type RoutingUpdateResponse, type RoutingUpdateResponses, SIGNATURE_HEADER, type SearchHit, type SendRuleRemoved, type SendRules, type Sent, type SetupLink, type StreamOptions, type StreamedEvent, TIMESTAMP_HEADER, type TenantSuspended, type Thread, type ThreadsGetData, type ThreadsGetError, type ThreadsGetErrors, type ThreadsGetResponse, type ThreadsGetResponses, type ThreadsLabelsCreateData, type ThreadsLabelsCreateError, type ThreadsLabelsCreateErrors, type ThreadsLabelsCreateResponse, type ThreadsLabelsCreateResponses, type ThreadsLabelsDeleteData, type ThreadsLabelsDeleteError, type ThreadsLabelsDeleteErrors, type ThreadsLabelsDeleteResponse, type ThreadsLabelsDeleteResponses, type ThreadsLabelsGetData, type ThreadsLabelsGetError, type ThreadsLabelsGetErrors, type ThreadsLabelsGetResponse, type ThreadsLabelsGetResponses, type ThreadsListData, type ThreadsListError, type ThreadsListErrors, type ThreadsListResponse, type ThreadsListResponses, type ThreadsUpdateData, type ThreadsUpdateError, type ThreadsUpdateErrors, type ThreadsUpdateResponse, type ThreadsUpdateResponses, type Undo, type UploadedAttachment, type Verification, type Webhook, type WebhookCreated, type WebhookEnvelope, type WebhookHeaders, type WebhooksCreateData, type WebhooksCreateError, type WebhooksCreateErrors, type WebhooksCreateResponse, type WebhooksCreateResponses, type WebhooksDeleteData, type WebhooksDeleteError, type WebhooksDeleteErrors, type WebhooksDeleteResponse, type WebhooksDeleteResponses, type WebhooksDeliveriesData, type WebhooksDeliveriesError, type WebhooksDeliveriesErrors, type WebhooksDeliveriesResponse, type WebhooksDeliveriesResponses, type WebhooksGetData, type WebhooksGetError, type WebhooksGetErrors, type WebhooksGetHeadersData, type WebhooksGetHeadersError, type WebhooksGetHeadersErrors, type WebhooksGetHeadersResponse, type WebhooksGetHeadersResponses, type WebhooksGetResponse, type WebhooksGetResponses, type WebhooksListData, type WebhooksListError, type WebhooksListErrors, type WebhooksListResponse, type WebhooksListResponses, type WebhooksReplayData, type WebhooksReplayError, type WebhooksReplayErrors, type WebhooksReplayResponse, type WebhooksReplayResponses, type WebhooksUpdateData, type WebhooksUpdateError, type WebhooksUpdateErrors, type WebhooksUpdateHeadersData, type WebhooksUpdateHeadersError, type WebhooksUpdateHeadersErrors, type WebhooksUpdateHeadersResponse, type WebhooksUpdateHeadersResponses, type WebhooksUpdateResponse, type WebhooksUpdateResponses, type Workspace, type WorkspaceGetData, type WorkspaceGetError, type WorkspaceGetErrors, type WorkspaceGetResponse, type WorkspaceGetResponses, type WorkspaceMembersData, type WorkspaceMembersError, type WorkspaceMembersErrors, type WorkspaceMembersResponse, type WorkspaceMembersResponses, agentAttachHuman, agentSignUp, agentVerify, appPasswordsCreate, appPasswordsList, appPasswordsRevoke, attachmentsDownloadUrl, attachmentsUpload, calendarCreateEvent, calendarDeleteEvent, calendarGet, calendarGetAgenda, calendarGetEvent, calendarListEventInstances, calendarListEvents, calendarRespondToEvent, calendarUpdate, calendarUpdateEvent, client, createClient, createConfig, domainsCreate, domainsDelete, domainsGet, domainsGetSetupLink, domainsList, domainsUpdate, domainsVerify, domainsZoneFile, draftsCancelSchedule, draftsCreate, draftsDelete, draftsGet, draftsList, draftsRemoveAttachment, draftsSchedule, draftsSend, draftsUpdate, eventsGet, eventsList, eventsStream, identitiesAccessCreate, identitiesAccessDelete, identitiesAccessGet, identitiesCreate, identitiesDelete, identitiesGet, identitiesList, identitiesReceiveRulesCreate, identitiesReceiveRulesDelete, identitiesReceiveRulesGet, identitiesSendRulesCreate, identitiesSendRulesDelete, identitiesSendRulesGet, identitiesSuspendTenant, identitiesUpdate, keysCreate, keysGet, keysList, keysRevoke, keysUpdate, labelsCreate, labelsDelete, labelsList, labelsUpdate, mailboxesChanges, mailboxesEmptyTrash, mailboxesList, mailboxesListFolder, meGet, messagesAct, messagesForward, messagesGet, messagesListInThread, messagesRaw, messagesReply, messagesReplyAll, messagesRespondToInvitation, messagesSearch, messagesSend, messagesUndo, messagesUpdate, metricsQuery, routingCreate, routingDelete, routingList, routingUpdate, streamEvents, threadsGet, threadsLabelsCreate, threadsLabelsDelete, threadsLabelsGet, threadsList, threadsUpdate, verifyWebhook, webhooksCreate, webhooksDelete, webhooksDeliveries, webhooksGet, webhooksGetHeaders, webhooksList, webhooksReplay, webhooksUpdate, webhooksUpdateHeaders, workspaceGet, workspaceMembers };