agentmail 0.5.49 → 0.5.51
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/Client.d.ts +3 -0
- package/dist/cjs/Client.js +21 -16
- package/dist/cjs/api/resources/forwarding/client/Client.d.ts +127 -0
- package/dist/cjs/api/resources/forwarding/client/Client.js +503 -0
- package/dist/cjs/api/resources/forwarding/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/forwarding/client/index.js +2 -0
- package/dist/cjs/api/resources/forwarding/errors/ForwardingForbiddenError.d.ts +6 -0
- package/dist/cjs/api/resources/forwarding/errors/ForwardingForbiddenError.js +54 -0
- package/dist/cjs/api/resources/forwarding/errors/ForwardingRateLimitError.d.ts +6 -0
- package/dist/cjs/api/resources/forwarding/errors/ForwardingRateLimitError.js +54 -0
- package/dist/cjs/api/resources/forwarding/errors/index.d.ts +2 -0
- package/dist/cjs/api/resources/forwarding/errors/index.js +18 -0
- package/dist/cjs/api/resources/forwarding/exports.d.ts +2 -0
- package/dist/cjs/api/resources/forwarding/exports.js +21 -0
- package/dist/cjs/api/resources/forwarding/index.d.ts +3 -0
- package/dist/cjs/api/resources/forwarding/index.js +19 -0
- package/dist/cjs/api/resources/forwarding/types/ConfirmForwardingVerificationRequest.d.ts +10 -0
- package/dist/cjs/api/resources/forwarding/types/ConfirmForwardingVerificationRequest.js +3 -0
- package/dist/cjs/api/resources/forwarding/types/Forwarding.d.ts +15 -0
- package/dist/cjs/api/resources/forwarding/types/Forwarding.js +3 -0
- package/dist/cjs/api/resources/forwarding/types/ForwardingDestination.d.ts +5 -0
- package/dist/cjs/api/resources/forwarding/types/ForwardingDestination.js +3 -0
- package/dist/cjs/api/resources/forwarding/types/ForwardingVerificationConfirmed.d.ts +4 -0
- package/dist/cjs/api/resources/forwarding/types/ForwardingVerificationConfirmed.js +3 -0
- package/dist/cjs/api/resources/forwarding/types/ForwardingVerificationStarted.d.ts +4 -0
- package/dist/cjs/api/resources/forwarding/types/ForwardingVerificationStarted.js +3 -0
- package/dist/cjs/api/resources/forwarding/types/StartForwardingVerificationRequest.d.ts +5 -0
- package/dist/cjs/api/resources/forwarding/types/StartForwardingVerificationRequest.js +3 -0
- package/dist/cjs/api/resources/forwarding/types/UpdateForwardingRequest.d.ts +9 -0
- package/dist/cjs/api/resources/forwarding/types/UpdateForwardingRequest.js +3 -0
- package/dist/cjs/api/resources/forwarding/types/UpdateForwardingResponse.d.ts +8 -0
- package/dist/cjs/api/resources/forwarding/types/UpdateForwardingResponse.js +3 -0
- package/dist/cjs/api/resources/forwarding/types/index.d.ts +8 -0
- package/dist/cjs/api/resources/forwarding/types/index.js +24 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +7 -1
- package/dist/cjs/api/resources/inboxes/client/Client.js +27 -11
- package/dist/cjs/api/resources/inboxes/resources/forwarding/client/Client.d.ts +79 -0
- package/dist/cjs/api/resources/inboxes/resources/forwarding/client/Client.js +317 -0
- package/dist/cjs/api/resources/inboxes/resources/forwarding/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/forwarding/client/index.js +2 -0
- package/dist/cjs/api/resources/inboxes/resources/forwarding/exports.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/forwarding/exports.js +21 -0
- package/dist/cjs/api/resources/inboxes/resources/forwarding/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/forwarding/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/index.js +2 -1
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/messages/types/Message.d.ts +2 -0
- package/dist/cjs/api/resources/messages/types/MessageItem.d.ts +2 -0
- package/dist/cjs/api/resources/messages/types/MessageOpenedAt.d.ts +6 -0
- package/dist/cjs/api/resources/messages/types/MessageOpenedAt.js +3 -0
- package/dist/cjs/api/resources/messages/types/MessageTrackOpens.d.ts +5 -0
- package/dist/cjs/api/resources/messages/types/MessageTrackOpens.js +3 -0
- package/dist/cjs/api/resources/messages/types/TrackOpens.d.ts +4 -3
- package/dist/cjs/api/resources/messages/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/messages/types/index.js +2 -0
- package/dist/cjs/api/resources/pods/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/pods/client/Client.js +15 -10
- package/dist/cjs/api/resources/pods/resources/forwarding/client/Client.d.ts +80 -0
- package/dist/cjs/api/resources/pods/resources/forwarding/client/Client.js +318 -0
- package/dist/cjs/api/resources/pods/resources/forwarding/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/forwarding/client/index.js +2 -0
- package/dist/cjs/api/resources/pods/resources/forwarding/exports.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/forwarding/exports.js +21 -0
- package/dist/cjs/api/resources/pods/resources/forwarding/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/forwarding/index.js +17 -0
- package/dist/cjs/api/resources/pods/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/index.js +2 -1
- package/dist/cjs/serialization/resources/forwarding/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/forwarding/index.js +17 -0
- package/dist/cjs/serialization/resources/forwarding/types/ConfirmForwardingVerificationRequest.d.ts +11 -0
- package/dist/cjs/serialization/resources/forwarding/types/ConfirmForwardingVerificationRequest.js +43 -0
- package/dist/cjs/serialization/resources/forwarding/types/Forwarding.d.ts +11 -0
- package/dist/cjs/serialization/resources/forwarding/types/Forwarding.js +43 -0
- package/dist/cjs/serialization/resources/forwarding/types/ForwardingDestination.d.ts +7 -0
- package/dist/cjs/serialization/resources/forwarding/types/ForwardingDestination.js +39 -0
- package/dist/cjs/serialization/resources/forwarding/types/ForwardingVerificationConfirmed.d.ts +9 -0
- package/dist/cjs/serialization/resources/forwarding/types/ForwardingVerificationConfirmed.js +41 -0
- package/dist/cjs/serialization/resources/forwarding/types/ForwardingVerificationStarted.d.ts +9 -0
- package/dist/cjs/serialization/resources/forwarding/types/ForwardingVerificationStarted.js +41 -0
- package/dist/cjs/serialization/resources/forwarding/types/StartForwardingVerificationRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/forwarding/types/StartForwardingVerificationRequest.js +42 -0
- package/dist/cjs/serialization/resources/forwarding/types/UpdateForwardingRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/forwarding/types/UpdateForwardingRequest.js +42 -0
- package/dist/cjs/serialization/resources/forwarding/types/UpdateForwardingResponse.d.ts +10 -0
- package/dist/cjs/serialization/resources/forwarding/types/UpdateForwardingResponse.js +42 -0
- package/dist/cjs/serialization/resources/forwarding/types/index.d.ts +8 -0
- package/dist/cjs/serialization/resources/forwarding/types/index.js +24 -0
- package/dist/cjs/serialization/resources/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/index.js +3 -1
- package/dist/cjs/serialization/resources/messages/types/Message.d.ts +4 -0
- package/dist/cjs/serialization/resources/messages/types/Message.js +4 -0
- package/dist/cjs/serialization/resources/messages/types/MessageItem.d.ts +4 -0
- package/dist/cjs/serialization/resources/messages/types/MessageItem.js +4 -0
- package/dist/cjs/serialization/resources/messages/types/MessageOpenedAt.d.ts +7 -0
- package/dist/cjs/serialization/resources/messages/types/MessageOpenedAt.js +39 -0
- package/dist/cjs/serialization/resources/messages/types/MessageTrackOpens.d.ts +7 -0
- package/dist/cjs/serialization/resources/messages/types/MessageTrackOpens.js +39 -0
- package/dist/cjs/serialization/resources/messages/types/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/messages/types/index.js +2 -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/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/forwarding/client/Client.d.mts +127 -0
- package/dist/esm/api/resources/forwarding/client/Client.mjs +466 -0
- package/dist/esm/api/resources/forwarding/client/index.d.mts +1 -0
- package/dist/esm/api/resources/forwarding/client/index.mjs +1 -0
- package/dist/esm/api/resources/forwarding/errors/ForwardingForbiddenError.d.mts +6 -0
- package/dist/esm/api/resources/forwarding/errors/ForwardingForbiddenError.mjs +17 -0
- package/dist/esm/api/resources/forwarding/errors/ForwardingRateLimitError.d.mts +6 -0
- package/dist/esm/api/resources/forwarding/errors/ForwardingRateLimitError.mjs +17 -0
- package/dist/esm/api/resources/forwarding/errors/index.d.mts +2 -0
- package/dist/esm/api/resources/forwarding/errors/index.mjs +2 -0
- package/dist/esm/api/resources/forwarding/exports.d.mts +2 -0
- package/dist/esm/api/resources/forwarding/exports.mjs +3 -0
- package/dist/esm/api/resources/forwarding/index.d.mts +3 -0
- package/dist/esm/api/resources/forwarding/index.mjs +3 -0
- package/dist/esm/api/resources/forwarding/types/ConfirmForwardingVerificationRequest.d.mts +10 -0
- package/dist/esm/api/resources/forwarding/types/ConfirmForwardingVerificationRequest.mjs +2 -0
- package/dist/esm/api/resources/forwarding/types/Forwarding.d.mts +15 -0
- package/dist/esm/api/resources/forwarding/types/Forwarding.mjs +2 -0
- package/dist/esm/api/resources/forwarding/types/ForwardingDestination.d.mts +5 -0
- package/dist/esm/api/resources/forwarding/types/ForwardingDestination.mjs +2 -0
- package/dist/esm/api/resources/forwarding/types/ForwardingVerificationConfirmed.d.mts +4 -0
- package/dist/esm/api/resources/forwarding/types/ForwardingVerificationConfirmed.mjs +2 -0
- package/dist/esm/api/resources/forwarding/types/ForwardingVerificationStarted.d.mts +4 -0
- package/dist/esm/api/resources/forwarding/types/ForwardingVerificationStarted.mjs +2 -0
- package/dist/esm/api/resources/forwarding/types/StartForwardingVerificationRequest.d.mts +5 -0
- package/dist/esm/api/resources/forwarding/types/StartForwardingVerificationRequest.mjs +2 -0
- package/dist/esm/api/resources/forwarding/types/UpdateForwardingRequest.d.mts +9 -0
- package/dist/esm/api/resources/forwarding/types/UpdateForwardingRequest.mjs +2 -0
- package/dist/esm/api/resources/forwarding/types/UpdateForwardingResponse.d.mts +8 -0
- package/dist/esm/api/resources/forwarding/types/UpdateForwardingResponse.mjs +2 -0
- package/dist/esm/api/resources/forwarding/types/index.d.mts +8 -0
- package/dist/esm/api/resources/forwarding/types/index.mjs +8 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +7 -1
- package/dist/esm/api/resources/inboxes/client/Client.mjs +17 -1
- package/dist/esm/api/resources/inboxes/resources/forwarding/client/Client.d.mts +79 -0
- package/dist/esm/api/resources/inboxes/resources/forwarding/client/Client.mjs +280 -0
- package/dist/esm/api/resources/inboxes/resources/forwarding/client/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/forwarding/client/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/forwarding/exports.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/forwarding/exports.mjs +3 -0
- package/dist/esm/api/resources/inboxes/resources/forwarding/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/forwarding/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/messages/types/Message.d.mts +2 -0
- package/dist/esm/api/resources/messages/types/MessageItem.d.mts +2 -0
- package/dist/esm/api/resources/messages/types/MessageOpenedAt.d.mts +6 -0
- package/dist/esm/api/resources/messages/types/MessageOpenedAt.mjs +2 -0
- package/dist/esm/api/resources/messages/types/MessageTrackOpens.d.mts +5 -0
- package/dist/esm/api/resources/messages/types/MessageTrackOpens.mjs +2 -0
- package/dist/esm/api/resources/messages/types/TrackOpens.d.mts +4 -3
- package/dist/esm/api/resources/messages/types/index.d.mts +2 -0
- package/dist/esm/api/resources/messages/types/index.mjs +2 -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/forwarding/client/Client.d.mts +80 -0
- package/dist/esm/api/resources/pods/resources/forwarding/client/Client.mjs +281 -0
- package/dist/esm/api/resources/pods/resources/forwarding/client/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/forwarding/client/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/forwarding/exports.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/forwarding/exports.mjs +3 -0
- package/dist/esm/api/resources/pods/resources/forwarding/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/forwarding/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/index.mjs +1 -0
- package/dist/esm/serialization/resources/forwarding/index.d.mts +1 -0
- package/dist/esm/serialization/resources/forwarding/index.mjs +1 -0
- package/dist/esm/serialization/resources/forwarding/types/ConfirmForwardingVerificationRequest.d.mts +11 -0
- package/dist/esm/serialization/resources/forwarding/types/ConfirmForwardingVerificationRequest.mjs +7 -0
- package/dist/esm/serialization/resources/forwarding/types/Forwarding.d.mts +11 -0
- package/dist/esm/serialization/resources/forwarding/types/Forwarding.mjs +7 -0
- package/dist/esm/serialization/resources/forwarding/types/ForwardingDestination.d.mts +7 -0
- package/dist/esm/serialization/resources/forwarding/types/ForwardingDestination.mjs +3 -0
- package/dist/esm/serialization/resources/forwarding/types/ForwardingVerificationConfirmed.d.mts +9 -0
- package/dist/esm/serialization/resources/forwarding/types/ForwardingVerificationConfirmed.mjs +5 -0
- package/dist/esm/serialization/resources/forwarding/types/ForwardingVerificationStarted.d.mts +9 -0
- package/dist/esm/serialization/resources/forwarding/types/ForwardingVerificationStarted.mjs +5 -0
- package/dist/esm/serialization/resources/forwarding/types/StartForwardingVerificationRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/forwarding/types/StartForwardingVerificationRequest.mjs +6 -0
- package/dist/esm/serialization/resources/forwarding/types/UpdateForwardingRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/forwarding/types/UpdateForwardingRequest.mjs +6 -0
- package/dist/esm/serialization/resources/forwarding/types/UpdateForwardingResponse.d.mts +10 -0
- package/dist/esm/serialization/resources/forwarding/types/UpdateForwardingResponse.mjs +6 -0
- package/dist/esm/serialization/resources/forwarding/types/index.d.mts +8 -0
- package/dist/esm/serialization/resources/forwarding/types/index.mjs +8 -0
- package/dist/esm/serialization/resources/index.d.mts +2 -0
- package/dist/esm/serialization/resources/index.mjs +2 -0
- package/dist/esm/serialization/resources/messages/types/Message.d.mts +4 -0
- package/dist/esm/serialization/resources/messages/types/Message.mjs +4 -0
- package/dist/esm/serialization/resources/messages/types/MessageItem.d.mts +4 -0
- package/dist/esm/serialization/resources/messages/types/MessageItem.mjs +4 -0
- package/dist/esm/serialization/resources/messages/types/MessageOpenedAt.d.mts +7 -0
- package/dist/esm/serialization/resources/messages/types/MessageOpenedAt.mjs +3 -0
- package/dist/esm/serialization/resources/messages/types/MessageTrackOpens.d.mts +7 -0
- package/dist/esm/serialization/resources/messages/types/MessageTrackOpens.mjs +3 -0
- package/dist/esm/serialization/resources/messages/types/index.d.mts +2 -0
- package/dist/esm/serialization/resources/messages/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms.txt +3 -1
- package/package.json +34 -1
- package/reference.md +1026 -239
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../../../core/index.js";
|
|
4
|
+
import * as AgentMail from "../../../../../index.js";
|
|
5
|
+
export declare namespace ForwardingClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class ForwardingClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ForwardingClient.Options>;
|
|
12
|
+
constructor(options?: ForwardingClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Get the forwarding this pod sets. Its inboxes that set no forwarding of their own use this
|
|
15
|
+
* list. When the pod sets nothing, `destinations` is `null` and the pod uses the organization's
|
|
16
|
+
* forwarding.
|
|
17
|
+
*
|
|
18
|
+
* **CLI:**
|
|
19
|
+
* ```bash
|
|
20
|
+
* agentmail pods forwarding get --pod-id <pod_id>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
24
|
+
* @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
|
+
*
|
|
26
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
27
|
+
* @throws {@link AgentMail.ForwardingForbiddenError}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* await client.pods.forwarding.get("pod_id")
|
|
31
|
+
*/
|
|
32
|
+
get(pod_id: AgentMail.pods.PodId, requestOptions?: ForwardingClient.RequestOptions): core.HttpResponsePromise<AgentMail.Forwarding>;
|
|
33
|
+
private __get;
|
|
34
|
+
/**
|
|
35
|
+
* Set the addresses this pod forwards to. The list replaces the pod's current one and the
|
|
36
|
+
* organization's list for this pod; lists are never combined. Send an empty list to stop
|
|
37
|
+
* forwarding in this pod even when the organization forwards. An address that is not verified is
|
|
38
|
+
* saved but receives nothing until it is verified.
|
|
39
|
+
*
|
|
40
|
+
* **CLI:**
|
|
41
|
+
* ```bash
|
|
42
|
+
* agentmail pods forwarding update --pod-id <pod_id> --destinations ops@example.com
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
46
|
+
* @param {AgentMail.UpdateForwardingRequest} request
|
|
47
|
+
* @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
+
*
|
|
49
|
+
* @throws {@link AgentMail.ValidationError}
|
|
50
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
51
|
+
* @throws {@link AgentMail.ForwardingForbiddenError}
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* await client.pods.forwarding.update("pod_id", {
|
|
55
|
+
* destinations: ["destinations", "destinations"]
|
|
56
|
+
* })
|
|
57
|
+
*/
|
|
58
|
+
update(pod_id: AgentMail.pods.PodId, request: AgentMail.UpdateForwardingRequest, requestOptions?: ForwardingClient.RequestOptions): core.HttpResponsePromise<AgentMail.UpdateForwardingResponse>;
|
|
59
|
+
private __update;
|
|
60
|
+
/**
|
|
61
|
+
* Remove this pod's own forwarding, so the pod uses the organization's forwarding again. Verified
|
|
62
|
+
* addresses stay verified. Returns `not_found` when the pod sets no forwarding.
|
|
63
|
+
*
|
|
64
|
+
* **CLI:**
|
|
65
|
+
* ```bash
|
|
66
|
+
* agentmail pods forwarding delete --pod-id <pod_id>
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
70
|
+
* @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
73
|
+
* @throws {@link AgentMail.ForwardingForbiddenError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.pods.forwarding.delete("pod_id")
|
|
77
|
+
*/
|
|
78
|
+
delete(pod_id: AgentMail.pods.PodId, requestOptions?: ForwardingClient.RequestOptions): core.HttpResponsePromise<AgentMail.Forwarding>;
|
|
79
|
+
private __delete;
|
|
80
|
+
}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.ForwardingClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
53
|
+
const serializers = __importStar(require("../../../../../../serialization/index.js"));
|
|
54
|
+
const AgentMail = __importStar(require("../../../../../index.js"));
|
|
55
|
+
class ForwardingClient {
|
|
56
|
+
constructor(options = {}) {
|
|
57
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get the forwarding this pod sets. Its inboxes that set no forwarding of their own use this
|
|
61
|
+
* list. When the pod sets nothing, `destinations` is `null` and the pod uses the organization's
|
|
62
|
+
* forwarding.
|
|
63
|
+
*
|
|
64
|
+
* **CLI:**
|
|
65
|
+
* ```bash
|
|
66
|
+
* agentmail pods forwarding get --pod-id <pod_id>
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
70
|
+
* @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
73
|
+
* @throws {@link AgentMail.ForwardingForbiddenError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.pods.forwarding.get("pod_id")
|
|
77
|
+
*/
|
|
78
|
+
get(pod_id, requestOptions) {
|
|
79
|
+
return core.HttpResponsePromise.fromPromise(this.__get(pod_id, requestOptions));
|
|
80
|
+
}
|
|
81
|
+
__get(pod_id, requestOptions) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
84
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
85
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
86
|
+
const _response = yield core.fetcher({
|
|
87
|
+
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)
|
|
88
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/forwarding`),
|
|
89
|
+
method: "GET",
|
|
90
|
+
headers: _headers,
|
|
91
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
92
|
+
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,
|
|
93
|
+
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,
|
|
94
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
95
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
96
|
+
logging: this._options.logging,
|
|
97
|
+
});
|
|
98
|
+
if (_response.ok) {
|
|
99
|
+
return {
|
|
100
|
+
data: serializers.Forwarding.parseOrThrow(_response.body, {
|
|
101
|
+
unrecognizedObjectKeys: "passthrough",
|
|
102
|
+
allowUnrecognizedUnionMembers: true,
|
|
103
|
+
allowUnrecognizedEnumValues: true,
|
|
104
|
+
skipValidation: true,
|
|
105
|
+
breadcrumbsPrefix: ["response"],
|
|
106
|
+
}),
|
|
107
|
+
rawResponse: _response.rawResponse,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
if (_response.error.reason === "status-code") {
|
|
111
|
+
switch (_response.error.statusCode) {
|
|
112
|
+
case 404:
|
|
113
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
114
|
+
unrecognizedObjectKeys: "passthrough",
|
|
115
|
+
allowUnrecognizedUnionMembers: true,
|
|
116
|
+
allowUnrecognizedEnumValues: true,
|
|
117
|
+
skipValidation: true,
|
|
118
|
+
breadcrumbsPrefix: ["response"],
|
|
119
|
+
}), _response.rawResponse);
|
|
120
|
+
case 403:
|
|
121
|
+
throw new AgentMail.ForwardingForbiddenError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
122
|
+
unrecognizedObjectKeys: "passthrough",
|
|
123
|
+
allowUnrecognizedUnionMembers: true,
|
|
124
|
+
allowUnrecognizedEnumValues: true,
|
|
125
|
+
skipValidation: true,
|
|
126
|
+
breadcrumbsPrefix: ["response"],
|
|
127
|
+
}), _response.rawResponse);
|
|
128
|
+
default:
|
|
129
|
+
throw new errors.AgentMailError({
|
|
130
|
+
statusCode: _response.error.statusCode,
|
|
131
|
+
body: _response.error.body,
|
|
132
|
+
rawResponse: _response.rawResponse,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/forwarding");
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Set the addresses this pod forwards to. The list replaces the pod's current one and the
|
|
141
|
+
* organization's list for this pod; lists are never combined. Send an empty list to stop
|
|
142
|
+
* forwarding in this pod even when the organization forwards. An address that is not verified is
|
|
143
|
+
* saved but receives nothing until it is verified.
|
|
144
|
+
*
|
|
145
|
+
* **CLI:**
|
|
146
|
+
* ```bash
|
|
147
|
+
* agentmail pods forwarding update --pod-id <pod_id> --destinations ops@example.com
|
|
148
|
+
* ```
|
|
149
|
+
*
|
|
150
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
151
|
+
* @param {AgentMail.UpdateForwardingRequest} request
|
|
152
|
+
* @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
153
|
+
*
|
|
154
|
+
* @throws {@link AgentMail.ValidationError}
|
|
155
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
156
|
+
* @throws {@link AgentMail.ForwardingForbiddenError}
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* await client.pods.forwarding.update("pod_id", {
|
|
160
|
+
* destinations: ["destinations", "destinations"]
|
|
161
|
+
* })
|
|
162
|
+
*/
|
|
163
|
+
update(pod_id, request, requestOptions) {
|
|
164
|
+
return core.HttpResponsePromise.fromPromise(this.__update(pod_id, request, requestOptions));
|
|
165
|
+
}
|
|
166
|
+
__update(pod_id, request, requestOptions) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
169
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
170
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
171
|
+
const _response = yield core.fetcher({
|
|
172
|
+
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)
|
|
173
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/forwarding`),
|
|
174
|
+
method: "PUT",
|
|
175
|
+
headers: _headers,
|
|
176
|
+
contentType: "application/json",
|
|
177
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
178
|
+
requestType: "json",
|
|
179
|
+
body: serializers.UpdateForwardingRequest.jsonOrThrow(request, {
|
|
180
|
+
unrecognizedObjectKeys: "strip",
|
|
181
|
+
omitUndefined: true,
|
|
182
|
+
}),
|
|
183
|
+
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,
|
|
184
|
+
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,
|
|
185
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
186
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
187
|
+
logging: this._options.logging,
|
|
188
|
+
});
|
|
189
|
+
if (_response.ok) {
|
|
190
|
+
return {
|
|
191
|
+
data: serializers.UpdateForwardingResponse.parseOrThrow(_response.body, {
|
|
192
|
+
unrecognizedObjectKeys: "passthrough",
|
|
193
|
+
allowUnrecognizedUnionMembers: true,
|
|
194
|
+
allowUnrecognizedEnumValues: true,
|
|
195
|
+
skipValidation: true,
|
|
196
|
+
breadcrumbsPrefix: ["response"],
|
|
197
|
+
}),
|
|
198
|
+
rawResponse: _response.rawResponse,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
if (_response.error.reason === "status-code") {
|
|
202
|
+
switch (_response.error.statusCode) {
|
|
203
|
+
case 400:
|
|
204
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
205
|
+
unrecognizedObjectKeys: "passthrough",
|
|
206
|
+
allowUnrecognizedUnionMembers: true,
|
|
207
|
+
allowUnrecognizedEnumValues: true,
|
|
208
|
+
skipValidation: true,
|
|
209
|
+
breadcrumbsPrefix: ["response"],
|
|
210
|
+
}), _response.rawResponse);
|
|
211
|
+
case 404:
|
|
212
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
213
|
+
unrecognizedObjectKeys: "passthrough",
|
|
214
|
+
allowUnrecognizedUnionMembers: true,
|
|
215
|
+
allowUnrecognizedEnumValues: true,
|
|
216
|
+
skipValidation: true,
|
|
217
|
+
breadcrumbsPrefix: ["response"],
|
|
218
|
+
}), _response.rawResponse);
|
|
219
|
+
case 403:
|
|
220
|
+
throw new AgentMail.ForwardingForbiddenError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
221
|
+
unrecognizedObjectKeys: "passthrough",
|
|
222
|
+
allowUnrecognizedUnionMembers: true,
|
|
223
|
+
allowUnrecognizedEnumValues: true,
|
|
224
|
+
skipValidation: true,
|
|
225
|
+
breadcrumbsPrefix: ["response"],
|
|
226
|
+
}), _response.rawResponse);
|
|
227
|
+
default:
|
|
228
|
+
throw new errors.AgentMailError({
|
|
229
|
+
statusCode: _response.error.statusCode,
|
|
230
|
+
body: _response.error.body,
|
|
231
|
+
rawResponse: _response.rawResponse,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/v0/pods/{pod_id}/forwarding");
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Remove this pod's own forwarding, so the pod uses the organization's forwarding again. Verified
|
|
240
|
+
* addresses stay verified. Returns `not_found` when the pod sets no forwarding.
|
|
241
|
+
*
|
|
242
|
+
* **CLI:**
|
|
243
|
+
* ```bash
|
|
244
|
+
* agentmail pods forwarding delete --pod-id <pod_id>
|
|
245
|
+
* ```
|
|
246
|
+
*
|
|
247
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
248
|
+
* @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
249
|
+
*
|
|
250
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
251
|
+
* @throws {@link AgentMail.ForwardingForbiddenError}
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* await client.pods.forwarding.delete("pod_id")
|
|
255
|
+
*/
|
|
256
|
+
delete(pod_id, requestOptions) {
|
|
257
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(pod_id, requestOptions));
|
|
258
|
+
}
|
|
259
|
+
__delete(pod_id, requestOptions) {
|
|
260
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
261
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
262
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
263
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
264
|
+
const _response = yield core.fetcher({
|
|
265
|
+
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)
|
|
266
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/forwarding`),
|
|
267
|
+
method: "DELETE",
|
|
268
|
+
headers: _headers,
|
|
269
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
270
|
+
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,
|
|
271
|
+
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,
|
|
272
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
273
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
274
|
+
logging: this._options.logging,
|
|
275
|
+
});
|
|
276
|
+
if (_response.ok) {
|
|
277
|
+
return {
|
|
278
|
+
data: serializers.Forwarding.parseOrThrow(_response.body, {
|
|
279
|
+
unrecognizedObjectKeys: "passthrough",
|
|
280
|
+
allowUnrecognizedUnionMembers: true,
|
|
281
|
+
allowUnrecognizedEnumValues: true,
|
|
282
|
+
skipValidation: true,
|
|
283
|
+
breadcrumbsPrefix: ["response"],
|
|
284
|
+
}),
|
|
285
|
+
rawResponse: _response.rawResponse,
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
if (_response.error.reason === "status-code") {
|
|
289
|
+
switch (_response.error.statusCode) {
|
|
290
|
+
case 404:
|
|
291
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
292
|
+
unrecognizedObjectKeys: "passthrough",
|
|
293
|
+
allowUnrecognizedUnionMembers: true,
|
|
294
|
+
allowUnrecognizedEnumValues: true,
|
|
295
|
+
skipValidation: true,
|
|
296
|
+
breadcrumbsPrefix: ["response"],
|
|
297
|
+
}), _response.rawResponse);
|
|
298
|
+
case 403:
|
|
299
|
+
throw new AgentMail.ForwardingForbiddenError(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 (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v0/pods/{pod_id}/forwarding");
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
exports.ForwardingClient = ForwardingClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ForwardingClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "ForwardingClient", { enumerable: true, get: function () { return Client_js_1.ForwardingClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -6,6 +6,7 @@ export * from "./domains/client/requests/index.js";
|
|
|
6
6
|
export * as domains from "./domains/index.js";
|
|
7
7
|
export * from "./drafts/client/requests/index.js";
|
|
8
8
|
export * as drafts from "./drafts/index.js";
|
|
9
|
+
export * as forwarding from "./forwarding/index.js";
|
|
9
10
|
export * from "./inboxes/client/requests/index.js";
|
|
10
11
|
export * as inboxes from "./inboxes/index.js";
|
|
11
12
|
export * from "./lists/client/requests/index.js";
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.webhooks = exports.threads = exports.metrics = exports.lists = exports.inboxes = exports.drafts = exports.domains = exports.apiKeys = exports.accounts = void 0;
|
|
39
|
+
exports.webhooks = exports.threads = exports.metrics = exports.lists = exports.inboxes = exports.forwarding = exports.drafts = exports.domains = exports.apiKeys = exports.accounts = void 0;
|
|
40
40
|
__exportStar(require("./accounts/client/requests/index.js"), exports);
|
|
41
41
|
exports.accounts = __importStar(require("./accounts/index.js"));
|
|
42
42
|
__exportStar(require("./apiKeys/client/requests/index.js"), exports);
|
|
@@ -45,6 +45,7 @@ __exportStar(require("./domains/client/requests/index.js"), exports);
|
|
|
45
45
|
exports.domains = __importStar(require("./domains/index.js"));
|
|
46
46
|
__exportStar(require("./drafts/client/requests/index.js"), exports);
|
|
47
47
|
exports.drafts = __importStar(require("./drafts/index.js"));
|
|
48
|
+
exports.forwarding = __importStar(require("./forwarding/index.js"));
|
|
48
49
|
__exportStar(require("./inboxes/client/requests/index.js"), exports);
|
|
49
50
|
exports.inboxes = __importStar(require("./inboxes/index.js"));
|
|
50
51
|
__exportStar(require("./lists/client/requests/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types/index.js"), exports);
|
package/dist/cjs/serialization/resources/forwarding/types/ConfirmForwardingVerificationRequest.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import type * as serializers from "../../../index.js";
|
|
4
|
+
import { ForwardingDestination } from "./ForwardingDestination.js";
|
|
5
|
+
export declare const ConfirmForwardingVerificationRequest: core.serialization.ObjectSchema<serializers.ConfirmForwardingVerificationRequest.Raw, AgentMail.ConfirmForwardingVerificationRequest>;
|
|
6
|
+
export declare namespace ConfirmForwardingVerificationRequest {
|
|
7
|
+
interface Raw {
|
|
8
|
+
destination: ForwardingDestination.Raw;
|
|
9
|
+
code: string;
|
|
10
|
+
}
|
|
11
|
+
}
|
package/dist/cjs/serialization/resources/forwarding/types/ConfirmForwardingVerificationRequest.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ConfirmForwardingVerificationRequest = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
const ForwardingDestination_js_1 = require("./ForwardingDestination.js");
|
|
40
|
+
exports.ConfirmForwardingVerificationRequest = core.serialization.object({
|
|
41
|
+
destination: ForwardingDestination_js_1.ForwardingDestination,
|
|
42
|
+
code: core.serialization.string(),
|
|
43
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import type * as serializers from "../../../index.js";
|
|
4
|
+
import { ForwardingDestination } from "./ForwardingDestination.js";
|
|
5
|
+
export declare const Forwarding: core.serialization.ObjectSchema<serializers.Forwarding.Raw, AgentMail.Forwarding>;
|
|
6
|
+
export declare namespace Forwarding {
|
|
7
|
+
interface Raw {
|
|
8
|
+
destinations?: ForwardingDestination.Raw[] | null;
|
|
9
|
+
unverified: ForwardingDestination.Raw[];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.Forwarding = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
const ForwardingDestination_js_1 = require("./ForwardingDestination.js");
|
|
40
|
+
exports.Forwarding = core.serialization.object({
|
|
41
|
+
destinations: core.serialization.list(ForwardingDestination_js_1.ForwardingDestination).nullable(),
|
|
42
|
+
unverified: core.serialization.list(ForwardingDestination_js_1.ForwardingDestination),
|
|
43
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import type * as serializers from "../../../index.js";
|
|
4
|
+
export declare const ForwardingDestination: core.serialization.Schema<serializers.ForwardingDestination.Raw, AgentMail.ForwardingDestination>;
|
|
5
|
+
export declare namespace ForwardingDestination {
|
|
6
|
+
type Raw = string;
|
|
7
|
+
}
|