agentmail 0.3.8 → 0.4.0
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.js +2 -1
- package/dist/cjs/api/resources/apiKeys/client/requests/ListApiKeysRequest.d.ts +1 -0
- package/dist/cjs/api/resources/domains/client/Client.js +2 -1
- package/dist/cjs/api/resources/domains/client/requests/ListDomainsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/client/Client.js +2 -1
- package/dist/cjs/api/resources/inboxes/client/requests/ListInboxesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +2 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +2 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/types/InboxId.d.ts +1 -1
- package/dist/cjs/api/resources/pods/client/Client.js +2 -1
- package/dist/cjs/api/resources/pods/client/requests/ListPodsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +12 -0
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +65 -1
- package/dist/cjs/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +2 -1
- package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +2 -1
- package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/webhooks/client/Client.js +2 -1
- package/dist/cjs/api/resources/webhooks/client/requests/ListWebhooksRequest.d.ts +1 -0
- package/dist/cjs/api/types/IncludeTrash.d.ts +4 -0
- package/dist/cjs/api/types/IncludeTrash.js +3 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/serialization/types/IncludeTrash.d.ts +7 -0
- package/dist/cjs/serialization/types/IncludeTrash.js +39 -0
- package/dist/cjs/serialization/types/index.d.ts +1 -0
- package/dist/cjs/serialization/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.mjs +2 -1
- package/dist/esm/api/resources/apiKeys/client/requests/ListApiKeysRequest.d.mts +1 -0
- package/dist/esm/api/resources/domains/client/Client.mjs +2 -1
- package/dist/esm/api/resources/domains/client/requests/ListDomainsRequest.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/client/Client.mjs +2 -1
- package/dist/esm/api/resources/inboxes/client/requests/ListInboxesRequest.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +2 -1
- package/dist/esm/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +2 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/types/InboxId.d.mts +1 -1
- package/dist/esm/api/resources/pods/client/Client.mjs +2 -1
- package/dist/esm/api/resources/pods/client/requests/ListPodsRequest.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +12 -0
- package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +65 -1
- package/dist/esm/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +2 -1
- package/dist/esm/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +2 -1
- package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
- package/dist/esm/api/resources/webhooks/client/Client.mjs +2 -1
- package/dist/esm/api/resources/webhooks/client/requests/ListWebhooksRequest.d.mts +1 -0
- package/dist/esm/api/types/IncludeTrash.d.mts +4 -0
- package/dist/esm/api/types/IncludeTrash.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/serialization/types/IncludeTrash.d.mts +7 -0
- package/dist/esm/serialization/types/IncludeTrash.mjs +3 -0
- package/dist/esm/serialization/types/index.d.mts +1 -0
- package/dist/esm/serialization/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 +376 -139
- package/dist/llms.txt +3 -2
- package/package.json +1 -1
- package/reference.md +57 -0
|
@@ -36,10 +36,11 @@ export class DomainsClient {
|
|
|
36
36
|
__list(pod_id_1) {
|
|
37
37
|
return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
|
|
38
38
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
39
|
-
const { limit, pageToken } = request;
|
|
39
|
+
const { limit, pageToken, ascending } = request;
|
|
40
40
|
const _queryParams = {
|
|
41
41
|
limit,
|
|
42
42
|
page_token: pageToken,
|
|
43
|
+
ascending,
|
|
43
44
|
};
|
|
44
45
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
45
46
|
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);
|
|
@@ -160,6 +161,69 @@ export class DomainsClient {
|
|
|
160
161
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/domains");
|
|
161
162
|
});
|
|
162
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
166
|
+
* @param {AgentMail.DomainId} domain_id
|
|
167
|
+
* @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
168
|
+
*
|
|
169
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* await client.pods.domains.get("pod_id", "domain_id")
|
|
173
|
+
*/
|
|
174
|
+
get(pod_id, domain_id, requestOptions) {
|
|
175
|
+
return core.HttpResponsePromise.fromPromise(this.__get(pod_id, domain_id, requestOptions));
|
|
176
|
+
}
|
|
177
|
+
__get(pod_id, domain_id, requestOptions) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
180
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
181
|
+
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);
|
|
182
|
+
const _response = yield core.fetcher({
|
|
183
|
+
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)
|
|
184
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/domains/${core.url.encodePathParam(serializers.DomainId.jsonOrThrow(domain_id, { omitUndefined: true }))}`),
|
|
185
|
+
method: "GET",
|
|
186
|
+
headers: _headers,
|
|
187
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
188
|
+
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,
|
|
189
|
+
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,
|
|
190
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
191
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
192
|
+
logging: this._options.logging,
|
|
193
|
+
});
|
|
194
|
+
if (_response.ok) {
|
|
195
|
+
return {
|
|
196
|
+
data: serializers.Domain.parseOrThrow(_response.body, {
|
|
197
|
+
unrecognizedObjectKeys: "passthrough",
|
|
198
|
+
allowUnrecognizedUnionMembers: true,
|
|
199
|
+
allowUnrecognizedEnumValues: true,
|
|
200
|
+
skipValidation: true,
|
|
201
|
+
breadcrumbsPrefix: ["response"],
|
|
202
|
+
}),
|
|
203
|
+
rawResponse: _response.rawResponse,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
if (_response.error.reason === "status-code") {
|
|
207
|
+
switch (_response.error.statusCode) {
|
|
208
|
+
case 404:
|
|
209
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
210
|
+
unrecognizedObjectKeys: "passthrough",
|
|
211
|
+
allowUnrecognizedUnionMembers: true,
|
|
212
|
+
allowUnrecognizedEnumValues: true,
|
|
213
|
+
skipValidation: true,
|
|
214
|
+
breadcrumbsPrefix: ["response"],
|
|
215
|
+
}), _response.rawResponse);
|
|
216
|
+
default:
|
|
217
|
+
throw new errors.AgentMailError({
|
|
218
|
+
statusCode: _response.error.statusCode,
|
|
219
|
+
body: _response.error.body,
|
|
220
|
+
rawResponse: _response.rawResponse,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains/{domain_id}");
|
|
225
|
+
});
|
|
226
|
+
}
|
|
163
227
|
/**
|
|
164
228
|
* @param {AgentMail.pods.PodId} pod_id
|
|
165
229
|
* @param {AgentMail.DomainId} domain_id
|
|
@@ -36,10 +36,11 @@ export class InboxesClient {
|
|
|
36
36
|
__list(pod_id_1) {
|
|
37
37
|
return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
|
|
38
38
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
39
|
-
const { limit, pageToken } = request;
|
|
39
|
+
const { limit, pageToken, ascending } = request;
|
|
40
40
|
const _queryParams = {
|
|
41
41
|
limit,
|
|
42
42
|
page_token: pageToken,
|
|
43
|
+
ascending,
|
|
43
44
|
};
|
|
44
45
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
45
46
|
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);
|
|
@@ -37,7 +37,7 @@ export class ThreadsClient {
|
|
|
37
37
|
__list(pod_id_1) {
|
|
38
38
|
return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
|
|
39
39
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
40
|
-
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked } = request;
|
|
40
|
+
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeTrash } = request;
|
|
41
41
|
const _queryParams = {
|
|
42
42
|
limit,
|
|
43
43
|
page_token: pageToken,
|
|
@@ -56,6 +56,7 @@ export class ThreadsClient {
|
|
|
56
56
|
ascending,
|
|
57
57
|
include_spam: includeSpam,
|
|
58
58
|
include_blocked: includeBlocked,
|
|
59
|
+
include_trash: includeTrash,
|
|
59
60
|
};
|
|
60
61
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
61
62
|
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);
|
|
@@ -33,10 +33,11 @@ export class WebhooksClient {
|
|
|
33
33
|
__list() {
|
|
34
34
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
35
35
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
36
|
-
const { limit, pageToken } = request;
|
|
36
|
+
const { limit, pageToken, ascending } = request;
|
|
37
37
|
const _queryParams = {
|
|
38
38
|
limit,
|
|
39
39
|
page_token: pageToken,
|
|
40
|
+
ascending,
|
|
40
41
|
};
|
|
41
42
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
42
43
|
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);
|
|
@@ -7,6 +7,7 @@ export * from "./ErrorName.mjs";
|
|
|
7
7
|
export * from "./ErrorResponse.mjs";
|
|
8
8
|
export * from "./IncludeBlocked.mjs";
|
|
9
9
|
export * from "./IncludeSpam.mjs";
|
|
10
|
+
export * from "./IncludeTrash.mjs";
|
|
10
11
|
export * from "./Labels.mjs";
|
|
11
12
|
export * from "./Limit.mjs";
|
|
12
13
|
export * from "./OrganizationId.mjs";
|
|
@@ -7,6 +7,7 @@ export * from "./ErrorName.mjs";
|
|
|
7
7
|
export * from "./ErrorResponse.mjs";
|
|
8
8
|
export * from "./IncludeBlocked.mjs";
|
|
9
9
|
export * from "./IncludeSpam.mjs";
|
|
10
|
+
export * from "./IncludeTrash.mjs";
|
|
10
11
|
export * from "./Labels.mjs";
|
|
11
12
|
export * from "./Limit.mjs";
|
|
12
13
|
export * from "./OrganizationId.mjs";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as AgentMail from "../../api/index.mjs";
|
|
2
|
+
import * as core from "../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../index.mjs";
|
|
4
|
+
export declare const IncludeTrash: core.serialization.Schema<serializers.IncludeTrash.Raw, AgentMail.IncludeTrash>;
|
|
5
|
+
export declare namespace IncludeTrash {
|
|
6
|
+
type Raw = boolean;
|
|
7
|
+
}
|
|
@@ -7,6 +7,7 @@ export * from "./ErrorName.mjs";
|
|
|
7
7
|
export * from "./ErrorResponse.mjs";
|
|
8
8
|
export * from "./IncludeBlocked.mjs";
|
|
9
9
|
export * from "./IncludeSpam.mjs";
|
|
10
|
+
export * from "./IncludeTrash.mjs";
|
|
10
11
|
export * from "./Labels.mjs";
|
|
11
12
|
export * from "./Limit.mjs";
|
|
12
13
|
export * from "./OrganizationId.mjs";
|
|
@@ -7,6 +7,7 @@ export * from "./ErrorName.mjs";
|
|
|
7
7
|
export * from "./ErrorResponse.mjs";
|
|
8
8
|
export * from "./IncludeBlocked.mjs";
|
|
9
9
|
export * from "./IncludeSpam.mjs";
|
|
10
|
+
export * from "./IncludeTrash.mjs";
|
|
10
11
|
export * from "./Labels.mjs";
|
|
11
12
|
export * from "./Limit.mjs";
|
|
12
13
|
export * from "./OrganizationId.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.
|
|
1
|
+
export const SDK_VERSION = "0.4.0";
|