Skip to content

Commit 622b39e

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents 3d472f0 + 0008224 commit 622b39e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+4713
-2048
lines changed

JenkinsfileRelease

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,22 @@ node('words-linux') {
121121
}
122122
}
123123

124+
gitlabCommitStatus("Merge master to release") {
125+
stage('Merge master to release'){
126+
checkout([$class: 'GitSCM', branches: [[name: '*/release']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: "**"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '361885ba-9425-4230-950e-0af201d90547', url: 'https://git.auckland.dynabic.com/words-cloud/words-cloud-node.git']]])
127+
sh "git config user.email '[email protected]'"
128+
sh "git config user.name 'jenkins'"
129+
sh "git checkout --merge release"
130+
sh "git reset --hard origin/release"
131+
sh "git merge --no-ff --allow-unrelated-histories origin/master"
132+
sh "git diff --name-status"
133+
sh 'git commit -am "Merged master branch to release" || exit 0'
134+
withCredentials([usernamePassword(credentialsId: '361885ba-9425-4230-950e-0af201d90547', passwordVariable: 'gitPass', usernameVariable: 'gitUsername')]) {
135+
sh "git push https://$gitUsername:[email protected]/words-cloud/words-cloud-node.git release"
136+
}
137+
}
138+
}
139+
124140
gitlabCommitStatus("add version tag") {
125141
stage('add version tag') {
126142
final fullVersion = packageName.substring(packageName.lastIndexOf('@') + 1, packageName.length())

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
1616
- Add & remove watermarks and protection.
1717
- Read & write access to Document Object Model.
1818

19+
## Enhancements in Version 21.8
20+
21+
- Added new api methods to get, insert, update or delete custom xml parts from documents.
22+
- Added parameter 'ResultDocumentFormat' to Compare API
23+
- Added 'ExportLanguageToSpanTag' pdf save option
24+
- Added 'FlatOpcXmlMappingOnly' save option
25+
26+
1927
## Enhancements in Version 21.7
2028

2129
- ImlRenderingMode option introduced witch is used to determine how ink (InkML) objects are rendered
Binary file not shown.

examples/AcceptAllRevisions.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,27 @@ import * as fs from "fs";
33
const clientId = "####-####-####-####-####";
44
const secret = "##################";
55
const wordsApi = new WordsApi(clientId, secret);
6-
const documentsDir = "./";
76
const fileName = "test_doc.docx";
87

98
// Upload original document to cloud storage.
9+
let myVar1 = fs.createReadStream(fileName);
10+
let myVar2 = fileName;
1011
const uploadFileRequest = new model.UploadFileRequest({
11-
fileContent: fs.createReadStream(documentsDir + fileName),
12-
path: fileName
12+
fileContent: myVar1,
13+
path: myVar2
1314
});
1415

15-
return wordsApi.uploadFile(uploadFileRequest)
16+
wordsApi.uploadFile(uploadFileRequest)
1617
.then((uploadFileRequestResult) => {
1718
// tslint:disable-next-line:no-console
1819
console.log("Result of UploadFileRequest: ", uploadFileRequestResult);
1920
// Calls AcceptAllRevisions method for document in cloud.
21+
let myVar3 = fileName;
2022
const request = new model.AcceptAllRevisionsRequest({
21-
name: fileName
23+
name: myVar3
2224
});
2325

24-
return wordsApi.acceptAllRevisions(request)
26+
wordsApi.acceptAllRevisions(request)
2527
.then((requestResult) => {
2628
// tslint:disable-next-line:no-console
2729
console.log("Result of Request: ", requestResult);

examples/AcceptAllRevisionsOnline.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
const clientId = "####-####-####-####-####";
22
const secret = "##################";
33
const wordsApi = new WordsApi(clientId, secret);
4-
const documentsDir = "./";
54
const fileName = "test_doc.docx";
65

76
// Calls AcceptAllRevisionsOnline method for document in cloud.
7+
let requestDocument = fs.createReadStream(fileName);
88
const request = new model.AcceptAllRevisionsOnlineRequest({
9-
document: fs.createReadStream(documentsDir + fileName)
9+
document: requestDocument
1010
});
1111

12-
return wordsApi.acceptAllRevisionsOnline(request)
12+
wordsApi.acceptAllRevisionsOnline(request)
1313
.then((requestResult) => {
1414
// tslint:disable-next-line:no-console
1515
console.log("Result of Request: ", requestResult);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "asposewordscloud",
3-
"version": "21.7.0",
3+
"version": "21.8.0",
44
"description": "Aspose.Words Cloud SDK for Node.js",
55
"homepage": "https://products.aspose.cloud/words/cloud",
66
"author": {

src/api.ts

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,72 @@ export class WordsApi {
619619
return Promise.resolve(result);
620620
}
621621

622+
/**
623+
* Removes the custom xml part from the document.
624+
* @param requestObj contains request parameters
625+
*/
626+
public async deleteCustomXmlPart(requestObj: model.DeleteCustomXmlPartRequest): Promise< http.IncomingMessage > {
627+
if (requestObj === null || requestObj === undefined) {
628+
throw new Error('Required parameter "request" was null or undefined when calling deleteCustomXmlPart.');
629+
}
630+
631+
const requestOptions = requestObj.createRequestOptions(this.configuration);
632+
633+
const response = await invokeApiMethod(requestOptions, this.configuration);
634+
return Promise.resolve(response);
635+
}
636+
637+
/**
638+
* Removes the custom xml part from the document.
639+
* @param requestObj contains request parameters
640+
*/
641+
public async deleteCustomXmlPartOnline(requestObj: model.DeleteCustomXmlPartOnlineRequest): Promise< model.WordsIncomingMessage< Buffer > > {
642+
if (requestObj === null || requestObj === undefined) {
643+
throw new Error('Required parameter "request" was null or undefined when calling deleteCustomXmlPartOnline.');
644+
}
645+
646+
const requestOptions = requestObj.createRequestOptions(this.configuration);
647+
648+
const response = await invokeApiMethod(requestOptions, this.configuration);
649+
const result = new model.WordsIncomingMessage< Buffer >();
650+
result.response = response;
651+
result.body = requestObj.createResponse(response.body);
652+
return Promise.resolve(result);
653+
}
654+
655+
/**
656+
* Removes all custom xml parts from the document.
657+
* @param requestObj contains request parameters
658+
*/
659+
public async deleteCustomXmlParts(requestObj: model.DeleteCustomXmlPartsRequest): Promise< http.IncomingMessage > {
660+
if (requestObj === null || requestObj === undefined) {
661+
throw new Error('Required parameter "request" was null or undefined when calling deleteCustomXmlParts.');
662+
}
663+
664+
const requestOptions = requestObj.createRequestOptions(this.configuration);
665+
666+
const response = await invokeApiMethod(requestOptions, this.configuration);
667+
return Promise.resolve(response);
668+
}
669+
670+
/**
671+
* Removes all custom xml parts from the document.
672+
* @param requestObj contains request parameters
673+
*/
674+
public async deleteCustomXmlPartsOnline(requestObj: model.DeleteCustomXmlPartsOnlineRequest): Promise< model.WordsIncomingMessage< Buffer > > {
675+
if (requestObj === null || requestObj === undefined) {
676+
throw new Error('Required parameter "request" was null or undefined when calling deleteCustomXmlPartsOnline.');
677+
}
678+
679+
const requestOptions = requestObj.createRequestOptions(this.configuration);
680+
681+
const response = await invokeApiMethod(requestOptions, this.configuration);
682+
const result = new model.WordsIncomingMessage< Buffer >();
683+
result.response = response;
684+
result.body = requestObj.createResponse(response.body);
685+
return Promise.resolve(result);
686+
}
687+
622688
/**
623689
* Removes a document property.
624690
* @param requestObj contains request parameters
@@ -1573,6 +1639,78 @@ export class WordsApi {
15731639
return Promise.resolve(result);
15741640
}
15751641

1642+
/**
1643+
* Reads the custom xml part from the document.
1644+
* @param requestObj contains request parameters
1645+
*/
1646+
public async getCustomXmlPart(requestObj: model.GetCustomXmlPartRequest): Promise< model.WordsIncomingMessage< model.CustomXmlPartResponse > > {
1647+
if (requestObj === null || requestObj === undefined) {
1648+
throw new Error('Required parameter "request" was null or undefined when calling getCustomXmlPart.');
1649+
}
1650+
1651+
const requestOptions = requestObj.createRequestOptions(this.configuration);
1652+
1653+
const response = await invokeApiMethod(requestOptions, this.configuration);
1654+
const result = new model.WordsIncomingMessage< model.CustomXmlPartResponse >();
1655+
result.response = response;
1656+
result.body = requestObj.createResponse(response.body);
1657+
return Promise.resolve(result);
1658+
}
1659+
1660+
/**
1661+
* Reads the custom xml part from the document.
1662+
* @param requestObj contains request parameters
1663+
*/
1664+
public async getCustomXmlPartOnline(requestObj: model.GetCustomXmlPartOnlineRequest): Promise< model.WordsIncomingMessage< model.CustomXmlPartResponse > > {
1665+
if (requestObj === null || requestObj === undefined) {
1666+
throw new Error('Required parameter "request" was null or undefined when calling getCustomXmlPartOnline.');
1667+
}
1668+
1669+
const requestOptions = requestObj.createRequestOptions(this.configuration);
1670+
1671+
const response = await invokeApiMethod(requestOptions, this.configuration);
1672+
const result = new model.WordsIncomingMessage< model.CustomXmlPartResponse >();
1673+
result.response = response;
1674+
result.body = requestObj.createResponse(response.body);
1675+
return Promise.resolve(result);
1676+
}
1677+
1678+
/**
1679+
* Reads custom xml parts from the document.
1680+
* @param requestObj contains request parameters
1681+
*/
1682+
public async getCustomXmlParts(requestObj: model.GetCustomXmlPartsRequest): Promise< model.WordsIncomingMessage< model.CustomXmlPartsResponse > > {
1683+
if (requestObj === null || requestObj === undefined) {
1684+
throw new Error('Required parameter "request" was null or undefined when calling getCustomXmlParts.');
1685+
}
1686+
1687+
const requestOptions = requestObj.createRequestOptions(this.configuration);
1688+
1689+
const response = await invokeApiMethod(requestOptions, this.configuration);
1690+
const result = new model.WordsIncomingMessage< model.CustomXmlPartsResponse >();
1691+
result.response = response;
1692+
result.body = requestObj.createResponse(response.body);
1693+
return Promise.resolve(result);
1694+
}
1695+
1696+
/**
1697+
* Reads custom xml parts from the document.
1698+
* @param requestObj contains request parameters
1699+
*/
1700+
public async getCustomXmlPartsOnline(requestObj: model.GetCustomXmlPartsOnlineRequest): Promise< model.WordsIncomingMessage< model.CustomXmlPartsResponse > > {
1701+
if (requestObj === null || requestObj === undefined) {
1702+
throw new Error('Required parameter "request" was null or undefined when calling getCustomXmlPartsOnline.');
1703+
}
1704+
1705+
const requestOptions = requestObj.createRequestOptions(this.configuration);
1706+
1707+
const response = await invokeApiMethod(requestOptions, this.configuration);
1708+
const result = new model.WordsIncomingMessage< model.CustomXmlPartsResponse >();
1709+
result.response = response;
1710+
result.body = requestObj.createResponse(response.body);
1711+
return Promise.resolve(result);
1712+
}
1713+
15761714
/**
15771715
* Reads common information from the document.
15781716
* @param requestObj contains request parameters
@@ -3337,6 +3475,42 @@ export class WordsApi {
33373475
return Promise.resolve(result);
33383476
}
33393477

3478+
/**
3479+
* Inserts a new custom xml part to the document.
3480+
* @param requestObj contains request parameters
3481+
*/
3482+
public async insertCustomXmlPart(requestObj: model.InsertCustomXmlPartRequest): Promise< model.WordsIncomingMessage< model.CustomXmlPartResponse > > {
3483+
if (requestObj === null || requestObj === undefined) {
3484+
throw new Error('Required parameter "request" was null or undefined when calling insertCustomXmlPart.');
3485+
}
3486+
3487+
const requestOptions = requestObj.createRequestOptions(this.configuration);
3488+
3489+
const response = await invokeApiMethod(requestOptions, this.configuration);
3490+
const result = new model.WordsIncomingMessage< model.CustomXmlPartResponse >();
3491+
result.response = response;
3492+
result.body = requestObj.createResponse(response.body);
3493+
return Promise.resolve(result);
3494+
}
3495+
3496+
/**
3497+
* Inserts a new custom xml part to the document.
3498+
* @param requestObj contains request parameters
3499+
*/
3500+
public async insertCustomXmlPartOnline(requestObj: model.InsertCustomXmlPartOnlineRequest): Promise< model.WordsIncomingMessage< model.InsertCustomXmlPartOnlineResponse > > {
3501+
if (requestObj === null || requestObj === undefined) {
3502+
throw new Error('Required parameter "request" was null or undefined when calling insertCustomXmlPartOnline.');
3503+
}
3504+
3505+
const requestOptions = requestObj.createRequestOptions(this.configuration);
3506+
3507+
const response = await invokeApiMethod(requestOptions, this.configuration);
3508+
const result = new model.WordsIncomingMessage< model.InsertCustomXmlPartOnlineResponse >();
3509+
result.response = response;
3510+
result.body = requestObj.createResponse(response.body, getBoundary(response.headers));
3511+
return Promise.resolve(result);
3512+
}
3513+
33403514
/**
33413515
* Inserts a new DrawingObject to the document node.
33423516
* @param requestObj contains request parameters
@@ -4693,6 +4867,42 @@ export class WordsApi {
46934867
return Promise.resolve(result);
46944868
}
46954869

4870+
/**
4871+
* Updates the custom xml part in the document.
4872+
* @param requestObj contains request parameters
4873+
*/
4874+
public async updateCustomXmlPart(requestObj: model.UpdateCustomXmlPartRequest): Promise< model.WordsIncomingMessage< model.CustomXmlPartResponse > > {
4875+
if (requestObj === null || requestObj === undefined) {
4876+
throw new Error('Required parameter "request" was null or undefined when calling updateCustomXmlPart.');
4877+
}
4878+
4879+
const requestOptions = requestObj.createRequestOptions(this.configuration);
4880+
4881+
const response = await invokeApiMethod(requestOptions, this.configuration);
4882+
const result = new model.WordsIncomingMessage< model.CustomXmlPartResponse >();
4883+
result.response = response;
4884+
result.body = requestObj.createResponse(response.body);
4885+
return Promise.resolve(result);
4886+
}
4887+
4888+
/**
4889+
* Updates the custom xml part in the document.
4890+
* @param requestObj contains request parameters
4891+
*/
4892+
public async updateCustomXmlPartOnline(requestObj: model.UpdateCustomXmlPartOnlineRequest): Promise< model.WordsIncomingMessage< model.UpdateCustomXmlPartOnlineResponse > > {
4893+
if (requestObj === null || requestObj === undefined) {
4894+
throw new Error('Required parameter "request" was null or undefined when calling updateCustomXmlPartOnline.');
4895+
}
4896+
4897+
const requestOptions = requestObj.createRequestOptions(this.configuration);
4898+
4899+
const response = await invokeApiMethod(requestOptions, this.configuration);
4900+
const result = new model.WordsIncomingMessage< model.UpdateCustomXmlPartOnlineResponse >();
4901+
result.response = response;
4902+
result.body = requestObj.createResponse(response.body, getBoundary(response.headers));
4903+
return Promise.resolve(result);
4904+
}
4905+
46964906
/**
46974907
* Updates a DrawingObject in the document node.
46984908
* @param requestObj contains request parameters

src/internal/requestHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ async function invokeApiMethodInternal(requestOptions: request.OptionsWithUri, c
121121
}
122122

123123
requestOptions.headers["x-aspose-client"] = "nodejs sdk";
124-
requestOptions.headers["x-aspose-client-version"] = "21.7";
124+
requestOptions.headers["x-aspose-client-version"] = "21.8";
125125

126126
requestOptions.uri = encodeURI(requestOptions.uri.toString());
127127

src/model/compareData.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ export class CompareData {
5959
name: "dateTime",
6060
baseName: "DateTime",
6161
type: "Date",
62+
},
63+
{
64+
name: "resultDocumentFormat",
65+
baseName: "ResultDocumentFormat",
66+
type: "string",
6267
}
6368
];
6469

@@ -89,6 +94,11 @@ export class CompareData {
8994
*/
9095
public dateTime: Date;
9196

97+
/**
98+
* Gets or sets the result document format.
99+
*/
100+
public resultDocumentFormat: string;
101+
92102
public constructor(init?: Partial< CompareData >) {
93103
Object.assign(this, init);
94104
}

0 commit comments

Comments
 (0)