Skip to content

Commit 02326f1

Browse files
Merge branch 'master' into release
2 parents 1bb67c3 + 8b81653 commit 02326f1

31 files changed

+5960
-154
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ 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.2
20+
21+
- Added operations to manipulate with Structure Document Tags (SDT) in documents.
22+
23+
1924
## Enhancements in Version 23.1
2025

2126
- Various changes related to stability and performance
Binary file not shown.

asposewordscloud/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@
219219
from asposewordscloud.models.stat_data_response import StatDataResponse
220220
from asposewordscloud.models.storage_file import StorageFile
221221
from asposewordscloud.models.story_child_nodes import StoryChildNodes
222+
from asposewordscloud.models.structured_document_tag import StructuredDocumentTag
223+
from asposewordscloud.models.structured_document_tag_collection import StructuredDocumentTagCollection
224+
from asposewordscloud.models.structured_document_tag_insert import StructuredDocumentTagInsert
225+
from asposewordscloud.models.structured_document_tag_list_item import StructuredDocumentTagListItem
226+
from asposewordscloud.models.structured_document_tag_response import StructuredDocumentTagResponse
227+
from asposewordscloud.models.structured_document_tags_response import StructuredDocumentTagsResponse
228+
from asposewordscloud.models.structured_document_tag_update import StructuredDocumentTagUpdate
222229
from asposewordscloud.models.style import Style
223230
from asposewordscloud.models.style_apply import StyleApply
224231
from asposewordscloud.models.style_copy import StyleCopy

asposewordscloud/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
8383

8484
self.pool = None
8585
self.rest_client = rest.RESTClientObject(configuration)
86-
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '23.1'}
86+
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '23.2'}
8787
if header_name is not None:
8888
self.default_headers[header_name] = header_value
8989
self.cookie = cookie
9090
# Set default User-Agent.
91-
self.user_agent = 'python sdk 23.1'
91+
self.user_agent = 'python sdk 23.2'
9292

9393
def __del__(self):
9494
if not self.pool is None:

asposewordscloud/apis/words_api.py

Lines changed: 957 additions & 148 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.1\n"\
266-
"SDK Package Version: 23.1".\
265+
"Version of the API: 23.2\n"\
266+
"SDK Package Version: 23.2".\
267267
format(env=sys.platform, pyversion=sys.version)

asposewordscloud/models/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,13 @@
214214
from asposewordscloud.models.stat_data_response import StatDataResponse
215215
from asposewordscloud.models.storage_file import StorageFile
216216
from asposewordscloud.models.story_child_nodes import StoryChildNodes
217+
from asposewordscloud.models.structured_document_tag import StructuredDocumentTag
218+
from asposewordscloud.models.structured_document_tag_collection import StructuredDocumentTagCollection
219+
from asposewordscloud.models.structured_document_tag_insert import StructuredDocumentTagInsert
220+
from asposewordscloud.models.structured_document_tag_list_item import StructuredDocumentTagListItem
221+
from asposewordscloud.models.structured_document_tag_response import StructuredDocumentTagResponse
222+
from asposewordscloud.models.structured_document_tags_response import StructuredDocumentTagsResponse
223+
from asposewordscloud.models.structured_document_tag_update import StructuredDocumentTagUpdate
217224
from asposewordscloud.models.style import Style
218225
from asposewordscloud.models.style_apply import StyleApply
219226
from asposewordscloud.models.style_copy import StyleCopy

asposewordscloud/models/requests/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
from asposewordscloud.models.requests.delete_run_online_request import DeleteRunOnlineRequest
7676
from asposewordscloud.models.requests.delete_section_request import DeleteSectionRequest
7777
from asposewordscloud.models.requests.delete_section_online_request import DeleteSectionOnlineRequest
78+
from asposewordscloud.models.requests.delete_structured_document_tag_request import DeleteStructuredDocumentTagRequest
79+
from asposewordscloud.models.requests.delete_structured_document_tag_online_request import DeleteStructuredDocumentTagOnlineRequest
7880
from asposewordscloud.models.requests.delete_table_request import DeleteTableRequest
7981
from asposewordscloud.models.requests.delete_table_cell_request import DeleteTableCellRequest
8082
from asposewordscloud.models.requests.delete_table_cell_online_request import DeleteTableCellOnlineRequest
@@ -180,6 +182,10 @@
180182
from asposewordscloud.models.requests.get_section_page_setup_online_request import GetSectionPageSetupOnlineRequest
181183
from asposewordscloud.models.requests.get_sections_request import GetSectionsRequest
182184
from asposewordscloud.models.requests.get_sections_online_request import GetSectionsOnlineRequest
185+
from asposewordscloud.models.requests.get_structured_document_tag_request import GetStructuredDocumentTagRequest
186+
from asposewordscloud.models.requests.get_structured_document_tag_online_request import GetStructuredDocumentTagOnlineRequest
187+
from asposewordscloud.models.requests.get_structured_document_tags_request import GetStructuredDocumentTagsRequest
188+
from asposewordscloud.models.requests.get_structured_document_tags_online_request import GetStructuredDocumentTagsOnlineRequest
183189
from asposewordscloud.models.requests.get_style_request import GetStyleRequest
184190
from asposewordscloud.models.requests.get_style_from_document_element_request import GetStyleFromDocumentElementRequest
185191
from asposewordscloud.models.requests.get_style_from_document_element_online_request import GetStyleFromDocumentElementOnlineRequest
@@ -226,6 +232,8 @@
226232
from asposewordscloud.models.requests.insert_paragraph_online_request import InsertParagraphOnlineRequest
227233
from asposewordscloud.models.requests.insert_run_request import InsertRunRequest
228234
from asposewordscloud.models.requests.insert_run_online_request import InsertRunOnlineRequest
235+
from asposewordscloud.models.requests.insert_structured_document_tag_request import InsertStructuredDocumentTagRequest
236+
from asposewordscloud.models.requests.insert_structured_document_tag_online_request import InsertStructuredDocumentTagOnlineRequest
229237
from asposewordscloud.models.requests.insert_style_request import InsertStyleRequest
230238
from asposewordscloud.models.requests.insert_style_online_request import InsertStyleOnlineRequest
231239
from asposewordscloud.models.requests.insert_table_request import InsertTableRequest
@@ -309,6 +317,8 @@
309317
from asposewordscloud.models.requests.update_run_online_request import UpdateRunOnlineRequest
310318
from asposewordscloud.models.requests.update_section_page_setup_request import UpdateSectionPageSetupRequest
311319
from asposewordscloud.models.requests.update_section_page_setup_online_request import UpdateSectionPageSetupOnlineRequest
320+
from asposewordscloud.models.requests.update_structured_document_tag_request import UpdateStructuredDocumentTagRequest
321+
from asposewordscloud.models.requests.update_structured_document_tag_online_request import UpdateStructuredDocumentTagOnlineRequest
312322
from asposewordscloud.models.requests.update_style_request import UpdateStyleRequest
313323
from asposewordscloud.models.requests.update_style_online_request import UpdateStyleOnlineRequest
314324
from asposewordscloud.models.requests.update_table_cell_format_request import UpdateTableCellFormatRequest
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# coding: utf-8
2+
# -----------------------------------------------------------------------------------
3+
# <copyright company="Aspose" file="delete_structured_document_tag_online_request.py">
4+
# Copyright (c) 2023 Aspose.Words for Cloud
5+
# </copyright>
6+
# <summary>
7+
# Permission is hereby granted, free of charge, to any person obtaining a copy
8+
# of this software and associated documentation files (the "Software"), to deal
9+
# in the Software without restriction, including without limitation the rights
10+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
# copies of the Software, and to permit persons to whom the Software is
12+
# furnished to do so, subject to the following conditions:
13+
#
14+
# The above copyright notice and this permission notice shall be included in all
15+
# copies or substantial portions of the Software.
16+
#
17+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
# SOFTWARE.
24+
# </summary>
25+
# -----------------------------------------------------------------------------------
26+
import json
27+
28+
from six.moves.urllib.parse import quote
29+
from asposewordscloud import *
30+
from asposewordscloud.models import *
31+
from asposewordscloud.models.requests import *
32+
from asposewordscloud.models.responses import *
33+
34+
class DeleteStructuredDocumentTagOnlineRequest(BaseRequestObject):
35+
"""
36+
Request model for delete_structured_document_tag_online operation.
37+
Initializes a new instance.
38+
:param document The document.
39+
:param index Object index.
40+
:param node_path The path to the node in the document tree.
41+
:param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
42+
:param password Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
43+
:param encrypted_password Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
44+
:param dest_file_name Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
45+
:param revision_author Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
46+
:param revision_date_time The date and time to use for revisions.
47+
"""
48+
49+
def __init__(self, document, index, node_path=None, load_encoding=None, password=None, encrypted_password=None, dest_file_name=None, revision_author=None, revision_date_time=None):
50+
self.document = document
51+
self.index = index
52+
self.node_path = node_path
53+
self.load_encoding = load_encoding
54+
self.password = password
55+
self.encrypted_password = encrypted_password
56+
self.dest_file_name = dest_file_name
57+
self.revision_author = revision_author
58+
self.revision_date_time = revision_date_time
59+
60+
def create_http_request(self, api_client):
61+
# verify the required parameter 'document' is set
62+
if self.document is None:
63+
raise ValueError("Missing the required parameter `document` when calling `delete_structured_document_tag_online`") # noqa: E501
64+
# verify the required parameter 'index' is set
65+
if self.index is None:
66+
raise ValueError("Missing the required parameter `index` when calling `delete_structured_document_tag_online`") # noqa: E501
67+
68+
path = '/v4.0/words/online/delete/{nodePath}/sdt/{index}'
69+
path_params = {}
70+
if self.index is not None:
71+
path_params['index'] = self.index # noqa: E501
72+
else:
73+
path_params['index'] = '' # noqa: E501
74+
if self.node_path is not None:
75+
path_params['nodePath'] = self.node_path # noqa: E501
76+
else:
77+
path_params['nodePath'] = '' # noqa: E501
78+
79+
# path parameters
80+
collection_formats = {}
81+
if path_params:
82+
path_params = api_client.sanitize_for_serialization(path_params)
83+
path_params = api_client.parameters_to_tuples(path_params, collection_formats)
84+
for k, v in path_params:
85+
# specified safe chars, encode everything
86+
path = path.replace(
87+
'{%s}' % k,
88+
quote(str(v), safe=api_client.configuration.safe_chars_for_path_param)
89+
)
90+
91+
# remove optional path parameters
92+
path = path.replace('//', '/')
93+
94+
query_params = []
95+
if self.load_encoding is not None:
96+
query_params.append(('loadEncoding', self.load_encoding)) # noqa: E501
97+
if self.password is not None:
98+
query_params.append(('password', self.password)) # noqa: E501
99+
if self.encrypted_password is not None:
100+
query_params.append(('encryptedPassword', self.encrypted_password)) # noqa: E501
101+
if self.dest_file_name is not None:
102+
query_params.append(('destFileName', self.dest_file_name)) # noqa: E501
103+
if self.revision_author is not None:
104+
query_params.append(('revisionAuthor', self.revision_author)) # noqa: E501
105+
if self.revision_date_time is not None:
106+
query_params.append(('revisionDateTime', self.revision_date_time)) # noqa: E501
107+
108+
header_params = {}
109+
# HTTP header `Content-Type`
110+
header_params['Content-Type'] = api_client.select_header_content_type( # noqa: E501
111+
['multipart/form-data']) # noqa: E501
112+
113+
file_content_params = []
114+
form_params = []
115+
if self.document is not None:
116+
form_params.append(['document', self.document, 'file']) # noqa: E501
117+
118+
for file_content_value in file_content_params:
119+
form_params.append([file_content_value.reference, file_content_value.content, 'file']) # noqa: E501
120+
121+
return {
122+
"method": "PUT",
123+
"path": path,
124+
"body": None,
125+
"query_params": query_params,
126+
"header_params": header_params,
127+
"form_params": form_params,
128+
"collection_formats": collection_formats,
129+
"response_type": 'files_collection' # noqa: E501
130+
}
131+
132+
def get_response_type(self):
133+
return 'files_collection' # noqa: E501
134+
135+
def deserialize_response(self, api_client, response):
136+
return api_client.deserialize_files_collection(response.data, response.getheaders())

0 commit comments

Comments
 (0)