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/api.ts
ADDED
|
@@ -0,0 +1,3760 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Hostinger Email API
|
|
5
|
+
*
|
|
6
|
+
* API Version: 1.0.0
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
|
+
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import type { Configuration } from './configuration';
|
|
14
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
15
|
+
import globalAxios from 'axios';
|
|
16
|
+
// Some imports not used depending on template conditions
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
19
|
+
import type { RequestArgs } from './base';
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Standard error envelope. Frontend translations key off `code`, never off `error`.
|
|
25
|
+
* @export
|
|
26
|
+
* @interface ModelError
|
|
27
|
+
*/
|
|
28
|
+
export interface ModelError {
|
|
29
|
+
/**
|
|
30
|
+
* Human-readable error message.
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof ModelError
|
|
33
|
+
*/
|
|
34
|
+
'error': string;
|
|
35
|
+
/**
|
|
36
|
+
* Machine-readable error code in SCREAMING_SNAKE_CASE.
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof ModelError
|
|
39
|
+
*/
|
|
40
|
+
'code': string;
|
|
41
|
+
/**
|
|
42
|
+
* Additional structured context for the error. May be omitted.
|
|
43
|
+
* @type {{ [key: string]: any; }}
|
|
44
|
+
* @memberof ModelError
|
|
45
|
+
*/
|
|
46
|
+
'params': { [key: string]: any; };
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Pagination metadata for paginated collections.
|
|
50
|
+
* @export
|
|
51
|
+
* @interface Pagination
|
|
52
|
+
*/
|
|
53
|
+
export interface Pagination {
|
|
54
|
+
/**
|
|
55
|
+
* Current page number (1-based).
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof Pagination
|
|
58
|
+
*/
|
|
59
|
+
'page': number;
|
|
60
|
+
/**
|
|
61
|
+
* Items per page.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof Pagination
|
|
64
|
+
*/
|
|
65
|
+
'perPage': number;
|
|
66
|
+
/**
|
|
67
|
+
* Total number of items across all pages.
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof Pagination
|
|
70
|
+
*/
|
|
71
|
+
'total': number;
|
|
72
|
+
/**
|
|
73
|
+
* Total number of pages.
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof Pagination
|
|
76
|
+
*/
|
|
77
|
+
'totalPages': number;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Paginated list of messages.
|
|
81
|
+
* @export
|
|
82
|
+
* @interface V1FolderMessagesCollection
|
|
83
|
+
*/
|
|
84
|
+
export interface V1FolderMessagesCollection {
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {Array<V1FolderMessagesMessage>}
|
|
88
|
+
* @memberof V1FolderMessagesCollection
|
|
89
|
+
*/
|
|
90
|
+
'data': Array<V1FolderMessagesMessage>;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {Pagination}
|
|
94
|
+
* @memberof V1FolderMessagesCollection
|
|
95
|
+
*/
|
|
96
|
+
'pagination': Pagination;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Body for permanently deleting multiple messages.
|
|
100
|
+
* @export
|
|
101
|
+
* @interface V1FolderMessagesDeleteBulkRequest
|
|
102
|
+
*/
|
|
103
|
+
export interface V1FolderMessagesDeleteBulkRequest {
|
|
104
|
+
/**
|
|
105
|
+
* Message UIDs to delete. 1-100 entries, each > 0.
|
|
106
|
+
* @type {Array<number>}
|
|
107
|
+
* @memberof V1FolderMessagesDeleteBulkRequest
|
|
108
|
+
*/
|
|
109
|
+
'uids': Array<number>;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Add and/or remove flags on multiple messages. At least one of addFlags or removeFlags must be set.
|
|
113
|
+
* @export
|
|
114
|
+
* @interface V1FolderMessagesFlagsBulkRequest
|
|
115
|
+
*/
|
|
116
|
+
export interface V1FolderMessagesFlagsBulkRequest {
|
|
117
|
+
/**
|
|
118
|
+
* Message UIDs to update. 1-100 entries, each > 0.
|
|
119
|
+
* @type {Array<number>}
|
|
120
|
+
* @memberof V1FolderMessagesFlagsBulkRequest
|
|
121
|
+
*/
|
|
122
|
+
'uids': Array<number>;
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
* @type {Array<string>}
|
|
126
|
+
* @memberof V1FolderMessagesFlagsBulkRequest
|
|
127
|
+
*/
|
|
128
|
+
'addFlags': Array<string>;
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @type {Array<string>}
|
|
132
|
+
* @memberof V1FolderMessagesFlagsBulkRequest
|
|
133
|
+
*/
|
|
134
|
+
'removeFlags': Array<string>;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Add and/or remove flags on a message. At least one of addFlags or removeFlags must be set.
|
|
138
|
+
* @export
|
|
139
|
+
* @interface V1FolderMessagesFlagsRequest
|
|
140
|
+
*/
|
|
141
|
+
export interface V1FolderMessagesFlagsRequest {
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @type {Array<string>}
|
|
145
|
+
* @memberof V1FolderMessagesFlagsRequest
|
|
146
|
+
*/
|
|
147
|
+
'addFlags': Array<string>;
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
* @type {Array<string>}
|
|
151
|
+
* @memberof V1FolderMessagesFlagsRequest
|
|
152
|
+
*/
|
|
153
|
+
'removeFlags': Array<string>;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* A message in a folder of the managed mailbox.
|
|
157
|
+
* @export
|
|
158
|
+
* @interface V1FolderMessagesMessage
|
|
159
|
+
*/
|
|
160
|
+
export interface V1FolderMessagesMessage {
|
|
161
|
+
/**
|
|
162
|
+
*
|
|
163
|
+
* @type {number}
|
|
164
|
+
* @memberof V1FolderMessagesMessage
|
|
165
|
+
*/
|
|
166
|
+
'uid': number;
|
|
167
|
+
/**
|
|
168
|
+
*
|
|
169
|
+
* @type {string}
|
|
170
|
+
* @memberof V1FolderMessagesMessage
|
|
171
|
+
*/
|
|
172
|
+
'path': string;
|
|
173
|
+
/**
|
|
174
|
+
*
|
|
175
|
+
* @type {string}
|
|
176
|
+
* @memberof V1FolderMessagesMessage
|
|
177
|
+
*/
|
|
178
|
+
'date': string;
|
|
179
|
+
/**
|
|
180
|
+
*
|
|
181
|
+
* @type {Array<string>}
|
|
182
|
+
* @memberof V1FolderMessagesMessage
|
|
183
|
+
*/
|
|
184
|
+
'flags': Array<string>;
|
|
185
|
+
/**
|
|
186
|
+
*
|
|
187
|
+
* @type {boolean}
|
|
188
|
+
* @memberof V1FolderMessagesMessage
|
|
189
|
+
*/
|
|
190
|
+
'unseen': boolean;
|
|
191
|
+
/**
|
|
192
|
+
*
|
|
193
|
+
* @type {number}
|
|
194
|
+
* @memberof V1FolderMessagesMessage
|
|
195
|
+
*/
|
|
196
|
+
'size': number;
|
|
197
|
+
/**
|
|
198
|
+
*
|
|
199
|
+
* @type {string}
|
|
200
|
+
* @memberof V1FolderMessagesMessage
|
|
201
|
+
*/
|
|
202
|
+
'subject': string | null;
|
|
203
|
+
/**
|
|
204
|
+
*
|
|
205
|
+
* @type {V1FolderMessagesMessageAddress}
|
|
206
|
+
* @memberof V1FolderMessagesMessage
|
|
207
|
+
*/
|
|
208
|
+
'from': V1FolderMessagesMessageAddress | null;
|
|
209
|
+
/**
|
|
210
|
+
*
|
|
211
|
+
* @type {Array<V1FolderMessagesMessageAddress>}
|
|
212
|
+
* @memberof V1FolderMessagesMessage
|
|
213
|
+
*/
|
|
214
|
+
'to': Array<V1FolderMessagesMessageAddress>;
|
|
215
|
+
/**
|
|
216
|
+
*
|
|
217
|
+
* @type {Array<V1FolderMessagesMessageAddress>}
|
|
218
|
+
* @memberof V1FolderMessagesMessage
|
|
219
|
+
*/
|
|
220
|
+
'cc': Array<V1FolderMessagesMessageAddress>;
|
|
221
|
+
/**
|
|
222
|
+
*
|
|
223
|
+
* @type {Array<V1FolderMessagesMessageAddress>}
|
|
224
|
+
* @memberof V1FolderMessagesMessage
|
|
225
|
+
*/
|
|
226
|
+
'bcc': Array<V1FolderMessagesMessageAddress>;
|
|
227
|
+
/**
|
|
228
|
+
*
|
|
229
|
+
* @type {string}
|
|
230
|
+
* @memberof V1FolderMessagesMessage
|
|
231
|
+
*/
|
|
232
|
+
'messageId': string | null;
|
|
233
|
+
/**
|
|
234
|
+
*
|
|
235
|
+
* @type {string}
|
|
236
|
+
* @memberof V1FolderMessagesMessage
|
|
237
|
+
*/
|
|
238
|
+
'inReplyTo': string | null;
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
* @type {Array<V1FolderMessagesMessageAttachment>}
|
|
242
|
+
* @memberof V1FolderMessagesMessage
|
|
243
|
+
*/
|
|
244
|
+
'attachments': Array<V1FolderMessagesMessageAttachment>;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* A single email address with optional display name.
|
|
248
|
+
* @export
|
|
249
|
+
* @interface V1FolderMessagesMessageAddress
|
|
250
|
+
*/
|
|
251
|
+
export interface V1FolderMessagesMessageAddress {
|
|
252
|
+
/**
|
|
253
|
+
*
|
|
254
|
+
* @type {string}
|
|
255
|
+
* @memberof V1FolderMessagesMessageAddress
|
|
256
|
+
*/
|
|
257
|
+
'name': string;
|
|
258
|
+
/**
|
|
259
|
+
*
|
|
260
|
+
* @type {string}
|
|
261
|
+
* @memberof V1FolderMessagesMessageAddress
|
|
262
|
+
*/
|
|
263
|
+
'address': string;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Attachment metadata attached to a message.
|
|
267
|
+
* @export
|
|
268
|
+
* @interface V1FolderMessagesMessageAttachment
|
|
269
|
+
*/
|
|
270
|
+
export interface V1FolderMessagesMessageAttachment {
|
|
271
|
+
/**
|
|
272
|
+
* Opaque attachment identifier. Use as the {attachmentId} path parameter on the download endpoint.
|
|
273
|
+
* @type {string}
|
|
274
|
+
* @memberof V1FolderMessagesMessageAttachment
|
|
275
|
+
*/
|
|
276
|
+
'id': string;
|
|
277
|
+
/**
|
|
278
|
+
*
|
|
279
|
+
* @type {string}
|
|
280
|
+
* @memberof V1FolderMessagesMessageAttachment
|
|
281
|
+
*/
|
|
282
|
+
'contentType': string;
|
|
283
|
+
/**
|
|
284
|
+
*
|
|
285
|
+
* @type {number}
|
|
286
|
+
* @memberof V1FolderMessagesMessageAttachment
|
|
287
|
+
*/
|
|
288
|
+
'sizeBytes': number;
|
|
289
|
+
/**
|
|
290
|
+
*
|
|
291
|
+
* @type {boolean}
|
|
292
|
+
* @memberof V1FolderMessagesMessageAttachment
|
|
293
|
+
*/
|
|
294
|
+
'inline': boolean;
|
|
295
|
+
/**
|
|
296
|
+
*
|
|
297
|
+
* @type {string}
|
|
298
|
+
* @memberof V1FolderMessagesMessageAttachment
|
|
299
|
+
*/
|
|
300
|
+
'filename': string | null;
|
|
301
|
+
/**
|
|
302
|
+
*
|
|
303
|
+
* @type {string}
|
|
304
|
+
* @memberof V1FolderMessagesMessageAttachment
|
|
305
|
+
*/
|
|
306
|
+
'contentId': string | null;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Rendered text and HTML parts of a message.
|
|
310
|
+
* @export
|
|
311
|
+
* @interface V1FolderMessagesMessageText
|
|
312
|
+
*/
|
|
313
|
+
export interface V1FolderMessagesMessageText {
|
|
314
|
+
/**
|
|
315
|
+
*
|
|
316
|
+
* @type {string}
|
|
317
|
+
* @memberof V1FolderMessagesMessageText
|
|
318
|
+
*/
|
|
319
|
+
'text': string;
|
|
320
|
+
/**
|
|
321
|
+
*
|
|
322
|
+
* @type {string}
|
|
323
|
+
* @memberof V1FolderMessagesMessageText
|
|
324
|
+
*/
|
|
325
|
+
'html': string;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Single message text payload.
|
|
329
|
+
* @export
|
|
330
|
+
* @interface V1FolderMessagesMessageTextResource
|
|
331
|
+
*/
|
|
332
|
+
export interface V1FolderMessagesMessageTextResource {
|
|
333
|
+
/**
|
|
334
|
+
*
|
|
335
|
+
* @type {V1FolderMessagesMessageText}
|
|
336
|
+
* @memberof V1FolderMessagesMessageTextResource
|
|
337
|
+
*/
|
|
338
|
+
'data': V1FolderMessagesMessageText;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Body for moving multiple messages to a target folder.
|
|
342
|
+
* @export
|
|
343
|
+
* @interface V1FolderMessagesMoveBulkRequest
|
|
344
|
+
*/
|
|
345
|
+
export interface V1FolderMessagesMoveBulkRequest {
|
|
346
|
+
/**
|
|
347
|
+
* Message UIDs to move. 1-100 entries, each > 0.
|
|
348
|
+
* @type {Array<number>}
|
|
349
|
+
* @memberof V1FolderMessagesMoveBulkRequest
|
|
350
|
+
*/
|
|
351
|
+
'uids': Array<number>;
|
|
352
|
+
/**
|
|
353
|
+
* Destination folder path.
|
|
354
|
+
* @type {string}
|
|
355
|
+
* @memberof V1FolderMessagesMoveBulkRequest
|
|
356
|
+
*/
|
|
357
|
+
'targetFolder': string;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Body for moving a single message to a target folder.
|
|
361
|
+
* @export
|
|
362
|
+
* @interface V1FolderMessagesMoveRequest
|
|
363
|
+
*/
|
|
364
|
+
export interface V1FolderMessagesMoveRequest {
|
|
365
|
+
/**
|
|
366
|
+
* Destination folder path.
|
|
367
|
+
* @type {string}
|
|
368
|
+
* @memberof V1FolderMessagesMoveRequest
|
|
369
|
+
*/
|
|
370
|
+
'targetFolder': string;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Single message payload.
|
|
374
|
+
* @export
|
|
375
|
+
* @interface V1FolderMessagesResource
|
|
376
|
+
*/
|
|
377
|
+
export interface V1FolderMessagesResource {
|
|
378
|
+
/**
|
|
379
|
+
*
|
|
380
|
+
* @type {V1FolderMessagesMessage}
|
|
381
|
+
* @memberof V1FolderMessagesResource
|
|
382
|
+
*/
|
|
383
|
+
'data': V1FolderMessagesMessage;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Search criteria. All fields optional; combine to narrow results.
|
|
387
|
+
* @export
|
|
388
|
+
* @interface V1FolderMessagesSearchRequest
|
|
389
|
+
*/
|
|
390
|
+
export interface V1FolderMessagesSearchRequest {
|
|
391
|
+
/**
|
|
392
|
+
*
|
|
393
|
+
* @type {string}
|
|
394
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
395
|
+
*/
|
|
396
|
+
'since': string;
|
|
397
|
+
/**
|
|
398
|
+
*
|
|
399
|
+
* @type {string}
|
|
400
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
401
|
+
*/
|
|
402
|
+
'before': string;
|
|
403
|
+
/**
|
|
404
|
+
*
|
|
405
|
+
* @type {Array<string>}
|
|
406
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
407
|
+
*/
|
|
408
|
+
'flags': Array<string>;
|
|
409
|
+
/**
|
|
410
|
+
*
|
|
411
|
+
* @type {string}
|
|
412
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
413
|
+
*/
|
|
414
|
+
'uid': string;
|
|
415
|
+
/**
|
|
416
|
+
*
|
|
417
|
+
* @type {string}
|
|
418
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
419
|
+
*/
|
|
420
|
+
'subject': string;
|
|
421
|
+
/**
|
|
422
|
+
*
|
|
423
|
+
* @type {string}
|
|
424
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
425
|
+
*/
|
|
426
|
+
'from': string;
|
|
427
|
+
/**
|
|
428
|
+
*
|
|
429
|
+
* @type {string}
|
|
430
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
431
|
+
*/
|
|
432
|
+
'to': string;
|
|
433
|
+
/**
|
|
434
|
+
*
|
|
435
|
+
* @type {string}
|
|
436
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
437
|
+
*/
|
|
438
|
+
'cc': string;
|
|
439
|
+
/**
|
|
440
|
+
*
|
|
441
|
+
* @type {string}
|
|
442
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
443
|
+
*/
|
|
444
|
+
'body': string;
|
|
445
|
+
/**
|
|
446
|
+
*
|
|
447
|
+
* @type {string}
|
|
448
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
449
|
+
*/
|
|
450
|
+
'header': string;
|
|
451
|
+
/**
|
|
452
|
+
*
|
|
453
|
+
* @type {number}
|
|
454
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
455
|
+
*/
|
|
456
|
+
'larger': number;
|
|
457
|
+
/**
|
|
458
|
+
*
|
|
459
|
+
* @type {number}
|
|
460
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
461
|
+
*/
|
|
462
|
+
'smaller': number;
|
|
463
|
+
/**
|
|
464
|
+
*
|
|
465
|
+
* @type {string}
|
|
466
|
+
* @memberof V1FolderMessagesSearchRequest
|
|
467
|
+
*/
|
|
468
|
+
'text': string;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Per-UID outcome of a bulk flag update. 200 when every UID succeeded, 207 when at least one failed.
|
|
472
|
+
* @export
|
|
473
|
+
* @interface V1FolderMessagesUpdateFlagsResult
|
|
474
|
+
*/
|
|
475
|
+
export interface V1FolderMessagesUpdateFlagsResult {
|
|
476
|
+
/**
|
|
477
|
+
*
|
|
478
|
+
* @type {V1FolderMessagesUpdateFlagsResultData}
|
|
479
|
+
* @memberof V1FolderMessagesUpdateFlagsResult
|
|
480
|
+
*/
|
|
481
|
+
'data': V1FolderMessagesUpdateFlagsResultData;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
*
|
|
485
|
+
* @export
|
|
486
|
+
* @interface V1FolderMessagesUpdateFlagsResultData
|
|
487
|
+
*/
|
|
488
|
+
export interface V1FolderMessagesUpdateFlagsResultData {
|
|
489
|
+
/**
|
|
490
|
+
*
|
|
491
|
+
* @type {Array<number>}
|
|
492
|
+
* @memberof V1FolderMessagesUpdateFlagsResultData
|
|
493
|
+
*/
|
|
494
|
+
'successful': Array<number>;
|
|
495
|
+
/**
|
|
496
|
+
*
|
|
497
|
+
* @type {Array<V1FolderMessagesUpdateFlagsResultDataFailedInner>}
|
|
498
|
+
* @memberof V1FolderMessagesUpdateFlagsResultData
|
|
499
|
+
*/
|
|
500
|
+
'failed': Array<V1FolderMessagesUpdateFlagsResultDataFailedInner>;
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
*
|
|
504
|
+
* @export
|
|
505
|
+
* @interface V1FolderMessagesUpdateFlagsResultDataFailedInner
|
|
506
|
+
*/
|
|
507
|
+
export interface V1FolderMessagesUpdateFlagsResultDataFailedInner {
|
|
508
|
+
/**
|
|
509
|
+
*
|
|
510
|
+
* @type {number}
|
|
511
|
+
* @memberof V1FolderMessagesUpdateFlagsResultDataFailedInner
|
|
512
|
+
*/
|
|
513
|
+
'uid': number;
|
|
514
|
+
/**
|
|
515
|
+
*
|
|
516
|
+
* @type {string}
|
|
517
|
+
* @memberof V1FolderMessagesUpdateFlagsResultDataFailedInner
|
|
518
|
+
*/
|
|
519
|
+
'reason': string;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Paginated list of folders.
|
|
523
|
+
* @export
|
|
524
|
+
* @interface V1FoldersCollection
|
|
525
|
+
*/
|
|
526
|
+
export interface V1FoldersCollection {
|
|
527
|
+
/**
|
|
528
|
+
*
|
|
529
|
+
* @type {Array<V1FoldersFolder>}
|
|
530
|
+
* @memberof V1FoldersCollection
|
|
531
|
+
*/
|
|
532
|
+
'data': Array<V1FoldersFolder>;
|
|
533
|
+
/**
|
|
534
|
+
*
|
|
535
|
+
* @type {Pagination}
|
|
536
|
+
* @memberof V1FoldersCollection
|
|
537
|
+
*/
|
|
538
|
+
'pagination': Pagination;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Body for creating a folder.
|
|
542
|
+
* @export
|
|
543
|
+
* @interface V1FoldersCreateRequest
|
|
544
|
+
*/
|
|
545
|
+
export interface V1FoldersCreateRequest {
|
|
546
|
+
/**
|
|
547
|
+
* Folder name. Length 1-100 after trimming.
|
|
548
|
+
* @type {string}
|
|
549
|
+
* @memberof V1FoldersCreateRequest
|
|
550
|
+
*/
|
|
551
|
+
'name': string;
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* A folder (IMAP mailbox) in the managed mailbox.
|
|
555
|
+
* @export
|
|
556
|
+
* @interface V1FoldersFolder
|
|
557
|
+
*/
|
|
558
|
+
export interface V1FoldersFolder {
|
|
559
|
+
/**
|
|
560
|
+
* Full hierarchical folder path including the delimiter.
|
|
561
|
+
* @type {string}
|
|
562
|
+
* @memberof V1FoldersFolder
|
|
563
|
+
*/
|
|
564
|
+
'path': string;
|
|
565
|
+
/**
|
|
566
|
+
* Leaf name of the folder.
|
|
567
|
+
* @type {string}
|
|
568
|
+
* @memberof V1FoldersFolder
|
|
569
|
+
*/
|
|
570
|
+
'name': string;
|
|
571
|
+
/**
|
|
572
|
+
* Hierarchy delimiter used by the IMAP server.
|
|
573
|
+
* @type {string}
|
|
574
|
+
* @memberof V1FoldersFolder
|
|
575
|
+
*/
|
|
576
|
+
'delimiter': string;
|
|
577
|
+
/**
|
|
578
|
+
* IMAP SPECIAL-USE attribute (RFC 6154). `null` for regular folders.
|
|
579
|
+
* @type {string}
|
|
580
|
+
* @memberof V1FoldersFolder
|
|
581
|
+
*/
|
|
582
|
+
'specialUse': string | null;
|
|
583
|
+
/**
|
|
584
|
+
* Total number of messages in the folder.
|
|
585
|
+
* @type {number}
|
|
586
|
+
* @memberof V1FoldersFolder
|
|
587
|
+
*/
|
|
588
|
+
'messageCount': number;
|
|
589
|
+
/**
|
|
590
|
+
* Number of unread messages in the folder.
|
|
591
|
+
* @type {number}
|
|
592
|
+
* @memberof V1FoldersFolder
|
|
593
|
+
*/
|
|
594
|
+
'unreadCount': number;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Single folder payload.
|
|
598
|
+
* @export
|
|
599
|
+
* @interface V1FoldersResource
|
|
600
|
+
*/
|
|
601
|
+
export interface V1FoldersResource {
|
|
602
|
+
/**
|
|
603
|
+
*
|
|
604
|
+
* @type {V1FoldersFolder}
|
|
605
|
+
* @memberof V1FoldersResource
|
|
606
|
+
*/
|
|
607
|
+
'data': V1FoldersFolder;
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Body for renaming a folder.
|
|
611
|
+
* @export
|
|
612
|
+
* @interface V1FoldersUpdateRequest
|
|
613
|
+
*/
|
|
614
|
+
export interface V1FoldersUpdateRequest {
|
|
615
|
+
/**
|
|
616
|
+
* New folder name. Length 1-100 after trimming.
|
|
617
|
+
* @type {string}
|
|
618
|
+
* @memberof V1FoldersUpdateRequest
|
|
619
|
+
*/
|
|
620
|
+
'name': string;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* A mailbox the authenticated API token can manage.
|
|
624
|
+
* @export
|
|
625
|
+
* @interface V1MeMailbox
|
|
626
|
+
*/
|
|
627
|
+
export interface V1MeMailbox {
|
|
628
|
+
/**
|
|
629
|
+
* Unique identifier of the mailbox.
|
|
630
|
+
* @type {string}
|
|
631
|
+
* @memberof V1MeMailbox
|
|
632
|
+
*/
|
|
633
|
+
'resourceId': string;
|
|
634
|
+
/**
|
|
635
|
+
* Email address of the mailbox.
|
|
636
|
+
* @type {string}
|
|
637
|
+
* @memberof V1MeMailbox
|
|
638
|
+
*/
|
|
639
|
+
'address': string;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Authenticated account payload.
|
|
643
|
+
* @export
|
|
644
|
+
* @interface V1MeResource
|
|
645
|
+
*/
|
|
646
|
+
export interface V1MeResource {
|
|
647
|
+
/**
|
|
648
|
+
*
|
|
649
|
+
* @type {V1MeResourceData}
|
|
650
|
+
* @memberof V1MeResource
|
|
651
|
+
*/
|
|
652
|
+
'data': V1MeResourceData;
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
*
|
|
656
|
+
* @export
|
|
657
|
+
* @interface V1MeResourceData
|
|
658
|
+
*/
|
|
659
|
+
export interface V1MeResourceData {
|
|
660
|
+
/**
|
|
661
|
+
* Identifier of the order this API token is scoped to.
|
|
662
|
+
* @type {string}
|
|
663
|
+
* @memberof V1MeResourceData
|
|
664
|
+
*/
|
|
665
|
+
'orderResourceId': string;
|
|
666
|
+
/**
|
|
667
|
+
* Mailboxes that the authenticated API token can manage.
|
|
668
|
+
* @type {Array<V1MeMailbox>}
|
|
669
|
+
* @memberof V1MeResourceData
|
|
670
|
+
*/
|
|
671
|
+
'mailboxes': Array<V1MeMailbox>;
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Storage and message quota usage for the managed mailbox.
|
|
675
|
+
* @export
|
|
676
|
+
* @interface V1QuotaQuota
|
|
677
|
+
*/
|
|
678
|
+
export interface V1QuotaQuota {
|
|
679
|
+
/**
|
|
680
|
+
* Per-resource quota breakdown reported by the IMAP server.
|
|
681
|
+
* @type {Array<V1QuotaQuotaResource>}
|
|
682
|
+
* @memberof V1QuotaQuota
|
|
683
|
+
*/
|
|
684
|
+
'quotas': Array<V1QuotaQuotaResource>;
|
|
685
|
+
/**
|
|
686
|
+
* Aggregate storage usage across all resources, in bytes.
|
|
687
|
+
* @type {number}
|
|
688
|
+
* @memberof V1QuotaQuota
|
|
689
|
+
*/
|
|
690
|
+
'totalUsage': number;
|
|
691
|
+
/**
|
|
692
|
+
* Aggregate storage limit across all resources, in bytes.
|
|
693
|
+
* @type {number}
|
|
694
|
+
* @memberof V1QuotaQuota
|
|
695
|
+
*/
|
|
696
|
+
'totalLimit': number;
|
|
697
|
+
/**
|
|
698
|
+
* Aggregate storage usage as a percentage of the total limit.
|
|
699
|
+
* @type {number}
|
|
700
|
+
* @memberof V1QuotaQuota
|
|
701
|
+
*/
|
|
702
|
+
'totalPercentage': number;
|
|
703
|
+
/**
|
|
704
|
+
* Whether the IMAP server reports quota information for this mailbox.
|
|
705
|
+
* @type {boolean}
|
|
706
|
+
* @memberof V1QuotaQuota
|
|
707
|
+
*/
|
|
708
|
+
'supported': boolean;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Usage and limit for a single IMAP quota resource.
|
|
712
|
+
* @export
|
|
713
|
+
* @interface V1QuotaQuotaResource
|
|
714
|
+
*/
|
|
715
|
+
export interface V1QuotaQuotaResource {
|
|
716
|
+
/**
|
|
717
|
+
* Name of the quota resource as reported by the IMAP server.
|
|
718
|
+
* @type {string}
|
|
719
|
+
* @memberof V1QuotaQuotaResource
|
|
720
|
+
*/
|
|
721
|
+
'resourceName': string;
|
|
722
|
+
/**
|
|
723
|
+
* Current usage of the resource (bytes for STORAGE, count for MESSAGE).
|
|
724
|
+
* @type {number}
|
|
725
|
+
* @memberof V1QuotaQuotaResource
|
|
726
|
+
*/
|
|
727
|
+
'usage': number;
|
|
728
|
+
/**
|
|
729
|
+
* Maximum allowed value for the resource (bytes for STORAGE, count for MESSAGE).
|
|
730
|
+
* @type {number}
|
|
731
|
+
* @memberof V1QuotaQuotaResource
|
|
732
|
+
*/
|
|
733
|
+
'limit': number;
|
|
734
|
+
/**
|
|
735
|
+
* Usage as a percentage of the limit.
|
|
736
|
+
* @type {number}
|
|
737
|
+
* @memberof V1QuotaQuotaResource
|
|
738
|
+
*/
|
|
739
|
+
'percentage': number;
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Mailbox quota payload.
|
|
743
|
+
* @export
|
|
744
|
+
* @interface V1QuotaResource
|
|
745
|
+
*/
|
|
746
|
+
export interface V1QuotaResource {
|
|
747
|
+
/**
|
|
748
|
+
*
|
|
749
|
+
* @type {V1QuotaQuota}
|
|
750
|
+
* @memberof V1QuotaResource
|
|
751
|
+
*/
|
|
752
|
+
'data': V1QuotaQuota;
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Attachment payload for outgoing mail. Supports regular attachments and inline images linked via Content-ID.
|
|
756
|
+
* @export
|
|
757
|
+
* @interface V1SendAttachment
|
|
758
|
+
*/
|
|
759
|
+
export interface V1SendAttachment {
|
|
760
|
+
/**
|
|
761
|
+
*
|
|
762
|
+
* @type {string}
|
|
763
|
+
* @memberof V1SendAttachment
|
|
764
|
+
*/
|
|
765
|
+
'filename': string;
|
|
766
|
+
/**
|
|
767
|
+
* Attachment body. Base64-encoded by default; set encoding to switch.
|
|
768
|
+
* @type {string}
|
|
769
|
+
* @memberof V1SendAttachment
|
|
770
|
+
*/
|
|
771
|
+
'content': string;
|
|
772
|
+
/**
|
|
773
|
+
*
|
|
774
|
+
* @type {string}
|
|
775
|
+
* @memberof V1SendAttachment
|
|
776
|
+
*/
|
|
777
|
+
'contentType': string;
|
|
778
|
+
/**
|
|
779
|
+
* Content-ID for inline images. Reference from HTML as <img src=\"cid:logo\">.
|
|
780
|
+
* @type {string}
|
|
781
|
+
* @memberof V1SendAttachment
|
|
782
|
+
*/
|
|
783
|
+
'cid': string;
|
|
784
|
+
/**
|
|
785
|
+
* Encoding of content. Defaults to base64.
|
|
786
|
+
* @type {string}
|
|
787
|
+
* @memberof V1SendAttachment
|
|
788
|
+
*/
|
|
789
|
+
'encoding': string;
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Outgoing message payload. At least one of to, cc, or bcc must be present.
|
|
793
|
+
* @export
|
|
794
|
+
* @interface V1SendRequest
|
|
795
|
+
*/
|
|
796
|
+
export interface V1SendRequest {
|
|
797
|
+
/**
|
|
798
|
+
*
|
|
799
|
+
* @type {Array<string>}
|
|
800
|
+
* @memberof V1SendRequest
|
|
801
|
+
*/
|
|
802
|
+
'to': Array<string>;
|
|
803
|
+
/**
|
|
804
|
+
*
|
|
805
|
+
* @type {string}
|
|
806
|
+
* @memberof V1SendRequest
|
|
807
|
+
*/
|
|
808
|
+
'displayName': string;
|
|
809
|
+
/**
|
|
810
|
+
*
|
|
811
|
+
* @type {Array<string>}
|
|
812
|
+
* @memberof V1SendRequest
|
|
813
|
+
*/
|
|
814
|
+
'cc': Array<string>;
|
|
815
|
+
/**
|
|
816
|
+
*
|
|
817
|
+
* @type {Array<string>}
|
|
818
|
+
* @memberof V1SendRequest
|
|
819
|
+
*/
|
|
820
|
+
'bcc': Array<string>;
|
|
821
|
+
/**
|
|
822
|
+
*
|
|
823
|
+
* @type {string}
|
|
824
|
+
* @memberof V1SendRequest
|
|
825
|
+
*/
|
|
826
|
+
'subject': string;
|
|
827
|
+
/**
|
|
828
|
+
*
|
|
829
|
+
* @type {string}
|
|
830
|
+
* @memberof V1SendRequest
|
|
831
|
+
*/
|
|
832
|
+
'text': string;
|
|
833
|
+
/**
|
|
834
|
+
*
|
|
835
|
+
* @type {string}
|
|
836
|
+
* @memberof V1SendRequest
|
|
837
|
+
*/
|
|
838
|
+
'html': string;
|
|
839
|
+
/**
|
|
840
|
+
*
|
|
841
|
+
* @type {Array<V1SendAttachment>}
|
|
842
|
+
* @memberof V1SendRequest
|
|
843
|
+
*/
|
|
844
|
+
'attachments': Array<V1SendAttachment>;
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* Paginated list of webhooks.
|
|
848
|
+
* @export
|
|
849
|
+
* @interface V1WebhooksCollection
|
|
850
|
+
*/
|
|
851
|
+
export interface V1WebhooksCollection {
|
|
852
|
+
/**
|
|
853
|
+
*
|
|
854
|
+
* @type {Array<V1WebhooksWebhook>}
|
|
855
|
+
* @memberof V1WebhooksCollection
|
|
856
|
+
*/
|
|
857
|
+
'data': Array<V1WebhooksWebhook>;
|
|
858
|
+
/**
|
|
859
|
+
*
|
|
860
|
+
* @type {Pagination}
|
|
861
|
+
* @memberof V1WebhooksCollection
|
|
862
|
+
*/
|
|
863
|
+
'pagination': Pagination;
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
* Body for creating a webhook.
|
|
867
|
+
* @export
|
|
868
|
+
* @interface V1WebhooksCreateRequest
|
|
869
|
+
*/
|
|
870
|
+
export interface V1WebhooksCreateRequest {
|
|
871
|
+
/**
|
|
872
|
+
*
|
|
873
|
+
* @type {string}
|
|
874
|
+
* @memberof V1WebhooksCreateRequest
|
|
875
|
+
*/
|
|
876
|
+
'name': string;
|
|
877
|
+
/**
|
|
878
|
+
*
|
|
879
|
+
* @type {string}
|
|
880
|
+
* @memberof V1WebhooksCreateRequest
|
|
881
|
+
*/
|
|
882
|
+
'description': string | null;
|
|
883
|
+
/**
|
|
884
|
+
*
|
|
885
|
+
* @type {Array<string>}
|
|
886
|
+
* @memberof V1WebhooksCreateRequest
|
|
887
|
+
*/
|
|
888
|
+
'events': Array<V1WebhooksCreateRequestEventsEnum>;
|
|
889
|
+
/**
|
|
890
|
+
*
|
|
891
|
+
* @type {string}
|
|
892
|
+
* @memberof V1WebhooksCreateRequest
|
|
893
|
+
*/
|
|
894
|
+
'status': V1WebhooksCreateRequestStatusEnum;
|
|
895
|
+
/**
|
|
896
|
+
*
|
|
897
|
+
* @type {string}
|
|
898
|
+
* @memberof V1WebhooksCreateRequest
|
|
899
|
+
*/
|
|
900
|
+
'url': string;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
export const V1WebhooksCreateRequestEventsEnum = {
|
|
904
|
+
MessageReceived: 'message.received'
|
|
905
|
+
} as const;
|
|
906
|
+
|
|
907
|
+
export type V1WebhooksCreateRequestEventsEnum = typeof V1WebhooksCreateRequestEventsEnum[keyof typeof V1WebhooksCreateRequestEventsEnum];
|
|
908
|
+
export const V1WebhooksCreateRequestStatusEnum = {
|
|
909
|
+
Active: 'active',
|
|
910
|
+
Paused: 'paused',
|
|
911
|
+
Disabled: 'disabled'
|
|
912
|
+
} as const;
|
|
913
|
+
|
|
914
|
+
export type V1WebhooksCreateRequestStatusEnum = typeof V1WebhooksCreateRequestStatusEnum[keyof typeof V1WebhooksCreateRequestStatusEnum];
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* Single webhook payload.
|
|
918
|
+
* @export
|
|
919
|
+
* @interface V1WebhooksResource
|
|
920
|
+
*/
|
|
921
|
+
export interface V1WebhooksResource {
|
|
922
|
+
/**
|
|
923
|
+
*
|
|
924
|
+
* @type {V1WebhooksWebhook}
|
|
925
|
+
* @memberof V1WebhooksResource
|
|
926
|
+
*/
|
|
927
|
+
'data': V1WebhooksWebhook;
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Single webhook payload including the one-time secret.
|
|
931
|
+
* @export
|
|
932
|
+
* @interface V1WebhooksResourceWithSecret
|
|
933
|
+
*/
|
|
934
|
+
export interface V1WebhooksResourceWithSecret {
|
|
935
|
+
/**
|
|
936
|
+
*
|
|
937
|
+
* @type {V1WebhooksWebhookWithSecret}
|
|
938
|
+
* @memberof V1WebhooksResourceWithSecret
|
|
939
|
+
*/
|
|
940
|
+
'data': V1WebhooksWebhookWithSecret;
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* Result of a webhook test delivery.
|
|
944
|
+
* @export
|
|
945
|
+
* @interface V1WebhooksTestResult
|
|
946
|
+
*/
|
|
947
|
+
export interface V1WebhooksTestResult {
|
|
948
|
+
/**
|
|
949
|
+
*
|
|
950
|
+
* @type {V1WebhooksTestResultData}
|
|
951
|
+
* @memberof V1WebhooksTestResult
|
|
952
|
+
*/
|
|
953
|
+
'data': V1WebhooksTestResultData;
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
*
|
|
957
|
+
* @export
|
|
958
|
+
* @interface V1WebhooksTestResultData
|
|
959
|
+
*/
|
|
960
|
+
export interface V1WebhooksTestResultData {
|
|
961
|
+
/**
|
|
962
|
+
*
|
|
963
|
+
* @type {number}
|
|
964
|
+
* @memberof V1WebhooksTestResultData
|
|
965
|
+
*/
|
|
966
|
+
'httpStatus': number;
|
|
967
|
+
/**
|
|
968
|
+
*
|
|
969
|
+
* @type {boolean}
|
|
970
|
+
* @memberof V1WebhooksTestResultData
|
|
971
|
+
*/
|
|
972
|
+
'success': boolean;
|
|
973
|
+
/**
|
|
974
|
+
*
|
|
975
|
+
* @type {string}
|
|
976
|
+
* @memberof V1WebhooksTestResultData
|
|
977
|
+
*/
|
|
978
|
+
'error': string | null;
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* Body for partially updating a webhook. All fields optional; only present fields are applied.
|
|
982
|
+
* @export
|
|
983
|
+
* @interface V1WebhooksUpdateRequest
|
|
984
|
+
*/
|
|
985
|
+
export interface V1WebhooksUpdateRequest {
|
|
986
|
+
/**
|
|
987
|
+
*
|
|
988
|
+
* @type {string}
|
|
989
|
+
* @memberof V1WebhooksUpdateRequest
|
|
990
|
+
*/
|
|
991
|
+
'name': string;
|
|
992
|
+
/**
|
|
993
|
+
*
|
|
994
|
+
* @type {string}
|
|
995
|
+
* @memberof V1WebhooksUpdateRequest
|
|
996
|
+
*/
|
|
997
|
+
'description': string | null;
|
|
998
|
+
/**
|
|
999
|
+
*
|
|
1000
|
+
* @type {Array<string>}
|
|
1001
|
+
* @memberof V1WebhooksUpdateRequest
|
|
1002
|
+
*/
|
|
1003
|
+
'events': Array<V1WebhooksUpdateRequestEventsEnum>;
|
|
1004
|
+
/**
|
|
1005
|
+
*
|
|
1006
|
+
* @type {string}
|
|
1007
|
+
* @memberof V1WebhooksUpdateRequest
|
|
1008
|
+
*/
|
|
1009
|
+
'status': V1WebhooksUpdateRequestStatusEnum;
|
|
1010
|
+
/**
|
|
1011
|
+
*
|
|
1012
|
+
* @type {string}
|
|
1013
|
+
* @memberof V1WebhooksUpdateRequest
|
|
1014
|
+
*/
|
|
1015
|
+
'url': string;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
export const V1WebhooksUpdateRequestEventsEnum = {
|
|
1019
|
+
MessageReceived: 'message.received'
|
|
1020
|
+
} as const;
|
|
1021
|
+
|
|
1022
|
+
export type V1WebhooksUpdateRequestEventsEnum = typeof V1WebhooksUpdateRequestEventsEnum[keyof typeof V1WebhooksUpdateRequestEventsEnum];
|
|
1023
|
+
export const V1WebhooksUpdateRequestStatusEnum = {
|
|
1024
|
+
Active: 'active',
|
|
1025
|
+
Paused: 'paused',
|
|
1026
|
+
Disabled: 'disabled'
|
|
1027
|
+
} as const;
|
|
1028
|
+
|
|
1029
|
+
export type V1WebhooksUpdateRequestStatusEnum = typeof V1WebhooksUpdateRequestStatusEnum[keyof typeof V1WebhooksUpdateRequestStatusEnum];
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Webhook configured for a managed mailbox.
|
|
1033
|
+
* @export
|
|
1034
|
+
* @interface V1WebhooksWebhook
|
|
1035
|
+
*/
|
|
1036
|
+
export interface V1WebhooksWebhook {
|
|
1037
|
+
/**
|
|
1038
|
+
* Unique webhook identifier (UUID v7).
|
|
1039
|
+
* @type {string}
|
|
1040
|
+
* @memberof V1WebhooksWebhook
|
|
1041
|
+
*/
|
|
1042
|
+
'id': string;
|
|
1043
|
+
/**
|
|
1044
|
+
* Resource ID of the mailbox this webhook is attached to.
|
|
1045
|
+
* @type {string}
|
|
1046
|
+
* @memberof V1WebhooksWebhook
|
|
1047
|
+
*/
|
|
1048
|
+
'accountResourceId': string;
|
|
1049
|
+
/**
|
|
1050
|
+
* Email address of the mailbox.
|
|
1051
|
+
* @type {string}
|
|
1052
|
+
* @memberof V1WebhooksWebhook
|
|
1053
|
+
*/
|
|
1054
|
+
'mailbox': string;
|
|
1055
|
+
/**
|
|
1056
|
+
*
|
|
1057
|
+
* @type {string}
|
|
1058
|
+
* @memberof V1WebhooksWebhook
|
|
1059
|
+
*/
|
|
1060
|
+
'name': string;
|
|
1061
|
+
/**
|
|
1062
|
+
*
|
|
1063
|
+
* @type {string}
|
|
1064
|
+
* @memberof V1WebhooksWebhook
|
|
1065
|
+
*/
|
|
1066
|
+
'description': string | null;
|
|
1067
|
+
/**
|
|
1068
|
+
*
|
|
1069
|
+
* @type {Array<string>}
|
|
1070
|
+
* @memberof V1WebhooksWebhook
|
|
1071
|
+
*/
|
|
1072
|
+
'events': Array<V1WebhooksWebhookEventsEnum>;
|
|
1073
|
+
/**
|
|
1074
|
+
*
|
|
1075
|
+
* @type {string}
|
|
1076
|
+
* @memberof V1WebhooksWebhook
|
|
1077
|
+
*/
|
|
1078
|
+
'status': V1WebhooksWebhookStatusEnum;
|
|
1079
|
+
/**
|
|
1080
|
+
*
|
|
1081
|
+
* @type {string}
|
|
1082
|
+
* @memberof V1WebhooksWebhook
|
|
1083
|
+
*/
|
|
1084
|
+
'url': string;
|
|
1085
|
+
/**
|
|
1086
|
+
*
|
|
1087
|
+
* @type {string}
|
|
1088
|
+
* @memberof V1WebhooksWebhook
|
|
1089
|
+
*/
|
|
1090
|
+
'createdAt': string;
|
|
1091
|
+
/**
|
|
1092
|
+
*
|
|
1093
|
+
* @type {string}
|
|
1094
|
+
* @memberof V1WebhooksWebhook
|
|
1095
|
+
*/
|
|
1096
|
+
'updatedAt': string;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
export const V1WebhooksWebhookEventsEnum = {
|
|
1100
|
+
MessageReceived: 'message.received'
|
|
1101
|
+
} as const;
|
|
1102
|
+
|
|
1103
|
+
export type V1WebhooksWebhookEventsEnum = typeof V1WebhooksWebhookEventsEnum[keyof typeof V1WebhooksWebhookEventsEnum];
|
|
1104
|
+
export const V1WebhooksWebhookStatusEnum = {
|
|
1105
|
+
Active: 'active',
|
|
1106
|
+
Paused: 'paused',
|
|
1107
|
+
Disabled: 'disabled'
|
|
1108
|
+
} as const;
|
|
1109
|
+
|
|
1110
|
+
export type V1WebhooksWebhookStatusEnum = typeof V1WebhooksWebhookStatusEnum[keyof typeof V1WebhooksWebhookStatusEnum];
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Webhook payload that includes the one-time `secret`. Returned at creation and after secret regeneration. The secret is delivered as a bearer token on every webhook request (`Authorization: Bearer <secret>`); store it securely as it is not returned again.
|
|
1114
|
+
* @export
|
|
1115
|
+
* @interface V1WebhooksWebhookWithSecret
|
|
1116
|
+
*/
|
|
1117
|
+
export interface V1WebhooksWebhookWithSecret {
|
|
1118
|
+
/**
|
|
1119
|
+
* Unique webhook identifier (UUID v7).
|
|
1120
|
+
* @type {string}
|
|
1121
|
+
* @memberof V1WebhooksWebhookWithSecret
|
|
1122
|
+
*/
|
|
1123
|
+
'id': string;
|
|
1124
|
+
/**
|
|
1125
|
+
* Resource ID of the mailbox this webhook is attached to.
|
|
1126
|
+
* @type {string}
|
|
1127
|
+
* @memberof V1WebhooksWebhookWithSecret
|
|
1128
|
+
*/
|
|
1129
|
+
'accountResourceId': string;
|
|
1130
|
+
/**
|
|
1131
|
+
* Email address of the mailbox.
|
|
1132
|
+
* @type {string}
|
|
1133
|
+
* @memberof V1WebhooksWebhookWithSecret
|
|
1134
|
+
*/
|
|
1135
|
+
'mailbox': string;
|
|
1136
|
+
/**
|
|
1137
|
+
*
|
|
1138
|
+
* @type {string}
|
|
1139
|
+
* @memberof V1WebhooksWebhookWithSecret
|
|
1140
|
+
*/
|
|
1141
|
+
'name': string;
|
|
1142
|
+
/**
|
|
1143
|
+
*
|
|
1144
|
+
* @type {string}
|
|
1145
|
+
* @memberof V1WebhooksWebhookWithSecret
|
|
1146
|
+
*/
|
|
1147
|
+
'description': string | null;
|
|
1148
|
+
/**
|
|
1149
|
+
*
|
|
1150
|
+
* @type {Array<string>}
|
|
1151
|
+
* @memberof V1WebhooksWebhookWithSecret
|
|
1152
|
+
*/
|
|
1153
|
+
'events': Array<V1WebhooksWebhookWithSecretEventsEnum>;
|
|
1154
|
+
/**
|
|
1155
|
+
*
|
|
1156
|
+
* @type {string}
|
|
1157
|
+
* @memberof V1WebhooksWebhookWithSecret
|
|
1158
|
+
*/
|
|
1159
|
+
'status': V1WebhooksWebhookWithSecretStatusEnum;
|
|
1160
|
+
/**
|
|
1161
|
+
*
|
|
1162
|
+
* @type {string}
|
|
1163
|
+
* @memberof V1WebhooksWebhookWithSecret
|
|
1164
|
+
*/
|
|
1165
|
+
'url': string;
|
|
1166
|
+
/**
|
|
1167
|
+
*
|
|
1168
|
+
* @type {string}
|
|
1169
|
+
* @memberof V1WebhooksWebhookWithSecret
|
|
1170
|
+
*/
|
|
1171
|
+
'createdAt': string;
|
|
1172
|
+
/**
|
|
1173
|
+
*
|
|
1174
|
+
* @type {string}
|
|
1175
|
+
* @memberof V1WebhooksWebhookWithSecret
|
|
1176
|
+
*/
|
|
1177
|
+
'updatedAt': string;
|
|
1178
|
+
/**
|
|
1179
|
+
*
|
|
1180
|
+
* @type {string}
|
|
1181
|
+
* @memberof V1WebhooksWebhookWithSecret
|
|
1182
|
+
*/
|
|
1183
|
+
'secret': string;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
export const V1WebhooksWebhookWithSecretEventsEnum = {
|
|
1187
|
+
MessageReceived: 'message.received'
|
|
1188
|
+
} as const;
|
|
1189
|
+
|
|
1190
|
+
export type V1WebhooksWebhookWithSecretEventsEnum = typeof V1WebhooksWebhookWithSecretEventsEnum[keyof typeof V1WebhooksWebhookWithSecretEventsEnum];
|
|
1191
|
+
export const V1WebhooksWebhookWithSecretStatusEnum = {
|
|
1192
|
+
Active: 'active',
|
|
1193
|
+
Paused: 'paused',
|
|
1194
|
+
Disabled: 'disabled'
|
|
1195
|
+
} as const;
|
|
1196
|
+
|
|
1197
|
+
export type V1WebhooksWebhookWithSecretStatusEnum = typeof V1WebhooksWebhookWithSecretStatusEnum[keyof typeof V1WebhooksWebhookWithSecretStatusEnum];
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* AccountApi - axios parameter creator
|
|
1202
|
+
* @export
|
|
1203
|
+
*/
|
|
1204
|
+
export const AccountApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1205
|
+
return {
|
|
1206
|
+
/**
|
|
1207
|
+
* Returns the authenticated account and the mailboxes it can manage.
|
|
1208
|
+
* @summary Get the authenticated account
|
|
1209
|
+
* @param {*} [options] Override http request option.
|
|
1210
|
+
* @throws {RequiredError}
|
|
1211
|
+
*/
|
|
1212
|
+
getCurrentAccount: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1213
|
+
const localVarPath = `/api/v1/me`;
|
|
1214
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1215
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1216
|
+
let baseOptions;
|
|
1217
|
+
if (configuration) {
|
|
1218
|
+
baseOptions = configuration.baseOptions;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1222
|
+
const localVarHeaderParameter = {} as any;
|
|
1223
|
+
const localVarQueryParameter = {} as any;
|
|
1224
|
+
|
|
1225
|
+
// authentication BearerAuth required
|
|
1226
|
+
// http bearer authentication required
|
|
1227
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1232
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1233
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1234
|
+
|
|
1235
|
+
return {
|
|
1236
|
+
url: toPathString(localVarUrlObj),
|
|
1237
|
+
options: localVarRequestOptions,
|
|
1238
|
+
};
|
|
1239
|
+
},
|
|
1240
|
+
}
|
|
1241
|
+
};
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* AccountApi - functional programming interface
|
|
1245
|
+
* @export
|
|
1246
|
+
*/
|
|
1247
|
+
export const AccountApiFp = function(configuration?: Configuration) {
|
|
1248
|
+
const localVarAxiosParamCreator = AccountApiAxiosParamCreator(configuration)
|
|
1249
|
+
return {
|
|
1250
|
+
/**
|
|
1251
|
+
* Returns the authenticated account and the mailboxes it can manage.
|
|
1252
|
+
* @summary Get the authenticated account
|
|
1253
|
+
* @param {*} [options] Override http request option.
|
|
1254
|
+
* @throws {RequiredError}
|
|
1255
|
+
*/
|
|
1256
|
+
async getCurrentAccount(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1MeResource>> {
|
|
1257
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getCurrentAccount(options);
|
|
1258
|
+
const localVarOperationServerBasePath = operationServerMap['AccountApi.getCurrentAccount']?.[0]?.url;
|
|
1259
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1260
|
+
},
|
|
1261
|
+
}
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
/**
|
|
1265
|
+
* AccountApi - factory interface
|
|
1266
|
+
* @export
|
|
1267
|
+
*/
|
|
1268
|
+
export const AccountApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
1269
|
+
const localVarFp = AccountApiFp(configuration)
|
|
1270
|
+
return {
|
|
1271
|
+
/**
|
|
1272
|
+
* Returns the authenticated account and the mailboxes it can manage.
|
|
1273
|
+
* @summary Get the authenticated account
|
|
1274
|
+
* @param {*} [options] Override http request option.
|
|
1275
|
+
* @throws {RequiredError}
|
|
1276
|
+
*/
|
|
1277
|
+
getCurrentAccount(options?: RawAxiosRequestConfig): AxiosPromise<V1MeResource> {
|
|
1278
|
+
return localVarFp.getCurrentAccount(options).then((request) => request(axios, basePath));
|
|
1279
|
+
},
|
|
1280
|
+
};
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* AccountApi - object-oriented interface
|
|
1285
|
+
* @export
|
|
1286
|
+
* @class AccountApi
|
|
1287
|
+
* @extends {BaseAPI}
|
|
1288
|
+
*/
|
|
1289
|
+
export class AccountApi extends BaseAPI {
|
|
1290
|
+
/**
|
|
1291
|
+
* Returns the authenticated account and the mailboxes it can manage.
|
|
1292
|
+
* @summary Get the authenticated account
|
|
1293
|
+
* @param {*} [options] Override http request option.
|
|
1294
|
+
* @throws {RequiredError}
|
|
1295
|
+
* @memberof AccountApi
|
|
1296
|
+
*/
|
|
1297
|
+
public getCurrentAccount(options?: RawAxiosRequestConfig) {
|
|
1298
|
+
return AccountApiFp(this.configuration).getCurrentAccount(options).then((request) => request(this.axios, this.basePath));
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
/**
|
|
1305
|
+
* FoldersApi - axios parameter creator
|
|
1306
|
+
* @export
|
|
1307
|
+
*/
|
|
1308
|
+
export const FoldersApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1309
|
+
return {
|
|
1310
|
+
/**
|
|
1311
|
+
* Create a new folder in the managed mailbox.
|
|
1312
|
+
* @summary Create folder
|
|
1313
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1314
|
+
* @param {V1FoldersCreateRequest} v1FoldersCreateRequest
|
|
1315
|
+
* @param {*} [options] Override http request option.
|
|
1316
|
+
* @throws {RequiredError}
|
|
1317
|
+
*/
|
|
1318
|
+
createFolder: async (mailboxResourceId: string, v1FoldersCreateRequest: V1FoldersCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1319
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1320
|
+
assertParamExists('createFolder', 'mailboxResourceId', mailboxResourceId)
|
|
1321
|
+
// verify required parameter 'v1FoldersCreateRequest' is not null or undefined
|
|
1322
|
+
assertParamExists('createFolder', 'v1FoldersCreateRequest', v1FoldersCreateRequest)
|
|
1323
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders`
|
|
1324
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
1325
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1326
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1327
|
+
let baseOptions;
|
|
1328
|
+
if (configuration) {
|
|
1329
|
+
baseOptions = configuration.baseOptions;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
1333
|
+
const localVarHeaderParameter = {} as any;
|
|
1334
|
+
const localVarQueryParameter = {} as any;
|
|
1335
|
+
|
|
1336
|
+
// authentication BearerAuth required
|
|
1337
|
+
// http bearer authentication required
|
|
1338
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1343
|
+
|
|
1344
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1345
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1346
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1347
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1FoldersCreateRequest, localVarRequestOptions, configuration)
|
|
1348
|
+
|
|
1349
|
+
return {
|
|
1350
|
+
url: toPathString(localVarUrlObj),
|
|
1351
|
+
options: localVarRequestOptions,
|
|
1352
|
+
};
|
|
1353
|
+
},
|
|
1354
|
+
/**
|
|
1355
|
+
* Delete a folder and all of its subfolders.
|
|
1356
|
+
* @summary Delete folder
|
|
1357
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1358
|
+
* @param {string} folder Folder path to delete (URL-encoded).
|
|
1359
|
+
* @param {*} [options] Override http request option.
|
|
1360
|
+
* @throws {RequiredError}
|
|
1361
|
+
*/
|
|
1362
|
+
deleteFolder: async (mailboxResourceId: string, folder: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1363
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1364
|
+
assertParamExists('deleteFolder', 'mailboxResourceId', mailboxResourceId)
|
|
1365
|
+
// verify required parameter 'folder' is not null or undefined
|
|
1366
|
+
assertParamExists('deleteFolder', 'folder', folder)
|
|
1367
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}`
|
|
1368
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1369
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
1370
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1371
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1372
|
+
let baseOptions;
|
|
1373
|
+
if (configuration) {
|
|
1374
|
+
baseOptions = configuration.baseOptions;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
1378
|
+
const localVarHeaderParameter = {} as any;
|
|
1379
|
+
const localVarQueryParameter = {} as any;
|
|
1380
|
+
|
|
1381
|
+
// authentication BearerAuth required
|
|
1382
|
+
// http bearer authentication required
|
|
1383
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1388
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1389
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1390
|
+
|
|
1391
|
+
return {
|
|
1392
|
+
url: toPathString(localVarUrlObj),
|
|
1393
|
+
options: localVarRequestOptions,
|
|
1394
|
+
};
|
|
1395
|
+
},
|
|
1396
|
+
/**
|
|
1397
|
+
* Retrieve a paginated list of folders in the managed mailbox.
|
|
1398
|
+
* @summary List folders
|
|
1399
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1400
|
+
* @param {number} [page] Page number (1-based).
|
|
1401
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
1402
|
+
* @param {*} [options] Override http request option.
|
|
1403
|
+
* @throws {RequiredError}
|
|
1404
|
+
*/
|
|
1405
|
+
listFolders: async (mailboxResourceId: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1406
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1407
|
+
assertParamExists('listFolders', 'mailboxResourceId', mailboxResourceId)
|
|
1408
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders`
|
|
1409
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
1410
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1411
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1412
|
+
let baseOptions;
|
|
1413
|
+
if (configuration) {
|
|
1414
|
+
baseOptions = configuration.baseOptions;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1418
|
+
const localVarHeaderParameter = {} as any;
|
|
1419
|
+
const localVarQueryParameter = {} as any;
|
|
1420
|
+
|
|
1421
|
+
// authentication BearerAuth required
|
|
1422
|
+
// http bearer authentication required
|
|
1423
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1424
|
+
|
|
1425
|
+
if (page !== undefined) {
|
|
1426
|
+
localVarQueryParameter['page'] = page;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
if (perPage !== undefined) {
|
|
1430
|
+
localVarQueryParameter['perPage'] = perPage;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1436
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1437
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1438
|
+
|
|
1439
|
+
return {
|
|
1440
|
+
url: toPathString(localVarUrlObj),
|
|
1441
|
+
options: localVarRequestOptions,
|
|
1442
|
+
};
|
|
1443
|
+
},
|
|
1444
|
+
/**
|
|
1445
|
+
* Rename an existing folder.
|
|
1446
|
+
* @summary Update folder
|
|
1447
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1448
|
+
* @param {string} folder Current folder path (URL-encoded).
|
|
1449
|
+
* @param {V1FoldersUpdateRequest} v1FoldersUpdateRequest
|
|
1450
|
+
* @param {*} [options] Override http request option.
|
|
1451
|
+
* @throws {RequiredError}
|
|
1452
|
+
*/
|
|
1453
|
+
updateFolder: async (mailboxResourceId: string, folder: string, v1FoldersUpdateRequest: V1FoldersUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1454
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1455
|
+
assertParamExists('updateFolder', 'mailboxResourceId', mailboxResourceId)
|
|
1456
|
+
// verify required parameter 'folder' is not null or undefined
|
|
1457
|
+
assertParamExists('updateFolder', 'folder', folder)
|
|
1458
|
+
// verify required parameter 'v1FoldersUpdateRequest' is not null or undefined
|
|
1459
|
+
assertParamExists('updateFolder', 'v1FoldersUpdateRequest', v1FoldersUpdateRequest)
|
|
1460
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}`
|
|
1461
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1462
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
1463
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1464
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1465
|
+
let baseOptions;
|
|
1466
|
+
if (configuration) {
|
|
1467
|
+
baseOptions = configuration.baseOptions;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
1471
|
+
const localVarHeaderParameter = {} as any;
|
|
1472
|
+
const localVarQueryParameter = {} as any;
|
|
1473
|
+
|
|
1474
|
+
// authentication BearerAuth required
|
|
1475
|
+
// http bearer authentication required
|
|
1476
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1481
|
+
|
|
1482
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1483
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1484
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1485
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1FoldersUpdateRequest, localVarRequestOptions, configuration)
|
|
1486
|
+
|
|
1487
|
+
return {
|
|
1488
|
+
url: toPathString(localVarUrlObj),
|
|
1489
|
+
options: localVarRequestOptions,
|
|
1490
|
+
};
|
|
1491
|
+
},
|
|
1492
|
+
}
|
|
1493
|
+
};
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* FoldersApi - functional programming interface
|
|
1497
|
+
* @export
|
|
1498
|
+
*/
|
|
1499
|
+
export const FoldersApiFp = function(configuration?: Configuration) {
|
|
1500
|
+
const localVarAxiosParamCreator = FoldersApiAxiosParamCreator(configuration)
|
|
1501
|
+
return {
|
|
1502
|
+
/**
|
|
1503
|
+
* Create a new folder in the managed mailbox.
|
|
1504
|
+
* @summary Create folder
|
|
1505
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1506
|
+
* @param {V1FoldersCreateRequest} v1FoldersCreateRequest
|
|
1507
|
+
* @param {*} [options] Override http request option.
|
|
1508
|
+
* @throws {RequiredError}
|
|
1509
|
+
*/
|
|
1510
|
+
async createFolder(mailboxResourceId: string, v1FoldersCreateRequest: V1FoldersCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1FoldersResource>> {
|
|
1511
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createFolder(mailboxResourceId, v1FoldersCreateRequest, options);
|
|
1512
|
+
const localVarOperationServerBasePath = operationServerMap['FoldersApi.createFolder']?.[0]?.url;
|
|
1513
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1514
|
+
},
|
|
1515
|
+
/**
|
|
1516
|
+
* Delete a folder and all of its subfolders.
|
|
1517
|
+
* @summary Delete folder
|
|
1518
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1519
|
+
* @param {string} folder Folder path to delete (URL-encoded).
|
|
1520
|
+
* @param {*} [options] Override http request option.
|
|
1521
|
+
* @throws {RequiredError}
|
|
1522
|
+
*/
|
|
1523
|
+
async deleteFolder(mailboxResourceId: string, folder: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
1524
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFolder(mailboxResourceId, folder, options);
|
|
1525
|
+
const localVarOperationServerBasePath = operationServerMap['FoldersApi.deleteFolder']?.[0]?.url;
|
|
1526
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1527
|
+
},
|
|
1528
|
+
/**
|
|
1529
|
+
* Retrieve a paginated list of folders in the managed mailbox.
|
|
1530
|
+
* @summary List folders
|
|
1531
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1532
|
+
* @param {number} [page] Page number (1-based).
|
|
1533
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
1534
|
+
* @param {*} [options] Override http request option.
|
|
1535
|
+
* @throws {RequiredError}
|
|
1536
|
+
*/
|
|
1537
|
+
async listFolders(mailboxResourceId: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1FoldersCollection>> {
|
|
1538
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFolders(mailboxResourceId, page, perPage, options);
|
|
1539
|
+
const localVarOperationServerBasePath = operationServerMap['FoldersApi.listFolders']?.[0]?.url;
|
|
1540
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1541
|
+
},
|
|
1542
|
+
/**
|
|
1543
|
+
* Rename an existing folder.
|
|
1544
|
+
* @summary Update folder
|
|
1545
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1546
|
+
* @param {string} folder Current folder path (URL-encoded).
|
|
1547
|
+
* @param {V1FoldersUpdateRequest} v1FoldersUpdateRequest
|
|
1548
|
+
* @param {*} [options] Override http request option.
|
|
1549
|
+
* @throws {RequiredError}
|
|
1550
|
+
*/
|
|
1551
|
+
async updateFolder(mailboxResourceId: string, folder: string, v1FoldersUpdateRequest: V1FoldersUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1FoldersResource>> {
|
|
1552
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateFolder(mailboxResourceId, folder, v1FoldersUpdateRequest, options);
|
|
1553
|
+
const localVarOperationServerBasePath = operationServerMap['FoldersApi.updateFolder']?.[0]?.url;
|
|
1554
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1555
|
+
},
|
|
1556
|
+
}
|
|
1557
|
+
};
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* FoldersApi - factory interface
|
|
1561
|
+
* @export
|
|
1562
|
+
*/
|
|
1563
|
+
export const FoldersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
1564
|
+
const localVarFp = FoldersApiFp(configuration)
|
|
1565
|
+
return {
|
|
1566
|
+
/**
|
|
1567
|
+
* Create a new folder in the managed mailbox.
|
|
1568
|
+
* @summary Create folder
|
|
1569
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1570
|
+
* @param {V1FoldersCreateRequest} v1FoldersCreateRequest
|
|
1571
|
+
* @param {*} [options] Override http request option.
|
|
1572
|
+
* @throws {RequiredError}
|
|
1573
|
+
*/
|
|
1574
|
+
createFolder(mailboxResourceId: string, v1FoldersCreateRequest: V1FoldersCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<V1FoldersResource> {
|
|
1575
|
+
return localVarFp.createFolder(mailboxResourceId, v1FoldersCreateRequest, options).then((request) => request(axios, basePath));
|
|
1576
|
+
},
|
|
1577
|
+
/**
|
|
1578
|
+
* Delete a folder and all of its subfolders.
|
|
1579
|
+
* @summary Delete folder
|
|
1580
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1581
|
+
* @param {string} folder Folder path to delete (URL-encoded).
|
|
1582
|
+
* @param {*} [options] Override http request option.
|
|
1583
|
+
* @throws {RequiredError}
|
|
1584
|
+
*/
|
|
1585
|
+
deleteFolder(mailboxResourceId: string, folder: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
1586
|
+
return localVarFp.deleteFolder(mailboxResourceId, folder, options).then((request) => request(axios, basePath));
|
|
1587
|
+
},
|
|
1588
|
+
/**
|
|
1589
|
+
* Retrieve a paginated list of folders in the managed mailbox.
|
|
1590
|
+
* @summary List folders
|
|
1591
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1592
|
+
* @param {number} [page] Page number (1-based).
|
|
1593
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
1594
|
+
* @param {*} [options] Override http request option.
|
|
1595
|
+
* @throws {RequiredError}
|
|
1596
|
+
*/
|
|
1597
|
+
listFolders(mailboxResourceId: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<V1FoldersCollection> {
|
|
1598
|
+
return localVarFp.listFolders(mailboxResourceId, page, perPage, options).then((request) => request(axios, basePath));
|
|
1599
|
+
},
|
|
1600
|
+
/**
|
|
1601
|
+
* Rename an existing folder.
|
|
1602
|
+
* @summary Update folder
|
|
1603
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1604
|
+
* @param {string} folder Current folder path (URL-encoded).
|
|
1605
|
+
* @param {V1FoldersUpdateRequest} v1FoldersUpdateRequest
|
|
1606
|
+
* @param {*} [options] Override http request option.
|
|
1607
|
+
* @throws {RequiredError}
|
|
1608
|
+
*/
|
|
1609
|
+
updateFolder(mailboxResourceId: string, folder: string, v1FoldersUpdateRequest: V1FoldersUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<V1FoldersResource> {
|
|
1610
|
+
return localVarFp.updateFolder(mailboxResourceId, folder, v1FoldersUpdateRequest, options).then((request) => request(axios, basePath));
|
|
1611
|
+
},
|
|
1612
|
+
};
|
|
1613
|
+
};
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* FoldersApi - object-oriented interface
|
|
1617
|
+
* @export
|
|
1618
|
+
* @class FoldersApi
|
|
1619
|
+
* @extends {BaseAPI}
|
|
1620
|
+
*/
|
|
1621
|
+
export class FoldersApi extends BaseAPI {
|
|
1622
|
+
/**
|
|
1623
|
+
* Create a new folder in the managed mailbox.
|
|
1624
|
+
* @summary Create folder
|
|
1625
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1626
|
+
* @param {V1FoldersCreateRequest} v1FoldersCreateRequest
|
|
1627
|
+
* @param {*} [options] Override http request option.
|
|
1628
|
+
* @throws {RequiredError}
|
|
1629
|
+
* @memberof FoldersApi
|
|
1630
|
+
*/
|
|
1631
|
+
public createFolder(mailboxResourceId: string, v1FoldersCreateRequest: V1FoldersCreateRequest, options?: RawAxiosRequestConfig) {
|
|
1632
|
+
return FoldersApiFp(this.configuration).createFolder(mailboxResourceId, v1FoldersCreateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
/**
|
|
1636
|
+
* Delete a folder and all of its subfolders.
|
|
1637
|
+
* @summary Delete folder
|
|
1638
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1639
|
+
* @param {string} folder Folder path to delete (URL-encoded).
|
|
1640
|
+
* @param {*} [options] Override http request option.
|
|
1641
|
+
* @throws {RequiredError}
|
|
1642
|
+
* @memberof FoldersApi
|
|
1643
|
+
*/
|
|
1644
|
+
public deleteFolder(mailboxResourceId: string, folder: string, options?: RawAxiosRequestConfig) {
|
|
1645
|
+
return FoldersApiFp(this.configuration).deleteFolder(mailboxResourceId, folder, options).then((request) => request(this.axios, this.basePath));
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
/**
|
|
1649
|
+
* Retrieve a paginated list of folders in the managed mailbox.
|
|
1650
|
+
* @summary List folders
|
|
1651
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1652
|
+
* @param {number} [page] Page number (1-based).
|
|
1653
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
1654
|
+
* @param {*} [options] Override http request option.
|
|
1655
|
+
* @throws {RequiredError}
|
|
1656
|
+
* @memberof FoldersApi
|
|
1657
|
+
*/
|
|
1658
|
+
public listFolders(mailboxResourceId: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
|
|
1659
|
+
return FoldersApiFp(this.configuration).listFolders(mailboxResourceId, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
/**
|
|
1663
|
+
* Rename an existing folder.
|
|
1664
|
+
* @summary Update folder
|
|
1665
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1666
|
+
* @param {string} folder Current folder path (URL-encoded).
|
|
1667
|
+
* @param {V1FoldersUpdateRequest} v1FoldersUpdateRequest
|
|
1668
|
+
* @param {*} [options] Override http request option.
|
|
1669
|
+
* @throws {RequiredError}
|
|
1670
|
+
* @memberof FoldersApi
|
|
1671
|
+
*/
|
|
1672
|
+
public updateFolder(mailboxResourceId: string, folder: string, v1FoldersUpdateRequest: V1FoldersUpdateRequest, options?: RawAxiosRequestConfig) {
|
|
1673
|
+
return FoldersApiFp(this.configuration).updateFolder(mailboxResourceId, folder, v1FoldersUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
/**
|
|
1680
|
+
* MessagesApi - axios parameter creator
|
|
1681
|
+
* @export
|
|
1682
|
+
*/
|
|
1683
|
+
export const MessagesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1684
|
+
return {
|
|
1685
|
+
/**
|
|
1686
|
+
* Permanently delete every message in a folder (empty the folder).
|
|
1687
|
+
* @summary Delete all messages
|
|
1688
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1689
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1690
|
+
* @param {*} [options] Override http request option.
|
|
1691
|
+
* @throws {RequiredError}
|
|
1692
|
+
*/
|
|
1693
|
+
deleteAllMessages: async (mailboxResourceId: string, folder: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1694
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1695
|
+
assertParamExists('deleteAllMessages', 'mailboxResourceId', mailboxResourceId)
|
|
1696
|
+
// verify required parameter 'folder' is not null or undefined
|
|
1697
|
+
assertParamExists('deleteAllMessages', 'folder', folder)
|
|
1698
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages`
|
|
1699
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1700
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
1701
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1702
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1703
|
+
let baseOptions;
|
|
1704
|
+
if (configuration) {
|
|
1705
|
+
baseOptions = configuration.baseOptions;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
1709
|
+
const localVarHeaderParameter = {} as any;
|
|
1710
|
+
const localVarQueryParameter = {} as any;
|
|
1711
|
+
|
|
1712
|
+
// authentication BearerAuth required
|
|
1713
|
+
// http bearer authentication required
|
|
1714
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1719
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1720
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1721
|
+
|
|
1722
|
+
return {
|
|
1723
|
+
url: toPathString(localVarUrlObj),
|
|
1724
|
+
options: localVarRequestOptions,
|
|
1725
|
+
};
|
|
1726
|
+
},
|
|
1727
|
+
/**
|
|
1728
|
+
* Permanently delete a single message.
|
|
1729
|
+
* @summary Delete message
|
|
1730
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1731
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1732
|
+
* @param {number} uid Message UID.
|
|
1733
|
+
* @param {*} [options] Override http request option.
|
|
1734
|
+
* @throws {RequiredError}
|
|
1735
|
+
*/
|
|
1736
|
+
deleteMessage: async (mailboxResourceId: string, folder: string, uid: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1737
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1738
|
+
assertParamExists('deleteMessage', 'mailboxResourceId', mailboxResourceId)
|
|
1739
|
+
// verify required parameter 'folder' is not null or undefined
|
|
1740
|
+
assertParamExists('deleteMessage', 'folder', folder)
|
|
1741
|
+
// verify required parameter 'uid' is not null or undefined
|
|
1742
|
+
assertParamExists('deleteMessage', 'uid', uid)
|
|
1743
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
|
|
1744
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1745
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
1746
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
1747
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1748
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1749
|
+
let baseOptions;
|
|
1750
|
+
if (configuration) {
|
|
1751
|
+
baseOptions = configuration.baseOptions;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
1755
|
+
const localVarHeaderParameter = {} as any;
|
|
1756
|
+
const localVarQueryParameter = {} as any;
|
|
1757
|
+
|
|
1758
|
+
// authentication BearerAuth required
|
|
1759
|
+
// http bearer authentication required
|
|
1760
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
|
|
1764
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1765
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1766
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1767
|
+
|
|
1768
|
+
return {
|
|
1769
|
+
url: toPathString(localVarUrlObj),
|
|
1770
|
+
options: localVarRequestOptions,
|
|
1771
|
+
};
|
|
1772
|
+
},
|
|
1773
|
+
/**
|
|
1774
|
+
* Permanently delete multiple messages from a folder.
|
|
1775
|
+
* @summary Delete messages
|
|
1776
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1777
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1778
|
+
* @param {V1FolderMessagesDeleteBulkRequest} v1FolderMessagesDeleteBulkRequest
|
|
1779
|
+
* @param {*} [options] Override http request option.
|
|
1780
|
+
* @throws {RequiredError}
|
|
1781
|
+
*/
|
|
1782
|
+
deleteMessages: async (mailboxResourceId: string, folder: string, v1FolderMessagesDeleteBulkRequest: V1FolderMessagesDeleteBulkRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1783
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1784
|
+
assertParamExists('deleteMessages', 'mailboxResourceId', mailboxResourceId)
|
|
1785
|
+
// verify required parameter 'folder' is not null or undefined
|
|
1786
|
+
assertParamExists('deleteMessages', 'folder', folder)
|
|
1787
|
+
// verify required parameter 'v1FolderMessagesDeleteBulkRequest' is not null or undefined
|
|
1788
|
+
assertParamExists('deleteMessages', 'v1FolderMessagesDeleteBulkRequest', v1FolderMessagesDeleteBulkRequest)
|
|
1789
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/delete`
|
|
1790
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1791
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
1792
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1793
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1794
|
+
let baseOptions;
|
|
1795
|
+
if (configuration) {
|
|
1796
|
+
baseOptions = configuration.baseOptions;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
1800
|
+
const localVarHeaderParameter = {} as any;
|
|
1801
|
+
const localVarQueryParameter = {} as any;
|
|
1802
|
+
|
|
1803
|
+
// authentication BearerAuth required
|
|
1804
|
+
// http bearer authentication required
|
|
1805
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
|
|
1809
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1810
|
+
|
|
1811
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1812
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1813
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1814
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1FolderMessagesDeleteBulkRequest, localVarRequestOptions, configuration)
|
|
1815
|
+
|
|
1816
|
+
return {
|
|
1817
|
+
url: toPathString(localVarUrlObj),
|
|
1818
|
+
options: localVarRequestOptions,
|
|
1819
|
+
};
|
|
1820
|
+
},
|
|
1821
|
+
/**
|
|
1822
|
+
* Retrieve a single message by UID.
|
|
1823
|
+
* @summary Get message
|
|
1824
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1825
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1826
|
+
* @param {number} uid Message UID.
|
|
1827
|
+
* @param {*} [options] Override http request option.
|
|
1828
|
+
* @throws {RequiredError}
|
|
1829
|
+
*/
|
|
1830
|
+
getMessage: async (mailboxResourceId: string, folder: string, uid: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1831
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1832
|
+
assertParamExists('getMessage', 'mailboxResourceId', mailboxResourceId)
|
|
1833
|
+
// verify required parameter 'folder' is not null or undefined
|
|
1834
|
+
assertParamExists('getMessage', 'folder', folder)
|
|
1835
|
+
// verify required parameter 'uid' is not null or undefined
|
|
1836
|
+
assertParamExists('getMessage', 'uid', uid)
|
|
1837
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
|
|
1838
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1839
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
1840
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
1841
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1842
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1843
|
+
let baseOptions;
|
|
1844
|
+
if (configuration) {
|
|
1845
|
+
baseOptions = configuration.baseOptions;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1849
|
+
const localVarHeaderParameter = {} as any;
|
|
1850
|
+
const localVarQueryParameter = {} as any;
|
|
1851
|
+
|
|
1852
|
+
// authentication BearerAuth required
|
|
1853
|
+
// http bearer authentication required
|
|
1854
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1855
|
+
|
|
1856
|
+
|
|
1857
|
+
|
|
1858
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1859
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1860
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1861
|
+
|
|
1862
|
+
return {
|
|
1863
|
+
url: toPathString(localVarUrlObj),
|
|
1864
|
+
options: localVarRequestOptions,
|
|
1865
|
+
};
|
|
1866
|
+
},
|
|
1867
|
+
/**
|
|
1868
|
+
* Download a message attachment as `application/octet-stream`.
|
|
1869
|
+
* @summary Download message attachment
|
|
1870
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1871
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1872
|
+
* @param {number} uid Message UID.
|
|
1873
|
+
* @param {string} attachmentId Attachment ID (opaque, returned by GET message).
|
|
1874
|
+
* @param {*} [options] Override http request option.
|
|
1875
|
+
* @throws {RequiredError}
|
|
1876
|
+
*/
|
|
1877
|
+
getMessageAttachment: async (mailboxResourceId: string, folder: string, uid: number, attachmentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1878
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1879
|
+
assertParamExists('getMessageAttachment', 'mailboxResourceId', mailboxResourceId)
|
|
1880
|
+
// verify required parameter 'folder' is not null or undefined
|
|
1881
|
+
assertParamExists('getMessageAttachment', 'folder', folder)
|
|
1882
|
+
// verify required parameter 'uid' is not null or undefined
|
|
1883
|
+
assertParamExists('getMessageAttachment', 'uid', uid)
|
|
1884
|
+
// verify required parameter 'attachmentId' is not null or undefined
|
|
1885
|
+
assertParamExists('getMessageAttachment', 'attachmentId', attachmentId)
|
|
1886
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/attachments/{attachmentId}`
|
|
1887
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1888
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
1889
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)))
|
|
1890
|
+
.replace(`{${"attachmentId"}}`, encodeURIComponent(String(attachmentId)));
|
|
1891
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1892
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1893
|
+
let baseOptions;
|
|
1894
|
+
if (configuration) {
|
|
1895
|
+
baseOptions = configuration.baseOptions;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1899
|
+
const localVarHeaderParameter = {} as any;
|
|
1900
|
+
const localVarQueryParameter = {} as any;
|
|
1901
|
+
|
|
1902
|
+
// authentication BearerAuth required
|
|
1903
|
+
// http bearer authentication required
|
|
1904
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1905
|
+
|
|
1906
|
+
|
|
1907
|
+
|
|
1908
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1909
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1910
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1911
|
+
|
|
1912
|
+
return {
|
|
1913
|
+
url: toPathString(localVarUrlObj),
|
|
1914
|
+
options: localVarRequestOptions,
|
|
1915
|
+
};
|
|
1916
|
+
},
|
|
1917
|
+
/**
|
|
1918
|
+
* Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
|
|
1919
|
+
* @summary Get message source
|
|
1920
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1921
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1922
|
+
* @param {number} uid Message UID.
|
|
1923
|
+
* @param {*} [options] Override http request option.
|
|
1924
|
+
* @throws {RequiredError}
|
|
1925
|
+
*/
|
|
1926
|
+
getMessageSource: async (mailboxResourceId: string, folder: string, uid: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1927
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1928
|
+
assertParamExists('getMessageSource', 'mailboxResourceId', mailboxResourceId)
|
|
1929
|
+
// verify required parameter 'folder' is not null or undefined
|
|
1930
|
+
assertParamExists('getMessageSource', 'folder', folder)
|
|
1931
|
+
// verify required parameter 'uid' is not null or undefined
|
|
1932
|
+
assertParamExists('getMessageSource', 'uid', uid)
|
|
1933
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/source`
|
|
1934
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1935
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
1936
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
1937
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1938
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1939
|
+
let baseOptions;
|
|
1940
|
+
if (configuration) {
|
|
1941
|
+
baseOptions = configuration.baseOptions;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1945
|
+
const localVarHeaderParameter = {} as any;
|
|
1946
|
+
const localVarQueryParameter = {} as any;
|
|
1947
|
+
|
|
1948
|
+
// authentication BearerAuth required
|
|
1949
|
+
// http bearer authentication required
|
|
1950
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1951
|
+
|
|
1952
|
+
|
|
1953
|
+
|
|
1954
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1955
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1956
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1957
|
+
|
|
1958
|
+
return {
|
|
1959
|
+
url: toPathString(localVarUrlObj),
|
|
1960
|
+
options: localVarRequestOptions,
|
|
1961
|
+
};
|
|
1962
|
+
},
|
|
1963
|
+
/**
|
|
1964
|
+
* Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
|
|
1965
|
+
* @summary Get message text content
|
|
1966
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
1967
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
1968
|
+
* @param {number} uid Message UID.
|
|
1969
|
+
* @param {*} [options] Override http request option.
|
|
1970
|
+
* @throws {RequiredError}
|
|
1971
|
+
*/
|
|
1972
|
+
getMessageText: async (mailboxResourceId: string, folder: string, uid: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1973
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1974
|
+
assertParamExists('getMessageText', 'mailboxResourceId', mailboxResourceId)
|
|
1975
|
+
// verify required parameter 'folder' is not null or undefined
|
|
1976
|
+
assertParamExists('getMessageText', 'folder', folder)
|
|
1977
|
+
// verify required parameter 'uid' is not null or undefined
|
|
1978
|
+
assertParamExists('getMessageText', 'uid', uid)
|
|
1979
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/text`
|
|
1980
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
1981
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
1982
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
1983
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1984
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1985
|
+
let baseOptions;
|
|
1986
|
+
if (configuration) {
|
|
1987
|
+
baseOptions = configuration.baseOptions;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1991
|
+
const localVarHeaderParameter = {} as any;
|
|
1992
|
+
const localVarQueryParameter = {} as any;
|
|
1993
|
+
|
|
1994
|
+
// authentication BearerAuth required
|
|
1995
|
+
// http bearer authentication required
|
|
1996
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1997
|
+
|
|
1998
|
+
|
|
1999
|
+
|
|
2000
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2001
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2002
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2003
|
+
|
|
2004
|
+
return {
|
|
2005
|
+
url: toPathString(localVarUrlObj),
|
|
2006
|
+
options: localVarRequestOptions,
|
|
2007
|
+
};
|
|
2008
|
+
},
|
|
2009
|
+
/**
|
|
2010
|
+
* List messages in a folder. Use POST /search for filtering. Sort fields: uid, date, size (prefix with `-` for descending). Default `-uid`.
|
|
2011
|
+
* @summary List messages
|
|
2012
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2013
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2014
|
+
* @param {number} [page] Page number (1-based).
|
|
2015
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
2016
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
2017
|
+
* @param {*} [options] Override http request option.
|
|
2018
|
+
* @throws {RequiredError}
|
|
2019
|
+
*/
|
|
2020
|
+
listMessages: async (mailboxResourceId: string, folder: string, page?: number, perPage?: number, sort?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2021
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
2022
|
+
assertParamExists('listMessages', 'mailboxResourceId', mailboxResourceId)
|
|
2023
|
+
// verify required parameter 'folder' is not null or undefined
|
|
2024
|
+
assertParamExists('listMessages', 'folder', folder)
|
|
2025
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages`
|
|
2026
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
2027
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
2028
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2029
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2030
|
+
let baseOptions;
|
|
2031
|
+
if (configuration) {
|
|
2032
|
+
baseOptions = configuration.baseOptions;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
2036
|
+
const localVarHeaderParameter = {} as any;
|
|
2037
|
+
const localVarQueryParameter = {} as any;
|
|
2038
|
+
|
|
2039
|
+
// authentication BearerAuth required
|
|
2040
|
+
// http bearer authentication required
|
|
2041
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2042
|
+
|
|
2043
|
+
if (page !== undefined) {
|
|
2044
|
+
localVarQueryParameter['page'] = page;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
if (perPage !== undefined) {
|
|
2048
|
+
localVarQueryParameter['perPage'] = perPage;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
if (sort !== undefined) {
|
|
2052
|
+
localVarQueryParameter['sort'] = sort;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
|
|
2056
|
+
|
|
2057
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2058
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2059
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2060
|
+
|
|
2061
|
+
return {
|
|
2062
|
+
url: toPathString(localVarUrlObj),
|
|
2063
|
+
options: localVarRequestOptions,
|
|
2064
|
+
};
|
|
2065
|
+
},
|
|
2066
|
+
/**
|
|
2067
|
+
* Move a single message to a target folder.
|
|
2068
|
+
* @summary Move message
|
|
2069
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2070
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
2071
|
+
* @param {number} uid Message UID.
|
|
2072
|
+
* @param {V1FolderMessagesMoveRequest} v1FolderMessagesMoveRequest
|
|
2073
|
+
* @param {*} [options] Override http request option.
|
|
2074
|
+
* @throws {RequiredError}
|
|
2075
|
+
*/
|
|
2076
|
+
moveMessage: async (mailboxResourceId: string, folder: string, uid: number, v1FolderMessagesMoveRequest: V1FolderMessagesMoveRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2077
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
2078
|
+
assertParamExists('moveMessage', 'mailboxResourceId', mailboxResourceId)
|
|
2079
|
+
// verify required parameter 'folder' is not null or undefined
|
|
2080
|
+
assertParamExists('moveMessage', 'folder', folder)
|
|
2081
|
+
// verify required parameter 'uid' is not null or undefined
|
|
2082
|
+
assertParamExists('moveMessage', 'uid', uid)
|
|
2083
|
+
// verify required parameter 'v1FolderMessagesMoveRequest' is not null or undefined
|
|
2084
|
+
assertParamExists('moveMessage', 'v1FolderMessagesMoveRequest', v1FolderMessagesMoveRequest)
|
|
2085
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/move`
|
|
2086
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
2087
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
2088
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
2089
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2090
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2091
|
+
let baseOptions;
|
|
2092
|
+
if (configuration) {
|
|
2093
|
+
baseOptions = configuration.baseOptions;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
2097
|
+
const localVarHeaderParameter = {} as any;
|
|
2098
|
+
const localVarQueryParameter = {} as any;
|
|
2099
|
+
|
|
2100
|
+
// authentication BearerAuth required
|
|
2101
|
+
// http bearer authentication required
|
|
2102
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2103
|
+
|
|
2104
|
+
|
|
2105
|
+
|
|
2106
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2107
|
+
|
|
2108
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2109
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2110
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2111
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1FolderMessagesMoveRequest, localVarRequestOptions, configuration)
|
|
2112
|
+
|
|
2113
|
+
return {
|
|
2114
|
+
url: toPathString(localVarUrlObj),
|
|
2115
|
+
options: localVarRequestOptions,
|
|
2116
|
+
};
|
|
2117
|
+
},
|
|
2118
|
+
/**
|
|
2119
|
+
* Move multiple messages from a source folder to a target folder.
|
|
2120
|
+
* @summary Move messages
|
|
2121
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2122
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
2123
|
+
* @param {V1FolderMessagesMoveBulkRequest} v1FolderMessagesMoveBulkRequest
|
|
2124
|
+
* @param {*} [options] Override http request option.
|
|
2125
|
+
* @throws {RequiredError}
|
|
2126
|
+
*/
|
|
2127
|
+
moveMessages: async (mailboxResourceId: string, folder: string, v1FolderMessagesMoveBulkRequest: V1FolderMessagesMoveBulkRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2128
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
2129
|
+
assertParamExists('moveMessages', 'mailboxResourceId', mailboxResourceId)
|
|
2130
|
+
// verify required parameter 'folder' is not null or undefined
|
|
2131
|
+
assertParamExists('moveMessages', 'folder', folder)
|
|
2132
|
+
// verify required parameter 'v1FolderMessagesMoveBulkRequest' is not null or undefined
|
|
2133
|
+
assertParamExists('moveMessages', 'v1FolderMessagesMoveBulkRequest', v1FolderMessagesMoveBulkRequest)
|
|
2134
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/move`
|
|
2135
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
2136
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
2137
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2138
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2139
|
+
let baseOptions;
|
|
2140
|
+
if (configuration) {
|
|
2141
|
+
baseOptions = configuration.baseOptions;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
2145
|
+
const localVarHeaderParameter = {} as any;
|
|
2146
|
+
const localVarQueryParameter = {} as any;
|
|
2147
|
+
|
|
2148
|
+
// authentication BearerAuth required
|
|
2149
|
+
// http bearer authentication required
|
|
2150
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2151
|
+
|
|
2152
|
+
|
|
2153
|
+
|
|
2154
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2155
|
+
|
|
2156
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2157
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2158
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2159
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1FolderMessagesMoveBulkRequest, localVarRequestOptions, configuration)
|
|
2160
|
+
|
|
2161
|
+
return {
|
|
2162
|
+
url: toPathString(localVarUrlObj),
|
|
2163
|
+
options: localVarRequestOptions,
|
|
2164
|
+
};
|
|
2165
|
+
},
|
|
2166
|
+
/**
|
|
2167
|
+
* Add and/or remove flags on a single message. Returns the updated message.
|
|
2168
|
+
* @summary Update message flags
|
|
2169
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2170
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2171
|
+
* @param {number} uid Message UID.
|
|
2172
|
+
* @param {V1FolderMessagesFlagsRequest} v1FolderMessagesFlagsRequest
|
|
2173
|
+
* @param {*} [options] Override http request option.
|
|
2174
|
+
* @throws {RequiredError}
|
|
2175
|
+
*/
|
|
2176
|
+
patchMessage: async (mailboxResourceId: string, folder: string, uid: number, v1FolderMessagesFlagsRequest: V1FolderMessagesFlagsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2177
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
2178
|
+
assertParamExists('patchMessage', 'mailboxResourceId', mailboxResourceId)
|
|
2179
|
+
// verify required parameter 'folder' is not null or undefined
|
|
2180
|
+
assertParamExists('patchMessage', 'folder', folder)
|
|
2181
|
+
// verify required parameter 'uid' is not null or undefined
|
|
2182
|
+
assertParamExists('patchMessage', 'uid', uid)
|
|
2183
|
+
// verify required parameter 'v1FolderMessagesFlagsRequest' is not null or undefined
|
|
2184
|
+
assertParamExists('patchMessage', 'v1FolderMessagesFlagsRequest', v1FolderMessagesFlagsRequest)
|
|
2185
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
|
|
2186
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
2187
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
|
|
2188
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
2189
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2190
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2191
|
+
let baseOptions;
|
|
2192
|
+
if (configuration) {
|
|
2193
|
+
baseOptions = configuration.baseOptions;
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
2197
|
+
const localVarHeaderParameter = {} as any;
|
|
2198
|
+
const localVarQueryParameter = {} as any;
|
|
2199
|
+
|
|
2200
|
+
// authentication BearerAuth required
|
|
2201
|
+
// http bearer authentication required
|
|
2202
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2203
|
+
|
|
2204
|
+
|
|
2205
|
+
|
|
2206
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2207
|
+
|
|
2208
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2209
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2210
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2211
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1FolderMessagesFlagsRequest, localVarRequestOptions, configuration)
|
|
2212
|
+
|
|
2213
|
+
return {
|
|
2214
|
+
url: toPathString(localVarUrlObj),
|
|
2215
|
+
options: localVarRequestOptions,
|
|
2216
|
+
};
|
|
2217
|
+
},
|
|
2218
|
+
/**
|
|
2219
|
+
* Search messages in a folder. Filters in body; pagination and sort via query (`page`, `perPage`, `sort`).
|
|
2220
|
+
* @summary Search messages
|
|
2221
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2222
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2223
|
+
* @param {number} [page]
|
|
2224
|
+
* @param {number} [perPage]
|
|
2225
|
+
* @param {string} [sort]
|
|
2226
|
+
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
2227
|
+
* @param {*} [options] Override http request option.
|
|
2228
|
+
* @throws {RequiredError}
|
|
2229
|
+
*/
|
|
2230
|
+
searchMessages: async (mailboxResourceId: string, folder: string, page?: number, perPage?: number, sort?: string, v1FolderMessagesSearchRequest?: V1FolderMessagesSearchRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2231
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
2232
|
+
assertParamExists('searchMessages', 'mailboxResourceId', mailboxResourceId)
|
|
2233
|
+
// verify required parameter 'folder' is not null or undefined
|
|
2234
|
+
assertParamExists('searchMessages', 'folder', folder)
|
|
2235
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/search`
|
|
2236
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
2237
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
2238
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2239
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2240
|
+
let baseOptions;
|
|
2241
|
+
if (configuration) {
|
|
2242
|
+
baseOptions = configuration.baseOptions;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
2246
|
+
const localVarHeaderParameter = {} as any;
|
|
2247
|
+
const localVarQueryParameter = {} as any;
|
|
2248
|
+
|
|
2249
|
+
// authentication BearerAuth required
|
|
2250
|
+
// http bearer authentication required
|
|
2251
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2252
|
+
|
|
2253
|
+
if (page !== undefined) {
|
|
2254
|
+
localVarQueryParameter['page'] = page;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
if (perPage !== undefined) {
|
|
2258
|
+
localVarQueryParameter['perPage'] = perPage;
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
if (sort !== undefined) {
|
|
2262
|
+
localVarQueryParameter['sort'] = sort;
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
|
|
2267
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2268
|
+
|
|
2269
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2270
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2271
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2272
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1FolderMessagesSearchRequest, localVarRequestOptions, configuration)
|
|
2273
|
+
|
|
2274
|
+
return {
|
|
2275
|
+
url: toPathString(localVarUrlObj),
|
|
2276
|
+
options: localVarRequestOptions,
|
|
2277
|
+
};
|
|
2278
|
+
},
|
|
2279
|
+
/**
|
|
2280
|
+
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
2281
|
+
* @summary Update message flags
|
|
2282
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2283
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2284
|
+
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
2285
|
+
* @param {*} [options] Override http request option.
|
|
2286
|
+
* @throws {RequiredError}
|
|
2287
|
+
*/
|
|
2288
|
+
updateMessageFlags: async (mailboxResourceId: string, folder: string, v1FolderMessagesFlagsBulkRequest: V1FolderMessagesFlagsBulkRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2289
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
2290
|
+
assertParamExists('updateMessageFlags', 'mailboxResourceId', mailboxResourceId)
|
|
2291
|
+
// verify required parameter 'folder' is not null or undefined
|
|
2292
|
+
assertParamExists('updateMessageFlags', 'folder', folder)
|
|
2293
|
+
// verify required parameter 'v1FolderMessagesFlagsBulkRequest' is not null or undefined
|
|
2294
|
+
assertParamExists('updateMessageFlags', 'v1FolderMessagesFlagsBulkRequest', v1FolderMessagesFlagsBulkRequest)
|
|
2295
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/flags`
|
|
2296
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
2297
|
+
.replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
|
|
2298
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2299
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2300
|
+
let baseOptions;
|
|
2301
|
+
if (configuration) {
|
|
2302
|
+
baseOptions = configuration.baseOptions;
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2305
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
2306
|
+
const localVarHeaderParameter = {} as any;
|
|
2307
|
+
const localVarQueryParameter = {} as any;
|
|
2308
|
+
|
|
2309
|
+
// authentication BearerAuth required
|
|
2310
|
+
// http bearer authentication required
|
|
2311
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2312
|
+
|
|
2313
|
+
|
|
2314
|
+
|
|
2315
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2316
|
+
|
|
2317
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2318
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2319
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2320
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1FolderMessagesFlagsBulkRequest, localVarRequestOptions, configuration)
|
|
2321
|
+
|
|
2322
|
+
return {
|
|
2323
|
+
url: toPathString(localVarUrlObj),
|
|
2324
|
+
options: localVarRequestOptions,
|
|
2325
|
+
};
|
|
2326
|
+
},
|
|
2327
|
+
}
|
|
2328
|
+
};
|
|
2329
|
+
|
|
2330
|
+
/**
|
|
2331
|
+
* MessagesApi - functional programming interface
|
|
2332
|
+
* @export
|
|
2333
|
+
*/
|
|
2334
|
+
export const MessagesApiFp = function(configuration?: Configuration) {
|
|
2335
|
+
const localVarAxiosParamCreator = MessagesApiAxiosParamCreator(configuration)
|
|
2336
|
+
return {
|
|
2337
|
+
/**
|
|
2338
|
+
* Permanently delete every message in a folder (empty the folder).
|
|
2339
|
+
* @summary Delete all messages
|
|
2340
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2341
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2342
|
+
* @param {*} [options] Override http request option.
|
|
2343
|
+
* @throws {RequiredError}
|
|
2344
|
+
*/
|
|
2345
|
+
async deleteAllMessages(mailboxResourceId: string, folder: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
2346
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAllMessages(mailboxResourceId, folder, options);
|
|
2347
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.deleteAllMessages']?.[0]?.url;
|
|
2348
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2349
|
+
},
|
|
2350
|
+
/**
|
|
2351
|
+
* Permanently delete a single message.
|
|
2352
|
+
* @summary Delete message
|
|
2353
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2354
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2355
|
+
* @param {number} uid Message UID.
|
|
2356
|
+
* @param {*} [options] Override http request option.
|
|
2357
|
+
* @throws {RequiredError}
|
|
2358
|
+
*/
|
|
2359
|
+
async deleteMessage(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
2360
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMessage(mailboxResourceId, folder, uid, options);
|
|
2361
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.deleteMessage']?.[0]?.url;
|
|
2362
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2363
|
+
},
|
|
2364
|
+
/**
|
|
2365
|
+
* Permanently delete multiple messages from a folder.
|
|
2366
|
+
* @summary Delete messages
|
|
2367
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2368
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2369
|
+
* @param {V1FolderMessagesDeleteBulkRequest} v1FolderMessagesDeleteBulkRequest
|
|
2370
|
+
* @param {*} [options] Override http request option.
|
|
2371
|
+
* @throws {RequiredError}
|
|
2372
|
+
*/
|
|
2373
|
+
async deleteMessages(mailboxResourceId: string, folder: string, v1FolderMessagesDeleteBulkRequest: V1FolderMessagesDeleteBulkRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
2374
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMessages(mailboxResourceId, folder, v1FolderMessagesDeleteBulkRequest, options);
|
|
2375
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.deleteMessages']?.[0]?.url;
|
|
2376
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2377
|
+
},
|
|
2378
|
+
/**
|
|
2379
|
+
* Retrieve a single message by UID.
|
|
2380
|
+
* @summary Get message
|
|
2381
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2382
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2383
|
+
* @param {number} uid Message UID.
|
|
2384
|
+
* @param {*} [options] Override http request option.
|
|
2385
|
+
* @throws {RequiredError}
|
|
2386
|
+
*/
|
|
2387
|
+
async getMessage(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1FolderMessagesResource>> {
|
|
2388
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMessage(mailboxResourceId, folder, uid, options);
|
|
2389
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.getMessage']?.[0]?.url;
|
|
2390
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2391
|
+
},
|
|
2392
|
+
/**
|
|
2393
|
+
* Download a message attachment as `application/octet-stream`.
|
|
2394
|
+
* @summary Download message attachment
|
|
2395
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2396
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2397
|
+
* @param {number} uid Message UID.
|
|
2398
|
+
* @param {string} attachmentId Attachment ID (opaque, returned by GET message).
|
|
2399
|
+
* @param {*} [options] Override http request option.
|
|
2400
|
+
* @throws {RequiredError}
|
|
2401
|
+
*/
|
|
2402
|
+
async getMessageAttachment(mailboxResourceId: string, folder: string, uid: number, attachmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
|
2403
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options);
|
|
2404
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.getMessageAttachment']?.[0]?.url;
|
|
2405
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2406
|
+
},
|
|
2407
|
+
/**
|
|
2408
|
+
* Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
|
|
2409
|
+
* @summary Get message source
|
|
2410
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2411
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2412
|
+
* @param {number} uid Message UID.
|
|
2413
|
+
* @param {*} [options] Override http request option.
|
|
2414
|
+
* @throws {RequiredError}
|
|
2415
|
+
*/
|
|
2416
|
+
async getMessageSource(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
|
2417
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMessageSource(mailboxResourceId, folder, uid, options);
|
|
2418
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.getMessageSource']?.[0]?.url;
|
|
2419
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2420
|
+
},
|
|
2421
|
+
/**
|
|
2422
|
+
* Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
|
|
2423
|
+
* @summary Get message text content
|
|
2424
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2425
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2426
|
+
* @param {number} uid Message UID.
|
|
2427
|
+
* @param {*} [options] Override http request option.
|
|
2428
|
+
* @throws {RequiredError}
|
|
2429
|
+
*/
|
|
2430
|
+
async getMessageText(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1FolderMessagesMessageTextResource>> {
|
|
2431
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMessageText(mailboxResourceId, folder, uid, options);
|
|
2432
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.getMessageText']?.[0]?.url;
|
|
2433
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2434
|
+
},
|
|
2435
|
+
/**
|
|
2436
|
+
* List messages in a folder. Use POST /search for filtering. Sort fields: uid, date, size (prefix with `-` for descending). Default `-uid`.
|
|
2437
|
+
* @summary List messages
|
|
2438
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2439
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2440
|
+
* @param {number} [page] Page number (1-based).
|
|
2441
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
2442
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
2443
|
+
* @param {*} [options] Override http request option.
|
|
2444
|
+
* @throws {RequiredError}
|
|
2445
|
+
*/
|
|
2446
|
+
async listMessages(mailboxResourceId: string, folder: string, page?: number, perPage?: number, sort?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1FolderMessagesCollection>> {
|
|
2447
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listMessages(mailboxResourceId, folder, page, perPage, sort, options);
|
|
2448
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.listMessages']?.[0]?.url;
|
|
2449
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2450
|
+
},
|
|
2451
|
+
/**
|
|
2452
|
+
* Move a single message to a target folder.
|
|
2453
|
+
* @summary Move message
|
|
2454
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2455
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
2456
|
+
* @param {number} uid Message UID.
|
|
2457
|
+
* @param {V1FolderMessagesMoveRequest} v1FolderMessagesMoveRequest
|
|
2458
|
+
* @param {*} [options] Override http request option.
|
|
2459
|
+
* @throws {RequiredError}
|
|
2460
|
+
*/
|
|
2461
|
+
async moveMessage(mailboxResourceId: string, folder: string, uid: number, v1FolderMessagesMoveRequest: V1FolderMessagesMoveRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
2462
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.moveMessage(mailboxResourceId, folder, uid, v1FolderMessagesMoveRequest, options);
|
|
2463
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.moveMessage']?.[0]?.url;
|
|
2464
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2465
|
+
},
|
|
2466
|
+
/**
|
|
2467
|
+
* Move multiple messages from a source folder to a target folder.
|
|
2468
|
+
* @summary Move messages
|
|
2469
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2470
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
2471
|
+
* @param {V1FolderMessagesMoveBulkRequest} v1FolderMessagesMoveBulkRequest
|
|
2472
|
+
* @param {*} [options] Override http request option.
|
|
2473
|
+
* @throws {RequiredError}
|
|
2474
|
+
*/
|
|
2475
|
+
async moveMessages(mailboxResourceId: string, folder: string, v1FolderMessagesMoveBulkRequest: V1FolderMessagesMoveBulkRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
2476
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.moveMessages(mailboxResourceId, folder, v1FolderMessagesMoveBulkRequest, options);
|
|
2477
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.moveMessages']?.[0]?.url;
|
|
2478
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2479
|
+
},
|
|
2480
|
+
/**
|
|
2481
|
+
* Add and/or remove flags on a single message. Returns the updated message.
|
|
2482
|
+
* @summary Update message flags
|
|
2483
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2484
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2485
|
+
* @param {number} uid Message UID.
|
|
2486
|
+
* @param {V1FolderMessagesFlagsRequest} v1FolderMessagesFlagsRequest
|
|
2487
|
+
* @param {*} [options] Override http request option.
|
|
2488
|
+
* @throws {RequiredError}
|
|
2489
|
+
*/
|
|
2490
|
+
async patchMessage(mailboxResourceId: string, folder: string, uid: number, v1FolderMessagesFlagsRequest: V1FolderMessagesFlagsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1FolderMessagesResource>> {
|
|
2491
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.patchMessage(mailboxResourceId, folder, uid, v1FolderMessagesFlagsRequest, options);
|
|
2492
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.patchMessage']?.[0]?.url;
|
|
2493
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2494
|
+
},
|
|
2495
|
+
/**
|
|
2496
|
+
* Search messages in a folder. Filters in body; pagination and sort via query (`page`, `perPage`, `sort`).
|
|
2497
|
+
* @summary Search messages
|
|
2498
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2499
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2500
|
+
* @param {number} [page]
|
|
2501
|
+
* @param {number} [perPage]
|
|
2502
|
+
* @param {string} [sort]
|
|
2503
|
+
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
2504
|
+
* @param {*} [options] Override http request option.
|
|
2505
|
+
* @throws {RequiredError}
|
|
2506
|
+
*/
|
|
2507
|
+
async searchMessages(mailboxResourceId: string, folder: string, page?: number, perPage?: number, sort?: string, v1FolderMessagesSearchRequest?: V1FolderMessagesSearchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1FolderMessagesCollection>> {
|
|
2508
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.searchMessages(mailboxResourceId, folder, page, perPage, sort, v1FolderMessagesSearchRequest, options);
|
|
2509
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.searchMessages']?.[0]?.url;
|
|
2510
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2511
|
+
},
|
|
2512
|
+
/**
|
|
2513
|
+
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
2514
|
+
* @summary Update message flags
|
|
2515
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2516
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2517
|
+
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
2518
|
+
* @param {*} [options] Override http request option.
|
|
2519
|
+
* @throws {RequiredError}
|
|
2520
|
+
*/
|
|
2521
|
+
async updateMessageFlags(mailboxResourceId: string, folder: string, v1FolderMessagesFlagsBulkRequest: V1FolderMessagesFlagsBulkRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1FolderMessagesUpdateFlagsResult>> {
|
|
2522
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateMessageFlags(mailboxResourceId, folder, v1FolderMessagesFlagsBulkRequest, options);
|
|
2523
|
+
const localVarOperationServerBasePath = operationServerMap['MessagesApi.updateMessageFlags']?.[0]?.url;
|
|
2524
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2525
|
+
},
|
|
2526
|
+
}
|
|
2527
|
+
};
|
|
2528
|
+
|
|
2529
|
+
/**
|
|
2530
|
+
* MessagesApi - factory interface
|
|
2531
|
+
* @export
|
|
2532
|
+
*/
|
|
2533
|
+
export const MessagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
2534
|
+
const localVarFp = MessagesApiFp(configuration)
|
|
2535
|
+
return {
|
|
2536
|
+
/**
|
|
2537
|
+
* Permanently delete every message in a folder (empty the folder).
|
|
2538
|
+
* @summary Delete all messages
|
|
2539
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2540
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2541
|
+
* @param {*} [options] Override http request option.
|
|
2542
|
+
* @throws {RequiredError}
|
|
2543
|
+
*/
|
|
2544
|
+
deleteAllMessages(mailboxResourceId: string, folder: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
2545
|
+
return localVarFp.deleteAllMessages(mailboxResourceId, folder, options).then((request) => request(axios, basePath));
|
|
2546
|
+
},
|
|
2547
|
+
/**
|
|
2548
|
+
* Permanently delete a single message.
|
|
2549
|
+
* @summary Delete message
|
|
2550
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2551
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2552
|
+
* @param {number} uid Message UID.
|
|
2553
|
+
* @param {*} [options] Override http request option.
|
|
2554
|
+
* @throws {RequiredError}
|
|
2555
|
+
*/
|
|
2556
|
+
deleteMessage(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
2557
|
+
return localVarFp.deleteMessage(mailboxResourceId, folder, uid, options).then((request) => request(axios, basePath));
|
|
2558
|
+
},
|
|
2559
|
+
/**
|
|
2560
|
+
* Permanently delete multiple messages from a folder.
|
|
2561
|
+
* @summary Delete messages
|
|
2562
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2563
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2564
|
+
* @param {V1FolderMessagesDeleteBulkRequest} v1FolderMessagesDeleteBulkRequest
|
|
2565
|
+
* @param {*} [options] Override http request option.
|
|
2566
|
+
* @throws {RequiredError}
|
|
2567
|
+
*/
|
|
2568
|
+
deleteMessages(mailboxResourceId: string, folder: string, v1FolderMessagesDeleteBulkRequest: V1FolderMessagesDeleteBulkRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
2569
|
+
return localVarFp.deleteMessages(mailboxResourceId, folder, v1FolderMessagesDeleteBulkRequest, options).then((request) => request(axios, basePath));
|
|
2570
|
+
},
|
|
2571
|
+
/**
|
|
2572
|
+
* Retrieve a single message by UID.
|
|
2573
|
+
* @summary Get message
|
|
2574
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2575
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2576
|
+
* @param {number} uid Message UID.
|
|
2577
|
+
* @param {*} [options] Override http request option.
|
|
2578
|
+
* @throws {RequiredError}
|
|
2579
|
+
*/
|
|
2580
|
+
getMessage(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig): AxiosPromise<V1FolderMessagesResource> {
|
|
2581
|
+
return localVarFp.getMessage(mailboxResourceId, folder, uid, options).then((request) => request(axios, basePath));
|
|
2582
|
+
},
|
|
2583
|
+
/**
|
|
2584
|
+
* Download a message attachment as `application/octet-stream`.
|
|
2585
|
+
* @summary Download message attachment
|
|
2586
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2587
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2588
|
+
* @param {number} uid Message UID.
|
|
2589
|
+
* @param {string} attachmentId Attachment ID (opaque, returned by GET message).
|
|
2590
|
+
* @param {*} [options] Override http request option.
|
|
2591
|
+
* @throws {RequiredError}
|
|
2592
|
+
*/
|
|
2593
|
+
getMessageAttachment(mailboxResourceId: string, folder: string, uid: number, attachmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<File> {
|
|
2594
|
+
return localVarFp.getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options).then((request) => request(axios, basePath));
|
|
2595
|
+
},
|
|
2596
|
+
/**
|
|
2597
|
+
* Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
|
|
2598
|
+
* @summary Get message source
|
|
2599
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2600
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2601
|
+
* @param {number} uid Message UID.
|
|
2602
|
+
* @param {*} [options] Override http request option.
|
|
2603
|
+
* @throws {RequiredError}
|
|
2604
|
+
*/
|
|
2605
|
+
getMessageSource(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig): AxiosPromise<File> {
|
|
2606
|
+
return localVarFp.getMessageSource(mailboxResourceId, folder, uid, options).then((request) => request(axios, basePath));
|
|
2607
|
+
},
|
|
2608
|
+
/**
|
|
2609
|
+
* Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
|
|
2610
|
+
* @summary Get message text content
|
|
2611
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2612
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2613
|
+
* @param {number} uid Message UID.
|
|
2614
|
+
* @param {*} [options] Override http request option.
|
|
2615
|
+
* @throws {RequiredError}
|
|
2616
|
+
*/
|
|
2617
|
+
getMessageText(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig): AxiosPromise<V1FolderMessagesMessageTextResource> {
|
|
2618
|
+
return localVarFp.getMessageText(mailboxResourceId, folder, uid, options).then((request) => request(axios, basePath));
|
|
2619
|
+
},
|
|
2620
|
+
/**
|
|
2621
|
+
* List messages in a folder. Use POST /search for filtering. Sort fields: uid, date, size (prefix with `-` for descending). Default `-uid`.
|
|
2622
|
+
* @summary List messages
|
|
2623
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2624
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2625
|
+
* @param {number} [page] Page number (1-based).
|
|
2626
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
2627
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
2628
|
+
* @param {*} [options] Override http request option.
|
|
2629
|
+
* @throws {RequiredError}
|
|
2630
|
+
*/
|
|
2631
|
+
listMessages(mailboxResourceId: string, folder: string, page?: number, perPage?: number, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<V1FolderMessagesCollection> {
|
|
2632
|
+
return localVarFp.listMessages(mailboxResourceId, folder, page, perPage, sort, options).then((request) => request(axios, basePath));
|
|
2633
|
+
},
|
|
2634
|
+
/**
|
|
2635
|
+
* Move a single message to a target folder.
|
|
2636
|
+
* @summary Move message
|
|
2637
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2638
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
2639
|
+
* @param {number} uid Message UID.
|
|
2640
|
+
* @param {V1FolderMessagesMoveRequest} v1FolderMessagesMoveRequest
|
|
2641
|
+
* @param {*} [options] Override http request option.
|
|
2642
|
+
* @throws {RequiredError}
|
|
2643
|
+
*/
|
|
2644
|
+
moveMessage(mailboxResourceId: string, folder: string, uid: number, v1FolderMessagesMoveRequest: V1FolderMessagesMoveRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
2645
|
+
return localVarFp.moveMessage(mailboxResourceId, folder, uid, v1FolderMessagesMoveRequest, options).then((request) => request(axios, basePath));
|
|
2646
|
+
},
|
|
2647
|
+
/**
|
|
2648
|
+
* Move multiple messages from a source folder to a target folder.
|
|
2649
|
+
* @summary Move messages
|
|
2650
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2651
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
2652
|
+
* @param {V1FolderMessagesMoveBulkRequest} v1FolderMessagesMoveBulkRequest
|
|
2653
|
+
* @param {*} [options] Override http request option.
|
|
2654
|
+
* @throws {RequiredError}
|
|
2655
|
+
*/
|
|
2656
|
+
moveMessages(mailboxResourceId: string, folder: string, v1FolderMessagesMoveBulkRequest: V1FolderMessagesMoveBulkRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
2657
|
+
return localVarFp.moveMessages(mailboxResourceId, folder, v1FolderMessagesMoveBulkRequest, options).then((request) => request(axios, basePath));
|
|
2658
|
+
},
|
|
2659
|
+
/**
|
|
2660
|
+
* Add and/or remove flags on a single message. Returns the updated message.
|
|
2661
|
+
* @summary Update message flags
|
|
2662
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2663
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2664
|
+
* @param {number} uid Message UID.
|
|
2665
|
+
* @param {V1FolderMessagesFlagsRequest} v1FolderMessagesFlagsRequest
|
|
2666
|
+
* @param {*} [options] Override http request option.
|
|
2667
|
+
* @throws {RequiredError}
|
|
2668
|
+
*/
|
|
2669
|
+
patchMessage(mailboxResourceId: string, folder: string, uid: number, v1FolderMessagesFlagsRequest: V1FolderMessagesFlagsRequest, options?: RawAxiosRequestConfig): AxiosPromise<V1FolderMessagesResource> {
|
|
2670
|
+
return localVarFp.patchMessage(mailboxResourceId, folder, uid, v1FolderMessagesFlagsRequest, options).then((request) => request(axios, basePath));
|
|
2671
|
+
},
|
|
2672
|
+
/**
|
|
2673
|
+
* Search messages in a folder. Filters in body; pagination and sort via query (`page`, `perPage`, `sort`).
|
|
2674
|
+
* @summary Search messages
|
|
2675
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2676
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2677
|
+
* @param {number} [page]
|
|
2678
|
+
* @param {number} [perPage]
|
|
2679
|
+
* @param {string} [sort]
|
|
2680
|
+
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
2681
|
+
* @param {*} [options] Override http request option.
|
|
2682
|
+
* @throws {RequiredError}
|
|
2683
|
+
*/
|
|
2684
|
+
searchMessages(mailboxResourceId: string, folder: string, page?: number, perPage?: number, sort?: string, v1FolderMessagesSearchRequest?: V1FolderMessagesSearchRequest, options?: RawAxiosRequestConfig): AxiosPromise<V1FolderMessagesCollection> {
|
|
2685
|
+
return localVarFp.searchMessages(mailboxResourceId, folder, page, perPage, sort, v1FolderMessagesSearchRequest, options).then((request) => request(axios, basePath));
|
|
2686
|
+
},
|
|
2687
|
+
/**
|
|
2688
|
+
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
2689
|
+
* @summary Update message flags
|
|
2690
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2691
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2692
|
+
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
2693
|
+
* @param {*} [options] Override http request option.
|
|
2694
|
+
* @throws {RequiredError}
|
|
2695
|
+
*/
|
|
2696
|
+
updateMessageFlags(mailboxResourceId: string, folder: string, v1FolderMessagesFlagsBulkRequest: V1FolderMessagesFlagsBulkRequest, options?: RawAxiosRequestConfig): AxiosPromise<V1FolderMessagesUpdateFlagsResult> {
|
|
2697
|
+
return localVarFp.updateMessageFlags(mailboxResourceId, folder, v1FolderMessagesFlagsBulkRequest, options).then((request) => request(axios, basePath));
|
|
2698
|
+
},
|
|
2699
|
+
};
|
|
2700
|
+
};
|
|
2701
|
+
|
|
2702
|
+
/**
|
|
2703
|
+
* MessagesApi - object-oriented interface
|
|
2704
|
+
* @export
|
|
2705
|
+
* @class MessagesApi
|
|
2706
|
+
* @extends {BaseAPI}
|
|
2707
|
+
*/
|
|
2708
|
+
export class MessagesApi extends BaseAPI {
|
|
2709
|
+
/**
|
|
2710
|
+
* Permanently delete every message in a folder (empty the folder).
|
|
2711
|
+
* @summary Delete all messages
|
|
2712
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2713
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2714
|
+
* @param {*} [options] Override http request option.
|
|
2715
|
+
* @throws {RequiredError}
|
|
2716
|
+
* @memberof MessagesApi
|
|
2717
|
+
*/
|
|
2718
|
+
public deleteAllMessages(mailboxResourceId: string, folder: string, options?: RawAxiosRequestConfig) {
|
|
2719
|
+
return MessagesApiFp(this.configuration).deleteAllMessages(mailboxResourceId, folder, options).then((request) => request(this.axios, this.basePath));
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2722
|
+
/**
|
|
2723
|
+
* Permanently delete a single message.
|
|
2724
|
+
* @summary Delete message
|
|
2725
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2726
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2727
|
+
* @param {number} uid Message UID.
|
|
2728
|
+
* @param {*} [options] Override http request option.
|
|
2729
|
+
* @throws {RequiredError}
|
|
2730
|
+
* @memberof MessagesApi
|
|
2731
|
+
*/
|
|
2732
|
+
public deleteMessage(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig) {
|
|
2733
|
+
return MessagesApiFp(this.configuration).deleteMessage(mailboxResourceId, folder, uid, options).then((request) => request(this.axios, this.basePath));
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
/**
|
|
2737
|
+
* Permanently delete multiple messages from a folder.
|
|
2738
|
+
* @summary Delete messages
|
|
2739
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2740
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2741
|
+
* @param {V1FolderMessagesDeleteBulkRequest} v1FolderMessagesDeleteBulkRequest
|
|
2742
|
+
* @param {*} [options] Override http request option.
|
|
2743
|
+
* @throws {RequiredError}
|
|
2744
|
+
* @memberof MessagesApi
|
|
2745
|
+
*/
|
|
2746
|
+
public deleteMessages(mailboxResourceId: string, folder: string, v1FolderMessagesDeleteBulkRequest: V1FolderMessagesDeleteBulkRequest, options?: RawAxiosRequestConfig) {
|
|
2747
|
+
return MessagesApiFp(this.configuration).deleteMessages(mailboxResourceId, folder, v1FolderMessagesDeleteBulkRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
/**
|
|
2751
|
+
* Retrieve a single message by UID.
|
|
2752
|
+
* @summary Get message
|
|
2753
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2754
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2755
|
+
* @param {number} uid Message UID.
|
|
2756
|
+
* @param {*} [options] Override http request option.
|
|
2757
|
+
* @throws {RequiredError}
|
|
2758
|
+
* @memberof MessagesApi
|
|
2759
|
+
*/
|
|
2760
|
+
public getMessage(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig) {
|
|
2761
|
+
return MessagesApiFp(this.configuration).getMessage(mailboxResourceId, folder, uid, options).then((request) => request(this.axios, this.basePath));
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
/**
|
|
2765
|
+
* Download a message attachment as `application/octet-stream`.
|
|
2766
|
+
* @summary Download message attachment
|
|
2767
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2768
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2769
|
+
* @param {number} uid Message UID.
|
|
2770
|
+
* @param {string} attachmentId Attachment ID (opaque, returned by GET message).
|
|
2771
|
+
* @param {*} [options] Override http request option.
|
|
2772
|
+
* @throws {RequiredError}
|
|
2773
|
+
* @memberof MessagesApi
|
|
2774
|
+
*/
|
|
2775
|
+
public getMessageAttachment(mailboxResourceId: string, folder: string, uid: number, attachmentId: string, options?: RawAxiosRequestConfig) {
|
|
2776
|
+
return MessagesApiFp(this.configuration).getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options).then((request) => request(this.axios, this.basePath));
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2779
|
+
/**
|
|
2780
|
+
* Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
|
|
2781
|
+
* @summary Get message source
|
|
2782
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2783
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2784
|
+
* @param {number} uid Message UID.
|
|
2785
|
+
* @param {*} [options] Override http request option.
|
|
2786
|
+
* @throws {RequiredError}
|
|
2787
|
+
* @memberof MessagesApi
|
|
2788
|
+
*/
|
|
2789
|
+
public getMessageSource(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig) {
|
|
2790
|
+
return MessagesApiFp(this.configuration).getMessageSource(mailboxResourceId, folder, uid, options).then((request) => request(this.axios, this.basePath));
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2793
|
+
/**
|
|
2794
|
+
* Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
|
|
2795
|
+
* @summary Get message text content
|
|
2796
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2797
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2798
|
+
* @param {number} uid Message UID.
|
|
2799
|
+
* @param {*} [options] Override http request option.
|
|
2800
|
+
* @throws {RequiredError}
|
|
2801
|
+
* @memberof MessagesApi
|
|
2802
|
+
*/
|
|
2803
|
+
public getMessageText(mailboxResourceId: string, folder: string, uid: number, options?: RawAxiosRequestConfig) {
|
|
2804
|
+
return MessagesApiFp(this.configuration).getMessageText(mailboxResourceId, folder, uid, options).then((request) => request(this.axios, this.basePath));
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
/**
|
|
2808
|
+
* List messages in a folder. Use POST /search for filtering. Sort fields: uid, date, size (prefix with `-` for descending). Default `-uid`.
|
|
2809
|
+
* @summary List messages
|
|
2810
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2811
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2812
|
+
* @param {number} [page] Page number (1-based).
|
|
2813
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
2814
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
2815
|
+
* @param {*} [options] Override http request option.
|
|
2816
|
+
* @throws {RequiredError}
|
|
2817
|
+
* @memberof MessagesApi
|
|
2818
|
+
*/
|
|
2819
|
+
public listMessages(mailboxResourceId: string, folder: string, page?: number, perPage?: number, sort?: string, options?: RawAxiosRequestConfig) {
|
|
2820
|
+
return MessagesApiFp(this.configuration).listMessages(mailboxResourceId, folder, page, perPage, sort, options).then((request) => request(this.axios, this.basePath));
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
/**
|
|
2824
|
+
* Move a single message to a target folder.
|
|
2825
|
+
* @summary Move message
|
|
2826
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2827
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
2828
|
+
* @param {number} uid Message UID.
|
|
2829
|
+
* @param {V1FolderMessagesMoveRequest} v1FolderMessagesMoveRequest
|
|
2830
|
+
* @param {*} [options] Override http request option.
|
|
2831
|
+
* @throws {RequiredError}
|
|
2832
|
+
* @memberof MessagesApi
|
|
2833
|
+
*/
|
|
2834
|
+
public moveMessage(mailboxResourceId: string, folder: string, uid: number, v1FolderMessagesMoveRequest: V1FolderMessagesMoveRequest, options?: RawAxiosRequestConfig) {
|
|
2835
|
+
return MessagesApiFp(this.configuration).moveMessage(mailboxResourceId, folder, uid, v1FolderMessagesMoveRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2838
|
+
/**
|
|
2839
|
+
* Move multiple messages from a source folder to a target folder.
|
|
2840
|
+
* @summary Move messages
|
|
2841
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2842
|
+
* @param {string} folder Source folder path (URL-encoded).
|
|
2843
|
+
* @param {V1FolderMessagesMoveBulkRequest} v1FolderMessagesMoveBulkRequest
|
|
2844
|
+
* @param {*} [options] Override http request option.
|
|
2845
|
+
* @throws {RequiredError}
|
|
2846
|
+
* @memberof MessagesApi
|
|
2847
|
+
*/
|
|
2848
|
+
public moveMessages(mailboxResourceId: string, folder: string, v1FolderMessagesMoveBulkRequest: V1FolderMessagesMoveBulkRequest, options?: RawAxiosRequestConfig) {
|
|
2849
|
+
return MessagesApiFp(this.configuration).moveMessages(mailboxResourceId, folder, v1FolderMessagesMoveBulkRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2852
|
+
/**
|
|
2853
|
+
* Add and/or remove flags on a single message. Returns the updated message.
|
|
2854
|
+
* @summary Update message flags
|
|
2855
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2856
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2857
|
+
* @param {number} uid Message UID.
|
|
2858
|
+
* @param {V1FolderMessagesFlagsRequest} v1FolderMessagesFlagsRequest
|
|
2859
|
+
* @param {*} [options] Override http request option.
|
|
2860
|
+
* @throws {RequiredError}
|
|
2861
|
+
* @memberof MessagesApi
|
|
2862
|
+
*/
|
|
2863
|
+
public patchMessage(mailboxResourceId: string, folder: string, uid: number, v1FolderMessagesFlagsRequest: V1FolderMessagesFlagsRequest, options?: RawAxiosRequestConfig) {
|
|
2864
|
+
return MessagesApiFp(this.configuration).patchMessage(mailboxResourceId, folder, uid, v1FolderMessagesFlagsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2865
|
+
}
|
|
2866
|
+
|
|
2867
|
+
/**
|
|
2868
|
+
* Search messages in a folder. Filters in body; pagination and sort via query (`page`, `perPage`, `sort`).
|
|
2869
|
+
* @summary Search messages
|
|
2870
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2871
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2872
|
+
* @param {number} [page]
|
|
2873
|
+
* @param {number} [perPage]
|
|
2874
|
+
* @param {string} [sort]
|
|
2875
|
+
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
2876
|
+
* @param {*} [options] Override http request option.
|
|
2877
|
+
* @throws {RequiredError}
|
|
2878
|
+
* @memberof MessagesApi
|
|
2879
|
+
*/
|
|
2880
|
+
public searchMessages(mailboxResourceId: string, folder: string, page?: number, perPage?: number, sort?: string, v1FolderMessagesSearchRequest?: V1FolderMessagesSearchRequest, options?: RawAxiosRequestConfig) {
|
|
2881
|
+
return MessagesApiFp(this.configuration).searchMessages(mailboxResourceId, folder, page, perPage, sort, v1FolderMessagesSearchRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
/**
|
|
2885
|
+
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
2886
|
+
* @summary Update message flags
|
|
2887
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2888
|
+
* @param {string} folder Folder path (URL-encoded).
|
|
2889
|
+
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
2890
|
+
* @param {*} [options] Override http request option.
|
|
2891
|
+
* @throws {RequiredError}
|
|
2892
|
+
* @memberof MessagesApi
|
|
2893
|
+
*/
|
|
2894
|
+
public updateMessageFlags(mailboxResourceId: string, folder: string, v1FolderMessagesFlagsBulkRequest: V1FolderMessagesFlagsBulkRequest, options?: RawAxiosRequestConfig) {
|
|
2895
|
+
return MessagesApiFp(this.configuration).updateMessageFlags(mailboxResourceId, folder, v1FolderMessagesFlagsBulkRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2896
|
+
}
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
|
|
2900
|
+
|
|
2901
|
+
/**
|
|
2902
|
+
* QuotaApi - axios parameter creator
|
|
2903
|
+
* @export
|
|
2904
|
+
*/
|
|
2905
|
+
export const QuotaApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
2906
|
+
return {
|
|
2907
|
+
/**
|
|
2908
|
+
* Retrieve storage and message quota usage for the managed mailbox.
|
|
2909
|
+
* @summary Get mailbox quota
|
|
2910
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2911
|
+
* @param {*} [options] Override http request option.
|
|
2912
|
+
* @throws {RequiredError}
|
|
2913
|
+
*/
|
|
2914
|
+
getQuota: async (mailboxResourceId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2915
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
2916
|
+
assertParamExists('getQuota', 'mailboxResourceId', mailboxResourceId)
|
|
2917
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/quota`
|
|
2918
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
2919
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2920
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2921
|
+
let baseOptions;
|
|
2922
|
+
if (configuration) {
|
|
2923
|
+
baseOptions = configuration.baseOptions;
|
|
2924
|
+
}
|
|
2925
|
+
|
|
2926
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
2927
|
+
const localVarHeaderParameter = {} as any;
|
|
2928
|
+
const localVarQueryParameter = {} as any;
|
|
2929
|
+
|
|
2930
|
+
// authentication BearerAuth required
|
|
2931
|
+
// http bearer authentication required
|
|
2932
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2933
|
+
|
|
2934
|
+
|
|
2935
|
+
|
|
2936
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2937
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2938
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2939
|
+
|
|
2940
|
+
return {
|
|
2941
|
+
url: toPathString(localVarUrlObj),
|
|
2942
|
+
options: localVarRequestOptions,
|
|
2943
|
+
};
|
|
2944
|
+
},
|
|
2945
|
+
}
|
|
2946
|
+
};
|
|
2947
|
+
|
|
2948
|
+
/**
|
|
2949
|
+
* QuotaApi - functional programming interface
|
|
2950
|
+
* @export
|
|
2951
|
+
*/
|
|
2952
|
+
export const QuotaApiFp = function(configuration?: Configuration) {
|
|
2953
|
+
const localVarAxiosParamCreator = QuotaApiAxiosParamCreator(configuration)
|
|
2954
|
+
return {
|
|
2955
|
+
/**
|
|
2956
|
+
* Retrieve storage and message quota usage for the managed mailbox.
|
|
2957
|
+
* @summary Get mailbox quota
|
|
2958
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2959
|
+
* @param {*} [options] Override http request option.
|
|
2960
|
+
* @throws {RequiredError}
|
|
2961
|
+
*/
|
|
2962
|
+
async getQuota(mailboxResourceId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1QuotaResource>> {
|
|
2963
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getQuota(mailboxResourceId, options);
|
|
2964
|
+
const localVarOperationServerBasePath = operationServerMap['QuotaApi.getQuota']?.[0]?.url;
|
|
2965
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2966
|
+
},
|
|
2967
|
+
}
|
|
2968
|
+
};
|
|
2969
|
+
|
|
2970
|
+
/**
|
|
2971
|
+
* QuotaApi - factory interface
|
|
2972
|
+
* @export
|
|
2973
|
+
*/
|
|
2974
|
+
export const QuotaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
2975
|
+
const localVarFp = QuotaApiFp(configuration)
|
|
2976
|
+
return {
|
|
2977
|
+
/**
|
|
2978
|
+
* Retrieve storage and message quota usage for the managed mailbox.
|
|
2979
|
+
* @summary Get mailbox quota
|
|
2980
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2981
|
+
* @param {*} [options] Override http request option.
|
|
2982
|
+
* @throws {RequiredError}
|
|
2983
|
+
*/
|
|
2984
|
+
getQuota(mailboxResourceId: string, options?: RawAxiosRequestConfig): AxiosPromise<V1QuotaResource> {
|
|
2985
|
+
return localVarFp.getQuota(mailboxResourceId, options).then((request) => request(axios, basePath));
|
|
2986
|
+
},
|
|
2987
|
+
};
|
|
2988
|
+
};
|
|
2989
|
+
|
|
2990
|
+
/**
|
|
2991
|
+
* QuotaApi - object-oriented interface
|
|
2992
|
+
* @export
|
|
2993
|
+
* @class QuotaApi
|
|
2994
|
+
* @extends {BaseAPI}
|
|
2995
|
+
*/
|
|
2996
|
+
export class QuotaApi extends BaseAPI {
|
|
2997
|
+
/**
|
|
2998
|
+
* Retrieve storage and message quota usage for the managed mailbox.
|
|
2999
|
+
* @summary Get mailbox quota
|
|
3000
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3001
|
+
* @param {*} [options] Override http request option.
|
|
3002
|
+
* @throws {RequiredError}
|
|
3003
|
+
* @memberof QuotaApi
|
|
3004
|
+
*/
|
|
3005
|
+
public getQuota(mailboxResourceId: string, options?: RawAxiosRequestConfig) {
|
|
3006
|
+
return QuotaApiFp(this.configuration).getQuota(mailboxResourceId, options).then((request) => request(this.axios, this.basePath));
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
|
|
3010
|
+
|
|
3011
|
+
|
|
3012
|
+
/**
|
|
3013
|
+
* SendApi - axios parameter creator
|
|
3014
|
+
* @export
|
|
3015
|
+
*/
|
|
3016
|
+
export const SendApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
3017
|
+
return {
|
|
3018
|
+
/**
|
|
3019
|
+
* Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
|
|
3020
|
+
* @summary Send email
|
|
3021
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3022
|
+
* @param {V1SendRequest | null} v1SendRequest
|
|
3023
|
+
* @param {*} [options] Override http request option.
|
|
3024
|
+
* @throws {RequiredError}
|
|
3025
|
+
*/
|
|
3026
|
+
sendEmail: async (mailboxResourceId: string, v1SendRequest: V1SendRequest | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3027
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
3028
|
+
assertParamExists('sendEmail', 'mailboxResourceId', mailboxResourceId)
|
|
3029
|
+
// verify required parameter 'v1SendRequest' is not null or undefined
|
|
3030
|
+
assertParamExists('sendEmail', 'v1SendRequest', v1SendRequest)
|
|
3031
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/send`
|
|
3032
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
3033
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3034
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3035
|
+
let baseOptions;
|
|
3036
|
+
if (configuration) {
|
|
3037
|
+
baseOptions = configuration.baseOptions;
|
|
3038
|
+
}
|
|
3039
|
+
|
|
3040
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
3041
|
+
const localVarHeaderParameter = {} as any;
|
|
3042
|
+
const localVarQueryParameter = {} as any;
|
|
3043
|
+
|
|
3044
|
+
// authentication BearerAuth required
|
|
3045
|
+
// http bearer authentication required
|
|
3046
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3047
|
+
|
|
3048
|
+
|
|
3049
|
+
|
|
3050
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3051
|
+
|
|
3052
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3053
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3054
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3055
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1SendRequest, localVarRequestOptions, configuration)
|
|
3056
|
+
|
|
3057
|
+
return {
|
|
3058
|
+
url: toPathString(localVarUrlObj),
|
|
3059
|
+
options: localVarRequestOptions,
|
|
3060
|
+
};
|
|
3061
|
+
},
|
|
3062
|
+
}
|
|
3063
|
+
};
|
|
3064
|
+
|
|
3065
|
+
/**
|
|
3066
|
+
* SendApi - functional programming interface
|
|
3067
|
+
* @export
|
|
3068
|
+
*/
|
|
3069
|
+
export const SendApiFp = function(configuration?: Configuration) {
|
|
3070
|
+
const localVarAxiosParamCreator = SendApiAxiosParamCreator(configuration)
|
|
3071
|
+
return {
|
|
3072
|
+
/**
|
|
3073
|
+
* Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
|
|
3074
|
+
* @summary Send email
|
|
3075
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3076
|
+
* @param {V1SendRequest | null} v1SendRequest
|
|
3077
|
+
* @param {*} [options] Override http request option.
|
|
3078
|
+
* @throws {RequiredError}
|
|
3079
|
+
*/
|
|
3080
|
+
async sendEmail(mailboxResourceId: string, v1SendRequest: V1SendRequest | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
3081
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.sendEmail(mailboxResourceId, v1SendRequest, options);
|
|
3082
|
+
const localVarOperationServerBasePath = operationServerMap['SendApi.sendEmail']?.[0]?.url;
|
|
3083
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3084
|
+
},
|
|
3085
|
+
}
|
|
3086
|
+
};
|
|
3087
|
+
|
|
3088
|
+
/**
|
|
3089
|
+
* SendApi - factory interface
|
|
3090
|
+
* @export
|
|
3091
|
+
*/
|
|
3092
|
+
export const SendApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
3093
|
+
const localVarFp = SendApiFp(configuration)
|
|
3094
|
+
return {
|
|
3095
|
+
/**
|
|
3096
|
+
* Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
|
|
3097
|
+
* @summary Send email
|
|
3098
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3099
|
+
* @param {V1SendRequest | null} v1SendRequest
|
|
3100
|
+
* @param {*} [options] Override http request option.
|
|
3101
|
+
* @throws {RequiredError}
|
|
3102
|
+
*/
|
|
3103
|
+
sendEmail(mailboxResourceId: string, v1SendRequest: V1SendRequest | null, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
3104
|
+
return localVarFp.sendEmail(mailboxResourceId, v1SendRequest, options).then((request) => request(axios, basePath));
|
|
3105
|
+
},
|
|
3106
|
+
};
|
|
3107
|
+
};
|
|
3108
|
+
|
|
3109
|
+
/**
|
|
3110
|
+
* SendApi - object-oriented interface
|
|
3111
|
+
* @export
|
|
3112
|
+
* @class SendApi
|
|
3113
|
+
* @extends {BaseAPI}
|
|
3114
|
+
*/
|
|
3115
|
+
export class SendApi extends BaseAPI {
|
|
3116
|
+
/**
|
|
3117
|
+
* Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
|
|
3118
|
+
* @summary Send email
|
|
3119
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3120
|
+
* @param {V1SendRequest | null} v1SendRequest
|
|
3121
|
+
* @param {*} [options] Override http request option.
|
|
3122
|
+
* @throws {RequiredError}
|
|
3123
|
+
* @memberof SendApi
|
|
3124
|
+
*/
|
|
3125
|
+
public sendEmail(mailboxResourceId: string, v1SendRequest: V1SendRequest | null, options?: RawAxiosRequestConfig) {
|
|
3126
|
+
return SendApiFp(this.configuration).sendEmail(mailboxResourceId, v1SendRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3127
|
+
}
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3130
|
+
|
|
3131
|
+
|
|
3132
|
+
/**
|
|
3133
|
+
* WebhooksApi - axios parameter creator
|
|
3134
|
+
* @export
|
|
3135
|
+
*/
|
|
3136
|
+
export const WebhooksApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
3137
|
+
return {
|
|
3138
|
+
/**
|
|
3139
|
+
* Create a webhook. The response includes the one-time `secret` — store it securely as it is never returned again.
|
|
3140
|
+
* @summary Create webhook
|
|
3141
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3142
|
+
* @param {V1WebhooksCreateRequest} v1WebhooksCreateRequest
|
|
3143
|
+
* @param {*} [options] Override http request option.
|
|
3144
|
+
* @throws {RequiredError}
|
|
3145
|
+
*/
|
|
3146
|
+
createWebhook: async (mailboxResourceId: string, v1WebhooksCreateRequest: V1WebhooksCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3147
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
3148
|
+
assertParamExists('createWebhook', 'mailboxResourceId', mailboxResourceId)
|
|
3149
|
+
// verify required parameter 'v1WebhooksCreateRequest' is not null or undefined
|
|
3150
|
+
assertParamExists('createWebhook', 'v1WebhooksCreateRequest', v1WebhooksCreateRequest)
|
|
3151
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks`
|
|
3152
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
3153
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3154
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3155
|
+
let baseOptions;
|
|
3156
|
+
if (configuration) {
|
|
3157
|
+
baseOptions = configuration.baseOptions;
|
|
3158
|
+
}
|
|
3159
|
+
|
|
3160
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
3161
|
+
const localVarHeaderParameter = {} as any;
|
|
3162
|
+
const localVarQueryParameter = {} as any;
|
|
3163
|
+
|
|
3164
|
+
// authentication BearerAuth required
|
|
3165
|
+
// http bearer authentication required
|
|
3166
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3167
|
+
|
|
3168
|
+
|
|
3169
|
+
|
|
3170
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3171
|
+
|
|
3172
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3173
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3174
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3175
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1WebhooksCreateRequest, localVarRequestOptions, configuration)
|
|
3176
|
+
|
|
3177
|
+
return {
|
|
3178
|
+
url: toPathString(localVarUrlObj),
|
|
3179
|
+
options: localVarRequestOptions,
|
|
3180
|
+
};
|
|
3181
|
+
},
|
|
3182
|
+
/**
|
|
3183
|
+
* Delete a webhook.
|
|
3184
|
+
* @summary Delete webhook
|
|
3185
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3186
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3187
|
+
* @param {*} [options] Override http request option.
|
|
3188
|
+
* @throws {RequiredError}
|
|
3189
|
+
*/
|
|
3190
|
+
deleteWebhook: async (mailboxResourceId: string, webhook: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3191
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
3192
|
+
assertParamExists('deleteWebhook', 'mailboxResourceId', mailboxResourceId)
|
|
3193
|
+
// verify required parameter 'webhook' is not null or undefined
|
|
3194
|
+
assertParamExists('deleteWebhook', 'webhook', webhook)
|
|
3195
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
|
|
3196
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
3197
|
+
.replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
|
|
3198
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3199
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3200
|
+
let baseOptions;
|
|
3201
|
+
if (configuration) {
|
|
3202
|
+
baseOptions = configuration.baseOptions;
|
|
3203
|
+
}
|
|
3204
|
+
|
|
3205
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
3206
|
+
const localVarHeaderParameter = {} as any;
|
|
3207
|
+
const localVarQueryParameter = {} as any;
|
|
3208
|
+
|
|
3209
|
+
// authentication BearerAuth required
|
|
3210
|
+
// http bearer authentication required
|
|
3211
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3212
|
+
|
|
3213
|
+
|
|
3214
|
+
|
|
3215
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3216
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3217
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3218
|
+
|
|
3219
|
+
return {
|
|
3220
|
+
url: toPathString(localVarUrlObj),
|
|
3221
|
+
options: localVarRequestOptions,
|
|
3222
|
+
};
|
|
3223
|
+
},
|
|
3224
|
+
/**
|
|
3225
|
+
* Retrieve a single webhook by id.
|
|
3226
|
+
* @summary Get webhook
|
|
3227
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3228
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3229
|
+
* @param {*} [options] Override http request option.
|
|
3230
|
+
* @throws {RequiredError}
|
|
3231
|
+
*/
|
|
3232
|
+
getWebhook: async (mailboxResourceId: string, webhook: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3233
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
3234
|
+
assertParamExists('getWebhook', 'mailboxResourceId', mailboxResourceId)
|
|
3235
|
+
// verify required parameter 'webhook' is not null or undefined
|
|
3236
|
+
assertParamExists('getWebhook', 'webhook', webhook)
|
|
3237
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
|
|
3238
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
3239
|
+
.replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
|
|
3240
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3241
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3242
|
+
let baseOptions;
|
|
3243
|
+
if (configuration) {
|
|
3244
|
+
baseOptions = configuration.baseOptions;
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
3248
|
+
const localVarHeaderParameter = {} as any;
|
|
3249
|
+
const localVarQueryParameter = {} as any;
|
|
3250
|
+
|
|
3251
|
+
// authentication BearerAuth required
|
|
3252
|
+
// http bearer authentication required
|
|
3253
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3254
|
+
|
|
3255
|
+
|
|
3256
|
+
|
|
3257
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3258
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3259
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3260
|
+
|
|
3261
|
+
return {
|
|
3262
|
+
url: toPathString(localVarUrlObj),
|
|
3263
|
+
options: localVarRequestOptions,
|
|
3264
|
+
};
|
|
3265
|
+
},
|
|
3266
|
+
/**
|
|
3267
|
+
* List webhooks for a mailbox.
|
|
3268
|
+
* @summary List webhooks
|
|
3269
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3270
|
+
* @param {ListWebhooksStatusEnum} [status]
|
|
3271
|
+
* @param {number} [page]
|
|
3272
|
+
* @param {number} [perPage]
|
|
3273
|
+
* @param {*} [options] Override http request option.
|
|
3274
|
+
* @throws {RequiredError}
|
|
3275
|
+
*/
|
|
3276
|
+
listWebhooks: async (mailboxResourceId: string, status?: ListWebhooksStatusEnum, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3277
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
3278
|
+
assertParamExists('listWebhooks', 'mailboxResourceId', mailboxResourceId)
|
|
3279
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks`
|
|
3280
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
3281
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3282
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3283
|
+
let baseOptions;
|
|
3284
|
+
if (configuration) {
|
|
3285
|
+
baseOptions = configuration.baseOptions;
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3288
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
3289
|
+
const localVarHeaderParameter = {} as any;
|
|
3290
|
+
const localVarQueryParameter = {} as any;
|
|
3291
|
+
|
|
3292
|
+
// authentication BearerAuth required
|
|
3293
|
+
// http bearer authentication required
|
|
3294
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3295
|
+
|
|
3296
|
+
if (status !== undefined) {
|
|
3297
|
+
localVarQueryParameter['status'] = status;
|
|
3298
|
+
}
|
|
3299
|
+
|
|
3300
|
+
if (page !== undefined) {
|
|
3301
|
+
localVarQueryParameter['page'] = page;
|
|
3302
|
+
}
|
|
3303
|
+
|
|
3304
|
+
if (perPage !== undefined) {
|
|
3305
|
+
localVarQueryParameter['perPage'] = perPage;
|
|
3306
|
+
}
|
|
3307
|
+
|
|
3308
|
+
|
|
3309
|
+
|
|
3310
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3311
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3312
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3313
|
+
|
|
3314
|
+
return {
|
|
3315
|
+
url: toPathString(localVarUrlObj),
|
|
3316
|
+
options: localVarRequestOptions,
|
|
3317
|
+
};
|
|
3318
|
+
},
|
|
3319
|
+
/**
|
|
3320
|
+
* Regenerate the webhook secret. The previous secret is immediately invalidated. The new secret is returned once.
|
|
3321
|
+
* @summary Regenerate webhook secret
|
|
3322
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3323
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3324
|
+
* @param {*} [options] Override http request option.
|
|
3325
|
+
* @throws {RequiredError}
|
|
3326
|
+
*/
|
|
3327
|
+
regenerateWebhookSecret: async (mailboxResourceId: string, webhook: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3328
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
3329
|
+
assertParamExists('regenerateWebhookSecret', 'mailboxResourceId', mailboxResourceId)
|
|
3330
|
+
// verify required parameter 'webhook' is not null or undefined
|
|
3331
|
+
assertParamExists('regenerateWebhookSecret', 'webhook', webhook)
|
|
3332
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}/regenerate-secret`
|
|
3333
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
3334
|
+
.replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
|
|
3335
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3336
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3337
|
+
let baseOptions;
|
|
3338
|
+
if (configuration) {
|
|
3339
|
+
baseOptions = configuration.baseOptions;
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3342
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
3343
|
+
const localVarHeaderParameter = {} as any;
|
|
3344
|
+
const localVarQueryParameter = {} as any;
|
|
3345
|
+
|
|
3346
|
+
// authentication BearerAuth required
|
|
3347
|
+
// http bearer authentication required
|
|
3348
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3349
|
+
|
|
3350
|
+
|
|
3351
|
+
|
|
3352
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3353
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3354
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3355
|
+
|
|
3356
|
+
return {
|
|
3357
|
+
url: toPathString(localVarUrlObj),
|
|
3358
|
+
options: localVarRequestOptions,
|
|
3359
|
+
};
|
|
3360
|
+
},
|
|
3361
|
+
/**
|
|
3362
|
+
* Send a test delivery to the webhook URL and return the upstream response.
|
|
3363
|
+
* @summary Test webhook
|
|
3364
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3365
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3366
|
+
* @param {*} [options] Override http request option.
|
|
3367
|
+
* @throws {RequiredError}
|
|
3368
|
+
*/
|
|
3369
|
+
testWebhook: async (mailboxResourceId: string, webhook: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3370
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
3371
|
+
assertParamExists('testWebhook', 'mailboxResourceId', mailboxResourceId)
|
|
3372
|
+
// verify required parameter 'webhook' is not null or undefined
|
|
3373
|
+
assertParamExists('testWebhook', 'webhook', webhook)
|
|
3374
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}/test`
|
|
3375
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
3376
|
+
.replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
|
|
3377
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3378
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3379
|
+
let baseOptions;
|
|
3380
|
+
if (configuration) {
|
|
3381
|
+
baseOptions = configuration.baseOptions;
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3384
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
3385
|
+
const localVarHeaderParameter = {} as any;
|
|
3386
|
+
const localVarQueryParameter = {} as any;
|
|
3387
|
+
|
|
3388
|
+
// authentication BearerAuth required
|
|
3389
|
+
// http bearer authentication required
|
|
3390
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3391
|
+
|
|
3392
|
+
|
|
3393
|
+
|
|
3394
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3395
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3396
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3397
|
+
|
|
3398
|
+
return {
|
|
3399
|
+
url: toPathString(localVarUrlObj),
|
|
3400
|
+
options: localVarRequestOptions,
|
|
3401
|
+
};
|
|
3402
|
+
},
|
|
3403
|
+
/**
|
|
3404
|
+
* Partially update a webhook.
|
|
3405
|
+
* @summary Update webhook
|
|
3406
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3407
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3408
|
+
* @param {V1WebhooksUpdateRequest} v1WebhooksUpdateRequest
|
|
3409
|
+
* @param {*} [options] Override http request option.
|
|
3410
|
+
* @throws {RequiredError}
|
|
3411
|
+
*/
|
|
3412
|
+
updateWebhook: async (mailboxResourceId: string, webhook: string, v1WebhooksUpdateRequest: V1WebhooksUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3413
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
3414
|
+
assertParamExists('updateWebhook', 'mailboxResourceId', mailboxResourceId)
|
|
3415
|
+
// verify required parameter 'webhook' is not null or undefined
|
|
3416
|
+
assertParamExists('updateWebhook', 'webhook', webhook)
|
|
3417
|
+
// verify required parameter 'v1WebhooksUpdateRequest' is not null or undefined
|
|
3418
|
+
assertParamExists('updateWebhook', 'v1WebhooksUpdateRequest', v1WebhooksUpdateRequest)
|
|
3419
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
|
|
3420
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
|
|
3421
|
+
.replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
|
|
3422
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3423
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3424
|
+
let baseOptions;
|
|
3425
|
+
if (configuration) {
|
|
3426
|
+
baseOptions = configuration.baseOptions;
|
|
3427
|
+
}
|
|
3428
|
+
|
|
3429
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
3430
|
+
const localVarHeaderParameter = {} as any;
|
|
3431
|
+
const localVarQueryParameter = {} as any;
|
|
3432
|
+
|
|
3433
|
+
// authentication BearerAuth required
|
|
3434
|
+
// http bearer authentication required
|
|
3435
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3436
|
+
|
|
3437
|
+
|
|
3438
|
+
|
|
3439
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3440
|
+
|
|
3441
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3442
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3443
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3444
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1WebhooksUpdateRequest, localVarRequestOptions, configuration)
|
|
3445
|
+
|
|
3446
|
+
return {
|
|
3447
|
+
url: toPathString(localVarUrlObj),
|
|
3448
|
+
options: localVarRequestOptions,
|
|
3449
|
+
};
|
|
3450
|
+
},
|
|
3451
|
+
}
|
|
3452
|
+
};
|
|
3453
|
+
|
|
3454
|
+
/**
|
|
3455
|
+
* WebhooksApi - functional programming interface
|
|
3456
|
+
* @export
|
|
3457
|
+
*/
|
|
3458
|
+
export const WebhooksApiFp = function(configuration?: Configuration) {
|
|
3459
|
+
const localVarAxiosParamCreator = WebhooksApiAxiosParamCreator(configuration)
|
|
3460
|
+
return {
|
|
3461
|
+
/**
|
|
3462
|
+
* Create a webhook. The response includes the one-time `secret` — store it securely as it is never returned again.
|
|
3463
|
+
* @summary Create webhook
|
|
3464
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3465
|
+
* @param {V1WebhooksCreateRequest} v1WebhooksCreateRequest
|
|
3466
|
+
* @param {*} [options] Override http request option.
|
|
3467
|
+
* @throws {RequiredError}
|
|
3468
|
+
*/
|
|
3469
|
+
async createWebhook(mailboxResourceId: string, v1WebhooksCreateRequest: V1WebhooksCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1WebhooksResourceWithSecret>> {
|
|
3470
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createWebhook(mailboxResourceId, v1WebhooksCreateRequest, options);
|
|
3471
|
+
const localVarOperationServerBasePath = operationServerMap['WebhooksApi.createWebhook']?.[0]?.url;
|
|
3472
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3473
|
+
},
|
|
3474
|
+
/**
|
|
3475
|
+
* Delete a webhook.
|
|
3476
|
+
* @summary Delete webhook
|
|
3477
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3478
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3479
|
+
* @param {*} [options] Override http request option.
|
|
3480
|
+
* @throws {RequiredError}
|
|
3481
|
+
*/
|
|
3482
|
+
async deleteWebhook(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
3483
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWebhook(mailboxResourceId, webhook, options);
|
|
3484
|
+
const localVarOperationServerBasePath = operationServerMap['WebhooksApi.deleteWebhook']?.[0]?.url;
|
|
3485
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3486
|
+
},
|
|
3487
|
+
/**
|
|
3488
|
+
* Retrieve a single webhook by id.
|
|
3489
|
+
* @summary Get webhook
|
|
3490
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3491
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3492
|
+
* @param {*} [options] Override http request option.
|
|
3493
|
+
* @throws {RequiredError}
|
|
3494
|
+
*/
|
|
3495
|
+
async getWebhook(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1WebhooksResource>> {
|
|
3496
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getWebhook(mailboxResourceId, webhook, options);
|
|
3497
|
+
const localVarOperationServerBasePath = operationServerMap['WebhooksApi.getWebhook']?.[0]?.url;
|
|
3498
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3499
|
+
},
|
|
3500
|
+
/**
|
|
3501
|
+
* List webhooks for a mailbox.
|
|
3502
|
+
* @summary List webhooks
|
|
3503
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3504
|
+
* @param {ListWebhooksStatusEnum} [status]
|
|
3505
|
+
* @param {number} [page]
|
|
3506
|
+
* @param {number} [perPage]
|
|
3507
|
+
* @param {*} [options] Override http request option.
|
|
3508
|
+
* @throws {RequiredError}
|
|
3509
|
+
*/
|
|
3510
|
+
async listWebhooks(mailboxResourceId: string, status?: ListWebhooksStatusEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1WebhooksCollection>> {
|
|
3511
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listWebhooks(mailboxResourceId, status, page, perPage, options);
|
|
3512
|
+
const localVarOperationServerBasePath = operationServerMap['WebhooksApi.listWebhooks']?.[0]?.url;
|
|
3513
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3514
|
+
},
|
|
3515
|
+
/**
|
|
3516
|
+
* Regenerate the webhook secret. The previous secret is immediately invalidated. The new secret is returned once.
|
|
3517
|
+
* @summary Regenerate webhook secret
|
|
3518
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3519
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3520
|
+
* @param {*} [options] Override http request option.
|
|
3521
|
+
* @throws {RequiredError}
|
|
3522
|
+
*/
|
|
3523
|
+
async regenerateWebhookSecret(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1WebhooksResourceWithSecret>> {
|
|
3524
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.regenerateWebhookSecret(mailboxResourceId, webhook, options);
|
|
3525
|
+
const localVarOperationServerBasePath = operationServerMap['WebhooksApi.regenerateWebhookSecret']?.[0]?.url;
|
|
3526
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3527
|
+
},
|
|
3528
|
+
/**
|
|
3529
|
+
* Send a test delivery to the webhook URL and return the upstream response.
|
|
3530
|
+
* @summary Test webhook
|
|
3531
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3532
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3533
|
+
* @param {*} [options] Override http request option.
|
|
3534
|
+
* @throws {RequiredError}
|
|
3535
|
+
*/
|
|
3536
|
+
async testWebhook(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1WebhooksTestResult>> {
|
|
3537
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.testWebhook(mailboxResourceId, webhook, options);
|
|
3538
|
+
const localVarOperationServerBasePath = operationServerMap['WebhooksApi.testWebhook']?.[0]?.url;
|
|
3539
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3540
|
+
},
|
|
3541
|
+
/**
|
|
3542
|
+
* Partially update a webhook.
|
|
3543
|
+
* @summary Update webhook
|
|
3544
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3545
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3546
|
+
* @param {V1WebhooksUpdateRequest} v1WebhooksUpdateRequest
|
|
3547
|
+
* @param {*} [options] Override http request option.
|
|
3548
|
+
* @throws {RequiredError}
|
|
3549
|
+
*/
|
|
3550
|
+
async updateWebhook(mailboxResourceId: string, webhook: string, v1WebhooksUpdateRequest: V1WebhooksUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<V1WebhooksResource>> {
|
|
3551
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateWebhook(mailboxResourceId, webhook, v1WebhooksUpdateRequest, options);
|
|
3552
|
+
const localVarOperationServerBasePath = operationServerMap['WebhooksApi.updateWebhook']?.[0]?.url;
|
|
3553
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3554
|
+
},
|
|
3555
|
+
}
|
|
3556
|
+
};
|
|
3557
|
+
|
|
3558
|
+
/**
|
|
3559
|
+
* WebhooksApi - factory interface
|
|
3560
|
+
* @export
|
|
3561
|
+
*/
|
|
3562
|
+
export const WebhooksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
3563
|
+
const localVarFp = WebhooksApiFp(configuration)
|
|
3564
|
+
return {
|
|
3565
|
+
/**
|
|
3566
|
+
* Create a webhook. The response includes the one-time `secret` — store it securely as it is never returned again.
|
|
3567
|
+
* @summary Create webhook
|
|
3568
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3569
|
+
* @param {V1WebhooksCreateRequest} v1WebhooksCreateRequest
|
|
3570
|
+
* @param {*} [options] Override http request option.
|
|
3571
|
+
* @throws {RequiredError}
|
|
3572
|
+
*/
|
|
3573
|
+
createWebhook(mailboxResourceId: string, v1WebhooksCreateRequest: V1WebhooksCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<V1WebhooksResourceWithSecret> {
|
|
3574
|
+
return localVarFp.createWebhook(mailboxResourceId, v1WebhooksCreateRequest, options).then((request) => request(axios, basePath));
|
|
3575
|
+
},
|
|
3576
|
+
/**
|
|
3577
|
+
* Delete a webhook.
|
|
3578
|
+
* @summary Delete webhook
|
|
3579
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3580
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3581
|
+
* @param {*} [options] Override http request option.
|
|
3582
|
+
* @throws {RequiredError}
|
|
3583
|
+
*/
|
|
3584
|
+
deleteWebhook(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
3585
|
+
return localVarFp.deleteWebhook(mailboxResourceId, webhook, options).then((request) => request(axios, basePath));
|
|
3586
|
+
},
|
|
3587
|
+
/**
|
|
3588
|
+
* Retrieve a single webhook by id.
|
|
3589
|
+
* @summary Get webhook
|
|
3590
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3591
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3592
|
+
* @param {*} [options] Override http request option.
|
|
3593
|
+
* @throws {RequiredError}
|
|
3594
|
+
*/
|
|
3595
|
+
getWebhook(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig): AxiosPromise<V1WebhooksResource> {
|
|
3596
|
+
return localVarFp.getWebhook(mailboxResourceId, webhook, options).then((request) => request(axios, basePath));
|
|
3597
|
+
},
|
|
3598
|
+
/**
|
|
3599
|
+
* List webhooks for a mailbox.
|
|
3600
|
+
* @summary List webhooks
|
|
3601
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3602
|
+
* @param {ListWebhooksStatusEnum} [status]
|
|
3603
|
+
* @param {number} [page]
|
|
3604
|
+
* @param {number} [perPage]
|
|
3605
|
+
* @param {*} [options] Override http request option.
|
|
3606
|
+
* @throws {RequiredError}
|
|
3607
|
+
*/
|
|
3608
|
+
listWebhooks(mailboxResourceId: string, status?: ListWebhooksStatusEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<V1WebhooksCollection> {
|
|
3609
|
+
return localVarFp.listWebhooks(mailboxResourceId, status, page, perPage, options).then((request) => request(axios, basePath));
|
|
3610
|
+
},
|
|
3611
|
+
/**
|
|
3612
|
+
* Regenerate the webhook secret. The previous secret is immediately invalidated. The new secret is returned once.
|
|
3613
|
+
* @summary Regenerate webhook secret
|
|
3614
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3615
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3616
|
+
* @param {*} [options] Override http request option.
|
|
3617
|
+
* @throws {RequiredError}
|
|
3618
|
+
*/
|
|
3619
|
+
regenerateWebhookSecret(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig): AxiosPromise<V1WebhooksResourceWithSecret> {
|
|
3620
|
+
return localVarFp.regenerateWebhookSecret(mailboxResourceId, webhook, options).then((request) => request(axios, basePath));
|
|
3621
|
+
},
|
|
3622
|
+
/**
|
|
3623
|
+
* Send a test delivery to the webhook URL and return the upstream response.
|
|
3624
|
+
* @summary Test webhook
|
|
3625
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3626
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3627
|
+
* @param {*} [options] Override http request option.
|
|
3628
|
+
* @throws {RequiredError}
|
|
3629
|
+
*/
|
|
3630
|
+
testWebhook(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig): AxiosPromise<V1WebhooksTestResult> {
|
|
3631
|
+
return localVarFp.testWebhook(mailboxResourceId, webhook, options).then((request) => request(axios, basePath));
|
|
3632
|
+
},
|
|
3633
|
+
/**
|
|
3634
|
+
* Partially update a webhook.
|
|
3635
|
+
* @summary Update webhook
|
|
3636
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3637
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3638
|
+
* @param {V1WebhooksUpdateRequest} v1WebhooksUpdateRequest
|
|
3639
|
+
* @param {*} [options] Override http request option.
|
|
3640
|
+
* @throws {RequiredError}
|
|
3641
|
+
*/
|
|
3642
|
+
updateWebhook(mailboxResourceId: string, webhook: string, v1WebhooksUpdateRequest: V1WebhooksUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<V1WebhooksResource> {
|
|
3643
|
+
return localVarFp.updateWebhook(mailboxResourceId, webhook, v1WebhooksUpdateRequest, options).then((request) => request(axios, basePath));
|
|
3644
|
+
},
|
|
3645
|
+
};
|
|
3646
|
+
};
|
|
3647
|
+
|
|
3648
|
+
/**
|
|
3649
|
+
* WebhooksApi - object-oriented interface
|
|
3650
|
+
* @export
|
|
3651
|
+
* @class WebhooksApi
|
|
3652
|
+
* @extends {BaseAPI}
|
|
3653
|
+
*/
|
|
3654
|
+
export class WebhooksApi extends BaseAPI {
|
|
3655
|
+
/**
|
|
3656
|
+
* Create a webhook. The response includes the one-time `secret` — store it securely as it is never returned again.
|
|
3657
|
+
* @summary Create webhook
|
|
3658
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3659
|
+
* @param {V1WebhooksCreateRequest} v1WebhooksCreateRequest
|
|
3660
|
+
* @param {*} [options] Override http request option.
|
|
3661
|
+
* @throws {RequiredError}
|
|
3662
|
+
* @memberof WebhooksApi
|
|
3663
|
+
*/
|
|
3664
|
+
public createWebhook(mailboxResourceId: string, v1WebhooksCreateRequest: V1WebhooksCreateRequest, options?: RawAxiosRequestConfig) {
|
|
3665
|
+
return WebhooksApiFp(this.configuration).createWebhook(mailboxResourceId, v1WebhooksCreateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3666
|
+
}
|
|
3667
|
+
|
|
3668
|
+
/**
|
|
3669
|
+
* Delete a webhook.
|
|
3670
|
+
* @summary Delete webhook
|
|
3671
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3672
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3673
|
+
* @param {*} [options] Override http request option.
|
|
3674
|
+
* @throws {RequiredError}
|
|
3675
|
+
* @memberof WebhooksApi
|
|
3676
|
+
*/
|
|
3677
|
+
public deleteWebhook(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig) {
|
|
3678
|
+
return WebhooksApiFp(this.configuration).deleteWebhook(mailboxResourceId, webhook, options).then((request) => request(this.axios, this.basePath));
|
|
3679
|
+
}
|
|
3680
|
+
|
|
3681
|
+
/**
|
|
3682
|
+
* Retrieve a single webhook by id.
|
|
3683
|
+
* @summary Get webhook
|
|
3684
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3685
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3686
|
+
* @param {*} [options] Override http request option.
|
|
3687
|
+
* @throws {RequiredError}
|
|
3688
|
+
* @memberof WebhooksApi
|
|
3689
|
+
*/
|
|
3690
|
+
public getWebhook(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig) {
|
|
3691
|
+
return WebhooksApiFp(this.configuration).getWebhook(mailboxResourceId, webhook, options).then((request) => request(this.axios, this.basePath));
|
|
3692
|
+
}
|
|
3693
|
+
|
|
3694
|
+
/**
|
|
3695
|
+
* List webhooks for a mailbox.
|
|
3696
|
+
* @summary List webhooks
|
|
3697
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3698
|
+
* @param {ListWebhooksStatusEnum} [status]
|
|
3699
|
+
* @param {number} [page]
|
|
3700
|
+
* @param {number} [perPage]
|
|
3701
|
+
* @param {*} [options] Override http request option.
|
|
3702
|
+
* @throws {RequiredError}
|
|
3703
|
+
* @memberof WebhooksApi
|
|
3704
|
+
*/
|
|
3705
|
+
public listWebhooks(mailboxResourceId: string, status?: ListWebhooksStatusEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
|
|
3706
|
+
return WebhooksApiFp(this.configuration).listWebhooks(mailboxResourceId, status, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
3707
|
+
}
|
|
3708
|
+
|
|
3709
|
+
/**
|
|
3710
|
+
* Regenerate the webhook secret. The previous secret is immediately invalidated. The new secret is returned once.
|
|
3711
|
+
* @summary Regenerate webhook secret
|
|
3712
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3713
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3714
|
+
* @param {*} [options] Override http request option.
|
|
3715
|
+
* @throws {RequiredError}
|
|
3716
|
+
* @memberof WebhooksApi
|
|
3717
|
+
*/
|
|
3718
|
+
public regenerateWebhookSecret(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig) {
|
|
3719
|
+
return WebhooksApiFp(this.configuration).regenerateWebhookSecret(mailboxResourceId, webhook, options).then((request) => request(this.axios, this.basePath));
|
|
3720
|
+
}
|
|
3721
|
+
|
|
3722
|
+
/**
|
|
3723
|
+
* Send a test delivery to the webhook URL and return the upstream response.
|
|
3724
|
+
* @summary Test webhook
|
|
3725
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3726
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3727
|
+
* @param {*} [options] Override http request option.
|
|
3728
|
+
* @throws {RequiredError}
|
|
3729
|
+
* @memberof WebhooksApi
|
|
3730
|
+
*/
|
|
3731
|
+
public testWebhook(mailboxResourceId: string, webhook: string, options?: RawAxiosRequestConfig) {
|
|
3732
|
+
return WebhooksApiFp(this.configuration).testWebhook(mailboxResourceId, webhook, options).then((request) => request(this.axios, this.basePath));
|
|
3733
|
+
}
|
|
3734
|
+
|
|
3735
|
+
/**
|
|
3736
|
+
* Partially update a webhook.
|
|
3737
|
+
* @summary Update webhook
|
|
3738
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox.
|
|
3739
|
+
* @param {string} webhook Webhook identifier (UUID v7).
|
|
3740
|
+
* @param {V1WebhooksUpdateRequest} v1WebhooksUpdateRequest
|
|
3741
|
+
* @param {*} [options] Override http request option.
|
|
3742
|
+
* @throws {RequiredError}
|
|
3743
|
+
* @memberof WebhooksApi
|
|
3744
|
+
*/
|
|
3745
|
+
public updateWebhook(mailboxResourceId: string, webhook: string, v1WebhooksUpdateRequest: V1WebhooksUpdateRequest, options?: RawAxiosRequestConfig) {
|
|
3746
|
+
return WebhooksApiFp(this.configuration).updateWebhook(mailboxResourceId, webhook, v1WebhooksUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3747
|
+
}
|
|
3748
|
+
}
|
|
3749
|
+
|
|
3750
|
+
/**
|
|
3751
|
+
* @export
|
|
3752
|
+
*/
|
|
3753
|
+
export const ListWebhooksStatusEnum = {
|
|
3754
|
+
Active: 'active',
|
|
3755
|
+
Paused: 'paused',
|
|
3756
|
+
Disabled: 'disabled'
|
|
3757
|
+
} as const;
|
|
3758
|
+
export type ListWebhooksStatusEnum = typeof ListWebhooksStatusEnum[keyof typeof ListWebhooksStatusEnum];
|
|
3759
|
+
|
|
3760
|
+
|