@hostinger/mail-sdk 1.19.6 → 1.19.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger Mail API
5
5
  *
6
- * API Version: 1.2.2
6
+ * API Version: 1.3.0
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
@@ -20,7 +20,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
20
20
  import globalAxios from 'axios';
21
21
  // Some imports not used depending on template conditions
22
22
  // @ts-ignore
23
- import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
23
+ import { DUMMY_BASE_URL, assertParamExists, encodePathParam, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
24
24
  // @ts-ignore
25
25
  import { BASE_PATH, BaseAPI, operationServerMap } from './base';
26
26
  export const V1WebhooksCreateRequestEventsEnum = {
@@ -170,7 +170,7 @@ export const FeedbackApiAxiosParamCreator = function (configuration) {
170
170
  // verify required parameter 'v1FeedbackSubmitRequest' is not null or undefined
171
171
  assertParamExists('submitFeedback', 'v1FeedbackSubmitRequest', v1FeedbackSubmitRequest);
172
172
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/feedback`
173
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
173
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
174
174
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
175
175
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
176
176
  let baseOptions;
@@ -280,7 +280,7 @@ export const FoldersApiAxiosParamCreator = function (configuration) {
280
280
  // verify required parameter 'v1FoldersCreateRequest' is not null or undefined
281
281
  assertParamExists('createFolder', 'v1FoldersCreateRequest', v1FoldersCreateRequest);
282
282
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders`
283
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
283
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
284
284
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
285
285
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
286
286
  let baseOptions;
@@ -317,8 +317,8 @@ export const FoldersApiAxiosParamCreator = function (configuration) {
317
317
  // verify required parameter 'folder' is not null or undefined
318
318
  assertParamExists('deleteFolder', 'folder', folder);
319
319
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}`
320
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
321
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
320
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
321
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
322
322
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
323
323
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
324
324
  let baseOptions;
@@ -352,7 +352,7 @@ export const FoldersApiAxiosParamCreator = function (configuration) {
352
352
  // verify required parameter 'mailboxResourceId' is not null or undefined
353
353
  assertParamExists('listFolders', 'mailboxResourceId', mailboxResourceId);
354
354
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders`
355
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
355
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
356
356
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
357
357
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
358
358
  let baseOptions;
@@ -396,8 +396,8 @@ export const FoldersApiAxiosParamCreator = function (configuration) {
396
396
  // verify required parameter 'v1FoldersUpdateRequest' is not null or undefined
397
397
  assertParamExists('updateFolder', 'v1FoldersUpdateRequest', v1FoldersUpdateRequest);
398
398
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}`
399
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
400
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
399
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
400
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
401
401
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
402
402
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
403
403
  let baseOptions;
@@ -630,8 +630,8 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
630
630
  // verify required parameter 'folder' is not null or undefined
631
631
  assertParamExists('deleteAllMessages', 'folder', folder);
632
632
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages`
633
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
634
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
633
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
634
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
635
635
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
636
636
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
637
637
  let baseOptions;
@@ -669,9 +669,9 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
669
669
  // verify required parameter 'uid' is not null or undefined
670
670
  assertParamExists('deleteMessage', 'uid', uid);
671
671
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
672
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
673
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
674
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
672
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
673
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
674
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
675
675
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
676
676
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
677
677
  let baseOptions;
@@ -709,8 +709,8 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
709
709
  // verify required parameter 'v1FolderMessagesDeleteBulkRequest' is not null or undefined
710
710
  assertParamExists('deleteMessages', 'v1FolderMessagesDeleteBulkRequest', v1FolderMessagesDeleteBulkRequest);
711
711
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/delete`
712
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
713
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
712
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
713
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
714
714
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
715
715
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
716
716
  let baseOptions;
@@ -750,9 +750,9 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
750
750
  // verify required parameter 'uid' is not null or undefined
751
751
  assertParamExists('getMessage', 'uid', uid);
752
752
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
753
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
754
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
755
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
753
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
754
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
755
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
756
756
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
757
757
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
758
758
  let baseOptions;
@@ -793,10 +793,10 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
793
793
  // verify required parameter 'attachmentId' is not null or undefined
794
794
  assertParamExists('getMessageAttachment', 'attachmentId', attachmentId);
795
795
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/attachments/{attachmentId}`
796
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
797
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
798
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)))
799
- .replace(`{${"attachmentId"}}`, encodeURIComponent(String(attachmentId)));
796
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
797
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
798
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid))
799
+ .replace(`{${"attachmentId"}}`, encodePathParam('attachmentId', attachmentId));
800
800
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
801
801
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
802
802
  let baseOptions;
@@ -818,7 +818,7 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
818
818
  };
819
819
  }),
820
820
  /**
821
- * Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
821
+ * Retrieve raw RFC822 source of a message as `message/rfc822` attachment. Does not change the message `\\Seen` flag.
822
822
  * @summary Get message source
823
823
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
824
824
  * @param {string} folder Folder path (URL-encoded).
@@ -834,9 +834,9 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
834
834
  // verify required parameter 'uid' is not null or undefined
835
835
  assertParamExists('getMessageSource', 'uid', uid);
836
836
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/source`
837
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
838
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
839
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
837
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
838
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
839
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
840
840
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
841
841
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
842
842
  let baseOptions;
@@ -858,7 +858,7 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
858
858
  };
859
859
  }),
860
860
  /**
861
- * Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
861
+ * Retrieve rendered text (plain + HTML) of a message. Does not change the message `\\Seen` flag.
862
862
  * @summary Get message text content
863
863
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
864
864
  * @param {string} folder Folder path (URL-encoded).
@@ -874,9 +874,9 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
874
874
  // verify required parameter 'uid' is not null or undefined
875
875
  assertParamExists('getMessageText', 'uid', uid);
876
876
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/text`
877
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
878
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
879
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
877
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
878
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
879
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
880
880
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
881
881
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
882
882
  let baseOptions;
@@ -914,8 +914,8 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
914
914
  // verify required parameter 'folder' is not null or undefined
915
915
  assertParamExists('listMessages', 'folder', folder);
916
916
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages`
917
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
918
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
917
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
918
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
919
919
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
920
920
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
921
921
  let baseOptions;
@@ -965,9 +965,9 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
965
965
  // verify required parameter 'v1FolderMessagesMoveRequest' is not null or undefined
966
966
  assertParamExists('moveMessage', 'v1FolderMessagesMoveRequest', v1FolderMessagesMoveRequest);
967
967
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/move`
968
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
969
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
970
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
968
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
969
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
970
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
971
971
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
972
972
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
973
973
  let baseOptions;
@@ -1007,8 +1007,8 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
1007
1007
  // verify required parameter 'v1FolderMessagesMoveBulkRequest' is not null or undefined
1008
1008
  assertParamExists('moveMessages', 'v1FolderMessagesMoveBulkRequest', v1FolderMessagesMoveBulkRequest);
1009
1009
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/move`
1010
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
1011
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
1010
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1011
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
1012
1012
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1013
1013
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1014
1014
  let baseOptions;
@@ -1051,9 +1051,9 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
1051
1051
  // verify required parameter 'v1FolderMessagesFlagsRequest' is not null or undefined
1052
1052
  assertParamExists('patchMessage', 'v1FolderMessagesFlagsRequest', v1FolderMessagesFlagsRequest);
1053
1053
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
1054
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
1055
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
1056
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
1054
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1055
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
1056
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
1057
1057
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1058
1058
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1059
1059
  let baseOptions;
@@ -1094,8 +1094,8 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
1094
1094
  // verify required parameter 'folder' is not null or undefined
1095
1095
  assertParamExists('searchMessages', 'folder', folder);
1096
1096
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/search`
1097
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
1098
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
1097
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1098
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
1099
1099
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1100
1100
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1101
1101
  let baseOptions;
@@ -1144,8 +1144,8 @@ export const MessagesApiAxiosParamCreator = function (configuration) {
1144
1144
  // verify required parameter 'v1FolderMessagesFlagsBulkRequest' is not null or undefined
1145
1145
  assertParamExists('updateMessageFlags', 'v1FolderMessagesFlagsBulkRequest', v1FolderMessagesFlagsBulkRequest);
1146
1146
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/flags`
1147
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
1148
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
1147
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1148
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
1149
1149
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1150
1150
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1151
1151
  let baseOptions;
@@ -1263,7 +1263,7 @@ export const MessagesApiFp = function (configuration) {
1263
1263
  });
1264
1264
  },
1265
1265
  /**
1266
- * Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
1266
+ * Retrieve raw RFC822 source of a message as `message/rfc822` attachment. Does not change the message `\\Seen` flag.
1267
1267
  * @summary Get message source
1268
1268
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1269
1269
  * @param {string} folder Folder path (URL-encoded).
@@ -1280,7 +1280,7 @@ export const MessagesApiFp = function (configuration) {
1280
1280
  });
1281
1281
  },
1282
1282
  /**
1283
- * Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
1283
+ * Retrieve rendered text (plain + HTML) of a message. Does not change the message `\\Seen` flag.
1284
1284
  * @summary Get message text content
1285
1285
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1286
1286
  * @param {string} folder Folder path (URL-encoded).
@@ -1475,7 +1475,7 @@ export const MessagesApiFactory = function (configuration, basePath, axios) {
1475
1475
  return localVarFp.getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options).then((request) => request(axios, basePath));
1476
1476
  },
1477
1477
  /**
1478
- * Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
1478
+ * Retrieve raw RFC822 source of a message as `message/rfc822` attachment. Does not change the message `\\Seen` flag.
1479
1479
  * @summary Get message source
1480
1480
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1481
1481
  * @param {string} folder Folder path (URL-encoded).
@@ -1487,7 +1487,7 @@ export const MessagesApiFactory = function (configuration, basePath, axios) {
1487
1487
  return localVarFp.getMessageSource(mailboxResourceId, folder, uid, options).then((request) => request(axios, basePath));
1488
1488
  },
1489
1489
  /**
1490
- * Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
1490
+ * Retrieve rendered text (plain + HTML) of a message. Does not change the message `\\Seen` flag.
1491
1491
  * @summary Get message text content
1492
1492
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1493
1493
  * @param {string} folder Folder path (URL-encoded).
@@ -1652,7 +1652,7 @@ export class MessagesApi extends BaseAPI {
1652
1652
  return MessagesApiFp(this.configuration).getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options).then((request) => request(this.axios, this.basePath));
1653
1653
  }
1654
1654
  /**
1655
- * Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
1655
+ * Retrieve raw RFC822 source of a message as `message/rfc822` attachment. Does not change the message `\\Seen` flag.
1656
1656
  * @summary Get message source
1657
1657
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1658
1658
  * @param {string} folder Folder path (URL-encoded).
@@ -1665,7 +1665,7 @@ export class MessagesApi extends BaseAPI {
1665
1665
  return MessagesApiFp(this.configuration).getMessageSource(mailboxResourceId, folder, uid, options).then((request) => request(this.axios, this.basePath));
1666
1666
  }
1667
1667
  /**
1668
- * Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
1668
+ * Retrieve rendered text (plain + HTML) of a message. Does not change the message `\\Seen` flag.
1669
1669
  * @summary Get message text content
1670
1670
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1671
1671
  * @param {string} folder Folder path (URL-encoded).
@@ -1780,7 +1780,7 @@ export const QuotaApiAxiosParamCreator = function (configuration) {
1780
1780
  // verify required parameter 'mailboxResourceId' is not null or undefined
1781
1781
  assertParamExists('getQuota', 'mailboxResourceId', mailboxResourceId);
1782
1782
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/quota`
1783
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
1783
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
1784
1784
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1785
1785
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1786
1786
  let baseOptions;
@@ -1875,7 +1875,7 @@ export const SendApiAxiosParamCreator = function (configuration) {
1875
1875
  * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
1876
1876
  * @summary Send email
1877
1877
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1878
- * @param {V1SendRequest | null} v1SendRequest
1878
+ * @param {V1SendRequest} v1SendRequest
1879
1879
  * @param {*} [options] Override http request option.
1880
1880
  * @throws {RequiredError}
1881
1881
  */
@@ -1885,7 +1885,7 @@ export const SendApiAxiosParamCreator = function (configuration) {
1885
1885
  // verify required parameter 'v1SendRequest' is not null or undefined
1886
1886
  assertParamExists('sendEmail', 'v1SendRequest', v1SendRequest);
1887
1887
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/send`
1888
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
1888
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
1889
1889
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1890
1890
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1891
1891
  let baseOptions;
@@ -1921,7 +1921,7 @@ export const SendApiFp = function (configuration) {
1921
1921
  * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
1922
1922
  * @summary Send email
1923
1923
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1924
- * @param {V1SendRequest | null} v1SendRequest
1924
+ * @param {V1SendRequest} v1SendRequest
1925
1925
  * @param {*} [options] Override http request option.
1926
1926
  * @throws {RequiredError}
1927
1927
  */
@@ -1946,7 +1946,7 @@ export const SendApiFactory = function (configuration, basePath, axios) {
1946
1946
  * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
1947
1947
  * @summary Send email
1948
1948
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1949
- * @param {V1SendRequest | null} v1SendRequest
1949
+ * @param {V1SendRequest} v1SendRequest
1950
1950
  * @param {*} [options] Override http request option.
1951
1951
  * @throws {RequiredError}
1952
1952
  */
@@ -1966,7 +1966,7 @@ export class SendApi extends BaseAPI {
1966
1966
  * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
1967
1967
  * @summary Send email
1968
1968
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1969
- * @param {V1SendRequest | null} v1SendRequest
1969
+ * @param {V1SendRequest} v1SendRequest
1970
1970
  * @param {*} [options] Override http request option.
1971
1971
  * @throws {RequiredError}
1972
1972
  * @memberof SendApi
@@ -1995,7 +1995,7 @@ export const WebhooksApiAxiosParamCreator = function (configuration) {
1995
1995
  // verify required parameter 'v1WebhooksCreateRequest' is not null or undefined
1996
1996
  assertParamExists('createWebhook', 'v1WebhooksCreateRequest', v1WebhooksCreateRequest);
1997
1997
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks`
1998
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
1998
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
1999
1999
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2000
2000
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2001
2001
  let baseOptions;
@@ -2032,8 +2032,8 @@ export const WebhooksApiAxiosParamCreator = function (configuration) {
2032
2032
  // verify required parameter 'webhook' is not null or undefined
2033
2033
  assertParamExists('deleteWebhook', 'webhook', webhook);
2034
2034
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
2035
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2036
- .replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
2035
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2036
+ .replace(`{${"webhook"}}`, encodePathParam('webhook', webhook));
2037
2037
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2038
2038
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2039
2039
  let baseOptions;
@@ -2068,8 +2068,8 @@ export const WebhooksApiAxiosParamCreator = function (configuration) {
2068
2068
  // verify required parameter 'webhook' is not null or undefined
2069
2069
  assertParamExists('getWebhook', 'webhook', webhook);
2070
2070
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
2071
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2072
- .replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
2071
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2072
+ .replace(`{${"webhook"}}`, encodePathParam('webhook', webhook));
2073
2073
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2074
2074
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2075
2075
  let baseOptions;
@@ -2104,7 +2104,7 @@ export const WebhooksApiAxiosParamCreator = function (configuration) {
2104
2104
  // verify required parameter 'mailboxResourceId' is not null or undefined
2105
2105
  assertParamExists('listWebhooks', 'mailboxResourceId', mailboxResourceId);
2106
2106
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks`
2107
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
2107
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
2108
2108
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2109
2109
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2110
2110
  let baseOptions;
@@ -2148,8 +2148,8 @@ export const WebhooksApiAxiosParamCreator = function (configuration) {
2148
2148
  // verify required parameter 'webhook' is not null or undefined
2149
2149
  assertParamExists('regenerateWebhookSecret', 'webhook', webhook);
2150
2150
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}/regenerate-secret`
2151
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2152
- .replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
2151
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2152
+ .replace(`{${"webhook"}}`, encodePathParam('webhook', webhook));
2153
2153
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2154
2154
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2155
2155
  let baseOptions;
@@ -2184,8 +2184,8 @@ export const WebhooksApiAxiosParamCreator = function (configuration) {
2184
2184
  // verify required parameter 'webhook' is not null or undefined
2185
2185
  assertParamExists('testWebhook', 'webhook', webhook);
2186
2186
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}/test`
2187
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2188
- .replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
2187
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2188
+ .replace(`{${"webhook"}}`, encodePathParam('webhook', webhook));
2189
2189
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2190
2190
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2191
2191
  let baseOptions;
@@ -2223,8 +2223,8 @@ export const WebhooksApiAxiosParamCreator = function (configuration) {
2223
2223
  // verify required parameter 'v1WebhooksUpdateRequest' is not null or undefined
2224
2224
  assertParamExists('updateWebhook', 'v1WebhooksUpdateRequest', v1WebhooksUpdateRequest);
2225
2225
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
2226
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2227
- .replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
2226
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2227
+ .replace(`{${"webhook"}}`, encodePathParam('webhook', webhook));
2228
2228
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2229
2229
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2230
2230
  let baseOptions;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger Mail API
3
3
  *
4
- * API Version: 1.2.2
4
+ * API Version: 1.3.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/base.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger Mail API
5
5
  *
6
- * API Version: 1.2.2
6
+ * API Version: 1.3.0
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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger Mail API
3
3
  *
4
- * API Version: 1.2.2
4
+ * API Version: 1.3.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -20,6 +20,12 @@ export declare const DUMMY_BASE_URL = "https://example.com";
20
20
  * @export
21
21
  */
22
22
  export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
23
+ /**
24
+ * Empty values and dot segments survive encoding and collapse or resolve away, which would change the endpoint.
25
+ * @throws {RequiredError}
26
+ * @export
27
+ */
28
+ export declare const encodePathParam: (paramName: string, paramValue: unknown) => string;
23
29
  /**
24
30
  *
25
31
  * @export
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger Mail API
5
5
  *
6
- * API Version: 1.2.2
6
+ * API Version: 1.3.0
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
@@ -33,6 +33,18 @@ export const assertParamExists = function (functionName, paramName, paramValue)
33
33
  throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
34
34
  }
35
35
  };
36
+ /**
37
+ * Empty values and dot segments survive encoding and collapse or resolve away, which would change the endpoint.
38
+ * @throws {RequiredError}
39
+ * @export
40
+ */
41
+ export const encodePathParam = function (paramName, paramValue) {
42
+ const value = String(paramValue);
43
+ if (value === '' || value === '.' || value === '..') {
44
+ throw new RequiredError(paramName, `Invalid value for path parameter ${paramName}.`);
45
+ }
46
+ return encodeURIComponent(value);
47
+ };
36
48
  /**
37
49
  *
38
50
  * @export
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger Mail API
3
3
  *
4
- * API Version: 1.2.2
4
+ * API Version: 1.3.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger Mail API
5
5
  *
6
- * API Version: 1.2.2
6
+ * API Version: 1.3.0
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
@@ -13,7 +13,7 @@ export class Configuration {
13
13
  var _a;
14
14
  this.accessToken = param.accessToken;
15
15
  this.basePath = param.basePath;
16
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-mail-typescript-sdk/1.19.6" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
16
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-mail-typescript-sdk/1.19.8" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
17
17
  this.formDataCtor = param.formDataCtor;
18
18
  }
19
19
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger Mail API
3
3
  *
4
- * API Version: 1.2.2
4
+ * API Version: 1.3.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger Mail API
5
5
  *
6
- * API Version: 1.2.2
6
+ * API Version: 1.3.0
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/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger Mail API
3
3
  *
4
- * API Version: 1.2.2
4
+ * API Version: 1.3.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger Mail API
6
6
  *
7
- * API Version: 1.2.2
7
+ * API Version: 1.3.0
8
8
  *
9
9
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
10
10
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -335,7 +335,7 @@ const { status, data } = await apiInstance.getMessageAttachment(
335
335
  # **getMessageSource**
336
336
  > File getMessageSource()
337
337
 
338
- Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
338
+ Retrieve raw RFC822 source of a message as `message/rfc822` attachment. Does not change the message `\\Seen` flag.
339
339
 
340
340
  ### Example
341
341
 
@@ -398,7 +398,7 @@ const { status, data } = await apiInstance.getMessageSource(
398
398
  # **getMessageText**
399
399
  > V1FolderMessagesMessageTextResource getMessageText()
400
400
 
401
- Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
401
+ Retrieve rendered text (plain + HTML) of a message. Does not change the message `\\Seen` flag.
402
402
 
403
403
  ### Example
404
404
 
@@ -14,8 +14,8 @@ Name | Type | Description | Notes
14
14
  **text** | **string** | Plain-text body. Optional; if both text and html are omitted the message is sent without a body. | [optional] [default to undefined]
15
15
  **html** | **string** | 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. | [optional] [default to undefined]
16
16
  **attachments** | [**Array<V1SendAttachment>**](V1SendAttachment.md) | Files to attach. Inline images set cid; regular attachments omit it. | [optional] [default to undefined]
17
- **inReplyTo** | [**V1SendMessageRef**](V1SendMessageRef.md) | Source message this is a reply to. Copies its Message-Id/References into In-Reply-To/References and flags it \\Answered. Mutually exclusive with forwardOf. | [optional] [default to undefined]
18
- **forwardOf** | [**V1SendMessageRef**](V1SendMessageRef.md) | Source message this forwards. Copies its Message-Id/References into In-Reply-To/References and flags it $forwarded. Mutually exclusive with inReplyTo. | [optional] [default to undefined]
17
+ **inReplyTo** | [**V1SendMessageRef**](V1SendMessageRef.md) | Source message this is a reply to, as an object {uid, folder} — not the Message-ID header string. Copies its Message-Id/References into In-Reply-To/References and flags it \\Answered. Mutually exclusive with forwardOf. | [optional] [default to undefined]
18
+ **forwardOf** | [**V1SendMessageRef**](V1SendMessageRef.md) | Source message this forwards, as an object {uid, folder} — not the Message-ID header string. Copies its Message-Id/References into In-Reply-To/References and flags it $forwarded. Mutually exclusive with inReplyTo. | [optional] [default to undefined]
19
19
 
20
20
  ## Example
21
21
 
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger Mail API
5
5
  *
6
- * API Version: 1.2.2
6
+ * API Version: 1.3.0
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostinger/mail-sdk",
3
- "version": "1.19.6",
3
+ "version": "1.19.8",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "axios": "^1.8.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@types/node": "12.11.5 - 26.6.5",
31
+ "@types/node": "12.11.5 - 26.6.7",
32
32
  "typescript": "^4.0 || ^5.0"
33
33
  }
34
34
  }