agentmail 0.5.12 → 0.5.13
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/drafts/types/CreateDraftForwardRequest.d.ts +21 -0
- package/dist/cjs/api/resources/drafts/types/CreateDraftForwardRequest.js +3 -0
- package/dist/cjs/api/resources/drafts/types/CreateDraftReplyAllRequest.d.ts +17 -0
- package/dist/cjs/api/resources/drafts/types/CreateDraftReplyAllRequest.js +3 -0
- package/dist/cjs/api/resources/drafts/types/CreateDraftReplyRequest.d.ts +22 -0
- package/dist/cjs/api/resources/drafts/types/CreateDraftReplyRequest.js +3 -0
- package/dist/cjs/api/resources/drafts/types/Draft.d.ts +1 -0
- package/dist/cjs/api/resources/drafts/types/DraftForwardOf.d.ts +4 -0
- package/dist/cjs/api/resources/drafts/types/DraftForwardOf.js +3 -0
- package/dist/cjs/api/resources/drafts/types/DraftItem.d.ts +1 -0
- package/dist/cjs/api/resources/drafts/types/DraftReplyAll.d.ts +4 -0
- package/dist/cjs/api/resources/drafts/types/DraftReplyAll.js +3 -0
- package/dist/cjs/api/resources/drafts/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/drafts/types/index.js +5 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/inboxes/client/Client.js +5 -0
- package/dist/cjs/api/resources/inboxes/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/index.js +3 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +69 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +264 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/client/Client.d.ts +103 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/client/Client.js +411 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/client/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/client/requests/InboxListWebhooksRequest.d.ts +10 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/client/requests/InboxListWebhooksRequest.js +3 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/exports.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/exports.js +21 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/webhooks/index.js +17 -0
- package/dist/cjs/api/resources/pods/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/pods/client/Client.js +5 -0
- package/dist/cjs/api/resources/pods/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/index.js +3 -1
- package/dist/cjs/api/resources/pods/resources/webhooks/client/Client.d.ts +103 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/client/Client.js +411 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/client/index.js +17 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/client/requests/PodListWebhooksRequest.d.ts +10 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/client/requests/PodListWebhooksRequest.js +3 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/exports.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/exports.js +21 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/webhooks/index.js +17 -0
- package/dist/cjs/api/resources/webhooks/types/CreateInboxWebhookRequest.d.ts +10 -0
- package/dist/cjs/api/resources/webhooks/types/CreateInboxWebhookRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/types/CreatePodWebhookRequest.d.ts +9 -0
- package/dist/cjs/api/resources/webhooks/types/CreatePodWebhookRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/types/CreateWebhookEventTypes.d.ts +7 -0
- package/dist/cjs/api/resources/webhooks/types/CreateWebhookEventTypes.js +3 -0
- package/dist/cjs/api/resources/webhooks/types/CreateWebhookRequest.d.ts +1 -10
- package/dist/cjs/api/resources/webhooks/types/UpdateInboxWebhookRequest.d.ts +7 -0
- package/dist/cjs/api/resources/webhooks/types/UpdateInboxWebhookRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/types/UpdatePodWebhookRequest.d.ts +11 -0
- package/dist/cjs/api/resources/webhooks/types/UpdatePodWebhookRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/types/UpdateWebhookEventTypes.d.ts +10 -0
- package/dist/cjs/api/resources/webhooks/types/UpdateWebhookEventTypes.js +3 -0
- package/dist/cjs/api/resources/webhooks/types/UpdateWebhookRequest.d.ts +1 -14
- package/dist/cjs/api/resources/webhooks/types/index.d.ts +6 -0
- package/dist/cjs/api/resources/webhooks/types/index.js +6 -0
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftForwardRequest.d.ts +30 -0
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftForwardRequest.js +62 -0
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftReplyAllRequest.d.ts +24 -0
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftReplyAllRequest.js +56 -0
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftReplyRequest.d.ts +32 -0
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftReplyRequest.js +64 -0
- package/dist/cjs/serialization/resources/drafts/types/Draft.d.ts +2 -0
- package/dist/cjs/serialization/resources/drafts/types/Draft.js +2 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftForwardOf.d.ts +7 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftForwardOf.js +39 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftItem.d.ts +2 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftItem.js +2 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftReplyAll.d.ts +7 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftReplyAll.js +39 -0
- package/dist/cjs/serialization/resources/drafts/types/index.d.ts +5 -0
- package/dist/cjs/serialization/resources/drafts/types/index.js +5 -0
- package/dist/cjs/serialization/resources/webhooks/types/CreateInboxWebhookRequest.d.ts +14 -0
- package/dist/cjs/serialization/resources/webhooks/types/CreateInboxWebhookRequest.js +46 -0
- package/dist/cjs/serialization/resources/webhooks/types/CreatePodWebhookRequest.d.ts +11 -0
- package/dist/cjs/serialization/resources/webhooks/types/CreatePodWebhookRequest.js +45 -0
- package/dist/cjs/serialization/resources/webhooks/types/CreateWebhookEventTypes.d.ts +8 -0
- package/dist/cjs/serialization/resources/webhooks/types/CreateWebhookEventTypes.js +6 -0
- package/dist/cjs/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +2 -9
- package/dist/cjs/serialization/resources/webhooks/types/CreateWebhookRequest.js +5 -10
- package/dist/cjs/serialization/resources/webhooks/types/UpdateInboxWebhookRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/webhooks/types/UpdateInboxWebhookRequest.js +42 -0
- package/dist/cjs/serialization/resources/webhooks/types/UpdatePodWebhookRequest.d.ts +12 -0
- package/dist/cjs/serialization/resources/webhooks/types/UpdatePodWebhookRequest.js +46 -0
- package/dist/cjs/serialization/resources/webhooks/types/UpdateWebhookEventTypes.d.ts +8 -0
- package/dist/cjs/serialization/resources/webhooks/types/UpdateWebhookEventTypes.js +6 -0
- package/dist/cjs/serialization/resources/webhooks/types/UpdateWebhookRequest.d.ts +2 -6
- package/dist/cjs/serialization/resources/webhooks/types/UpdateWebhookRequest.js +5 -7
- package/dist/cjs/serialization/resources/webhooks/types/index.d.ts +6 -0
- package/dist/cjs/serialization/resources/webhooks/types/index.js +6 -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/drafts/types/CreateDraftForwardRequest.d.mts +21 -0
- package/dist/esm/api/resources/drafts/types/CreateDraftForwardRequest.mjs +2 -0
- package/dist/esm/api/resources/drafts/types/CreateDraftReplyAllRequest.d.mts +17 -0
- package/dist/esm/api/resources/drafts/types/CreateDraftReplyAllRequest.mjs +2 -0
- package/dist/esm/api/resources/drafts/types/CreateDraftReplyRequest.d.mts +22 -0
- package/dist/esm/api/resources/drafts/types/CreateDraftReplyRequest.mjs +2 -0
- package/dist/esm/api/resources/drafts/types/Draft.d.mts +1 -0
- package/dist/esm/api/resources/drafts/types/DraftForwardOf.d.mts +4 -0
- package/dist/esm/api/resources/drafts/types/DraftForwardOf.mjs +2 -0
- package/dist/esm/api/resources/drafts/types/DraftItem.d.mts +1 -0
- package/dist/esm/api/resources/drafts/types/DraftReplyAll.d.mts +4 -0
- package/dist/esm/api/resources/drafts/types/DraftReplyAll.mjs +2 -0
- package/dist/esm/api/resources/drafts/types/index.d.mts +5 -0
- package/dist/esm/api/resources/drafts/types/index.mjs +5 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/inboxes/client/Client.mjs +5 -0
- package/dist/esm/api/resources/inboxes/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/index.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +69 -0
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +264 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/client/Client.d.mts +103 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/client/Client.mjs +374 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/client/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/client/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/client/requests/InboxListWebhooksRequest.d.mts +10 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/client/requests/InboxListWebhooksRequest.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/exports.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/webhooks/exports.mjs +3 -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/pods/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/pods/client/Client.mjs +5 -0
- package/dist/esm/api/resources/pods/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/index.mjs +2 -0
- package/dist/esm/api/resources/pods/resources/webhooks/client/Client.d.mts +103 -0
- package/dist/esm/api/resources/pods/resources/webhooks/client/Client.mjs +374 -0
- package/dist/esm/api/resources/pods/resources/webhooks/client/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/client/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/client/requests/PodListWebhooksRequest.d.mts +10 -0
- package/dist/esm/api/resources/pods/resources/webhooks/client/requests/PodListWebhooksRequest.mjs +2 -0
- package/dist/esm/api/resources/pods/resources/webhooks/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/webhooks/exports.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/webhooks/exports.mjs +3 -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/webhooks/types/CreateInboxWebhookRequest.d.mts +10 -0
- package/dist/esm/api/resources/webhooks/types/CreateInboxWebhookRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/types/CreatePodWebhookRequest.d.mts +9 -0
- package/dist/esm/api/resources/webhooks/types/CreatePodWebhookRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/types/CreateWebhookEventTypes.d.mts +7 -0
- package/dist/esm/api/resources/webhooks/types/CreateWebhookEventTypes.mjs +2 -0
- package/dist/esm/api/resources/webhooks/types/CreateWebhookRequest.d.mts +1 -10
- package/dist/esm/api/resources/webhooks/types/UpdateInboxWebhookRequest.d.mts +7 -0
- package/dist/esm/api/resources/webhooks/types/UpdateInboxWebhookRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/types/UpdatePodWebhookRequest.d.mts +11 -0
- package/dist/esm/api/resources/webhooks/types/UpdatePodWebhookRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/types/UpdateWebhookEventTypes.d.mts +10 -0
- package/dist/esm/api/resources/webhooks/types/UpdateWebhookEventTypes.mjs +2 -0
- package/dist/esm/api/resources/webhooks/types/UpdateWebhookRequest.d.mts +1 -14
- package/dist/esm/api/resources/webhooks/types/index.d.mts +6 -0
- package/dist/esm/api/resources/webhooks/types/index.mjs +6 -0
- package/dist/esm/serialization/resources/drafts/types/CreateDraftForwardRequest.d.mts +30 -0
- package/dist/esm/serialization/resources/drafts/types/CreateDraftForwardRequest.mjs +26 -0
- package/dist/esm/serialization/resources/drafts/types/CreateDraftReplyAllRequest.d.mts +24 -0
- package/dist/esm/serialization/resources/drafts/types/CreateDraftReplyAllRequest.mjs +20 -0
- package/dist/esm/serialization/resources/drafts/types/CreateDraftReplyRequest.d.mts +32 -0
- package/dist/esm/serialization/resources/drafts/types/CreateDraftReplyRequest.mjs +28 -0
- package/dist/esm/serialization/resources/drafts/types/Draft.d.mts +2 -0
- package/dist/esm/serialization/resources/drafts/types/Draft.mjs +2 -0
- package/dist/esm/serialization/resources/drafts/types/DraftForwardOf.d.mts +7 -0
- package/dist/esm/serialization/resources/drafts/types/DraftForwardOf.mjs +3 -0
- package/dist/esm/serialization/resources/drafts/types/DraftItem.d.mts +2 -0
- package/dist/esm/serialization/resources/drafts/types/DraftItem.mjs +2 -0
- package/dist/esm/serialization/resources/drafts/types/DraftReplyAll.d.mts +7 -0
- package/dist/esm/serialization/resources/drafts/types/DraftReplyAll.mjs +3 -0
- package/dist/esm/serialization/resources/drafts/types/index.d.mts +5 -0
- package/dist/esm/serialization/resources/drafts/types/index.mjs +5 -0
- package/dist/esm/serialization/resources/webhooks/types/CreateInboxWebhookRequest.d.mts +14 -0
- package/dist/esm/serialization/resources/webhooks/types/CreateInboxWebhookRequest.mjs +10 -0
- package/dist/esm/serialization/resources/webhooks/types/CreatePodWebhookRequest.d.mts +11 -0
- package/dist/esm/serialization/resources/webhooks/types/CreatePodWebhookRequest.mjs +9 -0
- package/dist/esm/serialization/resources/webhooks/types/CreateWebhookEventTypes.d.mts +8 -0
- package/dist/esm/serialization/resources/webhooks/types/CreateWebhookEventTypes.mjs +3 -0
- package/dist/esm/serialization/resources/webhooks/types/CreateWebhookRequest.d.mts +2 -9
- package/dist/esm/serialization/resources/webhooks/types/CreateWebhookRequest.mjs +5 -10
- package/dist/esm/serialization/resources/webhooks/types/UpdateInboxWebhookRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/webhooks/types/UpdateInboxWebhookRequest.mjs +6 -0
- package/dist/esm/serialization/resources/webhooks/types/UpdatePodWebhookRequest.d.mts +12 -0
- package/dist/esm/serialization/resources/webhooks/types/UpdatePodWebhookRequest.mjs +10 -0
- package/dist/esm/serialization/resources/webhooks/types/UpdateWebhookEventTypes.d.mts +8 -0
- package/dist/esm/serialization/resources/webhooks/types/UpdateWebhookEventTypes.mjs +3 -0
- package/dist/esm/serialization/resources/webhooks/types/UpdateWebhookRequest.d.mts +2 -6
- package/dist/esm/serialization/resources/webhooks/types/UpdateWebhookRequest.mjs +5 -7
- package/dist/esm/serialization/resources/webhooks/types/index.d.mts +6 -0
- package/dist/esm/serialization/resources/webhooks/types/index.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms.txt +8 -4
- package/package.json +23 -1
- package/reference.md +1454 -428
|
@@ -271,4 +271,73 @@ export declare class MessagesClient {
|
|
|
271
271
|
*/
|
|
272
272
|
forward(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, request: AgentMail.SendMessageRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.SendMessageResponse>;
|
|
273
273
|
private __forward;
|
|
274
|
+
/**
|
|
275
|
+
* Create a draft that replies to a message instead of sending it. The
|
|
276
|
+
* recipients, subject, and threading are derived from the source message.
|
|
277
|
+
* Send it later with `Send Draft`.
|
|
278
|
+
*
|
|
279
|
+
* **CLI:**
|
|
280
|
+
* ```bash
|
|
281
|
+
* agentmail inboxes:messages draft-reply --inbox-id <inbox_id> --message-id <message_id> --text "Reply text"
|
|
282
|
+
* ```
|
|
283
|
+
*
|
|
284
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
285
|
+
* @param {AgentMail.MessageId} message_id
|
|
286
|
+
* @param {AgentMail.CreateDraftReplyRequest} request
|
|
287
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
288
|
+
*
|
|
289
|
+
* @throws {@link AgentMail.ValidationError}
|
|
290
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* await client.inboxes.messages.draftReply("inbox_id", "message_id", {})
|
|
294
|
+
*/
|
|
295
|
+
draftReply(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, request: AgentMail.CreateDraftReplyRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.Draft>;
|
|
296
|
+
private __draftReply;
|
|
297
|
+
/**
|
|
298
|
+
* Create a draft that replies to every recipient of a message instead of
|
|
299
|
+
* sending it. Recipients, subject, and threading are derived from the
|
|
300
|
+
* source message. Send it later with `Send Draft`.
|
|
301
|
+
*
|
|
302
|
+
* **CLI:**
|
|
303
|
+
* ```bash
|
|
304
|
+
* agentmail inboxes:messages draft-reply-all --inbox-id <inbox_id> --message-id <message_id> --text "Reply text"
|
|
305
|
+
* ```
|
|
306
|
+
*
|
|
307
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
308
|
+
* @param {AgentMail.MessageId} message_id
|
|
309
|
+
* @param {AgentMail.CreateDraftReplyAllRequest} request
|
|
310
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
311
|
+
*
|
|
312
|
+
* @throws {@link AgentMail.ValidationError}
|
|
313
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* await client.inboxes.messages.draftReplyAll("inbox_id", "message_id", {})
|
|
317
|
+
*/
|
|
318
|
+
draftReplyAll(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, request: AgentMail.CreateDraftReplyAllRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.Draft>;
|
|
319
|
+
private __draftReplyAll;
|
|
320
|
+
/**
|
|
321
|
+
* Create a draft that forwards a message instead of sending it. The subject
|
|
322
|
+
* and threading are derived from the source message, whose body and
|
|
323
|
+
* attachments are merged in at send time. Send it later with `Send Draft`.
|
|
324
|
+
*
|
|
325
|
+
* **CLI:**
|
|
326
|
+
* ```bash
|
|
327
|
+
* agentmail inboxes:messages draft-forward --inbox-id <inbox_id> --message-id <message_id> --to recipient@example.com
|
|
328
|
+
* ```
|
|
329
|
+
*
|
|
330
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
331
|
+
* @param {AgentMail.MessageId} message_id
|
|
332
|
+
* @param {AgentMail.CreateDraftForwardRequest} request
|
|
333
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
334
|
+
*
|
|
335
|
+
* @throws {@link AgentMail.ValidationError}
|
|
336
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
337
|
+
*
|
|
338
|
+
* @example
|
|
339
|
+
* await client.inboxes.messages.draftForward("inbox_id", "message_id", {})
|
|
340
|
+
*/
|
|
341
|
+
draftForward(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, request: AgentMail.CreateDraftForwardRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.Draft>;
|
|
342
|
+
private __draftForward;
|
|
274
343
|
}
|
|
@@ -1095,4 +1095,268 @@ export class MessagesClient {
|
|
|
1095
1095
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/inboxes/{inbox_id}/messages/{message_id}/forward");
|
|
1096
1096
|
});
|
|
1097
1097
|
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Create a draft that replies to a message instead of sending it. The
|
|
1100
|
+
* recipients, subject, and threading are derived from the source message.
|
|
1101
|
+
* Send it later with `Send Draft`.
|
|
1102
|
+
*
|
|
1103
|
+
* **CLI:**
|
|
1104
|
+
* ```bash
|
|
1105
|
+
* agentmail inboxes:messages draft-reply --inbox-id <inbox_id> --message-id <message_id> --text "Reply text"
|
|
1106
|
+
* ```
|
|
1107
|
+
*
|
|
1108
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
1109
|
+
* @param {AgentMail.MessageId} message_id
|
|
1110
|
+
* @param {AgentMail.CreateDraftReplyRequest} request
|
|
1111
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1112
|
+
*
|
|
1113
|
+
* @throws {@link AgentMail.ValidationError}
|
|
1114
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
1115
|
+
*
|
|
1116
|
+
* @example
|
|
1117
|
+
* await client.inboxes.messages.draftReply("inbox_id", "message_id", {})
|
|
1118
|
+
*/
|
|
1119
|
+
draftReply(inbox_id, message_id, request, requestOptions) {
|
|
1120
|
+
return core.HttpResponsePromise.fromPromise(this.__draftReply(inbox_id, message_id, request, requestOptions));
|
|
1121
|
+
}
|
|
1122
|
+
__draftReply(inbox_id, message_id, request, requestOptions) {
|
|
1123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1124
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1125
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1126
|
+
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);
|
|
1127
|
+
const _response = yield core.fetcher({
|
|
1128
|
+
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)
|
|
1129
|
+
.http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/messages/${core.url.encodePathParam(serializers.MessageId.jsonOrThrow(message_id, { omitUndefined: true }))}/draft-reply`),
|
|
1130
|
+
method: "POST",
|
|
1131
|
+
headers: _headers,
|
|
1132
|
+
contentType: "application/json",
|
|
1133
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1134
|
+
requestType: "json",
|
|
1135
|
+
body: serializers.CreateDraftReplyRequest.jsonOrThrow(request, {
|
|
1136
|
+
unrecognizedObjectKeys: "strip",
|
|
1137
|
+
omitUndefined: true,
|
|
1138
|
+
}),
|
|
1139
|
+
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,
|
|
1140
|
+
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,
|
|
1141
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1142
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
1143
|
+
logging: this._options.logging,
|
|
1144
|
+
});
|
|
1145
|
+
if (_response.ok) {
|
|
1146
|
+
return {
|
|
1147
|
+
data: serializers.Draft.parseOrThrow(_response.body, {
|
|
1148
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1149
|
+
allowUnrecognizedUnionMembers: true,
|
|
1150
|
+
allowUnrecognizedEnumValues: true,
|
|
1151
|
+
skipValidation: true,
|
|
1152
|
+
breadcrumbsPrefix: ["response"],
|
|
1153
|
+
}),
|
|
1154
|
+
rawResponse: _response.rawResponse,
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
if (_response.error.reason === "status-code") {
|
|
1158
|
+
switch (_response.error.statusCode) {
|
|
1159
|
+
case 400:
|
|
1160
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
1161
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1162
|
+
allowUnrecognizedUnionMembers: true,
|
|
1163
|
+
allowUnrecognizedEnumValues: true,
|
|
1164
|
+
skipValidation: true,
|
|
1165
|
+
breadcrumbsPrefix: ["response"],
|
|
1166
|
+
}), _response.rawResponse);
|
|
1167
|
+
case 404:
|
|
1168
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
1169
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1170
|
+
allowUnrecognizedUnionMembers: true,
|
|
1171
|
+
allowUnrecognizedEnumValues: true,
|
|
1172
|
+
skipValidation: true,
|
|
1173
|
+
breadcrumbsPrefix: ["response"],
|
|
1174
|
+
}), _response.rawResponse);
|
|
1175
|
+
default:
|
|
1176
|
+
throw new errors.AgentMailError({
|
|
1177
|
+
statusCode: _response.error.statusCode,
|
|
1178
|
+
body: _response.error.body,
|
|
1179
|
+
rawResponse: _response.rawResponse,
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/inboxes/{inbox_id}/messages/{message_id}/draft-reply");
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
/**
|
|
1187
|
+
* Create a draft that replies to every recipient of a message instead of
|
|
1188
|
+
* sending it. Recipients, subject, and threading are derived from the
|
|
1189
|
+
* source message. Send it later with `Send Draft`.
|
|
1190
|
+
*
|
|
1191
|
+
* **CLI:**
|
|
1192
|
+
* ```bash
|
|
1193
|
+
* agentmail inboxes:messages draft-reply-all --inbox-id <inbox_id> --message-id <message_id> --text "Reply text"
|
|
1194
|
+
* ```
|
|
1195
|
+
*
|
|
1196
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
1197
|
+
* @param {AgentMail.MessageId} message_id
|
|
1198
|
+
* @param {AgentMail.CreateDraftReplyAllRequest} request
|
|
1199
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1200
|
+
*
|
|
1201
|
+
* @throws {@link AgentMail.ValidationError}
|
|
1202
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
1203
|
+
*
|
|
1204
|
+
* @example
|
|
1205
|
+
* await client.inboxes.messages.draftReplyAll("inbox_id", "message_id", {})
|
|
1206
|
+
*/
|
|
1207
|
+
draftReplyAll(inbox_id, message_id, request, requestOptions) {
|
|
1208
|
+
return core.HttpResponsePromise.fromPromise(this.__draftReplyAll(inbox_id, message_id, request, requestOptions));
|
|
1209
|
+
}
|
|
1210
|
+
__draftReplyAll(inbox_id, message_id, request, requestOptions) {
|
|
1211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1212
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1213
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1214
|
+
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);
|
|
1215
|
+
const _response = yield core.fetcher({
|
|
1216
|
+
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)
|
|
1217
|
+
.http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/messages/${core.url.encodePathParam(serializers.MessageId.jsonOrThrow(message_id, { omitUndefined: true }))}/draft-reply-all`),
|
|
1218
|
+
method: "POST",
|
|
1219
|
+
headers: _headers,
|
|
1220
|
+
contentType: "application/json",
|
|
1221
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1222
|
+
requestType: "json",
|
|
1223
|
+
body: serializers.CreateDraftReplyAllRequest.jsonOrThrow(request, {
|
|
1224
|
+
unrecognizedObjectKeys: "strip",
|
|
1225
|
+
omitUndefined: true,
|
|
1226
|
+
}),
|
|
1227
|
+
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,
|
|
1228
|
+
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,
|
|
1229
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1230
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
1231
|
+
logging: this._options.logging,
|
|
1232
|
+
});
|
|
1233
|
+
if (_response.ok) {
|
|
1234
|
+
return {
|
|
1235
|
+
data: serializers.Draft.parseOrThrow(_response.body, {
|
|
1236
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1237
|
+
allowUnrecognizedUnionMembers: true,
|
|
1238
|
+
allowUnrecognizedEnumValues: true,
|
|
1239
|
+
skipValidation: true,
|
|
1240
|
+
breadcrumbsPrefix: ["response"],
|
|
1241
|
+
}),
|
|
1242
|
+
rawResponse: _response.rawResponse,
|
|
1243
|
+
};
|
|
1244
|
+
}
|
|
1245
|
+
if (_response.error.reason === "status-code") {
|
|
1246
|
+
switch (_response.error.statusCode) {
|
|
1247
|
+
case 400:
|
|
1248
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
1249
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1250
|
+
allowUnrecognizedUnionMembers: true,
|
|
1251
|
+
allowUnrecognizedEnumValues: true,
|
|
1252
|
+
skipValidation: true,
|
|
1253
|
+
breadcrumbsPrefix: ["response"],
|
|
1254
|
+
}), _response.rawResponse);
|
|
1255
|
+
case 404:
|
|
1256
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
1257
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1258
|
+
allowUnrecognizedUnionMembers: true,
|
|
1259
|
+
allowUnrecognizedEnumValues: true,
|
|
1260
|
+
skipValidation: true,
|
|
1261
|
+
breadcrumbsPrefix: ["response"],
|
|
1262
|
+
}), _response.rawResponse);
|
|
1263
|
+
default:
|
|
1264
|
+
throw new errors.AgentMailError({
|
|
1265
|
+
statusCode: _response.error.statusCode,
|
|
1266
|
+
body: _response.error.body,
|
|
1267
|
+
rawResponse: _response.rawResponse,
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/inboxes/{inbox_id}/messages/{message_id}/draft-reply-all");
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* Create a draft that forwards a message instead of sending it. The subject
|
|
1276
|
+
* and threading are derived from the source message, whose body and
|
|
1277
|
+
* attachments are merged in at send time. Send it later with `Send Draft`.
|
|
1278
|
+
*
|
|
1279
|
+
* **CLI:**
|
|
1280
|
+
* ```bash
|
|
1281
|
+
* agentmail inboxes:messages draft-forward --inbox-id <inbox_id> --message-id <message_id> --to recipient@example.com
|
|
1282
|
+
* ```
|
|
1283
|
+
*
|
|
1284
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
1285
|
+
* @param {AgentMail.MessageId} message_id
|
|
1286
|
+
* @param {AgentMail.CreateDraftForwardRequest} request
|
|
1287
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1288
|
+
*
|
|
1289
|
+
* @throws {@link AgentMail.ValidationError}
|
|
1290
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
1291
|
+
*
|
|
1292
|
+
* @example
|
|
1293
|
+
* await client.inboxes.messages.draftForward("inbox_id", "message_id", {})
|
|
1294
|
+
*/
|
|
1295
|
+
draftForward(inbox_id, message_id, request, requestOptions) {
|
|
1296
|
+
return core.HttpResponsePromise.fromPromise(this.__draftForward(inbox_id, message_id, request, requestOptions));
|
|
1297
|
+
}
|
|
1298
|
+
__draftForward(inbox_id, message_id, request, requestOptions) {
|
|
1299
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1300
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1301
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1302
|
+
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);
|
|
1303
|
+
const _response = yield core.fetcher({
|
|
1304
|
+
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)
|
|
1305
|
+
.http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/messages/${core.url.encodePathParam(serializers.MessageId.jsonOrThrow(message_id, { omitUndefined: true }))}/draft-forward`),
|
|
1306
|
+
method: "POST",
|
|
1307
|
+
headers: _headers,
|
|
1308
|
+
contentType: "application/json",
|
|
1309
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1310
|
+
requestType: "json",
|
|
1311
|
+
body: serializers.CreateDraftForwardRequest.jsonOrThrow(request, {
|
|
1312
|
+
unrecognizedObjectKeys: "strip",
|
|
1313
|
+
omitUndefined: true,
|
|
1314
|
+
}),
|
|
1315
|
+
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,
|
|
1316
|
+
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,
|
|
1317
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1318
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
1319
|
+
logging: this._options.logging,
|
|
1320
|
+
});
|
|
1321
|
+
if (_response.ok) {
|
|
1322
|
+
return {
|
|
1323
|
+
data: serializers.Draft.parseOrThrow(_response.body, {
|
|
1324
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1325
|
+
allowUnrecognizedUnionMembers: true,
|
|
1326
|
+
allowUnrecognizedEnumValues: true,
|
|
1327
|
+
skipValidation: true,
|
|
1328
|
+
breadcrumbsPrefix: ["response"],
|
|
1329
|
+
}),
|
|
1330
|
+
rawResponse: _response.rawResponse,
|
|
1331
|
+
};
|
|
1332
|
+
}
|
|
1333
|
+
if (_response.error.reason === "status-code") {
|
|
1334
|
+
switch (_response.error.statusCode) {
|
|
1335
|
+
case 400:
|
|
1336
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
1337
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1338
|
+
allowUnrecognizedUnionMembers: true,
|
|
1339
|
+
allowUnrecognizedEnumValues: true,
|
|
1340
|
+
skipValidation: true,
|
|
1341
|
+
breadcrumbsPrefix: ["response"],
|
|
1342
|
+
}), _response.rawResponse);
|
|
1343
|
+
case 404:
|
|
1344
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
1345
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1346
|
+
allowUnrecognizedUnionMembers: true,
|
|
1347
|
+
allowUnrecognizedEnumValues: true,
|
|
1348
|
+
skipValidation: true,
|
|
1349
|
+
breadcrumbsPrefix: ["response"],
|
|
1350
|
+
}), _response.rawResponse);
|
|
1351
|
+
default:
|
|
1352
|
+
throw new errors.AgentMailError({
|
|
1353
|
+
statusCode: _response.error.statusCode,
|
|
1354
|
+
body: _response.error.body,
|
|
1355
|
+
rawResponse: _response.rawResponse,
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/inboxes/{inbox_id}/messages/{message_id}/draft-forward");
|
|
1360
|
+
});
|
|
1361
|
+
}
|
|
1098
1362
|
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
4
|
+
import * as AgentMail from "../../../../../index.mjs";
|
|
5
|
+
export declare namespace WebhooksClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class WebhooksClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<WebhooksClient.Options>;
|
|
12
|
+
constructor(options?: WebhooksClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* **CLI:**
|
|
15
|
+
* ```bash
|
|
16
|
+
* agentmail inboxes:webhooks list --inbox-id <inbox_id>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
20
|
+
* @param {AgentMail.inboxes.InboxListWebhooksRequest} request
|
|
21
|
+
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* await client.inboxes.webhooks.list("inbox_id")
|
|
25
|
+
*/
|
|
26
|
+
list(inbox_id: AgentMail.inboxes.InboxId, request?: AgentMail.inboxes.InboxListWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<AgentMail.webhooks.ListWebhooksResponse>;
|
|
27
|
+
private __list;
|
|
28
|
+
/**
|
|
29
|
+
* **CLI:**
|
|
30
|
+
* ```bash
|
|
31
|
+
* agentmail inboxes:webhooks get --inbox-id <inbox_id> --webhook-id <webhook_id>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
35
|
+
* @param {AgentMail.webhooks.WebhookId} webhook_id
|
|
36
|
+
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
+
*
|
|
38
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* await client.inboxes.webhooks.get("inbox_id", "webhook_id")
|
|
42
|
+
*/
|
|
43
|
+
get(inbox_id: AgentMail.inboxes.InboxId, webhook_id: AgentMail.webhooks.WebhookId, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<AgentMail.webhooks.Webhook>;
|
|
44
|
+
private __get;
|
|
45
|
+
/**
|
|
46
|
+
* Create a webhook scoped to this inbox.
|
|
47
|
+
*
|
|
48
|
+
* **CLI:**
|
|
49
|
+
* ```bash
|
|
50
|
+
* agentmail inboxes:webhooks create --inbox-id <inbox_id> --url https://example.com/webhook --event-type message.received
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
54
|
+
* @param {AgentMail.webhooks.CreateInboxWebhookRequest} request
|
|
55
|
+
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link AgentMail.ValidationError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.inboxes.webhooks.create("inbox_id", {
|
|
61
|
+
* url: "url",
|
|
62
|
+
* eventTypes: ["message.received", "message.received"]
|
|
63
|
+
* })
|
|
64
|
+
*/
|
|
65
|
+
create(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.webhooks.CreateInboxWebhookRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<AgentMail.webhooks.Webhook>;
|
|
66
|
+
private __create;
|
|
67
|
+
/**
|
|
68
|
+
* **CLI:**
|
|
69
|
+
* ```bash
|
|
70
|
+
* agentmail inboxes:webhooks update --inbox-id <inbox_id> --webhook-id <webhook_id> --event-type message.received
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
74
|
+
* @param {AgentMail.webhooks.WebhookId} webhook_id
|
|
75
|
+
* @param {AgentMail.webhooks.UpdateInboxWebhookRequest} request
|
|
76
|
+
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
79
|
+
* @throws {@link AgentMail.ValidationError}
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* await client.inboxes.webhooks.update("inbox_id", "webhook_id", {})
|
|
83
|
+
*/
|
|
84
|
+
update(inbox_id: AgentMail.inboxes.InboxId, webhook_id: AgentMail.webhooks.WebhookId, request: AgentMail.webhooks.UpdateInboxWebhookRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<AgentMail.webhooks.Webhook>;
|
|
85
|
+
private __update;
|
|
86
|
+
/**
|
|
87
|
+
* **CLI:**
|
|
88
|
+
* ```bash
|
|
89
|
+
* agentmail inboxes:webhooks delete --inbox-id <inbox_id> --webhook-id <webhook_id>
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
93
|
+
* @param {AgentMail.webhooks.WebhookId} webhook_id
|
|
94
|
+
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* await client.inboxes.webhooks.delete("inbox_id", "webhook_id")
|
|
100
|
+
*/
|
|
101
|
+
delete(inbox_id: AgentMail.inboxes.InboxId, webhook_id: AgentMail.webhooks.WebhookId, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
102
|
+
private __delete;
|
|
103
|
+
}
|