Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
dynabic-billing-team committed Jul 11, 2022
2 parents ca46293 + ca326d9 commit 0263c1c
Show file tree
Hide file tree
Showing 23 changed files with 820 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [22.7.0] - Aspose Words Cloud for Dart 22.7 Release Notes

- Expand 'AppendDocument' API method to support 'ImageEntryList' for directly appending images to documents and another images.
- Added 'CompressDocument' API method to support compression and resizing images inside the document for reduce the size of the document.


## [22.6.0] - Aspose Words Cloud for Dart 22.6 Release Notes

- Added 'DeleteBookmark' and 'DeleteBookmarkOnline' API methods for delete bookmarks by name from the document.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Add this dependency to your *pubspec.yaml*:

```yaml
dependencies:
aspose_words_cloud: 22.6.0
aspose_words_cloud: 22.7.0
```
## Getting Started
Expand Down
9 changes: 9 additions & 0 deletions lib/aspose_words_cloud.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export 'src/api_exception.dart';
export 'src/configuration.dart';
export 'src/models/api_error.dart';
export 'src/models/available_fonts_response.dart';
export 'src/models/base_entry.dart';
export 'src/models/base_entry_list.dart';
export 'src/models/bmp_save_options_data.dart';
export 'src/models/bookmark.dart';
export 'src/models/bookmark_data.dart';
Expand All @@ -55,6 +57,8 @@ export 'src/models/comments_collection.dart';
export 'src/models/comments_response.dart';
export 'src/models/compare_data.dart';
export 'src/models/compare_options.dart';
export 'src/models/compress_options.dart';
export 'src/models/compress_response.dart';
export 'src/models/csv_data_load_options.dart';
export 'src/models/custom_xml_part.dart';
export 'src/models/custom_xml_part_insert.dart';
Expand Down Expand Up @@ -144,6 +148,8 @@ export 'src/models/hyperlink.dart';
export 'src/models/hyperlink_response.dart';
export 'src/models/hyperlinks.dart';
export 'src/models/hyperlinks_response.dart';
export 'src/models/image_entry.dart';
export 'src/models/image_entry_list.dart';
export 'src/models/image_save_options_data.dart';
export 'src/models/info_additional_item.dart';
export 'src/models/info_response.dart';
Expand Down Expand Up @@ -309,6 +315,8 @@ export 'src/requests/classify_document_request.dart';
export 'src/requests/classify_request.dart';
export 'src/requests/compare_document_online_request.dart';
export 'src/requests/compare_document_request.dart';
export 'src/requests/compress_document_online_request.dart';
export 'src/requests/compress_document_request.dart';
export 'src/requests/convert_document_request.dart';
export 'src/requests/copy_file_request.dart';
export 'src/requests/copy_folder_request.dart';
Expand Down Expand Up @@ -617,6 +625,7 @@ export 'src/responses/accept_all_revisions_online_response.dart';
export 'src/responses/append_document_online_response.dart';
export 'src/responses/apply_style_to_document_element_online_response.dart';
export 'src/responses/compare_document_online_response.dart';
export 'src/responses/compress_document_online_response.dart';
export 'src/responses/copy_style_online_response.dart';
export 'src/responses/create_or_update_document_property_online_response.dart';
export 'src/responses/delete_all_paragraph_tab_stops_online_response.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/api_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ class ApiClient {

var httpRequest = http.Request(requestData.method, Uri.parse(requestData.url));
httpRequest.headers['x-aspose-client'] = 'dart sdk';
httpRequest.headers['x-aspose-client-version'] = '22.6';
httpRequest.headers['x-aspose-client-version'] = '22.7';
httpRequest.headers['Authorization'] = await _getAuthToken();
if (requestData.headers != null) {
httpRequest.headers.addAll(requestData.headers);
Expand Down
64 changes: 64 additions & 0 deletions lib/src/models/base_entry.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* --------------------------------------------------------------------------------
* <copyright company="Aspose" file="base_entry.dart">
* Copyright (c) 2022 Aspose.Words for Cloud
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* </summary>
* --------------------------------------------------------------------------------
*/

library aspose_words_cloud;

import '../../aspose_words_cloud.dart';

/// Represents a entry which will be appended to the original resource document.
class BaseEntry implements ModelBase {
/// Gets or sets the path to entry to append at the server.
String _href;

String get href => _href;
set href(String val) => _href = val;


@override
void deserialize(Map<String, dynamic> json) {
if (json == null) {
throw ApiException(400, 'Failed to deserialize BaseEntry data model.');
}

if (json.containsKey('Href')) {
href = json['Href'] as String;
} else {
href = null;
}
}

@override
Map<String, dynamic> serialize() {
var _result = <String, dynamic>{};
if (href != null) {
_result['Href'] = href;
}
return _result;
}
}


50 changes: 50 additions & 0 deletions lib/src/models/base_entry_list.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* --------------------------------------------------------------------------------
* <copyright company="Aspose" file="base_entry_list.dart">
* Copyright (c) 2022 Aspose.Words for Cloud
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* </summary>
* --------------------------------------------------------------------------------
*/

library aspose_words_cloud;

import '../../aspose_words_cloud.dart';

/// Represents a list of entries which will be appended to the original resource entry.
abstract class BaseEntryList implements ModelBase {

@override
void deserialize(Map<String, dynamic> json) {
if (json == null) {
throw ApiException(400, 'Failed to deserialize BaseEntryList data model.');
}

}

@override
Map<String, dynamic> serialize() {
var _result = <String, dynamic>{};
return _result;
}
}


83 changes: 83 additions & 0 deletions lib/src/models/compress_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* --------------------------------------------------------------------------------
* <copyright company="Aspose" file="compress_options.dart">
* Copyright (c) 2022 Aspose.Words for Cloud
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* </summary>
* --------------------------------------------------------------------------------
*/

library aspose_words_cloud;

import '../../aspose_words_cloud.dart';

/// Options of document compress.
class CompressOptions implements ModelBase {
/// Gets or sets the quality level of images from 0 to 100. Default value is 75.
int _imagesQuality;

int get imagesQuality => _imagesQuality;
set imagesQuality(int val) => _imagesQuality = val;


/// Gets or sets the resize factor of images.
/// This value determines how many times the size of the images in the document will be reduced.
/// The parameter value must be greater than 1 for resizing. Default value is 1 and has no effect on images size.
int _imagesReduceSizeFactor;

int get imagesReduceSizeFactor => _imagesReduceSizeFactor;
set imagesReduceSizeFactor(int val) => _imagesReduceSizeFactor = val;


@override
void deserialize(Map<String, dynamic> json) {
if (json == null) {
throw ApiException(400, 'Failed to deserialize CompressOptions data model.');
}

if (json.containsKey('ImagesQuality')) {
imagesQuality = json['ImagesQuality'] as int;
} else {
imagesQuality = null;
}

if (json.containsKey('ImagesReduceSizeFactor')) {
imagesReduceSizeFactor = json['ImagesReduceSizeFactor'] as int;
} else {
imagesReduceSizeFactor = null;
}
}

@override
Map<String, dynamic> serialize() {
var _result = <String, dynamic>{};
if (imagesQuality != null) {
_result['ImagesQuality'] = imagesQuality;
}

if (imagesReduceSizeFactor != null) {
_result['ImagesReduceSizeFactor'] = imagesReduceSizeFactor;
}
return _result;
}
}


73 changes: 73 additions & 0 deletions lib/src/models/compress_response.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* --------------------------------------------------------------------------------
* <copyright company="Aspose" file="compress_response.dart">
* Copyright (c) 2022 Aspose.Words for Cloud
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* </summary>
* --------------------------------------------------------------------------------
*/

library aspose_words_cloud;

import '../../aspose_words_cloud.dart';

/// The REST response of compressed document.
class CompressResponse extends WordsResponse {
/// Gets or sets the destination document info.
Document _document;

Document get document => _document;
set document(Document val) => _document = val;


@override
void deserialize(Map<String, dynamic> json) {
if (json == null) {
throw ApiException(400, 'Failed to deserialize CompressResponse data model.');
}

super.deserialize(json);
if (json.containsKey('RequestId')) {
requestId = json['RequestId'] as String;
} else {
requestId = null;
}

if (json.containsKey('Document')) {
document = Document();
document.deserialize(json['Document'] as Map<String, dynamic>);
} else {
document = null;
}
}

@override
Map<String, dynamic> serialize() {
var _result = <String, dynamic>{};
_result.addAll(super.serialize());
if (document != null) {
_result['Document'] = document.serialize();
}
return _result;
}
}


4 changes: 3 additions & 1 deletion lib/src/models/document_entry_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ library aspose_words_cloud;
import '../../aspose_words_cloud.dart';

/// Represents a list of documents which will be appended to the original resource document.
class DocumentEntryList implements ModelBase {
class DocumentEntryList extends BaseEntryList {
/// Gets or sets a value indicating whether to apply headers and footers from base document to appending documents. The default value is true.
bool _applyBaseDocumentHeadersAndFootersToAppendingDocuments;

Expand All @@ -51,6 +51,7 @@ class DocumentEntryList implements ModelBase {
throw ApiException(400, 'Failed to deserialize DocumentEntryList data model.');
}

super.deserialize(json);
if (json.containsKey('ApplyBaseDocumentHeadersAndFootersToAppendingDocuments')) {
applyBaseDocumentHeadersAndFootersToAppendingDocuments = json['ApplyBaseDocumentHeadersAndFootersToAppendingDocuments'] as bool;
} else {
Expand All @@ -73,6 +74,7 @@ class DocumentEntryList implements ModelBase {
@override
Map<String, dynamic> serialize() {
var _result = <String, dynamic>{};
_result.addAll(super.serialize());
if (applyBaseDocumentHeadersAndFootersToAppendingDocuments != null) {
_result['ApplyBaseDocumentHeadersAndFootersToAppendingDocuments'] = applyBaseDocumentHeadersAndFootersToAppendingDocuments;
}
Expand Down
Loading

0 comments on commit 0263c1c

Please sign in to comment.