agentmail 0.5.41 → 0.5.43
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/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/calendar/types/UpdateCalendarEventRequest.d.ts +2 -1
- package/dist/cjs/api/resources/inboxes/resources/calendar/client/Client.d.ts +21 -21
- package/dist/cjs/api/resources/inboxes/resources/calendar/client/Client.js +21 -21
- package/dist/cjs/api/resources/inboxes/resources/webhooks/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/client/Client.js +5 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/exports.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/exports.js +1 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/index.js +1 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/index.js +41 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/Client.d.ts +89 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/Client.js +351 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/InboxListPollingWebhooksRequest.d.ts +10 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/InboxListPollingWebhooksRequest.js +3 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/exports.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/exports.js +21 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/index.js +17 -0
- package/dist/cjs/api/resources/messages/types/Message.d.ts +1 -0
- package/dist/cjs/api/resources/messages/types/MessageCalendarEventId.d.ts +8 -0
- package/dist/cjs/api/resources/messages/types/MessageCalendarEventId.js +3 -0
- package/dist/cjs/api/resources/messages/types/MessageItem.d.ts +1 -0
- package/dist/cjs/api/resources/messages/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/types/index.js +1 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/client/Client.js +5 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/exports.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/exports.js +1 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/index.js +1 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/index.js +41 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/Client.d.ts +89 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/Client.js +351 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/index.js +17 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/requests/PodListPollingWebhooksRequest.d.ts +10 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/requests/PodListPollingWebhooksRequest.js +3 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/exports.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/exports.js +21 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/index.js +17 -0
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/webhooks/client/Client.js +5 -0
- package/dist/cjs/api/resources/webhooks/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/webhooks/resources/index.js +4 -1
- package/dist/cjs/api/resources/webhooks/resources/polling/client/Client.d.ts +92 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/client/Client.js +354 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/client/index.js +17 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/client/requests/ListPollingWebhooksRequest.d.ts +10 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/client/requests/ListPollingWebhooksRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/exports.d.ts +2 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/exports.js +21 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/index.d.ts +2 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/index.js +18 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.d.ts +9 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.d.ts +9 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.d.ts +9 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.d.ts +7 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.js +3 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.d.ts +12 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.js +3 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingClientId.d.ts +7 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingClientId.js +3 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingToken.d.ts +8 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingToken.js +3 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingWebhook.d.ts +27 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingWebhook.js +3 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/index.d.ts +8 -0
- package/dist/cjs/api/resources/webhooks/resources/polling/types/index.js +24 -0
- package/dist/cjs/serialization/resources/messages/types/Message.d.ts +2 -0
- package/dist/cjs/serialization/resources/messages/types/Message.js +2 -0
- package/dist/cjs/serialization/resources/messages/types/MessageCalendarEventId.d.ts +7 -0
- package/dist/cjs/serialization/resources/messages/types/MessageCalendarEventId.js +39 -0
- package/dist/cjs/serialization/resources/messages/types/MessageItem.d.ts +2 -0
- package/dist/cjs/serialization/resources/messages/types/MessageItem.js +2 -0
- package/dist/cjs/serialization/resources/messages/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/messages/types/index.js +1 -0
- package/dist/cjs/serialization/resources/webhooks/resources/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/webhooks/resources/index.js +3 -1
- package/dist/cjs/serialization/resources/webhooks/resources/polling/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/index.js +17 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.d.ts +12 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.js +44 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.d.ts +11 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.js +45 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.d.ts +11 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.js +45 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.d.ts +11 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.js +45 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.d.ts +16 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.js +48 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingClientId.d.ts +8 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingClientId.js +6 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingToken.d.ts +7 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingToken.js +39 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingWebhook.d.ts +22 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingWebhook.js +54 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/index.d.ts +8 -0
- package/dist/cjs/serialization/resources/webhooks/resources/polling/types/index.js +24 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/calendar/types/UpdateCalendarEventRequest.d.mts +2 -1
- package/dist/esm/api/resources/inboxes/resources/calendar/client/Client.d.mts +21 -21
- package/dist/esm/api/resources/inboxes/resources/calendar/client/Client.mjs +21 -21
- package/dist/esm/api/resources/inboxes/resources/webhooks/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/client/Client.mjs +5 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/exports.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/exports.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/index.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/Client.d.mts +89 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/Client.mjs +314 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/InboxListPollingWebhooksRequest.d.mts +10 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/InboxListPollingWebhooksRequest.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/exports.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/exports.mjs +3 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/index.mjs +1 -0
- package/dist/esm/api/resources/messages/types/Message.d.mts +1 -0
- package/dist/esm/api/resources/messages/types/MessageCalendarEventId.d.mts +8 -0
- package/dist/esm/api/resources/messages/types/MessageCalendarEventId.mjs +2 -0
- package/dist/esm/api/resources/messages/types/MessageItem.d.mts +1 -0
- package/dist/esm/api/resources/messages/types/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/types/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/pods/resources/webhooks/client/Client.mjs +5 -0
- package/dist/esm/api/resources/pods/resources/webhooks/exports.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/exports.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/index.mjs +2 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/Client.d.mts +89 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/Client.mjs +314 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/requests/PodListPollingWebhooksRequest.d.mts +10 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/requests/PodListPollingWebhooksRequest.mjs +2 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/exports.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/exports.mjs +3 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/index.mjs +1 -0
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/webhooks/client/Client.mjs +5 -0
- package/dist/esm/api/resources/webhooks/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/webhooks/resources/index.mjs +3 -0
- package/dist/esm/api/resources/webhooks/resources/polling/client/Client.d.mts +92 -0
- package/dist/esm/api/resources/webhooks/resources/polling/client/Client.mjs +317 -0
- package/dist/esm/api/resources/webhooks/resources/polling/client/index.d.mts +1 -0
- package/dist/esm/api/resources/webhooks/resources/polling/client/index.mjs +1 -0
- package/dist/esm/api/resources/webhooks/resources/polling/client/requests/ListPollingWebhooksRequest.d.mts +10 -0
- package/dist/esm/api/resources/webhooks/resources/polling/client/requests/ListPollingWebhooksRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/webhooks/resources/polling/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/webhooks/resources/polling/exports.d.mts +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/exports.mjs +3 -0
- package/dist/esm/api/resources/webhooks/resources/polling/index.d.mts +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/index.mjs +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.d.mts +9 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.d.mts +9 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.d.mts +9 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.d.mts +7 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.mjs +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.d.mts +12 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.mjs +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/PollingClientId.d.mts +7 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/PollingClientId.mjs +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/PollingToken.d.mts +8 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/PollingToken.mjs +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/PollingWebhook.d.mts +27 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/PollingWebhook.mjs +2 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/index.d.mts +8 -0
- package/dist/esm/api/resources/webhooks/resources/polling/types/index.mjs +8 -0
- package/dist/esm/serialization/resources/messages/types/Message.d.mts +2 -0
- package/dist/esm/serialization/resources/messages/types/Message.mjs +2 -0
- package/dist/esm/serialization/resources/messages/types/MessageCalendarEventId.d.mts +7 -0
- package/dist/esm/serialization/resources/messages/types/MessageCalendarEventId.mjs +3 -0
- package/dist/esm/serialization/resources/messages/types/MessageItem.d.mts +2 -0
- package/dist/esm/serialization/resources/messages/types/MessageItem.mjs +2 -0
- package/dist/esm/serialization/resources/messages/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/messages/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/webhooks/resources/index.d.mts +2 -0
- package/dist/esm/serialization/resources/webhooks/resources/index.mjs +2 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/index.d.mts +1 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/index.mjs +1 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.d.mts +12 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.mjs +8 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.d.mts +11 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.mjs +9 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.d.mts +11 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.mjs +9 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.d.mts +11 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.mjs +9 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.d.mts +16 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.mjs +12 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingClientId.d.mts +8 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingClientId.mjs +3 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingToken.d.mts +7 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingToken.mjs +3 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingWebhook.d.mts +22 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingWebhook.mjs +18 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/index.d.mts +8 -0
- package/dist/esm/serialization/resources/webhooks/resources/polling/types/index.mjs +8 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +34 -1
- package/reference.md +1462 -575
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
import * as serializers from "../../../../../../serialization/index.mjs";
|
|
18
|
+
import * as AgentMail from "../../../../../index.mjs";
|
|
19
|
+
export class PollingClient {
|
|
20
|
+
constructor(options = {}) {
|
|
21
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Lists the polling webhooks created through this route. `page_token` must come from this
|
|
25
|
+
* endpoint; a token from another list endpoint is rejected.
|
|
26
|
+
*
|
|
27
|
+
* **CLI:**
|
|
28
|
+
* ```bash
|
|
29
|
+
* agentmail webhooks polling list
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @param {AgentMail.webhooks.ListPollingWebhooksRequest} request
|
|
33
|
+
* @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
+
*
|
|
35
|
+
* @throws {@link AgentMail.ValidationError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.webhooks.polling.list()
|
|
39
|
+
*/
|
|
40
|
+
list(request = {}, requestOptions) {
|
|
41
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
42
|
+
}
|
|
43
|
+
__list() {
|
|
44
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
46
|
+
const { limit, pageToken, ascending } = request;
|
|
47
|
+
const _queryParams = {
|
|
48
|
+
limit,
|
|
49
|
+
page_token: pageToken,
|
|
50
|
+
ascending,
|
|
51
|
+
};
|
|
52
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
53
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
54
|
+
const _response = yield core.fetcher({
|
|
55
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
|
|
56
|
+
.http, "/v0/webhooks/polling"),
|
|
57
|
+
method: "GET",
|
|
58
|
+
headers: _headers,
|
|
59
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
60
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
61
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
62
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
63
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
64
|
+
logging: this._options.logging,
|
|
65
|
+
});
|
|
66
|
+
if (_response.ok) {
|
|
67
|
+
return {
|
|
68
|
+
data: serializers.webhooks.ListPollingWebhooksResponse.parseOrThrow(_response.body, {
|
|
69
|
+
unrecognizedObjectKeys: "passthrough",
|
|
70
|
+
allowUnrecognizedUnionMembers: true,
|
|
71
|
+
allowUnrecognizedEnumValues: true,
|
|
72
|
+
skipValidation: true,
|
|
73
|
+
breadcrumbsPrefix: ["response"],
|
|
74
|
+
}),
|
|
75
|
+
rawResponse: _response.rawResponse,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (_response.error.reason === "status-code") {
|
|
79
|
+
switch (_response.error.statusCode) {
|
|
80
|
+
case 400:
|
|
81
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
82
|
+
unrecognizedObjectKeys: "passthrough",
|
|
83
|
+
allowUnrecognizedUnionMembers: true,
|
|
84
|
+
allowUnrecognizedEnumValues: true,
|
|
85
|
+
skipValidation: true,
|
|
86
|
+
breadcrumbsPrefix: ["response"],
|
|
87
|
+
}), _response.rawResponse);
|
|
88
|
+
default:
|
|
89
|
+
throw new errors.AgentMailError({
|
|
90
|
+
statusCode: _response.error.statusCode,
|
|
91
|
+
body: _response.error.body,
|
|
92
|
+
rawResponse: _response.rawResponse,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/webhooks/polling");
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The `token` is never returned here: create again with the same `client_id` to get a new one.
|
|
101
|
+
*
|
|
102
|
+
* **CLI:**
|
|
103
|
+
* ```bash
|
|
104
|
+
* agentmail webhooks polling get --webhook-id <webhook_id>
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* @param {AgentMail.webhooks.WebhookId} webhook_id
|
|
108
|
+
* @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
109
|
+
*
|
|
110
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* await client.webhooks.polling.get("webhook_id")
|
|
114
|
+
*/
|
|
115
|
+
get(webhook_id, requestOptions) {
|
|
116
|
+
return core.HttpResponsePromise.fromPromise(this.__get(webhook_id, requestOptions));
|
|
117
|
+
}
|
|
118
|
+
__get(webhook_id, requestOptions) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
121
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
122
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
123
|
+
const _response = yield core.fetcher({
|
|
124
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
|
|
125
|
+
.http, `/v0/webhooks/polling/${core.url.encodePathParam(serializers.webhooks.WebhookId.jsonOrThrow(webhook_id, { omitUndefined: true }))}`),
|
|
126
|
+
method: "GET",
|
|
127
|
+
headers: _headers,
|
|
128
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
129
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
130
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
131
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
132
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
133
|
+
logging: this._options.logging,
|
|
134
|
+
});
|
|
135
|
+
if (_response.ok) {
|
|
136
|
+
return {
|
|
137
|
+
data: serializers.webhooks.PollingWebhook.parseOrThrow(_response.body, {
|
|
138
|
+
unrecognizedObjectKeys: "passthrough",
|
|
139
|
+
allowUnrecognizedUnionMembers: true,
|
|
140
|
+
allowUnrecognizedEnumValues: true,
|
|
141
|
+
skipValidation: true,
|
|
142
|
+
breadcrumbsPrefix: ["response"],
|
|
143
|
+
}),
|
|
144
|
+
rawResponse: _response.rawResponse,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
if (_response.error.reason === "status-code") {
|
|
148
|
+
switch (_response.error.statusCode) {
|
|
149
|
+
case 404:
|
|
150
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
151
|
+
unrecognizedObjectKeys: "passthrough",
|
|
152
|
+
allowUnrecognizedUnionMembers: true,
|
|
153
|
+
allowUnrecognizedEnumValues: true,
|
|
154
|
+
skipValidation: true,
|
|
155
|
+
breadcrumbsPrefix: ["response"],
|
|
156
|
+
}), _response.rawResponse);
|
|
157
|
+
default:
|
|
158
|
+
throw new errors.AgentMailError({
|
|
159
|
+
statusCode: _response.error.statusCode,
|
|
160
|
+
body: _response.error.body,
|
|
161
|
+
rawResponse: _response.rawResponse,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/webhooks/polling/{webhook_id}");
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Creates a subscription the agent polls for events, and returns the `token` that reads it. Each
|
|
170
|
+
* organization, pod, and inbox holds at most 10 polling webhooks; a repeat create with the same
|
|
171
|
+
* `client_id` re-issues the token of the existing one instead of counting against that limit.
|
|
172
|
+
*
|
|
173
|
+
* **CLI:**
|
|
174
|
+
* ```bash
|
|
175
|
+
* agentmail webhooks polling create --client-id my-agent --event-types message.received
|
|
176
|
+
* ```
|
|
177
|
+
*
|
|
178
|
+
* @param {AgentMail.webhooks.CreatePollingWebhookRequest} request
|
|
179
|
+
* @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
180
|
+
*
|
|
181
|
+
* @throws {@link AgentMail.ValidationError}
|
|
182
|
+
* @throws {@link AgentMail.ConflictError}
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* await client.webhooks.polling.create({
|
|
186
|
+
* clientId: "client_id",
|
|
187
|
+
* eventTypes: ["message.received", "message.received"]
|
|
188
|
+
* })
|
|
189
|
+
*/
|
|
190
|
+
create(request, requestOptions) {
|
|
191
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
192
|
+
}
|
|
193
|
+
__create(request, requestOptions) {
|
|
194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
196
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
197
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
198
|
+
const _response = yield core.fetcher({
|
|
199
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
|
|
200
|
+
.http, "/v0/webhooks/polling"),
|
|
201
|
+
method: "POST",
|
|
202
|
+
headers: _headers,
|
|
203
|
+
contentType: "application/json",
|
|
204
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
205
|
+
requestType: "json",
|
|
206
|
+
body: serializers.webhooks.CreatePollingWebhookRequest.jsonOrThrow(request, {
|
|
207
|
+
unrecognizedObjectKeys: "strip",
|
|
208
|
+
omitUndefined: true,
|
|
209
|
+
}),
|
|
210
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
211
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
212
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
213
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
214
|
+
logging: this._options.logging,
|
|
215
|
+
});
|
|
216
|
+
if (_response.ok) {
|
|
217
|
+
return {
|
|
218
|
+
data: serializers.webhooks.CreatePollingWebhookResponse.parseOrThrow(_response.body, {
|
|
219
|
+
unrecognizedObjectKeys: "passthrough",
|
|
220
|
+
allowUnrecognizedUnionMembers: true,
|
|
221
|
+
allowUnrecognizedEnumValues: true,
|
|
222
|
+
skipValidation: true,
|
|
223
|
+
breadcrumbsPrefix: ["response"],
|
|
224
|
+
}),
|
|
225
|
+
rawResponse: _response.rawResponse,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
if (_response.error.reason === "status-code") {
|
|
229
|
+
switch (_response.error.statusCode) {
|
|
230
|
+
case 400:
|
|
231
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
232
|
+
unrecognizedObjectKeys: "passthrough",
|
|
233
|
+
allowUnrecognizedUnionMembers: true,
|
|
234
|
+
allowUnrecognizedEnumValues: true,
|
|
235
|
+
skipValidation: true,
|
|
236
|
+
breadcrumbsPrefix: ["response"],
|
|
237
|
+
}), _response.rawResponse);
|
|
238
|
+
case 409:
|
|
239
|
+
throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
240
|
+
unrecognizedObjectKeys: "passthrough",
|
|
241
|
+
allowUnrecognizedUnionMembers: true,
|
|
242
|
+
allowUnrecognizedEnumValues: true,
|
|
243
|
+
skipValidation: true,
|
|
244
|
+
breadcrumbsPrefix: ["response"],
|
|
245
|
+
}), _response.rawResponse);
|
|
246
|
+
default:
|
|
247
|
+
throw new errors.AgentMailError({
|
|
248
|
+
statusCode: _response.error.statusCode,
|
|
249
|
+
body: _response.error.body,
|
|
250
|
+
rawResponse: _response.rawResponse,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/webhooks/polling");
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Stops delivery and invalidates the subscription's token.
|
|
259
|
+
*
|
|
260
|
+
* **CLI:**
|
|
261
|
+
* ```bash
|
|
262
|
+
* agentmail webhooks polling delete --webhook-id <webhook_id>
|
|
263
|
+
* ```
|
|
264
|
+
*
|
|
265
|
+
* @param {AgentMail.webhooks.WebhookId} webhook_id
|
|
266
|
+
* @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
267
|
+
*
|
|
268
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
269
|
+
*
|
|
270
|
+
* @example
|
|
271
|
+
* await client.webhooks.polling.delete("webhook_id")
|
|
272
|
+
*/
|
|
273
|
+
delete(webhook_id, requestOptions) {
|
|
274
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(webhook_id, requestOptions));
|
|
275
|
+
}
|
|
276
|
+
__delete(webhook_id, requestOptions) {
|
|
277
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
279
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
280
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
281
|
+
const _response = yield core.fetcher({
|
|
282
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
|
|
283
|
+
.http, `/v0/webhooks/polling/${core.url.encodePathParam(serializers.webhooks.WebhookId.jsonOrThrow(webhook_id, { omitUndefined: true }))}`),
|
|
284
|
+
method: "DELETE",
|
|
285
|
+
headers: _headers,
|
|
286
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
287
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
288
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
289
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
290
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
291
|
+
logging: this._options.logging,
|
|
292
|
+
});
|
|
293
|
+
if (_response.ok) {
|
|
294
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
295
|
+
}
|
|
296
|
+
if (_response.error.reason === "status-code") {
|
|
297
|
+
switch (_response.error.statusCode) {
|
|
298
|
+
case 404:
|
|
299
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
300
|
+
unrecognizedObjectKeys: "passthrough",
|
|
301
|
+
allowUnrecognizedUnionMembers: true,
|
|
302
|
+
allowUnrecognizedEnumValues: true,
|
|
303
|
+
skipValidation: true,
|
|
304
|
+
breadcrumbsPrefix: ["response"],
|
|
305
|
+
}), _response.rawResponse);
|
|
306
|
+
default:
|
|
307
|
+
throw new errors.AgentMailError({
|
|
308
|
+
statusCode: _response.error.statusCode,
|
|
309
|
+
body: _response.error.body,
|
|
310
|
+
rawResponse: _response.rawResponse,
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/webhooks/polling/{webhook_id}");
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ListPollingWebhooksRequest } from "./ListPollingWebhooksRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Create a polling webhook scoped to an inbox. The inbox comes from the path, so `inbox_ids` and
|
|
4
|
+
* `pod_ids` are not accepted.
|
|
5
|
+
*/
|
|
6
|
+
export interface CreateInboxPollingWebhookRequest {
|
|
7
|
+
clientId: AgentMail.webhooks.PollingClientId;
|
|
8
|
+
eventTypes: AgentMail.webhooks.CreateWebhookEventTypes;
|
|
9
|
+
}
|
package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Create a polling webhook scoped to a pod. The pod comes from the path, so `pod_ids` is not accepted.
|
|
4
|
+
* Optionally pass `inbox_ids` to narrow the subscription to specific inboxes within the pod; omit to
|
|
5
|
+
* receive events for the whole pod.
|
|
6
|
+
*/
|
|
7
|
+
export interface CreatePodPollingWebhookRequest extends AgentMail.webhooks.CreateInboxPollingWebhookRequest {
|
|
8
|
+
inboxIds?: AgentMail.InboxIds;
|
|
9
|
+
}
|
package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../../index.mjs";
|
|
2
|
+
export interface CreatePollingWebhookRequest extends AgentMail.webhooks.CreatePodPollingWebhookRequest {
|
|
3
|
+
/**
|
|
4
|
+
* Pods for which to receive events. Maximum 10 channels (pods plus inboxes) per subscription. The
|
|
5
|
+
* subscription receives an event that matches any listed pod or inbox, so a listed pod already
|
|
6
|
+
* covers every inbox in it.
|
|
7
|
+
*/
|
|
8
|
+
podIds?: AgentMail.PodIds;
|
|
9
|
+
}
|
package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.d.mts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* The subscription plus the one-time `token` that reads it.
|
|
4
|
+
*/
|
|
5
|
+
export interface CreatePollingWebhookResponse extends AgentMail.webhooks.PollingWebhook {
|
|
6
|
+
token: AgentMail.webhooks.PollingToken;
|
|
7
|
+
}
|
package/dist/esm/api/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.d.mts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../../index.mjs";
|
|
2
|
+
export interface ListPollingWebhooksResponse {
|
|
3
|
+
count: AgentMail.Count;
|
|
4
|
+
limit?: AgentMail.Limit;
|
|
5
|
+
nextPageToken?: AgentMail.PageToken;
|
|
6
|
+
/**
|
|
7
|
+
* Ordered by `created_at` descending. Lists the subscriptions created through this route
|
|
8
|
+
* (organization, pod, or inbox); subscriptions created through a pod or inbox route are listed
|
|
9
|
+
* through that route.
|
|
10
|
+
*/
|
|
11
|
+
pollingWebhooks: AgentMail.webhooks.PollingWebhook[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Required. Idempotency key of the subscription: creating again with the same `client_id` through the
|
|
4
|
+
* same route returns the existing subscription with a fresh token instead of a second subscription, so a
|
|
5
|
+
* restarted agent resumes where it left off. Also accepted in place of `webhook_id` on get and delete.
|
|
6
|
+
*/
|
|
7
|
+
export type PollingClientId = AgentMail.webhooks.ClientId;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credential for reading this subscription's events. Hand it to the Svix AutoConfig consumer
|
|
3
|
+
* (`AutoConfigConsumer` in the `svix` package for TypeScript and Python): `receive` returns the events
|
|
4
|
+
* queued since your last commit, `commit` marks them as processed. Returned by create only and never
|
|
5
|
+
* readable afterward. Create again with the same `client_id` to get a new token; the previous one stops
|
|
6
|
+
* working immediately.
|
|
7
|
+
*/
|
|
8
|
+
export type PollingToken = string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* A subscription the agent polls for events instead of receiving them at a URL. Same event types,
|
|
4
|
+
* channels (pods and inboxes) and permissions as a webhook; no public endpoint is needed.
|
|
5
|
+
*/
|
|
6
|
+
export interface PollingWebhook {
|
|
7
|
+
webhookId: AgentMail.webhooks.WebhookId;
|
|
8
|
+
clientId: AgentMail.webhooks.PollingClientId;
|
|
9
|
+
eventTypes: AgentMail.EventTypes;
|
|
10
|
+
podIds?: AgentMail.PodIds;
|
|
11
|
+
inboxIds?: AgentMail.InboxIds;
|
|
12
|
+
/**
|
|
13
|
+
* ID of the pod the subscription belongs to: the pod it was created in, or the pod of the inbox it
|
|
14
|
+
* belongs to. Absent for an organization subscription. This is not the list of pods it receives
|
|
15
|
+
* events for; see `pod_ids`.
|
|
16
|
+
*/
|
|
17
|
+
podId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* ID of the inbox the subscription belongs to, if it was created for an inbox. This is not the
|
|
20
|
+
* list of inboxes it receives events for; see `inbox_ids`.
|
|
21
|
+
*/
|
|
22
|
+
inboxId?: string;
|
|
23
|
+
/** Time at which the subscription was last updated. */
|
|
24
|
+
updatedAt: Date;
|
|
25
|
+
/** Time at which the subscription was created. */
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./CreateInboxPollingWebhookRequest.mjs";
|
|
2
|
+
export * from "./CreatePodPollingWebhookRequest.mjs";
|
|
3
|
+
export * from "./CreatePollingWebhookRequest.mjs";
|
|
4
|
+
export * from "./CreatePollingWebhookResponse.mjs";
|
|
5
|
+
export * from "./ListPollingWebhooksResponse.mjs";
|
|
6
|
+
export * from "./PollingClientId.mjs";
|
|
7
|
+
export * from "./PollingToken.mjs";
|
|
8
|
+
export * from "./PollingWebhook.mjs";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./CreateInboxPollingWebhookRequest.mjs";
|
|
2
|
+
export * from "./CreatePodPollingWebhookRequest.mjs";
|
|
3
|
+
export * from "./CreatePollingWebhookRequest.mjs";
|
|
4
|
+
export * from "./CreatePollingWebhookResponse.mjs";
|
|
5
|
+
export * from "./ListPollingWebhooksResponse.mjs";
|
|
6
|
+
export * from "./PollingClientId.mjs";
|
|
7
|
+
export * from "./PollingToken.mjs";
|
|
8
|
+
export * from "./PollingWebhook.mjs";
|
|
@@ -5,6 +5,7 @@ import { InboxId } from "../../inboxes/types/InboxId.mjs";
|
|
|
5
5
|
import { ThreadId } from "../../threads/types/ThreadId.mjs";
|
|
6
6
|
import { MessageAttachments } from "./MessageAttachments.mjs";
|
|
7
7
|
import { MessageBcc } from "./MessageBcc.mjs";
|
|
8
|
+
import { MessageCalendarEventId } from "./MessageCalendarEventId.mjs";
|
|
8
9
|
import { MessageCc } from "./MessageCc.mjs";
|
|
9
10
|
import { MessageCreatedAt } from "./MessageCreatedAt.mjs";
|
|
10
11
|
import { MessageFrom } from "./MessageFrom.mjs";
|
|
@@ -42,6 +43,7 @@ export declare namespace Message {
|
|
|
42
43
|
extracted_html?: string | null;
|
|
43
44
|
attachments?: MessageAttachments.Raw | null;
|
|
44
45
|
in_reply_to?: MessageInReplyTo.Raw | null;
|
|
46
|
+
calendar_event_id?: MessageCalendarEventId.Raw | null;
|
|
45
47
|
references?: MessageReferences.Raw | null;
|
|
46
48
|
headers?: MessageHeaders.Raw | null;
|
|
47
49
|
size: MessageSize.Raw;
|
|
@@ -4,6 +4,7 @@ import { InboxId } from "../../inboxes/types/InboxId.mjs";
|
|
|
4
4
|
import { ThreadId } from "../../threads/types/ThreadId.mjs";
|
|
5
5
|
import { MessageAttachments } from "./MessageAttachments.mjs";
|
|
6
6
|
import { MessageBcc } from "./MessageBcc.mjs";
|
|
7
|
+
import { MessageCalendarEventId } from "./MessageCalendarEventId.mjs";
|
|
7
8
|
import { MessageCc } from "./MessageCc.mjs";
|
|
8
9
|
import { MessageCreatedAt } from "./MessageCreatedAt.mjs";
|
|
9
10
|
import { MessageFrom } from "./MessageFrom.mjs";
|
|
@@ -39,6 +40,7 @@ export const Message = core.serialization.object({
|
|
|
39
40
|
extractedHtml: core.serialization.property("extracted_html", core.serialization.string().optional()),
|
|
40
41
|
attachments: MessageAttachments.optional(),
|
|
41
42
|
inReplyTo: core.serialization.property("in_reply_to", MessageInReplyTo.optional()),
|
|
43
|
+
calendarEventId: core.serialization.property("calendar_event_id", MessageCalendarEventId.optional()),
|
|
42
44
|
references: MessageReferences.optional(),
|
|
43
45
|
headers: MessageHeaders.optional(),
|
|
44
46
|
size: MessageSize,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
export declare const MessageCalendarEventId: core.serialization.Schema<serializers.MessageCalendarEventId.Raw, AgentMail.MessageCalendarEventId>;
|
|
5
|
+
export declare namespace MessageCalendarEventId {
|
|
6
|
+
type Raw = string;
|
|
7
|
+
}
|
|
@@ -5,6 +5,7 @@ import { InboxId } from "../../inboxes/types/InboxId.mjs";
|
|
|
5
5
|
import { ThreadId } from "../../threads/types/ThreadId.mjs";
|
|
6
6
|
import { MessageAttachments } from "./MessageAttachments.mjs";
|
|
7
7
|
import { MessageBcc } from "./MessageBcc.mjs";
|
|
8
|
+
import { MessageCalendarEventId } from "./MessageCalendarEventId.mjs";
|
|
8
9
|
import { MessageCc } from "./MessageCc.mjs";
|
|
9
10
|
import { MessageCreatedAt } from "./MessageCreatedAt.mjs";
|
|
10
11
|
import { MessageFrom } from "./MessageFrom.mjs";
|
|
@@ -35,6 +36,7 @@ export declare namespace MessageItem {
|
|
|
35
36
|
preview?: MessagePreview.Raw | null;
|
|
36
37
|
attachments?: MessageAttachments.Raw | null;
|
|
37
38
|
in_reply_to?: MessageInReplyTo.Raw | null;
|
|
39
|
+
calendar_event_id?: MessageCalendarEventId.Raw | null;
|
|
38
40
|
references?: MessageReferences.Raw | null;
|
|
39
41
|
headers?: MessageHeaders.Raw | null;
|
|
40
42
|
size: MessageSize.Raw;
|
|
@@ -4,6 +4,7 @@ import { InboxId } from "../../inboxes/types/InboxId.mjs";
|
|
|
4
4
|
import { ThreadId } from "../../threads/types/ThreadId.mjs";
|
|
5
5
|
import { MessageAttachments } from "./MessageAttachments.mjs";
|
|
6
6
|
import { MessageBcc } from "./MessageBcc.mjs";
|
|
7
|
+
import { MessageCalendarEventId } from "./MessageCalendarEventId.mjs";
|
|
7
8
|
import { MessageCc } from "./MessageCc.mjs";
|
|
8
9
|
import { MessageCreatedAt } from "./MessageCreatedAt.mjs";
|
|
9
10
|
import { MessageFrom } from "./MessageFrom.mjs";
|
|
@@ -32,6 +33,7 @@ export const MessageItem = core.serialization.object({
|
|
|
32
33
|
preview: MessagePreview.optional(),
|
|
33
34
|
attachments: MessageAttachments.optional(),
|
|
34
35
|
inReplyTo: core.serialization.property("in_reply_to", MessageInReplyTo.optional()),
|
|
36
|
+
calendarEventId: core.serialization.property("calendar_event_id", MessageCalendarEventId.optional()),
|
|
35
37
|
references: MessageReferences.optional(),
|
|
36
38
|
headers: MessageHeaders.optional(),
|
|
37
39
|
size: MessageSize,
|
|
@@ -9,6 +9,7 @@ export * from "./ListMessagesResponse.mjs";
|
|
|
9
9
|
export * from "./Message.mjs";
|
|
10
10
|
export * from "./MessageAttachments.mjs";
|
|
11
11
|
export * from "./MessageBcc.mjs";
|
|
12
|
+
export * from "./MessageCalendarEventId.mjs";
|
|
12
13
|
export * from "./MessageCc.mjs";
|
|
13
14
|
export * from "./MessageCreatedAt.mjs";
|
|
14
15
|
export * from "./MessageFrom.mjs";
|
|
@@ -9,6 +9,7 @@ export * from "./ListMessagesResponse.mjs";
|
|
|
9
9
|
export * from "./Message.mjs";
|
|
10
10
|
export * from "./MessageAttachments.mjs";
|
|
11
11
|
export * from "./MessageBcc.mjs";
|
|
12
|
+
export * from "./MessageCalendarEventId.mjs";
|
|
12
13
|
export * from "./MessageCc.mjs";
|
|
13
14
|
export * from "./MessageCreatedAt.mjs";
|
|
14
15
|
export * from "./MessageFrom.mjs";
|