agentmail 0.1.6 → 0.1.7
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/README.md +63 -0
- package/dist/cjs/BaseClient.d.ts +14 -1
- package/dist/cjs/BaseClient.js +59 -0
- package/dist/cjs/Client.d.ts +30 -29
- package/dist/cjs/Client.js +12 -53
- package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +12 -12
- package/dist/cjs/api/resources/apiKeys/client/Client.js +29 -31
- package/dist/cjs/api/resources/domains/client/Client.d.ts +19 -19
- package/dist/cjs/api/resources/domains/client/Client.js +60 -53
- package/dist/cjs/api/resources/drafts/client/Client.d.ts +10 -10
- package/dist/cjs/api/resources/drafts/client/Client.js +23 -28
- package/dist/cjs/api/resources/events/types/DomainVerifiedEvent.d.ts +7 -0
- package/dist/cjs/api/resources/{webhooks → events}/types/EventType.d.ts +1 -0
- package/dist/cjs/api/resources/{webhooks → events}/types/EventType.js +1 -0
- package/dist/cjs/api/resources/events/types/EventTypes.d.ts +5 -0
- package/dist/cjs/api/resources/events/types/EventTypes.js +3 -0
- package/dist/cjs/api/resources/events/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/events/types/index.js +3 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +30 -30
- package/dist/cjs/api/resources/inboxes/client/Client.js +55 -51
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +27 -27
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +77 -70
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +25 -25
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +83 -73
- package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.js +17 -25
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +17 -17
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +51 -50
- package/dist/cjs/api/resources/metrics/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/metrics/client/Client.js +12 -20
- package/dist/cjs/api/resources/pods/client/Client.d.ts +27 -27
- package/dist/cjs/api/resources/pods/client/Client.js +44 -43
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +15 -15
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +41 -43
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.d.ts +12 -12
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +30 -35
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +19 -19
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +53 -52
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +13 -13
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +39 -41
- package/dist/cjs/api/resources/threads/client/Client.d.ts +11 -11
- package/dist/cjs/api/resources/threads/client/Client.js +32 -34
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +15 -15
- package/dist/cjs/api/resources/webhooks/client/Client.js +40 -39
- package/dist/cjs/api/resources/webhooks/types/CreateWebhookRequest.d.ts +1 -1
- package/dist/cjs/api/resources/webhooks/types/Webhook.d.ts +1 -1
- package/dist/cjs/api/resources/webhooks/types/index.d.ts +0 -2
- package/dist/cjs/api/resources/webhooks/types/index.js +0 -2
- package/dist/cjs/api/resources/websockets/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/websockets/client/Client.js +8 -19
- package/dist/cjs/api/resources/websockets/client/Socket.d.ts +1 -1
- package/dist/cjs/api/resources/websockets/types/Subscribe.d.ts +5 -1
- package/dist/cjs/api/resources/websockets/types/Subscribed.d.ts +5 -1
- package/dist/cjs/auth/BearerAuthProvider.d.ts +14 -0
- package/dist/cjs/auth/BearerAuthProvider.js +72 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +4 -1
- package/dist/cjs/core/auth/BearerToken.d.ts +3 -1
- package/dist/cjs/core/auth/BearerToken.js +7 -6
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +1 -0
- package/dist/cjs/core/auth/index.js +3 -1
- package/dist/cjs/core/exports.d.ts +1 -0
- package/dist/cjs/core/exports.js +1 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +4 -1
- package/dist/cjs/core/fetcher/Fetcher.js +202 -9
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
- package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/cjs/core/fetcher/makeRequest.js +0 -2
- package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
- package/dist/cjs/core/fetcher/signals.d.ts +0 -6
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/headers.js +6 -4
- package/dist/cjs/core/index.d.ts +1 -0
- package/dist/cjs/core/index.js +2 -1
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/schemas/Schema.d.ts +1 -0
- package/dist/cjs/core/schemas/Schema.js +1 -0
- package/dist/cjs/core/schemas/builders/primitives/index.d.ts +1 -0
- package/dist/cjs/core/schemas/builders/primitives/index.js +3 -1
- package/dist/cjs/core/schemas/builders/primitives/never.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/primitives/never.js +14 -0
- package/dist/cjs/core/url/join.js +0 -1
- package/dist/cjs/serialization/resources/events/types/DomainVerifiedEvent.d.ts +14 -0
- package/dist/cjs/serialization/resources/events/types/DomainVerifiedEvent.js +46 -0
- package/dist/cjs/serialization/resources/{webhooks → events}/types/EventType.d.ts +2 -2
- package/dist/cjs/serialization/resources/{webhooks → events}/types/EventType.js +1 -0
- package/dist/cjs/serialization/resources/{webhooks → events}/types/EventTypes.d.ts +1 -1
- package/dist/cjs/serialization/resources/events/types/index.d.ts +3 -0
- package/dist/cjs/serialization/resources/events/types/index.js +3 -0
- package/dist/cjs/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +1 -1
- package/dist/cjs/serialization/resources/webhooks/types/CreateWebhookRequest.js +1 -1
- package/dist/cjs/serialization/resources/webhooks/types/Webhook.d.ts +1 -1
- package/dist/cjs/serialization/resources/webhooks/types/Webhook.js +1 -1
- package/dist/cjs/serialization/resources/webhooks/types/index.d.ts +0 -2
- package/dist/cjs/serialization/resources/webhooks/types/index.js +0 -2
- package/dist/cjs/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.ts +3 -2
- package/dist/cjs/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.js +2 -0
- package/dist/cjs/serialization/resources/websockets/types/Subscribe.d.ts +4 -1
- package/dist/cjs/serialization/resources/websockets/types/Subscribe.js +4 -1
- package/dist/cjs/serialization/resources/websockets/types/Subscribed.d.ts +4 -1
- package/dist/cjs/serialization/resources/websockets/types/Subscribed.js +4 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +14 -1
- package/dist/esm/BaseClient.mjs +24 -1
- package/dist/esm/Client.d.mts +30 -29
- package/dist/esm/Client.mjs +21 -29
- package/dist/esm/api/resources/apiKeys/client/Client.d.mts +12 -12
- package/dist/esm/api/resources/apiKeys/client/Client.mjs +28 -30
- package/dist/esm/api/resources/domains/client/Client.d.mts +19 -19
- package/dist/esm/api/resources/domains/client/Client.mjs +59 -52
- package/dist/esm/api/resources/drafts/client/Client.d.mts +10 -10
- package/dist/esm/api/resources/drafts/client/Client.mjs +22 -27
- package/dist/esm/api/resources/events/types/DomainVerifiedEvent.d.mts +7 -0
- package/dist/esm/api/resources/{webhooks → events}/types/EventType.d.mts +1 -0
- package/dist/esm/api/resources/{webhooks → events}/types/EventType.mjs +1 -0
- package/dist/esm/api/resources/events/types/EventTypes.d.mts +5 -0
- package/dist/esm/api/resources/events/types/EventTypes.mjs +2 -0
- package/dist/esm/api/resources/events/types/index.d.mts +3 -0
- package/dist/esm/api/resources/events/types/index.mjs +3 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +30 -30
- package/dist/esm/api/resources/inboxes/client/Client.mjs +58 -54
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +27 -27
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +76 -69
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +25 -25
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +82 -72
- package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.mjs +16 -24
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +17 -17
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +50 -49
- package/dist/esm/api/resources/metrics/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/metrics/client/Client.mjs +11 -19
- package/dist/esm/api/resources/pods/client/Client.d.mts +27 -27
- package/dist/esm/api/resources/pods/client/Client.mjs +47 -46
- package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +15 -15
- package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +40 -42
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.d.mts +12 -12
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +29 -34
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +19 -19
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +52 -51
- package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +13 -13
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +38 -40
- package/dist/esm/api/resources/threads/client/Client.d.mts +11 -11
- package/dist/esm/api/resources/threads/client/Client.mjs +31 -33
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +15 -15
- package/dist/esm/api/resources/webhooks/client/Client.mjs +39 -38
- package/dist/esm/api/resources/webhooks/types/CreateWebhookRequest.d.mts +1 -1
- package/dist/esm/api/resources/webhooks/types/Webhook.d.mts +1 -1
- package/dist/esm/api/resources/webhooks/types/index.d.mts +0 -2
- package/dist/esm/api/resources/webhooks/types/index.mjs +0 -2
- package/dist/esm/api/resources/websockets/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/websockets/client/Client.mjs +7 -18
- package/dist/esm/api/resources/websockets/client/Socket.d.mts +1 -1
- package/dist/esm/api/resources/websockets/types/Subscribe.d.mts +5 -1
- package/dist/esm/api/resources/websockets/types/Subscribed.d.mts +5 -1
- package/dist/esm/auth/BearerAuthProvider.d.mts +14 -0
- package/dist/esm/auth/BearerAuthProvider.mjs +35 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +4 -1
- package/dist/esm/core/auth/BearerToken.d.mts +3 -1
- package/dist/esm/core/auth/BearerToken.mjs +7 -6
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +1 -0
- package/dist/esm/core/auth/index.mjs +1 -0
- package/dist/esm/core/exports.d.mts +1 -0
- package/dist/esm/core/exports.mjs +1 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +4 -1
- package/dist/esm/core/fetcher/Fetcher.mjs +202 -9
- package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
- package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
- package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
- package/dist/esm/core/fetcher/signals.d.mts +0 -6
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/headers.mjs +6 -4
- package/dist/esm/core/index.d.mts +1 -0
- package/dist/esm/core/index.mjs +1 -0
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/schemas/Schema.d.mts +1 -0
- package/dist/esm/core/schemas/Schema.mjs +1 -0
- package/dist/esm/core/schemas/builders/primitives/index.d.mts +1 -0
- package/dist/esm/core/schemas/builders/primitives/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/primitives/never.d.mts +2 -0
- package/dist/esm/core/schemas/builders/primitives/never.mjs +11 -0
- package/dist/esm/core/url/join.mjs +0 -1
- package/dist/esm/serialization/resources/events/types/DomainVerifiedEvent.d.mts +14 -0
- package/dist/esm/serialization/resources/events/types/DomainVerifiedEvent.mjs +10 -0
- package/dist/esm/serialization/resources/{webhooks → events}/types/EventType.d.mts +2 -2
- package/dist/esm/serialization/resources/{webhooks → events}/types/EventType.mjs +1 -0
- package/dist/esm/serialization/resources/{webhooks → events}/types/EventTypes.d.mts +1 -1
- package/dist/esm/serialization/resources/events/types/index.d.mts +3 -0
- package/dist/esm/serialization/resources/events/types/index.mjs +3 -0
- package/dist/esm/serialization/resources/webhooks/types/CreateWebhookRequest.d.mts +1 -1
- package/dist/esm/serialization/resources/webhooks/types/CreateWebhookRequest.mjs +1 -1
- package/dist/esm/serialization/resources/webhooks/types/Webhook.d.mts +1 -1
- package/dist/esm/serialization/resources/webhooks/types/Webhook.mjs +1 -1
- package/dist/esm/serialization/resources/webhooks/types/index.d.mts +0 -2
- package/dist/esm/serialization/resources/webhooks/types/index.mjs +0 -2
- package/dist/esm/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.mts +3 -2
- package/dist/esm/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.mjs +2 -0
- package/dist/esm/serialization/resources/websockets/types/Subscribe.d.mts +4 -1
- package/dist/esm/serialization/resources/websockets/types/Subscribe.mjs +4 -1
- package/dist/esm/serialization/resources/websockets/types/Subscribed.d.mts +4 -1
- package/dist/esm/serialization/resources/websockets/types/Subscribed.mjs +4 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +620 -54
- package/dist/llms.txt +6 -1
- package/package.json +1 -1
- package/reference.md +170 -170
- package/dist/cjs/api/resources/webhooks/types/EventTypes.d.ts +0 -5
- package/dist/esm/api/resources/webhooks/types/EventTypes.d.mts +0 -5
- /package/dist/cjs/api/resources/{webhooks/types/EventTypes.js → events/types/DomainVerifiedEvent.js} +0 -0
- /package/dist/cjs/serialization/resources/{webhooks → events}/types/EventTypes.js +0 -0
- /package/dist/esm/api/resources/{webhooks/types/EventTypes.mjs → events/types/DomainVerifiedEvent.mjs} +0 -0
- /package/dist/esm/serialization/resources/{webhooks → events}/types/EventTypes.mjs +0 -0
|
@@ -43,7 +43,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
46
|
+
exports.DraftsClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
47
48
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
48
49
|
const core = __importStar(require("../../../../../../core/index.js"));
|
|
49
50
|
const json_js_1 = require("../../../../../../core/json.js");
|
|
@@ -51,26 +52,26 @@ const environments = __importStar(require("../../../../../../environments.js"));
|
|
|
51
52
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
52
53
|
const serializers = __importStar(require("../../../../../../serialization/index.js"));
|
|
53
54
|
const AgentMail = __importStar(require("../../../../../index.js"));
|
|
54
|
-
class
|
|
55
|
-
constructor(
|
|
56
|
-
this._options =
|
|
55
|
+
class DraftsClient {
|
|
56
|
+
constructor(options = {}) {
|
|
57
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
58
|
}
|
|
58
59
|
/**
|
|
59
|
-
* @param {AgentMail.inboxes.InboxId}
|
|
60
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
60
61
|
* @param {AgentMail.inboxes.ListDraftsRequest} request
|
|
61
|
-
* @param {
|
|
62
|
+
* @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
63
|
*
|
|
63
64
|
* @throws {@link AgentMail.NotFoundError}
|
|
64
65
|
*
|
|
65
66
|
* @example
|
|
66
67
|
* await client.inboxes.drafts.list("inbox_id")
|
|
67
68
|
*/
|
|
68
|
-
list(
|
|
69
|
-
return core.HttpResponsePromise.fromPromise(this.__list(
|
|
69
|
+
list(inbox_id, request = {}, requestOptions) {
|
|
70
|
+
return core.HttpResponsePromise.fromPromise(this.__list(inbox_id, request, requestOptions));
|
|
70
71
|
}
|
|
71
|
-
__list(
|
|
72
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
73
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
72
|
+
__list(inbox_id_1) {
|
|
73
|
+
return __awaiter(this, arguments, void 0, function* (inbox_id, request = {}, requestOptions) {
|
|
74
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
74
75
|
const { limit, pageToken, labels, before, after, ascending } = request;
|
|
75
76
|
const _queryParams = {};
|
|
76
77
|
if (limit != null) {
|
|
@@ -96,15 +97,18 @@ class Drafts {
|
|
|
96
97
|
if (ascending != null) {
|
|
97
98
|
_queryParams.ascending = ascending.toString();
|
|
98
99
|
}
|
|
99
|
-
const
|
|
100
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
101
|
+
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);
|
|
100
102
|
const _response = yield core.fetcher({
|
|
101
|
-
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(
|
|
103
|
+
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/drafts`),
|
|
102
104
|
method: "GET",
|
|
103
105
|
headers: _headers,
|
|
104
106
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
105
107
|
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,
|
|
106
108
|
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,
|
|
107
109
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
110
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
111
|
+
logging: this._options.logging,
|
|
108
112
|
});
|
|
109
113
|
if (_response.ok) {
|
|
110
114
|
return {
|
|
@@ -154,30 +158,33 @@ class Drafts {
|
|
|
154
158
|
});
|
|
155
159
|
}
|
|
156
160
|
/**
|
|
157
|
-
* @param {AgentMail.inboxes.InboxId}
|
|
158
|
-
* @param {AgentMail.DraftId}
|
|
159
|
-
* @param {
|
|
161
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
162
|
+
* @param {AgentMail.DraftId} draft_id
|
|
163
|
+
* @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
160
164
|
*
|
|
161
165
|
* @throws {@link AgentMail.NotFoundError}
|
|
162
166
|
*
|
|
163
167
|
* @example
|
|
164
168
|
* await client.inboxes.drafts.get("inbox_id", "draft_id")
|
|
165
169
|
*/
|
|
166
|
-
get(
|
|
167
|
-
return core.HttpResponsePromise.fromPromise(this.__get(
|
|
170
|
+
get(inbox_id, draft_id, requestOptions) {
|
|
171
|
+
return core.HttpResponsePromise.fromPromise(this.__get(inbox_id, draft_id, requestOptions));
|
|
168
172
|
}
|
|
169
|
-
__get(
|
|
173
|
+
__get(inbox_id, draft_id, requestOptions) {
|
|
170
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
172
|
-
const
|
|
175
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
176
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
177
|
+
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);
|
|
173
178
|
const _response = yield core.fetcher({
|
|
174
|
-
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(
|
|
179
|
+
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/drafts/${core.url.encodePathParam(serializers.DraftId.jsonOrThrow(draft_id, { omitUndefined: true }))}`),
|
|
175
180
|
method: "GET",
|
|
176
181
|
headers: _headers,
|
|
177
182
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
178
183
|
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,
|
|
179
184
|
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,
|
|
180
185
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
186
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
187
|
+
logging: this._options.logging,
|
|
181
188
|
});
|
|
182
189
|
if (_response.ok) {
|
|
183
190
|
return {
|
|
@@ -227,24 +234,25 @@ class Drafts {
|
|
|
227
234
|
});
|
|
228
235
|
}
|
|
229
236
|
/**
|
|
230
|
-
* @param {AgentMail.inboxes.InboxId}
|
|
237
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
231
238
|
* @param {AgentMail.CreateDraftRequest} request
|
|
232
|
-
* @param {
|
|
239
|
+
* @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
233
240
|
*
|
|
234
241
|
* @throws {@link AgentMail.NotFoundError}
|
|
235
242
|
*
|
|
236
243
|
* @example
|
|
237
244
|
* await client.inboxes.drafts.create("inbox_id", {})
|
|
238
245
|
*/
|
|
239
|
-
create(
|
|
240
|
-
return core.HttpResponsePromise.fromPromise(this.__create(
|
|
246
|
+
create(inbox_id, request, requestOptions) {
|
|
247
|
+
return core.HttpResponsePromise.fromPromise(this.__create(inbox_id, request, requestOptions));
|
|
241
248
|
}
|
|
242
|
-
__create(
|
|
249
|
+
__create(inbox_id, request, requestOptions) {
|
|
243
250
|
return __awaiter(this, void 0, void 0, function* () {
|
|
244
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
245
|
-
const
|
|
251
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
252
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
253
|
+
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);
|
|
246
254
|
const _response = yield core.fetcher({
|
|
247
|
-
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(
|
|
255
|
+
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/drafts`),
|
|
248
256
|
method: "POST",
|
|
249
257
|
headers: _headers,
|
|
250
258
|
contentType: "application/json",
|
|
@@ -259,6 +267,8 @@ class Drafts {
|
|
|
259
267
|
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,
|
|
260
268
|
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,
|
|
261
269
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
270
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
271
|
+
logging: this._options.logging,
|
|
262
272
|
});
|
|
263
273
|
if (_response.ok) {
|
|
264
274
|
return {
|
|
@@ -308,25 +318,26 @@ class Drafts {
|
|
|
308
318
|
});
|
|
309
319
|
}
|
|
310
320
|
/**
|
|
311
|
-
* @param {AgentMail.inboxes.InboxId}
|
|
312
|
-
* @param {AgentMail.DraftId}
|
|
321
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
322
|
+
* @param {AgentMail.DraftId} draft_id
|
|
313
323
|
* @param {AgentMail.UpdateDraftRequest} request
|
|
314
|
-
* @param {
|
|
324
|
+
* @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
315
325
|
*
|
|
316
326
|
* @throws {@link AgentMail.NotFoundError}
|
|
317
327
|
*
|
|
318
328
|
* @example
|
|
319
329
|
* await client.inboxes.drafts.update("inbox_id", "draft_id", {})
|
|
320
330
|
*/
|
|
321
|
-
update(
|
|
322
|
-
return core.HttpResponsePromise.fromPromise(this.__update(
|
|
331
|
+
update(inbox_id, draft_id, request, requestOptions) {
|
|
332
|
+
return core.HttpResponsePromise.fromPromise(this.__update(inbox_id, draft_id, request, requestOptions));
|
|
323
333
|
}
|
|
324
|
-
__update(
|
|
334
|
+
__update(inbox_id, draft_id, request, requestOptions) {
|
|
325
335
|
return __awaiter(this, void 0, void 0, function* () {
|
|
326
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
327
|
-
const
|
|
336
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
337
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
338
|
+
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);
|
|
328
339
|
const _response = yield core.fetcher({
|
|
329
|
-
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(
|
|
340
|
+
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/drafts/${core.url.encodePathParam(serializers.DraftId.jsonOrThrow(draft_id, { omitUndefined: true }))}`),
|
|
330
341
|
method: "PATCH",
|
|
331
342
|
headers: _headers,
|
|
332
343
|
contentType: "application/json",
|
|
@@ -341,6 +352,8 @@ class Drafts {
|
|
|
341
352
|
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,
|
|
342
353
|
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,
|
|
343
354
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
355
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
356
|
+
logging: this._options.logging,
|
|
344
357
|
});
|
|
345
358
|
if (_response.ok) {
|
|
346
359
|
return {
|
|
@@ -390,10 +403,10 @@ class Drafts {
|
|
|
390
403
|
});
|
|
391
404
|
}
|
|
392
405
|
/**
|
|
393
|
-
* @param {AgentMail.inboxes.InboxId}
|
|
394
|
-
* @param {AgentMail.DraftId}
|
|
406
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
407
|
+
* @param {AgentMail.DraftId} draft_id
|
|
395
408
|
* @param {AgentMail.UpdateMessageRequest} request
|
|
396
|
-
* @param {
|
|
409
|
+
* @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
397
410
|
*
|
|
398
411
|
* @throws {@link AgentMail.NotFoundError}
|
|
399
412
|
* @throws {@link AgentMail.ValidationError}
|
|
@@ -402,15 +415,16 @@ class Drafts {
|
|
|
402
415
|
* @example
|
|
403
416
|
* await client.inboxes.drafts.send("inbox_id", "draft_id", {})
|
|
404
417
|
*/
|
|
405
|
-
send(
|
|
406
|
-
return core.HttpResponsePromise.fromPromise(this.__send(
|
|
418
|
+
send(inbox_id, draft_id, request, requestOptions) {
|
|
419
|
+
return core.HttpResponsePromise.fromPromise(this.__send(inbox_id, draft_id, request, requestOptions));
|
|
407
420
|
}
|
|
408
|
-
__send(
|
|
421
|
+
__send(inbox_id, draft_id, request, requestOptions) {
|
|
409
422
|
return __awaiter(this, void 0, void 0, function* () {
|
|
410
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
411
|
-
const
|
|
423
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
424
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
425
|
+
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);
|
|
412
426
|
const _response = yield core.fetcher({
|
|
413
|
-
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(
|
|
427
|
+
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/drafts/${core.url.encodePathParam(serializers.DraftId.jsonOrThrow(draft_id, { omitUndefined: true }))}/send`),
|
|
414
428
|
method: "POST",
|
|
415
429
|
headers: _headers,
|
|
416
430
|
contentType: "application/json",
|
|
@@ -425,6 +439,8 @@ class Drafts {
|
|
|
425
439
|
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,
|
|
426
440
|
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,
|
|
427
441
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
442
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
443
|
+
logging: this._options.logging,
|
|
428
444
|
});
|
|
429
445
|
if (_response.ok) {
|
|
430
446
|
return {
|
|
@@ -490,30 +506,33 @@ class Drafts {
|
|
|
490
506
|
});
|
|
491
507
|
}
|
|
492
508
|
/**
|
|
493
|
-
* @param {AgentMail.inboxes.InboxId}
|
|
494
|
-
* @param {AgentMail.DraftId}
|
|
495
|
-
* @param {
|
|
509
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
510
|
+
* @param {AgentMail.DraftId} draft_id
|
|
511
|
+
* @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
496
512
|
*
|
|
497
513
|
* @throws {@link AgentMail.NotFoundError}
|
|
498
514
|
*
|
|
499
515
|
* @example
|
|
500
516
|
* await client.inboxes.drafts.delete("inbox_id", "draft_id")
|
|
501
517
|
*/
|
|
502
|
-
delete(
|
|
503
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(
|
|
518
|
+
delete(inbox_id, draft_id, requestOptions) {
|
|
519
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(inbox_id, draft_id, requestOptions));
|
|
504
520
|
}
|
|
505
|
-
__delete(
|
|
521
|
+
__delete(inbox_id, draft_id, requestOptions) {
|
|
506
522
|
return __awaiter(this, void 0, void 0, function* () {
|
|
507
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
508
|
-
const
|
|
523
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
524
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
525
|
+
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);
|
|
509
526
|
const _response = yield core.fetcher({
|
|
510
|
-
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(
|
|
527
|
+
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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/drafts/${core.url.encodePathParam(serializers.DraftId.jsonOrThrow(draft_id, { omitUndefined: true }))}`),
|
|
511
528
|
method: "DELETE",
|
|
512
529
|
headers: _headers,
|
|
513
530
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
514
531
|
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,
|
|
515
532
|
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,
|
|
516
533
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
534
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
535
|
+
logging: this._options.logging,
|
|
517
536
|
});
|
|
518
537
|
if (_response.ok) {
|
|
519
538
|
return { data: undefined, rawResponse: _response.rawResponse };
|
|
@@ -553,17 +572,5 @@ class Drafts {
|
|
|
553
572
|
}
|
|
554
573
|
});
|
|
555
574
|
}
|
|
556
|
-
_getAuthorizationHeader() {
|
|
557
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
558
|
-
var _a;
|
|
559
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env.AGENTMAIL_API_KEY;
|
|
560
|
-
if (bearer == null) {
|
|
561
|
-
throw new errors.AgentMailError({
|
|
562
|
-
message: "Please specify a bearer by either passing it in to the constructor or initializing a AGENTMAIL_API_KEY environment variable",
|
|
563
|
-
});
|
|
564
|
-
}
|
|
565
|
-
return `Bearer ${bearer}`;
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
575
|
}
|
|
569
|
-
exports.
|
|
576
|
+
exports.DraftsClient = DraftsClient;
|
|
@@ -1,53 +1,54 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
2
3
|
import * as core from "../../../../../../core/index.js";
|
|
3
4
|
import * as AgentMail from "../../../../../index.js";
|
|
4
|
-
export declare namespace
|
|
5
|
+
export declare namespace MessagesClient {
|
|
5
6
|
interface Options extends BaseClientOptions {
|
|
6
7
|
}
|
|
7
8
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
protected readonly _options:
|
|
12
|
-
constructor(
|
|
11
|
+
export declare class MessagesClient {
|
|
12
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<MessagesClient.Options>;
|
|
13
|
+
constructor(options?: MessagesClient.Options);
|
|
13
14
|
/**
|
|
14
|
-
* @param {AgentMail.inboxes.InboxId}
|
|
15
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
15
16
|
* @param {AgentMail.inboxes.ListMessagesRequest} request
|
|
16
|
-
* @param {
|
|
17
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
18
|
*
|
|
18
19
|
* @throws {@link AgentMail.NotFoundError}
|
|
19
20
|
*
|
|
20
21
|
* @example
|
|
21
22
|
* await client.inboxes.messages.list("inbox_id")
|
|
22
23
|
*/
|
|
23
|
-
list(
|
|
24
|
+
list(inbox_id: AgentMail.inboxes.InboxId, request?: AgentMail.inboxes.ListMessagesRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListMessagesResponse>;
|
|
24
25
|
private __list;
|
|
25
26
|
/**
|
|
26
|
-
* @param {AgentMail.inboxes.InboxId}
|
|
27
|
-
* @param {AgentMail.MessageId}
|
|
28
|
-
* @param {
|
|
27
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
28
|
+
* @param {AgentMail.MessageId} message_id
|
|
29
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
30
|
*
|
|
30
31
|
* @throws {@link AgentMail.NotFoundError}
|
|
31
32
|
*
|
|
32
33
|
* @example
|
|
33
34
|
* await client.inboxes.messages.get("inbox_id", "message_id")
|
|
34
35
|
*/
|
|
35
|
-
get(
|
|
36
|
+
get(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.Message>;
|
|
36
37
|
private __get;
|
|
37
38
|
/**
|
|
38
39
|
* @throws {@link AgentMail.NotFoundError}
|
|
39
40
|
*/
|
|
40
|
-
getAttachment(
|
|
41
|
+
getAttachment(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, attachment_id: AgentMail.AttachmentId, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
41
42
|
private __getAttachment;
|
|
42
43
|
/**
|
|
43
44
|
* @throws {@link AgentMail.NotFoundError}
|
|
44
45
|
*/
|
|
45
|
-
getRaw(
|
|
46
|
+
getRaw(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
46
47
|
private __getRaw;
|
|
47
48
|
/**
|
|
48
|
-
* @param {AgentMail.inboxes.InboxId}
|
|
49
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
49
50
|
* @param {AgentMail.SendMessageRequest} request
|
|
50
|
-
* @param {
|
|
51
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
52
|
*
|
|
52
53
|
* @throws {@link AgentMail.ValidationError}
|
|
53
54
|
* @throws {@link AgentMail.NotFoundError}
|
|
@@ -56,13 +57,13 @@ export declare class Messages {
|
|
|
56
57
|
* @example
|
|
57
58
|
* await client.inboxes.messages.send("inbox_id", {})
|
|
58
59
|
*/
|
|
59
|
-
send(
|
|
60
|
+
send(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.SendMessageRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.SendMessageResponse>;
|
|
60
61
|
private __send;
|
|
61
62
|
/**
|
|
62
|
-
* @param {AgentMail.inboxes.InboxId}
|
|
63
|
-
* @param {AgentMail.MessageId}
|
|
63
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
64
|
+
* @param {AgentMail.MessageId} message_id
|
|
64
65
|
* @param {AgentMail.ReplyToMessageRequest} request
|
|
65
|
-
* @param {
|
|
66
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
67
|
*
|
|
67
68
|
* @throws {@link AgentMail.ValidationError}
|
|
68
69
|
* @throws {@link AgentMail.NotFoundError}
|
|
@@ -71,13 +72,13 @@ export declare class Messages {
|
|
|
71
72
|
* @example
|
|
72
73
|
* await client.inboxes.messages.reply("inbox_id", "message_id", {})
|
|
73
74
|
*/
|
|
74
|
-
reply(
|
|
75
|
+
reply(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, request: AgentMail.ReplyToMessageRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.SendMessageResponse>;
|
|
75
76
|
private __reply;
|
|
76
77
|
/**
|
|
77
|
-
* @param {AgentMail.inboxes.InboxId}
|
|
78
|
-
* @param {AgentMail.MessageId}
|
|
78
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
79
|
+
* @param {AgentMail.MessageId} message_id
|
|
79
80
|
* @param {AgentMail.UpdateMessageRequest} request
|
|
80
|
-
* @param {
|
|
81
|
+
* @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
82
|
*
|
|
82
83
|
* @throws {@link AgentMail.ValidationError}
|
|
83
84
|
* @throws {@link AgentMail.NotFoundError}
|
|
@@ -85,7 +86,6 @@ export declare class Messages {
|
|
|
85
86
|
* @example
|
|
86
87
|
* await client.inboxes.messages.update("inbox_id", "message_id", {})
|
|
87
88
|
*/
|
|
88
|
-
update(
|
|
89
|
+
update(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, request: AgentMail.UpdateMessageRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.Message>;
|
|
89
90
|
private __update;
|
|
90
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
91
91
|
}
|