agentmail 0.4.9 → 0.4.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/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 +1 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKeyPermissions.d.ts +75 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKeyPermissions.js +3 -0
- package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyRequest.d.ts +1 -0
- package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyResponse.d.ts +1 -0
- package/dist/cjs/api/resources/apiKeys/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/apiKeys/types/index.js +1 -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/resources/apiKeys/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/Client.js +7 -7
- 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 +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKey.js +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyPermissions.d.ts +43 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyPermissions.js +75 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyRequest.js +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.ts +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.js +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/index.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 +1 -0
- package/dist/esm/api/resources/apiKeys/types/ApiKeyPermissions.d.mts +75 -0
- package/dist/esm/api/resources/apiKeys/types/ApiKeyPermissions.mjs +2 -0
- package/dist/esm/api/resources/apiKeys/types/CreateApiKeyRequest.d.mts +1 -0
- package/dist/esm/api/resources/apiKeys/types/CreateApiKeyResponse.d.mts +1 -0
- package/dist/esm/api/resources/apiKeys/types/index.d.mts +1 -0
- package/dist/esm/api/resources/apiKeys/types/index.mjs +1 -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/resources/apiKeys/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/Client.mjs +7 -7
- 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 +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKey.mjs +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKeyPermissions.d.mts +43 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKeyPermissions.mjs +39 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyRequest.mjs +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.mts +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.mjs +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/index.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 +1886 -775
- package/dist/llms.txt +4 -0
- package/package.json +1 -1
- package/reference.md +9 -9
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.4.
|
|
47
|
-
"User-Agent": "agentmail/0.4.
|
|
46
|
+
"X-Fern-SDK-Version": "0.4.11",
|
|
47
|
+
"User-Agent": "agentmail/0.4.11",
|
|
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);
|
|
@@ -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
|
}
|
|
@@ -182,25 +182,25 @@ class ApiKeysClient {
|
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
184
|
/**
|
|
185
|
-
* @param {AgentMail.ApiKeyId}
|
|
185
|
+
* @param {AgentMail.ApiKeyId} api_key_id
|
|
186
186
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
187
187
|
*
|
|
188
188
|
* @throws {@link AgentMail.NotFoundError}
|
|
189
189
|
*
|
|
190
190
|
* @example
|
|
191
|
-
* await client.apiKeys.delete("
|
|
191
|
+
* await client.apiKeys.delete("api_key_id")
|
|
192
192
|
*/
|
|
193
|
-
delete(
|
|
194
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(
|
|
193
|
+
delete(api_key_id, requestOptions) {
|
|
194
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(api_key_id, requestOptions));
|
|
195
195
|
}
|
|
196
|
-
__delete(
|
|
196
|
+
__delete(api_key_id, requestOptions) {
|
|
197
197
|
return __awaiter(this, void 0, void 0, function* () {
|
|
198
198
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
199
199
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
200
200
|
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);
|
|
201
201
|
const _response = yield core.fetcher({
|
|
202
202
|
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)
|
|
203
|
-
.http, `/v0/api-keys/${core.url.encodePathParam(serializers.ApiKeyId.jsonOrThrow(
|
|
203
|
+
.http, `/v0/api-keys/${core.url.encodePathParam(serializers.ApiKeyId.jsonOrThrow(api_key_id, { omitUndefined: true }))}`),
|
|
204
204
|
method: "DELETE",
|
|
205
205
|
headers: _headers,
|
|
206
206
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -231,7 +231,7 @@ class ApiKeysClient {
|
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v0/api-keys/{
|
|
234
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v0/api-keys/{api_key_id}");
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Granular permissions for the API key. When ommitted all permissions are granted. Otherwise, only permissions set to true are granted.
|
|
3
|
+
*/
|
|
4
|
+
export interface ApiKeyPermissions {
|
|
5
|
+
/** Read inbox details. */
|
|
6
|
+
readInbox?: boolean;
|
|
7
|
+
/** Create new inboxes. */
|
|
8
|
+
createInbox?: boolean;
|
|
9
|
+
/** Update inbox settings. */
|
|
10
|
+
updateInbox?: boolean;
|
|
11
|
+
/** Delete inboxes. */
|
|
12
|
+
deleteInbox?: boolean;
|
|
13
|
+
/** Read threads. */
|
|
14
|
+
readThread?: boolean;
|
|
15
|
+
/** Delete threads. */
|
|
16
|
+
deleteThread?: boolean;
|
|
17
|
+
/** Read messages. */
|
|
18
|
+
readMessage?: boolean;
|
|
19
|
+
/** Send messages. */
|
|
20
|
+
sendMessage?: boolean;
|
|
21
|
+
/** Update message labels. */
|
|
22
|
+
updateMessage?: boolean;
|
|
23
|
+
/** Access messages labeled spam. */
|
|
24
|
+
readSpam?: boolean;
|
|
25
|
+
/** Access messages labeled blocked. */
|
|
26
|
+
readBlocked?: boolean;
|
|
27
|
+
/** Access messages labeled trash. */
|
|
28
|
+
readTrash?: boolean;
|
|
29
|
+
/** Read drafts. */
|
|
30
|
+
readDraft?: boolean;
|
|
31
|
+
/** Create drafts. */
|
|
32
|
+
createDraft?: boolean;
|
|
33
|
+
/** Update drafts. */
|
|
34
|
+
updateDraft?: boolean;
|
|
35
|
+
/** Delete drafts. */
|
|
36
|
+
deleteDraft?: boolean;
|
|
37
|
+
/** Send drafts. */
|
|
38
|
+
sendDraft?: boolean;
|
|
39
|
+
/** Read webhook configurations. */
|
|
40
|
+
readWebhook?: boolean;
|
|
41
|
+
/** Create webhooks. */
|
|
42
|
+
createWebhook?: boolean;
|
|
43
|
+
/** Update webhooks. */
|
|
44
|
+
updateWebhook?: boolean;
|
|
45
|
+
/** Delete webhooks. */
|
|
46
|
+
deleteWebhook?: boolean;
|
|
47
|
+
/** Read domain details. */
|
|
48
|
+
readDomain?: boolean;
|
|
49
|
+
/** Create domains. */
|
|
50
|
+
createDomain?: boolean;
|
|
51
|
+
/** Update domains. */
|
|
52
|
+
updateDomain?: boolean;
|
|
53
|
+
/** Delete domains. */
|
|
54
|
+
deleteDomain?: boolean;
|
|
55
|
+
/** Read list entries. */
|
|
56
|
+
readListEntry?: boolean;
|
|
57
|
+
/** Create list entries. */
|
|
58
|
+
createListEntry?: boolean;
|
|
59
|
+
/** Delete list entries. */
|
|
60
|
+
deleteListEntry?: boolean;
|
|
61
|
+
/** Read metrics. */
|
|
62
|
+
readMetrics?: boolean;
|
|
63
|
+
/** Read API keys. */
|
|
64
|
+
readApiKey?: boolean;
|
|
65
|
+
/** Create API keys. */
|
|
66
|
+
createApiKey?: boolean;
|
|
67
|
+
/** Delete API keys. */
|
|
68
|
+
deleteApiKey?: boolean;
|
|
69
|
+
/** Read pods. */
|
|
70
|
+
readPod?: boolean;
|
|
71
|
+
/** Create pods. */
|
|
72
|
+
createPod?: boolean;
|
|
73
|
+
/** Delete pods. */
|
|
74
|
+
deletePod?: boolean;
|
|
75
|
+
}
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ApiKey.js"), exports);
|
|
18
18
|
__exportStar(require("./ApiKeyId.js"), exports);
|
|
19
|
+
__exportStar(require("./ApiKeyPermissions.js"), exports);
|
|
19
20
|
__exportStar(require("./CreateApiKeyRequest.js"), exports);
|
|
20
21
|
__exportStar(require("./CreateApiKeyResponse.js"), exports);
|
|
21
22
|
__exportStar(require("./CreatedAt.js"), exports);
|
|
@@ -2,8 +2,8 @@ import type * as AgentMail from "../../../index.js";
|
|
|
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.js";
|
|
|
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.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);
|
|
@@ -39,14 +39,14 @@ export declare class ApiKeysClient {
|
|
|
39
39
|
private __create;
|
|
40
40
|
/**
|
|
41
41
|
* @param {AgentMail.inboxes.InboxId} inbox_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.inboxes.apiKeys.delete("inbox_id", "
|
|
48
|
+
* await client.inboxes.apiKeys.delete("inbox_id", "api_key_id")
|
|
49
49
|
*/
|
|
50
|
-
delete(inbox_id: AgentMail.inboxes.InboxId,
|
|
50
|
+
delete(inbox_id: AgentMail.inboxes.InboxId, 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.inboxes.InboxId} inbox_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.inboxes.apiKeys.delete("inbox_id", "
|
|
215
|
+
* await client.inboxes.apiKeys.delete("inbox_id", "api_key_id")
|
|
216
216
|
*/
|
|
217
|
-
delete(inbox_id,
|
|
218
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(inbox_id,
|
|
217
|
+
delete(inbox_id, api_key_id, requestOptions) {
|
|
218
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(inbox_id, api_key_id, requestOptions));
|
|
219
219
|
}
|
|
220
|
-
__delete(inbox_id,
|
|
220
|
+
__delete(inbox_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/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/api-keys/${core.url.encodePathParam(serializers.ApiKeyId.jsonOrThrow(
|
|
227
|
+
.http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_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/inboxes/{inbox_id}/api-keys/{
|
|
258
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v0/inboxes/{inbox_id}/api-keys/{api_key_id}");
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
}
|
|
@@ -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
|
}
|
|
@@ -2,6 +2,7 @@ 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 { ApiKeyId } from "./ApiKeyId.js";
|
|
5
|
+
import { ApiKeyPermissions } from "./ApiKeyPermissions.js";
|
|
5
6
|
import { CreatedAt } from "./CreatedAt.js";
|
|
6
7
|
import { Name } from "./Name.js";
|
|
7
8
|
import { Prefix } from "./Prefix.js";
|
|
@@ -14,6 +15,7 @@ export declare namespace ApiKey {
|
|
|
14
15
|
pod_id?: string | null;
|
|
15
16
|
inbox_id?: string | null;
|
|
16
17
|
used_at?: string | null;
|
|
18
|
+
permissions?: ApiKeyPermissions.Raw | null;
|
|
17
19
|
created_at: CreatedAt.Raw;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.ApiKey = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
39
|
const ApiKeyId_js_1 = require("./ApiKeyId.js");
|
|
40
|
+
const ApiKeyPermissions_js_1 = require("./ApiKeyPermissions.js");
|
|
40
41
|
const CreatedAt_js_1 = require("./CreatedAt.js");
|
|
41
42
|
const Name_js_1 = require("./Name.js");
|
|
42
43
|
const Prefix_js_1 = require("./Prefix.js");
|
|
@@ -47,5 +48,6 @@ exports.ApiKey = core.serialization.object({
|
|
|
47
48
|
podId: core.serialization.property("pod_id", core.serialization.string().optional()),
|
|
48
49
|
inboxId: core.serialization.property("inbox_id", core.serialization.string().optional()),
|
|
49
50
|
usedAt: core.serialization.property("used_at", core.serialization.date().optional()),
|
|
51
|
+
permissions: ApiKeyPermissions_js_1.ApiKeyPermissions.optional(),
|
|
50
52
|
createdAt: core.serialization.property("created_at", CreatedAt_js_1.CreatedAt),
|
|
51
53
|
});
|
|
@@ -0,0 +1,43 @@
|
|
|
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 ApiKeyPermissions: core.serialization.ObjectSchema<serializers.ApiKeyPermissions.Raw, AgentMail.ApiKeyPermissions>;
|
|
5
|
+
export declare namespace ApiKeyPermissions {
|
|
6
|
+
interface Raw {
|
|
7
|
+
read_inbox?: boolean | null;
|
|
8
|
+
create_inbox?: boolean | null;
|
|
9
|
+
update_inbox?: boolean | null;
|
|
10
|
+
delete_inbox?: boolean | null;
|
|
11
|
+
read_thread?: boolean | null;
|
|
12
|
+
delete_thread?: boolean | null;
|
|
13
|
+
read_message?: boolean | null;
|
|
14
|
+
send_message?: boolean | null;
|
|
15
|
+
update_message?: boolean | null;
|
|
16
|
+
read_spam?: boolean | null;
|
|
17
|
+
read_blocked?: boolean | null;
|
|
18
|
+
read_trash?: boolean | null;
|
|
19
|
+
read_draft?: boolean | null;
|
|
20
|
+
create_draft?: boolean | null;
|
|
21
|
+
update_draft?: boolean | null;
|
|
22
|
+
delete_draft?: boolean | null;
|
|
23
|
+
send_draft?: boolean | null;
|
|
24
|
+
read_webhook?: boolean | null;
|
|
25
|
+
create_webhook?: boolean | null;
|
|
26
|
+
update_webhook?: boolean | null;
|
|
27
|
+
delete_webhook?: boolean | null;
|
|
28
|
+
read_domain?: boolean | null;
|
|
29
|
+
create_domain?: boolean | null;
|
|
30
|
+
update_domain?: boolean | null;
|
|
31
|
+
delete_domain?: boolean | null;
|
|
32
|
+
read_list_entry?: boolean | null;
|
|
33
|
+
create_list_entry?: boolean | null;
|
|
34
|
+
delete_list_entry?: boolean | null;
|
|
35
|
+
read_metrics?: boolean | null;
|
|
36
|
+
read_api_key?: boolean | null;
|
|
37
|
+
create_api_key?: boolean | null;
|
|
38
|
+
delete_api_key?: boolean | null;
|
|
39
|
+
read_pod?: boolean | null;
|
|
40
|
+
create_pod?: boolean | null;
|
|
41
|
+
delete_pod?: boolean | null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.ApiKeyPermissions = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
exports.ApiKeyPermissions = core.serialization.object({
|
|
40
|
+
readInbox: core.serialization.property("read_inbox", core.serialization.boolean().optional()),
|
|
41
|
+
createInbox: core.serialization.property("create_inbox", core.serialization.boolean().optional()),
|
|
42
|
+
updateInbox: core.serialization.property("update_inbox", core.serialization.boolean().optional()),
|
|
43
|
+
deleteInbox: core.serialization.property("delete_inbox", core.serialization.boolean().optional()),
|
|
44
|
+
readThread: core.serialization.property("read_thread", core.serialization.boolean().optional()),
|
|
45
|
+
deleteThread: core.serialization.property("delete_thread", core.serialization.boolean().optional()),
|
|
46
|
+
readMessage: core.serialization.property("read_message", core.serialization.boolean().optional()),
|
|
47
|
+
sendMessage: core.serialization.property("send_message", core.serialization.boolean().optional()),
|
|
48
|
+
updateMessage: core.serialization.property("update_message", core.serialization.boolean().optional()),
|
|
49
|
+
readSpam: core.serialization.property("read_spam", core.serialization.boolean().optional()),
|
|
50
|
+
readBlocked: core.serialization.property("read_blocked", core.serialization.boolean().optional()),
|
|
51
|
+
readTrash: core.serialization.property("read_trash", core.serialization.boolean().optional()),
|
|
52
|
+
readDraft: core.serialization.property("read_draft", core.serialization.boolean().optional()),
|
|
53
|
+
createDraft: core.serialization.property("create_draft", core.serialization.boolean().optional()),
|
|
54
|
+
updateDraft: core.serialization.property("update_draft", core.serialization.boolean().optional()),
|
|
55
|
+
deleteDraft: core.serialization.property("delete_draft", core.serialization.boolean().optional()),
|
|
56
|
+
sendDraft: core.serialization.property("send_draft", core.serialization.boolean().optional()),
|
|
57
|
+
readWebhook: core.serialization.property("read_webhook", core.serialization.boolean().optional()),
|
|
58
|
+
createWebhook: core.serialization.property("create_webhook", core.serialization.boolean().optional()),
|
|
59
|
+
updateWebhook: core.serialization.property("update_webhook", core.serialization.boolean().optional()),
|
|
60
|
+
deleteWebhook: core.serialization.property("delete_webhook", core.serialization.boolean().optional()),
|
|
61
|
+
readDomain: core.serialization.property("read_domain", core.serialization.boolean().optional()),
|
|
62
|
+
createDomain: core.serialization.property("create_domain", core.serialization.boolean().optional()),
|
|
63
|
+
updateDomain: core.serialization.property("update_domain", core.serialization.boolean().optional()),
|
|
64
|
+
deleteDomain: core.serialization.property("delete_domain", core.serialization.boolean().optional()),
|
|
65
|
+
readListEntry: core.serialization.property("read_list_entry", core.serialization.boolean().optional()),
|
|
66
|
+
createListEntry: core.serialization.property("create_list_entry", core.serialization.boolean().optional()),
|
|
67
|
+
deleteListEntry: core.serialization.property("delete_list_entry", core.serialization.boolean().optional()),
|
|
68
|
+
readMetrics: core.serialization.property("read_metrics", core.serialization.boolean().optional()),
|
|
69
|
+
readApiKey: core.serialization.property("read_api_key", core.serialization.boolean().optional()),
|
|
70
|
+
createApiKey: core.serialization.property("create_api_key", core.serialization.boolean().optional()),
|
|
71
|
+
deleteApiKey: core.serialization.property("delete_api_key", core.serialization.boolean().optional()),
|
|
72
|
+
readPod: core.serialization.property("read_pod", core.serialization.boolean().optional()),
|
|
73
|
+
createPod: core.serialization.property("create_pod", core.serialization.boolean().optional()),
|
|
74
|
+
deletePod: core.serialization.property("delete_pod", core.serialization.boolean().optional()),
|
|
75
|
+
});
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
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
|
+
import { ApiKeyPermissions } from "./ApiKeyPermissions.js";
|
|
4
5
|
import { Name } from "./Name.js";
|
|
5
6
|
export declare const CreateApiKeyRequest: core.serialization.ObjectSchema<serializers.CreateApiKeyRequest.Raw, AgentMail.CreateApiKeyRequest>;
|
|
6
7
|
export declare namespace CreateApiKeyRequest {
|
|
7
8
|
interface Raw {
|
|
8
9
|
name: Name.Raw;
|
|
10
|
+
permissions?: ApiKeyPermissions.Raw | null;
|
|
9
11
|
}
|
|
10
12
|
}
|
|
@@ -36,7 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.CreateApiKeyRequest = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
const ApiKeyPermissions_js_1 = require("./ApiKeyPermissions.js");
|
|
39
40
|
const Name_js_1 = require("./Name.js");
|
|
40
41
|
exports.CreateApiKeyRequest = core.serialization.object({
|
|
41
42
|
name: Name_js_1.Name,
|
|
43
|
+
permissions: ApiKeyPermissions_js_1.ApiKeyPermissions.optional(),
|
|
42
44
|
});
|
|
@@ -2,6 +2,7 @@ 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 { ApiKeyId } from "./ApiKeyId.js";
|
|
5
|
+
import { ApiKeyPermissions } from "./ApiKeyPermissions.js";
|
|
5
6
|
import { CreatedAt } from "./CreatedAt.js";
|
|
6
7
|
import { Name } from "./Name.js";
|
|
7
8
|
import { Prefix } from "./Prefix.js";
|
|
@@ -14,6 +15,7 @@ export declare namespace CreateApiKeyResponse {
|
|
|
14
15
|
name: Name.Raw;
|
|
15
16
|
pod_id?: string | null;
|
|
16
17
|
inbox_id?: string | null;
|
|
18
|
+
permissions?: ApiKeyPermissions.Raw | null;
|
|
17
19
|
created_at: CreatedAt.Raw;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.CreateApiKeyResponse = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
39
|
const ApiKeyId_js_1 = require("./ApiKeyId.js");
|
|
40
|
+
const ApiKeyPermissions_js_1 = require("./ApiKeyPermissions.js");
|
|
40
41
|
const CreatedAt_js_1 = require("./CreatedAt.js");
|
|
41
42
|
const Name_js_1 = require("./Name.js");
|
|
42
43
|
const Prefix_js_1 = require("./Prefix.js");
|
|
@@ -47,5 +48,6 @@ exports.CreateApiKeyResponse = core.serialization.object({
|
|
|
47
48
|
name: Name_js_1.Name,
|
|
48
49
|
podId: core.serialization.property("pod_id", core.serialization.string().optional()),
|
|
49
50
|
inboxId: core.serialization.property("inbox_id", core.serialization.string().optional()),
|
|
51
|
+
permissions: ApiKeyPermissions_js_1.ApiKeyPermissions.optional(),
|
|
50
52
|
createdAt: core.serialization.property("created_at", CreatedAt_js_1.CreatedAt),
|
|
51
53
|
});
|