Skip to content

Commit e278d04

Browse files
Merge branch 'master' into release
2 parents 9a8660f + 159e5f0 commit e278d04

35 files changed

+1876
-84
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ Python Cloud SDK wraps Aspose.Words Cloud API so you could seamlessly integrate
1616
- [Convert a document to desired file format](https://docs.aspose.cloud/display/wordscloud/Convert+Document+to+Destination+Format+with+Detailed+Settings+and+Save+Result+to+Storage) along with detailed settings.
1717
- Convert an encrypted PDF document into Word document format.
1818

19+
## Enhancements in Version 23.12
20+
21+
- Properties Name, Text, StartRange, EndRange marked as required for InsertBookmark operation.
22+
- Implemented DeleteOfficeMathObjects operation to delete all office math objects from document.
23+
- Parameter ProtectionRequest was removed from the UnprotectDocument operation. Now removing protection from a document does not require a password.
24+
- Model ProtectionRequest marked as deprecated, please use ProtectionRequestV2 instead for perform ProtectDocument operation. To change the password or protection type of protected document, the old password is no required.
25+
- Rename aspose-client header.
26+
1927
## Enhancements in Version 23.11
2028

2129
- Support of required properties in models.

asposewordscloud/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@
181181
from asposewordscloud.models.protection_data import ProtectionData
182182
from asposewordscloud.models.protection_data_response import ProtectionDataResponse
183183
from asposewordscloud.models.protection_request import ProtectionRequest
184+
from asposewordscloud.models.protection_request_v2 import ProtectionRequestV2
184185
from asposewordscloud.models.ps_save_options_data import PsSaveOptionsData
185186
from asposewordscloud.models.public_key_response import PublicKeyResponse
186187
from asposewordscloud.models.range_document import RangeDocument
@@ -256,6 +257,8 @@
256257
from asposewordscloud.models.tiff_save_options_data import TiffSaveOptionsData
257258
from asposewordscloud.models.time_zone_info_data import TimeZoneInfoData
258259
from asposewordscloud.models.user_information import UserInformation
260+
from asposewordscloud.models.watermark_data_image import WatermarkDataImage
261+
from asposewordscloud.models.watermark_data_text import WatermarkDataText
259262
from asposewordscloud.models.watermark_text import WatermarkText
260263
from asposewordscloud.models.word_ml_save_options_data import WordMLSaveOptionsData
261264
from asposewordscloud.models.words_api_error_response import WordsApiErrorResponse

asposewordscloud/api_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ class ApiClient(object):
246246
'ProtectionData, _': asposewordscloud.models.ProtectionData,
247247
'ProtectionDataResponse, _': asposewordscloud.models.ProtectionDataResponse,
248248
'ProtectionRequest, _': asposewordscloud.models.ProtectionRequest,
249+
'ProtectionRequestV2, _': asposewordscloud.models.ProtectionRequestV2,
249250
'PsSaveOptionsData, _': asposewordscloud.models.PsSaveOptionsData,
250251
'PublicKeyResponse, _': asposewordscloud.models.PublicKeyResponse,
251252
'RangeDocument, _': asposewordscloud.models.RangeDocument,
@@ -321,6 +322,8 @@ class ApiClient(object):
321322
'TiffSaveOptionsData, _': asposewordscloud.models.TiffSaveOptionsData,
322323
'TimeZoneInfoData, _': asposewordscloud.models.TimeZoneInfoData,
323324
'UserInformation, _': asposewordscloud.models.UserInformation,
325+
'WatermarkDataImage, _': asposewordscloud.models.WatermarkDataImage,
326+
'WatermarkDataText, _': asposewordscloud.models.WatermarkDataText,
324327
'WatermarkText, _': asposewordscloud.models.WatermarkText,
325328
'WordMLSaveOptionsData, _': asposewordscloud.models.WordMLSaveOptionsData,
326329
'WordsApiErrorResponse, _': asposewordscloud.models.WordsApiErrorResponse,
@@ -342,12 +345,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
342345

343346
self.pool = None
344347
self.rest_client = rest.RESTClientObject(configuration)
345-
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '23.11'}
348+
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-client-version': '23.12'}
346349
if header_name is not None:
347350
self.default_headers[header_name] = header_value
348351
self.cookie = cookie
349352
# Set default User-Agent.
350-
self.user_agent = 'python sdk 23.11'
353+
self.user_agent = 'python sdk 23.12'
351354

352355
def __del__(self):
353356
if not self.pool is None:

asposewordscloud/apis/words_api.py

Lines changed: 339 additions & 14 deletions
Large diffs are not rendered by default.

asposewordscloud/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,6 @@ def to_debug_report(self):
262262
return "Python SDK Debug Report:\n"\
263263
"OS: {env}\n"\
264264
"Python Version: {pyversion}\n"\
265-
"Version of the API: 23.11\n"\
266-
"SDK Package Version: 23.11".\
265+
"Version of the API: 23.12\n"\
266+
"SDK Package Version: 23.12".\
267267
format(env=sys.platform, pyversion=sys.version)

asposewordscloud/models/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@
176176
from asposewordscloud.models.protection_data import ProtectionData
177177
from asposewordscloud.models.protection_data_response import ProtectionDataResponse
178178
from asposewordscloud.models.protection_request import ProtectionRequest
179+
from asposewordscloud.models.protection_request_v2 import ProtectionRequestV2
179180
from asposewordscloud.models.ps_save_options_data import PsSaveOptionsData
180181
from asposewordscloud.models.public_key_response import PublicKeyResponse
181182
from asposewordscloud.models.range_document import RangeDocument
@@ -251,6 +252,8 @@
251252
from asposewordscloud.models.tiff_save_options_data import TiffSaveOptionsData
252253
from asposewordscloud.models.time_zone_info_data import TimeZoneInfoData
253254
from asposewordscloud.models.user_information import UserInformation
255+
from asposewordscloud.models.watermark_data_image import WatermarkDataImage
256+
from asposewordscloud.models.watermark_data_text import WatermarkDataText
254257
from asposewordscloud.models.watermark_text import WatermarkText
255258
from asposewordscloud.models.word_ml_save_options_data import WordMLSaveOptionsData
256259
from asposewordscloud.models.words_api_error_response import WordsApiErrorResponse

asposewordscloud/models/bookmark_insert.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ def extract_files_content(self, filesContentResult):
168168

169169
def validate(self):
170170
"""Validate all required properties in model"""
171+
if self._name is None:
172+
raise ValueError("Property Name in BookmarkInsert is required.") # noqa: E501
173+
if self._text is None:
174+
raise ValueError("Property Text in BookmarkInsert is required.") # noqa: E501
175+
if self._start_range is None:
176+
raise ValueError("Property StartRange in BookmarkInsert is required.") # noqa: E501
177+
if self._end_range is None:
178+
raise ValueError("Property EndRange in BookmarkInsert is required.") # noqa: E501
171179

172180
if self._start_range is not None:
173181
self._start_range.validate()

asposewordscloud/models/compare_data.py

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class CompareData(object):
4747
'compare_options': 'CompareOptions',
4848
'comparing_with_document': 'str',
4949
'date_time': 'datetime',
50+
'file_reference': 'FileReference',
5051
'result_document_format': 'str'
5152
}
5253

@@ -55,16 +56,18 @@ class CompareData(object):
5556
'compare_options': 'CompareOptions',
5657
'comparing_with_document': 'ComparingWithDocument',
5758
'date_time': 'DateTime',
59+
'file_reference': 'FileReference',
5860
'result_document_format': 'ResultDocumentFormat'
5961
}
6062

61-
def __init__(self, author=None, compare_options=None, comparing_with_document=None, date_time=None, result_document_format=None): # noqa: E501
63+
def __init__(self, author=None, compare_options=None, comparing_with_document=None, date_time=None, file_reference=None, result_document_format=None): # noqa: E501
6264
"""CompareData - a model defined in Swagger""" # noqa: E501
6365

6466
self._author = None
6567
self._compare_options = None
6668
self._comparing_with_document = None
6769
self._date_time = None
70+
self._file_reference = None
6871
self._result_document_format = None
6972
self.discriminator = None
7073

@@ -76,6 +79,8 @@ def __init__(self, author=None, compare_options=None, comparing_with_document=No
7679
self.comparing_with_document = comparing_with_document
7780
if date_time is not None:
7881
self.date_time = date_time
82+
if file_reference is not None:
83+
self.file_reference = file_reference
7984
if result_document_format is not None:
8085
self.result_document_format = result_document_format
8186

@@ -167,6 +172,28 @@ def date_time(self, date_time):
167172
"""
168173
self._date_time = date_time
169174

175+
@property
176+
def file_reference(self):
177+
"""Gets the file_reference of this CompareData. # noqa: E501
178+
179+
Gets or sets the file reference. # noqa: E501
180+
181+
:return: The file_reference of this CompareData. # noqa: E501
182+
:rtype: FileReference
183+
"""
184+
return self._file_reference
185+
186+
@file_reference.setter
187+
def file_reference(self, file_reference):
188+
"""Sets the file_reference of this CompareData.
189+
190+
Gets or sets the file reference. # noqa: E501
191+
192+
:param file_reference: The file_reference of this CompareData. # noqa: E501
193+
:type: FileReference
194+
"""
195+
self._file_reference = file_reference
196+
170197
@property
171198
def result_document_format(self):
172199
"""Gets the result_document_format of this CompareData. # noqa: E501
@@ -192,13 +219,17 @@ def result_document_format(self, result_document_format):
192219

193220
def extract_files_content(self, filesContentResult):
194221
"""Append the file content result list"""
222+
if self._file_reference is not None:
223+
self._file_reference.extract_files_content(filesContentResult)
224+
225+
195226

196227
def validate(self):
197228
"""Validate all required properties in model"""
198229
if self._author is None:
199230
raise ValueError("Property Author in CompareData is required.") # noqa: E501
200-
if self._comparing_with_document is None:
201-
raise ValueError("Property ComparingWithDocument in CompareData is required.") # noqa: E501
231+
if self._file_reference is None:
232+
raise ValueError("Property FileReference in CompareData is required.") # noqa: E501
202233

203234
if self._compare_options is not None:
204235
self._compare_options.validate()
@@ -207,6 +238,11 @@ def validate(self):
207238

208239

209240

241+
if self._file_reference is not None:
242+
self._file_reference.validate()
243+
244+
245+
210246
def to_dict(self):
211247
"""Returns the model properties as a dict"""
212248
result = {}

asposewordscloud/models/protection_data.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,24 @@ def protection_type(self, protection_type):
7979
:param protection_type: The protection_type of this ProtectionData. # noqa: E501
8080
:type: str
8181
"""
82-
self._protection_type = protection_type
82+
allowed_values = ["AllowOnlyRevisions", "AllowOnlyComments", "AllowOnlyFormFields", "ReadOnly", "NoProtection"] # noqa: E501
83+
if not protection_type.isdigit():
84+
if protection_type not in allowed_values:
85+
raise ValueError(
86+
"Invalid value for `protection_type` ({0}), must be one of {1}" # noqa: E501
87+
.format(protection_type, allowed_values))
88+
self._protection_type = protection_type
89+
else:
90+
self._protection_type = allowed_values[int(protection_type) if six.PY3 else long(protection_type)]
8391

8492

8593
def extract_files_content(self, filesContentResult):
8694
"""Append the file content result list"""
8795

8896
def validate(self):
8997
"""Validate all required properties in model"""
98+
if self._protection_type is None:
99+
raise ValueError("Property ProtectionType in ProtectionData is required.") # noqa: E501
90100

91101
def to_dict(self):
92102
"""Returns the model properties as a dict"""

asposewordscloud/models/protection_request.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import six
3232
import json
3333

34+
@typing_extensions.deprecated("ProtectionRequest is deprecated and remains for backwards compatibility only.")
3435
class ProtectionRequest(object):
3536
"""Request on changing of protection.
3637
"""

0 commit comments

Comments
 (0)