agentmail 0.5.8 → 0.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/domains/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/domains/client/Client.js +1 -2
- package/dist/cjs/api/resources/domains/types/CreateDomainRequest.d.ts +2 -1
- package/dist/cjs/api/resources/domains/types/Domain.d.ts +5 -1
- package/dist/cjs/api/resources/domains/types/DomainItem.d.ts +1 -0
- package/dist/cjs/api/resources/domains/types/SubdomainsEnabled.d.ts +5 -0
- package/dist/cjs/api/resources/domains/types/SubdomainsEnabled.js +3 -0
- package/dist/cjs/api/resources/domains/types/UpdateDomainRequest.d.ts +7 -0
- package/dist/cjs/api/resources/domains/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/domains/types/index.js +1 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/client/Client.js +9 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +101 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.ts +6 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.d.ts +14 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.js +3 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +25 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +100 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.ts +6 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.d.ts +14 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.js +3 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/types/CreateInboxRequest.d.ts +5 -1
- package/dist/cjs/api/resources/messages/types/SearchMessageHighlights.d.ts +15 -0
- package/dist/cjs/api/resources/messages/types/SearchMessageHighlights.js +3 -0
- package/dist/cjs/api/resources/messages/types/SearchMessageItem.d.ts +5 -0
- package/dist/cjs/api/resources/messages/types/SearchMessageItem.js +3 -0
- package/dist/cjs/api/resources/messages/types/SearchMessagesResponse.d.ts +8 -0
- package/dist/cjs/api/resources/messages/types/SearchMessagesResponse.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/api/resources/pods/resources/threads/client/Client.d.ts +25 -0
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +100 -1
- package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.ts +6 -0
- package/dist/cjs/api/resources/pods/resources/threads/client/requests/SearchThreadsRequest.d.ts +14 -0
- package/dist/cjs/api/resources/pods/resources/threads/client/requests/SearchThreadsRequest.js +3 -0
- package/dist/cjs/api/resources/pods/resources/threads/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/threads/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/threads/client/Client.js +101 -1
- package/dist/cjs/api/resources/threads/client/requests/ListThreadsRequest.d.ts +6 -0
- package/dist/cjs/api/resources/threads/client/requests/SearchThreadsRequest.d.ts +14 -0
- package/dist/cjs/api/resources/threads/client/requests/SearchThreadsRequest.js +3 -0
- package/dist/cjs/api/resources/threads/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/threads/types/SearchThreadHighlights.d.ts +15 -0
- package/dist/cjs/api/resources/threads/types/SearchThreadHighlights.js +3 -0
- package/dist/cjs/api/resources/threads/types/SearchThreadItem.d.ts +5 -0
- package/dist/cjs/api/resources/threads/types/SearchThreadItem.js +3 -0
- package/dist/cjs/api/resources/threads/types/SearchThreadsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/threads/types/SearchThreadsResponse.js +3 -0
- package/dist/cjs/api/resources/threads/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/threads/types/index.js +3 -0
- package/dist/cjs/api/types/Query.d.ts +5 -0
- package/dist/cjs/api/types/Query.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/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/SearchMessageHighlights.d.ts +12 -0
- package/dist/cjs/serialization/resources/messages/types/SearchMessageHighlights.js +44 -0
- package/dist/cjs/serialization/resources/messages/types/SearchMessageItem.d.ts +11 -0
- package/dist/cjs/serialization/resources/messages/types/SearchMessageItem.js +45 -0
- package/dist/cjs/serialization/resources/messages/types/SearchMessagesResponse.d.ts +16 -0
- package/dist/cjs/serialization/resources/messages/types/SearchMessagesResponse.js +48 -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/serialization/resources/threads/types/SearchThreadHighlights.d.ts +12 -0
- package/dist/cjs/serialization/resources/threads/types/SearchThreadHighlights.js +44 -0
- package/dist/cjs/serialization/resources/threads/types/SearchThreadItem.d.ts +11 -0
- package/dist/cjs/serialization/resources/threads/types/SearchThreadItem.js +45 -0
- package/dist/cjs/serialization/resources/threads/types/SearchThreadsResponse.d.ts +16 -0
- package/dist/cjs/serialization/resources/threads/types/SearchThreadsResponse.js +48 -0
- package/dist/cjs/serialization/resources/threads/types/index.d.ts +3 -0
- package/dist/cjs/serialization/resources/threads/types/index.js +3 -0
- package/dist/cjs/serialization/types/Query.d.ts +7 -0
- package/dist/cjs/serialization/types/Query.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/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 +101 -1
- package/dist/esm/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.mts +6 -0
- package/dist/esm/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.d.mts +14 -0
- package/dist/esm/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/messages/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +25 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +100 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.mts +6 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.d.mts +14 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/types/CreateInboxRequest.d.mts +5 -1
- package/dist/esm/api/resources/messages/types/SearchMessageHighlights.d.mts +15 -0
- package/dist/esm/api/resources/messages/types/SearchMessageHighlights.mjs +2 -0
- package/dist/esm/api/resources/messages/types/SearchMessageItem.d.mts +5 -0
- package/dist/esm/api/resources/messages/types/SearchMessageItem.mjs +2 -0
- package/dist/esm/api/resources/messages/types/SearchMessagesResponse.d.mts +8 -0
- package/dist/esm/api/resources/messages/types/SearchMessagesResponse.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/api/resources/pods/resources/threads/client/Client.d.mts +25 -0
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +100 -1
- package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.mts +6 -0
- package/dist/esm/api/resources/pods/resources/threads/client/requests/SearchThreadsRequest.d.mts +14 -0
- package/dist/esm/api/resources/pods/resources/threads/client/requests/SearchThreadsRequest.mjs +2 -0
- package/dist/esm/api/resources/pods/resources/threads/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/threads/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/threads/client/Client.mjs +101 -1
- package/dist/esm/api/resources/threads/client/requests/ListThreadsRequest.d.mts +6 -0
- package/dist/esm/api/resources/threads/client/requests/SearchThreadsRequest.d.mts +14 -0
- package/dist/esm/api/resources/threads/client/requests/SearchThreadsRequest.mjs +2 -0
- package/dist/esm/api/resources/threads/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/threads/types/SearchThreadHighlights.d.mts +15 -0
- package/dist/esm/api/resources/threads/types/SearchThreadHighlights.mjs +2 -0
- package/dist/esm/api/resources/threads/types/SearchThreadItem.d.mts +5 -0
- package/dist/esm/api/resources/threads/types/SearchThreadItem.mjs +2 -0
- package/dist/esm/api/resources/threads/types/SearchThreadsResponse.d.mts +8 -0
- package/dist/esm/api/resources/threads/types/SearchThreadsResponse.mjs +2 -0
- package/dist/esm/api/resources/threads/types/index.d.mts +3 -0
- package/dist/esm/api/resources/threads/types/index.mjs +3 -0
- package/dist/esm/api/types/Query.d.mts +5 -0
- package/dist/esm/api/types/Query.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/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/SearchMessageHighlights.d.mts +12 -0
- package/dist/esm/serialization/resources/messages/types/SearchMessageHighlights.mjs +8 -0
- package/dist/esm/serialization/resources/messages/types/SearchMessageItem.d.mts +11 -0
- package/dist/esm/serialization/resources/messages/types/SearchMessageItem.mjs +9 -0
- package/dist/esm/serialization/resources/messages/types/SearchMessagesResponse.d.mts +16 -0
- package/dist/esm/serialization/resources/messages/types/SearchMessagesResponse.mjs +12 -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/serialization/resources/threads/types/SearchThreadHighlights.d.mts +12 -0
- package/dist/esm/serialization/resources/threads/types/SearchThreadHighlights.mjs +8 -0
- package/dist/esm/serialization/resources/threads/types/SearchThreadItem.d.mts +11 -0
- package/dist/esm/serialization/resources/threads/types/SearchThreadItem.mjs +9 -0
- package/dist/esm/serialization/resources/threads/types/SearchThreadsResponse.d.mts +16 -0
- package/dist/esm/serialization/resources/threads/types/SearchThreadsResponse.mjs +12 -0
- package/dist/esm/serialization/resources/threads/types/index.d.mts +3 -0
- package/dist/esm/serialization/resources/threads/types/index.mjs +3 -0
- package/dist/esm/serialization/types/Query.d.mts +7 -0
- package/dist/esm/serialization/types/Query.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 +10309 -2931
- package/dist/llms.txt +5 -0
- package/package.json +1 -1
- package/reference.md +321 -4
|
@@ -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,
|
|
@@ -11,6 +11,11 @@ export declare class ThreadsClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<ThreadsClient.Options>;
|
|
12
12
|
constructor(options?: ThreadsClient.Options);
|
|
13
13
|
/**
|
|
14
|
+
* Lists threads in the pod, most recent first. Pass `senders`,
|
|
15
|
+
* `recipients`, or `subject` to filter by substring. Filtered requests are
|
|
16
|
+
* served by search, which caps `limit` at 100. For relevance-ranked
|
|
17
|
+
* full-text search, use `Search Threads`.
|
|
18
|
+
*
|
|
14
19
|
* **CLI:**
|
|
15
20
|
* ```bash
|
|
16
21
|
* agentmail pods:threads list --pod-id <pod_id>
|
|
@@ -27,6 +32,26 @@ export declare class ThreadsClient {
|
|
|
27
32
|
*/
|
|
28
33
|
list(pod_id: AgentMail.pods.PodId, request?: AgentMail.pods.ListThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListThreadsResponse>;
|
|
29
34
|
private __list;
|
|
35
|
+
/**
|
|
36
|
+
* Full-text search across threads in the pod, ranked by relevance. The
|
|
37
|
+
* query is matched against senders, recipients, and subject (substring)
|
|
38
|
+
* and the message body (tokenized full text). Spam, trash, blocked, and
|
|
39
|
+
* unauthenticated threads are always excluded. `limit` cannot exceed 100.
|
|
40
|
+
*
|
|
41
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
42
|
+
* @param {AgentMail.pods.SearchThreadsRequest} request
|
|
43
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link AgentMail.ValidationError}
|
|
46
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.pods.threads.search("pod_id", {
|
|
50
|
+
* q: "q"
|
|
51
|
+
* })
|
|
52
|
+
*/
|
|
53
|
+
search(pod_id: AgentMail.pods.PodId, request: AgentMail.pods.SearchThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.SearchThreadsResponse>;
|
|
54
|
+
private __search;
|
|
30
55
|
/**
|
|
31
56
|
* **CLI:**
|
|
32
57
|
* ```bash
|
|
@@ -22,6 +22,11 @@ export class ThreadsClient {
|
|
|
22
22
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
+
* Lists threads in the pod, most recent first. Pass `senders`,
|
|
26
|
+
* `recipients`, or `subject` to filter by substring. Filtered requests are
|
|
27
|
+
* served by search, which caps `limit` at 100. For relevance-ranked
|
|
28
|
+
* full-text search, use `Search Threads`.
|
|
29
|
+
*
|
|
25
30
|
* **CLI:**
|
|
26
31
|
* ```bash
|
|
27
32
|
* agentmail pods:threads list --pod-id <pod_id>
|
|
@@ -42,7 +47,7 @@ export class ThreadsClient {
|
|
|
42
47
|
__list(pod_id_1) {
|
|
43
48
|
return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
|
|
44
49
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
45
|
-
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeUnauthenticated, includeTrash, } = request;
|
|
50
|
+
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeUnauthenticated, includeTrash, senders, recipients, subject, } = request;
|
|
46
51
|
const _queryParams = {
|
|
47
52
|
limit,
|
|
48
53
|
page_token: pageToken,
|
|
@@ -63,6 +68,9 @@ export class ThreadsClient {
|
|
|
63
68
|
include_blocked: includeBlocked,
|
|
64
69
|
include_unauthenticated: includeUnauthenticated,
|
|
65
70
|
include_trash: includeTrash,
|
|
71
|
+
senders: senders != null ? toJson(senders) : undefined,
|
|
72
|
+
recipients: recipients != null ? toJson(recipients) : undefined,
|
|
73
|
+
subject: subject != null ? toJson(subject) : undefined,
|
|
66
74
|
};
|
|
67
75
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
68
76
|
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);
|
|
@@ -111,6 +119,97 @@ export class ThreadsClient {
|
|
|
111
119
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/threads");
|
|
112
120
|
});
|
|
113
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Full-text search across threads in the pod, ranked by relevance. The
|
|
124
|
+
* query is matched against senders, recipients, and subject (substring)
|
|
125
|
+
* and the message body (tokenized full text). Spam, trash, blocked, and
|
|
126
|
+
* unauthenticated threads are always excluded. `limit` cannot exceed 100.
|
|
127
|
+
*
|
|
128
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
129
|
+
* @param {AgentMail.pods.SearchThreadsRequest} request
|
|
130
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
|
+
*
|
|
132
|
+
* @throws {@link AgentMail.ValidationError}
|
|
133
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* await client.pods.threads.search("pod_id", {
|
|
137
|
+
* q: "q"
|
|
138
|
+
* })
|
|
139
|
+
*/
|
|
140
|
+
search(pod_id, request, requestOptions) {
|
|
141
|
+
return core.HttpResponsePromise.fromPromise(this.__search(pod_id, request, requestOptions));
|
|
142
|
+
}
|
|
143
|
+
__search(pod_id, request, requestOptions) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
146
|
+
const { q, limit, pageToken, before, after } = request;
|
|
147
|
+
const _queryParams = {
|
|
148
|
+
q,
|
|
149
|
+
limit,
|
|
150
|
+
page_token: pageToken,
|
|
151
|
+
before: before != null
|
|
152
|
+
? serializers.Before.jsonOrThrow(before, { unrecognizedObjectKeys: "strip", omitUndefined: true })
|
|
153
|
+
: undefined,
|
|
154
|
+
after: after != null
|
|
155
|
+
? serializers.After.jsonOrThrow(after, { unrecognizedObjectKeys: "strip", omitUndefined: true })
|
|
156
|
+
: undefined,
|
|
157
|
+
};
|
|
158
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
159
|
+
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
|
+
const _response = yield core.fetcher({
|
|
161
|
+
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)
|
|
162
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/threads/search`),
|
|
163
|
+
method: "GET",
|
|
164
|
+
headers: _headers,
|
|
165
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
166
|
+
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,
|
|
167
|
+
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,
|
|
168
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
169
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
170
|
+
logging: this._options.logging,
|
|
171
|
+
});
|
|
172
|
+
if (_response.ok) {
|
|
173
|
+
return {
|
|
174
|
+
data: serializers.SearchThreadsResponse.parseOrThrow(_response.body, {
|
|
175
|
+
unrecognizedObjectKeys: "passthrough",
|
|
176
|
+
allowUnrecognizedUnionMembers: true,
|
|
177
|
+
allowUnrecognizedEnumValues: true,
|
|
178
|
+
skipValidation: true,
|
|
179
|
+
breadcrumbsPrefix: ["response"],
|
|
180
|
+
}),
|
|
181
|
+
rawResponse: _response.rawResponse,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
if (_response.error.reason === "status-code") {
|
|
185
|
+
switch (_response.error.statusCode) {
|
|
186
|
+
case 400:
|
|
187
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
188
|
+
unrecognizedObjectKeys: "passthrough",
|
|
189
|
+
allowUnrecognizedUnionMembers: true,
|
|
190
|
+
allowUnrecognizedEnumValues: true,
|
|
191
|
+
skipValidation: true,
|
|
192
|
+
breadcrumbsPrefix: ["response"],
|
|
193
|
+
}), _response.rawResponse);
|
|
194
|
+
case 404:
|
|
195
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
196
|
+
unrecognizedObjectKeys: "passthrough",
|
|
197
|
+
allowUnrecognizedUnionMembers: true,
|
|
198
|
+
allowUnrecognizedEnumValues: true,
|
|
199
|
+
skipValidation: true,
|
|
200
|
+
breadcrumbsPrefix: ["response"],
|
|
201
|
+
}), _response.rawResponse);
|
|
202
|
+
default:
|
|
203
|
+
throw new errors.AgentMailError({
|
|
204
|
+
statusCode: _response.error.statusCode,
|
|
205
|
+
body: _response.error.body,
|
|
206
|
+
rawResponse: _response.rawResponse,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/threads/search");
|
|
211
|
+
});
|
|
212
|
+
}
|
|
114
213
|
/**
|
|
115
214
|
* **CLI:**
|
|
116
215
|
* ```bash
|
package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.mts
CHANGED
|
@@ -14,4 +14,10 @@ export interface ListThreadsRequest {
|
|
|
14
14
|
includeBlocked?: AgentMail.IncludeBlocked;
|
|
15
15
|
includeUnauthenticated?: AgentMail.IncludeUnauthenticated;
|
|
16
16
|
includeTrash?: AgentMail.IncludeTrash;
|
|
17
|
+
/** Filter to threads whose senders contain this value (substring match). Repeatable; all values must match. */
|
|
18
|
+
senders?: string[];
|
|
19
|
+
/** Filter to threads whose recipients contain this value (substring match). Repeatable; all values must match. */
|
|
20
|
+
recipients?: string[];
|
|
21
|
+
/** Filter to threads whose subject contains this value (substring match). Repeatable; all values must match. */
|
|
22
|
+
subject?: string[];
|
|
17
23
|
}
|
package/dist/esm/api/resources/pods/resources/threads/client/requests/SearchThreadsRequest.d.mts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* q: "q"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface SearchThreadsRequest {
|
|
9
|
+
q: AgentMail.Query;
|
|
10
|
+
limit?: AgentMail.Limit;
|
|
11
|
+
pageToken?: AgentMail.PageToken;
|
|
12
|
+
before?: AgentMail.Before;
|
|
13
|
+
after?: AgentMail.After;
|
|
14
|
+
}
|
|
@@ -11,6 +11,12 @@ export declare class ThreadsClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<ThreadsClient.Options>;
|
|
12
12
|
constructor(options?: ThreadsClient.Options);
|
|
13
13
|
/**
|
|
14
|
+
* Lists threads, most recent first. Pass `senders`, `recipients`, or
|
|
15
|
+
* `subject` to filter by substring. Filtered requests are served by
|
|
16
|
+
* search, which caps `limit` at 100. For relevance-ranked full-text
|
|
17
|
+
* search across senders, recipients, subject, and message body, use
|
|
18
|
+
* `Search Threads`.
|
|
19
|
+
*
|
|
14
20
|
* **CLI:**
|
|
15
21
|
* ```bash
|
|
16
22
|
* agentmail threads list
|
|
@@ -26,6 +32,26 @@ export declare class ThreadsClient {
|
|
|
26
32
|
*/
|
|
27
33
|
list(request?: AgentMail.ListThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListThreadsResponse>;
|
|
28
34
|
private __list;
|
|
35
|
+
/**
|
|
36
|
+
* Full-text search across threads in the organization, ranked by
|
|
37
|
+
* relevance. The query is matched against senders, recipients, and
|
|
38
|
+
* subject (substring) and the message body (tokenized full text). Spam,
|
|
39
|
+
* trash, blocked, and unauthenticated threads are always excluded.
|
|
40
|
+
* `limit` cannot exceed 100.
|
|
41
|
+
*
|
|
42
|
+
* @param {AgentMail.SearchThreadsRequest} request
|
|
43
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link AgentMail.ValidationError}
|
|
46
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.threads.search({
|
|
50
|
+
* q: "q"
|
|
51
|
+
* })
|
|
52
|
+
*/
|
|
53
|
+
search(request: AgentMail.SearchThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.SearchThreadsResponse>;
|
|
54
|
+
private __search;
|
|
29
55
|
/**
|
|
30
56
|
* **CLI:**
|
|
31
57
|
* ```bash
|
|
@@ -22,6 +22,12 @@ export class ThreadsClient {
|
|
|
22
22
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
+
* Lists threads, most recent first. Pass `senders`, `recipients`, or
|
|
26
|
+
* `subject` to filter by substring. Filtered requests are served by
|
|
27
|
+
* search, which caps `limit` at 100. For relevance-ranked full-text
|
|
28
|
+
* search across senders, recipients, subject, and message body, use
|
|
29
|
+
* `Search Threads`.
|
|
30
|
+
*
|
|
25
31
|
* **CLI:**
|
|
26
32
|
* ```bash
|
|
27
33
|
* agentmail threads list
|
|
@@ -41,7 +47,7 @@ export class ThreadsClient {
|
|
|
41
47
|
__list() {
|
|
42
48
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
43
49
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
44
|
-
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeUnauthenticated, includeTrash, } = request;
|
|
50
|
+
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeUnauthenticated, includeTrash, senders, recipients, subject, } = request;
|
|
45
51
|
const _queryParams = {
|
|
46
52
|
limit,
|
|
47
53
|
page_token: pageToken,
|
|
@@ -62,6 +68,9 @@ export class ThreadsClient {
|
|
|
62
68
|
include_blocked: includeBlocked,
|
|
63
69
|
include_unauthenticated: includeUnauthenticated,
|
|
64
70
|
include_trash: includeTrash,
|
|
71
|
+
senders: senders != null ? toJson(senders) : undefined,
|
|
72
|
+
recipients: recipients != null ? toJson(recipients) : undefined,
|
|
73
|
+
subject: subject != null ? toJson(subject) : undefined,
|
|
65
74
|
};
|
|
66
75
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
67
76
|
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);
|
|
@@ -110,6 +119,97 @@ export class ThreadsClient {
|
|
|
110
119
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/threads");
|
|
111
120
|
});
|
|
112
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Full-text search across threads in the organization, ranked by
|
|
124
|
+
* relevance. The query is matched against senders, recipients, and
|
|
125
|
+
* subject (substring) and the message body (tokenized full text). Spam,
|
|
126
|
+
* trash, blocked, and unauthenticated threads are always excluded.
|
|
127
|
+
* `limit` cannot exceed 100.
|
|
128
|
+
*
|
|
129
|
+
* @param {AgentMail.SearchThreadsRequest} request
|
|
130
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
|
+
*
|
|
132
|
+
* @throws {@link AgentMail.ValidationError}
|
|
133
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* await client.threads.search({
|
|
137
|
+
* q: "q"
|
|
138
|
+
* })
|
|
139
|
+
*/
|
|
140
|
+
search(request, requestOptions) {
|
|
141
|
+
return core.HttpResponsePromise.fromPromise(this.__search(request, requestOptions));
|
|
142
|
+
}
|
|
143
|
+
__search(request, requestOptions) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
146
|
+
const { q, limit, pageToken, before, after } = request;
|
|
147
|
+
const _queryParams = {
|
|
148
|
+
q,
|
|
149
|
+
limit,
|
|
150
|
+
page_token: pageToken,
|
|
151
|
+
before: before != null
|
|
152
|
+
? serializers.Before.jsonOrThrow(before, { unrecognizedObjectKeys: "strip", omitUndefined: true })
|
|
153
|
+
: undefined,
|
|
154
|
+
after: after != null
|
|
155
|
+
? serializers.After.jsonOrThrow(after, { unrecognizedObjectKeys: "strip", omitUndefined: true })
|
|
156
|
+
: undefined,
|
|
157
|
+
};
|
|
158
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
159
|
+
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
|
+
const _response = yield core.fetcher({
|
|
161
|
+
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)
|
|
162
|
+
.http, "/v0/threads/search"),
|
|
163
|
+
method: "GET",
|
|
164
|
+
headers: _headers,
|
|
165
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
166
|
+
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,
|
|
167
|
+
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,
|
|
168
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
169
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
170
|
+
logging: this._options.logging,
|
|
171
|
+
});
|
|
172
|
+
if (_response.ok) {
|
|
173
|
+
return {
|
|
174
|
+
data: serializers.SearchThreadsResponse.parseOrThrow(_response.body, {
|
|
175
|
+
unrecognizedObjectKeys: "passthrough",
|
|
176
|
+
allowUnrecognizedUnionMembers: true,
|
|
177
|
+
allowUnrecognizedEnumValues: true,
|
|
178
|
+
skipValidation: true,
|
|
179
|
+
breadcrumbsPrefix: ["response"],
|
|
180
|
+
}),
|
|
181
|
+
rawResponse: _response.rawResponse,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
if (_response.error.reason === "status-code") {
|
|
185
|
+
switch (_response.error.statusCode) {
|
|
186
|
+
case 400:
|
|
187
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
188
|
+
unrecognizedObjectKeys: "passthrough",
|
|
189
|
+
allowUnrecognizedUnionMembers: true,
|
|
190
|
+
allowUnrecognizedEnumValues: true,
|
|
191
|
+
skipValidation: true,
|
|
192
|
+
breadcrumbsPrefix: ["response"],
|
|
193
|
+
}), _response.rawResponse);
|
|
194
|
+
case 404:
|
|
195
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
196
|
+
unrecognizedObjectKeys: "passthrough",
|
|
197
|
+
allowUnrecognizedUnionMembers: true,
|
|
198
|
+
allowUnrecognizedEnumValues: true,
|
|
199
|
+
skipValidation: true,
|
|
200
|
+
breadcrumbsPrefix: ["response"],
|
|
201
|
+
}), _response.rawResponse);
|
|
202
|
+
default:
|
|
203
|
+
throw new errors.AgentMailError({
|
|
204
|
+
statusCode: _response.error.statusCode,
|
|
205
|
+
body: _response.error.body,
|
|
206
|
+
rawResponse: _response.rawResponse,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/threads/search");
|
|
211
|
+
});
|
|
212
|
+
}
|
|
113
213
|
/**
|
|
114
214
|
* **CLI:**
|
|
115
215
|
* ```bash
|
|
@@ -14,4 +14,10 @@ export interface ListThreadsRequest {
|
|
|
14
14
|
includeBlocked?: AgentMail.IncludeBlocked;
|
|
15
15
|
includeUnauthenticated?: AgentMail.IncludeUnauthenticated;
|
|
16
16
|
includeTrash?: AgentMail.IncludeTrash;
|
|
17
|
+
/** Filter to threads whose senders contain this value (substring match). Repeatable; all values must match. */
|
|
18
|
+
senders?: string[];
|
|
19
|
+
/** Filter to threads whose recipients contain this value (substring match). Repeatable; all values must match. */
|
|
20
|
+
recipients?: string[];
|
|
21
|
+
/** Filter to threads whose subject contains this value (substring match). Repeatable; all values must match. */
|
|
22
|
+
subject?: string[];
|
|
17
23
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* q: "q"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface SearchThreadsRequest {
|
|
9
|
+
q: AgentMail.Query;
|
|
10
|
+
limit?: AgentMail.Limit;
|
|
11
|
+
pageToken?: AgentMail.PageToken;
|
|
12
|
+
before?: AgentMail.Before;
|
|
13
|
+
after?: AgentMail.After;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Matched fragments per field on a thread search result, with matched terms
|
|
3
|
+
* wrapped in `**`. A field key is present only when the query matched that
|
|
4
|
+
* field, so the present keys also tell you which fields produced the hit.
|
|
5
|
+
*/
|
|
6
|
+
export interface SearchThreadHighlights {
|
|
7
|
+
/** Matched fragments from a sender address in the thread. */
|
|
8
|
+
from?: string[];
|
|
9
|
+
/** Matched fragments from a recipient address in the thread (to, cc, or bcc). */
|
|
10
|
+
recipients?: string[];
|
|
11
|
+
/** Matched fragments from the subject. */
|
|
12
|
+
subject?: string[];
|
|
13
|
+
/** Matched fragments from a message body in the thread. */
|
|
14
|
+
text?: string[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
2
|
+
export interface SearchThreadsResponse {
|
|
3
|
+
count: AgentMail.Count;
|
|
4
|
+
limit?: AgentMail.Limit;
|
|
5
|
+
nextPageToken?: AgentMail.PageToken;
|
|
6
|
+
/** Ordered by relevance, best match first. */
|
|
7
|
+
threads: AgentMail.SearchThreadItem[];
|
|
8
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export * from "./ListThreadsResponse.mjs";
|
|
2
|
+
export * from "./SearchThreadHighlights.mjs";
|
|
3
|
+
export * from "./SearchThreadItem.mjs";
|
|
4
|
+
export * from "./SearchThreadsResponse.mjs";
|
|
2
5
|
export * from "./Thread.mjs";
|
|
3
6
|
export * from "./ThreadAttachments.mjs";
|
|
4
7
|
export * from "./ThreadCreatedAt.mjs";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export * from "./ListThreadsResponse.mjs";
|
|
2
|
+
export * from "./SearchThreadHighlights.mjs";
|
|
3
|
+
export * from "./SearchThreadItem.mjs";
|
|
4
|
+
export * from "./SearchThreadsResponse.mjs";
|
|
2
5
|
export * from "./Thread.mjs";
|
|
3
6
|
export * from "./ThreadAttachments.mjs";
|
|
4
7
|
export * from "./ThreadCreatedAt.mjs";
|
|
@@ -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
|
});
|
|
@@ -7,6 +7,7 @@ import { DomainId } from "./DomainId.mjs";
|
|
|
7
7
|
import { DomainName } from "./DomainName.mjs";
|
|
8
8
|
import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
|
|
9
9
|
import { Status } from "./Status.mjs";
|
|
10
|
+
import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
|
|
10
11
|
import { VerificationRecord } from "./VerificationRecord.mjs";
|
|
11
12
|
export declare const Domain: core.serialization.ObjectSchema<serializers.Domain.Raw, AgentMail.Domain>;
|
|
12
13
|
export declare namespace Domain {
|
|
@@ -16,6 +17,7 @@ export declare namespace Domain {
|
|
|
16
17
|
domain: DomainName.Raw;
|
|
17
18
|
status: Status.Raw;
|
|
18
19
|
feedback_enabled: FeedbackEnabled.Raw;
|
|
20
|
+
subdomains_enabled: SubdomainsEnabled.Raw;
|
|
19
21
|
records: VerificationRecord.Raw[];
|
|
20
22
|
client_id?: ClientId.Raw | null;
|
|
21
23
|
updated_at: string;
|
|
@@ -6,6 +6,7 @@ import { DomainId } from "./DomainId.mjs";
|
|
|
6
6
|
import { DomainName } from "./DomainName.mjs";
|
|
7
7
|
import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
|
|
8
8
|
import { Status } from "./Status.mjs";
|
|
9
|
+
import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
|
|
9
10
|
import { VerificationRecord } from "./VerificationRecord.mjs";
|
|
10
11
|
export const Domain = core.serialization.object({
|
|
11
12
|
podId: core.serialization.property("pod_id", PodId.optional()),
|
|
@@ -13,6 +14,7 @@ export const Domain = core.serialization.object({
|
|
|
13
14
|
domain: DomainName,
|
|
14
15
|
status: Status,
|
|
15
16
|
feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled),
|
|
17
|
+
subdomainsEnabled: core.serialization.property("subdomains_enabled", SubdomainsEnabled),
|
|
16
18
|
records: core.serialization.list(VerificationRecord),
|
|
17
19
|
clientId: core.serialization.property("client_id", ClientId.optional()),
|
|
18
20
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
@@ -6,6 +6,7 @@ import { ClientId } from "./ClientId.mjs";
|
|
|
6
6
|
import { DomainId } from "./DomainId.mjs";
|
|
7
7
|
import { DomainName } from "./DomainName.mjs";
|
|
8
8
|
import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
|
|
9
|
+
import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
|
|
9
10
|
export declare const DomainItem: core.serialization.ObjectSchema<serializers.DomainItem.Raw, AgentMail.DomainItem>;
|
|
10
11
|
export declare namespace DomainItem {
|
|
11
12
|
interface Raw {
|
|
@@ -13,6 +14,7 @@ export declare namespace DomainItem {
|
|
|
13
14
|
domain_id: DomainId.Raw;
|
|
14
15
|
domain: DomainName.Raw;
|
|
15
16
|
feedback_enabled: FeedbackEnabled.Raw;
|
|
17
|
+
subdomains_enabled: SubdomainsEnabled.Raw;
|
|
16
18
|
client_id?: ClientId.Raw | null;
|
|
17
19
|
updated_at: string;
|
|
18
20
|
created_at: string;
|
|
@@ -5,11 +5,13 @@ import { ClientId } from "./ClientId.mjs";
|
|
|
5
5
|
import { DomainId } from "./DomainId.mjs";
|
|
6
6
|
import { DomainName } from "./DomainName.mjs";
|
|
7
7
|
import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
|
|
8
|
+
import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
|
|
8
9
|
export const DomainItem = core.serialization.object({
|
|
9
10
|
podId: core.serialization.property("pod_id", PodId.optional()),
|
|
10
11
|
domainId: core.serialization.property("domain_id", DomainId),
|
|
11
12
|
domain: DomainName,
|
|
12
13
|
feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled),
|
|
14
|
+
subdomainsEnabled: core.serialization.property("subdomains_enabled", SubdomainsEnabled),
|
|
13
15
|
clientId: core.serialization.property("client_id", ClientId.optional()),
|
|
14
16
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
15
17
|
createdAt: core.serialization.property("created_at", core.serialization.date()),
|
|
@@ -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 SubdomainsEnabled: core.serialization.Schema<serializers.SubdomainsEnabled.Raw, AgentMail.SubdomainsEnabled>;
|
|
5
|
+
export declare namespace SubdomainsEnabled {
|
|
6
|
+
type Raw = boolean;
|
|
7
|
+
}
|