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 Nov 20, 2024
2 parents 4ed203a + e705847 commit c233164
Show file tree
Hide file tree
Showing 17 changed files with 616 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [24.11.0] - Aspose Words Cloud for Dart 24.11 Release Notes

- Added GetAllRevisions method to obtain all available revisions in document.
- Added AppendAllEntriesToOneSection parameter to AppendDocument method to append entries to the same section.


## [24.9.0] - Aspose Words Cloud for Dart 24.9 Release Notes

- Added digital signature methds for DOC, DOCX, XPS, or ODT documents.
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: 24.10.0
aspose_words_cloud: 24.11.0
```
## Getting Started
Expand Down
5 changes: 5 additions & 0 deletions lib/aspose_words_cloud.dart
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ export 'src/models/replace_text_parameters.dart';
export 'src/models/replace_text_response.dart';
export 'src/models/report_build_options.dart';
export 'src/models/report_engine_settings.dart';
export 'src/models/revision_collection.dart';
export 'src/models/revision.dart';
export 'src/models/revisions_modification_response.dart';
export 'src/models/revisions_response.dart';
export 'src/models/rtf_save_options_data.dart';
export 'src/models/run_base.dart';
export 'src/models/run_insert.dart';
Expand Down Expand Up @@ -407,6 +410,8 @@ export 'src/requests/delete_watermark_request.dart';
export 'src/requests/download_file_request.dart';
export 'src/requests/execute_mail_merge_online_request.dart';
export 'src/requests/execute_mail_merge_request.dart';
export 'src/requests/get_all_revisions_online_request.dart';
export 'src/requests/get_all_revisions_request.dart';
export 'src/requests/get_available_fonts_request.dart';
export 'src/requests/get_bookmark_by_name_online_request.dart';
export 'src/requests/get_bookmark_by_name_request.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 @@ -518,7 +518,7 @@ class ApiClient {
}

httpRequest.headers['x-aspose-client'] = 'dart sdk';
httpRequest.headers['x-aspose-client-version'] = '24.10';
httpRequest.headers['x-aspose-client-version'] = '24.11';
httpRequest.headers['Authorization'] = await _getAuthToken();
httpRequest.headers.addAll(requestData.headers);

Expand Down
17 changes: 17 additions & 0 deletions lib/src/models/document_entry_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ import '../../aspose_words_cloud.dart';

/// Represents a list of documents which will be appended to the original resource document.
class DocumentEntryList extends BaseEntryList {
/// Gets or sets a value indicating whether to append all documents to the same section.
bool? _appendAllEntriesToOneSection;

bool? get appendAllEntriesToOneSection => _appendAllEntriesToOneSection;
set appendAllEntriesToOneSection(bool? val) => _appendAllEntriesToOneSection = val;


/// 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 @@ -52,6 +59,12 @@ class DocumentEntryList extends BaseEntryList {
}

super.deserialize(json);
if (json.containsKey('AppendAllEntriesToOneSection')) {
appendAllEntriesToOneSection = json['AppendAllEntriesToOneSection'] as bool;
} else {
appendAllEntriesToOneSection = null;
}

if (json.containsKey('ApplyBaseDocumentHeadersAndFootersToAppendingDocuments')) {
applyBaseDocumentHeadersAndFootersToAppendingDocuments = json['ApplyBaseDocumentHeadersAndFootersToAppendingDocuments'] as bool;
} else {
Expand All @@ -73,6 +86,10 @@ class DocumentEntryList extends BaseEntryList {
Map<String, dynamic> serialize() {
var _result = <String, dynamic>{};
_result.addAll(super.serialize());
if (appendAllEntriesToOneSection != null) {
_result['AppendAllEntriesToOneSection'] = appendAllEntriesToOneSection!;
}

if (applyBaseDocumentHeadersAndFootersToAppendingDocuments != null) {
_result['ApplyBaseDocumentHeadersAndFootersToAppendingDocuments'] = applyBaseDocumentHeadersAndFootersToAppendingDocuments!;
}
Expand Down
3 changes: 3 additions & 0 deletions lib/src/models/model_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ abstract class ModelBase {
'ReplaceTextResponse, _': () => ReplaceTextResponse(),
'ReportBuildOptions, _': () => throw ApiException(400, 'Invalid type of class.'),
'ReportEngineSettings, _': () => ReportEngineSettings(),
'Revision, _': () => Revision(),
'RevisionCollection, _': () => RevisionCollection(),
'RevisionsModificationResponse, _': () => RevisionsModificationResponse(),
'RevisionsResponse, _': () => RevisionsResponse(),
'RtfSaveOptionsData, _': () => RtfSaveOptionsData(),
'Run, _': () => Run(),
'RunInsert, _': () => RunInsert(),
Expand Down
127 changes: 127 additions & 0 deletions lib/src/models/revision.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
/*
* --------------------------------------------------------------------------------
* <copyright company="Aspose" file="revision.dart">
* Copyright (c) 2024 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';

/// Revision Dto.
class Revision implements ModelBase {
/// Gets or sets the revision author.
String? _revisionAuthor;

String? get revisionAuthor => _revisionAuthor;
set revisionAuthor(String? val) => _revisionAuthor = val;


/// Gets or sets the revision date time.
DateTime? _revisionDateTime;

DateTime? get revisionDateTime => _revisionDateTime;
set revisionDateTime(DateTime? val) => _revisionDateTime = val;


/// Gets or sets the revision text.
String? _revisionText;

String? get revisionText => _revisionText;
set revisionText(String? val) => _revisionText = val;


/// Gets or sets the revision type.
String? _revisionType;

String? get revisionType => _revisionType;
set revisionType(String? val) => _revisionType = val;


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

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

if (json.containsKey('RevisionDateTime')) {
revisionDateTime = DateTime.parse(json['RevisionDateTime'] as String);
} else {
revisionDateTime = null;
}

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

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

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

if (revisionDateTime != null) {
_result['RevisionDateTime'] = revisionDateTime!.toIso8601String();
}

if (revisionText != null) {
_result['RevisionText'] = revisionText!;
}

if (revisionType != null) {
_result['RevisionType'] = revisionType!;
}
return _result;
}

@override
void getFilesContent(List<FileReference> resultFilesContent) {
}

@override
void validate() {
if (revisionDateTime == null)
{
throw new ApiException(400, 'Property RevisionDateTime in Revision is required.');
}
}
}


82 changes: 82 additions & 0 deletions lib/src/models/revision_collection.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* --------------------------------------------------------------------------------
* <copyright company="Aspose" file="revision_collection.dart">
* Copyright (c) 2024 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';

/// RevisionCollection DTO.
class RevisionCollection implements ModelBase {
/// Gets or sets the revisions.
List<Revision?>? _revisions;

List<Revision?>? get revisions => _revisions;
set revisions(List<Revision?>? val) => _revisions = val;


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

if (json.containsKey('Revisions')) {
// Array processing
revisions = <Revision>[];
for(final _element in json['Revisions']) {
revisions!.add(ModelBase.createInstance< Revision >(_element as Map<String, dynamic>));
}
} else {
revisions = null;
}
}

@override
Map<String, dynamic> serialize() {
var _result = <String, dynamic>{};
if (revisions != null) {
_result['Revisions'] = revisions!.map((_element) => _element?.serialize()).toList();
}
return _result;
}

@override
void getFilesContent(List<FileReference> resultFilesContent) {
}

@override
void validate() {

for (final elementRevisions in revisions ?? [])
{
elementRevisions?.validate();
}

}
}


84 changes: 84 additions & 0 deletions lib/src/models/revisions_response.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
* --------------------------------------------------------------------------------
* <copyright company="Aspose" file="revisions_response.dart">
* Copyright (c) 2024 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 revision response.
class RevisionsResponse extends WordsResponse {
/// Gets or sets Revisions.
RevisionCollection? _revisions;

RevisionCollection? get revisions => _revisions;
set revisions(RevisionCollection? val) => _revisions = val;


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

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

if (json.containsKey('Revisions')) {
revisions = ModelBase.createInstance< RevisionCollection >(json['Revisions'] as Map<String, dynamic>);
} else {
revisions = null;
}
}

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

@override
void getFilesContent(List<FileReference> resultFilesContent) {
}

@override
void validate() {
super.validate();

revisions?.validate();

}
}


Loading

0 comments on commit c233164

Please sign in to comment.