@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/README.md CHANGED
@@ -1,9 +1,9 @@
1
- ## @hostinger/mail-sdk@1.19.6
1
+ ## @hostinger/mail-sdk@1.19.8
2
2
 
3
3
 
4
4
 
5
5
  ### Usage
6
6
 
7
7
  ```
8
- npm install @hostinger/mail-sdk@1.19.6 --save
8
+ npm install @hostinger/mail-sdk@1.19.8 --save
9
9
  ```
package/api.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
@@ -15,7 +15,7 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
15
15
  import globalAxios from 'axios';
16
16
  // Some imports not used depending on template conditions
17
17
  // @ts-ignore
18
- import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
18
+ import { DUMMY_BASE_URL, assertParamExists, encodePathParam, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
19
19
  import type { RequestArgs } from './base';
20
20
  // @ts-ignore
21
21
  import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
@@ -881,13 +881,13 @@ export interface V1SendRequest {
881
881
  */
882
882
  'attachments': Array<V1SendAttachment>;
883
883
  /**
884
- * 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.
884
+ * 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.
885
885
  * @type {V1SendMessageRef}
886
886
  * @memberof V1SendRequest
887
887
  */
888
888
  'inReplyTo': V1SendMessageRef;
889
889
  /**
890
- * Source message this forwards. Copies its Message-Id/References into In-Reply-To/References and flags it $forwarded. Mutually exclusive with inReplyTo.
890
+ * 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.
891
891
  * @type {V1SendMessageRef}
892
892
  * @memberof V1SendRequest
893
893
  */
@@ -1371,7 +1371,7 @@ export const FeedbackApiAxiosParamCreator = function (configuration?: Configurat
1371
1371
  // verify required parameter 'v1FeedbackSubmitRequest' is not null or undefined
1372
1372
  assertParamExists('submitFeedback', 'v1FeedbackSubmitRequest', v1FeedbackSubmitRequest)
1373
1373
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/feedback`
1374
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
1374
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
1375
1375
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1376
1376
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1377
1377
  let baseOptions;
@@ -1491,7 +1491,7 @@ export const FoldersApiAxiosParamCreator = function (configuration?: Configurati
1491
1491
  // verify required parameter 'v1FoldersCreateRequest' is not null or undefined
1492
1492
  assertParamExists('createFolder', 'v1FoldersCreateRequest', v1FoldersCreateRequest)
1493
1493
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders`
1494
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
1494
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
1495
1495
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1496
1496
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1497
1497
  let baseOptions;
@@ -1535,8 +1535,8 @@ export const FoldersApiAxiosParamCreator = function (configuration?: Configurati
1535
1535
  // verify required parameter 'folder' is not null or undefined
1536
1536
  assertParamExists('deleteFolder', 'folder', folder)
1537
1537
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}`
1538
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
1539
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
1538
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1539
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
1540
1540
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1541
1541
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1542
1542
  let baseOptions;
@@ -1576,7 +1576,7 @@ export const FoldersApiAxiosParamCreator = function (configuration?: Configurati
1576
1576
  // verify required parameter 'mailboxResourceId' is not null or undefined
1577
1577
  assertParamExists('listFolders', 'mailboxResourceId', mailboxResourceId)
1578
1578
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders`
1579
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
1579
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
1580
1580
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1581
1581
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1582
1582
  let baseOptions;
@@ -1628,8 +1628,8 @@ export const FoldersApiAxiosParamCreator = function (configuration?: Configurati
1628
1628
  // verify required parameter 'v1FoldersUpdateRequest' is not null or undefined
1629
1629
  assertParamExists('updateFolder', 'v1FoldersUpdateRequest', v1FoldersUpdateRequest)
1630
1630
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}`
1631
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
1632
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
1631
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1632
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
1633
1633
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1634
1634
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1635
1635
  let baseOptions;
@@ -1866,8 +1866,8 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
1866
1866
  // verify required parameter 'folder' is not null or undefined
1867
1867
  assertParamExists('deleteAllMessages', 'folder', folder)
1868
1868
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages`
1869
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
1870
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
1869
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1870
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
1871
1871
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1872
1872
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1873
1873
  let baseOptions;
@@ -1911,9 +1911,9 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
1911
1911
  // verify required parameter 'uid' is not null or undefined
1912
1912
  assertParamExists('deleteMessage', 'uid', uid)
1913
1913
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
1914
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
1915
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
1916
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
1914
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1915
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
1916
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
1917
1917
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1918
1918
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1919
1919
  let baseOptions;
@@ -1957,8 +1957,8 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
1957
1957
  // verify required parameter 'v1FolderMessagesDeleteBulkRequest' is not null or undefined
1958
1958
  assertParamExists('deleteMessages', 'v1FolderMessagesDeleteBulkRequest', v1FolderMessagesDeleteBulkRequest)
1959
1959
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/delete`
1960
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
1961
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
1960
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1961
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
1962
1962
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1963
1963
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1964
1964
  let baseOptions;
@@ -2005,9 +2005,9 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2005
2005
  // verify required parameter 'uid' is not null or undefined
2006
2006
  assertParamExists('getMessage', 'uid', uid)
2007
2007
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
2008
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2009
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
2010
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
2008
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2009
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
2010
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
2011
2011
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2012
2012
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2013
2013
  let baseOptions;
@@ -2054,10 +2054,10 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2054
2054
  // verify required parameter 'attachmentId' is not null or undefined
2055
2055
  assertParamExists('getMessageAttachment', 'attachmentId', attachmentId)
2056
2056
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/attachments/{attachmentId}`
2057
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2058
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
2059
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)))
2060
- .replace(`{${"attachmentId"}}`, encodeURIComponent(String(attachmentId)));
2057
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2058
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
2059
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid))
2060
+ .replace(`{${"attachmentId"}}`, encodePathParam('attachmentId', attachmentId));
2061
2061
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2062
2062
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2063
2063
  let baseOptions;
@@ -2085,7 +2085,7 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2085
2085
  };
2086
2086
  },
2087
2087
  /**
2088
- * Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
2088
+ * Retrieve raw RFC822 source of a message as `message/rfc822` attachment. Does not change the message `\\Seen` flag.
2089
2089
  * @summary Get message source
2090
2090
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
2091
2091
  * @param {string} folder Folder path (URL-encoded).
@@ -2101,9 +2101,9 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2101
2101
  // verify required parameter 'uid' is not null or undefined
2102
2102
  assertParamExists('getMessageSource', 'uid', uid)
2103
2103
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/source`
2104
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2105
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
2106
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
2104
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2105
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
2106
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
2107
2107
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2108
2108
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2109
2109
  let baseOptions;
@@ -2131,7 +2131,7 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2131
2131
  };
2132
2132
  },
2133
2133
  /**
2134
- * Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
2134
+ * Retrieve rendered text (plain + HTML) of a message. Does not change the message `\\Seen` flag.
2135
2135
  * @summary Get message text content
2136
2136
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
2137
2137
  * @param {string} folder Folder path (URL-encoded).
@@ -2147,9 +2147,9 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2147
2147
  // verify required parameter 'uid' is not null or undefined
2148
2148
  assertParamExists('getMessageText', 'uid', uid)
2149
2149
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/text`
2150
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2151
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
2152
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
2150
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2151
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
2152
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
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;
@@ -2193,8 +2193,8 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2193
2193
  // verify required parameter 'folder' is not null or undefined
2194
2194
  assertParamExists('listMessages', 'folder', folder)
2195
2195
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages`
2196
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2197
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
2196
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2197
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
2198
2198
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2199
2199
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2200
2200
  let baseOptions;
@@ -2253,9 +2253,9 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2253
2253
  // verify required parameter 'v1FolderMessagesMoveRequest' is not null or undefined
2254
2254
  assertParamExists('moveMessage', 'v1FolderMessagesMoveRequest', v1FolderMessagesMoveRequest)
2255
2255
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}/move`
2256
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2257
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
2258
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
2256
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2257
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
2258
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
2259
2259
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2260
2260
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2261
2261
  let baseOptions;
@@ -2302,8 +2302,8 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2302
2302
  // verify required parameter 'v1FolderMessagesMoveBulkRequest' is not null or undefined
2303
2303
  assertParamExists('moveMessages', 'v1FolderMessagesMoveBulkRequest', v1FolderMessagesMoveBulkRequest)
2304
2304
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/move`
2305
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2306
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
2305
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2306
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
2307
2307
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2308
2308
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2309
2309
  let baseOptions;
@@ -2353,9 +2353,9 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2353
2353
  // verify required parameter 'v1FolderMessagesFlagsRequest' is not null or undefined
2354
2354
  assertParamExists('patchMessage', 'v1FolderMessagesFlagsRequest', v1FolderMessagesFlagsRequest)
2355
2355
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}`
2356
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2357
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)))
2358
- .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
2356
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2357
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder))
2358
+ .replace(`{${"uid"}}`, encodePathParam('uid', uid));
2359
2359
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2360
2360
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2361
2361
  let baseOptions;
@@ -2403,8 +2403,8 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2403
2403
  // verify required parameter 'folder' is not null or undefined
2404
2404
  assertParamExists('searchMessages', 'folder', folder)
2405
2405
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/search`
2406
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2407
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
2406
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2407
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
2408
2408
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2409
2409
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2410
2410
  let baseOptions;
@@ -2463,8 +2463,8 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
2463
2463
  // verify required parameter 'v1FolderMessagesFlagsBulkRequest' is not null or undefined
2464
2464
  assertParamExists('updateMessageFlags', 'v1FolderMessagesFlagsBulkRequest', v1FolderMessagesFlagsBulkRequest)
2465
2465
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/flags`
2466
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
2467
- .replace(`{${"folder"}}`, encodeURIComponent(String(folder)));
2466
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
2467
+ .replace(`{${"folder"}}`, encodePathParam('folder', folder));
2468
2468
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2469
2469
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2470
2470
  let baseOptions;
@@ -2575,7 +2575,7 @@ export const MessagesApiFp = function(configuration?: Configuration) {
2575
2575
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2576
2576
  },
2577
2577
  /**
2578
- * Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
2578
+ * Retrieve raw RFC822 source of a message as `message/rfc822` attachment. Does not change the message `\\Seen` flag.
2579
2579
  * @summary Get message source
2580
2580
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
2581
2581
  * @param {string} folder Folder path (URL-encoded).
@@ -2589,7 +2589,7 @@ export const MessagesApiFp = function(configuration?: Configuration) {
2589
2589
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2590
2590
  },
2591
2591
  /**
2592
- * Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
2592
+ * Retrieve rendered text (plain + HTML) of a message. Does not change the message `\\Seen` flag.
2593
2593
  * @summary Get message text content
2594
2594
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
2595
2595
  * @param {string} folder Folder path (URL-encoded).
@@ -2764,7 +2764,7 @@ export const MessagesApiFactory = function (configuration?: Configuration, baseP
2764
2764
  return localVarFp.getMessageAttachment(mailboxResourceId, folder, uid, attachmentId, options).then((request) => request(axios, basePath));
2765
2765
  },
2766
2766
  /**
2767
- * Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
2767
+ * Retrieve raw RFC822 source of a message as `message/rfc822` attachment. Does not change the message `\\Seen` flag.
2768
2768
  * @summary Get message source
2769
2769
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
2770
2770
  * @param {string} folder Folder path (URL-encoded).
@@ -2776,7 +2776,7 @@ export const MessagesApiFactory = function (configuration?: Configuration, baseP
2776
2776
  return localVarFp.getMessageSource(mailboxResourceId, folder, uid, options).then((request) => request(axios, basePath));
2777
2777
  },
2778
2778
  /**
2779
- * Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
2779
+ * Retrieve rendered text (plain + HTML) of a message. Does not change the message `\\Seen` flag.
2780
2780
  * @summary Get message text content
2781
2781
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
2782
2782
  * @param {string} folder Folder path (URL-encoded).
@@ -2947,7 +2947,7 @@ export class MessagesApi extends BaseAPI {
2947
2947
  }
2948
2948
 
2949
2949
  /**
2950
- * Retrieve raw RFC822 source of a message as `message/rfc822` attachment.
2950
+ * Retrieve raw RFC822 source of a message as `message/rfc822` attachment. Does not change the message `\\Seen` flag.
2951
2951
  * @summary Get message source
2952
2952
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
2953
2953
  * @param {string} folder Folder path (URL-encoded).
@@ -2961,7 +2961,7 @@ export class MessagesApi extends BaseAPI {
2961
2961
  }
2962
2962
 
2963
2963
  /**
2964
- * Retrieve rendered text (plain + HTML) of a message. Marks message as `\\Seen`.
2964
+ * Retrieve rendered text (plain + HTML) of a message. Does not change the message `\\Seen` flag.
2965
2965
  * @summary Get message text content
2966
2966
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
2967
2967
  * @param {string} folder Folder path (URL-encoded).
@@ -3085,7 +3085,7 @@ export const QuotaApiAxiosParamCreator = function (configuration?: Configuration
3085
3085
  // verify required parameter 'mailboxResourceId' is not null or undefined
3086
3086
  assertParamExists('getQuota', 'mailboxResourceId', mailboxResourceId)
3087
3087
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/quota`
3088
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
3088
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
3089
3089
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3090
3090
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3091
3091
  let baseOptions;
@@ -3189,17 +3189,17 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
3189
3189
  * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3190
3190
  * @summary Send email
3191
3191
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
3192
- * @param {V1SendRequest | null} v1SendRequest
3192
+ * @param {V1SendRequest} v1SendRequest
3193
3193
  * @param {*} [options] Override http request option.
3194
3194
  * @throws {RequiredError}
3195
3195
  */
3196
- sendEmail: async (mailboxResourceId: string, v1SendRequest: V1SendRequest | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3196
+ sendEmail: async (mailboxResourceId: string, v1SendRequest: V1SendRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3197
3197
  // verify required parameter 'mailboxResourceId' is not null or undefined
3198
3198
  assertParamExists('sendEmail', 'mailboxResourceId', mailboxResourceId)
3199
3199
  // verify required parameter 'v1SendRequest' is not null or undefined
3200
3200
  assertParamExists('sendEmail', 'v1SendRequest', v1SendRequest)
3201
3201
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/send`
3202
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
3202
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
3203
3203
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3204
3204
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3205
3205
  let baseOptions;
@@ -3243,11 +3243,11 @@ export const SendApiFp = function(configuration?: Configuration) {
3243
3243
  * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3244
3244
  * @summary Send email
3245
3245
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
3246
- * @param {V1SendRequest | null} v1SendRequest
3246
+ * @param {V1SendRequest} v1SendRequest
3247
3247
  * @param {*} [options] Override http request option.
3248
3248
  * @throws {RequiredError}
3249
3249
  */
3250
- async sendEmail(mailboxResourceId: string, v1SendRequest: V1SendRequest | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
3250
+ async sendEmail(mailboxResourceId: string, v1SendRequest: V1SendRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
3251
3251
  const localVarAxiosArgs = await localVarAxiosParamCreator.sendEmail(mailboxResourceId, v1SendRequest, options);
3252
3252
  const localVarOperationServerBasePath = operationServerMap['SendApi.sendEmail']?.[0]?.url;
3253
3253
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -3266,11 +3266,11 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
3266
3266
  * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3267
3267
  * @summary Send email
3268
3268
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
3269
- * @param {V1SendRequest | null} v1SendRequest
3269
+ * @param {V1SendRequest} v1SendRequest
3270
3270
  * @param {*} [options] Override http request option.
3271
3271
  * @throws {RequiredError}
3272
3272
  */
3273
- sendEmail(mailboxResourceId: string, v1SendRequest: V1SendRequest | null, options?: RawAxiosRequestConfig): AxiosPromise<void> {
3273
+ sendEmail(mailboxResourceId: string, v1SendRequest: V1SendRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
3274
3274
  return localVarFp.sendEmail(mailboxResourceId, v1SendRequest, options).then((request) => request(axios, basePath));
3275
3275
  },
3276
3276
  };
@@ -3287,12 +3287,12 @@ export class SendApi extends BaseAPI {
3287
3287
  * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3288
3288
  * @summary Send email
3289
3289
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
3290
- * @param {V1SendRequest | null} v1SendRequest
3290
+ * @param {V1SendRequest} v1SendRequest
3291
3291
  * @param {*} [options] Override http request option.
3292
3292
  * @throws {RequiredError}
3293
3293
  * @memberof SendApi
3294
3294
  */
3295
- public sendEmail(mailboxResourceId: string, v1SendRequest: V1SendRequest | null, options?: RawAxiosRequestConfig) {
3295
+ public sendEmail(mailboxResourceId: string, v1SendRequest: V1SendRequest, options?: RawAxiosRequestConfig) {
3296
3296
  return SendApiFp(this.configuration).sendEmail(mailboxResourceId, v1SendRequest, options).then((request) => request(this.axios, this.basePath));
3297
3297
  }
3298
3298
  }
@@ -3319,7 +3319,7 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
3319
3319
  // verify required parameter 'v1WebhooksCreateRequest' is not null or undefined
3320
3320
  assertParamExists('createWebhook', 'v1WebhooksCreateRequest', v1WebhooksCreateRequest)
3321
3321
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks`
3322
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
3322
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
3323
3323
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3324
3324
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3325
3325
  let baseOptions;
@@ -3363,8 +3363,8 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
3363
3363
  // verify required parameter 'webhook' is not null or undefined
3364
3364
  assertParamExists('deleteWebhook', 'webhook', webhook)
3365
3365
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
3366
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
3367
- .replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
3366
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
3367
+ .replace(`{${"webhook"}}`, encodePathParam('webhook', webhook));
3368
3368
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3369
3369
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3370
3370
  let baseOptions;
@@ -3405,8 +3405,8 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
3405
3405
  // verify required parameter 'webhook' is not null or undefined
3406
3406
  assertParamExists('getWebhook', 'webhook', webhook)
3407
3407
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
3408
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
3409
- .replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
3408
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
3409
+ .replace(`{${"webhook"}}`, encodePathParam('webhook', webhook));
3410
3410
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3411
3411
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3412
3412
  let baseOptions;
@@ -3447,7 +3447,7 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
3447
3447
  // verify required parameter 'mailboxResourceId' is not null or undefined
3448
3448
  assertParamExists('listWebhooks', 'mailboxResourceId', mailboxResourceId)
3449
3449
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks`
3450
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)));
3450
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
3451
3451
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3452
3452
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3453
3453
  let baseOptions;
@@ -3500,8 +3500,8 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
3500
3500
  // verify required parameter 'webhook' is not null or undefined
3501
3501
  assertParamExists('regenerateWebhookSecret', 'webhook', webhook)
3502
3502
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}/regenerate-secret`
3503
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
3504
- .replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
3503
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
3504
+ .replace(`{${"webhook"}}`, encodePathParam('webhook', webhook));
3505
3505
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3506
3506
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3507
3507
  let baseOptions;
@@ -3542,8 +3542,8 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
3542
3542
  // verify required parameter 'webhook' is not null or undefined
3543
3543
  assertParamExists('testWebhook', 'webhook', webhook)
3544
3544
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}/test`
3545
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
3546
- .replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
3545
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
3546
+ .replace(`{${"webhook"}}`, encodePathParam('webhook', webhook));
3547
3547
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3548
3548
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3549
3549
  let baseOptions;
@@ -3587,8 +3587,8 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
3587
3587
  // verify required parameter 'v1WebhooksUpdateRequest' is not null or undefined
3588
3588
  assertParamExists('updateWebhook', 'v1WebhooksUpdateRequest', v1WebhooksUpdateRequest)
3589
3589
  const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/webhooks/{webhook}`
3590
- .replace(`{${"mailboxResourceId"}}`, encodeURIComponent(String(mailboxResourceId)))
3591
- .replace(`{${"webhook"}}`, encodeURIComponent(String(webhook)));
3590
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
3591
+ .replace(`{${"webhook"}}`, encodePathParam('webhook', webhook));
3592
3592
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3593
3593
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3594
3594
  let baseOptions;
package/base.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/common.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
@@ -32,6 +32,19 @@ export const assertParamExists = function (functionName: string, paramName: stri
32
32
  }
33
33
  }
34
34
 
35
+ /**
36
+ * Empty values and dot segments survive encoding and collapse or resolve away, which would change the endpoint.
37
+ * @throws {RequiredError}
38
+ * @export
39
+ */
40
+ export const encodePathParam = function (paramName: string, paramValue: unknown) {
41
+ const value = String(paramValue);
42
+ if (value === '' || value === '.' || value === '..') {
43
+ throw new RequiredError(paramName, `Invalid value for path parameter ${paramName}.`);
44
+ }
45
+ return encodeURIComponent(value);
46
+ }
47
+
35
48
  /**
36
49
  *
37
50
  * @export
package/configuration.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
@@ -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.6",
51
+ 'User-Agent': "hostinger-mail-typescript-sdk/1.19.8",
52
52
  ...param.baseOptions?.headers,
53
53
  },
54
54
  };