Skip to content

Commit 987ac4e

Browse files
SDK version 20.4.0.63 generated
1 parent b6cf815 commit 987ac4e

File tree

9 files changed

+398
-6
lines changed

9 files changed

+398
-6
lines changed

doc/DeleteMessageBaseRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**messageId** | **string** | Message identifier | [default to undefined]
8+
**folder** | **string** | Account folder where message located. Should be specified for some accounts | [optional] [default to undefined]
89
**deletePermanently** | **boolean** | Specifies that message should be deleted permanently | [default to undefined]
910

1011
Parent class: [AccountBaseRequest](AccountBaseRequest.md)

doc/EmailApi.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,6 +1351,7 @@ new FetchEmailMessageRequest(
13511351
messageId,
13521352
firstAccount,
13531353
secondAccount=secondAccount,
1354+
folder=folder,
13541355
storage=storage,
13551356
storageFolder=storageFolder)
13561357
```
@@ -1360,6 +1361,7 @@ Name | Type | Description | Notes
13601361
**messageId** | **string**| Message identifier |
13611362
**firstAccount** | **string**| Email account |
13621363
**secondAccount** | **string**| Additional email account (for example, firstAccount could be IMAP, and second one could be SMTP) | [optional]
1364+
**folder** | **string**| Account folder to fetch from (should be specified for some protocols such as IMAP) | [optional]
13631365
**storage** | **string**| Storage name where account file(s) located | [optional]
13641366
**storageFolder** | **string**| Folder in storage where account file(s) located | [optional]
13651367

@@ -1384,6 +1386,7 @@ new FetchEmailModelRequest(
13841386
messageId,
13851387
firstAccount,
13861388
secondAccount=secondAccount,
1389+
folder=folder,
13871390
storage=storage,
13881391
storageFolder=storageFolder)
13891392
```
@@ -1393,6 +1396,7 @@ Name | Type | Description | Notes
13931396
**messageId** | **string**| Message identifier |
13941397
**firstAccount** | **string**| Email account |
13951398
**secondAccount** | **string**| Additional email account (for example, firstAccount could be IMAP, and second one could be SMTP) | [optional]
1399+
**folder** | **string**| Account folder to fetch from (should be specified for some protocols such as IMAP) | [optional]
13961400
**storage** | **string**| Storage name where account file(s) located | [optional]
13971401
**storageFolder** | **string**| Folder in storage where account file(s) located | [optional]
13981402

@@ -2392,6 +2396,58 @@ Name | Type | Description | Notes
23922396

23932397
[[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)
23942398

2399+
<a name="moveemailmessage"></a>
2400+
# **moveEmailMessage**
2401+
2402+
```typescript
2403+
public async moveEmailMessage(requestObj: MoveEmailMessageRequest) : Promise<{response: RequestResponse, body?: any; }>
2404+
```
2405+
2406+
Move message to another folder
2407+
2408+
### Return type
2409+
2410+
`Promise<{response: RequestResponse, body?: any; }>`
2411+
2412+
### Request Parameters
2413+
```typescript
2414+
new MoveEmailMessageRequest(
2415+
request)
2416+
```
2417+
2418+
Name | Type | Description | Notes
2419+
------------- | ------------- | ------------- | -------------
2420+
**request** | [**MoveEmailMessageRq**](MoveEmailMessageRq.md)| Email account, folder and message specifier |
2421+
2422+
[[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)
2423+
2424+
<a name="moveemailthread"></a>
2425+
# **moveEmailThread**
2426+
2427+
```typescript
2428+
public async moveEmailThread(requestObj: MoveEmailThreadRequest) : Promise<{response: RequestResponse, body?: any; }>
2429+
```
2430+
2431+
Move thread to another folder
2432+
2433+
### Return type
2434+
2435+
`Promise<{response: RequestResponse, body?: any; }>`
2436+
2437+
### Request Parameters
2438+
```typescript
2439+
new MoveEmailThreadRequest(
2440+
threadId,
2441+
request)
2442+
```
2443+
2444+
Name | Type | Description | Notes
2445+
------------- | ------------- | ------------- | -------------
2446+
**threadId** | **string**| Thread identifier |
2447+
**request** | [**MoveEmailThreadRq**](MoveEmailThreadRq.md)| Move thread request |
2448+
2449+
[[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)
2450+
23952451
<a name="movefile"></a>
23962452
# **moveFile**
23972453

@@ -2806,7 +2862,7 @@ Name | Type | Description | Notes
28062862
public async setEmailThreadReadFlag(requestObj: SetEmailThreadReadFlagRequest) : Promise<{response: RequestResponse, body?: any; }>
28072863
```
28082864

2809-
Mar all messages in thread as read or unread
2865+
Mark all messages in thread as read or unread
28102866

28112867
### Return type
28122868

doc/EmailThread.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**id** | **string** | Thread identifier | [optional] [default to undefined]
88
**subject** | **string** | Thread subject | [optional] [default to undefined]
99
**messages** | [**Array&lt;EmailDto&gt;**](EmailDto.md) | List of messages in thread | [optional] [default to undefined]
10+
**folder** | **string** | Thread folder location | [optional] [default to undefined]
1011

1112

1213

doc/MoveEmailMessageRq.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
# MoveEmailMessageRq
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**messageId** | **string** | Message identifier | [optional] [default to undefined]
8+
**sourceFolder** | **string** | Message source folder. Account root folder by default | [optional] [default to undefined]
9+
**destinationFolder** | **string** | Folder in email account to move message to | [optional] [default to undefined]
10+
11+
Parent class: [AccountBaseRequest](AccountBaseRequest.md)
12+
13+
[[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/MoveEmailThreadRq.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
# MoveEmailThreadRq
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**destinationFolder** | **string** | Email account folder to move thread to | [optional] [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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ Class | Method | HTTP request | Description
8686
*EmailApi* | [**listEmailMessages**](EmailApi.md#listemailmessages) | **GET** /email/client/ListMessages | Get messages from folder, filtered by query
8787
*EmailApi* | [**listEmailModels**](EmailApi.md#listemailmodels) | **GET** /email/client/ListMessagesModel | Get messages from folder, filtered by query
8888
*EmailApi* | [**listEmailThreads**](EmailApi.md#listemailthreads) | **GET** /email/client/threads | Get message threads from folder. All messages are partly fetched (without email body and other fields)
89+
*EmailApi* | [**moveEmailMessage**](EmailApi.md#moveemailmessage) | **PUT** /email/client/move | Move message to another folder
90+
*EmailApi* | [**moveEmailThread**](EmailApi.md#moveemailthread) | **PUT** /email/client/threads/{threadId}/move | Move thread to another folder
8991
*EmailApi* | [**moveFile**](EmailApi.md#movefile) | **PUT** /email/storage/file/move/{srcPath} | Move file
9092
*EmailApi* | [**moveFolder**](EmailApi.md#movefolder) | **PUT** /email/storage/folder/move/{srcPath} | Move folder
9193
*EmailApi* | [**objectExists**](EmailApi.md#objectexists) | **GET** /email/storage/exist/{path} | Check if file or folder exists
@@ -101,7 +103,7 @@ Class | Method | HTTP request | Description
101103
*EmailApi* | [**sendEmailModel**](EmailApi.md#sendemailmodel) | **POST** /email/client/SendModel | Send an email specified by model in request
102104
*EmailApi* | [**setEmailProperty**](EmailApi.md#setemailproperty) | **PUT** /email/{fileName}/properties/{propertyName} | Set email document property value
103105
*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
106+
*EmailApi* | [**setEmailThreadReadFlag**](EmailApi.md#setemailthreadreadflag) | **PUT** /email/client/threads/{threadId}/read-flag | Mark all messages in thread as read or unread
105107
*EmailApi* | [**storageExists**](EmailApi.md#storageexists) | **GET** /email/storage/{storageName}/exist | Check if storage exists
106108
*EmailApi* | [**updateCalendarProperties**](EmailApi.md#updatecalendarproperties) | **PUT** /email/Calendar/{name}/properties | Update calendar file properties
107109
*EmailApi* | [**updateContactProperties**](EmailApi.md#updatecontactproperties) | **PUT** /email/Contact/{format}/{name}/properties | Update contact document properties
@@ -240,6 +242,8 @@ Class | Method | HTTP request | Description
240242
- [IndexedHierarchicalObject](IndexedHierarchicalObject.md)
241243
- [IndexedPrimitiveObject](IndexedPrimitiveObject.md)
242244
- [LinkedResource](LinkedResource.md)
245+
- [MoveEmailMessageRq](MoveEmailMessageRq.md)
246+
- [MoveEmailThreadRq](MoveEmailThreadRq.md)
243247
- [PrimitiveObject](PrimitiveObject.md)
244248
- [SaveEmailAccountRequest](SaveEmailAccountRequest.md)
245249
- [SaveOAuthEmailAccountRequest](SaveOAuthEmailAccountRequest.md)

src/api.ts

Lines changed: 94 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* MIT License
44
5-
* Copyright (c) 2018 Aspose Pty Ltd
5+
* Copyright (c) 2018-2020 Aspose Pty Ltd
66
77
* Permission is hereby granted, free of charge, to any person obtaining a copy
88
* of this software and associated documentation files (the "Software"), to deal
@@ -2355,6 +2355,10 @@ export class EmailApi {
23552355
queryParameters.secondAccount = ObjectSerializer.serialize(requestObj.secondAccount, "string");
23562356
}
23572357

2358+
if (requestObj.folder !== undefined) {
2359+
queryParameters.folder = ObjectSerializer.serialize(requestObj.folder, "string");
2360+
}
2361+
23582362
if (requestObj.storage !== undefined) {
23592363
queryParameters.storage = ObjectSerializer.serialize(requestObj.storage, "string");
23602364
}
@@ -2419,6 +2423,10 @@ export class EmailApi {
24192423
queryParameters.secondAccount = ObjectSerializer.serialize(requestObj.secondAccount, "string");
24202424
}
24212425

2426+
if (requestObj.folder !== undefined) {
2427+
queryParameters.folder = ObjectSerializer.serialize(requestObj.folder, "string");
2428+
}
2429+
24222430
if (requestObj.storage !== undefined) {
24232431
queryParameters.storage = ObjectSerializer.serialize(requestObj.storage, "string");
24242432
}
@@ -4208,6 +4216,90 @@ export class EmailApi {
42084216
return Promise.resolve({body: result, response});
42094217
}
42104218

4219+
/**
4220+
* Move message to another folder
4221+
* @param requestObj contains request parameters
4222+
*/
4223+
public async moveEmailMessage(requestObj: requestModels.MoveEmailMessageRequest): Promise<{response: request.RequestResponse, body?: any; }> {
4224+
const localVarPath = this.configuration.getApiBaseUrl() + "/email/client/move";
4225+
const queryParameters: any = {};
4226+
const headerParams: any = {};
4227+
const formParams: any = {};
4228+
4229+
// verify required parameter 'requestObj.request' is not null or undefined
4230+
if (requestObj.request === null || requestObj.request === undefined) {
4231+
throw new Error('Required parameter "requestObj.request" was null or undefined when calling moveEmailMessage.');
4232+
}
4233+
4234+
// tslint:disable-next-line:prefer-const
4235+
let useFormData = false;
4236+
4237+
const requestOptions: request.Options = {
4238+
method: "PUT",
4239+
qs: queryParameters,
4240+
headers: headerParams,
4241+
uri: localVarPath,
4242+
json: true,
4243+
body: ObjectSerializer.serialize(requestObj.request, "MoveEmailMessageRq"),
4244+
};
4245+
4246+
if (Object.keys(formParams).length) {
4247+
if (useFormData) {
4248+
(requestOptions as any).formData = formParams;
4249+
} else {
4250+
requestOptions.form = formParams;
4251+
}
4252+
}
4253+
4254+
const response = await invokeApiMethod(requestOptions, this.configuration);
4255+
return Promise.resolve({body: null, response});
4256+
}
4257+
4258+
/**
4259+
* Move thread to another folder
4260+
* @param requestObj contains request parameters
4261+
*/
4262+
public async moveEmailThread(requestObj: requestModels.MoveEmailThreadRequest): Promise<{response: request.RequestResponse, body?: any; }> {
4263+
const localVarPath = this.configuration.getApiBaseUrl() + "/email/client/threads/{threadId}/move"
4264+
.replace("{" + "threadId" + "}", String(requestObj.threadId));
4265+
const queryParameters: any = {};
4266+
const headerParams: any = {};
4267+
const formParams: any = {};
4268+
4269+
// verify required parameter 'requestObj.threadId' is not null or undefined
4270+
if (requestObj.threadId === null || requestObj.threadId === undefined) {
4271+
throw new Error('Required parameter "requestObj.threadId" was null or undefined when calling moveEmailThread.');
4272+
}
4273+
4274+
// verify required parameter 'requestObj.request' is not null or undefined
4275+
if (requestObj.request === null || requestObj.request === undefined) {
4276+
throw new Error('Required parameter "requestObj.request" was null or undefined when calling moveEmailThread.');
4277+
}
4278+
4279+
// tslint:disable-next-line:prefer-const
4280+
let useFormData = false;
4281+
4282+
const requestOptions: request.Options = {
4283+
method: "PUT",
4284+
qs: queryParameters,
4285+
headers: headerParams,
4286+
uri: localVarPath,
4287+
json: true,
4288+
body: ObjectSerializer.serialize(requestObj.request, "MoveEmailThreadRq"),
4289+
};
4290+
4291+
if (Object.keys(formParams).length) {
4292+
if (useFormData) {
4293+
(requestOptions as any).formData = formParams;
4294+
} else {
4295+
requestOptions.form = formParams;
4296+
}
4297+
}
4298+
4299+
const response = await invokeApiMethod(requestOptions, this.configuration);
4300+
return Promise.resolve({body: null, response});
4301+
}
4302+
42114303
/**
42124304
* Move file
42134305
* @param requestObj contains request parameters
@@ -4884,7 +4976,7 @@ export class EmailApi {
48844976
}
48854977

48864978
/**
4887-
* Mar all messages in thread as read or unread
4979+
* Mark all messages in thread as read or unread
48884980
* @param requestObj contains request parameters
48894981
*/
48904982
public async setEmailThreadReadFlag(requestObj: requestModels.SetEmailThreadReadFlagRequest): Promise<{response: request.RequestResponse, body?: any; }> {

0 commit comments

Comments
 (0)