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,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
3
|
+
export class ForwardingForbiddenError extends errors.AgentMailError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "ForwardingForbiddenError",
|
|
7
|
+
statusCode: 403,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../../../core/index.mjs";
|
|
2
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
3
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
4
|
+
export declare class ForwardingRateLimitError extends errors.AgentMailError {
|
|
5
|
+
constructor(body: AgentMail.ErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
3
|
+
export class ForwardingRateLimitError extends errors.AgentMailError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "ForwardingRateLimitError",
|
|
7
|
+
statusCode: 429,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
2
|
+
export interface ConfirmForwardingVerificationRequest {
|
|
3
|
+
/** Address the code was sent to. */
|
|
4
|
+
destination: AgentMail.ForwardingDestination;
|
|
5
|
+
/**
|
|
6
|
+
* The 10-character code from the email, shown as `XXXXX-XXXXX`. Case, spaces and the dash are
|
|
7
|
+
* ignored.
|
|
8
|
+
*/
|
|
9
|
+
code: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
2
|
+
export interface Forwarding {
|
|
3
|
+
/**
|
|
4
|
+
* Addresses this level forwards to. `null` when the level sets nothing and uses the forwarding
|
|
5
|
+
* of the level above. An empty list means forwarding is turned off at this level, even when a
|
|
6
|
+
* level above forwards.
|
|
7
|
+
*/
|
|
8
|
+
destinations: AgentMail.ForwardingDestination[] | null;
|
|
9
|
+
/**
|
|
10
|
+
* Addresses in `destinations` that receive nothing yet because they are not verified, or because
|
|
11
|
+
* the address now reaches a different AgentMail inbox than the one it was verified for. Verify
|
|
12
|
+
* them with Start Verification and Confirm Verification. Empty when `destinations` is `null`.
|
|
13
|
+
*/
|
|
14
|
+
unverified: AgentMail.ForwardingDestination[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
2
|
+
export interface UpdateForwardingRequest {
|
|
3
|
+
/**
|
|
4
|
+
* The full list of addresses this level forwards to. It replaces the level's current list. At
|
|
5
|
+
* most 5, with no repeats. Send an empty list to turn forwarding off at this level, even when a
|
|
6
|
+
* level above forwards.
|
|
7
|
+
*/
|
|
8
|
+
destinations: AgentMail.ForwardingDestination[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
2
|
+
export interface UpdateForwardingResponse {
|
|
3
|
+
/**
|
|
4
|
+
* The list now set on this level. It does not say which addresses are verified; Get Forwarding
|
|
5
|
+
* does.
|
|
6
|
+
*/
|
|
7
|
+
destinations: AgentMail.ForwardingDestination[];
|
|
8
|
+
}
|
|
@@ -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";
|
|
@@ -8,6 +8,7 @@ import { CalendarClient } from "../resources/calendar/client/Client.mjs";
|
|
|
8
8
|
import { DraftsClient } from "../resources/drafts/client/Client.mjs";
|
|
9
9
|
import { EventsClient } from "../resources/events/client/Client.mjs";
|
|
10
10
|
import { FilesClient } from "../resources/files/client/Client.mjs";
|
|
11
|
+
import { ForwardingClient } from "../resources/forwarding/client/Client.mjs";
|
|
11
12
|
import { ListsClient } from "../resources/lists/client/Client.mjs";
|
|
12
13
|
import { MessagesClient } from "../resources/messages/client/Client.mjs";
|
|
13
14
|
import { MetricsClient } from "../resources/metrics/client/Client.mjs";
|
|
@@ -25,6 +26,7 @@ export declare class InboxesClient {
|
|
|
25
26
|
protected _drafts: DraftsClient | undefined;
|
|
26
27
|
protected _webhooks: WebhooksClient | undefined;
|
|
27
28
|
protected _lists: ListsClient | undefined;
|
|
29
|
+
protected _forwarding: ForwardingClient | undefined;
|
|
28
30
|
protected _metrics: MetricsClient | undefined;
|
|
29
31
|
protected _events: EventsClient | undefined;
|
|
30
32
|
protected _apiKeys: ApiKeysClient | undefined;
|
|
@@ -37,6 +39,7 @@ export declare class InboxesClient {
|
|
|
37
39
|
get drafts(): DraftsClient;
|
|
38
40
|
get webhooks(): WebhooksClient;
|
|
39
41
|
get lists(): ListsClient;
|
|
42
|
+
get forwarding(): ForwardingClient;
|
|
40
43
|
get metrics(): MetricsClient;
|
|
41
44
|
get events(): EventsClient;
|
|
42
45
|
get apiKeys(): ApiKeysClient;
|
|
@@ -134,6 +137,8 @@ export declare class InboxesClient {
|
|
|
134
137
|
update(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.UpdateInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
|
|
135
138
|
private __update;
|
|
136
139
|
/**
|
|
140
|
+
* Deletion is asynchronous. A `202` means it has started. While it runs, requests for this inbox return `409` `resource_deleting`. Poll `GET /v0/inboxes/{inbox_id}` until it returns `404`, then the address is free. If the inbox still has its own API keys, delete returns `409` `cannot_delete`: revoke those keys first.
|
|
141
|
+
*
|
|
137
142
|
* **CLI:**
|
|
138
143
|
* ```bash
|
|
139
144
|
* agentmail inboxes delete --inbox-id <inbox_id>
|
|
@@ -143,9 +148,10 @@ export declare class InboxesClient {
|
|
|
143
148
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
144
149
|
*
|
|
145
150
|
* @throws {@link AgentMail.NotFoundError}
|
|
151
|
+
* @throws {@link AgentMail.ConflictError}
|
|
146
152
|
*
|
|
147
153
|
* @example
|
|
148
|
-
* await client.inboxes.delete("
|
|
154
|
+
* await client.inboxes.delete("my-agent@agentmail.to")
|
|
149
155
|
*/
|
|
150
156
|
delete(inbox_id: AgentMail.inboxes.InboxId, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
151
157
|
private __delete;
|
|
@@ -22,6 +22,7 @@ import { CalendarClient } from "../resources/calendar/client/Client.mjs";
|
|
|
22
22
|
import { DraftsClient } from "../resources/drafts/client/Client.mjs";
|
|
23
23
|
import { EventsClient } from "../resources/events/client/Client.mjs";
|
|
24
24
|
import { FilesClient } from "../resources/files/client/Client.mjs";
|
|
25
|
+
import { ForwardingClient } from "../resources/forwarding/client/Client.mjs";
|
|
25
26
|
import { ListsClient } from "../resources/lists/client/Client.mjs";
|
|
26
27
|
import { MessagesClient } from "../resources/messages/client/Client.mjs";
|
|
27
28
|
import { MetricsClient } from "../resources/metrics/client/Client.mjs";
|
|
@@ -51,6 +52,10 @@ export class InboxesClient {
|
|
|
51
52
|
var _a;
|
|
52
53
|
return ((_a = this._lists) !== null && _a !== void 0 ? _a : (this._lists = new ListsClient(this._options)));
|
|
53
54
|
}
|
|
55
|
+
get forwarding() {
|
|
56
|
+
var _a;
|
|
57
|
+
return ((_a = this._forwarding) !== null && _a !== void 0 ? _a : (this._forwarding = new ForwardingClient(this._options)));
|
|
58
|
+
}
|
|
54
59
|
get metrics() {
|
|
55
60
|
var _a;
|
|
56
61
|
return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new MetricsClient(this._options)));
|
|
@@ -458,6 +463,8 @@ export class InboxesClient {
|
|
|
458
463
|
});
|
|
459
464
|
}
|
|
460
465
|
/**
|
|
466
|
+
* Deletion is asynchronous. A `202` means it has started. While it runs, requests for this inbox return `409` `resource_deleting`. Poll `GET /v0/inboxes/{inbox_id}` until it returns `404`, then the address is free. If the inbox still has its own API keys, delete returns `409` `cannot_delete`: revoke those keys first.
|
|
467
|
+
*
|
|
461
468
|
* **CLI:**
|
|
462
469
|
* ```bash
|
|
463
470
|
* agentmail inboxes delete --inbox-id <inbox_id>
|
|
@@ -467,9 +474,10 @@ export class InboxesClient {
|
|
|
467
474
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
468
475
|
*
|
|
469
476
|
* @throws {@link AgentMail.NotFoundError}
|
|
477
|
+
* @throws {@link AgentMail.ConflictError}
|
|
470
478
|
*
|
|
471
479
|
* @example
|
|
472
|
-
* await client.inboxes.delete("
|
|
480
|
+
* await client.inboxes.delete("my-agent@agentmail.to")
|
|
473
481
|
*/
|
|
474
482
|
delete(inbox_id, requestOptions) {
|
|
475
483
|
return core.HttpResponsePromise.fromPromise(this.__delete(inbox_id, requestOptions));
|
|
@@ -504,6 +512,14 @@ export class InboxesClient {
|
|
|
504
512
|
skipValidation: true,
|
|
505
513
|
breadcrumbsPrefix: ["response"],
|
|
506
514
|
}), _response.rawResponse);
|
|
515
|
+
case 409:
|
|
516
|
+
throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
517
|
+
unrecognizedObjectKeys: "passthrough",
|
|
518
|
+
allowUnrecognizedUnionMembers: true,
|
|
519
|
+
allowUnrecognizedEnumValues: true,
|
|
520
|
+
skipValidation: true,
|
|
521
|
+
breadcrumbsPrefix: ["response"],
|
|
522
|
+
}), _response.rawResponse);
|
|
507
523
|
default:
|
|
508
524
|
throw new errors.AgentMailError({
|
|
509
525
|
statusCode: _response.error.statusCode,
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
4
|
+
import * as AgentMail from "../../../../../index.mjs";
|
|
5
|
+
export declare namespace 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 inbox sets. When the inbox sets nothing, `destinations` is `null` and
|
|
15
|
+
* the inbox uses its pod's forwarding, or the organization's when the pod sets none.
|
|
16
|
+
*
|
|
17
|
+
* **CLI:**
|
|
18
|
+
* ```bash
|
|
19
|
+
* agentmail inboxes forwarding get --inbox-id <inbox_id>
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
23
|
+
* @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
|
+
*
|
|
25
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
26
|
+
* @throws {@link AgentMail.ForwardingForbiddenError}
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* await client.inboxes.forwarding.get("inbox_id")
|
|
30
|
+
*/
|
|
31
|
+
get(inbox_id: AgentMail.inboxes.InboxId, requestOptions?: ForwardingClient.RequestOptions): core.HttpResponsePromise<AgentMail.Forwarding>;
|
|
32
|
+
private __get;
|
|
33
|
+
/**
|
|
34
|
+
* Set the addresses this inbox forwards to. The list replaces the inbox's current one and any pod
|
|
35
|
+
* or organization list for this inbox; lists are never combined. Send an empty list to stop this
|
|
36
|
+
* inbox forwarding even when its pod or the organization forwards. An address that is not
|
|
37
|
+
* verified is saved but receives nothing until it is verified.
|
|
38
|
+
*
|
|
39
|
+
* **CLI:**
|
|
40
|
+
* ```bash
|
|
41
|
+
* agentmail inboxes forwarding update --inbox-id <inbox_id> --destinations ops@example.com
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
45
|
+
* @param {AgentMail.UpdateForwardingRequest} request
|
|
46
|
+
* @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
47
|
+
*
|
|
48
|
+
* @throws {@link AgentMail.ValidationError}
|
|
49
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
50
|
+
* @throws {@link AgentMail.ForwardingForbiddenError}
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* await client.inboxes.forwarding.update("inbox_id", {
|
|
54
|
+
* destinations: ["destinations", "destinations"]
|
|
55
|
+
* })
|
|
56
|
+
*/
|
|
57
|
+
update(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.UpdateForwardingRequest, requestOptions?: ForwardingClient.RequestOptions): core.HttpResponsePromise<AgentMail.UpdateForwardingResponse>;
|
|
58
|
+
private __update;
|
|
59
|
+
/**
|
|
60
|
+
* Remove this inbox's own forwarding, so the inbox uses its pod's or the organization's forwarding
|
|
61
|
+
* again. Verified addresses stay verified. Returns `not_found` when the inbox sets no forwarding.
|
|
62
|
+
*
|
|
63
|
+
* **CLI:**
|
|
64
|
+
* ```bash
|
|
65
|
+
* agentmail inboxes forwarding delete --inbox-id <inbox_id>
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
69
|
+
* @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
72
|
+
* @throws {@link AgentMail.ForwardingForbiddenError}
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* await client.inboxes.forwarding.delete("inbox_id")
|
|
76
|
+
*/
|
|
77
|
+
delete(inbox_id: AgentMail.inboxes.InboxId, requestOptions?: ForwardingClient.RequestOptions): core.HttpResponsePromise<AgentMail.Forwarding>;
|
|
78
|
+
private __delete;
|
|
79
|
+
}
|