Skip to content

Commit

Permalink
Merge pull request #7 from aspose-email-cloud/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Marat-Gumerov authored Feb 26, 2020
2 parents b44e078 + 3a10511 commit e66b9a7
Show file tree
Hide file tree
Showing 236 changed files with 3,663 additions and 122 deletions.
10 changes: 10 additions & 0 deletions sdk/AsposeEmailCloudSdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
from AsposeEmailCloudSdk.models.create_email_request import CreateEmailRequest
from AsposeEmailCloudSdk.models.customer_event import CustomerEvent
from AsposeEmailCloudSdk.models.disc_usage import DiscUsage
from AsposeEmailCloudSdk.models.discover_email_config_rq import DiscoverEmailConfigRq
from AsposeEmailCloudSdk.models.email_account_config import EmailAccountConfig
from AsposeEmailCloudSdk.models.email_account_request import EmailAccountRequest
from AsposeEmailCloudSdk.models.email_address import EmailAddress
from AsposeEmailCloudSdk.models.email_document import EmailDocument
Expand Down Expand Up @@ -93,6 +95,7 @@
from AsposeEmailCloudSdk.models.list_response_of_ai_name_extracted import ListResponseOfAiNameExtracted
from AsposeEmailCloudSdk.models.list_response_of_ai_name_gender_hypothesis import ListResponseOfAiNameGenderHypothesis
from AsposeEmailCloudSdk.models.list_response_of_contact_dto import ListResponseOfContactDto
from AsposeEmailCloudSdk.models.list_response_of_email_account_config import ListResponseOfEmailAccountConfig
from AsposeEmailCloudSdk.models.list_response_of_email_dto import ListResponseOfEmailDto
from AsposeEmailCloudSdk.models.list_response_of_hierarchical_object import ListResponseOfHierarchicalObject
from AsposeEmailCloudSdk.models.list_response_of_hierarchical_object_response import ListResponseOfHierarchicalObjectResponse
Expand All @@ -105,6 +108,7 @@
from AsposeEmailCloudSdk.models.mail_address import MailAddress
from AsposeEmailCloudSdk.models.mail_server_folder import MailServerFolder
from AsposeEmailCloudSdk.models.mime_response import MimeResponse
from AsposeEmailCloudSdk.models.name_value_pair import NameValuePair
from AsposeEmailCloudSdk.models.object_exist import ObjectExist
from AsposeEmailCloudSdk.models.phone_number import PhoneNumber
from AsposeEmailCloudSdk.models.postal_address import PostalAddress
Expand Down Expand Up @@ -136,6 +140,9 @@
from AsposeEmailCloudSdk.models.create_folder_base_request import CreateFolderBaseRequest
from AsposeEmailCloudSdk.models.delete_folder_base_request import DeleteFolderBaseRequest
from AsposeEmailCloudSdk.models.delete_message_base_request import DeleteMessageBaseRequest
from AsposeEmailCloudSdk.models.discover_email_config_oauth import DiscoverEmailConfigOauth
from AsposeEmailCloudSdk.models.discover_email_config_password import DiscoverEmailConfigPassword
from AsposeEmailCloudSdk.models.email_account_config_list import EmailAccountConfigList
from AsposeEmailCloudSdk.models.email_dto_list import EmailDtoList
from AsposeEmailCloudSdk.models.file_version import FileVersion
from AsposeEmailCloudSdk.models.hierarchical_object import HierarchicalObject
Expand Down Expand Up @@ -197,6 +204,9 @@
from AsposeEmailCloudSdk.models.requests.delete_folder_request import DeleteFolderRequest
from AsposeEmailCloudSdk.models.requests.delete_mapi_attachment_request import DeleteMapiAttachmentRequest
from AsposeEmailCloudSdk.models.requests.delete_mapi_properties_request import DeleteMapiPropertiesRequest
from AsposeEmailCloudSdk.models.requests.discover_email_config_oauth_request import DiscoverEmailConfigOauthRequest
from AsposeEmailCloudSdk.models.requests.discover_email_config_password_request import DiscoverEmailConfigPasswordRequest
from AsposeEmailCloudSdk.models.requests.discover_email_config_request import DiscoverEmailConfigRequest
from AsposeEmailCloudSdk.models.requests.download_file_request import DownloadFileRequest
from AsposeEmailCloudSdk.models.requests.fetch_email_message_request import FetchEmailMessageRequest
from AsposeEmailCloudSdk.models.requests.fetch_email_model_request import FetchEmailModelRequest
Expand Down
60 changes: 60 additions & 0 deletions sdk/AsposeEmailCloudSdk/api/email_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,66 @@ def delete_mapi_properties_async(self, request: requests.DeleteMapiPropertiesReq
http_request = request.to_http_info(self.api_client.configuration)
return self.__make_request_async(http_request, 'DELETE', None)

def discover_email_config(self, request: requests.DiscoverEmailConfigRequest) -> EmailAccountConfigList:
"""Discover email accounts by email address. Does not validate discovered accounts.
:param request DiscoverEmailConfigRequest object with parameters
:return: EmailAccountConfigList
"""
http_request = request.to_http_info(self.api_client.configuration)
return self.__make_request(http_request, 'GET', 'EmailAccountConfigList')

def discover_email_config_async(self, request: requests.DiscoverEmailConfigRequest) -> multiprocessing.pool.AsyncResult:
"""Discover email accounts by email address. Does not validate discovered accounts.
Performs operation asynchronously. Returns multiprocessing.pool.AsyncResult
:param request DiscoverEmailConfigRequest object with parameters
:return: multiprocessing.pool.AsyncResult (AsyncResult.get() returns EmailAccountConfigList)
"""
http_request = request.to_http_info(self.api_client.configuration)
return self.__make_request_async(http_request, 'GET', 'EmailAccountConfigList')

def discover_email_config_oauth(self, request: requests.DiscoverEmailConfigOauthRequest) -> EmailAccountConfigList:
"""Discover email accounts by email address. Validates discovered accounts using OAuth 2.0.
:param request DiscoverEmailConfigOauthRequest object with parameters
:return: EmailAccountConfigList
"""
http_request = request.to_http_info(self.api_client.configuration)
return self.__make_request(http_request, 'POST', 'EmailAccountConfigList')

def discover_email_config_oauth_async(self, request: requests.DiscoverEmailConfigOauthRequest) -> multiprocessing.pool.AsyncResult:
"""Discover email accounts by email address. Validates discovered accounts using OAuth 2.0.
Performs operation asynchronously. Returns multiprocessing.pool.AsyncResult
:param request DiscoverEmailConfigOauthRequest object with parameters
:return: multiprocessing.pool.AsyncResult (AsyncResult.get() returns EmailAccountConfigList)
"""
http_request = request.to_http_info(self.api_client.configuration)
return self.__make_request_async(http_request, 'POST', 'EmailAccountConfigList')

def discover_email_config_password(self, request: requests.DiscoverEmailConfigPasswordRequest) -> EmailAccountConfigList:
"""Discover email accounts by email address. Validates discovered accounts using login and password.
:param request DiscoverEmailConfigPasswordRequest object with parameters
:return: EmailAccountConfigList
"""
http_request = request.to_http_info(self.api_client.configuration)
return self.__make_request(http_request, 'POST', 'EmailAccountConfigList')

def discover_email_config_password_async(self, request: requests.DiscoverEmailConfigPasswordRequest) -> multiprocessing.pool.AsyncResult:
"""Discover email accounts by email address. Validates discovered accounts using login and password.
Performs operation asynchronously. Returns multiprocessing.pool.AsyncResult
:param request DiscoverEmailConfigPasswordRequest object with parameters
:return: multiprocessing.pool.AsyncResult (AsyncResult.get() returns EmailAccountConfigList)
"""
http_request = request.to_http_info(self.api_client.configuration)
return self.__make_request_async(http_request, 'POST', 'EmailAccountConfigList')

def download_file(self, request: requests.DownloadFileRequest) -> str:
"""Download file
Expand Down
10 changes: 10 additions & 0 deletions sdk/AsposeEmailCloudSdk/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
from AsposeEmailCloudSdk.models.create_email_request import CreateEmailRequest
from AsposeEmailCloudSdk.models.customer_event import CustomerEvent
from AsposeEmailCloudSdk.models.disc_usage import DiscUsage
from AsposeEmailCloudSdk.models.discover_email_config_rq import DiscoverEmailConfigRq
from AsposeEmailCloudSdk.models.email_account_config import EmailAccountConfig
from AsposeEmailCloudSdk.models.email_account_request import EmailAccountRequest
from AsposeEmailCloudSdk.models.email_address import EmailAddress
from AsposeEmailCloudSdk.models.email_document import EmailDocument
Expand Down Expand Up @@ -87,6 +89,7 @@
from AsposeEmailCloudSdk.models.list_response_of_ai_name_extracted import ListResponseOfAiNameExtracted
from AsposeEmailCloudSdk.models.list_response_of_ai_name_gender_hypothesis import ListResponseOfAiNameGenderHypothesis
from AsposeEmailCloudSdk.models.list_response_of_contact_dto import ListResponseOfContactDto
from AsposeEmailCloudSdk.models.list_response_of_email_account_config import ListResponseOfEmailAccountConfig
from AsposeEmailCloudSdk.models.list_response_of_email_dto import ListResponseOfEmailDto
from AsposeEmailCloudSdk.models.list_response_of_hierarchical_object import ListResponseOfHierarchicalObject
from AsposeEmailCloudSdk.models.list_response_of_hierarchical_object_response import ListResponseOfHierarchicalObjectResponse
Expand All @@ -99,6 +102,7 @@
from AsposeEmailCloudSdk.models.mail_address import MailAddress
from AsposeEmailCloudSdk.models.mail_server_folder import MailServerFolder
from AsposeEmailCloudSdk.models.mime_response import MimeResponse
from AsposeEmailCloudSdk.models.name_value_pair import NameValuePair
from AsposeEmailCloudSdk.models.object_exist import ObjectExist
from AsposeEmailCloudSdk.models.phone_number import PhoneNumber
from AsposeEmailCloudSdk.models.postal_address import PostalAddress
Expand Down Expand Up @@ -130,6 +134,9 @@
from AsposeEmailCloudSdk.models.create_folder_base_request import CreateFolderBaseRequest
from AsposeEmailCloudSdk.models.delete_folder_base_request import DeleteFolderBaseRequest
from AsposeEmailCloudSdk.models.delete_message_base_request import DeleteMessageBaseRequest
from AsposeEmailCloudSdk.models.discover_email_config_oauth import DiscoverEmailConfigOauth
from AsposeEmailCloudSdk.models.discover_email_config_password import DiscoverEmailConfigPassword
from AsposeEmailCloudSdk.models.email_account_config_list import EmailAccountConfigList
from AsposeEmailCloudSdk.models.email_dto_list import EmailDtoList
from AsposeEmailCloudSdk.models.file_version import FileVersion
from AsposeEmailCloudSdk.models.hierarchical_object import HierarchicalObject
Expand Down Expand Up @@ -191,6 +198,9 @@
from AsposeEmailCloudSdk.models.requests.delete_folder_request import DeleteFolderRequest
from AsposeEmailCloudSdk.models.requests.delete_mapi_attachment_request import DeleteMapiAttachmentRequest
from AsposeEmailCloudSdk.models.requests.delete_mapi_properties_request import DeleteMapiPropertiesRequest
from AsposeEmailCloudSdk.models.requests.discover_email_config_oauth_request import DiscoverEmailConfigOauthRequest
from AsposeEmailCloudSdk.models.requests.discover_email_config_password_request import DiscoverEmailConfigPasswordRequest
from AsposeEmailCloudSdk.models.requests.discover_email_config_request import DiscoverEmailConfigRequest
from AsposeEmailCloudSdk.models.requests.download_file_request import DownloadFileRequest
from AsposeEmailCloudSdk.models.requests.fetch_email_message_request import FetchEmailMessageRequest
from AsposeEmailCloudSdk.models.requests.fetch_email_model_request import FetchEmailModelRequest
Expand Down
7 changes: 6 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/account_base_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ class AccountBaseRequest(object):
}

def __init__(self, first_account: str = None, second_account: str = None, storage_folder: StorageFolderLocation = None):
"""AccountBaseRequest - a model defined in Swagger"""
"""
EmailClient accounts request
:param first_account (str) First account storage file name for receiving emails (or universal one)
:param second_account (str) Second account storage file name for sending emails (ignored if first is universal)
:param storage_folder (StorageFolderLocation) Storage folder location of account files
"""

self._first_account = None
self._second_account = None
Expand Down
6 changes: 5 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/add_attachment_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ class AddAttachmentRequest(object):
}

def __init__(self, document_folder: StorageFolderLocation = None, attachment_folder: StorageFolderLocation = None):
"""AddAttachmentRequest - a model defined in Swagger"""
"""
Add attachment request
:param document_folder (StorageFolderLocation) Storage folder location of document
:param attachment_folder (StorageFolderLocation) Storage folder location of an attachment
"""

self._document_folder = None
self._attachment_folder = None
Expand Down
6 changes: 5 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_bcr_base64_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ class AiBcrBase64Image(AiBcrImage):
}

def __init__(self, is_single: bool = None, base64_data: str = None):
"""AiBcrBase64Image - a model defined in Swagger"""
"""
Image to recognize
:param is_single (bool) Determines that image contains single VCard or more. Ignored in current version. Multiple cards on image support will be added soon
:param base64_data (str) Image data in base64
"""
super(AiBcrBase64Image, self).__init__()

self._base64_data = None
Expand Down
6 changes: 5 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_bcr_base64_rq.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ class AiBcrBase64Rq(AiBcrRq):
}

def __init__(self, options: AiBcrOptions = None, images: List[AiBcrBase64Image] = None):
"""AiBcrBase64Rq - a model defined in Swagger"""
"""
Parse business card image request
:param options (AiBcrOptions) Recognition options
:param images (List[AiBcrBase64Image]) Images to recognize
"""
super(AiBcrBase64Rq, self).__init__()

self._images = None
Expand Down
5 changes: 4 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_bcr_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ class AiBcrImage(object):
}

def __init__(self, is_single: bool = None):
"""AiBcrImage - a model defined in Swagger"""
"""
Image for recognition
:param is_single (bool) Determines that image contains single VCard or more. Ignored in current version. Multiple cards on image support will be added soon
"""

self._is_single = None
self.discriminator = 'Type'
Expand Down
6 changes: 5 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_bcr_image_storage_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ class AiBcrImageStorageFile(AiBcrImage):
}

def __init__(self, is_single: bool = None, file: StorageFileLocation = None):
"""AiBcrImageStorageFile - a model defined in Swagger"""
"""
Image from storage for recognition
:param is_single (bool) Determines that image contains single VCard or more. Ignored in current version. Multiple cards on image support will be added soon
:param file (StorageFileLocation) Image location
"""
super(AiBcrImageStorageFile, self).__init__()

self._file = None
Expand Down
8 changes: 7 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_bcr_ocr_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ class AiBcrOcrData(object):
}

def __init__(self, id: str = None, image: str = None, details: Dict[str, str] = None, data: List[AiBcrOcrDataPart] = None):
"""AiBcrOcrData - a model defined in Swagger"""
"""
Image OCR results
:param id (str) Image identifier
:param image (str) Image with possible pre-processing in Base64
:param details (Dict[str, str]) Additional details from OCR engine
:param data (List[AiBcrOcrDataPart]) OCR results
"""

self._id = None
self._image = None
Expand Down
10 changes: 9 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_bcr_ocr_data_part.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,15 @@ class AiBcrOcrDataPart(object):
}

def __init__(self, x: float = None, y: float = None, width: float = None, height: float = None, text: str = None, details: Dict[str, str] = None):
"""AiBcrOcrDataPart - a model defined in Swagger"""
"""
Recognized text block
:param x (float) X position of text block
:param y (float) Y position of text block
:param width (float) Width of text block
:param height (float) Height of text block
:param text (str) Recognized text
:param details (Dict[str, str]) Additional recognition result details
"""

self._x = None
self._y = None
Expand Down
6 changes: 5 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_bcr_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ class AiBcrOptions(object):
}

def __init__(self, languages: str = None, countries: str = None):
"""AiBcrOptions - a model defined in Swagger"""
"""
Recognition options
:param languages (str) Comma-separated ISO-639 codes of languages (either 639-1 or 639-3; i.e. \"it\" or \"ita\" for Italian); it's \"\" by default
:param countries (str) Comma-separated codes of countries
"""

self._languages = None
self._countries = None
Expand Down
6 changes: 5 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_bcr_parse_ocr_data_rq.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ class AiBcrParseOcrDataRq(AiBcrRq):
}

def __init__(self, options: AiBcrOptions = None, data: List[AiBcrOcrData] = None):
"""AiBcrParseOcrDataRq - a model defined in Swagger"""
"""
Parse ocr data request
:param options (AiBcrOptions) Recognition options
:param data (List[AiBcrOcrData]) OCR data
"""
super(AiBcrParseOcrDataRq, self).__init__()

self._data = None
Expand Down
7 changes: 6 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_bcr_parse_storage_rq.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ class AiBcrParseStorageRq(AiBcrStorageImageRq):
}

def __init__(self, options: AiBcrOptions = None, images: List[AiBcrImageStorageFile] = None, out_folder: StorageFolderLocation = None):
"""AiBcrParseStorageRq - a model defined in Swagger"""
"""
Parse business card images from Storage request
:param options (AiBcrOptions) Recognition options
:param images (List[AiBcrImageStorageFile]) List of images with business cards
:param out_folder (StorageFolderLocation) Parse output folder location on storage
"""
super(AiBcrParseStorageRq, self).__init__()

self._out_folder = None
Expand Down
5 changes: 4 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_bcr_rq.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ class AiBcrRq(object):
}

def __init__(self, options: AiBcrOptions = None):
"""AiBcrRq - a model defined in Swagger"""
"""
Business card recognition request
:param options (AiBcrOptions) Recognition options
"""

self._options = None
self.discriminator = 'Type'
Expand Down
6 changes: 5 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_bcr_storage_image_rq.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ class AiBcrStorageImageRq(AiBcrRq):
}

def __init__(self, options: AiBcrOptions = None, images: List[AiBcrImageStorageFile] = None):
"""AiBcrStorageImageRq - a model defined in Swagger"""
"""
Business card images from storage for recognition
:param options (AiBcrOptions) Recognition options
:param images (List[AiBcrImageStorageFile]) List of images with business cards
"""
super(AiBcrStorageImageRq, self).__init__()

self._images = None
Expand Down
8 changes: 7 additions & 1 deletion sdk/AsposeEmailCloudSdk/models/ai_name_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ class AiNameComponent(object):
}

def __init__(self, value: str = None, category: str = None, score: float = None, position: int = None):
"""AiNameComponent - a model defined in Swagger"""
"""
Parsed name component
:param value (str) Component value
:param category (str) Name component category. Enum, available values: Unknown, Mononym, Score, Format, FirstInitial, FirstName, MiddleInitial, MiddleName, MiddleNickname, MiddleSobriquet, MiddleMaidenName, MiddlePatronym, MiddleMatronym, LastInitial, LastName, LastNobiliaryParticle, LastNominalConjunction, LastPaternalSurname, LastMaternalSurname, PrefixTitle, PostfixGenerationalTitle, PostfixPostnominalLetters, ArabicIsm, ArabicKunya, ArabicNasab, ArabicSlaqab, ArabicNisbah
:param score (float) Score from 0.0 to 1.0
:param position (int) Component position from 0
"""

self._value = None
self._category = None
Expand Down
Loading

0 comments on commit e66b9a7

Please sign in to comment.