hostinger-mail-api-sdk 1.0.2
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/.github/workflows/build-release.yaml +91 -0
- package/CODEOWNERS +1 -0
- package/README.md +9 -0
- package/api.ts +3760 -0
- package/base.ts +83 -0
- package/common.ts +111 -0
- package/configuration.ts +72 -0
- package/dist/api.d.ts +2426 -0
- package/dist/api.js +2484 -0
- package/dist/base.d.ts +63 -0
- package/dist/base.js +62 -0
- package/dist/common.d.ts +47 -0
- package/dist/common.js +118 -0
- package/dist/configuration.d.ts +51 -0
- package/dist/configuration.js +37 -0
- package/dist/esm/api.d.ts +2426 -0
- package/dist/esm/api.js +2457 -0
- package/dist/esm/base.d.ts +63 -0
- package/dist/esm/base.js +57 -0
- package/dist/esm/common.d.ts +47 -0
- package/dist/esm/common.js +109 -0
- package/dist/esm/configuration.d.ts +51 -0
- package/dist/esm/configuration.js +33 -0
- package/dist/esm/index.d.ts +10 -0
- package/dist/esm/index.js +12 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +28 -0
- package/docs/AccountApi.md +55 -0
- package/docs/Error.md +25 -0
- package/docs/FoldersApi.md +259 -0
- package/docs/MessagesApi.md +860 -0
- package/docs/Pagination.md +27 -0
- package/docs/QuotaApi.md +63 -0
- package/docs/SendApi.md +68 -0
- package/docs/V1FolderMessagesCollection.md +23 -0
- package/docs/V1FolderMessagesDeleteBulkRequest.md +21 -0
- package/docs/V1FolderMessagesFlagsBulkRequest.md +25 -0
- package/docs/V1FolderMessagesFlagsRequest.md +23 -0
- package/docs/V1FolderMessagesMessage.md +47 -0
- package/docs/V1FolderMessagesMessageAddress.md +23 -0
- package/docs/V1FolderMessagesMessageAttachment.md +31 -0
- package/docs/V1FolderMessagesMessageText.md +23 -0
- package/docs/V1FolderMessagesMessageTextResource.md +21 -0
- package/docs/V1FolderMessagesMoveBulkRequest.md +23 -0
- package/docs/V1FolderMessagesMoveRequest.md +21 -0
- package/docs/V1FolderMessagesResource.md +21 -0
- package/docs/V1FolderMessagesSearchRequest.md +45 -0
- package/docs/V1FolderMessagesUpdateFlagsResult.md +21 -0
- package/docs/V1FolderMessagesUpdateFlagsResultData.md +22 -0
- package/docs/V1FolderMessagesUpdateFlagsResultDataFailedInner.md +22 -0
- package/docs/V1FoldersCollection.md +23 -0
- package/docs/V1FoldersCreateRequest.md +21 -0
- package/docs/V1FoldersFolder.md +31 -0
- package/docs/V1FoldersResource.md +21 -0
- package/docs/V1FoldersUpdateRequest.md +21 -0
- package/docs/V1MeMailbox.md +23 -0
- package/docs/V1MeResource.md +21 -0
- package/docs/V1MeResourceData.md +22 -0
- package/docs/V1QuotaQuota.md +29 -0
- package/docs/V1QuotaQuotaResource.md +27 -0
- package/docs/V1QuotaResource.md +21 -0
- package/docs/V1SendAttachment.md +29 -0
- package/docs/V1SendRequest.md +35 -0
- package/docs/V1WebhooksCollection.md +23 -0
- package/docs/V1WebhooksCreateRequest.md +29 -0
- package/docs/V1WebhooksResource.md +21 -0
- package/docs/V1WebhooksResourceWithSecret.md +21 -0
- package/docs/V1WebhooksTestResult.md +21 -0
- package/docs/V1WebhooksTestResultData.md +24 -0
- package/docs/V1WebhooksUpdateRequest.md +29 -0
- package/docs/V1WebhooksWebhook.md +39 -0
- package/docs/V1WebhooksWebhookWithSecret.md +41 -0
- package/docs/WebhooksApi.md +439 -0
- package/index.ts +15 -0
- package/package.json +34 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +18 -0
package/dist/api.js
ADDED
|
@@ -0,0 +1,2484 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Hostinger Email API
|
|
6
|
+
*
|
|
7
|
+
* API Version: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
|
+
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
11
|
+
*/
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.ListWebhooksStatusEnum = exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.SendApi = exports.SendApiFactory = exports.SendApiFp = exports.SendApiAxiosParamCreator = exports.QuotaApi = exports.QuotaApiFactory = exports.QuotaApiFp = exports.QuotaApiAxiosParamCreator = exports.MessagesApi = exports.MessagesApiFactory = exports.MessagesApiFp = exports.MessagesApiAxiosParamCreator = exports.FoldersApi = exports.FoldersApiFactory = exports.FoldersApiFp = exports.FoldersApiAxiosParamCreator = exports.AccountApi = exports.AccountApiFactory = exports.AccountApiFp = exports.AccountApiAxiosParamCreator = exports.V1WebhooksWebhookWithSecretStatusEnum = exports.V1WebhooksWebhookWithSecretEventsEnum = exports.V1WebhooksWebhookStatusEnum = exports.V1WebhooksWebhookEventsEnum = exports.V1WebhooksUpdateRequestStatusEnum = exports.V1WebhooksUpdateRequestEventsEnum = exports.V1WebhooksCreateRequestStatusEnum = exports.V1WebhooksCreateRequestEventsEnum = void 0;
|
|
23
|
+
const axios_1 = require("axios");
|
|
24
|
+
// Some imports not used depending on template conditions
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
const common_1 = require("./common");
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
const base_1 = require("./base");
|
|
29
|
+
exports.V1WebhooksCreateRequestEventsEnum = {
|
|
30
|
+
MessageReceived: 'message.received'
|
|
31
|
+
};
|
|
32
|
+
exports.V1WebhooksCreateRequestStatusEnum = {
|
|
33
|
+
Active: 'active',
|
|
34
|
+
Paused: 'paused',
|
|
35
|
+
Disabled: 'disabled'
|
|
36
|
+
};
|
|
37
|
+
exports.V1WebhooksUpdateRequestEventsEnum = {
|
|
38
|
+
MessageReceived: 'message.received'
|
|
39
|
+
};
|
|
40
|
+
exports.V1WebhooksUpdateRequestStatusEnum = {
|
|
41
|
+
Active: 'active',
|
|
42
|
+
Paused: 'paused',
|
|
43
|
+
Disabled: 'disabled'
|
|
44
|
+
};
|
|
45
|
+
exports.V1WebhooksWebhookEventsEnum = {
|
|
46
|
+
MessageReceived: 'message.received'
|
|
47
|
+
};
|
|
48
|
+
exports.V1WebhooksWebhookStatusEnum = {
|
|
49
|
+
Active: 'active',
|
|
50
|
+
Paused: 'paused',
|
|
51
|
+
Disabled: 'disabled'
|
|
52
|
+
};
|
|
53
|
+
exports.V1WebhooksWebhookWithSecretEventsEnum = {
|
|
54
|
+
MessageReceived: 'message.received'
|
|
55
|
+
};
|
|
56
|
+
exports.V1WebhooksWebhookWithSecretStatusEnum = {
|
|
57
|
+
Active: 'active',
|
|
58
|
+
Paused: 'paused',
|
|
59
|
+
Disabled: 'disabled'
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* AccountApi - axios parameter creator
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
const AccountApiAxiosParamCreator = function (configuration) {
|
|
66
|
+
return {
|
|
67
|
+
/**
|
|
68
|
+
* Returns the authenticated account and the mailboxes it can manage.
|
|
69
|
+
* @summary Get the authenticated account
|
|
70
|
+
* @param {*} [options] Override http request option.
|
|
71
|
+
* @throws {RequiredError}
|
|
72
|
+
*/
|
|
73
|
+
getCurrentAccount: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
74
|
+
const localVarPath = `/api/v1/me`;
|
|
75
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
76
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
77
|
+
let baseOptions;
|
|
78
|
+
if (configuration) {
|
|
79
|
+
baseOptions = configuration.baseOptions;
|
|
80
|
+
}
|
|
81
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
82
|
+
const localVarHeaderParameter = {};
|
|
83
|
+
const localVarQueryParameter = {};
|
|
84
|
+
// authentication BearerAuth required
|
|
85
|
+
// http bearer authentication required
|
|
86
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
87
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
88
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
89
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
90
|
+
return {
|
|
91
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
92
|
+
options: localVarRequestOptions,
|
|
93
|
+
};
|
|
94
|
+
}),
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
exports.AccountApiAxiosParamCreator = AccountApiAxiosParamCreator;
|
|
98
|
+
/**
|
|
99
|
+
* AccountApi - functional programming interface
|
|
100
|
+
* @export
|
|
101
|
+
*/
|
|
102
|
+
const AccountApiFp = function (configuration) {
|
|
103
|
+
const localVarAxiosParamCreator = (0, exports.AccountApiAxiosParamCreator)(configuration);
|
|
104
|
+
return {
|
|
105
|
+
/**
|
|
106
|
+
* Returns the authenticated account and the mailboxes it can manage.
|
|
107
|
+
* @summary Get the authenticated account
|
|
108
|
+
* @param {*} [options] Override http request option.
|
|
109
|
+
* @throws {RequiredError}
|
|
110
|
+
*/
|
|
111
|
+
getCurrentAccount(options) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
var _a, _b;
|
|
114
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCurrentAccount(options);
|
|
115
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['AccountApi.getCurrentAccount']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
116
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
exports.AccountApiFp = AccountApiFp;
|
|
122
|
+
/**
|
|
123
|
+
* AccountApi - factory interface
|
|
124
|
+
* @export
|
|
125
|
+
*/
|
|
126
|
+
const AccountApiFactory = function (configuration, basePath, axios) {
|
|
127
|
+
const localVarFp = (0, exports.AccountApiFp)(configuration);
|
|
128
|
+
return {
|
|
129
|
+
/**
|
|
130
|
+
* Returns the authenticated account and the mailboxes it can manage.
|
|
131
|
+
* @summary Get the authenticated account
|
|
132
|
+
* @param {*} [options] Override http request option.
|
|
133
|
+
* @throws {RequiredError}
|
|
134
|
+
*/
|
|
135
|
+
getCurrentAccount(options) {
|
|
136
|
+
return localVarFp.getCurrentAccount(options).then((request) => request(axios, basePath));
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
exports.AccountApiFactory = AccountApiFactory;
|
|
141
|
+
/**
|
|
142
|
+
* AccountApi - object-oriented interface
|
|
143
|
+
* @export
|
|
144
|
+
* @class AccountApi
|
|
145
|
+
* @extends {BaseAPI}
|
|
146
|
+
*/
|
|
147
|
+
class AccountApi extends base_1.BaseAPI {
|
|
148
|
+
/**
|
|
149
|
+
* Returns the authenticated account and the mailboxes it can manage.
|
|
150
|
+
* @summary Get the authenticated account
|
|
151
|
+
* @param {*} [options] Override http request option.
|
|
152
|
+
* @throws {RequiredError}
|
|
153
|
+
* @memberof AccountApi
|
|
154
|
+
*/
|
|
155
|
+
getCurrentAccount(options) {
|
|
156
|
+
return (0, exports.AccountApiFp)(this.configuration).getCurrentAccount(options).then((request) => request(this.axios, this.basePath));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
exports.AccountApi = AccountApi;
|
|
160
|
+
/**
|
|
161
|
+
* FoldersApi - axios parameter creator
|
|
162
|
+
* @export
|
|
163
|
+
*/
|
|
164
|
+
const FoldersApiAxiosParamCreator = function (configuration) {
|
|
165
|
+
return {
|
|
166
|
+
/**
|
|
167
|
+
* Create a new folder in the managed mailbox.
|
|
168
|
+
* @summary Create folder
|
|
169
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
170
|
+
* @param {V1FoldersCreateRequest} v1FoldersCreateRequest
|
|
171
|
+
* @param {*} [options] Override http request option.
|
|
172
|
+
* @throws {RequiredError}
|
|
173
|
+
*/
|
|
174
|
+
createFolder: (mailboxResourceId_1, v1FoldersCreateRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, v1FoldersCreateRequest_1, ...args_1], void 0, function* (mailboxResourceId, v1FoldersCreateRequest, options = {}) {
|
|
175
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
176
|
+
(0, common_1.assertParamExists)('createFolder', 'mailboxResourceId', mailboxResourceId);
|
|
177
|
+
// verify required parameter 'v1FoldersCreateRequest' is not null or undefined
|
|
178
|
+
(0, common_1.assertParamExists)('createFolder', 'v1FoldersCreateRequest', v1FoldersCreateRequest);
|
|
179
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders`
|
|
180
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
181
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
182
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
183
|
+
let baseOptions;
|
|
184
|
+
if (configuration) {
|
|
185
|
+
baseOptions = configuration.baseOptions;
|
|
186
|
+
}
|
|
187
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
188
|
+
const localVarHeaderParameter = {};
|
|
189
|
+
const localVarQueryParameter = {};
|
|
190
|
+
// authentication BearerAuth required
|
|
191
|
+
// http bearer authentication required
|
|
192
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
193
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
194
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
195
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
196
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
197
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1FoldersCreateRequest, localVarRequestOptions, configuration);
|
|
198
|
+
return {
|
|
199
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
200
|
+
options: localVarRequestOptions,
|
|
201
|
+
};
|
|
202
|
+
}),
|
|
203
|
+
/**
|
|
204
|
+
* Delete a folder and all of its subfolders.
|
|
205
|
+
* @summary Delete folder
|
|
206
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
207
|
+
* @param {string} folder Folder path to delete (URL-encoded).
|
|
208
|
+
* @param {*} [options] Override http request option.
|
|
209
|
+
* @throws {RequiredError}
|
|
210
|
+
*/
|
|
211
|
+
deleteFolder: (mailboxResourceId_1, folder_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, ...args_1], void 0, function* (mailboxResourceId, folder, options = {}) {
|
|
212
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
213
|
+
(0, common_1.assertParamExists)('deleteFolder', 'mailboxResourceId', mailboxResourceId);
|
|
214
|
+
// verify required parameter 'folder' is not null or undefined
|
|
215
|
+
(0, common_1.assertParamExists)('deleteFolder', 'folder', folder);
|
|
216
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}`
|
|
217
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
218
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
219
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
220
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
221
|
+
let baseOptions;
|
|
222
|
+
if (configuration) {
|
|
223
|
+
baseOptions = configuration.baseOptions;
|
|
224
|
+
}
|
|
225
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
226
|
+
const localVarHeaderParameter = {};
|
|
227
|
+
const localVarQueryParameter = {};
|
|
228
|
+
// authentication BearerAuth required
|
|
229
|
+
// http bearer authentication required
|
|
230
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
231
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
232
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
233
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
234
|
+
return {
|
|
235
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
236
|
+
options: localVarRequestOptions,
|
|
237
|
+
};
|
|
238
|
+
}),
|
|
239
|
+
/**
|
|
240
|
+
* Retrieve a paginated list of folders in the managed mailbox.
|
|
241
|
+
* @summary List folders
|
|
242
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
243
|
+
* @param {number} [page] Page number (1-based).
|
|
244
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
245
|
+
* @param {*} [options] Override http request option.
|
|
246
|
+
* @throws {RequiredError}
|
|
247
|
+
*/
|
|
248
|
+
listFolders: (mailboxResourceId_1, page_1, perPage_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, page_1, perPage_1, ...args_1], void 0, function* (mailboxResourceId, page, perPage, options = {}) {
|
|
249
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
250
|
+
(0, common_1.assertParamExists)('listFolders', 'mailboxResourceId', mailboxResourceId);
|
|
251
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders`
|
|
252
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
253
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
254
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
255
|
+
let baseOptions;
|
|
256
|
+
if (configuration) {
|
|
257
|
+
baseOptions = configuration.baseOptions;
|
|
258
|
+
}
|
|
259
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
260
|
+
const localVarHeaderParameter = {};
|
|
261
|
+
const localVarQueryParameter = {};
|
|
262
|
+
// authentication BearerAuth required
|
|
263
|
+
// http bearer authentication required
|
|
264
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
265
|
+
if (page !== undefined) {
|
|
266
|
+
localVarQueryParameter['page'] = page;
|
|
267
|
+
}
|
|
268
|
+
if (perPage !== undefined) {
|
|
269
|
+
localVarQueryParameter['perPage'] = perPage;
|
|
270
|
+
}
|
|
271
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
272
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
273
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
274
|
+
return {
|
|
275
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
276
|
+
options: localVarRequestOptions,
|
|
277
|
+
};
|
|
278
|
+
}),
|
|
279
|
+
/**
|
|
280
|
+
* Rename an existing folder.
|
|
281
|
+
* @summary Update folder
|
|
282
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
283
|
+
* @param {string} folder Current folder path (URL-encoded).
|
|
284
|
+
* @param {V1FoldersUpdateRequest} v1FoldersUpdateRequest
|
|
285
|
+
* @param {*} [options] Override http request option.
|
|
286
|
+
* @throws {RequiredError}
|
|
287
|
+
*/
|
|
288
|
+
updateFolder: (mailboxResourceId_1, folder_1, v1FoldersUpdateRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, v1FoldersUpdateRequest_1, ...args_1], void 0, function* (mailboxResourceId, folder, v1FoldersUpdateRequest, options = {}) {
|
|
289
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
290
|
+
(0, common_1.assertParamExists)('updateFolder', 'mailboxResourceId', mailboxResourceId);
|
|
291
|
+
// verify required parameter 'folder' is not null or undefined
|
|
292
|
+
(0, common_1.assertParamExists)('updateFolder', 'folder', folder);
|
|
293
|
+
// verify required parameter 'v1FoldersUpdateRequest' is not null or undefined
|
|
294
|
+
(0, common_1.assertParamExists)('updateFolder', 'v1FoldersUpdateRequest', v1FoldersUpdateRequest);
|
|
295
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}`
|
|
296
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
297
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
298
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
299
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
300
|
+
let baseOptions;
|
|
301
|
+
if (configuration) {
|
|
302
|
+
baseOptions = configuration.baseOptions;
|
|
303
|
+
}
|
|
304
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
305
|
+
const localVarHeaderParameter = {};
|
|
306
|
+
const localVarQueryParameter = {};
|
|
307
|
+
// authentication BearerAuth required
|
|
308
|
+
// http bearer authentication required
|
|
309
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
310
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
311
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
312
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
313
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
314
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1FoldersUpdateRequest, localVarRequestOptions, configuration);
|
|
315
|
+
return {
|
|
316
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
317
|
+
options: localVarRequestOptions,
|
|
318
|
+
};
|
|
319
|
+
}),
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
exports.FoldersApiAxiosParamCreator = FoldersApiAxiosParamCreator;
|
|
323
|
+
/**
|
|
324
|
+
* FoldersApi - functional programming interface
|
|
325
|
+
* @export
|
|
326
|
+
*/
|
|
327
|
+
const FoldersApiFp = function (configuration) {
|
|
328
|
+
const localVarAxiosParamCreator = (0, exports.FoldersApiAxiosParamCreator)(configuration);
|
|
329
|
+
return {
|
|
330
|
+
/**
|
|
331
|
+
* Create a new folder in the managed mailbox.
|
|
332
|
+
* @summary Create folder
|
|
333
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
334
|
+
* @param {V1FoldersCreateRequest} v1FoldersCreateRequest
|
|
335
|
+
* @param {*} [options] Override http request option.
|
|
336
|
+
* @throws {RequiredError}
|
|
337
|
+
*/
|
|
338
|
+
createFolder(mailboxResourceId, v1FoldersCreateRequest, options) {
|
|
339
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
340
|
+
var _a, _b;
|
|
341
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createFolder(mailboxResourceId, v1FoldersCreateRequest, options);
|
|
342
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['FoldersApi.createFolder']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
343
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
344
|
+
});
|
|
345
|
+
},
|
|
346
|
+
/**
|
|
347
|
+
* Delete a folder and all of its subfolders.
|
|
348
|
+
* @summary Delete folder
|
|
349
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
350
|
+
* @param {string} folder Folder path to delete (URL-encoded).
|
|
351
|
+
* @param {*} [options] Override http request option.
|
|
352
|
+
* @throws {RequiredError}
|
|
353
|
+
*/
|
|
354
|
+
deleteFolder(mailboxResourceId, folder, options) {
|
|
355
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
356
|
+
var _a, _b;
|
|
357
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteFolder(mailboxResourceId, folder, options);
|
|
358
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['FoldersApi.deleteFolder']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
359
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
360
|
+
});
|
|
361
|
+
},
|
|
362
|
+
/**
|
|
363
|
+
* Retrieve a paginated list of folders in the managed mailbox.
|
|
364
|
+
* @summary List folders
|
|
365
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
366
|
+
* @param {number} [page] Page number (1-based).
|
|
367
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
368
|
+
* @param {*} [options] Override http request option.
|
|
369
|
+
* @throws {RequiredError}
|
|
370
|
+
*/
|
|
371
|
+
listFolders(mailboxResourceId, page, perPage, options) {
|
|
372
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
373
|
+
var _a, _b;
|
|
374
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listFolders(mailboxResourceId, page, perPage, options);
|
|
375
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['FoldersApi.listFolders']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
376
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
377
|
+
});
|
|
378
|
+
},
|
|
379
|
+
/**
|
|
380
|
+
* Rename an existing folder.
|
|
381
|
+
* @summary Update folder
|
|
382
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
383
|
+
* @param {string} folder Current folder path (URL-encoded).
|
|
384
|
+
* @param {V1FoldersUpdateRequest} v1FoldersUpdateRequest
|
|
385
|
+
* @param {*} [options] Override http request option.
|
|
386
|
+
* @throws {RequiredError}
|
|
387
|
+
*/
|
|
388
|
+
updateFolder(mailboxResourceId, folder, v1FoldersUpdateRequest, options) {
|
|
389
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
390
|
+
var _a, _b;
|
|
391
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFolder(mailboxResourceId, folder, v1FoldersUpdateRequest, options);
|
|
392
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['FoldersApi.updateFolder']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
393
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
394
|
+
});
|
|
395
|
+
},
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
exports.FoldersApiFp = FoldersApiFp;
|
|
399
|
+
/**
|
|
400
|
+
* FoldersApi - factory interface
|
|
401
|
+
* @export
|
|
402
|
+
*/
|
|
403
|
+
const FoldersApiFactory = function (configuration, basePath, axios) {
|
|
404
|
+
const localVarFp = (0, exports.FoldersApiFp)(configuration);
|
|
405
|
+
return {
|
|
406
|
+
/**
|
|
407
|
+
* Create a new folder in the managed mailbox.
|
|
408
|
+
* @summary Create folder
|
|
409
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
410
|
+
* @param {V1FoldersCreateRequest} v1FoldersCreateRequest
|
|
411
|
+
* @param {*} [options] Override http request option.
|
|
412
|
+
* @throws {RequiredError}
|
|
413
|
+
*/
|
|
414
|
+
createFolder(mailboxResourceId, v1FoldersCreateRequest, options) {
|
|
415
|
+
return localVarFp.createFolder(mailboxResourceId, v1FoldersCreateRequest, options).then((request) => request(axios, basePath));
|
|
416
|
+
},
|
|
417
|
+
/**
|
|
418
|
+
* Delete a folder and all of its subfolders.
|
|
419
|
+
* @summary Delete folder
|
|
420
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
421
|
+
* @param {string} folder Folder path to delete (URL-encoded).
|
|
422
|
+
* @param {*} [options] Override http request option.
|
|
423
|
+
* @throws {RequiredError}
|
|
424
|
+
*/
|
|
425
|
+
deleteFolder(mailboxResourceId, folder, options) {
|
|
426
|
+
return localVarFp.deleteFolder(mailboxResourceId, folder, options).then((request) => request(axios, basePath));
|
|
427
|
+
},
|
|
428
|
+
/**
|
|
429
|
+
* Retrieve a paginated list of folders in the managed mailbox.
|
|
430
|
+
* @summary List folders
|
|
431
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
432
|
+
* @param {number} [page] Page number (1-based).
|
|
433
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
434
|
+
* @param {*} [options] Override http request option.
|
|
435
|
+
* @throws {RequiredError}
|
|
436
|
+
*/
|
|
437
|
+
listFolders(mailboxResourceId, page, perPage, options) {
|
|
438
|
+
return localVarFp.listFolders(mailboxResourceId, page, perPage, options).then((request) => request(axios, basePath));
|
|
439
|
+
},
|
|
440
|
+
/**
|
|
441
|
+
* Rename an existing folder.
|
|
442
|
+
* @summary Update folder
|
|
443
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
444
|
+
* @param {string} folder Current folder path (URL-encoded).
|
|
445
|
+
* @param {V1FoldersUpdateRequest} v1FoldersUpdateRequest
|
|
446
|
+
* @param {*} [options] Override http request option.
|
|
447
|
+
* @throws {RequiredError}
|
|
448
|
+
*/
|
|
449
|
+
updateFolder(mailboxResourceId, folder, v1FoldersUpdateRequest, options) {
|
|
450
|
+
return localVarFp.updateFolder(mailboxResourceId, folder, v1FoldersUpdateRequest, options).then((request) => request(axios, basePath));
|
|
451
|
+
},
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
exports.FoldersApiFactory = FoldersApiFactory;
|
|
455
|
+
/**
|
|
456
|
+
* FoldersApi - object-oriented interface
|
|
457
|
+
* @export
|
|
458
|
+
* @class FoldersApi
|
|
459
|
+
* @extends {BaseAPI}
|
|
460
|
+
*/
|
|
461
|
+
class FoldersApi extends base_1.BaseAPI {
|
|
462
|
+
/**
|
|
463
|
+
* Create a new folder in the managed mailbox.
|
|
464
|
+
* @summary Create folder
|
|
465
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
466
|
+
* @param {V1FoldersCreateRequest} v1FoldersCreateRequest
|
|
467
|
+
* @param {*} [options] Override http request option.
|
|
468
|
+
* @throws {RequiredError}
|
|
469
|
+
* @memberof FoldersApi
|
|
470
|
+
*/
|
|
471
|
+
createFolder(mailboxResourceId, v1FoldersCreateRequest, options) {
|
|
472
|
+
return (0, exports.FoldersApiFp)(this.configuration).createFolder(mailboxResourceId, v1FoldersCreateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Delete a folder and all of its subfolders.
|
|
476
|
+
* @summary Delete folder
|
|
477
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
478
|
+
* @param {string} folder Folder path to delete (URL-encoded).
|
|
479
|
+
* @param {*} [options] Override http request option.
|
|
480
|
+
* @throws {RequiredError}
|
|
481
|
+
* @memberof FoldersApi
|
|
482
|
+
*/
|
|
483
|
+
deleteFolder(mailboxResourceId, folder, options) {
|
|
484
|
+
return (0, exports.FoldersApiFp)(this.configuration).deleteFolder(mailboxResourceId, folder, options).then((request) => request(this.axios, this.basePath));
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Retrieve a paginated list of folders in the managed mailbox.
|
|
488
|
+
* @summary List folders
|
|
489
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
490
|
+
* @param {number} [page] Page number (1-based).
|
|
491
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
492
|
+
* @param {*} [options] Override http request option.
|
|
493
|
+
* @throws {RequiredError}
|
|
494
|
+
* @memberof FoldersApi
|
|
495
|
+
*/
|
|
496
|
+
listFolders(mailboxResourceId, page, perPage, options) {
|
|
497
|
+
return (0, exports.FoldersApiFp)(this.configuration).listFolders(mailboxResourceId, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Rename an existing folder.
|
|
501
|
+
* @summary Update folder
|
|
502
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
503
|
+
* @param {string} folder Current folder path (URL-encoded).
|
|
504
|
+
* @param {V1FoldersUpdateRequest} v1FoldersUpdateRequest
|
|
505
|
+
* @param {*} [options] Override http request option.
|
|
506
|
+
* @throws {RequiredError}
|
|
507
|
+
* @memberof FoldersApi
|
|
508
|
+
*/
|
|
509
|
+
updateFolder(mailboxResourceId, folder, v1FoldersUpdateRequest, options) {
|
|
510
|
+
return (0, exports.FoldersApiFp)(this.configuration).updateFolder(mailboxResourceId, folder, v1FoldersUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
exports.FoldersApi = FoldersApi;
|
|
514
|
+
/**
|
|
515
|
+
* MessagesApi - axios parameter creator
|
|
516
|
+
* @export
|
|
517
|
+
*/
|
|
518
|
+
const MessagesApiAxiosParamCreator = function (configuration) {
|
|
519
|
+
return {
|
|
520
|
+
/**
|
|
521
|
+
* Permanently delete every message in a folder (empty the folder).
|
|
522
|
+
* @summary Delete all messages
|
|
523
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
524
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
525
|
+
* @param {*} [options] Override http request option.
|
|
526
|
+
* @throws {RequiredError}
|
|
527
|
+
*/
|
|
528
|
+
deleteAllMessages: (mailboxResourceId_1, folder_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, ...args_1], void 0, function* (mailboxResourceId, folder, options = {}) {
|
|
529
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
530
|
+
(0, common_1.assertParamExists)('deleteAllMessages', 'mailboxResourceId', mailboxResourceId);
|
|
531
|
+
// verify required parameter 'folder' is not null or undefined
|
|
532
|
+
(0, common_1.assertParamExists)('deleteAllMessages', 'folder', folder);
|
|
533
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages`
|
|
534
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
535
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
536
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
537
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
538
|
+
let baseOptions;
|
|
539
|
+
if (configuration) {
|
|
540
|
+
baseOptions = configuration.baseOptions;
|
|
541
|
+
}
|
|
542
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
543
|
+
const localVarHeaderParameter = {};
|
|
544
|
+
const localVarQueryParameter = {};
|
|
545
|
+
// authentication BearerAuth required
|
|
546
|
+
// http bearer authentication required
|
|
547
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
548
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
549
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
550
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
551
|
+
return {
|
|
552
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
553
|
+
options: localVarRequestOptions,
|
|
554
|
+
};
|
|
555
|
+
}),
|
|
556
|
+
/**
|
|
557
|
+
* Permanently delete a single message.
|
|
558
|
+
* @summary Delete message
|
|
559
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
560
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
561
|
+
* @param {number} uid Message UID.
|
|
562
|
+
* @param {*} [options] Override http request option.
|
|
563
|
+
* @throws {RequiredError}
|
|
564
|
+
*/
|
|
565
|
+
deleteMessage: (mailboxResourceId_1, folder_1, uid_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, uid_1, ...args_1], void 0, function* (mailboxResourceId, folder, uid, options = {}) {
|
|
566
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
567
|
+
(0, common_1.assertParamExists)('deleteMessage', 'mailboxResourceId', mailboxResourceId);
|
|
568
|
+
// verify required parameter 'folder' is not null or undefined
|
|
569
|
+
(0, common_1.assertParamExists)('deleteMessage', 'folder', folder);
|
|
570
|
+
// verify required parameter 'uid' is not null or undefined
|
|
571
|
+
(0, common_1.assertParamExists)('deleteMessage', 'uid', uid);
|
|
572
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
|
|
573
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
574
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
575
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
576
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
577
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
578
|
+
let baseOptions;
|
|
579
|
+
if (configuration) {
|
|
580
|
+
baseOptions = configuration.baseOptions;
|
|
581
|
+
}
|
|
582
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
583
|
+
const localVarHeaderParameter = {};
|
|
584
|
+
const localVarQueryParameter = {};
|
|
585
|
+
// authentication BearerAuth required
|
|
586
|
+
// http bearer authentication required
|
|
587
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
588
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
589
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
590
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
591
|
+
return {
|
|
592
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
593
|
+
options: localVarRequestOptions,
|
|
594
|
+
};
|
|
595
|
+
}),
|
|
596
|
+
/**
|
|
597
|
+
* Permanently delete multiple messages from a folder.
|
|
598
|
+
* @summary Delete messages
|
|
599
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
600
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
601
|
+
* @param {V1FolderMessagesDeleteBulkRequest} v1FolderMessagesDeleteBulkRequest
|
|
602
|
+
* @param {*} [options] Override http request option.
|
|
603
|
+
* @throws {RequiredError}
|
|
604
|
+
*/
|
|
605
|
+
deleteMessages: (mailboxResourceId_1, folder_1, v1FolderMessagesDeleteBulkRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, v1FolderMessagesDeleteBulkRequest_1, ...args_1], void 0, function* (mailboxResourceId, folder, v1FolderMessagesDeleteBulkRequest, options = {}) {
|
|
606
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
607
|
+
(0, common_1.assertParamExists)('deleteMessages', 'mailboxResourceId', mailboxResourceId);
|
|
608
|
+
// verify required parameter 'folder' is not null or undefined
|
|
609
|
+
(0, common_1.assertParamExists)('deleteMessages', 'folder', folder);
|
|
610
|
+
// verify required parameter 'v1FolderMessagesDeleteBulkRequest' is not null or undefined
|
|
611
|
+
(0, common_1.assertParamExists)('deleteMessages', 'v1FolderMessagesDeleteBulkRequest', v1FolderMessagesDeleteBulkRequest);
|
|
612
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/delete`
|
|
613
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
614
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
615
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
616
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
617
|
+
let baseOptions;
|
|
618
|
+
if (configuration) {
|
|
619
|
+
baseOptions = configuration.baseOptions;
|
|
620
|
+
}
|
|
621
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
622
|
+
const localVarHeaderParameter = {};
|
|
623
|
+
const localVarQueryParameter = {};
|
|
624
|
+
// authentication BearerAuth required
|
|
625
|
+
// http bearer authentication required
|
|
626
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
627
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
628
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
629
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
630
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
631
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1FolderMessagesDeleteBulkRequest, localVarRequestOptions, configuration);
|
|
632
|
+
return {
|
|
633
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
634
|
+
options: localVarRequestOptions,
|
|
635
|
+
};
|
|
636
|
+
}),
|
|
637
|
+
/**
|
|
638
|
+
* Retrieve a single message by UID.
|
|
639
|
+
* @summary Get message
|
|
640
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
641
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
642
|
+
* @param {number} uid Message UID.
|
|
643
|
+
* @param {*} [options] Override http request option.
|
|
644
|
+
* @throws {RequiredError}
|
|
645
|
+
*/
|
|
646
|
+
getMessage: (mailboxResourceId_1, folder_1, uid_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, uid_1, ...args_1], void 0, function* (mailboxResourceId, folder, uid, options = {}) {
|
|
647
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
648
|
+
(0, common_1.assertParamExists)('getMessage', 'mailboxResourceId', mailboxResourceId);
|
|
649
|
+
// verify required parameter 'folder' is not null or undefined
|
|
650
|
+
(0, common_1.assertParamExists)('getMessage', 'folder', folder);
|
|
651
|
+
// verify required parameter 'uid' is not null or undefined
|
|
652
|
+
(0, common_1.assertParamExists)('getMessage', 'uid', uid);
|
|
653
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
|
|
654
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
655
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
656
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
657
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
658
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
659
|
+
let baseOptions;
|
|
660
|
+
if (configuration) {
|
|
661
|
+
baseOptions = configuration.baseOptions;
|
|
662
|
+
}
|
|
663
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
664
|
+
const localVarHeaderParameter = {};
|
|
665
|
+
const localVarQueryParameter = {};
|
|
666
|
+
// authentication BearerAuth required
|
|
667
|
+
// http bearer authentication required
|
|
668
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
669
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
670
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
671
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
672
|
+
return {
|
|
673
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
674
|
+
options: localVarRequestOptions,
|
|
675
|
+
};
|
|
676
|
+
}),
|
|
677
|
+
/**
|
|
678
|
+
* Download a message attachment as `application/octet-stream`.
|
|
679
|
+
* @summary Download message attachment
|
|
680
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
681
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
682
|
+
* @param {number} uid Message UID.
|
|
683
|
+
* @param {string} attachmentId Attachment ID (opaque, returned by GET message).
|
|
684
|
+
* @param {*} [options] Override http request option.
|
|
685
|
+
* @throws {RequiredError}
|
|
686
|
+
*/
|
|
687
|
+
getMessageAttachment: (mailboxResourceId_1, folder_1, uid_1, attachmentId_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, uid_1, attachmentId_1, ...args_1], void 0, function* (mailboxResourceId, folder, uid, attachmentId, options = {}) {
|
|
688
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
689
|
+
(0, common_1.assertParamExists)('getMessageAttachment', 'mailboxResourceId', mailboxResourceId);
|
|
690
|
+
// verify required parameter 'folder' is not null or undefined
|
|
691
|
+
(0, common_1.assertParamExists)('getMessageAttachment', 'folder', folder);
|
|
692
|
+
// verify required parameter 'uid' is not null or undefined
|
|
693
|
+
(0, common_1.assertParamExists)('getMessageAttachment', 'uid', uid);
|
|
694
|
+
// verify required parameter 'attachmentId' is not null or undefined
|
|
695
|
+
(0, common_1.assertParamExists)('getMessageAttachment', 'attachmentId', attachmentId);
|
|
696
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/attachments/{attachmentId}`
|
|
697
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
698
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
699
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)))
|
|
700
|
+
.replace(`{${"attachmentId"}}`, encodeURIComponent(String(attachmentId)));
|
|
701
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
702
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
703
|
+
let baseOptions;
|
|
704
|
+
if (configuration) {
|
|
705
|
+
baseOptions = configuration.baseOptions;
|
|
706
|
+
}
|
|
707
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
708
|
+
const localVarHeaderParameter = {};
|
|
709
|
+
const localVarQueryParameter = {};
|
|
710
|
+
// authentication BearerAuth required
|
|
711
|
+
// http bearer authentication required
|
|
712
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
713
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
714
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
715
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
716
|
+
return {
|
|
717
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
718
|
+
options: localVarRequestOptions,
|
|
719
|
+
};
|
|
720
|
+
}),
|
|
721
|
+
/**
|
|
722
|
+
* Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
|
|
723
|
+
* @summary Get message source
|
|
724
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
725
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
726
|
+
* @param {number} uid Message UID.
|
|
727
|
+
* @param {*} [options] Override http request option.
|
|
728
|
+
* @throws {RequiredError}
|
|
729
|
+
*/
|
|
730
|
+
getMessageSource: (mailboxResourceId_1, folder_1, uid_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, uid_1, ...args_1], void 0, function* (mailboxResourceId, folder, uid, options = {}) {
|
|
731
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
732
|
+
(0, common_1.assertParamExists)('getMessageSource', 'mailboxResourceId', mailboxResourceId);
|
|
733
|
+
// verify required parameter 'folder' is not null or undefined
|
|
734
|
+
(0, common_1.assertParamExists)('getMessageSource', 'folder', folder);
|
|
735
|
+
// verify required parameter 'uid' is not null or undefined
|
|
736
|
+
(0, common_1.assertParamExists)('getMessageSource', 'uid', uid);
|
|
737
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/source`
|
|
738
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
739
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
740
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
741
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
742
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
743
|
+
let baseOptions;
|
|
744
|
+
if (configuration) {
|
|
745
|
+
baseOptions = configuration.baseOptions;
|
|
746
|
+
}
|
|
747
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
748
|
+
const localVarHeaderParameter = {};
|
|
749
|
+
const localVarQueryParameter = {};
|
|
750
|
+
// authentication BearerAuth required
|
|
751
|
+
// http bearer authentication required
|
|
752
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
753
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
754
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
755
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
756
|
+
return {
|
|
757
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
758
|
+
options: localVarRequestOptions,
|
|
759
|
+
};
|
|
760
|
+
}),
|
|
761
|
+
/**
|
|
762
|
+
* Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
|
|
763
|
+
* @summary Get message text content
|
|
764
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
765
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
766
|
+
* @param {number} uid Message UID.
|
|
767
|
+
* @param {*} [options] Override http request option.
|
|
768
|
+
* @throws {RequiredError}
|
|
769
|
+
*/
|
|
770
|
+
getMessageText: (mailboxResourceId_1, folder_1, uid_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, uid_1, ...args_1], void 0, function* (mailboxResourceId, folder, uid, options = {}) {
|
|
771
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
772
|
+
(0, common_1.assertParamExists)('getMessageText', 'mailboxResourceId', mailboxResourceId);
|
|
773
|
+
// verify required parameter 'folder' is not null or undefined
|
|
774
|
+
(0, common_1.assertParamExists)('getMessageText', 'folder', folder);
|
|
775
|
+
// verify required parameter 'uid' is not null or undefined
|
|
776
|
+
(0, common_1.assertParamExists)('getMessageText', 'uid', uid);
|
|
777
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/text`
|
|
778
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
779
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
780
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
781
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
782
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
783
|
+
let baseOptions;
|
|
784
|
+
if (configuration) {
|
|
785
|
+
baseOptions = configuration.baseOptions;
|
|
786
|
+
}
|
|
787
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
788
|
+
const localVarHeaderParameter = {};
|
|
789
|
+
const localVarQueryParameter = {};
|
|
790
|
+
// authentication BearerAuth required
|
|
791
|
+
// http bearer authentication required
|
|
792
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
793
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
794
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
795
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
796
|
+
return {
|
|
797
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
798
|
+
options: localVarRequestOptions,
|
|
799
|
+
};
|
|
800
|
+
}),
|
|
801
|
+
/**
|
|
802
|
+
* List messages in a folder. Use POST /search for filtering. Sort fields: uid, date, size (prefix with `-` for descending). Default `-uid`.
|
|
803
|
+
* @summary List messages
|
|
804
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
805
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
806
|
+
* @param {number} [page] Page number (1-based).
|
|
807
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
808
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
809
|
+
* @param {*} [options] Override http request option.
|
|
810
|
+
* @throws {RequiredError}
|
|
811
|
+
*/
|
|
812
|
+
listMessages: (mailboxResourceId_1, folder_1, page_1, perPage_1, sort_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, page_1, perPage_1, sort_1, ...args_1], void 0, function* (mailboxResourceId, folder, page, perPage, sort, options = {}) {
|
|
813
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
814
|
+
(0, common_1.assertParamExists)('listMessages', 'mailboxResourceId', mailboxResourceId);
|
|
815
|
+
// verify required parameter 'folder' is not null or undefined
|
|
816
|
+
(0, common_1.assertParamExists)('listMessages', 'folder', folder);
|
|
817
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages`
|
|
818
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
819
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
820
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
821
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
822
|
+
let baseOptions;
|
|
823
|
+
if (configuration) {
|
|
824
|
+
baseOptions = configuration.baseOptions;
|
|
825
|
+
}
|
|
826
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
827
|
+
const localVarHeaderParameter = {};
|
|
828
|
+
const localVarQueryParameter = {};
|
|
829
|
+
// authentication BearerAuth required
|
|
830
|
+
// http bearer authentication required
|
|
831
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
832
|
+
if (page !== undefined) {
|
|
833
|
+
localVarQueryParameter['page'] = page;
|
|
834
|
+
}
|
|
835
|
+
if (perPage !== undefined) {
|
|
836
|
+
localVarQueryParameter['perPage'] = perPage;
|
|
837
|
+
}
|
|
838
|
+
if (sort !== undefined) {
|
|
839
|
+
localVarQueryParameter['sort'] = sort;
|
|
840
|
+
}
|
|
841
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
842
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
843
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
844
|
+
return {
|
|
845
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
846
|
+
options: localVarRequestOptions,
|
|
847
|
+
};
|
|
848
|
+
}),
|
|
849
|
+
/**
|
|
850
|
+
* Move a single message to a target folder.
|
|
851
|
+
* @summary Move message
|
|
852
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
853
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
854
|
+
* @param {number} uid Message UID.
|
|
855
|
+
* @param {V1FolderMessagesMoveRequest} v1FolderMessagesMoveRequest
|
|
856
|
+
* @param {*} [options] Override http request option.
|
|
857
|
+
* @throws {RequiredError}
|
|
858
|
+
*/
|
|
859
|
+
moveMessage: (mailboxResourceId_1, folder_1, uid_1, v1FolderMessagesMoveRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, uid_1, v1FolderMessagesMoveRequest_1, ...args_1], void 0, function* (mailboxResourceId, folder, uid, v1FolderMessagesMoveRequest, options = {}) {
|
|
860
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
861
|
+
(0, common_1.assertParamExists)('moveMessage', 'mailboxResourceId', mailboxResourceId);
|
|
862
|
+
// verify required parameter 'folder' is not null or undefined
|
|
863
|
+
(0, common_1.assertParamExists)('moveMessage', 'folder', folder);
|
|
864
|
+
// verify required parameter 'uid' is not null or undefined
|
|
865
|
+
(0, common_1.assertParamExists)('moveMessage', 'uid', uid);
|
|
866
|
+
// verify required parameter 'v1FolderMessagesMoveRequest' is not null or undefined
|
|
867
|
+
(0, common_1.assertParamExists)('moveMessage', 'v1FolderMessagesMoveRequest', v1FolderMessagesMoveRequest);
|
|
868
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/move`
|
|
869
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
870
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
871
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
872
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
873
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
874
|
+
let baseOptions;
|
|
875
|
+
if (configuration) {
|
|
876
|
+
baseOptions = configuration.baseOptions;
|
|
877
|
+
}
|
|
878
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
879
|
+
const localVarHeaderParameter = {};
|
|
880
|
+
const localVarQueryParameter = {};
|
|
881
|
+
// authentication BearerAuth required
|
|
882
|
+
// http bearer authentication required
|
|
883
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
884
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
885
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
886
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
887
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
888
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1FolderMessagesMoveRequest, localVarRequestOptions, configuration);
|
|
889
|
+
return {
|
|
890
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
891
|
+
options: localVarRequestOptions,
|
|
892
|
+
};
|
|
893
|
+
}),
|
|
894
|
+
/**
|
|
895
|
+
* Move multiple messages from a source folder to a target folder.
|
|
896
|
+
* @summary Move messages
|
|
897
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
898
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
899
|
+
* @param {V1FolderMessagesMoveBulkRequest} v1FolderMessagesMoveBulkRequest
|
|
900
|
+
* @param {*} [options] Override http request option.
|
|
901
|
+
* @throws {RequiredError}
|
|
902
|
+
*/
|
|
903
|
+
moveMessages: (mailboxResourceId_1, folder_1, v1FolderMessagesMoveBulkRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, v1FolderMessagesMoveBulkRequest_1, ...args_1], void 0, function* (mailboxResourceId, folder, v1FolderMessagesMoveBulkRequest, options = {}) {
|
|
904
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
905
|
+
(0, common_1.assertParamExists)('moveMessages', 'mailboxResourceId', mailboxResourceId);
|
|
906
|
+
// verify required parameter 'folder' is not null or undefined
|
|
907
|
+
(0, common_1.assertParamExists)('moveMessages', 'folder', folder);
|
|
908
|
+
// verify required parameter 'v1FolderMessagesMoveBulkRequest' is not null or undefined
|
|
909
|
+
(0, common_1.assertParamExists)('moveMessages', 'v1FolderMessagesMoveBulkRequest', v1FolderMessagesMoveBulkRequest);
|
|
910
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/move`
|
|
911
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
912
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
913
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
914
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
915
|
+
let baseOptions;
|
|
916
|
+
if (configuration) {
|
|
917
|
+
baseOptions = configuration.baseOptions;
|
|
918
|
+
}
|
|
919
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
920
|
+
const localVarHeaderParameter = {};
|
|
921
|
+
const localVarQueryParameter = {};
|
|
922
|
+
// authentication BearerAuth required
|
|
923
|
+
// http bearer authentication required
|
|
924
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
925
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
926
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
927
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
928
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
929
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1FolderMessagesMoveBulkRequest, localVarRequestOptions, configuration);
|
|
930
|
+
return {
|
|
931
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
932
|
+
options: localVarRequestOptions,
|
|
933
|
+
};
|
|
934
|
+
}),
|
|
935
|
+
/**
|
|
936
|
+
* Add and/or remove flags on a single message. Returns the updated message.
|
|
937
|
+
* @summary Update message flags
|
|
938
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
939
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
940
|
+
* @param {number} uid Message UID.
|
|
941
|
+
* @param {V1FolderMessagesFlagsRequest} v1FolderMessagesFlagsRequest
|
|
942
|
+
* @param {*} [options] Override http request option.
|
|
943
|
+
* @throws {RequiredError}
|
|
944
|
+
*/
|
|
945
|
+
patchMessage: (mailboxResourceId_1, folder_1, uid_1, v1FolderMessagesFlagsRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, uid_1, v1FolderMessagesFlagsRequest_1, ...args_1], void 0, function* (mailboxResourceId, folder, uid, v1FolderMessagesFlagsRequest, options = {}) {
|
|
946
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
947
|
+
(0, common_1.assertParamExists)('patchMessage', 'mailboxResourceId', mailboxResourceId);
|
|
948
|
+
// verify required parameter 'folder' is not null or undefined
|
|
949
|
+
(0, common_1.assertParamExists)('patchMessage', 'folder', folder);
|
|
950
|
+
// verify required parameter 'uid' is not null or undefined
|
|
951
|
+
(0, common_1.assertParamExists)('patchMessage', 'uid', uid);
|
|
952
|
+
// verify required parameter 'v1FolderMessagesFlagsRequest' is not null or undefined
|
|
953
|
+
(0, common_1.assertParamExists)('patchMessage', 'v1FolderMessagesFlagsRequest', v1FolderMessagesFlagsRequest);
|
|
954
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
|
|
955
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
956
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
957
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
958
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
959
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
960
|
+
let baseOptions;
|
|
961
|
+
if (configuration) {
|
|
962
|
+
baseOptions = configuration.baseOptions;
|
|
963
|
+
}
|
|
964
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
965
|
+
const localVarHeaderParameter = {};
|
|
966
|
+
const localVarQueryParameter = {};
|
|
967
|
+
// authentication BearerAuth required
|
|
968
|
+
// http bearer authentication required
|
|
969
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
970
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
971
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
972
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
973
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
974
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1FolderMessagesFlagsRequest, localVarRequestOptions, configuration);
|
|
975
|
+
return {
|
|
976
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
977
|
+
options: localVarRequestOptions,
|
|
978
|
+
};
|
|
979
|
+
}),
|
|
980
|
+
/**
|
|
981
|
+
* Search messages in a folder. Filters in body; pagination and sort via query (`page`, `perPage`, `sort`).
|
|
982
|
+
* @summary Search messages
|
|
983
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
984
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
985
|
+
* @param {number} [page]
|
|
986
|
+
* @param {number} [perPage]
|
|
987
|
+
* @param {string} [sort]
|
|
988
|
+
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
989
|
+
* @param {*} [options] Override http request option.
|
|
990
|
+
* @throws {RequiredError}
|
|
991
|
+
*/
|
|
992
|
+
searchMessages: (mailboxResourceId_1, folder_1, page_1, perPage_1, sort_1, v1FolderMessagesSearchRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, page_1, perPage_1, sort_1, v1FolderMessagesSearchRequest_1, ...args_1], void 0, function* (mailboxResourceId, folder, page, perPage, sort, v1FolderMessagesSearchRequest, options = {}) {
|
|
993
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
994
|
+
(0, common_1.assertParamExists)('searchMessages', 'mailboxResourceId', mailboxResourceId);
|
|
995
|
+
// verify required parameter 'folder' is not null or undefined
|
|
996
|
+
(0, common_1.assertParamExists)('searchMessages', 'folder', folder);
|
|
997
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/search`
|
|
998
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
999
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
1000
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1001
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1002
|
+
let baseOptions;
|
|
1003
|
+
if (configuration) {
|
|
1004
|
+
baseOptions = configuration.baseOptions;
|
|
1005
|
+
}
|
|
1006
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1007
|
+
const localVarHeaderParameter = {};
|
|
1008
|
+
const localVarQueryParameter = {};
|
|
1009
|
+
// authentication BearerAuth required
|
|
1010
|
+
// http bearer authentication required
|
|
1011
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1012
|
+
if (page !== undefined) {
|
|
1013
|
+
localVarQueryParameter['page'] = page;
|
|
1014
|
+
}
|
|
1015
|
+
if (perPage !== undefined) {
|
|
1016
|
+
localVarQueryParameter['perPage'] = perPage;
|
|
1017
|
+
}
|
|
1018
|
+
if (sort !== undefined) {
|
|
1019
|
+
localVarQueryParameter['sort'] = sort;
|
|
1020
|
+
}
|
|
1021
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1022
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1023
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1024
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1025
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1FolderMessagesSearchRequest, localVarRequestOptions, configuration);
|
|
1026
|
+
return {
|
|
1027
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1028
|
+
options: localVarRequestOptions,
|
|
1029
|
+
};
|
|
1030
|
+
}),
|
|
1031
|
+
/**
|
|
1032
|
+
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
1033
|
+
* @summary Update message flags
|
|
1034
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1035
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1036
|
+
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
1037
|
+
* @param {*} [options] Override http request option.
|
|
1038
|
+
* @throws {RequiredError}
|
|
1039
|
+
*/
|
|
1040
|
+
updateMessageFlags: (mailboxResourceId_1, folder_1, v1FolderMessagesFlagsBulkRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, folder_1, v1FolderMessagesFlagsBulkRequest_1, ...args_1], void 0, function* (mailboxResourceId, folder, v1FolderMessagesFlagsBulkRequest, options = {}) {
|
|
1041
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1042
|
+
(0, common_1.assertParamExists)('updateMessageFlags', 'mailboxResourceId', mailboxResourceId);
|
|
1043
|
+
// verify required parameter 'folder' is not null or undefined
|
|
1044
|
+
(0, common_1.assertParamExists)('updateMessageFlags', 'folder', folder);
|
|
1045
|
+
// verify required parameter 'v1FolderMessagesFlagsBulkRequest' is not null or undefined
|
|
1046
|
+
(0, common_1.assertParamExists)('updateMessageFlags', 'v1FolderMessagesFlagsBulkRequest', v1FolderMessagesFlagsBulkRequest);
|
|
1047
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/flags`
|
|
1048
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1049
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
1050
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1051
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1052
|
+
let baseOptions;
|
|
1053
|
+
if (configuration) {
|
|
1054
|
+
baseOptions = configuration.baseOptions;
|
|
1055
|
+
}
|
|
1056
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1057
|
+
const localVarHeaderParameter = {};
|
|
1058
|
+
const localVarQueryParameter = {};
|
|
1059
|
+
// authentication BearerAuth required
|
|
1060
|
+
// http bearer authentication required
|
|
1061
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1062
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1063
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1064
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1065
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1066
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1FolderMessagesFlagsBulkRequest, localVarRequestOptions, configuration);
|
|
1067
|
+
return {
|
|
1068
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1069
|
+
options: localVarRequestOptions,
|
|
1070
|
+
};
|
|
1071
|
+
}),
|
|
1072
|
+
};
|
|
1073
|
+
};
|
|
1074
|
+
exports.MessagesApiAxiosParamCreator = MessagesApiAxiosParamCreator;
|
|
1075
|
+
/**
|
|
1076
|
+
* MessagesApi - functional programming interface
|
|
1077
|
+
* @export
|
|
1078
|
+
*/
|
|
1079
|
+
const MessagesApiFp = function (configuration) {
|
|
1080
|
+
const localVarAxiosParamCreator = (0, exports.MessagesApiAxiosParamCreator)(configuration);
|
|
1081
|
+
return {
|
|
1082
|
+
/**
|
|
1083
|
+
* Permanently delete every message in a folder (empty the folder).
|
|
1084
|
+
* @summary Delete all messages
|
|
1085
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1086
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1087
|
+
* @param {*} [options] Override http request option.
|
|
1088
|
+
* @throws {RequiredError}
|
|
1089
|
+
*/
|
|
1090
|
+
deleteAllMessages(mailboxResourceId, folder, options) {
|
|
1091
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1092
|
+
var _a, _b;
|
|
1093
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAllMessages(mailboxResourceId, folder, options);
|
|
1094
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.deleteAllMessages']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1095
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1096
|
+
});
|
|
1097
|
+
},
|
|
1098
|
+
/**
|
|
1099
|
+
* Permanently delete a single message.
|
|
1100
|
+
* @summary Delete message
|
|
1101
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1102
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1103
|
+
* @param {number} uid Message UID.
|
|
1104
|
+
* @param {*} [options] Override http request option.
|
|
1105
|
+
* @throws {RequiredError}
|
|
1106
|
+
*/
|
|
1107
|
+
deleteMessage(mailboxResourceId, folder, uid, options) {
|
|
1108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1109
|
+
var _a, _b;
|
|
1110
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteMessage(mailboxResourceId, folder, uid, options);
|
|
1111
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.deleteMessage']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1112
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1113
|
+
});
|
|
1114
|
+
},
|
|
1115
|
+
/**
|
|
1116
|
+
* Permanently delete multiple messages from a folder.
|
|
1117
|
+
* @summary Delete messages
|
|
1118
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1119
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1120
|
+
* @param {V1FolderMessagesDeleteBulkRequest} v1FolderMessagesDeleteBulkRequest
|
|
1121
|
+
* @param {*} [options] Override http request option.
|
|
1122
|
+
* @throws {RequiredError}
|
|
1123
|
+
*/
|
|
1124
|
+
deleteMessages(mailboxResourceId, folder, v1FolderMessagesDeleteBulkRequest, options) {
|
|
1125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1126
|
+
var _a, _b;
|
|
1127
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteMessages(mailboxResourceId, folder, v1FolderMessagesDeleteBulkRequest, options);
|
|
1128
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.deleteMessages']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1129
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1130
|
+
});
|
|
1131
|
+
},
|
|
1132
|
+
/**
|
|
1133
|
+
* Retrieve a single message by UID.
|
|
1134
|
+
* @summary Get message
|
|
1135
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1136
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1137
|
+
* @param {number} uid Message UID.
|
|
1138
|
+
* @param {*} [options] Override http request option.
|
|
1139
|
+
* @throws {RequiredError}
|
|
1140
|
+
*/
|
|
1141
|
+
getMessage(mailboxResourceId, folder, uid, options) {
|
|
1142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1143
|
+
var _a, _b;
|
|
1144
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getMessage(mailboxResourceId, folder, uid, options);
|
|
1145
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.getMessage']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1146
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1147
|
+
});
|
|
1148
|
+
},
|
|
1149
|
+
/**
|
|
1150
|
+
* Download a message attachment as `application/octet-stream`.
|
|
1151
|
+
* @summary Download message attachment
|
|
1152
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1153
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1154
|
+
* @param {number} uid Message UID.
|
|
1155
|
+
* @param {string} attachmentId Attachment ID (opaque, returned by GET message).
|
|
1156
|
+
* @param {*} [options] Override http request option.
|
|
1157
|
+
* @throws {RequiredError}
|
|
1158
|
+
*/
|
|
1159
|
+
getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options) {
|
|
1160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1161
|
+
var _a, _b;
|
|
1162
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options);
|
|
1163
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.getMessageAttachment']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1164
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1165
|
+
});
|
|
1166
|
+
},
|
|
1167
|
+
/**
|
|
1168
|
+
* Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
|
|
1169
|
+
* @summary Get message source
|
|
1170
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1171
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1172
|
+
* @param {number} uid Message UID.
|
|
1173
|
+
* @param {*} [options] Override http request option.
|
|
1174
|
+
* @throws {RequiredError}
|
|
1175
|
+
*/
|
|
1176
|
+
getMessageSource(mailboxResourceId, folder, uid, options) {
|
|
1177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1178
|
+
var _a, _b;
|
|
1179
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getMessageSource(mailboxResourceId, folder, uid, options);
|
|
1180
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.getMessageSource']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1181
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1182
|
+
});
|
|
1183
|
+
},
|
|
1184
|
+
/**
|
|
1185
|
+
* Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
|
|
1186
|
+
* @summary Get message text content
|
|
1187
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1188
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1189
|
+
* @param {number} uid Message UID.
|
|
1190
|
+
* @param {*} [options] Override http request option.
|
|
1191
|
+
* @throws {RequiredError}
|
|
1192
|
+
*/
|
|
1193
|
+
getMessageText(mailboxResourceId, folder, uid, options) {
|
|
1194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1195
|
+
var _a, _b;
|
|
1196
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getMessageText(mailboxResourceId, folder, uid, options);
|
|
1197
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.getMessageText']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1198
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1199
|
+
});
|
|
1200
|
+
},
|
|
1201
|
+
/**
|
|
1202
|
+
* List messages in a folder. Use POST /search for filtering. Sort fields: uid, date, size (prefix with `-` for descending). Default `-uid`.
|
|
1203
|
+
* @summary List messages
|
|
1204
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1205
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1206
|
+
* @param {number} [page] Page number (1-based).
|
|
1207
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
1208
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
1209
|
+
* @param {*} [options] Override http request option.
|
|
1210
|
+
* @throws {RequiredError}
|
|
1211
|
+
*/
|
|
1212
|
+
listMessages(mailboxResourceId, folder, page, perPage, sort, options) {
|
|
1213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1214
|
+
var _a, _b;
|
|
1215
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listMessages(mailboxResourceId, folder, page, perPage, sort, options);
|
|
1216
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.listMessages']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1217
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1218
|
+
});
|
|
1219
|
+
},
|
|
1220
|
+
/**
|
|
1221
|
+
* Move a single message to a target folder.
|
|
1222
|
+
* @summary Move message
|
|
1223
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1224
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
1225
|
+
* @param {number} uid Message UID.
|
|
1226
|
+
* @param {V1FolderMessagesMoveRequest} v1FolderMessagesMoveRequest
|
|
1227
|
+
* @param {*} [options] Override http request option.
|
|
1228
|
+
* @throws {RequiredError}
|
|
1229
|
+
*/
|
|
1230
|
+
moveMessage(mailboxResourceId, folder, uid, v1FolderMessagesMoveRequest, options) {
|
|
1231
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1232
|
+
var _a, _b;
|
|
1233
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.moveMessage(mailboxResourceId, folder, uid, v1FolderMessagesMoveRequest, options);
|
|
1234
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.moveMessage']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1235
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1236
|
+
});
|
|
1237
|
+
},
|
|
1238
|
+
/**
|
|
1239
|
+
* Move multiple messages from a source folder to a target folder.
|
|
1240
|
+
* @summary Move messages
|
|
1241
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1242
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
1243
|
+
* @param {V1FolderMessagesMoveBulkRequest} v1FolderMessagesMoveBulkRequest
|
|
1244
|
+
* @param {*} [options] Override http request option.
|
|
1245
|
+
* @throws {RequiredError}
|
|
1246
|
+
*/
|
|
1247
|
+
moveMessages(mailboxResourceId, folder, v1FolderMessagesMoveBulkRequest, options) {
|
|
1248
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1249
|
+
var _a, _b;
|
|
1250
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.moveMessages(mailboxResourceId, folder, v1FolderMessagesMoveBulkRequest, options);
|
|
1251
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.moveMessages']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1252
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1253
|
+
});
|
|
1254
|
+
},
|
|
1255
|
+
/**
|
|
1256
|
+
* Add and/or remove flags on a single message. Returns the updated message.
|
|
1257
|
+
* @summary Update message flags
|
|
1258
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1259
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1260
|
+
* @param {number} uid Message UID.
|
|
1261
|
+
* @param {V1FolderMessagesFlagsRequest} v1FolderMessagesFlagsRequest
|
|
1262
|
+
* @param {*} [options] Override http request option.
|
|
1263
|
+
* @throws {RequiredError}
|
|
1264
|
+
*/
|
|
1265
|
+
patchMessage(mailboxResourceId, folder, uid, v1FolderMessagesFlagsRequest, options) {
|
|
1266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1267
|
+
var _a, _b;
|
|
1268
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.patchMessage(mailboxResourceId, folder, uid, v1FolderMessagesFlagsRequest, options);
|
|
1269
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.patchMessage']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1270
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1271
|
+
});
|
|
1272
|
+
},
|
|
1273
|
+
/**
|
|
1274
|
+
* Search messages in a folder. Filters in body; pagination and sort via query (`page`, `perPage`, `sort`).
|
|
1275
|
+
* @summary Search messages
|
|
1276
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1277
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1278
|
+
* @param {number} [page]
|
|
1279
|
+
* @param {number} [perPage]
|
|
1280
|
+
* @param {string} [sort]
|
|
1281
|
+
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
1282
|
+
* @param {*} [options] Override http request option.
|
|
1283
|
+
* @throws {RequiredError}
|
|
1284
|
+
*/
|
|
1285
|
+
searchMessages(mailboxResourceId, folder, page, perPage, sort, v1FolderMessagesSearchRequest, options) {
|
|
1286
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1287
|
+
var _a, _b;
|
|
1288
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.searchMessages(mailboxResourceId, folder, page, perPage, sort, v1FolderMessagesSearchRequest, options);
|
|
1289
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.searchMessages']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1290
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1291
|
+
});
|
|
1292
|
+
},
|
|
1293
|
+
/**
|
|
1294
|
+
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
1295
|
+
* @summary Update message flags
|
|
1296
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1297
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1298
|
+
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
1299
|
+
* @param {*} [options] Override http request option.
|
|
1300
|
+
* @throws {RequiredError}
|
|
1301
|
+
*/
|
|
1302
|
+
updateMessageFlags(mailboxResourceId, folder, v1FolderMessagesFlagsBulkRequest, options) {
|
|
1303
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1304
|
+
var _a, _b;
|
|
1305
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateMessageFlags(mailboxResourceId, folder, v1FolderMessagesFlagsBulkRequest, options);
|
|
1306
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['MessagesApi.updateMessageFlags']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1307
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1308
|
+
});
|
|
1309
|
+
},
|
|
1310
|
+
};
|
|
1311
|
+
};
|
|
1312
|
+
exports.MessagesApiFp = MessagesApiFp;
|
|
1313
|
+
/**
|
|
1314
|
+
* MessagesApi - factory interface
|
|
1315
|
+
* @export
|
|
1316
|
+
*/
|
|
1317
|
+
const MessagesApiFactory = function (configuration, basePath, axios) {
|
|
1318
|
+
const localVarFp = (0, exports.MessagesApiFp)(configuration);
|
|
1319
|
+
return {
|
|
1320
|
+
/**
|
|
1321
|
+
* Permanently delete every message in a folder (empty the folder).
|
|
1322
|
+
* @summary Delete all messages
|
|
1323
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1324
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1325
|
+
* @param {*} [options] Override http request option.
|
|
1326
|
+
* @throws {RequiredError}
|
|
1327
|
+
*/
|
|
1328
|
+
deleteAllMessages(mailboxResourceId, folder, options) {
|
|
1329
|
+
return localVarFp.deleteAllMessages(mailboxResourceId, folder, options).then((request) => request(axios, basePath));
|
|
1330
|
+
},
|
|
1331
|
+
/**
|
|
1332
|
+
* Permanently delete a single message.
|
|
1333
|
+
* @summary Delete message
|
|
1334
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1335
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1336
|
+
* @param {number} uid Message UID.
|
|
1337
|
+
* @param {*} [options] Override http request option.
|
|
1338
|
+
* @throws {RequiredError}
|
|
1339
|
+
*/
|
|
1340
|
+
deleteMessage(mailboxResourceId, folder, uid, options) {
|
|
1341
|
+
return localVarFp.deleteMessage(mailboxResourceId, folder, uid, options).then((request) => request(axios, basePath));
|
|
1342
|
+
},
|
|
1343
|
+
/**
|
|
1344
|
+
* Permanently delete multiple messages from a folder.
|
|
1345
|
+
* @summary Delete messages
|
|
1346
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1347
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1348
|
+
* @param {V1FolderMessagesDeleteBulkRequest} v1FolderMessagesDeleteBulkRequest
|
|
1349
|
+
* @param {*} [options] Override http request option.
|
|
1350
|
+
* @throws {RequiredError}
|
|
1351
|
+
*/
|
|
1352
|
+
deleteMessages(mailboxResourceId, folder, v1FolderMessagesDeleteBulkRequest, options) {
|
|
1353
|
+
return localVarFp.deleteMessages(mailboxResourceId, folder, v1FolderMessagesDeleteBulkRequest, options).then((request) => request(axios, basePath));
|
|
1354
|
+
},
|
|
1355
|
+
/**
|
|
1356
|
+
* Retrieve a single message by UID.
|
|
1357
|
+
* @summary Get message
|
|
1358
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1359
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1360
|
+
* @param {number} uid Message UID.
|
|
1361
|
+
* @param {*} [options] Override http request option.
|
|
1362
|
+
* @throws {RequiredError}
|
|
1363
|
+
*/
|
|
1364
|
+
getMessage(mailboxResourceId, folder, uid, options) {
|
|
1365
|
+
return localVarFp.getMessage(mailboxResourceId, folder, uid, options).then((request) => request(axios, basePath));
|
|
1366
|
+
},
|
|
1367
|
+
/**
|
|
1368
|
+
* Download a message attachment as `application/octet-stream`.
|
|
1369
|
+
* @summary Download message attachment
|
|
1370
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1371
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1372
|
+
* @param {number} uid Message UID.
|
|
1373
|
+
* @param {string} attachmentId Attachment ID (opaque, returned by GET message).
|
|
1374
|
+
* @param {*} [options] Override http request option.
|
|
1375
|
+
* @throws {RequiredError}
|
|
1376
|
+
*/
|
|
1377
|
+
getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options) {
|
|
1378
|
+
return localVarFp.getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options).then((request) => request(axios, basePath));
|
|
1379
|
+
},
|
|
1380
|
+
/**
|
|
1381
|
+
* Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
|
|
1382
|
+
* @summary Get message source
|
|
1383
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1384
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1385
|
+
* @param {number} uid Message UID.
|
|
1386
|
+
* @param {*} [options] Override http request option.
|
|
1387
|
+
* @throws {RequiredError}
|
|
1388
|
+
*/
|
|
1389
|
+
getMessageSource(mailboxResourceId, folder, uid, options) {
|
|
1390
|
+
return localVarFp.getMessageSource(mailboxResourceId, folder, uid, options).then((request) => request(axios, basePath));
|
|
1391
|
+
},
|
|
1392
|
+
/**
|
|
1393
|
+
* Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
|
|
1394
|
+
* @summary Get message text content
|
|
1395
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1396
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1397
|
+
* @param {number} uid Message UID.
|
|
1398
|
+
* @param {*} [options] Override http request option.
|
|
1399
|
+
* @throws {RequiredError}
|
|
1400
|
+
*/
|
|
1401
|
+
getMessageText(mailboxResourceId, folder, uid, options) {
|
|
1402
|
+
return localVarFp.getMessageText(mailboxResourceId, folder, uid, options).then((request) => request(axios, basePath));
|
|
1403
|
+
},
|
|
1404
|
+
/**
|
|
1405
|
+
* List messages in a folder. Use POST /search for filtering. Sort fields: uid, date, size (prefix with `-` for descending). Default `-uid`.
|
|
1406
|
+
* @summary List messages
|
|
1407
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1408
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1409
|
+
* @param {number} [page] Page number (1-based).
|
|
1410
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
1411
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
1412
|
+
* @param {*} [options] Override http request option.
|
|
1413
|
+
* @throws {RequiredError}
|
|
1414
|
+
*/
|
|
1415
|
+
listMessages(mailboxResourceId, folder, page, perPage, sort, options) {
|
|
1416
|
+
return localVarFp.listMessages(mailboxResourceId, folder, page, perPage, sort, options).then((request) => request(axios, basePath));
|
|
1417
|
+
},
|
|
1418
|
+
/**
|
|
1419
|
+
* Move a single message to a target folder.
|
|
1420
|
+
* @summary Move message
|
|
1421
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1422
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
1423
|
+
* @param {number} uid Message UID.
|
|
1424
|
+
* @param {V1FolderMessagesMoveRequest} v1FolderMessagesMoveRequest
|
|
1425
|
+
* @param {*} [options] Override http request option.
|
|
1426
|
+
* @throws {RequiredError}
|
|
1427
|
+
*/
|
|
1428
|
+
moveMessage(mailboxResourceId, folder, uid, v1FolderMessagesMoveRequest, options) {
|
|
1429
|
+
return localVarFp.moveMessage(mailboxResourceId, folder, uid, v1FolderMessagesMoveRequest, options).then((request) => request(axios, basePath));
|
|
1430
|
+
},
|
|
1431
|
+
/**
|
|
1432
|
+
* Move multiple messages from a source folder to a target folder.
|
|
1433
|
+
* @summary Move messages
|
|
1434
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1435
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
1436
|
+
* @param {V1FolderMessagesMoveBulkRequest} v1FolderMessagesMoveBulkRequest
|
|
1437
|
+
* @param {*} [options] Override http request option.
|
|
1438
|
+
* @throws {RequiredError}
|
|
1439
|
+
*/
|
|
1440
|
+
moveMessages(mailboxResourceId, folder, v1FolderMessagesMoveBulkRequest, options) {
|
|
1441
|
+
return localVarFp.moveMessages(mailboxResourceId, folder, v1FolderMessagesMoveBulkRequest, options).then((request) => request(axios, basePath));
|
|
1442
|
+
},
|
|
1443
|
+
/**
|
|
1444
|
+
* Add and/or remove flags on a single message. Returns the updated message.
|
|
1445
|
+
* @summary Update message flags
|
|
1446
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1447
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1448
|
+
* @param {number} uid Message UID.
|
|
1449
|
+
* @param {V1FolderMessagesFlagsRequest} v1FolderMessagesFlagsRequest
|
|
1450
|
+
* @param {*} [options] Override http request option.
|
|
1451
|
+
* @throws {RequiredError}
|
|
1452
|
+
*/
|
|
1453
|
+
patchMessage(mailboxResourceId, folder, uid, v1FolderMessagesFlagsRequest, options) {
|
|
1454
|
+
return localVarFp.patchMessage(mailboxResourceId, folder, uid, v1FolderMessagesFlagsRequest, options).then((request) => request(axios, basePath));
|
|
1455
|
+
},
|
|
1456
|
+
/**
|
|
1457
|
+
* Search messages in a folder. Filters in body; pagination and sort via query (`page`, `perPage`, `sort`).
|
|
1458
|
+
* @summary Search messages
|
|
1459
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1460
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1461
|
+
* @param {number} [page]
|
|
1462
|
+
* @param {number} [perPage]
|
|
1463
|
+
* @param {string} [sort]
|
|
1464
|
+
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
1465
|
+
* @param {*} [options] Override http request option.
|
|
1466
|
+
* @throws {RequiredError}
|
|
1467
|
+
*/
|
|
1468
|
+
searchMessages(mailboxResourceId, folder, page, perPage, sort, v1FolderMessagesSearchRequest, options) {
|
|
1469
|
+
return localVarFp.searchMessages(mailboxResourceId, folder, page, perPage, sort, v1FolderMessagesSearchRequest, options).then((request) => request(axios, basePath));
|
|
1470
|
+
},
|
|
1471
|
+
/**
|
|
1472
|
+
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
1473
|
+
* @summary Update message flags
|
|
1474
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1475
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1476
|
+
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
1477
|
+
* @param {*} [options] Override http request option.
|
|
1478
|
+
* @throws {RequiredError}
|
|
1479
|
+
*/
|
|
1480
|
+
updateMessageFlags(mailboxResourceId, folder, v1FolderMessagesFlagsBulkRequest, options) {
|
|
1481
|
+
return localVarFp.updateMessageFlags(mailboxResourceId, folder, v1FolderMessagesFlagsBulkRequest, options).then((request) => request(axios, basePath));
|
|
1482
|
+
},
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
exports.MessagesApiFactory = MessagesApiFactory;
|
|
1486
|
+
/**
|
|
1487
|
+
* MessagesApi - object-oriented interface
|
|
1488
|
+
* @export
|
|
1489
|
+
* @class MessagesApi
|
|
1490
|
+
* @extends {BaseAPI}
|
|
1491
|
+
*/
|
|
1492
|
+
class MessagesApi extends base_1.BaseAPI {
|
|
1493
|
+
/**
|
|
1494
|
+
* Permanently delete every message in a folder (empty the folder).
|
|
1495
|
+
* @summary Delete all messages
|
|
1496
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1497
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1498
|
+
* @param {*} [options] Override http request option.
|
|
1499
|
+
* @throws {RequiredError}
|
|
1500
|
+
* @memberof MessagesApi
|
|
1501
|
+
*/
|
|
1502
|
+
deleteAllMessages(mailboxResourceId, folder, options) {
|
|
1503
|
+
return (0, exports.MessagesApiFp)(this.configuration).deleteAllMessages(mailboxResourceId, folder, options).then((request) => request(this.axios, this.basePath));
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Permanently delete a single message.
|
|
1507
|
+
* @summary Delete message
|
|
1508
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1509
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1510
|
+
* @param {number} uid Message UID.
|
|
1511
|
+
* @param {*} [options] Override http request option.
|
|
1512
|
+
* @throws {RequiredError}
|
|
1513
|
+
* @memberof MessagesApi
|
|
1514
|
+
*/
|
|
1515
|
+
deleteMessage(mailboxResourceId, folder, uid, options) {
|
|
1516
|
+
return (0, exports.MessagesApiFp)(this.configuration).deleteMessage(mailboxResourceId, folder, uid, options).then((request) => request(this.axios, this.basePath));
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* Permanently delete multiple messages from a folder.
|
|
1520
|
+
* @summary Delete messages
|
|
1521
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1522
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1523
|
+
* @param {V1FolderMessagesDeleteBulkRequest} v1FolderMessagesDeleteBulkRequest
|
|
1524
|
+
* @param {*} [options] Override http request option.
|
|
1525
|
+
* @throws {RequiredError}
|
|
1526
|
+
* @memberof MessagesApi
|
|
1527
|
+
*/
|
|
1528
|
+
deleteMessages(mailboxResourceId, folder, v1FolderMessagesDeleteBulkRequest, options) {
|
|
1529
|
+
return (0, exports.MessagesApiFp)(this.configuration).deleteMessages(mailboxResourceId, folder, v1FolderMessagesDeleteBulkRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1530
|
+
}
|
|
1531
|
+
/**
|
|
1532
|
+
* Retrieve a single message by UID.
|
|
1533
|
+
* @summary Get message
|
|
1534
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1535
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1536
|
+
* @param {number} uid Message UID.
|
|
1537
|
+
* @param {*} [options] Override http request option.
|
|
1538
|
+
* @throws {RequiredError}
|
|
1539
|
+
* @memberof MessagesApi
|
|
1540
|
+
*/
|
|
1541
|
+
getMessage(mailboxResourceId, folder, uid, options) {
|
|
1542
|
+
return (0, exports.MessagesApiFp)(this.configuration).getMessage(mailboxResourceId, folder, uid, options).then((request) => request(this.axios, this.basePath));
|
|
1543
|
+
}
|
|
1544
|
+
/**
|
|
1545
|
+
* Download a message attachment as `application/octet-stream`.
|
|
1546
|
+
* @summary Download message attachment
|
|
1547
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1548
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1549
|
+
* @param {number} uid Message UID.
|
|
1550
|
+
* @param {string} attachmentId Attachment ID (opaque, returned by GET message).
|
|
1551
|
+
* @param {*} [options] Override http request option.
|
|
1552
|
+
* @throws {RequiredError}
|
|
1553
|
+
* @memberof MessagesApi
|
|
1554
|
+
*/
|
|
1555
|
+
getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options) {
|
|
1556
|
+
return (0, exports.MessagesApiFp)(this.configuration).getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options).then((request) => request(this.axios, this.basePath));
|
|
1557
|
+
}
|
|
1558
|
+
/**
|
|
1559
|
+
* Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
|
|
1560
|
+
* @summary Get message source
|
|
1561
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1562
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1563
|
+
* @param {number} uid Message UID.
|
|
1564
|
+
* @param {*} [options] Override http request option.
|
|
1565
|
+
* @throws {RequiredError}
|
|
1566
|
+
* @memberof MessagesApi
|
|
1567
|
+
*/
|
|
1568
|
+
getMessageSource(mailboxResourceId, folder, uid, options) {
|
|
1569
|
+
return (0, exports.MessagesApiFp)(this.configuration).getMessageSource(mailboxResourceId, folder, uid, options).then((request) => request(this.axios, this.basePath));
|
|
1570
|
+
}
|
|
1571
|
+
/**
|
|
1572
|
+
* Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
|
|
1573
|
+
* @summary Get message text content
|
|
1574
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1575
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1576
|
+
* @param {number} uid Message UID.
|
|
1577
|
+
* @param {*} [options] Override http request option.
|
|
1578
|
+
* @throws {RequiredError}
|
|
1579
|
+
* @memberof MessagesApi
|
|
1580
|
+
*/
|
|
1581
|
+
getMessageText(mailboxResourceId, folder, uid, options) {
|
|
1582
|
+
return (0, exports.MessagesApiFp)(this.configuration).getMessageText(mailboxResourceId, folder, uid, options).then((request) => request(this.axios, this.basePath));
|
|
1583
|
+
}
|
|
1584
|
+
/**
|
|
1585
|
+
* List messages in a folder. Use POST /search for filtering. Sort fields: uid, date, size (prefix with `-` for descending). Default `-uid`.
|
|
1586
|
+
* @summary List messages
|
|
1587
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1588
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1589
|
+
* @param {number} [page] Page number (1-based).
|
|
1590
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
1591
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
1592
|
+
* @param {*} [options] Override http request option.
|
|
1593
|
+
* @throws {RequiredError}
|
|
1594
|
+
* @memberof MessagesApi
|
|
1595
|
+
*/
|
|
1596
|
+
listMessages(mailboxResourceId, folder, page, perPage, sort, options) {
|
|
1597
|
+
return (0, exports.MessagesApiFp)(this.configuration).listMessages(mailboxResourceId, folder, page, perPage, sort, options).then((request) => request(this.axios, this.basePath));
|
|
1598
|
+
}
|
|
1599
|
+
/**
|
|
1600
|
+
* Move a single message to a target folder.
|
|
1601
|
+
* @summary Move message
|
|
1602
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1603
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
1604
|
+
* @param {number} uid Message UID.
|
|
1605
|
+
* @param {V1FolderMessagesMoveRequest} v1FolderMessagesMoveRequest
|
|
1606
|
+
* @param {*} [options] Override http request option.
|
|
1607
|
+
* @throws {RequiredError}
|
|
1608
|
+
* @memberof MessagesApi
|
|
1609
|
+
*/
|
|
1610
|
+
moveMessage(mailboxResourceId, folder, uid, v1FolderMessagesMoveRequest, options) {
|
|
1611
|
+
return (0, exports.MessagesApiFp)(this.configuration).moveMessage(mailboxResourceId, folder, uid, v1FolderMessagesMoveRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1612
|
+
}
|
|
1613
|
+
/**
|
|
1614
|
+
* Move multiple messages from a source folder to a target folder.
|
|
1615
|
+
* @summary Move messages
|
|
1616
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1617
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
1618
|
+
* @param {V1FolderMessagesMoveBulkRequest} v1FolderMessagesMoveBulkRequest
|
|
1619
|
+
* @param {*} [options] Override http request option.
|
|
1620
|
+
* @throws {RequiredError}
|
|
1621
|
+
* @memberof MessagesApi
|
|
1622
|
+
*/
|
|
1623
|
+
moveMessages(mailboxResourceId, folder, v1FolderMessagesMoveBulkRequest, options) {
|
|
1624
|
+
return (0, exports.MessagesApiFp)(this.configuration).moveMessages(mailboxResourceId, folder, v1FolderMessagesMoveBulkRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1625
|
+
}
|
|
1626
|
+
/**
|
|
1627
|
+
* Add and/or remove flags on a single message. Returns the updated message.
|
|
1628
|
+
* @summary Update message flags
|
|
1629
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1630
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1631
|
+
* @param {number} uid Message UID.
|
|
1632
|
+
* @param {V1FolderMessagesFlagsRequest} v1FolderMessagesFlagsRequest
|
|
1633
|
+
* @param {*} [options] Override http request option.
|
|
1634
|
+
* @throws {RequiredError}
|
|
1635
|
+
* @memberof MessagesApi
|
|
1636
|
+
*/
|
|
1637
|
+
patchMessage(mailboxResourceId, folder, uid, v1FolderMessagesFlagsRequest, options) {
|
|
1638
|
+
return (0, exports.MessagesApiFp)(this.configuration).patchMessage(mailboxResourceId, folder, uid, v1FolderMessagesFlagsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1639
|
+
}
|
|
1640
|
+
/**
|
|
1641
|
+
* Search messages in a folder. Filters in body; pagination and sort via query (`page`, `perPage`, `sort`).
|
|
1642
|
+
* @summary Search messages
|
|
1643
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1644
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1645
|
+
* @param {number} [page]
|
|
1646
|
+
* @param {number} [perPage]
|
|
1647
|
+
* @param {string} [sort]
|
|
1648
|
+
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
1649
|
+
* @param {*} [options] Override http request option.
|
|
1650
|
+
* @throws {RequiredError}
|
|
1651
|
+
* @memberof MessagesApi
|
|
1652
|
+
*/
|
|
1653
|
+
searchMessages(mailboxResourceId, folder, page, perPage, sort, v1FolderMessagesSearchRequest, options) {
|
|
1654
|
+
return (0, exports.MessagesApiFp)(this.configuration).searchMessages(mailboxResourceId, folder, page, perPage, sort, v1FolderMessagesSearchRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1655
|
+
}
|
|
1656
|
+
/**
|
|
1657
|
+
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
1658
|
+
* @summary Update message flags
|
|
1659
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1660
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1661
|
+
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
1662
|
+
* @param {*} [options] Override http request option.
|
|
1663
|
+
* @throws {RequiredError}
|
|
1664
|
+
* @memberof MessagesApi
|
|
1665
|
+
*/
|
|
1666
|
+
updateMessageFlags(mailboxResourceId, folder, v1FolderMessagesFlagsBulkRequest, options) {
|
|
1667
|
+
return (0, exports.MessagesApiFp)(this.configuration).updateMessageFlags(mailboxResourceId, folder, v1FolderMessagesFlagsBulkRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
exports.MessagesApi = MessagesApi;
|
|
1671
|
+
/**
|
|
1672
|
+
* QuotaApi - axios parameter creator
|
|
1673
|
+
* @export
|
|
1674
|
+
*/
|
|
1675
|
+
const QuotaApiAxiosParamCreator = function (configuration) {
|
|
1676
|
+
return {
|
|
1677
|
+
/**
|
|
1678
|
+
* Retrieve storage and message quota usage for the managed mailbox.
|
|
1679
|
+
* @summary Get mailbox quota
|
|
1680
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1681
|
+
* @param {*} [options] Override http request option.
|
|
1682
|
+
* @throws {RequiredError}
|
|
1683
|
+
*/
|
|
1684
|
+
getQuota: (mailboxResourceId_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, ...args_1], void 0, function* (mailboxResourceId, options = {}) {
|
|
1685
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1686
|
+
(0, common_1.assertParamExists)('getQuota', 'mailboxResourceId', mailboxResourceId);
|
|
1687
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/quota`
|
|
1688
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
1689
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1690
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1691
|
+
let baseOptions;
|
|
1692
|
+
if (configuration) {
|
|
1693
|
+
baseOptions = configuration.baseOptions;
|
|
1694
|
+
}
|
|
1695
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1696
|
+
const localVarHeaderParameter = {};
|
|
1697
|
+
const localVarQueryParameter = {};
|
|
1698
|
+
// authentication BearerAuth required
|
|
1699
|
+
// http bearer authentication required
|
|
1700
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1701
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1702
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1703
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1704
|
+
return {
|
|
1705
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1706
|
+
options: localVarRequestOptions,
|
|
1707
|
+
};
|
|
1708
|
+
}),
|
|
1709
|
+
};
|
|
1710
|
+
};
|
|
1711
|
+
exports.QuotaApiAxiosParamCreator = QuotaApiAxiosParamCreator;
|
|
1712
|
+
/**
|
|
1713
|
+
* QuotaApi - functional programming interface
|
|
1714
|
+
* @export
|
|
1715
|
+
*/
|
|
1716
|
+
const QuotaApiFp = function (configuration) {
|
|
1717
|
+
const localVarAxiosParamCreator = (0, exports.QuotaApiAxiosParamCreator)(configuration);
|
|
1718
|
+
return {
|
|
1719
|
+
/**
|
|
1720
|
+
* Retrieve storage and message quota usage for the managed mailbox.
|
|
1721
|
+
* @summary Get mailbox quota
|
|
1722
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1723
|
+
* @param {*} [options] Override http request option.
|
|
1724
|
+
* @throws {RequiredError}
|
|
1725
|
+
*/
|
|
1726
|
+
getQuota(mailboxResourceId, options) {
|
|
1727
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1728
|
+
var _a, _b;
|
|
1729
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getQuota(mailboxResourceId, options);
|
|
1730
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['QuotaApi.getQuota']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1731
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1732
|
+
});
|
|
1733
|
+
},
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1736
|
+
exports.QuotaApiFp = QuotaApiFp;
|
|
1737
|
+
/**
|
|
1738
|
+
* QuotaApi - factory interface
|
|
1739
|
+
* @export
|
|
1740
|
+
*/
|
|
1741
|
+
const QuotaApiFactory = function (configuration, basePath, axios) {
|
|
1742
|
+
const localVarFp = (0, exports.QuotaApiFp)(configuration);
|
|
1743
|
+
return {
|
|
1744
|
+
/**
|
|
1745
|
+
* Retrieve storage and message quota usage for the managed mailbox.
|
|
1746
|
+
* @summary Get mailbox quota
|
|
1747
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1748
|
+
* @param {*} [options] Override http request option.
|
|
1749
|
+
* @throws {RequiredError}
|
|
1750
|
+
*/
|
|
1751
|
+
getQuota(mailboxResourceId, options) {
|
|
1752
|
+
return localVarFp.getQuota(mailboxResourceId, options).then((request) => request(axios, basePath));
|
|
1753
|
+
},
|
|
1754
|
+
};
|
|
1755
|
+
};
|
|
1756
|
+
exports.QuotaApiFactory = QuotaApiFactory;
|
|
1757
|
+
/**
|
|
1758
|
+
* QuotaApi - object-oriented interface
|
|
1759
|
+
* @export
|
|
1760
|
+
* @class QuotaApi
|
|
1761
|
+
* @extends {BaseAPI}
|
|
1762
|
+
*/
|
|
1763
|
+
class QuotaApi extends base_1.BaseAPI {
|
|
1764
|
+
/**
|
|
1765
|
+
* Retrieve storage and message quota usage for the managed mailbox.
|
|
1766
|
+
* @summary Get mailbox quota
|
|
1767
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1768
|
+
* @param {*} [options] Override http request option.
|
|
1769
|
+
* @throws {RequiredError}
|
|
1770
|
+
* @memberof QuotaApi
|
|
1771
|
+
*/
|
|
1772
|
+
getQuota(mailboxResourceId, options) {
|
|
1773
|
+
return (0, exports.QuotaApiFp)(this.configuration).getQuota(mailboxResourceId, options).then((request) => request(this.axios, this.basePath));
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
exports.QuotaApi = QuotaApi;
|
|
1777
|
+
/**
|
|
1778
|
+
* SendApi - axios parameter creator
|
|
1779
|
+
* @export
|
|
1780
|
+
*/
|
|
1781
|
+
const SendApiAxiosParamCreator = function (configuration) {
|
|
1782
|
+
return {
|
|
1783
|
+
/**
|
|
1784
|
+
* Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
|
|
1785
|
+
* @summary Send email
|
|
1786
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1787
|
+
* @param {V1SendRequest | null} v1SendRequest
|
|
1788
|
+
* @param {*} [options] Override http request option.
|
|
1789
|
+
* @throws {RequiredError}
|
|
1790
|
+
*/
|
|
1791
|
+
sendEmail: (mailboxResourceId_1, v1SendRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, v1SendRequest_1, ...args_1], void 0, function* (mailboxResourceId, v1SendRequest, options = {}) {
|
|
1792
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1793
|
+
(0, common_1.assertParamExists)('sendEmail', 'mailboxResourceId', mailboxResourceId);
|
|
1794
|
+
// verify required parameter 'v1SendRequest' is not null or undefined
|
|
1795
|
+
(0, common_1.assertParamExists)('sendEmail', 'v1SendRequest', v1SendRequest);
|
|
1796
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/send`
|
|
1797
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
1798
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1799
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1800
|
+
let baseOptions;
|
|
1801
|
+
if (configuration) {
|
|
1802
|
+
baseOptions = configuration.baseOptions;
|
|
1803
|
+
}
|
|
1804
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1805
|
+
const localVarHeaderParameter = {};
|
|
1806
|
+
const localVarQueryParameter = {};
|
|
1807
|
+
// authentication BearerAuth required
|
|
1808
|
+
// http bearer authentication required
|
|
1809
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1810
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1811
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1812
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1813
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1814
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1SendRequest, localVarRequestOptions, configuration);
|
|
1815
|
+
return {
|
|
1816
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1817
|
+
options: localVarRequestOptions,
|
|
1818
|
+
};
|
|
1819
|
+
}),
|
|
1820
|
+
};
|
|
1821
|
+
};
|
|
1822
|
+
exports.SendApiAxiosParamCreator = SendApiAxiosParamCreator;
|
|
1823
|
+
/**
|
|
1824
|
+
* SendApi - functional programming interface
|
|
1825
|
+
* @export
|
|
1826
|
+
*/
|
|
1827
|
+
const SendApiFp = function (configuration) {
|
|
1828
|
+
const localVarAxiosParamCreator = (0, exports.SendApiAxiosParamCreator)(configuration);
|
|
1829
|
+
return {
|
|
1830
|
+
/**
|
|
1831
|
+
* Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
|
|
1832
|
+
* @summary Send email
|
|
1833
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1834
|
+
* @param {V1SendRequest | null} v1SendRequest
|
|
1835
|
+
* @param {*} [options] Override http request option.
|
|
1836
|
+
* @throws {RequiredError}
|
|
1837
|
+
*/
|
|
1838
|
+
sendEmail(mailboxResourceId, v1SendRequest, options) {
|
|
1839
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1840
|
+
var _a, _b;
|
|
1841
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.sendEmail(mailboxResourceId, v1SendRequest, options);
|
|
1842
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['SendApi.sendEmail']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1843
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1844
|
+
});
|
|
1845
|
+
},
|
|
1846
|
+
};
|
|
1847
|
+
};
|
|
1848
|
+
exports.SendApiFp = SendApiFp;
|
|
1849
|
+
/**
|
|
1850
|
+
* SendApi - factory interface
|
|
1851
|
+
* @export
|
|
1852
|
+
*/
|
|
1853
|
+
const SendApiFactory = function (configuration, basePath, axios) {
|
|
1854
|
+
const localVarFp = (0, exports.SendApiFp)(configuration);
|
|
1855
|
+
return {
|
|
1856
|
+
/**
|
|
1857
|
+
* Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
|
|
1858
|
+
* @summary Send email
|
|
1859
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1860
|
+
* @param {V1SendRequest | null} v1SendRequest
|
|
1861
|
+
* @param {*} [options] Override http request option.
|
|
1862
|
+
* @throws {RequiredError}
|
|
1863
|
+
*/
|
|
1864
|
+
sendEmail(mailboxResourceId, v1SendRequest, options) {
|
|
1865
|
+
return localVarFp.sendEmail(mailboxResourceId, v1SendRequest, options).then((request) => request(axios, basePath));
|
|
1866
|
+
},
|
|
1867
|
+
};
|
|
1868
|
+
};
|
|
1869
|
+
exports.SendApiFactory = SendApiFactory;
|
|
1870
|
+
/**
|
|
1871
|
+
* SendApi - object-oriented interface
|
|
1872
|
+
* @export
|
|
1873
|
+
* @class SendApi
|
|
1874
|
+
* @extends {BaseAPI}
|
|
1875
|
+
*/
|
|
1876
|
+
class SendApi extends base_1.BaseAPI {
|
|
1877
|
+
/**
|
|
1878
|
+
* Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
|
|
1879
|
+
* @summary Send email
|
|
1880
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1881
|
+
* @param {V1SendRequest | null} v1SendRequest
|
|
1882
|
+
* @param {*} [options] Override http request option.
|
|
1883
|
+
* @throws {RequiredError}
|
|
1884
|
+
* @memberof SendApi
|
|
1885
|
+
*/
|
|
1886
|
+
sendEmail(mailboxResourceId, v1SendRequest, options) {
|
|
1887
|
+
return (0, exports.SendApiFp)(this.configuration).sendEmail(mailboxResourceId, v1SendRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
exports.SendApi = SendApi;
|
|
1891
|
+
/**
|
|
1892
|
+
* WebhooksApi - axios parameter creator
|
|
1893
|
+
* @export
|
|
1894
|
+
*/
|
|
1895
|
+
const WebhooksApiAxiosParamCreator = function (configuration) {
|
|
1896
|
+
return {
|
|
1897
|
+
/**
|
|
1898
|
+
* Create a webhook. The response includes the one-time `secret` — store it securely as it is never returned again.
|
|
1899
|
+
* @summary Create webhook
|
|
1900
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1901
|
+
* @param {V1WebhooksCreateRequest} v1WebhooksCreateRequest
|
|
1902
|
+
* @param {*} [options] Override http request option.
|
|
1903
|
+
* @throws {RequiredError}
|
|
1904
|
+
*/
|
|
1905
|
+
createWebhook: (mailboxResourceId_1, v1WebhooksCreateRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, v1WebhooksCreateRequest_1, ...args_1], void 0, function* (mailboxResourceId, v1WebhooksCreateRequest, options = {}) {
|
|
1906
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1907
|
+
(0, common_1.assertParamExists)('createWebhook', 'mailboxResourceId', mailboxResourceId);
|
|
1908
|
+
// verify required parameter 'v1WebhooksCreateRequest' is not null or undefined
|
|
1909
|
+
(0, common_1.assertParamExists)('createWebhook', 'v1WebhooksCreateRequest', v1WebhooksCreateRequest);
|
|
1910
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks`
|
|
1911
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
1912
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1913
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1914
|
+
let baseOptions;
|
|
1915
|
+
if (configuration) {
|
|
1916
|
+
baseOptions = configuration.baseOptions;
|
|
1917
|
+
}
|
|
1918
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1919
|
+
const localVarHeaderParameter = {};
|
|
1920
|
+
const localVarQueryParameter = {};
|
|
1921
|
+
// authentication BearerAuth required
|
|
1922
|
+
// http bearer authentication required
|
|
1923
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1924
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1925
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1926
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1927
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1928
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1WebhooksCreateRequest, localVarRequestOptions, configuration);
|
|
1929
|
+
return {
|
|
1930
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1931
|
+
options: localVarRequestOptions,
|
|
1932
|
+
};
|
|
1933
|
+
}),
|
|
1934
|
+
/**
|
|
1935
|
+
* Delete a webhook.
|
|
1936
|
+
* @summary Delete webhook
|
|
1937
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
1938
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
1939
|
+
* @param {*} [options] Override http request option.
|
|
1940
|
+
* @throws {RequiredError}
|
|
1941
|
+
*/
|
|
1942
|
+
deleteWebhook: (mailboxResourceId_1, webhook_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, webhook_1, ...args_1], void 0, function* (mailboxResourceId, webhook, options = {}) {
|
|
1943
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1944
|
+
(0, common_1.assertParamExists)('deleteWebhook', 'mailboxResourceId', mailboxResourceId);
|
|
1945
|
+
// verify required parameter 'webhook' is not null or undefined
|
|
1946
|
+
(0, common_1.assertParamExists)('deleteWebhook', 'webhook', webhook);
|
|
1947
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
|
|
1948
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1949
|
+
.replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
|
|
1950
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1951
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1952
|
+
let baseOptions;
|
|
1953
|
+
if (configuration) {
|
|
1954
|
+
baseOptions = configuration.baseOptions;
|
|
1955
|
+
}
|
|
1956
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
1957
|
+
const localVarHeaderParameter = {};
|
|
1958
|
+
const localVarQueryParameter = {};
|
|
1959
|
+
// authentication BearerAuth required
|
|
1960
|
+
// http bearer authentication required
|
|
1961
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1962
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1963
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1964
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1965
|
+
return {
|
|
1966
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1967
|
+
options: localVarRequestOptions,
|
|
1968
|
+
};
|
|
1969
|
+
}),
|
|
1970
|
+
/**
|
|
1971
|
+
* Retrieve a single webhook by id.
|
|
1972
|
+
* @summary Get webhook
|
|
1973
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
1974
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
1975
|
+
* @param {*} [options] Override http request option.
|
|
1976
|
+
* @throws {RequiredError}
|
|
1977
|
+
*/
|
|
1978
|
+
getWebhook: (mailboxResourceId_1, webhook_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, webhook_1, ...args_1], void 0, function* (mailboxResourceId, webhook, options = {}) {
|
|
1979
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1980
|
+
(0, common_1.assertParamExists)('getWebhook', 'mailboxResourceId', mailboxResourceId);
|
|
1981
|
+
// verify required parameter 'webhook' is not null or undefined
|
|
1982
|
+
(0, common_1.assertParamExists)('getWebhook', 'webhook', webhook);
|
|
1983
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
|
|
1984
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1985
|
+
.replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
|
|
1986
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1987
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1988
|
+
let baseOptions;
|
|
1989
|
+
if (configuration) {
|
|
1990
|
+
baseOptions = configuration.baseOptions;
|
|
1991
|
+
}
|
|
1992
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1993
|
+
const localVarHeaderParameter = {};
|
|
1994
|
+
const localVarQueryParameter = {};
|
|
1995
|
+
// authentication BearerAuth required
|
|
1996
|
+
// http bearer authentication required
|
|
1997
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1998
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1999
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2000
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2001
|
+
return {
|
|
2002
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2003
|
+
options: localVarRequestOptions,
|
|
2004
|
+
};
|
|
2005
|
+
}),
|
|
2006
|
+
/**
|
|
2007
|
+
* List webhooks for a mailbox.
|
|
2008
|
+
* @summary List webhooks
|
|
2009
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2010
|
+
* @param {ListWebhooksStatusEnum} [status]
|
|
2011
|
+
* @param {number} [page]
|
|
2012
|
+
* @param {number} [perPage]
|
|
2013
|
+
* @param {*} [options] Override http request option.
|
|
2014
|
+
* @throws {RequiredError}
|
|
2015
|
+
*/
|
|
2016
|
+
listWebhooks: (mailboxResourceId_1, status_1, page_1, perPage_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, status_1, page_1, perPage_1, ...args_1], void 0, function* (mailboxResourceId, status, page, perPage, options = {}) {
|
|
2017
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
2018
|
+
(0, common_1.assertParamExists)('listWebhooks', 'mailboxResourceId', mailboxResourceId);
|
|
2019
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks`
|
|
2020
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
2021
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2022
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2023
|
+
let baseOptions;
|
|
2024
|
+
if (configuration) {
|
|
2025
|
+
baseOptions = configuration.baseOptions;
|
|
2026
|
+
}
|
|
2027
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2028
|
+
const localVarHeaderParameter = {};
|
|
2029
|
+
const localVarQueryParameter = {};
|
|
2030
|
+
// authentication BearerAuth required
|
|
2031
|
+
// http bearer authentication required
|
|
2032
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2033
|
+
if (status !== undefined) {
|
|
2034
|
+
localVarQueryParameter['status'] = status;
|
|
2035
|
+
}
|
|
2036
|
+
if (page !== undefined) {
|
|
2037
|
+
localVarQueryParameter['page'] = page;
|
|
2038
|
+
}
|
|
2039
|
+
if (perPage !== undefined) {
|
|
2040
|
+
localVarQueryParameter['perPage'] = perPage;
|
|
2041
|
+
}
|
|
2042
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2043
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2044
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2045
|
+
return {
|
|
2046
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2047
|
+
options: localVarRequestOptions,
|
|
2048
|
+
};
|
|
2049
|
+
}),
|
|
2050
|
+
/**
|
|
2051
|
+
* Regenerate the webhook secret. The previous secret is immediately invalidated. The new secret is returned once.
|
|
2052
|
+
* @summary Regenerate webhook secret
|
|
2053
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2054
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2055
|
+
* @param {*} [options] Override http request option.
|
|
2056
|
+
* @throws {RequiredError}
|
|
2057
|
+
*/
|
|
2058
|
+
regenerateWebhookSecret: (mailboxResourceId_1, webhook_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, webhook_1, ...args_1], void 0, function* (mailboxResourceId, webhook, options = {}) {
|
|
2059
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
2060
|
+
(0, common_1.assertParamExists)('regenerateWebhookSecret', 'mailboxResourceId', mailboxResourceId);
|
|
2061
|
+
// verify required parameter 'webhook' is not null or undefined
|
|
2062
|
+
(0, common_1.assertParamExists)('regenerateWebhookSecret', 'webhook', webhook);
|
|
2063
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}/regenerate-secret`
|
|
2064
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
2065
|
+
.replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
|
|
2066
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2067
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2068
|
+
let baseOptions;
|
|
2069
|
+
if (configuration) {
|
|
2070
|
+
baseOptions = configuration.baseOptions;
|
|
2071
|
+
}
|
|
2072
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2073
|
+
const localVarHeaderParameter = {};
|
|
2074
|
+
const localVarQueryParameter = {};
|
|
2075
|
+
// authentication BearerAuth required
|
|
2076
|
+
// http bearer authentication required
|
|
2077
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2078
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2079
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2080
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2081
|
+
return {
|
|
2082
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2083
|
+
options: localVarRequestOptions,
|
|
2084
|
+
};
|
|
2085
|
+
}),
|
|
2086
|
+
/**
|
|
2087
|
+
* Send a test delivery to the webhook URL and return the upstream response.
|
|
2088
|
+
* @summary Test webhook
|
|
2089
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2090
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2091
|
+
* @param {*} [options] Override http request option.
|
|
2092
|
+
* @throws {RequiredError}
|
|
2093
|
+
*/
|
|
2094
|
+
testWebhook: (mailboxResourceId_1, webhook_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, webhook_1, ...args_1], void 0, function* (mailboxResourceId, webhook, options = {}) {
|
|
2095
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
2096
|
+
(0, common_1.assertParamExists)('testWebhook', 'mailboxResourceId', mailboxResourceId);
|
|
2097
|
+
// verify required parameter 'webhook' is not null or undefined
|
|
2098
|
+
(0, common_1.assertParamExists)('testWebhook', 'webhook', webhook);
|
|
2099
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}/test`
|
|
2100
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
2101
|
+
.replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
|
|
2102
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2103
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2104
|
+
let baseOptions;
|
|
2105
|
+
if (configuration) {
|
|
2106
|
+
baseOptions = configuration.baseOptions;
|
|
2107
|
+
}
|
|
2108
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2109
|
+
const localVarHeaderParameter = {};
|
|
2110
|
+
const localVarQueryParameter = {};
|
|
2111
|
+
// authentication BearerAuth required
|
|
2112
|
+
// http bearer authentication required
|
|
2113
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2114
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2115
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2116
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2117
|
+
return {
|
|
2118
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2119
|
+
options: localVarRequestOptions,
|
|
2120
|
+
};
|
|
2121
|
+
}),
|
|
2122
|
+
/**
|
|
2123
|
+
* Partially update a webhook.
|
|
2124
|
+
* @summary Update webhook
|
|
2125
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2126
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2127
|
+
* @param {V1WebhooksUpdateRequest} v1WebhooksUpdateRequest
|
|
2128
|
+
* @param {*} [options] Override http request option.
|
|
2129
|
+
* @throws {RequiredError}
|
|
2130
|
+
*/
|
|
2131
|
+
updateWebhook: (mailboxResourceId_1, webhook_1, v1WebhooksUpdateRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, webhook_1, v1WebhooksUpdateRequest_1, ...args_1], void 0, function* (mailboxResourceId, webhook, v1WebhooksUpdateRequest, options = {}) {
|
|
2132
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
2133
|
+
(0, common_1.assertParamExists)('updateWebhook', 'mailboxResourceId', mailboxResourceId);
|
|
2134
|
+
// verify required parameter 'webhook' is not null or undefined
|
|
2135
|
+
(0, common_1.assertParamExists)('updateWebhook', 'webhook', webhook);
|
|
2136
|
+
// verify required parameter 'v1WebhooksUpdateRequest' is not null or undefined
|
|
2137
|
+
(0, common_1.assertParamExists)('updateWebhook', 'v1WebhooksUpdateRequest', v1WebhooksUpdateRequest);
|
|
2138
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
|
|
2139
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
2140
|
+
.replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
|
|
2141
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2142
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2143
|
+
let baseOptions;
|
|
2144
|
+
if (configuration) {
|
|
2145
|
+
baseOptions = configuration.baseOptions;
|
|
2146
|
+
}
|
|
2147
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
2148
|
+
const localVarHeaderParameter = {};
|
|
2149
|
+
const localVarQueryParameter = {};
|
|
2150
|
+
// authentication BearerAuth required
|
|
2151
|
+
// http bearer authentication required
|
|
2152
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2153
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2154
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2155
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2156
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2157
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1WebhooksUpdateRequest, localVarRequestOptions, configuration);
|
|
2158
|
+
return {
|
|
2159
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2160
|
+
options: localVarRequestOptions,
|
|
2161
|
+
};
|
|
2162
|
+
}),
|
|
2163
|
+
};
|
|
2164
|
+
};
|
|
2165
|
+
exports.WebhooksApiAxiosParamCreator = WebhooksApiAxiosParamCreator;
|
|
2166
|
+
/**
|
|
2167
|
+
* WebhooksApi - functional programming interface
|
|
2168
|
+
* @export
|
|
2169
|
+
*/
|
|
2170
|
+
const WebhooksApiFp = function (configuration) {
|
|
2171
|
+
const localVarAxiosParamCreator = (0, exports.WebhooksApiAxiosParamCreator)(configuration);
|
|
2172
|
+
return {
|
|
2173
|
+
/**
|
|
2174
|
+
* Create a webhook. The response includes the one-time `secret` — store it securely as it is never returned again.
|
|
2175
|
+
* @summary Create webhook
|
|
2176
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2177
|
+
* @param {V1WebhooksCreateRequest} v1WebhooksCreateRequest
|
|
2178
|
+
* @param {*} [options] Override http request option.
|
|
2179
|
+
* @throws {RequiredError}
|
|
2180
|
+
*/
|
|
2181
|
+
createWebhook(mailboxResourceId, v1WebhooksCreateRequest, options) {
|
|
2182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2183
|
+
var _a, _b;
|
|
2184
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createWebhook(mailboxResourceId, v1WebhooksCreateRequest, options);
|
|
2185
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['WebhooksApi.createWebhook']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
2186
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2187
|
+
});
|
|
2188
|
+
},
|
|
2189
|
+
/**
|
|
2190
|
+
* Delete a webhook.
|
|
2191
|
+
* @summary Delete webhook
|
|
2192
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2193
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2194
|
+
* @param {*} [options] Override http request option.
|
|
2195
|
+
* @throws {RequiredError}
|
|
2196
|
+
*/
|
|
2197
|
+
deleteWebhook(mailboxResourceId, webhook, options) {
|
|
2198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2199
|
+
var _a, _b;
|
|
2200
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteWebhook(mailboxResourceId, webhook, options);
|
|
2201
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['WebhooksApi.deleteWebhook']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
2202
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2203
|
+
});
|
|
2204
|
+
},
|
|
2205
|
+
/**
|
|
2206
|
+
* Retrieve a single webhook by id.
|
|
2207
|
+
* @summary Get webhook
|
|
2208
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2209
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2210
|
+
* @param {*} [options] Override http request option.
|
|
2211
|
+
* @throws {RequiredError}
|
|
2212
|
+
*/
|
|
2213
|
+
getWebhook(mailboxResourceId, webhook, options) {
|
|
2214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2215
|
+
var _a, _b;
|
|
2216
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getWebhook(mailboxResourceId, webhook, options);
|
|
2217
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['WebhooksApi.getWebhook']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
2218
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2219
|
+
});
|
|
2220
|
+
},
|
|
2221
|
+
/**
|
|
2222
|
+
* List webhooks for a mailbox.
|
|
2223
|
+
* @summary List webhooks
|
|
2224
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2225
|
+
* @param {ListWebhooksStatusEnum} [status]
|
|
2226
|
+
* @param {number} [page]
|
|
2227
|
+
* @param {number} [perPage]
|
|
2228
|
+
* @param {*} [options] Override http request option.
|
|
2229
|
+
* @throws {RequiredError}
|
|
2230
|
+
*/
|
|
2231
|
+
listWebhooks(mailboxResourceId, status, page, perPage, options) {
|
|
2232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2233
|
+
var _a, _b;
|
|
2234
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebhooks(mailboxResourceId, status, page, perPage, options);
|
|
2235
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['WebhooksApi.listWebhooks']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
2236
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2237
|
+
});
|
|
2238
|
+
},
|
|
2239
|
+
/**
|
|
2240
|
+
* Regenerate the webhook secret. The previous secret is immediately invalidated. The new secret is returned once.
|
|
2241
|
+
* @summary Regenerate webhook secret
|
|
2242
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2243
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2244
|
+
* @param {*} [options] Override http request option.
|
|
2245
|
+
* @throws {RequiredError}
|
|
2246
|
+
*/
|
|
2247
|
+
regenerateWebhookSecret(mailboxResourceId, webhook, options) {
|
|
2248
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2249
|
+
var _a, _b;
|
|
2250
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.regenerateWebhookSecret(mailboxResourceId, webhook, options);
|
|
2251
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['WebhooksApi.regenerateWebhookSecret']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
2252
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2253
|
+
});
|
|
2254
|
+
},
|
|
2255
|
+
/**
|
|
2256
|
+
* Send a test delivery to the webhook URL and return the upstream response.
|
|
2257
|
+
* @summary Test webhook
|
|
2258
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2259
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2260
|
+
* @param {*} [options] Override http request option.
|
|
2261
|
+
* @throws {RequiredError}
|
|
2262
|
+
*/
|
|
2263
|
+
testWebhook(mailboxResourceId, webhook, options) {
|
|
2264
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2265
|
+
var _a, _b;
|
|
2266
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.testWebhook(mailboxResourceId, webhook, options);
|
|
2267
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['WebhooksApi.testWebhook']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
2268
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2269
|
+
});
|
|
2270
|
+
},
|
|
2271
|
+
/**
|
|
2272
|
+
* Partially update a webhook.
|
|
2273
|
+
* @summary Update webhook
|
|
2274
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2275
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2276
|
+
* @param {V1WebhooksUpdateRequest} v1WebhooksUpdateRequest
|
|
2277
|
+
* @param {*} [options] Override http request option.
|
|
2278
|
+
* @throws {RequiredError}
|
|
2279
|
+
*/
|
|
2280
|
+
updateWebhook(mailboxResourceId, webhook, v1WebhooksUpdateRequest, options) {
|
|
2281
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2282
|
+
var _a, _b;
|
|
2283
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateWebhook(mailboxResourceId, webhook, v1WebhooksUpdateRequest, options);
|
|
2284
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['WebhooksApi.updateWebhook']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
2285
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2286
|
+
});
|
|
2287
|
+
},
|
|
2288
|
+
};
|
|
2289
|
+
};
|
|
2290
|
+
exports.WebhooksApiFp = WebhooksApiFp;
|
|
2291
|
+
/**
|
|
2292
|
+
* WebhooksApi - factory interface
|
|
2293
|
+
* @export
|
|
2294
|
+
*/
|
|
2295
|
+
const WebhooksApiFactory = function (configuration, basePath, axios) {
|
|
2296
|
+
const localVarFp = (0, exports.WebhooksApiFp)(configuration);
|
|
2297
|
+
return {
|
|
2298
|
+
/**
|
|
2299
|
+
* Create a webhook. The response includes the one-time `secret` — store it securely as it is never returned again.
|
|
2300
|
+
* @summary Create webhook
|
|
2301
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2302
|
+
* @param {V1WebhooksCreateRequest} v1WebhooksCreateRequest
|
|
2303
|
+
* @param {*} [options] Override http request option.
|
|
2304
|
+
* @throws {RequiredError}
|
|
2305
|
+
*/
|
|
2306
|
+
createWebhook(mailboxResourceId, v1WebhooksCreateRequest, options) {
|
|
2307
|
+
return localVarFp.createWebhook(mailboxResourceId, v1WebhooksCreateRequest, options).then((request) => request(axios, basePath));
|
|
2308
|
+
},
|
|
2309
|
+
/**
|
|
2310
|
+
* Delete a webhook.
|
|
2311
|
+
* @summary Delete webhook
|
|
2312
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2313
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2314
|
+
* @param {*} [options] Override http request option.
|
|
2315
|
+
* @throws {RequiredError}
|
|
2316
|
+
*/
|
|
2317
|
+
deleteWebhook(mailboxResourceId, webhook, options) {
|
|
2318
|
+
return localVarFp.deleteWebhook(mailboxResourceId, webhook, options).then((request) => request(axios, basePath));
|
|
2319
|
+
},
|
|
2320
|
+
/**
|
|
2321
|
+
* Retrieve a single webhook by id.
|
|
2322
|
+
* @summary Get webhook
|
|
2323
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2324
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2325
|
+
* @param {*} [options] Override http request option.
|
|
2326
|
+
* @throws {RequiredError}
|
|
2327
|
+
*/
|
|
2328
|
+
getWebhook(mailboxResourceId, webhook, options) {
|
|
2329
|
+
return localVarFp.getWebhook(mailboxResourceId, webhook, options).then((request) => request(axios, basePath));
|
|
2330
|
+
},
|
|
2331
|
+
/**
|
|
2332
|
+
* List webhooks for a mailbox.
|
|
2333
|
+
* @summary List webhooks
|
|
2334
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2335
|
+
* @param {ListWebhooksStatusEnum} [status]
|
|
2336
|
+
* @param {number} [page]
|
|
2337
|
+
* @param {number} [perPage]
|
|
2338
|
+
* @param {*} [options] Override http request option.
|
|
2339
|
+
* @throws {RequiredError}
|
|
2340
|
+
*/
|
|
2341
|
+
listWebhooks(mailboxResourceId, status, page, perPage, options) {
|
|
2342
|
+
return localVarFp.listWebhooks(mailboxResourceId, status, page, perPage, options).then((request) => request(axios, basePath));
|
|
2343
|
+
},
|
|
2344
|
+
/**
|
|
2345
|
+
* Regenerate the webhook secret. The previous secret is immediately invalidated. The new secret is returned once.
|
|
2346
|
+
* @summary Regenerate webhook secret
|
|
2347
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2348
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2349
|
+
* @param {*} [options] Override http request option.
|
|
2350
|
+
* @throws {RequiredError}
|
|
2351
|
+
*/
|
|
2352
|
+
regenerateWebhookSecret(mailboxResourceId, webhook, options) {
|
|
2353
|
+
return localVarFp.regenerateWebhookSecret(mailboxResourceId, webhook, options).then((request) => request(axios, basePath));
|
|
2354
|
+
},
|
|
2355
|
+
/**
|
|
2356
|
+
* Send a test delivery to the webhook URL and return the upstream response.
|
|
2357
|
+
* @summary Test webhook
|
|
2358
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2359
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2360
|
+
* @param {*} [options] Override http request option.
|
|
2361
|
+
* @throws {RequiredError}
|
|
2362
|
+
*/
|
|
2363
|
+
testWebhook(mailboxResourceId, webhook, options) {
|
|
2364
|
+
return localVarFp.testWebhook(mailboxResourceId, webhook, options).then((request) => request(axios, basePath));
|
|
2365
|
+
},
|
|
2366
|
+
/**
|
|
2367
|
+
* Partially update a webhook.
|
|
2368
|
+
* @summary Update webhook
|
|
2369
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2370
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2371
|
+
* @param {V1WebhooksUpdateRequest} v1WebhooksUpdateRequest
|
|
2372
|
+
* @param {*} [options] Override http request option.
|
|
2373
|
+
* @throws {RequiredError}
|
|
2374
|
+
*/
|
|
2375
|
+
updateWebhook(mailboxResourceId, webhook, v1WebhooksUpdateRequest, options) {
|
|
2376
|
+
return localVarFp.updateWebhook(mailboxResourceId, webhook, v1WebhooksUpdateRequest, options).then((request) => request(axios, basePath));
|
|
2377
|
+
},
|
|
2378
|
+
};
|
|
2379
|
+
};
|
|
2380
|
+
exports.WebhooksApiFactory = WebhooksApiFactory;
|
|
2381
|
+
/**
|
|
2382
|
+
* WebhooksApi - object-oriented interface
|
|
2383
|
+
* @export
|
|
2384
|
+
* @class WebhooksApi
|
|
2385
|
+
* @extends {BaseAPI}
|
|
2386
|
+
*/
|
|
2387
|
+
class WebhooksApi extends base_1.BaseAPI {
|
|
2388
|
+
/**
|
|
2389
|
+
* Create a webhook. The response includes the one-time `secret` — store it securely as it is never returned again.
|
|
2390
|
+
* @summary Create webhook
|
|
2391
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2392
|
+
* @param {V1WebhooksCreateRequest} v1WebhooksCreateRequest
|
|
2393
|
+
* @param {*} [options] Override http request option.
|
|
2394
|
+
* @throws {RequiredError}
|
|
2395
|
+
* @memberof WebhooksApi
|
|
2396
|
+
*/
|
|
2397
|
+
createWebhook(mailboxResourceId, v1WebhooksCreateRequest, options) {
|
|
2398
|
+
return (0, exports.WebhooksApiFp)(this.configuration).createWebhook(mailboxResourceId, v1WebhooksCreateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2399
|
+
}
|
|
2400
|
+
/**
|
|
2401
|
+
* Delete a webhook.
|
|
2402
|
+
* @summary Delete webhook
|
|
2403
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2404
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2405
|
+
* @param {*} [options] Override http request option.
|
|
2406
|
+
* @throws {RequiredError}
|
|
2407
|
+
* @memberof WebhooksApi
|
|
2408
|
+
*/
|
|
2409
|
+
deleteWebhook(mailboxResourceId, webhook, options) {
|
|
2410
|
+
return (0, exports.WebhooksApiFp)(this.configuration).deleteWebhook(mailboxResourceId, webhook, options).then((request) => request(this.axios, this.basePath));
|
|
2411
|
+
}
|
|
2412
|
+
/**
|
|
2413
|
+
* Retrieve a single webhook by id.
|
|
2414
|
+
* @summary Get webhook
|
|
2415
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2416
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2417
|
+
* @param {*} [options] Override http request option.
|
|
2418
|
+
* @throws {RequiredError}
|
|
2419
|
+
* @memberof WebhooksApi
|
|
2420
|
+
*/
|
|
2421
|
+
getWebhook(mailboxResourceId, webhook, options) {
|
|
2422
|
+
return (0, exports.WebhooksApiFp)(this.configuration).getWebhook(mailboxResourceId, webhook, options).then((request) => request(this.axios, this.basePath));
|
|
2423
|
+
}
|
|
2424
|
+
/**
|
|
2425
|
+
* List webhooks for a mailbox.
|
|
2426
|
+
* @summary List webhooks
|
|
2427
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2428
|
+
* @param {ListWebhooksStatusEnum} [status]
|
|
2429
|
+
* @param {number} [page]
|
|
2430
|
+
* @param {number} [perPage]
|
|
2431
|
+
* @param {*} [options] Override http request option.
|
|
2432
|
+
* @throws {RequiredError}
|
|
2433
|
+
* @memberof WebhooksApi
|
|
2434
|
+
*/
|
|
2435
|
+
listWebhooks(mailboxResourceId, status, page, perPage, options) {
|
|
2436
|
+
return (0, exports.WebhooksApiFp)(this.configuration).listWebhooks(mailboxResourceId, status, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
2437
|
+
}
|
|
2438
|
+
/**
|
|
2439
|
+
* Regenerate the webhook secret. The previous secret is immediately invalidated. The new secret is returned once.
|
|
2440
|
+
* @summary Regenerate webhook secret
|
|
2441
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2442
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2443
|
+
* @param {*} [options] Override http request option.
|
|
2444
|
+
* @throws {RequiredError}
|
|
2445
|
+
* @memberof WebhooksApi
|
|
2446
|
+
*/
|
|
2447
|
+
regenerateWebhookSecret(mailboxResourceId, webhook, options) {
|
|
2448
|
+
return (0, exports.WebhooksApiFp)(this.configuration).regenerateWebhookSecret(mailboxResourceId, webhook, options).then((request) => request(this.axios, this.basePath));
|
|
2449
|
+
}
|
|
2450
|
+
/**
|
|
2451
|
+
* Send a test delivery to the webhook URL and return the upstream response.
|
|
2452
|
+
* @summary Test webhook
|
|
2453
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2454
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2455
|
+
* @param {*} [options] Override http request option.
|
|
2456
|
+
* @throws {RequiredError}
|
|
2457
|
+
* @memberof WebhooksApi
|
|
2458
|
+
*/
|
|
2459
|
+
testWebhook(mailboxResourceId, webhook, options) {
|
|
2460
|
+
return (0, exports.WebhooksApiFp)(this.configuration).testWebhook(mailboxResourceId, webhook, options).then((request) => request(this.axios, this.basePath));
|
|
2461
|
+
}
|
|
2462
|
+
/**
|
|
2463
|
+
* Partially update a webhook.
|
|
2464
|
+
* @summary Update webhook
|
|
2465
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
2466
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
2467
|
+
* @param {V1WebhooksUpdateRequest} v1WebhooksUpdateRequest
|
|
2468
|
+
* @param {*} [options] Override http request option.
|
|
2469
|
+
* @throws {RequiredError}
|
|
2470
|
+
* @memberof WebhooksApi
|
|
2471
|
+
*/
|
|
2472
|
+
updateWebhook(mailboxResourceId, webhook, v1WebhooksUpdateRequest, options) {
|
|
2473
|
+
return (0, exports.WebhooksApiFp)(this.configuration).updateWebhook(mailboxResourceId, webhook, v1WebhooksUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
exports.WebhooksApi = WebhooksApi;
|
|
2477
|
+
/**
|
|
2478
|
+
* @export
|
|
2479
|
+
*/
|
|
2480
|
+
exports.ListWebhooksStatusEnum = {
|
|
2481
|
+
Active: 'active',
|
|
2482
|
+
Paused: 'paused',
|
|
2483
|
+
Disabled: 'disabled'
|
|
2484
|
+
};
|