Skip to content

Commit 5f1de04

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents 6c6b0c0 + 81d1094 commit 5f1de04

31 files changed

+2181
-121
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 = '23.11'
3+
s.version = '23.12'
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: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ 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 23.12
17+
18+
- Properties Name, Text, StartRange, EndRange marked as required for InsertBookmark operation.
19+
- Implemented DeleteOfficeMathObjects operation to delete all office math objects from document.
20+
- Parameter ProtectionRequest was removed from the UnprotectDocument operation. Now removing protection from a document does not require a password.
21+
- 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.
22+
23+
1624
## Enhancements in Version 23.11
1725

1826
- Support of required properties in models.
@@ -301,7 +309,7 @@ Add link to this repository as dependency to your Package.swift:
301309

302310
dependencies: [
303311
// Dependencies declare other packages that this package depends on.
304-
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "23.11"),
312+
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "23.12"),
305313
],
306314
targets: [
307315
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
@@ -319,7 +327,7 @@ targets: [
319327
Add link to git repository as dependency to your Podfile:
320328

321329
```ruby
322-
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '23.11'
330+
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '23.12'
323331
```
324332

325333
## Getting Started

Sources/AsposeWordsCloud/Api/Configuration.swift

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

189189
// Returns SDK version for using in statistics headers
190190
public func getSdkVersion() -> String {
191-
return "23.11";
191+
return "23.12";
192192
}
193193
}

Sources/AsposeWordsCloud/Api/ObjectSerializer.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ class ObjectSerializer {
218218
"ProtectionData, _": ProtectionData.self,
219219
"ProtectionDataResponse, _": ProtectionDataResponse.self,
220220
"ProtectionRequest, _": ProtectionRequest.self,
221+
"ProtectionRequestV2, _": ProtectionRequestV2.self,
221222
"PsSaveOptionsData, _": PsSaveOptionsData.self,
222223
"PublicKeyResponse, _": PublicKeyResponse.self,
223224
"RangeDocument, _": RangeDocument.self,
@@ -293,6 +294,8 @@ class ObjectSerializer {
293294
"TiffSaveOptionsData, _": TiffSaveOptionsData.self,
294295
"TimeZoneInfoData, _": TimeZoneInfoData.self,
295296
"UserInformation, _": UserInformation.self,
297+
"WatermarkDataImage, _": WatermarkDataImage.self,
298+
"WatermarkDataText, _": WatermarkDataText.self,
296299
"WatermarkText, _": WatermarkText.self,
297300
"WordMLSaveOptionsData, _": WordMLSaveOptionsData.self,
298301
"WordsApiErrorResponse, _": WordsApiErrorResponse.self,

Sources/AsposeWordsCloud/Api/WordsAPI.swift

Lines changed: 211 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3307,6 +3307,101 @@ public class WordsAPI : Encryptor {
33073307
return responseObject!;
33083308
}
33093309

3310+
// Async representation of deleteOfficeMathObjects method
3311+
// Removes all office math objects from the document.
3312+
public func deleteOfficeMathObjects(request : DeleteOfficeMathObjectsRequest, callback : @escaping (_ error : Error?) -> ()) {
3313+
do {
3314+
if (self.apiInvoker == nil) {
3315+
#if os(Linux)
3316+
self.apiInvoker = ApiInvoker(configuration: configuration);
3317+
#else
3318+
self.apiInvoker = ApiInvoker(configuration: configuration, encryptor: self);
3319+
#endif
3320+
}
3321+
3322+
apiInvoker!.invoke(
3323+
apiRequestData: try request.createApiRequestData(apiInvoker: self.apiInvoker!, configuration: self.configuration),
3324+
callback: { response, headers, error in
3325+
callback(error);
3326+
}
3327+
);
3328+
}
3329+
catch let error {
3330+
callback(error);
3331+
}
3332+
}
3333+
3334+
// Sync representation of deleteOfficeMathObjects method
3335+
// Removes all office math objects from the document.
3336+
public func deleteOfficeMathObjects(request : DeleteOfficeMathObjectsRequest) throws {
3337+
let semaphore = DispatchSemaphore(value: 0);
3338+
var responseError : Error? = nil;
3339+
self.deleteOfficeMathObjects(request : request, callback: { error in
3340+
responseError = error;
3341+
semaphore.signal();
3342+
});
3343+
3344+
_ = semaphore.wait();
3345+
3346+
if (responseError != nil) {
3347+
throw responseError!;
3348+
}
3349+
}
3350+
3351+
// Async representation of deleteOfficeMathObjectsOnline method
3352+
// Removes all office math objects from the document.
3353+
public func deleteOfficeMathObjectsOnline(request : DeleteOfficeMathObjectsOnlineRequest, callback : @escaping (_ response : [String: Data]?, _ error : Error?) -> ()) {
3354+
do {
3355+
if (self.apiInvoker == nil) {
3356+
#if os(Linux)
3357+
self.apiInvoker = ApiInvoker(configuration: configuration);
3358+
#else
3359+
self.apiInvoker = ApiInvoker(configuration: configuration, encryptor: self);
3360+
#endif
3361+
}
3362+
3363+
apiInvoker!.invoke(
3364+
apiRequestData: try request.createApiRequestData(apiInvoker: self.apiInvoker!, configuration: self.configuration),
3365+
callback: { response, headers, error in
3366+
if (error != nil) {
3367+
callback(nil, error);
3368+
}
3369+
else {
3370+
do {
3371+
callback(try request.deserializeResponse(data: response!, headers: headers) as? [String: Data], nil);
3372+
}
3373+
catch let deserializeError {
3374+
callback(nil, deserializeError);
3375+
}
3376+
}
3377+
}
3378+
);
3379+
}
3380+
catch let error {
3381+
callback(nil, error);
3382+
}
3383+
}
3384+
3385+
// Sync representation of deleteOfficeMathObjectsOnline method
3386+
// Removes all office math objects from the document.
3387+
public func deleteOfficeMathObjectsOnline(request : DeleteOfficeMathObjectsOnlineRequest) throws -> [String: Data] {
3388+
let semaphore = DispatchSemaphore(value: 0);
3389+
var responseObject : [String: Data]? = nil;
3390+
var responseError : Error? = nil;
3391+
self.deleteOfficeMathObjectsOnline(request : request, callback: { response, error in
3392+
responseObject = response;
3393+
responseError = error;
3394+
semaphore.signal();
3395+
});
3396+
3397+
_ = semaphore.wait();
3398+
3399+
if (responseError != nil) {
3400+
throw responseError!;
3401+
}
3402+
return responseObject!;
3403+
}
3404+
33103405
// Async representation of deleteParagraph method
33113406
// Removes a paragraph from the document node.
33123407
public func deleteParagraph(request : DeleteParagraphRequest, callback : @escaping (_ error : Error?) -> ()) {
@@ -12873,8 +12968,63 @@ public class WordsAPI : Encryptor {
1287312968
return responseObject!;
1287412969
}
1287512970

12971+
// Async representation of insertWatermark method
12972+
// Insert a watermark to the document.
12973+
public func insertWatermark(request : InsertWatermarkRequest, callback : @escaping (_ response : DocumentResponse?, _ error : Error?) -> ()) {
12974+
do {
12975+
if (self.apiInvoker == nil) {
12976+
#if os(Linux)
12977+
self.apiInvoker = ApiInvoker(configuration: configuration);
12978+
#else
12979+
self.apiInvoker = ApiInvoker(configuration: configuration, encryptor: self);
12980+
#endif
12981+
}
12982+
12983+
apiInvoker!.invoke(
12984+
apiRequestData: try request.createApiRequestData(apiInvoker: self.apiInvoker!, configuration: self.configuration),
12985+
callback: { response, headers, error in
12986+
if (error != nil) {
12987+
callback(nil, error);
12988+
}
12989+
else {
12990+
do {
12991+
callback(try request.deserializeResponse(data: response!, headers: headers) as? DocumentResponse, nil);
12992+
}
12993+
catch let deserializeError {
12994+
callback(nil, deserializeError);
12995+
}
12996+
}
12997+
}
12998+
);
12999+
}
13000+
catch let error {
13001+
callback(nil, error);
13002+
}
13003+
}
13004+
13005+
// Sync representation of insertWatermark method
13006+
// Insert a watermark to the document.
13007+
public func insertWatermark(request : InsertWatermarkRequest) throws -> DocumentResponse {
13008+
let semaphore = DispatchSemaphore(value: 0);
13009+
var responseObject : DocumentResponse? = nil;
13010+
var responseError : Error? = nil;
13011+
self.insertWatermark(request : request, callback: { response, error in
13012+
responseObject = response;
13013+
responseError = error;
13014+
semaphore.signal();
13015+
});
13016+
13017+
_ = semaphore.wait();
13018+
13019+
if (responseError != nil) {
13020+
throw responseError!;
13021+
}
13022+
return responseObject!;
13023+
}
13024+
1287613025
// Async representation of insertWatermarkImage method
1287713026
// Inserts a new watermark image to the document.
13027+
@available(*, deprecated, message: "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.")
1287813028
public func insertWatermarkImage(request : InsertWatermarkImageRequest, callback : @escaping (_ response : DocumentResponse?, _ error : Error?) -> ()) {
1287913029
do {
1288013030
if (self.apiInvoker == nil) {
@@ -12929,6 +13079,7 @@ public class WordsAPI : Encryptor {
1292913079

1293013080
// Async representation of insertWatermarkImageOnline method
1293113081
// Inserts a new watermark image to the document.
13082+
@available(*, deprecated, message: "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.")
1293213083
public func insertWatermarkImageOnline(request : InsertWatermarkImageOnlineRequest, callback : @escaping (_ response : InsertWatermarkImageOnlineResponse?, _ error : Error?) -> ()) {
1293313084
do {
1293413085
if (self.apiInvoker == nil) {
@@ -12981,8 +13132,63 @@ public class WordsAPI : Encryptor {
1298113132
return responseObject!;
1298213133
}
1298313134

13135+
// Async representation of insertWatermarkOnline method
13136+
// Insert a watermark to the document.
13137+
public func insertWatermarkOnline(request : InsertWatermarkOnlineRequest, callback : @escaping (_ response : InsertWatermarkOnlineResponse?, _ error : Error?) -> ()) {
13138+
do {
13139+
if (self.apiInvoker == nil) {
13140+
#if os(Linux)
13141+
self.apiInvoker = ApiInvoker(configuration: configuration);
13142+
#else
13143+
self.apiInvoker = ApiInvoker(configuration: configuration, encryptor: self);
13144+
#endif
13145+
}
13146+
13147+
apiInvoker!.invoke(
13148+
apiRequestData: try request.createApiRequestData(apiInvoker: self.apiInvoker!, configuration: self.configuration),
13149+
callback: { response, headers, error in
13150+
if (error != nil) {
13151+
callback(nil, error);
13152+
}
13153+
else {
13154+
do {
13155+
callback(try request.deserializeResponse(data: response!, headers: headers) as? InsertWatermarkOnlineResponse, nil);
13156+
}
13157+
catch let deserializeError {
13158+
callback(nil, deserializeError);
13159+
}
13160+
}
13161+
}
13162+
);
13163+
}
13164+
catch let error {
13165+
callback(nil, error);
13166+
}
13167+
}
13168+
13169+
// Sync representation of insertWatermarkOnline method
13170+
// Insert a watermark to the document.
13171+
public func insertWatermarkOnline(request : InsertWatermarkOnlineRequest) throws -> InsertWatermarkOnlineResponse {
13172+
let semaphore = DispatchSemaphore(value: 0);
13173+
var responseObject : InsertWatermarkOnlineResponse? = nil;
13174+
var responseError : Error? = nil;
13175+
self.insertWatermarkOnline(request : request, callback: { response, error in
13176+
responseObject = response;
13177+
responseError = error;
13178+
semaphore.signal();
13179+
});
13180+
13181+
_ = semaphore.wait();
13182+
13183+
if (responseError != nil) {
13184+
throw responseError!;
13185+
}
13186+
return responseObject!;
13187+
}
13188+
1298413189
// Async representation of insertWatermarkText method
1298513190
// Inserts a new watermark text to the document.
13191+
@available(*, deprecated, message: "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.")
1298613192
public func insertWatermarkText(request : InsertWatermarkTextRequest, callback : @escaping (_ response : DocumentResponse?, _ error : Error?) -> ()) {
1298713193
do {
1298813194
if (self.apiInvoker == nil) {
@@ -13037,6 +13243,7 @@ public class WordsAPI : Encryptor {
1303713243

1303813244
// Async representation of insertWatermarkTextOnline method
1303913245
// Inserts a new watermark text to the document.
13246+
@available(*, deprecated, message: "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.")
1304013247
public func insertWatermarkTextOnline(request : InsertWatermarkTextOnlineRequest, callback : @escaping (_ response : InsertWatermarkTextOnlineResponse?, _ error : Error?) -> ()) {
1304113248
do {
1304213249
if (self.apiInvoker == nil) {
@@ -13362,7 +13569,7 @@ public class WordsAPI : Encryptor {
1336213569
}
1336313570

1336413571
// Async representation of protectDocument method
13365-
// Adds protection to the document.
13572+
// Changes the document protection. The previous protection will be overwritten if it exist.
1336613573
public func protectDocument(request : ProtectDocumentRequest, callback : @escaping (_ response : ProtectionDataResponse?, _ error : Error?) -> ()) {
1336713574
do {
1336813575
if (self.apiInvoker == nil) {
@@ -13396,7 +13603,7 @@ public class WordsAPI : Encryptor {
1339613603
}
1339713604

1339813605
// Sync representation of protectDocument method
13399-
// Adds protection to the document.
13606+
// Changes the document protection. The previous protection will be overwritten if it exist.
1340013607
public func protectDocument(request : ProtectDocumentRequest) throws -> ProtectionDataResponse {
1340113608
let semaphore = DispatchSemaphore(value: 0);
1340213609
var responseObject : ProtectionDataResponse? = nil;
@@ -13416,7 +13623,7 @@ public class WordsAPI : Encryptor {
1341613623
}
1341713624

1341813625
// Async representation of protectDocumentOnline method
13419-
// Adds protection to the document.
13626+
// Changes the document protection. The previous protection will be overwritten if it exist.
1342013627
public func protectDocumentOnline(request : ProtectDocumentOnlineRequest, callback : @escaping (_ response : ProtectDocumentOnlineResponse?, _ error : Error?) -> ()) {
1342113628
do {
1342213629
if (self.apiInvoker == nil) {
@@ -13450,7 +13657,7 @@ public class WordsAPI : Encryptor {
1345013657
}
1345113658

1345213659
// Sync representation of protectDocumentOnline method
13453-
// Adds protection to the document.
13660+
// Changes the document protection. The previous protection will be overwritten if it exist.
1345413661
public func protectDocumentOnline(request : ProtectDocumentOnlineRequest) throws -> ProtectDocumentOnlineResponse {
1345513662
let semaphore = DispatchSemaphore(value: 0);
1345613663
var responseObject : ProtectDocumentOnlineResponse? = nil;

0 commit comments

Comments
 (0)