Skip to content

Commit e7244f1

Browse files
committed
Release Aspose.Cells Cloud SDK 22.10
1 parent cba48dd commit e7244f1

File tree

7 files changed

+226
-11
lines changed

7 files changed

+226
-11
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![npm](https://img.shields.io/npm/v/asposecellscloud) ![node-current](https://img.shields.io/node/v/asposecellscloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-node)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-node/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-node/22.9)
1+
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![npm](https://img.shields.io/npm/v/asposecellscloud) ![node-current](https://img.shields.io/node/v/asposecellscloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-node)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-node/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-node/22.10)
22

33
# Process Excel® Files in the Cloud with Node.js
44

@@ -20,11 +20,11 @@
2020
- Fetch the required shape from worksheet.
2121
- Leverage the power of named ranges.
2222

23-
## Feature & Enhancements in Version 22.9
23+
## Feature & Enhancements in Version 22.10
2424

25-
- Add api for converting workbook to png.
26-
- Add api for converting workbook to pdf.
27-
- Add api for converting workbook to docx.
25+
- Add api for converting workbook to pptx.
26+
- Add api for converting workbook to html.
27+
- Add api for converting workbook to markdown.
2828

2929
## Read & Write Spreadsheet Formats
3030

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "asposecellscloud",
3-
"version": "22.9.0",
3+
"version": "22.10.0",
44
"description": "Aspose.Cells Cloud SDK for Node.js",
55
"keywords": [
66
"Aspose",

src/api.ts

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11971,6 +11971,116 @@ export class CellsApi {
1197111971
return Promise.resolve({ body: result, response });
1197211972
}
1197311973

11974+
/**
11975+
*
11976+
* @param requestObj contains request parameters
11977+
*/
11978+
public async postConvertWorkbookToPptx(requestObj: model.PostConvertWorkbookToPptxRequest): Promise<{ response: http.ClientResponse, body: model.FileInfo }> {
11979+
if (requestObj === null || requestObj === undefined) {
11980+
throw new Error('Required parameter "requestObj" was null or undefined when calling postConvertWorkbookToPptx.');
11981+
}
11982+
11983+
let localVarPath = this.configuration.getApiBaseUrl() + "/cells/convert/pptx";
11984+
const queryParameters: any = {};
11985+
const formParams: any = {};
11986+
11987+
// verify required parameter 'requestObj.file' is not null or undefined
11988+
if (requestObj.file === null || requestObj.file === undefined) {
11989+
throw new Error('Required parameter "requestObj.file" was null or undefined when calling postConvertWorkbookToPptx.');
11990+
}
11991+
11992+
localVarPath = addQueryParameterToUrl(localVarPath, queryParameters, "password", requestObj.password);
11993+
localVarPath = addQueryParameterToUrl(localVarPath, queryParameters, "checkExcelRestriction", requestObj.checkExcelRestriction);
11994+
if (requestObj.file !== undefined) {
11995+
formParams.file = requestObj.file;
11996+
}
11997+
11998+
const requestOptions: request.Options = {
11999+
method: "POST",
12000+
qs: queryParameters,
12001+
uri: localVarPath,
12002+
json: true,
12003+
};
12004+
12005+
(requestOptions as any).formData = formParams;
12006+
const response = await invokeApiMethod(requestOptions, this.configuration);
12007+
const result = ObjectSerializer.deserialize(response.body, "FileInfo");
12008+
return Promise.resolve({ body: result, response });
12009+
}
12010+
12011+
/**
12012+
*
12013+
* @param requestObj contains request parameters
12014+
*/
12015+
public async postConvertWorkbookToHtml(requestObj: model.PostConvertWorkbookToHtmlRequest): Promise<{ response: http.ClientResponse, body: model.FileInfo }> {
12016+
if (requestObj === null || requestObj === undefined) {
12017+
throw new Error('Required parameter "requestObj" was null or undefined when calling postConvertWorkbookToHtml.');
12018+
}
12019+
12020+
let localVarPath = this.configuration.getApiBaseUrl() + "/cells/convert/html";
12021+
const queryParameters: any = {};
12022+
const formParams: any = {};
12023+
12024+
// verify required parameter 'requestObj.file' is not null or undefined
12025+
if (requestObj.file === null || requestObj.file === undefined) {
12026+
throw new Error('Required parameter "requestObj.file" was null or undefined when calling postConvertWorkbookToHtml.');
12027+
}
12028+
12029+
localVarPath = addQueryParameterToUrl(localVarPath, queryParameters, "password", requestObj.password);
12030+
localVarPath = addQueryParameterToUrl(localVarPath, queryParameters, "checkExcelRestriction", requestObj.checkExcelRestriction);
12031+
if (requestObj.file !== undefined) {
12032+
formParams.file = requestObj.file;
12033+
}
12034+
12035+
const requestOptions: request.Options = {
12036+
method: "POST",
12037+
qs: queryParameters,
12038+
uri: localVarPath,
12039+
json: true,
12040+
};
12041+
12042+
(requestOptions as any).formData = formParams;
12043+
const response = await invokeApiMethod(requestOptions, this.configuration);
12044+
const result = ObjectSerializer.deserialize(response.body, "FileInfo");
12045+
return Promise.resolve({ body: result, response });
12046+
}
12047+
12048+
/**
12049+
*
12050+
* @param requestObj contains request parameters
12051+
*/
12052+
public async postConvertWorkbookToMarkdown(requestObj: model.PostConvertWorkbookToMarkdownRequest): Promise<{ response: http.ClientResponse, body: model.FileInfo }> {
12053+
if (requestObj === null || requestObj === undefined) {
12054+
throw new Error('Required parameter "requestObj" was null or undefined when calling postConvertWorkbookToMarkdown.');
12055+
}
12056+
12057+
let localVarPath = this.configuration.getApiBaseUrl() + "/cells/convert/markdown";
12058+
const queryParameters: any = {};
12059+
const formParams: any = {};
12060+
12061+
// verify required parameter 'requestObj.file' is not null or undefined
12062+
if (requestObj.file === null || requestObj.file === undefined) {
12063+
throw new Error('Required parameter "requestObj.file" was null or undefined when calling postConvertWorkbookToMarkdown.');
12064+
}
12065+
12066+
localVarPath = addQueryParameterToUrl(localVarPath, queryParameters, "password", requestObj.password);
12067+
localVarPath = addQueryParameterToUrl(localVarPath, queryParameters, "checkExcelRestriction", requestObj.checkExcelRestriction);
12068+
if (requestObj.file !== undefined) {
12069+
formParams.file = requestObj.file;
12070+
}
12071+
12072+
const requestOptions: request.Options = {
12073+
method: "POST",
12074+
qs: queryParameters,
12075+
uri: localVarPath,
12076+
json: true,
12077+
};
12078+
12079+
(requestOptions as any).formData = formParams;
12080+
const response = await invokeApiMethod(requestOptions, this.configuration);
12081+
const result = ObjectSerializer.deserialize(response.body, "FileInfo");
12082+
return Promise.resolve({ body: result, response });
12083+
}
1197412084
/**
1197512085
* Check if storage exists
1197612086
* @param requestObj contains request parameters

src/internal/requestHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async function invokeApiMethodInternal(requestOptions: request.Options, confgura
9393
// requestOptions.rejectUnauthorized=false;
9494

9595
requestOptions.headers["x-aspose-client"] = "nodejs sdk";
96-
requestOptions.headers["x-aspose-client-version"] = "22.6.0";
96+
requestOptions.headers["x-aspose-client-version"] = "22.10.0";
9797
requestOptions.headers["Content-Type"] = "application/json";
9898
const auth = confguration.authentication;
9999
if (!notApplyAuthToRequest) {

src/model/model.ts

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26560,6 +26560,77 @@ export class PostConvertWorkbookToPNGRequest {
2656026560
Object.assign(this, init);
2656126561
}
2656226562
}
26563+
26564+
/**
26565+
* Request model for PostConvertWorkbookToPptx operation.
26566+
*/
26567+
export class PostConvertWorkbookToPptxRequest {
26568+
/**
26569+
* File to upload
26570+
*/
26571+
public file: Buffer;
26572+
26573+
/**
26574+
* Gets or sets password
26575+
*/
26576+
public password: string;
26577+
26578+
/**
26579+
* Gets or sets checkExcelRestriction
26580+
*/
26581+
public checkExcelRestriction: boolean;
26582+
26583+
public constructor(init?: Partial<PostConvertWorkbookToPptxRequest>) {
26584+
Object.assign(this, init);
26585+
}
26586+
}
26587+
26588+
/**
26589+
* Request model for PostConvertWorkbookToHtml operation.
26590+
*/
26591+
export class PostConvertWorkbookToHtmlRequest {
26592+
/**
26593+
* File to upload
26594+
*/
26595+
public file: Buffer;
26596+
26597+
/**
26598+
* Gets or sets password
26599+
*/
26600+
public password: string;
26601+
26602+
/**
26603+
* Gets or sets checkExcelRestriction
26604+
*/
26605+
public checkExcelRestriction: boolean;
26606+
26607+
public constructor(init?: Partial<PostConvertWorkbookToHtmlRequest>) {
26608+
Object.assign(this, init);
26609+
}
26610+
}
26611+
/**
26612+
* Request model for PostConvertWorkbookToMarkdown operation.
26613+
*/
26614+
export class PostConvertWorkbookToMarkdownRequest {
26615+
/**
26616+
* File to upload
26617+
*/
26618+
public file: Buffer;
26619+
26620+
/**
26621+
* Gets or sets password
26622+
*/
26623+
public password: string;
26624+
26625+
/**
26626+
* Gets or sets checkExcelRestriction
26627+
*/
26628+
public checkExcelRestriction: boolean;
26629+
26630+
public constructor(init?: Partial<PostConvertWorkbookToMarkdownRequest>) {
26631+
Object.assign(this, init);
26632+
}
26633+
}
2656326634
/**
2656426635
* Request model for StorageExists operation.
2656526636
*/

test/CellsConvertApi.ts

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ describe('CellsConvertApi', function () {
4646
});
4747
});
4848

49-
this.timeout(200000);
5049
describe('PostConvertWorkbookToPDF', function () {
5150
it('should call PostCompress successfully', function () {
5251
const cellsApi = BaseTest.initializeCellsApi();
@@ -59,7 +58,6 @@ describe('CellsConvertApi', function () {
5958
});
6059
});
6160

62-
this.timeout(200000);
6361
describe('PostConvertWorkbookToDocx', function () {
6462
it('should call PostCompress successfully', function () {
6563
const cellsApi = BaseTest.initializeCellsApi();
@@ -72,4 +70,40 @@ describe('CellsConvertApi', function () {
7270
});
7371
});
7472

73+
describe('PostConvertWorkbookToPptx', function () {
74+
it('should call PostCompress successfully', function () {
75+
const cellsApi = BaseTest.initializeCellsApi();
76+
var req = new model.PostConvertWorkbookToPptxRequest();
77+
req.file = fs.createReadStream(localPath + "assemblytest.xlsx");
78+
return cellsApi.postConvertWorkbookToPptx(req)
79+
.then((result) => {
80+
expect(result.response.statusCode).to.equal(200);
81+
});
82+
});
83+
});
84+
85+
describe('PostConvertWorkbookToHtml', function () {
86+
it('should call PostCompress successfully', function () {
87+
const cellsApi = BaseTest.initializeCellsApi();
88+
var req = new model.PostConvertWorkbookToHtmlRequest();
89+
req.file = fs.createReadStream(localPath + "assemblytest.xlsx");
90+
return cellsApi.postConvertWorkbookToHtml(req)
91+
.then((result) => {
92+
expect(result.response.statusCode).to.equal(200);
93+
});
94+
});
95+
});
96+
97+
describe('PostConvertWorkbookToMarkdown', function () {
98+
it('should call PostCompress successfully', function () {
99+
const cellsApi = BaseTest.initializeCellsApi();
100+
var req = new model.PostConvertWorkbookToMarkdownRequest();
101+
req.file = fs.createReadStream(localPath + "assemblytest.xlsx");
102+
return cellsApi.postConvertWorkbookToMarkdown(req)
103+
.then((result) => {
104+
expect(result.response.statusCode).to.equal(200);
105+
});
106+
});
107+
});
108+
75109
});

test/CellsResturnStream.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe('Cells sdk for NodeJS test ok.', function() {
5757
const filename = "Book1.xlsx";
5858

5959
var req = new model.DownloadFileRequest({
60-
path:'CellsTests/Book1.xlsx',
60+
path:'Temp/Book1.xlsx',
6161
storageName:'Cells',
6262
});
6363

@@ -76,7 +76,7 @@ describe('Cells sdk for NodeJS test ok.', function() {
7676
const filename = "Book1.xlsx";
7777

7878
var req = new model.DownloadFileRequest({
79-
path:'CellsTests/Book1.xlsx',
79+
path:'Temp/Book1.xlsx',
8080
storageName:'Cells',
8181
});
8282

0 commit comments

Comments
 (0)