@hostinger/mail-sdk 1.19.4 → 1.19.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api.ts +206 -67
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +149 -67
- package/dist/api.js +144 -30
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +149 -67
- package/dist/esm/api.js +139 -29
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/FeedbackApi.md +70 -0
- package/docs/MessagesApi.md +7 -7
- package/docs/SendApi.md +1 -0
- package/docs/V1FeedbackSubmitRequest.md +23 -0
- package/docs/V1FolderMessagesFlagsBulkRequest.md +2 -2
- package/docs/V1FolderMessagesFlagsRequest.md +2 -2
- package/docs/V1FolderMessagesSearchRequest.md +14 -14
- package/docs/V1SendAttachment.md +2 -2
- package/docs/V1SendRequest.md +8 -8
- package/docs/V1WebhooksCreateRequest.md +5 -5
- package/docs/V1WebhooksUpdateRequest.md +5 -5
- package/docs/WebhooksApi.md +6 -6
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger Mail API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.2.2
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -76,6 +76,25 @@ export interface Pagination {
|
|
|
76
76
|
*/
|
|
77
77
|
'totalPages': number;
|
|
78
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Feedback the user wants to send to the Hostinger mail team. The message is scrubbed of tokens, JWTs and key/secret/password values before validation and storage, so the length limit applies to the scrubbed text.
|
|
81
|
+
* @export
|
|
82
|
+
* @interface V1FeedbackSubmitRequest
|
|
83
|
+
*/
|
|
84
|
+
export interface V1FeedbackSubmitRequest {
|
|
85
|
+
/**
|
|
86
|
+
* The user\'s rating of the Hostinger Email API: 1 (poor) to 10 (excellent).
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof V1FeedbackSubmitRequest
|
|
89
|
+
*/
|
|
90
|
+
'score': number;
|
|
91
|
+
/**
|
|
92
|
+
* The user\'s feedback in their own words. Never include tokens, passwords or email contents.
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof V1FeedbackSubmitRequest
|
|
95
|
+
*/
|
|
96
|
+
'message': string;
|
|
97
|
+
}
|
|
79
98
|
/**
|
|
80
99
|
* Paginated list of messages.
|
|
81
100
|
* @export
|
|
@@ -121,13 +140,13 @@ export interface V1FolderMessagesFlagsBulkRequest {
|
|
|
121
140
|
*/
|
|
122
141
|
'uids': Array<number>;
|
|
123
142
|
/**
|
|
124
|
-
*
|
|
143
|
+
* IMAP flags to set on every listed message, e.g. \\Seen, \\Flagged, \\Answered, $forwarded.
|
|
125
144
|
* @type {Array<string>}
|
|
126
145
|
* @memberof V1FolderMessagesFlagsBulkRequest
|
|
127
146
|
*/
|
|
128
147
|
'addFlags': Array<string>;
|
|
129
148
|
/**
|
|
130
|
-
*
|
|
149
|
+
* IMAP flags to clear from every listed message.
|
|
131
150
|
* @type {Array<string>}
|
|
132
151
|
* @memberof V1FolderMessagesFlagsBulkRequest
|
|
133
152
|
*/
|
|
@@ -140,13 +159,13 @@ export interface V1FolderMessagesFlagsBulkRequest {
|
|
|
140
159
|
*/
|
|
141
160
|
export interface V1FolderMessagesFlagsRequest {
|
|
142
161
|
/**
|
|
143
|
-
*
|
|
162
|
+
* IMAP flags to set on the message, e.g. \\Seen, \\Flagged, \\Answered, $forwarded.
|
|
144
163
|
* @type {Array<string>}
|
|
145
164
|
* @memberof V1FolderMessagesFlagsRequest
|
|
146
165
|
*/
|
|
147
166
|
'addFlags': Array<string>;
|
|
148
167
|
/**
|
|
149
|
-
*
|
|
168
|
+
* IMAP flags to clear from the message.
|
|
150
169
|
* @type {Array<string>}
|
|
151
170
|
* @memberof V1FolderMessagesFlagsRequest
|
|
152
171
|
*/
|
|
@@ -383,85 +402,85 @@ export interface V1FolderMessagesResource {
|
|
|
383
402
|
'data': V1FolderMessagesMessage;
|
|
384
403
|
}
|
|
385
404
|
/**
|
|
386
|
-
* Search criteria. All fields optional
|
|
405
|
+
* Search criteria. All fields optional. subject, from, to, cc and body are alternatives (a message matching any one of them qualifies); all other fields are combined with AND.
|
|
387
406
|
* @export
|
|
388
407
|
* @interface V1FolderMessagesSearchRequest
|
|
389
408
|
*/
|
|
390
409
|
export interface V1FolderMessagesSearchRequest {
|
|
391
410
|
/**
|
|
392
|
-
*
|
|
411
|
+
* Only messages received on or after this date (YYYY-MM-DD).
|
|
393
412
|
* @type {string}
|
|
394
413
|
* @memberof V1FolderMessagesSearchRequest
|
|
395
414
|
*/
|
|
396
415
|
'since': string;
|
|
397
416
|
/**
|
|
398
|
-
*
|
|
417
|
+
* Only messages received before this date (YYYY-MM-DD).
|
|
399
418
|
* @type {string}
|
|
400
419
|
* @memberof V1FolderMessagesSearchRequest
|
|
401
420
|
*/
|
|
402
421
|
'before': string;
|
|
403
422
|
/**
|
|
404
|
-
*
|
|
423
|
+
* Only messages carrying all of these IMAP flags, e.g. \\Seen, \\Flagged, \\Answered, $forwarded.
|
|
405
424
|
* @type {Array<string>}
|
|
406
425
|
* @memberof V1FolderMessagesSearchRequest
|
|
407
426
|
*/
|
|
408
427
|
'flags': Array<string>;
|
|
409
428
|
/**
|
|
410
|
-
*
|
|
429
|
+
* IMAP UID set: single UID, range (1:100), open range (100:*), or comma-separated list.
|
|
411
430
|
* @type {string}
|
|
412
431
|
* @memberof V1FolderMessagesSearchRequest
|
|
413
432
|
*/
|
|
414
433
|
'uid': string;
|
|
415
434
|
/**
|
|
416
|
-
*
|
|
435
|
+
* Case-insensitive substring match on the Subject header. OR-combined with from/to/cc/body.
|
|
417
436
|
* @type {string}
|
|
418
437
|
* @memberof V1FolderMessagesSearchRequest
|
|
419
438
|
*/
|
|
420
439
|
'subject': string;
|
|
421
440
|
/**
|
|
422
|
-
*
|
|
441
|
+
* Case-insensitive substring match on the From header. OR-combined with subject/to/cc/body.
|
|
423
442
|
* @type {string}
|
|
424
443
|
* @memberof V1FolderMessagesSearchRequest
|
|
425
444
|
*/
|
|
426
445
|
'from': string;
|
|
427
446
|
/**
|
|
428
|
-
*
|
|
447
|
+
* Case-insensitive substring match on the To header. OR-combined with subject/from/cc/body.
|
|
429
448
|
* @type {string}
|
|
430
449
|
* @memberof V1FolderMessagesSearchRequest
|
|
431
450
|
*/
|
|
432
451
|
'to': string;
|
|
433
452
|
/**
|
|
434
|
-
*
|
|
453
|
+
* Case-insensitive substring match on the Cc header. OR-combined with subject/from/to/body.
|
|
435
454
|
* @type {string}
|
|
436
455
|
* @memberof V1FolderMessagesSearchRequest
|
|
437
456
|
*/
|
|
438
457
|
'cc': string;
|
|
439
458
|
/**
|
|
440
|
-
*
|
|
459
|
+
* Case-insensitive substring match on the message body only (headers excluded). OR-combined with subject/from/to/cc.
|
|
441
460
|
* @type {string}
|
|
442
461
|
* @memberof V1FolderMessagesSearchRequest
|
|
443
462
|
*/
|
|
444
463
|
'body': string;
|
|
445
464
|
/**
|
|
446
|
-
*
|
|
465
|
+
* Match a specific header as Name:value, e.g. X-Custom-Header:value. Value match is a substring.
|
|
447
466
|
* @type {string}
|
|
448
467
|
* @memberof V1FolderMessagesSearchRequest
|
|
449
468
|
*/
|
|
450
469
|
'header': string;
|
|
451
470
|
/**
|
|
452
|
-
*
|
|
471
|
+
* Only messages larger than this size in bytes.
|
|
453
472
|
* @type {number}
|
|
454
473
|
* @memberof V1FolderMessagesSearchRequest
|
|
455
474
|
*/
|
|
456
475
|
'larger': number;
|
|
457
476
|
/**
|
|
458
|
-
*
|
|
477
|
+
* Only messages smaller than this size in bytes.
|
|
459
478
|
* @type {number}
|
|
460
479
|
* @memberof V1FolderMessagesSearchRequest
|
|
461
480
|
*/
|
|
462
481
|
'smaller': number;
|
|
463
482
|
/**
|
|
464
|
-
*
|
|
483
|
+
* Case-insensitive substring match across headers and body.
|
|
465
484
|
* @type {string}
|
|
466
485
|
* @memberof V1FolderMessagesSearchRequest
|
|
467
486
|
*/
|
|
@@ -758,7 +777,7 @@ export interface V1QuotaResource {
|
|
|
758
777
|
*/
|
|
759
778
|
export interface V1SendAttachment {
|
|
760
779
|
/**
|
|
761
|
-
*
|
|
780
|
+
* File name shown to the recipient, including extension.
|
|
762
781
|
* @type {string}
|
|
763
782
|
* @memberof V1SendAttachment
|
|
764
783
|
*/
|
|
@@ -770,7 +789,7 @@ export interface V1SendAttachment {
|
|
|
770
789
|
*/
|
|
771
790
|
'content': string;
|
|
772
791
|
/**
|
|
773
|
-
*
|
|
792
|
+
* MIME type of the attachment, e.g. application/pdf. Not inferred from filename; set it explicitly so clients render the attachment correctly.
|
|
774
793
|
* @type {string}
|
|
775
794
|
* @memberof V1SendAttachment
|
|
776
795
|
*/
|
|
@@ -814,49 +833,49 @@ export interface V1SendMessageRef {
|
|
|
814
833
|
*/
|
|
815
834
|
export interface V1SendRequest {
|
|
816
835
|
/**
|
|
817
|
-
*
|
|
836
|
+
* Primary recipient email addresses.
|
|
818
837
|
* @type {Array<string>}
|
|
819
838
|
* @memberof V1SendRequest
|
|
820
839
|
*/
|
|
821
840
|
'to': Array<string>;
|
|
822
841
|
/**
|
|
823
|
-
*
|
|
842
|
+
* Sender display name shown in the From header alongside the mailbox address.
|
|
824
843
|
* @type {string}
|
|
825
844
|
* @memberof V1SendRequest
|
|
826
845
|
*/
|
|
827
846
|
'displayName': string;
|
|
828
847
|
/**
|
|
829
|
-
*
|
|
848
|
+
* Carbon-copy recipient email addresses.
|
|
830
849
|
* @type {Array<string>}
|
|
831
850
|
* @memberof V1SendRequest
|
|
832
851
|
*/
|
|
833
852
|
'cc': Array<string>;
|
|
834
853
|
/**
|
|
835
|
-
*
|
|
854
|
+
* Blind-carbon-copy recipient email addresses. Not visible to other recipients.
|
|
836
855
|
* @type {Array<string>}
|
|
837
856
|
* @memberof V1SendRequest
|
|
838
857
|
*/
|
|
839
858
|
'bcc': Array<string>;
|
|
840
859
|
/**
|
|
841
|
-
*
|
|
860
|
+
* Message subject line.
|
|
842
861
|
* @type {string}
|
|
843
862
|
* @memberof V1SendRequest
|
|
844
863
|
*/
|
|
845
864
|
'subject': string;
|
|
846
865
|
/**
|
|
847
|
-
*
|
|
866
|
+
* Plain-text body. Optional; if both text and html are omitted the message is sent without a body.
|
|
848
867
|
* @type {string}
|
|
849
868
|
* @memberof V1SendRequest
|
|
850
869
|
*/
|
|
851
870
|
'text': string;
|
|
852
871
|
/**
|
|
853
|
-
*
|
|
872
|
+
* HTML body. Optional; if both text and html are omitted the message is sent without a body. Inline images are referenced via cid: URLs matching attachment cid values.
|
|
854
873
|
* @type {string}
|
|
855
874
|
* @memberof V1SendRequest
|
|
856
875
|
*/
|
|
857
876
|
'html': string;
|
|
858
877
|
/**
|
|
859
|
-
*
|
|
878
|
+
* Files to attach. Inline images set cid; regular attachments omit it.
|
|
860
879
|
* @type {Array<V1SendAttachment>}
|
|
861
880
|
* @memberof V1SendRequest
|
|
862
881
|
*/
|
|
@@ -900,31 +919,31 @@ export interface V1WebhooksCollection {
|
|
|
900
919
|
*/
|
|
901
920
|
export interface V1WebhooksCreateRequest {
|
|
902
921
|
/**
|
|
903
|
-
*
|
|
922
|
+
* Human-readable webhook name.
|
|
904
923
|
* @type {string}
|
|
905
924
|
* @memberof V1WebhooksCreateRequest
|
|
906
925
|
*/
|
|
907
926
|
'name': string;
|
|
908
927
|
/**
|
|
909
|
-
*
|
|
928
|
+
* Optional free-text note about the webhook purpose.
|
|
910
929
|
* @type {string}
|
|
911
930
|
* @memberof V1WebhooksCreateRequest
|
|
912
931
|
*/
|
|
913
932
|
'description': string | null;
|
|
914
933
|
/**
|
|
915
|
-
*
|
|
934
|
+
* Event types that trigger a delivery.
|
|
916
935
|
* @type {Array<string>}
|
|
917
936
|
* @memberof V1WebhooksCreateRequest
|
|
918
937
|
*/
|
|
919
938
|
'events': Array<V1WebhooksCreateRequestEventsEnum>;
|
|
920
939
|
/**
|
|
921
|
-
*
|
|
940
|
+
* Initial delivery state. Only active webhooks receive events.
|
|
922
941
|
* @type {string}
|
|
923
942
|
* @memberof V1WebhooksCreateRequest
|
|
924
943
|
*/
|
|
925
944
|
'status': V1WebhooksCreateRequestStatusEnum;
|
|
926
945
|
/**
|
|
927
|
-
*
|
|
946
|
+
* HTTPS endpoint that receives POST deliveries, authenticated with the webhook secret as `Authorization: Bearer <secret>`. Must be a public domain name (no IPs or internal hosts).
|
|
928
947
|
* @type {string}
|
|
929
948
|
* @memberof V1WebhooksCreateRequest
|
|
930
949
|
*/
|
|
@@ -1015,31 +1034,31 @@ export interface V1WebhooksTestResultData {
|
|
|
1015
1034
|
*/
|
|
1016
1035
|
export interface V1WebhooksUpdateRequest {
|
|
1017
1036
|
/**
|
|
1018
|
-
*
|
|
1037
|
+
* Human-readable webhook name.
|
|
1019
1038
|
* @type {string}
|
|
1020
1039
|
* @memberof V1WebhooksUpdateRequest
|
|
1021
1040
|
*/
|
|
1022
1041
|
'name': string;
|
|
1023
1042
|
/**
|
|
1024
|
-
*
|
|
1043
|
+
* Free-text note about the webhook purpose. Send null to clear.
|
|
1025
1044
|
* @type {string}
|
|
1026
1045
|
* @memberof V1WebhooksUpdateRequest
|
|
1027
1046
|
*/
|
|
1028
1047
|
'description': string | null;
|
|
1029
1048
|
/**
|
|
1030
|
-
*
|
|
1049
|
+
* Event types that trigger a delivery. Replaces the current list.
|
|
1031
1050
|
* @type {Array<string>}
|
|
1032
1051
|
* @memberof V1WebhooksUpdateRequest
|
|
1033
1052
|
*/
|
|
1034
1053
|
'events': Array<V1WebhooksUpdateRequestEventsEnum>;
|
|
1035
1054
|
/**
|
|
1036
|
-
*
|
|
1055
|
+
* Delivery state. Only active webhooks receive events; paused keeps config but stops deliveries.
|
|
1037
1056
|
* @type {string}
|
|
1038
1057
|
* @memberof V1WebhooksUpdateRequest
|
|
1039
1058
|
*/
|
|
1040
1059
|
'status': V1WebhooksUpdateRequestStatusEnum;
|
|
1041
1060
|
/**
|
|
1042
|
-
*
|
|
1061
|
+
* HTTPS endpoint that receives POST deliveries, authenticated with the webhook secret as `Authorization: Bearer <secret>`. Must be a public domain name (no IPs or internal hosts).
|
|
1043
1062
|
* @type {string}
|
|
1044
1063
|
* @memberof V1WebhooksUpdateRequest
|
|
1045
1064
|
*/
|
|
@@ -1332,6 +1351,126 @@ export class AccountApi extends BaseAPI {
|
|
|
1332
1351
|
|
|
1333
1352
|
|
|
1334
1353
|
|
|
1354
|
+
/**
|
|
1355
|
+
* FeedbackApi - axios parameter creator
|
|
1356
|
+
* @export
|
|
1357
|
+
*/
|
|
1358
|
+
export const FeedbackApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1359
|
+
return {
|
|
1360
|
+
/**
|
|
1361
|
+
* Send the user\'s feedback about the Hostinger Email API to the Hostinger mail team. Only call this when the user explicitly asks to send feedback, report a problem, or request a feature. Send the user\'s own words; never include tokens, passwords or email contents. The message is capped at 2000 characters. A `429` (`ERR_FEEDBACK_RATE_LIMIT`) means feedback for this customer was submitted less than ten seconds ago; wait and retry.
|
|
1362
|
+
* @summary Submit feedback
|
|
1363
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the feedback is about, as returned by `GET /api/v1/me`.
|
|
1364
|
+
* @param {V1FeedbackSubmitRequest} v1FeedbackSubmitRequest
|
|
1365
|
+
* @param {*} [options] Override http request option.
|
|
1366
|
+
* @throws {RequiredError}
|
|
1367
|
+
*/
|
|
1368
|
+
submitFeedback: async (mailboxResourceId: string, v1FeedbackSubmitRequest: V1FeedbackSubmitRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1369
|
+
// verify required parameter 'mailboxResourceId' is not null or undefined
|
|
1370
|
+
assertParamExists('submitFeedback', 'mailboxResourceId', mailboxResourceId)
|
|
1371
|
+
// verify required parameter 'v1FeedbackSubmitRequest' is not null or undefined
|
|
1372
|
+
assertParamExists('submitFeedback', 'v1FeedbackSubmitRequest', v1FeedbackSubmitRequest)
|
|
1373
|
+
const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/feedback`
|
|
1374
|
+
.replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
|
|
1375
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1376
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1377
|
+
let baseOptions;
|
|
1378
|
+
if (configuration) {
|
|
1379
|
+
baseOptions = configuration.baseOptions;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
1383
|
+
const localVarHeaderParameter = {} as any;
|
|
1384
|
+
const localVarQueryParameter = {} as any;
|
|
1385
|
+
|
|
1386
|
+
// authentication BearerAuth required
|
|
1387
|
+
// http bearer authentication required
|
|
1388
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1389
|
+
|
|
1390
|
+
|
|
1391
|
+
|
|
1392
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1393
|
+
|
|
1394
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1395
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1396
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1397
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v1FeedbackSubmitRequest, localVarRequestOptions, configuration)
|
|
1398
|
+
|
|
1399
|
+
return {
|
|
1400
|
+
url: toPathString(localVarUrlObj),
|
|
1401
|
+
options: localVarRequestOptions,
|
|
1402
|
+
};
|
|
1403
|
+
},
|
|
1404
|
+
}
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* FeedbackApi - functional programming interface
|
|
1409
|
+
* @export
|
|
1410
|
+
*/
|
|
1411
|
+
export const FeedbackApiFp = function(configuration?: Configuration) {
|
|
1412
|
+
const localVarAxiosParamCreator = FeedbackApiAxiosParamCreator(configuration)
|
|
1413
|
+
return {
|
|
1414
|
+
/**
|
|
1415
|
+
* Send the user\'s feedback about the Hostinger Email API to the Hostinger mail team. Only call this when the user explicitly asks to send feedback, report a problem, or request a feature. Send the user\'s own words; never include tokens, passwords or email contents. The message is capped at 2000 characters. A `429` (`ERR_FEEDBACK_RATE_LIMIT`) means feedback for this customer was submitted less than ten seconds ago; wait and retry.
|
|
1416
|
+
* @summary Submit feedback
|
|
1417
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the feedback is about, as returned by `GET /api/v1/me`.
|
|
1418
|
+
* @param {V1FeedbackSubmitRequest} v1FeedbackSubmitRequest
|
|
1419
|
+
* @param {*} [options] Override http request option.
|
|
1420
|
+
* @throws {RequiredError}
|
|
1421
|
+
*/
|
|
1422
|
+
async submitFeedback(mailboxResourceId: string, v1FeedbackSubmitRequest: V1FeedbackSubmitRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
1423
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.submitFeedback(mailboxResourceId, v1FeedbackSubmitRequest, options);
|
|
1424
|
+
const localVarOperationServerBasePath = operationServerMap['FeedbackApi.submitFeedback']?.[0]?.url;
|
|
1425
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1426
|
+
},
|
|
1427
|
+
}
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* FeedbackApi - factory interface
|
|
1432
|
+
* @export
|
|
1433
|
+
*/
|
|
1434
|
+
export const FeedbackApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
1435
|
+
const localVarFp = FeedbackApiFp(configuration)
|
|
1436
|
+
return {
|
|
1437
|
+
/**
|
|
1438
|
+
* Send the user\'s feedback about the Hostinger Email API to the Hostinger mail team. Only call this when the user explicitly asks to send feedback, report a problem, or request a feature. Send the user\'s own words; never include tokens, passwords or email contents. The message is capped at 2000 characters. A `429` (`ERR_FEEDBACK_RATE_LIMIT`) means feedback for this customer was submitted less than ten seconds ago; wait and retry.
|
|
1439
|
+
* @summary Submit feedback
|
|
1440
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the feedback is about, as returned by `GET /api/v1/me`.
|
|
1441
|
+
* @param {V1FeedbackSubmitRequest} v1FeedbackSubmitRequest
|
|
1442
|
+
* @param {*} [options] Override http request option.
|
|
1443
|
+
* @throws {RequiredError}
|
|
1444
|
+
*/
|
|
1445
|
+
submitFeedback(mailboxResourceId: string, v1FeedbackSubmitRequest: V1FeedbackSubmitRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
1446
|
+
return localVarFp.submitFeedback(mailboxResourceId, v1FeedbackSubmitRequest, options).then((request) => request(axios, basePath));
|
|
1447
|
+
},
|
|
1448
|
+
};
|
|
1449
|
+
};
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* FeedbackApi - object-oriented interface
|
|
1453
|
+
* @export
|
|
1454
|
+
* @class FeedbackApi
|
|
1455
|
+
* @extends {BaseAPI}
|
|
1456
|
+
*/
|
|
1457
|
+
export class FeedbackApi extends BaseAPI {
|
|
1458
|
+
/**
|
|
1459
|
+
* Send the user\'s feedback about the Hostinger Email API to the Hostinger mail team. Only call this when the user explicitly asks to send feedback, report a problem, or request a feature. Send the user\'s own words; never include tokens, passwords or email contents. The message is capped at 2000 characters. A `429` (`ERR_FEEDBACK_RATE_LIMIT`) means feedback for this customer was submitted less than ten seconds ago; wait and retry.
|
|
1460
|
+
* @summary Submit feedback
|
|
1461
|
+
* @param {string} mailboxResourceId Resource ID of the managed mailbox the feedback is about, as returned by `GET /api/v1/me`.
|
|
1462
|
+
* @param {V1FeedbackSubmitRequest} v1FeedbackSubmitRequest
|
|
1463
|
+
* @param {*} [options] Override http request option.
|
|
1464
|
+
* @throws {RequiredError}
|
|
1465
|
+
* @memberof FeedbackApi
|
|
1466
|
+
*/
|
|
1467
|
+
public submitFeedback(mailboxResourceId: string, v1FeedbackSubmitRequest: V1FeedbackSubmitRequest, options?: RawAxiosRequestConfig) {
|
|
1468
|
+
return FeedbackApiFp(this.configuration).submitFeedback(mailboxResourceId, v1FeedbackSubmitRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
|
|
1335
1474
|
/**
|
|
1336
1475
|
* FoldersApi - axios parameter creator
|
|
1337
1476
|
* @export
|
|
@@ -2251,9 +2390,9 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
2251
2390
|
* @summary Search messages
|
|
2252
2391
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2253
2392
|
* @param {string} folder Folder path (URL-encoded).
|
|
2254
|
-
* @param {number} [page]
|
|
2255
|
-
* @param {number} [perPage]
|
|
2256
|
-
* @param {string} [sort]
|
|
2393
|
+
* @param {number} [page] Page number (1-based).
|
|
2394
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
2395
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
2257
2396
|
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
2258
2397
|
* @param {*} [options] Override http request option.
|
|
2259
2398
|
* @throws {RequiredError}
|
|
@@ -2309,7 +2448,7 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
2309
2448
|
},
|
|
2310
2449
|
/**
|
|
2311
2450
|
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
2312
|
-
* @summary Update
|
|
2451
|
+
* @summary Update flags on multiple messages
|
|
2313
2452
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2314
2453
|
* @param {string} folder Folder path (URL-encoded).
|
|
2315
2454
|
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
@@ -2528,9 +2667,9 @@ export const MessagesApiFp = function(configuration?: Configuration) {
|
|
|
2528
2667
|
* @summary Search messages
|
|
2529
2668
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2530
2669
|
* @param {string} folder Folder path (URL-encoded).
|
|
2531
|
-
* @param {number} [page]
|
|
2532
|
-
* @param {number} [perPage]
|
|
2533
|
-
* @param {string} [sort]
|
|
2670
|
+
* @param {number} [page] Page number (1-based).
|
|
2671
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
2672
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
2534
2673
|
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
2535
2674
|
* @param {*} [options] Override http request option.
|
|
2536
2675
|
* @throws {RequiredError}
|
|
@@ -2542,7 +2681,7 @@ export const MessagesApiFp = function(configuration?: Configuration) {
|
|
|
2542
2681
|
},
|
|
2543
2682
|
/**
|
|
2544
2683
|
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
2545
|
-
* @summary Update
|
|
2684
|
+
* @summary Update flags on multiple messages
|
|
2546
2685
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2547
2686
|
* @param {string} folder Folder path (URL-encoded).
|
|
2548
2687
|
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
@@ -2705,9 +2844,9 @@ export const MessagesApiFactory = function (configuration?: Configuration, baseP
|
|
|
2705
2844
|
* @summary Search messages
|
|
2706
2845
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2707
2846
|
* @param {string} folder Folder path (URL-encoded).
|
|
2708
|
-
* @param {number} [page]
|
|
2709
|
-
* @param {number} [perPage]
|
|
2710
|
-
* @param {string} [sort]
|
|
2847
|
+
* @param {number} [page] Page number (1-based).
|
|
2848
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
2849
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
2711
2850
|
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
2712
2851
|
* @param {*} [options] Override http request option.
|
|
2713
2852
|
* @throws {RequiredError}
|
|
@@ -2717,7 +2856,7 @@ export const MessagesApiFactory = function (configuration?: Configuration, baseP
|
|
|
2717
2856
|
},
|
|
2718
2857
|
/**
|
|
2719
2858
|
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
2720
|
-
* @summary Update
|
|
2859
|
+
* @summary Update flags on multiple messages
|
|
2721
2860
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2722
2861
|
* @param {string} folder Folder path (URL-encoded).
|
|
2723
2862
|
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
@@ -2900,9 +3039,9 @@ export class MessagesApi extends BaseAPI {
|
|
|
2900
3039
|
* @summary Search messages
|
|
2901
3040
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2902
3041
|
* @param {string} folder Folder path (URL-encoded).
|
|
2903
|
-
* @param {number} [page]
|
|
2904
|
-
* @param {number} [perPage]
|
|
2905
|
-
* @param {string} [sort]
|
|
3042
|
+
* @param {number} [page] Page number (1-based).
|
|
3043
|
+
* @param {number} [perPage] Items per page (max 100).
|
|
3044
|
+
* @param {string} [sort] Sort field with optional `-` prefix for descending. Allowed: uid, date, size.
|
|
2906
3045
|
* @param {V1FolderMessagesSearchRequest} [v1FolderMessagesSearchRequest]
|
|
2907
3046
|
* @param {*} [options] Override http request option.
|
|
2908
3047
|
* @throws {RequiredError}
|
|
@@ -2914,7 +3053,7 @@ export class MessagesApi extends BaseAPI {
|
|
|
2914
3053
|
|
|
2915
3054
|
/**
|
|
2916
3055
|
* Add and/or remove flags on multiple messages. Returns 200 when all UIDs succeed, 207 with per-UID outcome when some fail.
|
|
2917
|
-
* @summary Update
|
|
3056
|
+
* @summary Update flags on multiple messages
|
|
2918
3057
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
2919
3058
|
* @param {string} folder Folder path (URL-encoded).
|
|
2920
3059
|
* @param {V1FolderMessagesFlagsBulkRequest} v1FolderMessagesFlagsBulkRequest
|
|
@@ -3298,9 +3437,9 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
3298
3437
|
* List webhooks for a mailbox.
|
|
3299
3438
|
* @summary List webhooks
|
|
3300
3439
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3301
|
-
* @param {ListWebhooksStatusEnum} [status]
|
|
3302
|
-
* @param {number} [page]
|
|
3303
|
-
* @param {number} [perPage]
|
|
3440
|
+
* @param {ListWebhooksStatusEnum} [status] Return only webhooks with this status.
|
|
3441
|
+
* @param {number} [page] Page number (1-based).
|
|
3442
|
+
* @param {number} [perPage] Items per page (max 1000).
|
|
3304
3443
|
* @param {*} [options] Override http request option.
|
|
3305
3444
|
* @throws {RequiredError}
|
|
3306
3445
|
*/
|
|
@@ -3532,9 +3671,9 @@ export const WebhooksApiFp = function(configuration?: Configuration) {
|
|
|
3532
3671
|
* List webhooks for a mailbox.
|
|
3533
3672
|
* @summary List webhooks
|
|
3534
3673
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3535
|
-
* @param {ListWebhooksStatusEnum} [status]
|
|
3536
|
-
* @param {number} [page]
|
|
3537
|
-
* @param {number} [perPage]
|
|
3674
|
+
* @param {ListWebhooksStatusEnum} [status] Return only webhooks with this status.
|
|
3675
|
+
* @param {number} [page] Page number (1-based).
|
|
3676
|
+
* @param {number} [perPage] Items per page (max 1000).
|
|
3538
3677
|
* @param {*} [options] Override http request option.
|
|
3539
3678
|
* @throws {RequiredError}
|
|
3540
3679
|
*/
|
|
@@ -3630,9 +3769,9 @@ export const WebhooksApiFactory = function (configuration?: Configuration, baseP
|
|
|
3630
3769
|
* List webhooks for a mailbox.
|
|
3631
3770
|
* @summary List webhooks
|
|
3632
3771
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3633
|
-
* @param {ListWebhooksStatusEnum} [status]
|
|
3634
|
-
* @param {number} [page]
|
|
3635
|
-
* @param {number} [perPage]
|
|
3772
|
+
* @param {ListWebhooksStatusEnum} [status] Return only webhooks with this status.
|
|
3773
|
+
* @param {number} [page] Page number (1-based).
|
|
3774
|
+
* @param {number} [perPage] Items per page (max 1000).
|
|
3636
3775
|
* @param {*} [options] Override http request option.
|
|
3637
3776
|
* @throws {RequiredError}
|
|
3638
3777
|
*/
|
|
@@ -3726,9 +3865,9 @@ export class WebhooksApi extends BaseAPI {
|
|
|
3726
3865
|
* List webhooks for a mailbox.
|
|
3727
3866
|
* @summary List webhooks
|
|
3728
3867
|
* @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
|
|
3729
|
-
* @param {ListWebhooksStatusEnum} [status]
|
|
3730
|
-
* @param {number} [page]
|
|
3731
|
-
* @param {number} [perPage]
|
|
3868
|
+
* @param {ListWebhooksStatusEnum} [status] Return only webhooks with this status.
|
|
3869
|
+
* @param {number} [page] Page number (1-based).
|
|
3870
|
+
* @param {number} [perPage] Items per page (max 1000).
|
|
3732
3871
|
* @param {*} [options] Override http request option.
|
|
3733
3872
|
* @throws {RequiredError}
|
|
3734
3873
|
* @memberof WebhooksApi
|
package/base.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger Mail API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.2.2
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/common.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger Mail API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.2.2
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/configuration.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger Mail API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.2.2
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -48,7 +48,7 @@ export class Configuration {
|
|
|
48
48
|
this.baseOptions = {
|
|
49
49
|
...param.baseOptions,
|
|
50
50
|
headers: {
|
|
51
|
-
'User-Agent': "hostinger-mail-typescript-sdk/1.19.
|
|
51
|
+
'User-Agent': "hostinger-mail-typescript-sdk/1.19.6",
|
|
52
52
|
...param.baseOptions?.headers,
|
|
53
53
|
},
|
|
54
54
|
};
|