Skip to content

Commit 570eb58

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents 6eca38b + 32c3bf2 commit 570eb58

File tree

14 files changed

+919
-7
lines changed

14 files changed

+919
-7
lines changed

AsposeWordsCloud.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AsposeWordsCloud'
3-
s.version = '24.10'
3+
s.version = '24.11'
44
s.summary = 'Aspose Words for Cloud.'
55
s.homepage = 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git'
66
s.license = { :type => 'MIT', :file => 'LICENSE' }

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ This repository contains Aspose.Words Cloud SDK for Swift source code. This SDK
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 24.11
17+
18+
- Added GetAllRevisions method to obtain all available revisions in document.
19+
- Added AppendAllEntriesToOneSection parameter to AppendDocument method to append entries to the same section.
20+
21+
1622
## Enhancements in Version 24.9
1723

1824
- Added digital signature methds for DOC, DOCX, XPS, or ODT documents.
@@ -361,7 +367,7 @@ Add link to this repository as dependency to your Package.swift:
361367

362368
dependencies: [
363369
// Dependencies declare other packages that this package depends on.
364-
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "24.10"),
370+
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "24.11"),
365371
],
366372
targets: [
367373
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
@@ -379,7 +385,7 @@ targets: [
379385
Add link to git repository as dependency to your Podfile:
380386

381387
```ruby
382-
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '24.10'
388+
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '24.11'
383389
```
384390

385391
## Getting Started

Sources/AsposeWordsCloud/Api/Configuration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,6 @@ public class Configuration : Codable {
187187

188188
// Returns SDK version for using in statistics headers
189189
public func getSdkVersion() -> String {
190-
return "24.10";
190+
return "24.11";
191191
}
192192
}

Sources/AsposeWordsCloud/Api/ObjectSerializer.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,10 @@ class ObjectSerializer {
231231
"ReplaceTextResponse, _": ReplaceTextResponse.self,
232232
"ReportBuildOptions, _": nil,
233233
"ReportEngineSettings, _": ReportEngineSettings.self,
234+
"Revision, _": Revision.self,
235+
"RevisionCollection, _": RevisionCollection.self,
234236
"RevisionsModificationResponse, _": RevisionsModificationResponse.self,
237+
"RevisionsResponse, _": RevisionsResponse.self,
235238
"RtfSaveOptionsData, _": RtfSaveOptionsData.self,
236239
"Run, _": Run.self,
237240
"RunInsert, _": RunInsert.self,

Sources/AsposeWordsCloud/Api/WordsAPI.swift

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4551,6 +4551,114 @@ public class WordsAPI : Encryptor {
45514551
return responseObject!;
45524552
}
45534553

4554+
// Async representation of getAllRevisions method
4555+
// Get all information about revisions.
4556+
public func getAllRevisions(request : GetAllRevisionsRequest, callback : @escaping (_ response : RevisionsResponse?, _ error : Error?) -> ()) {
4557+
do {
4558+
if (self.apiInvoker == nil) {
4559+
#if os(Linux)
4560+
self.apiInvoker = ApiInvoker(configuration: configuration);
4561+
#else
4562+
self.apiInvoker = ApiInvoker(configuration: configuration, encryptor: self);
4563+
#endif
4564+
}
4565+
4566+
apiInvoker!.invoke(
4567+
apiRequestData: try request.createApiRequestData(apiInvoker: self.apiInvoker!, configuration: self.configuration),
4568+
callback: { response, headers, error in
4569+
if (error != nil) {
4570+
callback(nil, error);
4571+
}
4572+
else {
4573+
do {
4574+
callback(try request.deserializeResponse(data: response!, headers: headers) as? RevisionsResponse, nil);
4575+
}
4576+
catch let deserializeError {
4577+
callback(nil, deserializeError);
4578+
}
4579+
}
4580+
}
4581+
);
4582+
}
4583+
catch let error {
4584+
callback(nil, error);
4585+
}
4586+
}
4587+
4588+
// Sync representation of getAllRevisions method
4589+
// Get all information about revisions.
4590+
public func getAllRevisions(request : GetAllRevisionsRequest) throws -> RevisionsResponse {
4591+
let semaphore = DispatchSemaphore(value: 0);
4592+
var responseObject : RevisionsResponse? = nil;
4593+
var responseError : Error? = nil;
4594+
self.getAllRevisions(request : request, callback: { response, error in
4595+
responseObject = response;
4596+
responseError = error;
4597+
semaphore.signal();
4598+
});
4599+
4600+
semaphore.wait();
4601+
4602+
if (responseError != nil) {
4603+
throw responseError!;
4604+
}
4605+
return responseObject!;
4606+
}
4607+
4608+
// Async representation of getAllRevisionsOnline method
4609+
// Get all information about revisions.
4610+
public func getAllRevisionsOnline(request : GetAllRevisionsOnlineRequest, callback : @escaping (_ response : RevisionsResponse?, _ error : Error?) -> ()) {
4611+
do {
4612+
if (self.apiInvoker == nil) {
4613+
#if os(Linux)
4614+
self.apiInvoker = ApiInvoker(configuration: configuration);
4615+
#else
4616+
self.apiInvoker = ApiInvoker(configuration: configuration, encryptor: self);
4617+
#endif
4618+
}
4619+
4620+
apiInvoker!.invoke(
4621+
apiRequestData: try request.createApiRequestData(apiInvoker: self.apiInvoker!, configuration: self.configuration),
4622+
callback: { response, headers, error in
4623+
if (error != nil) {
4624+
callback(nil, error);
4625+
}
4626+
else {
4627+
do {
4628+
callback(try request.deserializeResponse(data: response!, headers: headers) as? RevisionsResponse, nil);
4629+
}
4630+
catch let deserializeError {
4631+
callback(nil, deserializeError);
4632+
}
4633+
}
4634+
}
4635+
);
4636+
}
4637+
catch let error {
4638+
callback(nil, error);
4639+
}
4640+
}
4641+
4642+
// Sync representation of getAllRevisionsOnline method
4643+
// Get all information about revisions.
4644+
public func getAllRevisionsOnline(request : GetAllRevisionsOnlineRequest) throws -> RevisionsResponse {
4645+
let semaphore = DispatchSemaphore(value: 0);
4646+
var responseObject : RevisionsResponse? = nil;
4647+
var responseError : Error? = nil;
4648+
self.getAllRevisionsOnline(request : request, callback: { response, error in
4649+
responseObject = response;
4650+
responseError = error;
4651+
semaphore.signal();
4652+
});
4653+
4654+
semaphore.wait();
4655+
4656+
if (responseError != nil) {
4657+
throw responseError!;
4658+
}
4659+
return responseObject!;
4660+
}
4661+
45544662
// Async representation of getAvailableFonts method
45554663
// Reads available fonts from the document.
45564664
public func getAvailableFonts(request : GetAvailableFontsRequest, callback : @escaping (_ response : AvailableFontsResponse?, _ error : Error?) -> ()) {

Sources/AsposeWordsCloud/Model/DocumentEntryList.swift

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ import Foundation
2929

3030
// Represents a list of documents which will be appended to the original resource document.
3131
public class DocumentEntryList : BaseEntryList {
32+
// Field of appendAllEntriesToOneSection. Represents a list of documents which will be appended to the original resource document.
33+
private var _appendAllEntriesToOneSection : Bool? = nil;
34+
35+
public var appendAllEntriesToOneSection : Bool? {
36+
get {
37+
return self._appendAllEntriesToOneSection;
38+
}
39+
set {
40+
self._appendAllEntriesToOneSection = newValue;
41+
}
42+
}
43+
3244
// Field of applyBaseDocumentHeadersAndFootersToAppendingDocuments. Represents a list of documents which will be appended to the original resource document.
3345
private var _applyBaseDocumentHeadersAndFootersToAppendingDocuments : Bool? = nil;
3446

@@ -54,6 +66,7 @@ public class DocumentEntryList : BaseEntryList {
5466
}
5567

5668
private enum CodingKeys: String, CodingKey {
69+
case appendAllEntriesToOneSection = "AppendAllEntriesToOneSection";
5770
case applyBaseDocumentHeadersAndFootersToAppendingDocuments = "ApplyBaseDocumentHeadersAndFootersToAppendingDocuments";
5871
case documentEntries = "DocumentEntries";
5972
case invalidCodingKey;
@@ -65,6 +78,7 @@ public class DocumentEntryList : BaseEntryList {
6578

6679
public required init(from json: [String: Any]) throws {
6780
try super.init(from: json);
81+
self.appendAllEntriesToOneSection = json["AppendAllEntriesToOneSection"] as? Bool;
6882
self.applyBaseDocumentHeadersAndFootersToAppendingDocuments = json["ApplyBaseDocumentHeadersAndFootersToAppendingDocuments"] as? Bool;
6983
if let raw_documentEntries = json["DocumentEntries"] as? [Any] {
7084
self.documentEntries = try raw_documentEntries.map {
@@ -82,13 +96,17 @@ public class DocumentEntryList : BaseEntryList {
8296
public required init(from decoder: Decoder) throws {
8397
try super.init(from: decoder);
8498
let container = try decoder.container(keyedBy: CodingKeys.self);
99+
self.appendAllEntriesToOneSection = try container.decodeIfPresent(Bool.self, forKey: .appendAllEntriesToOneSection);
85100
self.applyBaseDocumentHeadersAndFootersToAppendingDocuments = try container.decodeIfPresent(Bool.self, forKey: .applyBaseDocumentHeadersAndFootersToAppendingDocuments);
86101
self.documentEntries = try container.decodeIfPresent([DocumentEntry].self, forKey: .documentEntries);
87102
}
88103

89104
public override func encode(to encoder: Encoder) throws {
90105
try super.encode(to: encoder);
91106
var container = encoder.container(keyedBy: CodingKeys.self);
107+
if (self.appendAllEntriesToOneSection != nil) {
108+
try container.encode(self.appendAllEntriesToOneSection, forKey: .appendAllEntriesToOneSection);
109+
}
92110
if (self.applyBaseDocumentHeadersAndFootersToAppendingDocuments != nil) {
93111
try container.encode(self.applyBaseDocumentHeadersAndFootersToAppendingDocuments, forKey: .applyBaseDocumentHeadersAndFootersToAppendingDocuments);
94112
}
@@ -122,6 +140,18 @@ public class DocumentEntryList : BaseEntryList {
122140

123141
}
124142

143+
// Sets appendAllEntriesToOneSection. Gets or sets a value indicating whether to append all documents to the same section.
144+
public func setAppendAllEntriesToOneSection(appendAllEntriesToOneSection : Bool?) -> DocumentEntryList {
145+
self.appendAllEntriesToOneSection = appendAllEntriesToOneSection;
146+
return self;
147+
}
148+
149+
// Gets appendAllEntriesToOneSection. Gets or sets a value indicating whether to append all documents to the same section.
150+
public func getAppendAllEntriesToOneSection() -> Bool? {
151+
return self.appendAllEntriesToOneSection;
152+
}
153+
154+
125155
// Sets applyBaseDocumentHeadersAndFootersToAppendingDocuments. Gets or sets a value indicating whether to apply headers and footers from base document to appending documents. The default value is true.
126156
public func setApplyBaseDocumentHeadersAndFootersToAppendingDocuments(applyBaseDocumentHeadersAndFootersToAppendingDocuments : Bool?) -> DocumentEntryList {
127157
self.applyBaseDocumentHeadersAndFootersToAppendingDocuments = applyBaseDocumentHeadersAndFootersToAppendingDocuments;

0 commit comments

Comments
 (0)