agentmail 0.5.9 → 0.5.11
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/resources/messages/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +83 -0
- package/dist/cjs/api/resources/inboxes/types/CreateInboxRequest.d.ts +5 -1
- package/dist/cjs/api/resources/messages/types/BatchUpdateMessagesMessageIds.d.ts +8 -0
- package/dist/cjs/api/resources/messages/types/BatchUpdateMessagesMessageIds.js +3 -0
- package/dist/cjs/api/resources/messages/types/BatchUpdateMessagesRequest.d.ts +8 -0
- package/dist/cjs/api/resources/messages/types/BatchUpdateMessagesRequest.js +3 -0
- package/dist/cjs/api/resources/messages/types/BatchUpdateMessagesResponse.d.ts +11 -0
- package/dist/cjs/api/resources/messages/types/BatchUpdateMessagesResponse.js +3 -0
- package/dist/cjs/api/resources/messages/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/messages/types/index.js +3 -0
- 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/serialization/resources/messages/types/BatchUpdateMessagesMessageIds.d.ts +8 -0
- package/dist/cjs/serialization/resources/messages/types/BatchUpdateMessagesMessageIds.js +40 -0
- package/dist/cjs/serialization/resources/messages/types/BatchUpdateMessagesRequest.d.ts +13 -0
- package/dist/cjs/serialization/resources/messages/types/BatchUpdateMessagesRequest.js +45 -0
- package/dist/cjs/serialization/resources/messages/types/BatchUpdateMessagesResponse.d.ts +14 -0
- package/dist/cjs/serialization/resources/messages/types/BatchUpdateMessagesResponse.js +46 -0
- package/dist/cjs/serialization/resources/messages/types/index.d.ts +3 -0
- package/dist/cjs/serialization/resources/messages/types/index.js +3 -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/resources/messages/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +83 -0
- package/dist/esm/api/resources/inboxes/types/CreateInboxRequest.d.mts +5 -1
- package/dist/esm/api/resources/messages/types/BatchUpdateMessagesMessageIds.d.mts +8 -0
- package/dist/esm/api/resources/messages/types/BatchUpdateMessagesMessageIds.mjs +2 -0
- package/dist/esm/api/resources/messages/types/BatchUpdateMessagesRequest.d.mts +8 -0
- package/dist/esm/api/resources/messages/types/BatchUpdateMessagesRequest.mjs +2 -0
- package/dist/esm/api/resources/messages/types/BatchUpdateMessagesResponse.d.mts +11 -0
- package/dist/esm/api/resources/messages/types/BatchUpdateMessagesResponse.mjs +2 -0
- package/dist/esm/api/resources/messages/types/index.d.mts +3 -0
- package/dist/esm/api/resources/messages/types/index.mjs +3 -0
- 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/serialization/resources/messages/types/BatchUpdateMessagesMessageIds.d.mts +8 -0
- package/dist/esm/serialization/resources/messages/types/BatchUpdateMessagesMessageIds.mjs +4 -0
- package/dist/esm/serialization/resources/messages/types/BatchUpdateMessagesRequest.d.mts +13 -0
- package/dist/esm/serialization/resources/messages/types/BatchUpdateMessagesRequest.mjs +9 -0
- package/dist/esm/serialization/resources/messages/types/BatchUpdateMessagesResponse.d.mts +14 -0
- package/dist/esm/serialization/resources/messages/types/BatchUpdateMessagesResponse.mjs +10 -0
- package/dist/esm/serialization/resources/messages/types/index.d.mts +3 -0
- package/dist/esm/serialization/resources/messages/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +1 -49636
- package/dist/llms.txt +5 -1
- package/package.json +1 -1
- package/reference.md +85 -4
|
@@ -0,0 +1,40 @@
|
|
|
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.BatchUpdateMessagesMessageIds = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
const MessageId_js_1 = require("./MessageId.js");
|
|
40
|
+
exports.BatchUpdateMessagesMessageIds = core.serialization.list(MessageId_js_1.MessageId);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import type * as serializers from "../../../index.js";
|
|
4
|
+
import { BatchUpdateMessagesMessageIds } from "./BatchUpdateMessagesMessageIds.js";
|
|
5
|
+
import { UpdateMessageLabels } from "./UpdateMessageLabels.js";
|
|
6
|
+
export declare const BatchUpdateMessagesRequest: core.serialization.ObjectSchema<serializers.BatchUpdateMessagesRequest.Raw, AgentMail.BatchUpdateMessagesRequest>;
|
|
7
|
+
export declare namespace BatchUpdateMessagesRequest {
|
|
8
|
+
interface Raw {
|
|
9
|
+
message_ids: BatchUpdateMessagesMessageIds.Raw;
|
|
10
|
+
add_labels?: UpdateMessageLabels.Raw | null;
|
|
11
|
+
remove_labels?: UpdateMessageLabels.Raw | null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.BatchUpdateMessagesRequest = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
const BatchUpdateMessagesMessageIds_js_1 = require("./BatchUpdateMessagesMessageIds.js");
|
|
40
|
+
const UpdateMessageLabels_js_1 = require("./UpdateMessageLabels.js");
|
|
41
|
+
exports.BatchUpdateMessagesRequest = core.serialization.object({
|
|
42
|
+
messageIds: core.serialization.property("message_ids", BatchUpdateMessagesMessageIds_js_1.BatchUpdateMessagesMessageIds),
|
|
43
|
+
addLabels: core.serialization.property("add_labels", UpdateMessageLabels_js_1.UpdateMessageLabels.optional()),
|
|
44
|
+
removeLabels: core.serialization.property("remove_labels", UpdateMessageLabels_js_1.UpdateMessageLabels.optional()),
|
|
45
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import type * as serializers from "../../../index.js";
|
|
4
|
+
import { Count } from "../../../types/Count.js";
|
|
5
|
+
import { Limit } from "../../../types/Limit.js";
|
|
6
|
+
import { UpdateMessageResponse } from "./UpdateMessageResponse.js";
|
|
7
|
+
export declare const BatchUpdateMessagesResponse: core.serialization.ObjectSchema<serializers.BatchUpdateMessagesResponse.Raw, AgentMail.BatchUpdateMessagesResponse>;
|
|
8
|
+
export declare namespace BatchUpdateMessagesResponse {
|
|
9
|
+
interface Raw {
|
|
10
|
+
limit: Limit.Raw;
|
|
11
|
+
count: Count.Raw;
|
|
12
|
+
updates: UpdateMessageResponse.Raw[];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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.BatchUpdateMessagesResponse = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
const Count_js_1 = require("../../../types/Count.js");
|
|
40
|
+
const Limit_js_1 = require("../../../types/Limit.js");
|
|
41
|
+
const UpdateMessageResponse_js_1 = require("./UpdateMessageResponse.js");
|
|
42
|
+
exports.BatchUpdateMessagesResponse = core.serialization.object({
|
|
43
|
+
limit: Limit_js_1.Limit,
|
|
44
|
+
count: Count_js_1.Count,
|
|
45
|
+
updates: core.serialization.list(UpdateMessageResponse_js_1.UpdateMessageResponse),
|
|
46
|
+
});
|
|
@@ -2,6 +2,9 @@ export * from "./Addresses.js";
|
|
|
2
2
|
export * from "./BatchGetMessagesMessageIds.js";
|
|
3
3
|
export * from "./BatchGetMessagesRequest.js";
|
|
4
4
|
export * from "./BatchGetMessagesResponse.js";
|
|
5
|
+
export * from "./BatchUpdateMessagesMessageIds.js";
|
|
6
|
+
export * from "./BatchUpdateMessagesRequest.js";
|
|
7
|
+
export * from "./BatchUpdateMessagesResponse.js";
|
|
5
8
|
export * from "./ListMessagesResponse.js";
|
|
6
9
|
export * from "./Message.js";
|
|
7
10
|
export * from "./MessageAttachments.js";
|
|
@@ -18,6 +18,9 @@ __exportStar(require("./Addresses.js"), exports);
|
|
|
18
18
|
__exportStar(require("./BatchGetMessagesMessageIds.js"), exports);
|
|
19
19
|
__exportStar(require("./BatchGetMessagesRequest.js"), exports);
|
|
20
20
|
__exportStar(require("./BatchGetMessagesResponse.js"), exports);
|
|
21
|
+
__exportStar(require("./BatchUpdateMessagesMessageIds.js"), exports);
|
|
22
|
+
__exportStar(require("./BatchUpdateMessagesRequest.js"), exports);
|
|
23
|
+
__exportStar(require("./BatchUpdateMessagesResponse.js"), exports);
|
|
21
24
|
__exportStar(require("./ListMessagesResponse.js"), exports);
|
|
22
25
|
__exportStar(require("./Message.js"), exports);
|
|
23
26
|
__exportStar(require("./MessageAttachments.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.11";
|
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.11",
|
|
10
|
+
"User-Agent": "agentmail/0.5.11",
|
|
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,
|
|
@@ -93,6 +93,32 @@ export declare class MessagesClient {
|
|
|
93
93
|
*/
|
|
94
94
|
batchGet(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.BatchGetMessagesRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.BatchGetMessagesResponse>;
|
|
95
95
|
private __batchGet;
|
|
96
|
+
/**
|
|
97
|
+
* Apply one label change to up to 50 messages in a single request. The
|
|
98
|
+
* same add_labels and remove_labels apply to every message id, and at
|
|
99
|
+
* least one of them must be provided. The update is atomic: either all
|
|
100
|
+
* resolved messages are updated or none are. Missing or restricted ids
|
|
101
|
+
* are silently excluded; compare `count` against `limit` to detect
|
|
102
|
+
* exclusions.
|
|
103
|
+
*
|
|
104
|
+
* **CLI:**
|
|
105
|
+
* ```bash
|
|
106
|
+
* agentmail inboxes:messages batch-update --inbox-id <inbox_id> --message-id <id1> --message-id <id2> --add-label read --remove-label unread
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
110
|
+
* @param {AgentMail.BatchUpdateMessagesRequest} request
|
|
111
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
112
|
+
*
|
|
113
|
+
* @throws {@link AgentMail.ValidationError}
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* await client.inboxes.messages.batchUpdate("inbox_id", {
|
|
117
|
+
* messageIds: ["message_ids", "message_ids"]
|
|
118
|
+
* })
|
|
119
|
+
*/
|
|
120
|
+
batchUpdate(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.BatchUpdateMessagesRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.BatchUpdateMessagesResponse>;
|
|
121
|
+
private __batchUpdate;
|
|
96
122
|
/**
|
|
97
123
|
* **CLI:**
|
|
98
124
|
* ```bash
|
|
@@ -359,6 +359,89 @@ export class MessagesClient {
|
|
|
359
359
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/inboxes/{inbox_id}/messages/batch-get");
|
|
360
360
|
});
|
|
361
361
|
}
|
|
362
|
+
/**
|
|
363
|
+
* Apply one label change to up to 50 messages in a single request. The
|
|
364
|
+
* same add_labels and remove_labels apply to every message id, and at
|
|
365
|
+
* least one of them must be provided. The update is atomic: either all
|
|
366
|
+
* resolved messages are updated or none are. Missing or restricted ids
|
|
367
|
+
* are silently excluded; compare `count` against `limit` to detect
|
|
368
|
+
* exclusions.
|
|
369
|
+
*
|
|
370
|
+
* **CLI:**
|
|
371
|
+
* ```bash
|
|
372
|
+
* agentmail inboxes:messages batch-update --inbox-id <inbox_id> --message-id <id1> --message-id <id2> --add-label read --remove-label unread
|
|
373
|
+
* ```
|
|
374
|
+
*
|
|
375
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
376
|
+
* @param {AgentMail.BatchUpdateMessagesRequest} request
|
|
377
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
378
|
+
*
|
|
379
|
+
* @throws {@link AgentMail.ValidationError}
|
|
380
|
+
*
|
|
381
|
+
* @example
|
|
382
|
+
* await client.inboxes.messages.batchUpdate("inbox_id", {
|
|
383
|
+
* messageIds: ["message_ids", "message_ids"]
|
|
384
|
+
* })
|
|
385
|
+
*/
|
|
386
|
+
batchUpdate(inbox_id, request, requestOptions) {
|
|
387
|
+
return core.HttpResponsePromise.fromPromise(this.__batchUpdate(inbox_id, request, requestOptions));
|
|
388
|
+
}
|
|
389
|
+
__batchUpdate(inbox_id, request, requestOptions) {
|
|
390
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
391
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
392
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
393
|
+
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);
|
|
394
|
+
const _response = yield core.fetcher({
|
|
395
|
+
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)
|
|
396
|
+
.http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/messages/batch-update`),
|
|
397
|
+
method: "POST",
|
|
398
|
+
headers: _headers,
|
|
399
|
+
contentType: "application/json",
|
|
400
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
401
|
+
requestType: "json",
|
|
402
|
+
body: serializers.BatchUpdateMessagesRequest.jsonOrThrow(request, {
|
|
403
|
+
unrecognizedObjectKeys: "strip",
|
|
404
|
+
omitUndefined: true,
|
|
405
|
+
}),
|
|
406
|
+
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,
|
|
407
|
+
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,
|
|
408
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
409
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
410
|
+
logging: this._options.logging,
|
|
411
|
+
});
|
|
412
|
+
if (_response.ok) {
|
|
413
|
+
return {
|
|
414
|
+
data: serializers.BatchUpdateMessagesResponse.parseOrThrow(_response.body, {
|
|
415
|
+
unrecognizedObjectKeys: "passthrough",
|
|
416
|
+
allowUnrecognizedUnionMembers: true,
|
|
417
|
+
allowUnrecognizedEnumValues: true,
|
|
418
|
+
skipValidation: true,
|
|
419
|
+
breadcrumbsPrefix: ["response"],
|
|
420
|
+
}),
|
|
421
|
+
rawResponse: _response.rawResponse,
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
if (_response.error.reason === "status-code") {
|
|
425
|
+
switch (_response.error.statusCode) {
|
|
426
|
+
case 400:
|
|
427
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
428
|
+
unrecognizedObjectKeys: "passthrough",
|
|
429
|
+
allowUnrecognizedUnionMembers: true,
|
|
430
|
+
allowUnrecognizedEnumValues: true,
|
|
431
|
+
skipValidation: true,
|
|
432
|
+
breadcrumbsPrefix: ["response"],
|
|
433
|
+
}), _response.rawResponse);
|
|
434
|
+
default:
|
|
435
|
+
throw new errors.AgentMailError({
|
|
436
|
+
statusCode: _response.error.statusCode,
|
|
437
|
+
body: _response.error.body,
|
|
438
|
+
rawResponse: _response.rawResponse,
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/inboxes/{inbox_id}/messages/batch-update");
|
|
443
|
+
});
|
|
444
|
+
}
|
|
362
445
|
/**
|
|
363
446
|
* **CLI:**
|
|
364
447
|
* ```bash
|
|
@@ -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;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* IDs of messages to update. Maximum 50 ids per request. Duplicates are
|
|
4
|
+
* rejected with a validation error. IDs not found in the inbox (including
|
|
5
|
+
* cross-inbox or permission-restricted) are silently excluded from the
|
|
6
|
+
* update; callers detect exclusions by comparing `count` against `limit`.
|
|
7
|
+
*/
|
|
8
|
+
export type BatchUpdateMessagesMessageIds = AgentMail.MessageId[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
2
|
+
export interface BatchUpdateMessagesRequest {
|
|
3
|
+
messageIds: AgentMail.BatchUpdateMessagesMessageIds;
|
|
4
|
+
/** Label or labels to add to every message. */
|
|
5
|
+
addLabels?: AgentMail.UpdateMessageLabels;
|
|
6
|
+
/** Label or labels to remove from every message. */
|
|
7
|
+
removeLabels?: AgentMail.UpdateMessageLabels;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
2
|
+
export interface BatchUpdateMessagesResponse {
|
|
3
|
+
limit: AgentMail.Limit;
|
|
4
|
+
count: AgentMail.Count;
|
|
5
|
+
/**
|
|
6
|
+
* Updated messages with their new labels. Order matches `message_ids`
|
|
7
|
+
* in the request. Excluded ids are omitted, so `count` may be less than
|
|
8
|
+
* `limit`.
|
|
9
|
+
*/
|
|
10
|
+
updates: AgentMail.UpdateMessageResponse[];
|
|
11
|
+
}
|
|
@@ -2,6 +2,9 @@ export * from "./Addresses.mjs";
|
|
|
2
2
|
export * from "./BatchGetMessagesMessageIds.mjs";
|
|
3
3
|
export * from "./BatchGetMessagesRequest.mjs";
|
|
4
4
|
export * from "./BatchGetMessagesResponse.mjs";
|
|
5
|
+
export * from "./BatchUpdateMessagesMessageIds.mjs";
|
|
6
|
+
export * from "./BatchUpdateMessagesRequest.mjs";
|
|
7
|
+
export * from "./BatchUpdateMessagesResponse.mjs";
|
|
5
8
|
export * from "./ListMessagesResponse.mjs";
|
|
6
9
|
export * from "./Message.mjs";
|
|
7
10
|
export * from "./MessageAttachments.mjs";
|
|
@@ -2,6 +2,9 @@ export * from "./Addresses.mjs";
|
|
|
2
2
|
export * from "./BatchGetMessagesMessageIds.mjs";
|
|
3
3
|
export * from "./BatchGetMessagesRequest.mjs";
|
|
4
4
|
export * from "./BatchGetMessagesResponse.mjs";
|
|
5
|
+
export * from "./BatchUpdateMessagesMessageIds.mjs";
|
|
6
|
+
export * from "./BatchUpdateMessagesRequest.mjs";
|
|
7
|
+
export * from "./BatchUpdateMessagesResponse.mjs";
|
|
5
8
|
export * from "./ListMessagesResponse.mjs";
|
|
6
9
|
export * from "./Message.mjs";
|
|
7
10
|
export * from "./MessageAttachments.mjs";
|
|
@@ -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,
|
|
@@ -3,10 +3,12 @@ import * as core from "../../../../core/index.mjs";
|
|
|
3
3
|
import type * as serializers from "../../../index.mjs";
|
|
4
4
|
import { DomainName } from "./DomainName.mjs";
|
|
5
5
|
import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
|
|
6
|
+
import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
|
|
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
|
}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import { DomainName } from "./DomainName.mjs";
|
|
4
4
|
import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
|
|
5
|
+
import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
|
|
5
6
|
export const CreateDomainRequest = core.serialization.object({
|
|
6
7
|
domain: DomainName,
|
|
7
|
-
feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled),
|
|
8
|
+
feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled.optional()),
|
|
9
|
+
subdomainsEnabled: core.serialization.property("subdomains_enabled", SubdomainsEnabled.optional()),
|
|
8
10
|
});
|