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