agentmail 0.4.8 → 0.4.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/apiKeys/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/apiKeys/client/Client.js +7 -7
- package/dist/cjs/api/resources/apiKeys/types/ApiKey.d.ts +2 -0
- package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyResponse.d.ts +2 -0
- package/dist/cjs/api/resources/domains/types/Domain.d.ts +2 -2
- package/dist/cjs/api/resources/domains/types/DomainId.d.ts +1 -1
- package/dist/cjs/api/resources/domains/types/DomainItem.d.ts +2 -0
- package/dist/cjs/api/resources/domains/types/DomainName.d.ts +1 -1
- package/dist/cjs/api/resources/domains/types/Status.d.ts +5 -0
- package/dist/cjs/api/resources/domains/types/Status.js +3 -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 +3 -0
- package/dist/cjs/api/resources/inboxes/client/Client.js +15 -10
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/Client.d.ts +52 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/Client.js +262 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/requests/ListApiKeysRequest.d.ts +9 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/requests/ListApiKeysRequest.js +3 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/index.js +3 -1
- package/dist/cjs/api/resources/inboxes/types/Email.d.ts +4 -0
- package/dist/cjs/api/resources/inboxes/types/Email.js +3 -0
- package/dist/cjs/api/resources/inboxes/types/Inbox.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/types/index.js +1 -0
- package/dist/cjs/api/resources/pods/resources/apiKeys/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/pods/resources/apiKeys/client/Client.js +7 -7
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKey.d.ts +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKey.js +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.ts +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.js +1 -0
- package/dist/cjs/serialization/resources/domains/types/Domain.d.ts +4 -2
- package/dist/cjs/serialization/resources/domains/types/Domain.js +4 -2
- package/dist/cjs/serialization/resources/domains/types/DomainItem.d.ts +4 -0
- package/dist/cjs/serialization/resources/domains/types/DomainItem.js +4 -0
- package/dist/cjs/serialization/resources/domains/types/Status.d.ts +8 -0
- package/dist/cjs/serialization/resources/domains/types/Status.js +6 -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/inboxes/types/Email.d.ts +7 -0
- package/dist/cjs/serialization/resources/inboxes/types/Email.js +39 -0
- package/dist/cjs/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/Inbox.js +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/inboxes/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/apiKeys/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/apiKeys/client/Client.mjs +7 -7
- package/dist/esm/api/resources/apiKeys/types/ApiKey.d.mts +2 -0
- package/dist/esm/api/resources/apiKeys/types/CreateApiKeyResponse.d.mts +2 -0
- package/dist/esm/api/resources/domains/types/Domain.d.mts +2 -2
- package/dist/esm/api/resources/domains/types/DomainId.d.mts +1 -1
- package/dist/esm/api/resources/domains/types/DomainItem.d.mts +2 -0
- package/dist/esm/api/resources/domains/types/DomainName.d.mts +1 -1
- package/dist/esm/api/resources/domains/types/Status.d.mts +5 -0
- package/dist/esm/api/resources/domains/types/Status.mjs +2 -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 +3 -0
- package/dist/esm/api/resources/inboxes/client/Client.mjs +5 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/Client.d.mts +52 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/Client.mjs +225 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/requests/ListApiKeysRequest.d.mts +9 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/requests/ListApiKeysRequest.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/index.mjs +2 -0
- package/dist/esm/api/resources/inboxes/types/Email.d.mts +4 -0
- package/dist/esm/api/resources/inboxes/types/Email.mjs +2 -0
- package/dist/esm/api/resources/inboxes/types/Inbox.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/types/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/types/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/apiKeys/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/pods/resources/apiKeys/client/Client.mjs +7 -7
- package/dist/esm/serialization/resources/apiKeys/types/ApiKey.d.mts +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKey.mjs +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.mts +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.mjs +1 -0
- package/dist/esm/serialization/resources/domains/types/Domain.d.mts +4 -2
- package/dist/esm/serialization/resources/domains/types/Domain.mjs +4 -2
- package/dist/esm/serialization/resources/domains/types/DomainItem.d.mts +4 -0
- package/dist/esm/serialization/resources/domains/types/DomainItem.mjs +4 -0
- package/dist/esm/serialization/resources/domains/types/Status.d.mts +8 -0
- package/dist/esm/serialization/resources/domains/types/Status.mjs +3 -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/inboxes/types/Email.d.mts +7 -0
- package/dist/esm/serialization/resources/inboxes/types/Email.mjs +3 -0
- package/dist/esm/serialization/resources/inboxes/types/Inbox.d.mts +2 -0
- package/dist/esm/serialization/resources/inboxes/types/Inbox.mjs +2 -0
- package/dist/esm/serialization/resources/inboxes/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/inboxes/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 +1257 -335
- package/dist/llms.txt +5 -1
- package/package.json +1 -1
- package/reference.md +180 -6
|
@@ -2,6 +2,7 @@ import type * as AgentMail from "../../../index.js";
|
|
|
2
2
|
export interface Inbox {
|
|
3
3
|
podId: AgentMail.pods.PodId;
|
|
4
4
|
inboxId: AgentMail.inboxes.InboxId;
|
|
5
|
+
email: AgentMail.inboxes.Email;
|
|
5
6
|
displayName?: AgentMail.inboxes.DisplayName;
|
|
6
7
|
clientId?: AgentMail.inboxes.ClientId;
|
|
7
8
|
/** Time at which inbox was last updated. */
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ClientId.js"), exports);
|
|
18
18
|
__exportStar(require("./CreateInboxRequest.js"), exports);
|
|
19
19
|
__exportStar(require("./DisplayName.js"), exports);
|
|
20
|
+
__exportStar(require("./Email.js"), exports);
|
|
20
21
|
__exportStar(require("./Inbox.js"), exports);
|
|
21
22
|
__exportStar(require("./InboxId.js"), exports);
|
|
22
23
|
__exportStar(require("./ListInboxesResponse.js"), exports);
|
|
@@ -39,14 +39,14 @@ export declare class ApiKeysClient {
|
|
|
39
39
|
private __create;
|
|
40
40
|
/**
|
|
41
41
|
* @param {AgentMail.pods.PodId} pod_id
|
|
42
|
-
* @param {AgentMail.ApiKeyId}
|
|
42
|
+
* @param {AgentMail.ApiKeyId} api_key_id
|
|
43
43
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
44
|
*
|
|
45
45
|
* @throws {@link AgentMail.NotFoundError}
|
|
46
46
|
*
|
|
47
47
|
* @example
|
|
48
|
-
* await client.pods.apiKeys.delete("pod_id", "
|
|
48
|
+
* await client.pods.apiKeys.delete("pod_id", "api_key_id")
|
|
49
49
|
*/
|
|
50
|
-
delete(pod_id: AgentMail.pods.PodId,
|
|
50
|
+
delete(pod_id: AgentMail.pods.PodId, api_key_id: AgentMail.ApiKeyId, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
51
51
|
private __delete;
|
|
52
52
|
}
|
|
@@ -206,25 +206,25 @@ class ApiKeysClient {
|
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
208
|
* @param {AgentMail.pods.PodId} pod_id
|
|
209
|
-
* @param {AgentMail.ApiKeyId}
|
|
209
|
+
* @param {AgentMail.ApiKeyId} api_key_id
|
|
210
210
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
211
211
|
*
|
|
212
212
|
* @throws {@link AgentMail.NotFoundError}
|
|
213
213
|
*
|
|
214
214
|
* @example
|
|
215
|
-
* await client.pods.apiKeys.delete("pod_id", "
|
|
215
|
+
* await client.pods.apiKeys.delete("pod_id", "api_key_id")
|
|
216
216
|
*/
|
|
217
|
-
delete(pod_id,
|
|
218
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(pod_id,
|
|
217
|
+
delete(pod_id, api_key_id, requestOptions) {
|
|
218
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(pod_id, api_key_id, requestOptions));
|
|
219
219
|
}
|
|
220
|
-
__delete(pod_id,
|
|
220
|
+
__delete(pod_id, api_key_id, requestOptions) {
|
|
221
221
|
return __awaiter(this, void 0, void 0, function* () {
|
|
222
222
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
223
223
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
224
224
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
225
225
|
const _response = yield core.fetcher({
|
|
226
226
|
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)
|
|
227
|
-
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/api-keys/${core.url.encodePathParam(serializers.ApiKeyId.jsonOrThrow(
|
|
227
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/api-keys/${core.url.encodePathParam(serializers.ApiKeyId.jsonOrThrow(api_key_id, { omitUndefined: true }))}`),
|
|
228
228
|
method: "DELETE",
|
|
229
229
|
headers: _headers,
|
|
230
230
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -255,7 +255,7 @@ class ApiKeysClient {
|
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v0/pods/{pod_id}/api-keys/{
|
|
258
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v0/pods/{pod_id}/api-keys/{api_key_id}");
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
}
|
|
@@ -45,6 +45,7 @@ exports.ApiKey = core.serialization.object({
|
|
|
45
45
|
prefix: Prefix_js_1.Prefix,
|
|
46
46
|
name: Name_js_1.Name,
|
|
47
47
|
podId: core.serialization.property("pod_id", core.serialization.string().optional()),
|
|
48
|
+
inboxId: core.serialization.property("inbox_id", core.serialization.string().optional()),
|
|
48
49
|
usedAt: core.serialization.property("used_at", core.serialization.date().optional()),
|
|
49
50
|
createdAt: core.serialization.property("created_at", CreatedAt_js_1.CreatedAt),
|
|
50
51
|
});
|
|
@@ -46,5 +46,6 @@ exports.CreateApiKeyResponse = core.serialization.object({
|
|
|
46
46
|
prefix: Prefix_js_1.Prefix,
|
|
47
47
|
name: Name_js_1.Name,
|
|
48
48
|
podId: core.serialization.property("pod_id", core.serialization.string().optional()),
|
|
49
|
+
inboxId: core.serialization.property("inbox_id", core.serialization.string().optional()),
|
|
49
50
|
createdAt: core.serialization.property("created_at", CreatedAt_js_1.CreatedAt),
|
|
50
51
|
});
|
|
@@ -4,15 +4,17 @@ import type * as serializers from "../../../index.js";
|
|
|
4
4
|
import { PodId } from "../../pods/types/PodId.js";
|
|
5
5
|
import { ClientId } from "./ClientId.js";
|
|
6
6
|
import { DomainId } from "./DomainId.js";
|
|
7
|
+
import { DomainName } from "./DomainName.js";
|
|
7
8
|
import { FeedbackEnabled } from "./FeedbackEnabled.js";
|
|
9
|
+
import { Status } from "./Status.js";
|
|
8
10
|
import { VerificationRecord } from "./VerificationRecord.js";
|
|
9
|
-
import { VerificationStatus } from "./VerificationStatus.js";
|
|
10
11
|
export declare const Domain: core.serialization.ObjectSchema<serializers.Domain.Raw, AgentMail.Domain>;
|
|
11
12
|
export declare namespace Domain {
|
|
12
13
|
interface Raw {
|
|
13
14
|
pod_id?: PodId.Raw | null;
|
|
14
15
|
domain_id: DomainId.Raw;
|
|
15
|
-
|
|
16
|
+
domain: DomainName.Raw;
|
|
17
|
+
status: Status.Raw;
|
|
16
18
|
feedback_enabled: FeedbackEnabled.Raw;
|
|
17
19
|
records: VerificationRecord.Raw[];
|
|
18
20
|
client_id?: ClientId.Raw | null;
|
|
@@ -39,13 +39,15 @@ const core = __importStar(require("../../../../core/index.js"));
|
|
|
39
39
|
const PodId_js_1 = require("../../pods/types/PodId.js");
|
|
40
40
|
const ClientId_js_1 = require("./ClientId.js");
|
|
41
41
|
const DomainId_js_1 = require("./DomainId.js");
|
|
42
|
+
const DomainName_js_1 = require("./DomainName.js");
|
|
42
43
|
const FeedbackEnabled_js_1 = require("./FeedbackEnabled.js");
|
|
44
|
+
const Status_js_1 = require("./Status.js");
|
|
43
45
|
const VerificationRecord_js_1 = require("./VerificationRecord.js");
|
|
44
|
-
const VerificationStatus_js_1 = require("./VerificationStatus.js");
|
|
45
46
|
exports.Domain = core.serialization.object({
|
|
46
47
|
podId: core.serialization.property("pod_id", PodId_js_1.PodId.optional()),
|
|
47
48
|
domainId: core.serialization.property("domain_id", DomainId_js_1.DomainId),
|
|
48
|
-
|
|
49
|
+
domain: DomainName_js_1.DomainName,
|
|
50
|
+
status: Status_js_1.Status,
|
|
49
51
|
feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled_js_1.FeedbackEnabled),
|
|
50
52
|
records: core.serialization.list(VerificationRecord_js_1.VerificationRecord),
|
|
51
53
|
clientId: core.serialization.property("client_id", ClientId_js_1.ClientId.optional()),
|
|
@@ -4,12 +4,16 @@ import type * as serializers from "../../../index.js";
|
|
|
4
4
|
import { PodId } from "../../pods/types/PodId.js";
|
|
5
5
|
import { ClientId } from "./ClientId.js";
|
|
6
6
|
import { DomainId } from "./DomainId.js";
|
|
7
|
+
import { DomainName } from "./DomainName.js";
|
|
7
8
|
import { FeedbackEnabled } from "./FeedbackEnabled.js";
|
|
9
|
+
import { Status } from "./Status.js";
|
|
8
10
|
export declare const DomainItem: core.serialization.ObjectSchema<serializers.DomainItem.Raw, AgentMail.DomainItem>;
|
|
9
11
|
export declare namespace DomainItem {
|
|
10
12
|
interface Raw {
|
|
11
13
|
pod_id?: PodId.Raw | null;
|
|
12
14
|
domain_id: DomainId.Raw;
|
|
15
|
+
domain: DomainName.Raw;
|
|
16
|
+
status: Status.Raw;
|
|
13
17
|
feedback_enabled: FeedbackEnabled.Raw;
|
|
14
18
|
client_id?: ClientId.Raw | null;
|
|
15
19
|
updated_at: string;
|
|
@@ -39,10 +39,14 @@ const core = __importStar(require("../../../../core/index.js"));
|
|
|
39
39
|
const PodId_js_1 = require("../../pods/types/PodId.js");
|
|
40
40
|
const ClientId_js_1 = require("./ClientId.js");
|
|
41
41
|
const DomainId_js_1 = require("./DomainId.js");
|
|
42
|
+
const DomainName_js_1 = require("./DomainName.js");
|
|
42
43
|
const FeedbackEnabled_js_1 = require("./FeedbackEnabled.js");
|
|
44
|
+
const Status_js_1 = require("./Status.js");
|
|
43
45
|
exports.DomainItem = core.serialization.object({
|
|
44
46
|
podId: core.serialization.property("pod_id", PodId_js_1.PodId.optional()),
|
|
45
47
|
domainId: core.serialization.property("domain_id", DomainId_js_1.DomainId),
|
|
48
|
+
domain: DomainName_js_1.DomainName,
|
|
49
|
+
status: Status_js_1.Status,
|
|
46
50
|
feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled_js_1.FeedbackEnabled),
|
|
47
51
|
clientId: core.serialization.property("client_id", ClientId_js_1.ClientId.optional()),
|
|
48
52
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.js";
|
|
2
|
+
import type * as core from "../../../../core/index.js";
|
|
3
|
+
import type * as serializers from "../../../index.js";
|
|
4
|
+
import { VerificationStatus } from "./VerificationStatus.js";
|
|
5
|
+
export declare const Status: core.serialization.Schema<serializers.Status.Raw, AgentMail.Status>;
|
|
6
|
+
export declare namespace Status {
|
|
7
|
+
type Raw = VerificationStatus.Raw;
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Status = void 0;
|
|
5
|
+
const VerificationStatus_js_1 = require("./VerificationStatus.js");
|
|
6
|
+
exports.Status = VerificationStatus_js_1.VerificationStatus;
|
|
@@ -8,6 +8,7 @@ export * from "./FeedbackEnabled.js";
|
|
|
8
8
|
export * from "./ListDomainsResponse.js";
|
|
9
9
|
export * from "./RecordStatus.js";
|
|
10
10
|
export * from "./RecordType.js";
|
|
11
|
+
export * from "./Status.js";
|
|
11
12
|
export * from "./UpdateDomainRequest.js";
|
|
12
13
|
export * from "./VerificationRecord.js";
|
|
13
14
|
export * from "./VerificationStatus.js";
|
|
@@ -24,6 +24,7 @@ __exportStar(require("./FeedbackEnabled.js"), exports);
|
|
|
24
24
|
__exportStar(require("./ListDomainsResponse.js"), exports);
|
|
25
25
|
__exportStar(require("./RecordStatus.js"), exports);
|
|
26
26
|
__exportStar(require("./RecordType.js"), exports);
|
|
27
|
+
__exportStar(require("./Status.js"), exports);
|
|
27
28
|
__exportStar(require("./UpdateDomainRequest.js"), exports);
|
|
28
29
|
__exportStar(require("./VerificationRecord.js"), exports);
|
|
29
30
|
__exportStar(require("./VerificationStatus.js"), exports);
|
|
@@ -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 Email: core.serialization.Schema<serializers.inboxes.Email.Raw, AgentMail.inboxes.Email>;
|
|
5
|
+
export declare namespace Email {
|
|
6
|
+
type Raw = string;
|
|
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.Email = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
exports.Email = core.serialization.string();
|
|
@@ -4,12 +4,14 @@ import type * as serializers from "../../../index.js";
|
|
|
4
4
|
import { PodId } from "../../pods/types/PodId.js";
|
|
5
5
|
import { ClientId } from "./ClientId.js";
|
|
6
6
|
import { DisplayName } from "./DisplayName.js";
|
|
7
|
+
import { Email } from "./Email.js";
|
|
7
8
|
import { InboxId } from "./InboxId.js";
|
|
8
9
|
export declare const Inbox: core.serialization.ObjectSchema<serializers.inboxes.Inbox.Raw, AgentMail.inboxes.Inbox>;
|
|
9
10
|
export declare namespace Inbox {
|
|
10
11
|
interface Raw {
|
|
11
12
|
pod_id: PodId.Raw;
|
|
12
13
|
inbox_id: InboxId.Raw;
|
|
14
|
+
email: Email.Raw;
|
|
13
15
|
display_name?: DisplayName.Raw | null;
|
|
14
16
|
client_id?: ClientId.Raw | null;
|
|
15
17
|
updated_at: string;
|
|
@@ -39,10 +39,12 @@ const core = __importStar(require("../../../../core/index.js"));
|
|
|
39
39
|
const PodId_js_1 = require("../../pods/types/PodId.js");
|
|
40
40
|
const ClientId_js_1 = require("./ClientId.js");
|
|
41
41
|
const DisplayName_js_1 = require("./DisplayName.js");
|
|
42
|
+
const Email_js_1 = require("./Email.js");
|
|
42
43
|
const InboxId_js_1 = require("./InboxId.js");
|
|
43
44
|
exports.Inbox = core.serialization.object({
|
|
44
45
|
podId: core.serialization.property("pod_id", PodId_js_1.PodId),
|
|
45
46
|
inboxId: core.serialization.property("inbox_id", InboxId_js_1.InboxId),
|
|
47
|
+
email: Email_js_1.Email,
|
|
46
48
|
displayName: core.serialization.property("display_name", DisplayName_js_1.DisplayName.optional()),
|
|
47
49
|
clientId: core.serialization.property("client_id", ClientId_js_1.ClientId.optional()),
|
|
48
50
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ClientId.js"), exports);
|
|
18
18
|
__exportStar(require("./CreateInboxRequest.js"), exports);
|
|
19
19
|
__exportStar(require("./DisplayName.js"), exports);
|
|
20
|
+
__exportStar(require("./Email.js"), exports);
|
|
20
21
|
__exportStar(require("./Inbox.js"), exports);
|
|
21
22
|
__exportStar(require("./InboxId.js"), exports);
|
|
22
23
|
__exportStar(require("./ListInboxesResponse.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.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.4.
|
|
10
|
-
"User-Agent": "agentmail/0.4.
|
|
9
|
+
"X-Fern-SDK-Version": "0.4.10",
|
|
10
|
+
"User-Agent": "agentmail/0.4.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);
|
|
@@ -33,14 +33,14 @@ export declare class ApiKeysClient {
|
|
|
33
33
|
create(request: AgentMail.CreateApiKeyRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<AgentMail.CreateApiKeyResponse>;
|
|
34
34
|
private __create;
|
|
35
35
|
/**
|
|
36
|
-
* @param {AgentMail.ApiKeyId}
|
|
36
|
+
* @param {AgentMail.ApiKeyId} api_key_id
|
|
37
37
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
38
|
*
|
|
39
39
|
* @throws {@link AgentMail.NotFoundError}
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
|
-
* await client.apiKeys.delete("
|
|
42
|
+
* await client.apiKeys.delete("api_key_id")
|
|
43
43
|
*/
|
|
44
|
-
delete(
|
|
44
|
+
delete(api_key_id: AgentMail.ApiKeyId, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
45
45
|
private __delete;
|
|
46
46
|
}
|
|
@@ -146,25 +146,25 @@ export class ApiKeysClient {
|
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
|
-
* @param {AgentMail.ApiKeyId}
|
|
149
|
+
* @param {AgentMail.ApiKeyId} api_key_id
|
|
150
150
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
151
151
|
*
|
|
152
152
|
* @throws {@link AgentMail.NotFoundError}
|
|
153
153
|
*
|
|
154
154
|
* @example
|
|
155
|
-
* await client.apiKeys.delete("
|
|
155
|
+
* await client.apiKeys.delete("api_key_id")
|
|
156
156
|
*/
|
|
157
|
-
delete(
|
|
158
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(
|
|
157
|
+
delete(api_key_id, requestOptions) {
|
|
158
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(api_key_id, requestOptions));
|
|
159
159
|
}
|
|
160
|
-
__delete(
|
|
160
|
+
__delete(api_key_id, requestOptions) {
|
|
161
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
162
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
163
163
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
164
164
|
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);
|
|
165
165
|
const _response = yield core.fetcher({
|
|
166
166
|
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)
|
|
167
|
-
.http, `/v0/api-keys/${core.url.encodePathParam(serializers.ApiKeyId.jsonOrThrow(
|
|
167
|
+
.http, `/v0/api-keys/${core.url.encodePathParam(serializers.ApiKeyId.jsonOrThrow(api_key_id, { omitUndefined: true }))}`),
|
|
168
168
|
method: "DELETE",
|
|
169
169
|
headers: _headers,
|
|
170
170
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -195,7 +195,7 @@ export class ApiKeysClient {
|
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/api-keys/{
|
|
198
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/api-keys/{api_key_id}");
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
}
|
|
@@ -5,6 +5,8 @@ export interface ApiKey {
|
|
|
5
5
|
name: AgentMail.Name;
|
|
6
6
|
/** Pod ID the api key is scoped to. If set, the key can only access resources within this pod. */
|
|
7
7
|
podId?: string;
|
|
8
|
+
/** Inbox ID the api key is scoped to. If set, the key can only access resources within this inbox. */
|
|
9
|
+
inboxId?: string;
|
|
8
10
|
/** Time at which api key was last used. */
|
|
9
11
|
usedAt?: Date;
|
|
10
12
|
createdAt: AgentMail.CreatedAt;
|
|
@@ -2,8 +2,8 @@ import type * as AgentMail from "../../../index.mjs";
|
|
|
2
2
|
export interface Domain {
|
|
3
3
|
podId?: AgentMail.pods.PodId;
|
|
4
4
|
domainId: AgentMail.DomainId;
|
|
5
|
-
|
|
6
|
-
status: AgentMail.
|
|
5
|
+
domain: AgentMail.DomainName;
|
|
6
|
+
status: AgentMail.Status;
|
|
7
7
|
feedbackEnabled: AgentMail.FeedbackEnabled;
|
|
8
8
|
/** A list of DNS records required to verify the domain. */
|
|
9
9
|
records: AgentMail.VerificationRecord[];
|
|
@@ -2,6 +2,8 @@ import type * as AgentMail from "../../../index.mjs";
|
|
|
2
2
|
export interface DomainItem {
|
|
3
3
|
podId?: AgentMail.pods.PodId;
|
|
4
4
|
domainId: AgentMail.DomainId;
|
|
5
|
+
domain: AgentMail.DomainName;
|
|
6
|
+
status: AgentMail.Status;
|
|
5
7
|
feedbackEnabled: AgentMail.FeedbackEnabled;
|
|
6
8
|
clientId?: AgentMail.ClientId;
|
|
7
9
|
/** Time at which the domain was last updated. */
|
|
@@ -8,6 +8,7 @@ export * from "./FeedbackEnabled.mjs";
|
|
|
8
8
|
export * from "./ListDomainsResponse.mjs";
|
|
9
9
|
export * from "./RecordStatus.mjs";
|
|
10
10
|
export * from "./RecordType.mjs";
|
|
11
|
+
export * from "./Status.mjs";
|
|
11
12
|
export * from "./UpdateDomainRequest.mjs";
|
|
12
13
|
export * from "./VerificationRecord.mjs";
|
|
13
14
|
export * from "./VerificationStatus.mjs";
|
|
@@ -8,6 +8,7 @@ export * from "./FeedbackEnabled.mjs";
|
|
|
8
8
|
export * from "./ListDomainsResponse.mjs";
|
|
9
9
|
export * from "./RecordStatus.mjs";
|
|
10
10
|
export * from "./RecordType.mjs";
|
|
11
|
+
export * from "./Status.mjs";
|
|
11
12
|
export * from "./UpdateDomainRequest.mjs";
|
|
12
13
|
export * from "./VerificationRecord.mjs";
|
|
13
14
|
export * from "./VerificationStatus.mjs";
|
|
@@ -2,6 +2,7 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClie
|
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../core/index.mjs";
|
|
4
4
|
import * as AgentMail from "../../../index.mjs";
|
|
5
|
+
import { ApiKeysClient } from "../resources/apiKeys/client/Client.mjs";
|
|
5
6
|
import { DraftsClient } from "../resources/drafts/client/Client.mjs";
|
|
6
7
|
import { ListsClient } from "../resources/lists/client/Client.mjs";
|
|
7
8
|
import { MessagesClient } from "../resources/messages/client/Client.mjs";
|
|
@@ -19,12 +20,14 @@ export declare class InboxesClient {
|
|
|
19
20
|
protected _drafts: DraftsClient | undefined;
|
|
20
21
|
protected _lists: ListsClient | undefined;
|
|
21
22
|
protected _metrics: MetricsClient | undefined;
|
|
23
|
+
protected _apiKeys: ApiKeysClient | undefined;
|
|
22
24
|
constructor(options?: InboxesClient.Options);
|
|
23
25
|
get threads(): ThreadsClient;
|
|
24
26
|
get messages(): MessagesClient;
|
|
25
27
|
get drafts(): DraftsClient;
|
|
26
28
|
get lists(): ListsClient;
|
|
27
29
|
get metrics(): MetricsClient;
|
|
30
|
+
get apiKeys(): ApiKeysClient;
|
|
28
31
|
/**
|
|
29
32
|
* @param {AgentMail.inboxes.ListInboxesRequest} request
|
|
30
33
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -16,6 +16,7 @@ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCode
|
|
|
16
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
17
17
|
import * as serializers from "../../../../serialization/index.mjs";
|
|
18
18
|
import * as AgentMail from "../../../index.mjs";
|
|
19
|
+
import { ApiKeysClient } from "../resources/apiKeys/client/Client.mjs";
|
|
19
20
|
import { DraftsClient } from "../resources/drafts/client/Client.mjs";
|
|
20
21
|
import { ListsClient } from "../resources/lists/client/Client.mjs";
|
|
21
22
|
import { MessagesClient } from "../resources/messages/client/Client.mjs";
|
|
@@ -45,6 +46,10 @@ export class InboxesClient {
|
|
|
45
46
|
var _a;
|
|
46
47
|
return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new MetricsClient(this._options)));
|
|
47
48
|
}
|
|
49
|
+
get apiKeys() {
|
|
50
|
+
var _a;
|
|
51
|
+
return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new ApiKeysClient(this._options)));
|
|
52
|
+
}
|
|
48
53
|
/**
|
|
49
54
|
* @param {AgentMail.inboxes.ListInboxesRequest} request
|
|
50
55
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -0,0 +1,52 @@
|
|
|
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 ApiKeysClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class ApiKeysClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ApiKeysClient.Options>;
|
|
12
|
+
constructor(options?: ApiKeysClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
15
|
+
* @param {AgentMail.inboxes.ListApiKeysRequest} request
|
|
16
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
|
+
*
|
|
18
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* await client.inboxes.apiKeys.list("inbox_id")
|
|
22
|
+
*/
|
|
23
|
+
list(inbox_id: AgentMail.inboxes.InboxId, request?: AgentMail.inboxes.ListApiKeysRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListApiKeysResponse>;
|
|
24
|
+
private __list;
|
|
25
|
+
/**
|
|
26
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
27
|
+
* @param {AgentMail.CreateApiKeyRequest} request
|
|
28
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
|
+
*
|
|
30
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
31
|
+
* @throws {@link AgentMail.ValidationError}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* await client.inboxes.apiKeys.create("inbox_id", {
|
|
35
|
+
* name: "name"
|
|
36
|
+
* })
|
|
37
|
+
*/
|
|
38
|
+
create(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.CreateApiKeyRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<AgentMail.CreateApiKeyResponse>;
|
|
39
|
+
private __create;
|
|
40
|
+
/**
|
|
41
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
42
|
+
* @param {AgentMail.ApiKeyId} api_key_id
|
|
43
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* await client.inboxes.apiKeys.delete("inbox_id", "api_key_id")
|
|
49
|
+
*/
|
|
50
|
+
delete(inbox_id: AgentMail.inboxes.InboxId, api_key_id: AgentMail.ApiKeyId, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
51
|
+
private __delete;
|
|
52
|
+
}
|