agentmail 0.5.9 → 0.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/domains/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/domains/client/Client.js +1 -2
- package/dist/cjs/api/resources/domains/types/CreateDomainRequest.d.ts +2 -1
- package/dist/cjs/api/resources/domains/types/Domain.d.ts +5 -1
- package/dist/cjs/api/resources/domains/types/DomainItem.d.ts +1 -0
- package/dist/cjs/api/resources/domains/types/SubdomainsEnabled.d.ts +5 -0
- package/dist/cjs/api/resources/domains/types/SubdomainsEnabled.js +3 -0
- package/dist/cjs/api/resources/domains/types/UpdateDomainRequest.d.ts +7 -0
- package/dist/cjs/api/resources/domains/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/domains/types/index.js +1 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/client/Client.js +9 -0
- package/dist/cjs/api/resources/inboxes/types/CreateInboxRequest.d.ts +5 -1
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +1 -2
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +9 -0
- package/dist/cjs/serialization/resources/domains/types/CreateDomainRequest.d.ts +3 -1
- package/dist/cjs/serialization/resources/domains/types/CreateDomainRequest.js +3 -1
- package/dist/cjs/serialization/resources/domains/types/Domain.d.ts +2 -0
- package/dist/cjs/serialization/resources/domains/types/Domain.js +2 -0
- package/dist/cjs/serialization/resources/domains/types/DomainItem.d.ts +2 -0
- package/dist/cjs/serialization/resources/domains/types/DomainItem.js +2 -0
- package/dist/cjs/serialization/resources/domains/types/SubdomainsEnabled.d.ts +7 -0
- package/dist/cjs/serialization/resources/domains/types/SubdomainsEnabled.js +39 -0
- package/dist/cjs/serialization/resources/domains/types/UpdateDomainRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/domains/types/UpdateDomainRequest.js +2 -0
- package/dist/cjs/serialization/resources/domains/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/domains/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/domains/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/domains/client/Client.mjs +1 -2
- package/dist/esm/api/resources/domains/types/CreateDomainRequest.d.mts +2 -1
- package/dist/esm/api/resources/domains/types/Domain.d.mts +5 -1
- package/dist/esm/api/resources/domains/types/DomainItem.d.mts +1 -0
- package/dist/esm/api/resources/domains/types/SubdomainsEnabled.d.mts +5 -0
- package/dist/esm/api/resources/domains/types/SubdomainsEnabled.mjs +2 -0
- package/dist/esm/api/resources/domains/types/UpdateDomainRequest.d.mts +7 -0
- package/dist/esm/api/resources/domains/types/index.d.mts +1 -0
- package/dist/esm/api/resources/domains/types/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/client/Client.mjs +9 -0
- package/dist/esm/api/resources/inboxes/types/CreateInboxRequest.d.mts +5 -1
- package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +1 -2
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +9 -0
- package/dist/esm/serialization/resources/domains/types/CreateDomainRequest.d.mts +3 -1
- package/dist/esm/serialization/resources/domains/types/CreateDomainRequest.mjs +3 -1
- package/dist/esm/serialization/resources/domains/types/Domain.d.mts +2 -0
- package/dist/esm/serialization/resources/domains/types/Domain.mjs +2 -0
- package/dist/esm/serialization/resources/domains/types/DomainItem.d.mts +2 -0
- package/dist/esm/serialization/resources/domains/types/DomainItem.mjs +2 -0
- package/dist/esm/serialization/resources/domains/types/SubdomainsEnabled.d.mts +7 -0
- package/dist/esm/serialization/resources/domains/types/SubdomainsEnabled.mjs +3 -0
- package/dist/esm/serialization/resources/domains/types/UpdateDomainRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/domains/types/UpdateDomainRequest.mjs +2 -0
- package/dist/esm/serialization/resources/domains/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/domains/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +10309 -2931
- package/dist/llms.txt +5 -0
- package/package.json +1 -1
- package/reference.md +2 -4
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "agentmail",
|
|
46
|
-
"X-Fern-SDK-Version": "0.5.
|
|
47
|
-
"User-Agent": "agentmail/0.5.
|
|
46
|
+
"X-Fern-SDK-Version": "0.5.10",
|
|
47
|
+
"User-Agent": "agentmail/0.5.10",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -63,8 +63,7 @@ export declare class DomainsClient {
|
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
65
|
* await client.domains.create({
|
|
66
|
-
* domain: "domain"
|
|
67
|
-
* feedbackEnabled: true
|
|
66
|
+
* domain: "domain"
|
|
68
67
|
* })
|
|
69
68
|
*/
|
|
70
69
|
create(request: AgentMail.CreateDomainRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.js";
|
|
2
2
|
export interface CreateDomainRequest {
|
|
3
3
|
domain: AgentMail.DomainName;
|
|
4
|
-
feedbackEnabled
|
|
4
|
+
feedbackEnabled?: AgentMail.FeedbackEnabled;
|
|
5
|
+
subdomainsEnabled?: AgentMail.SubdomainsEnabled;
|
|
5
6
|
}
|
|
@@ -5,7 +5,11 @@ export interface Domain {
|
|
|
5
5
|
domain: AgentMail.DomainName;
|
|
6
6
|
status: AgentMail.Status;
|
|
7
7
|
feedbackEnabled: AgentMail.FeedbackEnabled;
|
|
8
|
-
|
|
8
|
+
subdomainsEnabled: AgentMail.SubdomainsEnabled;
|
|
9
|
+
/**
|
|
10
|
+
* A list of DNS records required to verify the domain. Includes a
|
|
11
|
+
* wildcard MX record (`*.<domain>`) when `subdomains_enabled` is true.
|
|
12
|
+
*/
|
|
9
13
|
records: AgentMail.VerificationRecord[];
|
|
10
14
|
clientId?: AgentMail.ClientId;
|
|
11
15
|
/** Time at which the domain was last updated. */
|
|
@@ -4,6 +4,7 @@ export interface DomainItem {
|
|
|
4
4
|
domainId: AgentMail.DomainId;
|
|
5
5
|
domain: AgentMail.DomainName;
|
|
6
6
|
feedbackEnabled: AgentMail.FeedbackEnabled;
|
|
7
|
+
subdomainsEnabled: AgentMail.SubdomainsEnabled;
|
|
7
8
|
clientId?: AgentMail.ClientId;
|
|
8
9
|
/** Time at which the domain was last updated. */
|
|
9
10
|
updatedAt: Date;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Provide at least one of `feedback_enabled` or `subdomains_enabled`. Omitted
|
|
4
|
+
* fields are left unchanged; an empty body is rejected. Enabling
|
|
5
|
+
* `subdomains_enabled` on a verified domain returns it to `PENDING` until the
|
|
6
|
+
* newly-required wildcard MX record (`*.<domain>`) is published and verified.
|
|
7
|
+
*/
|
|
2
8
|
export interface UpdateDomainRequest {
|
|
3
9
|
feedbackEnabled?: AgentMail.FeedbackEnabled;
|
|
10
|
+
subdomainsEnabled?: AgentMail.SubdomainsEnabled;
|
|
4
11
|
}
|
|
@@ -9,6 +9,7 @@ export * from "./ListDomainsResponse.js";
|
|
|
9
9
|
export * from "./RecordStatus.js";
|
|
10
10
|
export * from "./RecordType.js";
|
|
11
11
|
export * from "./Status.js";
|
|
12
|
+
export * from "./SubdomainsEnabled.js";
|
|
12
13
|
export * from "./UpdateDomainRequest.js";
|
|
13
14
|
export * from "./VerificationRecord.js";
|
|
14
15
|
export * from "./VerificationStatus.js";
|
|
@@ -25,6 +25,7 @@ __exportStar(require("./ListDomainsResponse.js"), exports);
|
|
|
25
25
|
__exportStar(require("./RecordStatus.js"), exports);
|
|
26
26
|
__exportStar(require("./RecordType.js"), exports);
|
|
27
27
|
__exportStar(require("./Status.js"), exports);
|
|
28
|
+
__exportStar(require("./SubdomainsEnabled.js"), exports);
|
|
28
29
|
__exportStar(require("./UpdateDomainRequest.js"), exports);
|
|
29
30
|
__exportStar(require("./VerificationRecord.js"), exports);
|
|
30
31
|
__exportStar(require("./VerificationStatus.js"), exports);
|
|
@@ -71,6 +71,7 @@ export declare class InboxesClient {
|
|
|
71
71
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
72
72
|
*
|
|
73
73
|
* @throws {@link AgentMail.ValidationError}
|
|
74
|
+
* @throws {@link AgentMail.UnprocessableError}
|
|
74
75
|
*
|
|
75
76
|
* @example
|
|
76
77
|
* await client.inboxes.create(undefined)
|
|
@@ -228,6 +228,7 @@ class InboxesClient {
|
|
|
228
228
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
229
229
|
*
|
|
230
230
|
* @throws {@link AgentMail.ValidationError}
|
|
231
|
+
* @throws {@link AgentMail.UnprocessableError}
|
|
231
232
|
*
|
|
232
233
|
* @example
|
|
233
234
|
* await client.inboxes.create(undefined)
|
|
@@ -280,6 +281,14 @@ class InboxesClient {
|
|
|
280
281
|
skipValidation: true,
|
|
281
282
|
breadcrumbsPrefix: ["response"],
|
|
282
283
|
}), _response.rawResponse);
|
|
284
|
+
case 422:
|
|
285
|
+
throw new AgentMail.UnprocessableError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
286
|
+
unrecognizedObjectKeys: "passthrough",
|
|
287
|
+
allowUnrecognizedUnionMembers: true,
|
|
288
|
+
allowUnrecognizedEnumValues: true,
|
|
289
|
+
skipValidation: true,
|
|
290
|
+
breadcrumbsPrefix: ["response"],
|
|
291
|
+
}), _response.rawResponse);
|
|
283
292
|
default:
|
|
284
293
|
throw new errors.AgentMailError({
|
|
285
294
|
statusCode: _response.error.statusCode,
|
|
@@ -2,7 +2,11 @@ import type * as AgentMail from "../../../index.js";
|
|
|
2
2
|
export interface CreateInboxRequest {
|
|
3
3
|
/** Username of address. Randomly generated if not specified. */
|
|
4
4
|
username?: string;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Domain of address. Must be a verified domain, or any subdomain of a
|
|
7
|
+
* verified domain that has subdomains enabled (e.g., `bot.example.com`).
|
|
8
|
+
* Defaults to `agentmail.to`.
|
|
9
|
+
*/
|
|
6
10
|
domain?: string;
|
|
7
11
|
displayName?: AgentMail.inboxes.DisplayName;
|
|
8
12
|
clientId?: AgentMail.inboxes.ClientId;
|
|
@@ -68,8 +68,7 @@ export declare class DomainsClient {
|
|
|
68
68
|
*
|
|
69
69
|
* @example
|
|
70
70
|
* await client.pods.domains.create("pod_id", {
|
|
71
|
-
* domain: "domain"
|
|
72
|
-
* feedbackEnabled: true
|
|
71
|
+
* domain: "domain"
|
|
73
72
|
* })
|
|
74
73
|
*/
|
|
75
74
|
create(pod_id: AgentMail.pods.PodId, request: AgentMail.CreateDomainRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
|
|
@@ -55,6 +55,7 @@ export declare class InboxesClient {
|
|
|
55
55
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @throws {@link AgentMail.ValidationError}
|
|
58
|
+
* @throws {@link AgentMail.UnprocessableError}
|
|
58
59
|
*
|
|
59
60
|
* @example
|
|
60
61
|
* await client.pods.inboxes.create("pod_id", {})
|
|
@@ -209,6 +209,7 @@ class InboxesClient {
|
|
|
209
209
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
210
210
|
*
|
|
211
211
|
* @throws {@link AgentMail.ValidationError}
|
|
212
|
+
* @throws {@link AgentMail.UnprocessableError}
|
|
212
213
|
*
|
|
213
214
|
* @example
|
|
214
215
|
* await client.pods.inboxes.create("pod_id", {})
|
|
@@ -261,6 +262,14 @@ class InboxesClient {
|
|
|
261
262
|
skipValidation: true,
|
|
262
263
|
breadcrumbsPrefix: ["response"],
|
|
263
264
|
}), _response.rawResponse);
|
|
265
|
+
case 422:
|
|
266
|
+
throw new AgentMail.UnprocessableError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
267
|
+
unrecognizedObjectKeys: "passthrough",
|
|
268
|
+
allowUnrecognizedUnionMembers: true,
|
|
269
|
+
allowUnrecognizedEnumValues: true,
|
|
270
|
+
skipValidation: true,
|
|
271
|
+
breadcrumbsPrefix: ["response"],
|
|
272
|
+
}), _response.rawResponse);
|
|
264
273
|
default:
|
|
265
274
|
throw new errors.AgentMailError({
|
|
266
275
|
statusCode: _response.error.statusCode,
|
|
@@ -3,10 +3,12 @@ import * as core from "../../../../core/index.js";
|
|
|
3
3
|
import type * as serializers from "../../../index.js";
|
|
4
4
|
import { DomainName } from "./DomainName.js";
|
|
5
5
|
import { FeedbackEnabled } from "./FeedbackEnabled.js";
|
|
6
|
+
import { SubdomainsEnabled } from "./SubdomainsEnabled.js";
|
|
6
7
|
export declare const CreateDomainRequest: core.serialization.ObjectSchema<serializers.CreateDomainRequest.Raw, AgentMail.CreateDomainRequest>;
|
|
7
8
|
export declare namespace CreateDomainRequest {
|
|
8
9
|
interface Raw {
|
|
9
10
|
domain: DomainName.Raw;
|
|
10
|
-
feedback_enabled
|
|
11
|
+
feedback_enabled?: FeedbackEnabled.Raw | null;
|
|
12
|
+
subdomains_enabled?: SubdomainsEnabled.Raw | null;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
@@ -38,7 +38,9 @@ exports.CreateDomainRequest = void 0;
|
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
39
|
const DomainName_js_1 = require("./DomainName.js");
|
|
40
40
|
const FeedbackEnabled_js_1 = require("./FeedbackEnabled.js");
|
|
41
|
+
const SubdomainsEnabled_js_1 = require("./SubdomainsEnabled.js");
|
|
41
42
|
exports.CreateDomainRequest = core.serialization.object({
|
|
42
43
|
domain: DomainName_js_1.DomainName,
|
|
43
|
-
feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled_js_1.FeedbackEnabled),
|
|
44
|
+
feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled_js_1.FeedbackEnabled.optional()),
|
|
45
|
+
subdomainsEnabled: core.serialization.property("subdomains_enabled", SubdomainsEnabled_js_1.SubdomainsEnabled.optional()),
|
|
44
46
|
});
|
|
@@ -7,6 +7,7 @@ import { DomainId } from "./DomainId.js";
|
|
|
7
7
|
import { DomainName } from "./DomainName.js";
|
|
8
8
|
import { FeedbackEnabled } from "./FeedbackEnabled.js";
|
|
9
9
|
import { Status } from "./Status.js";
|
|
10
|
+
import { SubdomainsEnabled } from "./SubdomainsEnabled.js";
|
|
10
11
|
import { VerificationRecord } from "./VerificationRecord.js";
|
|
11
12
|
export declare const Domain: core.serialization.ObjectSchema<serializers.Domain.Raw, AgentMail.Domain>;
|
|
12
13
|
export declare namespace Domain {
|
|
@@ -16,6 +17,7 @@ export declare namespace Domain {
|
|
|
16
17
|
domain: DomainName.Raw;
|
|
17
18
|
status: Status.Raw;
|
|
18
19
|
feedback_enabled: FeedbackEnabled.Raw;
|
|
20
|
+
subdomains_enabled: SubdomainsEnabled.Raw;
|
|
19
21
|
records: VerificationRecord.Raw[];
|
|
20
22
|
client_id?: ClientId.Raw | null;
|
|
21
23
|
updated_at: string;
|
|
@@ -42,6 +42,7 @@ const DomainId_js_1 = require("./DomainId.js");
|
|
|
42
42
|
const DomainName_js_1 = require("./DomainName.js");
|
|
43
43
|
const FeedbackEnabled_js_1 = require("./FeedbackEnabled.js");
|
|
44
44
|
const Status_js_1 = require("./Status.js");
|
|
45
|
+
const SubdomainsEnabled_js_1 = require("./SubdomainsEnabled.js");
|
|
45
46
|
const VerificationRecord_js_1 = require("./VerificationRecord.js");
|
|
46
47
|
exports.Domain = core.serialization.object({
|
|
47
48
|
podId: core.serialization.property("pod_id", PodId_js_1.PodId.optional()),
|
|
@@ -49,6 +50,7 @@ exports.Domain = core.serialization.object({
|
|
|
49
50
|
domain: DomainName_js_1.DomainName,
|
|
50
51
|
status: Status_js_1.Status,
|
|
51
52
|
feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled_js_1.FeedbackEnabled),
|
|
53
|
+
subdomainsEnabled: core.serialization.property("subdomains_enabled", SubdomainsEnabled_js_1.SubdomainsEnabled),
|
|
52
54
|
records: core.serialization.list(VerificationRecord_js_1.VerificationRecord),
|
|
53
55
|
clientId: core.serialization.property("client_id", ClientId_js_1.ClientId.optional()),
|
|
54
56
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
@@ -6,6 +6,7 @@ import { ClientId } from "./ClientId.js";
|
|
|
6
6
|
import { DomainId } from "./DomainId.js";
|
|
7
7
|
import { DomainName } from "./DomainName.js";
|
|
8
8
|
import { FeedbackEnabled } from "./FeedbackEnabled.js";
|
|
9
|
+
import { SubdomainsEnabled } from "./SubdomainsEnabled.js";
|
|
9
10
|
export declare const DomainItem: core.serialization.ObjectSchema<serializers.DomainItem.Raw, AgentMail.DomainItem>;
|
|
10
11
|
export declare namespace DomainItem {
|
|
11
12
|
interface Raw {
|
|
@@ -13,6 +14,7 @@ export declare namespace DomainItem {
|
|
|
13
14
|
domain_id: DomainId.Raw;
|
|
14
15
|
domain: DomainName.Raw;
|
|
15
16
|
feedback_enabled: FeedbackEnabled.Raw;
|
|
17
|
+
subdomains_enabled: SubdomainsEnabled.Raw;
|
|
16
18
|
client_id?: ClientId.Raw | null;
|
|
17
19
|
updated_at: string;
|
|
18
20
|
created_at: string;
|
|
@@ -41,11 +41,13 @@ const ClientId_js_1 = require("./ClientId.js");
|
|
|
41
41
|
const DomainId_js_1 = require("./DomainId.js");
|
|
42
42
|
const DomainName_js_1 = require("./DomainName.js");
|
|
43
43
|
const FeedbackEnabled_js_1 = require("./FeedbackEnabled.js");
|
|
44
|
+
const SubdomainsEnabled_js_1 = require("./SubdomainsEnabled.js");
|
|
44
45
|
exports.DomainItem = core.serialization.object({
|
|
45
46
|
podId: core.serialization.property("pod_id", PodId_js_1.PodId.optional()),
|
|
46
47
|
domainId: core.serialization.property("domain_id", DomainId_js_1.DomainId),
|
|
47
48
|
domain: DomainName_js_1.DomainName,
|
|
48
49
|
feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled_js_1.FeedbackEnabled),
|
|
50
|
+
subdomainsEnabled: core.serialization.property("subdomains_enabled", SubdomainsEnabled_js_1.SubdomainsEnabled),
|
|
49
51
|
clientId: core.serialization.property("client_id", ClientId_js_1.ClientId.optional()),
|
|
50
52
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
51
53
|
createdAt: core.serialization.property("created_at", core.serialization.date()),
|
|
@@ -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 SubdomainsEnabled: core.serialization.Schema<serializers.SubdomainsEnabled.Raw, AgentMail.SubdomainsEnabled>;
|
|
5
|
+
export declare namespace SubdomainsEnabled {
|
|
6
|
+
type Raw = boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.SubdomainsEnabled = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
exports.SubdomainsEnabled = core.serialization.boolean();
|
|
@@ -2,9 +2,11 @@ import type * as AgentMail from "../../../../api/index.js";
|
|
|
2
2
|
import * as core from "../../../../core/index.js";
|
|
3
3
|
import type * as serializers from "../../../index.js";
|
|
4
4
|
import { FeedbackEnabled } from "./FeedbackEnabled.js";
|
|
5
|
+
import { SubdomainsEnabled } from "./SubdomainsEnabled.js";
|
|
5
6
|
export declare const UpdateDomainRequest: core.serialization.ObjectSchema<serializers.UpdateDomainRequest.Raw, AgentMail.UpdateDomainRequest>;
|
|
6
7
|
export declare namespace UpdateDomainRequest {
|
|
7
8
|
interface Raw {
|
|
8
9
|
feedback_enabled?: FeedbackEnabled.Raw | null;
|
|
10
|
+
subdomains_enabled?: SubdomainsEnabled.Raw | null;
|
|
9
11
|
}
|
|
10
12
|
}
|
|
@@ -37,6 +37,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.UpdateDomainRequest = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
39
|
const FeedbackEnabled_js_1 = require("./FeedbackEnabled.js");
|
|
40
|
+
const SubdomainsEnabled_js_1 = require("./SubdomainsEnabled.js");
|
|
40
41
|
exports.UpdateDomainRequest = core.serialization.object({
|
|
41
42
|
feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled_js_1.FeedbackEnabled.optional()),
|
|
43
|
+
subdomainsEnabled: core.serialization.property("subdomains_enabled", SubdomainsEnabled_js_1.SubdomainsEnabled.optional()),
|
|
42
44
|
});
|
|
@@ -9,6 +9,7 @@ export * from "./ListDomainsResponse.js";
|
|
|
9
9
|
export * from "./RecordStatus.js";
|
|
10
10
|
export * from "./RecordType.js";
|
|
11
11
|
export * from "./Status.js";
|
|
12
|
+
export * from "./SubdomainsEnabled.js";
|
|
12
13
|
export * from "./UpdateDomainRequest.js";
|
|
13
14
|
export * from "./VerificationRecord.js";
|
|
14
15
|
export * from "./VerificationStatus.js";
|
|
@@ -25,6 +25,7 @@ __exportStar(require("./ListDomainsResponse.js"), exports);
|
|
|
25
25
|
__exportStar(require("./RecordStatus.js"), exports);
|
|
26
26
|
__exportStar(require("./RecordType.js"), exports);
|
|
27
27
|
__exportStar(require("./Status.js"), exports);
|
|
28
|
+
__exportStar(require("./SubdomainsEnabled.js"), exports);
|
|
28
29
|
__exportStar(require("./UpdateDomainRequest.js"), exports);
|
|
29
30
|
__exportStar(require("./VerificationRecord.js"), exports);
|
|
30
31
|
__exportStar(require("./VerificationStatus.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.5.
|
|
1
|
+
export declare const SDK_VERSION = "0.5.10";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "agentmail",
|
|
9
|
-
"X-Fern-SDK-Version": "0.5.
|
|
10
|
-
"User-Agent": "agentmail/0.5.
|
|
9
|
+
"X-Fern-SDK-Version": "0.5.10",
|
|
10
|
+
"User-Agent": "agentmail/0.5.10",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -63,8 +63,7 @@ export declare class DomainsClient {
|
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
65
|
* await client.domains.create({
|
|
66
|
-
* domain: "domain"
|
|
67
|
-
* feedbackEnabled: true
|
|
66
|
+
* domain: "domain"
|
|
68
67
|
* })
|
|
69
68
|
*/
|
|
70
69
|
create(request: AgentMail.CreateDomainRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.mjs";
|
|
2
2
|
export interface CreateDomainRequest {
|
|
3
3
|
domain: AgentMail.DomainName;
|
|
4
|
-
feedbackEnabled
|
|
4
|
+
feedbackEnabled?: AgentMail.FeedbackEnabled;
|
|
5
|
+
subdomainsEnabled?: AgentMail.SubdomainsEnabled;
|
|
5
6
|
}
|
|
@@ -5,7 +5,11 @@ export interface Domain {
|
|
|
5
5
|
domain: AgentMail.DomainName;
|
|
6
6
|
status: AgentMail.Status;
|
|
7
7
|
feedbackEnabled: AgentMail.FeedbackEnabled;
|
|
8
|
-
|
|
8
|
+
subdomainsEnabled: AgentMail.SubdomainsEnabled;
|
|
9
|
+
/**
|
|
10
|
+
* A list of DNS records required to verify the domain. Includes a
|
|
11
|
+
* wildcard MX record (`*.<domain>`) when `subdomains_enabled` is true.
|
|
12
|
+
*/
|
|
9
13
|
records: AgentMail.VerificationRecord[];
|
|
10
14
|
clientId?: AgentMail.ClientId;
|
|
11
15
|
/** Time at which the domain was last updated. */
|
|
@@ -4,6 +4,7 @@ export interface DomainItem {
|
|
|
4
4
|
domainId: AgentMail.DomainId;
|
|
5
5
|
domain: AgentMail.DomainName;
|
|
6
6
|
feedbackEnabled: AgentMail.FeedbackEnabled;
|
|
7
|
+
subdomainsEnabled: AgentMail.SubdomainsEnabled;
|
|
7
8
|
clientId?: AgentMail.ClientId;
|
|
8
9
|
/** Time at which the domain was last updated. */
|
|
9
10
|
updatedAt: Date;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Provide at least one of `feedback_enabled` or `subdomains_enabled`. Omitted
|
|
4
|
+
* fields are left unchanged; an empty body is rejected. Enabling
|
|
5
|
+
* `subdomains_enabled` on a verified domain returns it to `PENDING` until the
|
|
6
|
+
* newly-required wildcard MX record (`*.<domain>`) is published and verified.
|
|
7
|
+
*/
|
|
2
8
|
export interface UpdateDomainRequest {
|
|
3
9
|
feedbackEnabled?: AgentMail.FeedbackEnabled;
|
|
10
|
+
subdomainsEnabled?: AgentMail.SubdomainsEnabled;
|
|
4
11
|
}
|
|
@@ -9,6 +9,7 @@ export * from "./ListDomainsResponse.mjs";
|
|
|
9
9
|
export * from "./RecordStatus.mjs";
|
|
10
10
|
export * from "./RecordType.mjs";
|
|
11
11
|
export * from "./Status.mjs";
|
|
12
|
+
export * from "./SubdomainsEnabled.mjs";
|
|
12
13
|
export * from "./UpdateDomainRequest.mjs";
|
|
13
14
|
export * from "./VerificationRecord.mjs";
|
|
14
15
|
export * from "./VerificationStatus.mjs";
|
|
@@ -9,6 +9,7 @@ export * from "./ListDomainsResponse.mjs";
|
|
|
9
9
|
export * from "./RecordStatus.mjs";
|
|
10
10
|
export * from "./RecordType.mjs";
|
|
11
11
|
export * from "./Status.mjs";
|
|
12
|
+
export * from "./SubdomainsEnabled.mjs";
|
|
12
13
|
export * from "./UpdateDomainRequest.mjs";
|
|
13
14
|
export * from "./VerificationRecord.mjs";
|
|
14
15
|
export * from "./VerificationStatus.mjs";
|
|
@@ -71,6 +71,7 @@ export declare class InboxesClient {
|
|
|
71
71
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
72
72
|
*
|
|
73
73
|
* @throws {@link AgentMail.ValidationError}
|
|
74
|
+
* @throws {@link AgentMail.UnprocessableError}
|
|
74
75
|
*
|
|
75
76
|
* @example
|
|
76
77
|
* await client.inboxes.create(undefined)
|
|
@@ -192,6 +192,7 @@ export class InboxesClient {
|
|
|
192
192
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
193
193
|
*
|
|
194
194
|
* @throws {@link AgentMail.ValidationError}
|
|
195
|
+
* @throws {@link AgentMail.UnprocessableError}
|
|
195
196
|
*
|
|
196
197
|
* @example
|
|
197
198
|
* await client.inboxes.create(undefined)
|
|
@@ -244,6 +245,14 @@ export class InboxesClient {
|
|
|
244
245
|
skipValidation: true,
|
|
245
246
|
breadcrumbsPrefix: ["response"],
|
|
246
247
|
}), _response.rawResponse);
|
|
248
|
+
case 422:
|
|
249
|
+
throw new AgentMail.UnprocessableError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
250
|
+
unrecognizedObjectKeys: "passthrough",
|
|
251
|
+
allowUnrecognizedUnionMembers: true,
|
|
252
|
+
allowUnrecognizedEnumValues: true,
|
|
253
|
+
skipValidation: true,
|
|
254
|
+
breadcrumbsPrefix: ["response"],
|
|
255
|
+
}), _response.rawResponse);
|
|
247
256
|
default:
|
|
248
257
|
throw new errors.AgentMailError({
|
|
249
258
|
statusCode: _response.error.statusCode,
|
|
@@ -2,7 +2,11 @@ import type * as AgentMail from "../../../index.mjs";
|
|
|
2
2
|
export interface CreateInboxRequest {
|
|
3
3
|
/** Username of address. Randomly generated if not specified. */
|
|
4
4
|
username?: string;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Domain of address. Must be a verified domain, or any subdomain of a
|
|
7
|
+
* verified domain that has subdomains enabled (e.g., `bot.example.com`).
|
|
8
|
+
* Defaults to `agentmail.to`.
|
|
9
|
+
*/
|
|
6
10
|
domain?: string;
|
|
7
11
|
displayName?: AgentMail.inboxes.DisplayName;
|
|
8
12
|
clientId?: AgentMail.inboxes.ClientId;
|
|
@@ -68,8 +68,7 @@ export declare class DomainsClient {
|
|
|
68
68
|
*
|
|
69
69
|
* @example
|
|
70
70
|
* await client.pods.domains.create("pod_id", {
|
|
71
|
-
* domain: "domain"
|
|
72
|
-
* feedbackEnabled: true
|
|
71
|
+
* domain: "domain"
|
|
73
72
|
* })
|
|
74
73
|
*/
|
|
75
74
|
create(pod_id: AgentMail.pods.PodId, request: AgentMail.CreateDomainRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
|
|
@@ -55,6 +55,7 @@ export declare class InboxesClient {
|
|
|
55
55
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @throws {@link AgentMail.ValidationError}
|
|
58
|
+
* @throws {@link AgentMail.UnprocessableError}
|
|
58
59
|
*
|
|
59
60
|
* @example
|
|
60
61
|
* await client.pods.inboxes.create("pod_id", {})
|
|
@@ -173,6 +173,7 @@ export class InboxesClient {
|
|
|
173
173
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
174
174
|
*
|
|
175
175
|
* @throws {@link AgentMail.ValidationError}
|
|
176
|
+
* @throws {@link AgentMail.UnprocessableError}
|
|
176
177
|
*
|
|
177
178
|
* @example
|
|
178
179
|
* await client.pods.inboxes.create("pod_id", {})
|
|
@@ -225,6 +226,14 @@ export class InboxesClient {
|
|
|
225
226
|
skipValidation: true,
|
|
226
227
|
breadcrumbsPrefix: ["response"],
|
|
227
228
|
}), _response.rawResponse);
|
|
229
|
+
case 422:
|
|
230
|
+
throw new AgentMail.UnprocessableError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
231
|
+
unrecognizedObjectKeys: "passthrough",
|
|
232
|
+
allowUnrecognizedUnionMembers: true,
|
|
233
|
+
allowUnrecognizedEnumValues: true,
|
|
234
|
+
skipValidation: true,
|
|
235
|
+
breadcrumbsPrefix: ["response"],
|
|
236
|
+
}), _response.rawResponse);
|
|
228
237
|
default:
|
|
229
238
|
throw new errors.AgentMailError({
|
|
230
239
|
statusCode: _response.error.statusCode,
|