Skip to content

Commit dfad1fe

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents d4e9742 + 2da39b5 commit dfad1fe

File tree

12 files changed

+609
-4
lines changed

12 files changed

+609
-4
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ 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 24.11
20+
21+
- Added GetAllRevisions method to obtain all available revisions in document.
22+
- Added AppendAllEntriesToOneSection parameter to AppendDocument method to append entries to the same section.
23+
24+
1925
## Enhancements in Version 24.9
2026

2127
- Added digital signature methds for DOC, DOCX, XPS, or ODT documents.
Binary file not shown.

package.json

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

src/api.ts

+36
Original file line numberDiff line numberDiff line change
@@ -1645,6 +1645,42 @@ export class WordsApi implements Encryptor {
16451645
return Promise.resolve(result);
16461646
}
16471647

1648+
/**
1649+
* Get all information about revisions.
1650+
* @param requestObj contains request parameters
1651+
*/
1652+
public async getAllRevisions(requestObj: model.GetAllRevisionsRequest): Promise< model.WordsIncomingMessage< model.RevisionsResponse > > {
1653+
if (requestObj === null || requestObj === undefined) {
1654+
throw new Error('Required parameter "request" was null or undefined when calling getAllRevisions.');
1655+
}
1656+
1657+
const requestOptions = await requestObj.createRequestOptions(this.configuration, this);
1658+
1659+
const response = await invokeApiMethod(requestOptions, this.configuration);
1660+
const result = new model.WordsIncomingMessage< model.RevisionsResponse >();
1661+
result.response = response;
1662+
result.body = requestObj.createResponse(response.body, response.headers);
1663+
return Promise.resolve(result);
1664+
}
1665+
1666+
/**
1667+
* Get all information about revisions.
1668+
* @param requestObj contains request parameters
1669+
*/
1670+
public async getAllRevisionsOnline(requestObj: model.GetAllRevisionsOnlineRequest): Promise< model.WordsIncomingMessage< model.RevisionsResponse > > {
1671+
if (requestObj === null || requestObj === undefined) {
1672+
throw new Error('Required parameter "request" was null or undefined when calling getAllRevisionsOnline.');
1673+
}
1674+
1675+
const requestOptions = await requestObj.createRequestOptions(this.configuration, this);
1676+
1677+
const response = await invokeApiMethod(requestOptions, this.configuration);
1678+
const result = new model.WordsIncomingMessage< model.RevisionsResponse >();
1679+
result.response = response;
1680+
result.body = requestObj.createResponse(response.body, response.headers);
1681+
return Promise.resolve(result);
1682+
}
1683+
16481684
/**
16491685
* Reads available fonts from the document.
16501686
* @param requestObj contains request parameters

src/internal/requestHelper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ async function invokeApiMethodInternal(requestOptions: request.OptionsWithUri, c
131131
requestOptions.timeout = 1000 * confguration.timeout;
132132

133133
requestOptions.headers["x-aspose-client"] = "nodejs sdk";
134-
requestOptions.headers["x-aspose-client-version"] = "24.10";
134+
requestOptions.headers["x-aspose-client-version"] = "24.11";
135135
requestOptions.encoding = null;
136136

137137
requestOptions.uri = encodeURI(requestOptions.uri.toString());

src/model/documentEntryList.ts

+10
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ export class DocumentEntryList extends BaseEntryList {
4343
* Attribute type map
4444
*/
4545
public static attributeTypeMap: Array<AttributeInfo> = [
46+
{
47+
name: "appendAllEntriesToOneSection",
48+
baseName: "AppendAllEntriesToOneSection",
49+
type: "boolean",
50+
},
4651
{
4752
name: "applyBaseDocumentHeadersAndFootersToAppendingDocuments",
4853
baseName: "ApplyBaseDocumentHeadersAndFootersToAppendingDocuments",
@@ -62,6 +67,11 @@ export class DocumentEntryList extends BaseEntryList {
6267
return super.getAttributeTypeMap().concat(DocumentEntryList.attributeTypeMap);
6368
}
6469

70+
/**
71+
* Gets or sets a value indicating whether to append all documents to the same section.
72+
*/
73+
public appendAllEntriesToOneSection: boolean;
74+
6575
/**
6676
* Gets or sets a value indicating whether to apply headers and footers from base document to appending documents. The default value is true.
6777
*/

src/model/model.ts

+235
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,10 @@ import * as importedReplaceTextParameters from './replaceTextParameters';
231231
import * as importedReplaceTextResponse from './replaceTextResponse';
232232
import * as importedReportBuildOptions from './reportBuildOptions';
233233
import * as importedReportEngineSettings from './reportEngineSettings';
234+
import * as importedRevision from './revision';
235+
import * as importedRevisionCollection from './revisionCollection';
234236
import * as importedRevisionsModificationResponse from './revisionsModificationResponse';
237+
import * as importedRevisionsResponse from './revisionsResponse';
235238
import * as importedRtfSaveOptionsData from './rtfSaveOptionsData';
236239
import * as importedRun from './run';
237240
import * as importedRunBase from './runBase';
@@ -519,7 +522,10 @@ export * from './replaceTextParameters';
519522
export * from './replaceTextResponse';
520523
export * from './reportBuildOptions';
521524
export * from './reportEngineSettings';
525+
export * from './revision';
526+
export * from './revisionCollection';
522527
export * from './revisionsModificationResponse';
528+
export * from './revisionsResponse';
523529
export * from './rtfSaveOptionsData';
524530
export * from './run';
525531
export * from './runBase';
@@ -930,7 +936,10 @@ const typeMap = {
930936
ReplaceTextResponse: importedReplaceTextResponse.ReplaceTextResponse,
931937
ReportBuildOptions: importedReportBuildOptions.ReportBuildOptions,
932938
ReportEngineSettings: importedReportEngineSettings.ReportEngineSettings,
939+
Revision: importedRevision.Revision,
940+
RevisionCollection: importedRevisionCollection.RevisionCollection,
933941
RevisionsModificationResponse: importedRevisionsModificationResponse.RevisionsModificationResponse,
942+
RevisionsResponse: importedRevisionsResponse.RevisionsResponse,
934943
RtfSaveOptionsData: importedRtfSaveOptionsData.RtfSaveOptionsData,
935944
Run: importedRun.Run,
936945
RunInsert: importedRunInsert.RunInsert,
@@ -13956,6 +13965,232 @@ export class ExecuteMailMergeOnlineRequest implements RequestInterface {
1395613965
}
1395713966
}
1395813967

13968+
/**
13969+
* Request model for GetAllRevisions operation.
13970+
* Get all information about revisions.
13971+
*/
13972+
export class GetAllRevisionsRequest implements RequestInterface {
13973+
13974+
public constructor(init?: Partial< GetAllRevisionsRequest >) {
13975+
Object.assign(this, init);
13976+
}
13977+
13978+
/**
13979+
* The filename of the input document.
13980+
*/
13981+
public name: string;
13982+
13983+
/**
13984+
* Original document folder.
13985+
*/
13986+
public folder: string;
13987+
13988+
/**
13989+
* Original document storage.
13990+
*/
13991+
public storage: string;
13992+
13993+
/**
13994+
* Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
13995+
*/
13996+
public loadEncoding: string;
13997+
13998+
/**
13999+
* Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
14000+
*/
14001+
public password: string;
14002+
14003+
/**
14004+
* Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
14005+
*/
14006+
public encryptedPassword: string;
14007+
14008+
/**
14009+
* The value indicates whether OpenType support is on.
14010+
*/
14011+
public openTypeSupport: boolean;
14012+
14013+
/**
14014+
* create the requst options for this request
14015+
* @param configuration a configuration for the request
14016+
* @param data encryptor
14017+
*/
14018+
public async createRequestOptions(configuration: Configuration, _encryptor: Encryptor) : Promise<request.OptionsWithUri> {
14019+
let localVarPath = configuration.getApiBaseUrl() + "/words/{name}/revisions/getAll"
14020+
.replace("/{" + "name" + "}", (this.name !== null && this.name !== undefined) ? "/" + String(this.name) : "")
14021+
.replace("//", "/");
14022+
var queryParameters: any = {};
14023+
var headerParams: any = {};
14024+
var formParams: any = [];
14025+
var filesContent: any = [];
14026+
// verify required parameter 'this.name' is not undefined
14027+
if (this.name === undefined) {
14028+
throw new Error('Required parameter "this.name" was undefined when calling getAllRevisions.');
14029+
}
14030+
14031+
// verify required parameter 'this.name' is not null
14032+
if (this.name === null) {
14033+
throw new Error('Required parameter "this.name" was null when calling getAllRevisions.');
14034+
}
14035+
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "folder", this.folder, _encryptor);
14036+
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "storage", this.storage, _encryptor);
14037+
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "loadEncoding", this.loadEncoding, _encryptor);
14038+
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "password", this.password, _encryptor);
14039+
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "encryptedPassword", this.encryptedPassword, _encryptor);
14040+
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "openTypeSupport", this.openTypeSupport, _encryptor);
14041+
14042+
for (let fileContent of filesContent) {
14043+
await fileContent.encryptPassword(_encryptor);
14044+
if (fileContent.getSource() == FileReference.SourceEnum.Request) {
14045+
formParams.push([fileContent.getReference(), fileContent.getContent(), 'application/octet-stream']);
14046+
}
14047+
}
14048+
14049+
const requestOptions: request.Options = {
14050+
method: "GET",
14051+
qs: queryParameters,
14052+
headers: headerParams,
14053+
uri: localVarPath,
14054+
};
14055+
14056+
if (formParams.length == 1) {
14057+
let formFirstParam = formParams[0];
14058+
requestOptions.body = formFirstParam[1];
14059+
requestOptions.headers["Content-Type"] = formFirstParam[2];
14060+
}
14061+
else if (formParams.length > 1) {
14062+
const requestParts = [];
14063+
for (let formParam of formParams) {
14064+
requestParts.push({
14065+
'Content-Type': formParam[2],
14066+
'Content-Disposition': 'form-data; name="' + formParam[0] + '"',
14067+
body: formParam[1],
14068+
});
14069+
}
14070+
14071+
requestOptions.headers["Content-Type"] = 'multipart/form-data';
14072+
requestOptions.multipart = requestParts;
14073+
}
14074+
14075+
return Promise.resolve(requestOptions);
14076+
}
14077+
14078+
/**
14079+
* create response from string
14080+
*/
14081+
createResponse(_response: Buffer, _headers: http.IncomingHttpHeaders): any {
14082+
return ObjectSerializer.deserialize(JSON.parse(_response.toString()), "RevisionsResponse");
14083+
}
14084+
}
14085+
14086+
/**
14087+
* Request model for GetAllRevisionsOnline operation.
14088+
* Get all information about revisions.
14089+
*/
14090+
export class GetAllRevisionsOnlineRequest implements RequestInterface {
14091+
14092+
public constructor(init?: Partial< GetAllRevisionsOnlineRequest >) {
14093+
Object.assign(this, init);
14094+
}
14095+
14096+
/**
14097+
* The document.
14098+
*/
14099+
public document: Readable;
14100+
14101+
/**
14102+
* Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
14103+
*/
14104+
public loadEncoding: string;
14105+
14106+
/**
14107+
* Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
14108+
*/
14109+
public password: string;
14110+
14111+
/**
14112+
* Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
14113+
*/
14114+
public encryptedPassword: string;
14115+
14116+
/**
14117+
* The value indicates whether OpenType support is on.
14118+
*/
14119+
public openTypeSupport: boolean;
14120+
14121+
/**
14122+
* create the requst options for this request
14123+
* @param configuration a configuration for the request
14124+
* @param data encryptor
14125+
*/
14126+
public async createRequestOptions(configuration: Configuration, _encryptor: Encryptor) : Promise<request.OptionsWithUri> {
14127+
let localVarPath = configuration.getApiBaseUrl() + "/words/online/get/revisions/getAll"
14128+
.replace("//", "/");
14129+
var queryParameters: any = {};
14130+
var headerParams: any = {};
14131+
var formParams: any = [];
14132+
var filesContent: any = [];
14133+
// verify required parameter 'this.document' is not undefined
14134+
if (this.document === undefined) {
14135+
throw new Error('Required parameter "this.document" was undefined when calling getAllRevisionsOnline.');
14136+
}
14137+
14138+
// verify required parameter 'this.document' is not null
14139+
if (this.document === null) {
14140+
throw new Error('Required parameter "this.document" was null when calling getAllRevisionsOnline.');
14141+
}
14142+
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "loadEncoding", this.loadEncoding, _encryptor);
14143+
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "password", this.password, _encryptor);
14144+
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "encryptedPassword", this.encryptedPassword, _encryptor);
14145+
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "openTypeSupport", this.openTypeSupport, _encryptor);
14146+
if (this.document !== undefined) {
14147+
formParams.push(['Document', this.document, 'application/octet-stream']);
14148+
}
14149+
14150+
for (let fileContent of filesContent) {
14151+
await fileContent.encryptPassword(_encryptor);
14152+
if (fileContent.getSource() == FileReference.SourceEnum.Request) {
14153+
formParams.push([fileContent.getReference(), fileContent.getContent(), 'application/octet-stream']);
14154+
}
14155+
}
14156+
14157+
const requestOptions: request.Options = {
14158+
method: "PUT",
14159+
qs: queryParameters,
14160+
headers: headerParams,
14161+
uri: localVarPath,
14162+
};
14163+
14164+
if (formParams.length == 1) {
14165+
let formFirstParam = formParams[0];
14166+
requestOptions.body = formFirstParam[1];
14167+
requestOptions.headers["Content-Type"] = formFirstParam[2];
14168+
}
14169+
else if (formParams.length > 1) {
14170+
const requestParts = [];
14171+
for (let formParam of formParams) {
14172+
requestParts.push({
14173+
'Content-Type': formParam[2],
14174+
'Content-Disposition': 'form-data; name="' + formParam[0] + '"',
14175+
body: formParam[1],
14176+
});
14177+
}
14178+
14179+
requestOptions.headers["Content-Type"] = 'multipart/form-data';
14180+
requestOptions.multipart = requestParts;
14181+
}
14182+
14183+
return Promise.resolve(requestOptions);
14184+
}
14185+
14186+
/**
14187+
* create response from string
14188+
*/
14189+
createResponse(_response: Buffer, _headers: http.IncomingHttpHeaders): any {
14190+
return ObjectSerializer.deserialize(JSON.parse(_response.toString()), "RevisionsResponse");
14191+
}
14192+
}
14193+
1395914194
/**
1396014195
* Request model for GetAvailableFonts operation.
1396114196
* Reads available fonts from the document.

0 commit comments

Comments
 (0)