Skip to content

Commit d6aaafd

Browse files
SDK version 20.4.0.60 generated
1 parent 0b240cd commit d6aaafd

File tree

8 files changed

+341
-21
lines changed

8 files changed

+341
-21
lines changed

doc/DeleteEmailThreadAccountRq.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# DeleteEmailThreadAccountRq
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
8+
Parent class: [AccountBaseRequest](AccountBaseRequest.md)
9+
10+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)

doc/EmailApi.md

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,33 @@ Name | Type | Description | Notes
10851085

10861086
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
10871087

1088+
<a name="deleteemailthread"></a>
1089+
# **deleteEmailThread**
1090+
1091+
```typescript
1092+
public async deleteEmailThread(requestObj: DeleteEmailThreadRequest) : Promise<{response: RequestResponse, body?: any; }>
1093+
```
1094+
1095+
Delete thread by id. All messages from thread will also be deleted
1096+
1097+
### Return type
1098+
1099+
`Promise<{response: RequestResponse, body?: any; }>`
1100+
1101+
### Request Parameters
1102+
```typescript
1103+
new DeleteEmailThreadRequest(
1104+
threadId,
1105+
request)
1106+
```
1107+
1108+
Name | Type | Description | Notes
1109+
------------- | ------------- | ------------- | -------------
1110+
**threadId** | **string**| Thread id |
1111+
**request** | [**DeleteEmailThreadAccountRq**](DeleteEmailThreadAccountRq.md)| Email account specifier |
1112+
1113+
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
1114+
10881115
<a name="deletefile"></a>
10891116
# **deleteFile**
10901117

@@ -2308,8 +2335,8 @@ The query string should have the following view. The example of a simple ex
23082335
```typescript
23092336
new ListEmailModelsRequest(
23102337
folder,
2311-
queryString,
23122338
firstAccount,
2339+
queryString=queryString,
23132340
secondAccount=secondAccount,
23142341
storage=storage,
23152342
storageFolder=storageFolder,
@@ -2319,8 +2346,8 @@ new ListEmailModelsRequest(
23192346
Name | Type | Description | Notes
23202347
------------- | ------------- | ------------- | -------------
23212348
**folder** | **string**| A folder in email account |
2322-
**queryString** | **string**| A MailQuery search string |
23232349
**firstAccount** | **string**| Email account |
2350+
**queryString** | **string**| A MailQuery search string | [optional]
23242351
**secondAccount** | **string**| Additional email account (for example, firstAccount could be IMAP, and second one could be SMTP) | [optional]
23252352
**storage** | **string**| Storage name where account file(s) located | [optional]
23262353
**storageFolder** | **string**| Folder in storage where account file(s) located | [optional]
@@ -2349,7 +2376,8 @@ new ListEmailThreadsRequest(
23492376
secondAccount=secondAccount,
23502377
storage=storage,
23512378
storageFolder=storageFolder,
2352-
updateFolderCache=updateFolderCache)
2379+
updateFolderCache=updateFolderCache,
2380+
messagesCacheLimit=messagesCacheLimit)
23532381
```
23542382

23552383
Name | Type | Description | Notes
@@ -2360,6 +2388,7 @@ Name | Type | Description | Notes
23602388
**storage** | **string**| Storage name where account file(s) located | [optional]
23612389
**storageFolder** | **string**| Folder in storage where account file(s) located | [optional]
23622390
**updateFolderCache** | **boolean**| This parameter is only used in accounts with CacheFile. If true - get new messages and update threads cache for given folder. If false, get only threads from cache without any calls to an email account | [optional] [default to true]
2391+
**messagesCacheLimit** | **number**| Limit messages cache size if CacheFile is used. Ignored in accounts without limits support | [optional] [default to 200]
23632392

23642393
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
23652394

@@ -2770,6 +2799,33 @@ Name | Type | Description | Notes
27702799

27712800
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
27722801

2802+
<a name="setemailthreadreadflag"></a>
2803+
# **setEmailThreadReadFlag**
2804+
2805+
```typescript
2806+
public async setEmailThreadReadFlag(requestObj: SetEmailThreadReadFlagRequest) : Promise<{response: RequestResponse, body?: any; }>
2807+
```
2808+
2809+
Mar all messages in thread as read or unread
2810+
2811+
### Return type
2812+
2813+
`Promise<{response: RequestResponse, body?: any; }>`
2814+
2815+
### Request Parameters
2816+
```typescript
2817+
new SetEmailThreadReadFlagRequest(
2818+
threadId,
2819+
request)
2820+
```
2821+
2822+
Name | Type | Description | Notes
2823+
------------- | ------------- | ------------- | -------------
2824+
**threadId** | **string**| Thread id |
2825+
**request** | [**EmailThreadReadFlagRq**](EmailThreadReadFlagRq.md)| Email account specifier and IsRead flag |
2826+
2827+
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
2828+
27732829
<a name="storageexists"></a>
27742830
# **storageExists**
27752831

doc/EmailThreadReadFlagRq.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
# EmailThreadReadFlagRq
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**isRead** | **boolean** | Read flag to set. \"true\" by default | [default to undefined]
8+
9+
Parent class: [AccountBaseRequest](AccountBaseRequest.md)
10+
11+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)

doc/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Class | Method | HTTP request | Description
4343
*EmailApi* | [**deleteContactProperty**](EmailApi.md#deletecontactproperty) | **DELETE** /email/Contact/{format}/{name}/properties/{memberName}/{index} | Delete property from indexed property list
4444
*EmailApi* | [**deleteEmailFolder**](EmailApi.md#deleteemailfolder) | **DELETE** /email/client/DeleteFolder | Delete a folder in email account
4545
*EmailApi* | [**deleteEmailMessage**](EmailApi.md#deleteemailmessage) | **DELETE** /email/client/DeleteMessage | Delete message from email account by id
46+
*EmailApi* | [**deleteEmailThread**](EmailApi.md#deleteemailthread) | **DELETE** /email/client/threads/{threadId} | Delete thread by id. All messages from thread will also be deleted
4647
*EmailApi* | [**deleteFile**](EmailApi.md#deletefile) | **DELETE** /email/storage/file/{path} | Delete file
4748
*EmailApi* | [**deleteFolder**](EmailApi.md#deletefolder) | **DELETE** /email/storage/folder/{path} | Delete folder
4849
*EmailApi* | [**deleteMapiAttachment**](EmailApi.md#deletemapiattachment) | **DELETE** /email/Mapi/{name}/attachments/{attachment} | Remove attachment from document
@@ -100,6 +101,7 @@ Class | Method | HTTP request | Description
100101
*EmailApi* | [**sendEmailModel**](EmailApi.md#sendemailmodel) | **POST** /email/client/SendModel | Send an email specified by model in request
101102
*EmailApi* | [**setEmailProperty**](EmailApi.md#setemailproperty) | **PUT** /email/{fileName}/properties/{propertyName} | Set email document property value
102103
*EmailApi* | [**setEmailReadFlag**](EmailApi.md#setemailreadflag) | **POST** /email/client/SetReadFlag | Sets \&quot;Message is read\&quot; flag
104+
*EmailApi* | [**setEmailThreadReadFlag**](EmailApi.md#setemailthreadreadflag) | **PUT** /email/client/threads/{threadId}/read-flag | Mar all messages in thread as read or unread
103105
*EmailApi* | [**storageExists**](EmailApi.md#storageexists) | **GET** /email/storage/{storageName}/exist | Check if storage exists
104106
*EmailApi* | [**updateCalendarProperties**](EmailApi.md#updatecalendarproperties) | **PUT** /email/Calendar/{name}/properties | Update calendar file properties
105107
*EmailApi* | [**updateContactProperties**](EmailApi.md#updatecontactproperties) | **PUT** /email/Contact/{format}/{name}/properties | Update contact document properties
@@ -222,6 +224,7 @@ Class | Method | HTTP request | Description
222224
- [CalendarDtoList](CalendarDtoList.md)
223225
- [ContactDtoList](ContactDtoList.md)
224226
- [CreateFolderBaseRequest](CreateFolderBaseRequest.md)
227+
- [DeleteEmailThreadAccountRq](DeleteEmailThreadAccountRq.md)
225228
- [DeleteFolderBaseRequest](DeleteFolderBaseRequest.md)
226229
- [DeleteMessageBaseRequest](DeleteMessageBaseRequest.md)
227230
- [DiscoverEmailConfigOauth](DiscoverEmailConfigOauth.md)
@@ -231,6 +234,7 @@ Class | Method | HTTP request | Description
231234
- [EmailClientAccountPasswordCredentials](EmailClientAccountPasswordCredentials.md)
232235
- [EmailDtoList](EmailDtoList.md)
233236
- [EmailThreadList](EmailThreadList.md)
237+
- [EmailThreadReadFlagRq](EmailThreadReadFlagRq.md)
234238
- [FileVersion](FileVersion.md)
235239
- [HierarchicalObject](HierarchicalObject.md)
236240
- [IndexedHierarchicalObject](IndexedHierarchicalObject.md)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@asposecloud/aspose-email-cloud",
3-
"version": "20.3.1",
3+
"version": "20.4.0.60",
44
"description": "Aspose.Email Cloud Node.js SDK",
55
"homepage": "https://products.aspose.cloud/email",
66
"author": {

src/api.ts

Lines changed: 98 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,6 +1913,51 @@ export class EmailApi {
19131913
return Promise.resolve({body: null, response});
19141914
}
19151915

1916+
/**
1917+
* Delete thread by id. All messages from thread will also be deleted
1918+
* @param requestObj contains request parameters
1919+
*/
1920+
public async deleteEmailThread(requestObj: requestModels.DeleteEmailThreadRequest): Promise<{response: request.RequestResponse, body?: any; }> {
1921+
const localVarPath = this.configuration.getApiBaseUrl() + "/email/client/threads/{threadId}"
1922+
.replace("{" + "threadId" + "}", String(requestObj.threadId));
1923+
const queryParameters: any = {};
1924+
const headerParams: any = {};
1925+
const formParams: any = {};
1926+
1927+
// verify required parameter 'requestObj.threadId' is not null or undefined
1928+
if (requestObj.threadId === null || requestObj.threadId === undefined) {
1929+
throw new Error('Required parameter "requestObj.threadId" was null or undefined when calling deleteEmailThread.');
1930+
}
1931+
1932+
// verify required parameter 'requestObj.request' is not null or undefined
1933+
if (requestObj.request === null || requestObj.request === undefined) {
1934+
throw new Error('Required parameter "requestObj.request" was null or undefined when calling deleteEmailThread.');
1935+
}
1936+
1937+
// tslint:disable-next-line:prefer-const
1938+
let useFormData = false;
1939+
1940+
const requestOptions: request.Options = {
1941+
method: "DELETE",
1942+
qs: queryParameters,
1943+
headers: headerParams,
1944+
uri: localVarPath,
1945+
json: true,
1946+
body: ObjectSerializer.serialize(requestObj.request, "DeleteEmailThreadAccountRq"),
1947+
};
1948+
1949+
if (Object.keys(formParams).length) {
1950+
if (useFormData) {
1951+
(requestOptions as any).formData = formParams;
1952+
} else {
1953+
requestOptions.form = formParams;
1954+
}
1955+
}
1956+
1957+
const response = await invokeApiMethod(requestOptions, this.configuration);
1958+
return Promise.resolve({body: null, response});
1959+
}
1960+
19161961
/**
19171962
* Delete file
19181963
* @param requestObj contains request parameters
@@ -4034,11 +4079,6 @@ export class EmailApi {
40344079
throw new Error('Required parameter "requestObj.folder" was null or undefined when calling listEmailModels.');
40354080
}
40364081

4037-
// verify required parameter 'requestObj.queryString' is not null or undefined
4038-
if (requestObj.queryString === null || requestObj.queryString === undefined) {
4039-
throw new Error('Required parameter "requestObj.queryString" was null or undefined when calling listEmailModels.');
4040-
}
4041-
40424082
// verify required parameter 'requestObj.firstAccount' is not null or undefined
40434083
if (requestObj.firstAccount === null || requestObj.firstAccount === undefined) {
40444084
throw new Error('Required parameter "requestObj.firstAccount" was null or undefined when calling listEmailModels.');
@@ -4048,14 +4088,14 @@ export class EmailApi {
40484088
queryParameters.folder = ObjectSerializer.serialize(requestObj.folder, "string");
40494089
}
40504090

4051-
if (requestObj.queryString !== undefined) {
4052-
queryParameters.queryString = ObjectSerializer.serialize(requestObj.queryString, "string");
4053-
}
4054-
40554091
if (requestObj.firstAccount !== undefined) {
40564092
queryParameters.firstAccount = ObjectSerializer.serialize(requestObj.firstAccount, "string");
40574093
}
40584094

4095+
if (requestObj.queryString !== undefined) {
4096+
queryParameters.queryString = ObjectSerializer.serialize(requestObj.queryString, "string");
4097+
}
4098+
40594099
if (requestObj.secondAccount !== undefined) {
40604100
queryParameters.secondAccount = ObjectSerializer.serialize(requestObj.secondAccount, "string");
40614101
}
@@ -4140,6 +4180,10 @@ export class EmailApi {
41404180
queryParameters.updateFolderCache = ObjectSerializer.serialize(requestObj.updateFolderCache, "boolean");
41414181
}
41424182

4183+
if (requestObj.messagesCacheLimit !== undefined) {
4184+
queryParameters.messagesCacheLimit = ObjectSerializer.serialize(requestObj.messagesCacheLimit, "number");
4185+
}
4186+
41434187
// tslint:disable-next-line:prefer-const
41444188
let useFormData = false;
41454189

@@ -4839,6 +4883,51 @@ export class EmailApi {
48394883
return Promise.resolve({body: null, response});
48404884
}
48414885

4886+
/**
4887+
* Mar all messages in thread as read or unread
4888+
* @param requestObj contains request parameters
4889+
*/
4890+
public async setEmailThreadReadFlag(requestObj: requestModels.SetEmailThreadReadFlagRequest): Promise<{response: request.RequestResponse, body?: any; }> {
4891+
const localVarPath = this.configuration.getApiBaseUrl() + "/email/client/threads/{threadId}/read-flag"
4892+
.replace("{" + "threadId" + "}", String(requestObj.threadId));
4893+
const queryParameters: any = {};
4894+
const headerParams: any = {};
4895+
const formParams: any = {};
4896+
4897+
// verify required parameter 'requestObj.threadId' is not null or undefined
4898+
if (requestObj.threadId === null || requestObj.threadId === undefined) {
4899+
throw new Error('Required parameter "requestObj.threadId" was null or undefined when calling setEmailThreadReadFlag.');
4900+
}
4901+
4902+
// verify required parameter 'requestObj.request' is not null or undefined
4903+
if (requestObj.request === null || requestObj.request === undefined) {
4904+
throw new Error('Required parameter "requestObj.request" was null or undefined when calling setEmailThreadReadFlag.');
4905+
}
4906+
4907+
// tslint:disable-next-line:prefer-const
4908+
let useFormData = false;
4909+
4910+
const requestOptions: request.Options = {
4911+
method: "PUT",
4912+
qs: queryParameters,
4913+
headers: headerParams,
4914+
uri: localVarPath,
4915+
json: true,
4916+
body: ObjectSerializer.serialize(requestObj.request, "EmailThreadReadFlagRq"),
4917+
};
4918+
4919+
if (Object.keys(formParams).length) {
4920+
if (useFormData) {
4921+
(requestOptions as any).formData = formParams;
4922+
} else {
4923+
requestOptions.form = formParams;
4924+
}
4925+
}
4926+
4927+
const response = await invokeApiMethod(requestOptions, this.configuration);
4928+
return Promise.resolve({body: null, response});
4929+
}
4930+
48424931
/**
48434932
* Check if storage exists
48444933
* @param requestObj contains request parameters

0 commit comments

Comments
 (0)