Skip to content

Commit 6979a4e

Browse files
committed
Aspose.Cells Cloud SDK 22.6
1 parent 5311dfa commit 6979a4e

File tree

6 files changed

+55
-35
lines changed

6 files changed

+55
-35
lines changed

README.md

Lines changed: 4 additions & 3 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.5)
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.6)
22

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

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

23-
## Feature & Enhancements in Version 22.5
23+
## Feature & Enhancements in Version 22.6
2424

25-
- Add a new API for getting barcode description.
25+
- Improve save as api.
26+
- Improve clear objects api.
2627

2728

2829
## Read & Write Spreadsheet Formats

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.5.0",
3+
"version": "22.6.0",
44
"description": "Aspose.Cells Cloud SDK for Node.js",
55
"keywords": [
66
"Aspose",

src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7825,7 +7825,7 @@ export class CellsApi {
78257825
qs: queryParameters,
78267826
uri: localVarPath,
78277827
json: true,
7828-
body: (requestObj.saveOptions == null) ? "" : ObjectSerializer.serialize(requestObj.saveOptions, requestObj.saveOptions.constructor.name === "Object" ? "SaveOptions" : requestObj.saveOptions.constructor.name),
7828+
body: (requestObj.saveOptions == null) ? undefined : ObjectSerializer.serialize(requestObj.saveOptions, requestObj.saveOptions.constructor.name === "Object" ? "SaveOptions" : requestObj.saveOptions.constructor.name),
78297829
};
78307830

78317831
const response = await invokeApiMethod(requestOptions, this.configuration);

src/internal/requestHelper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ 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"] = "21.9.0";
96+
requestOptions.headers["x-aspose-client-version"] = "22.6.0";
97+
requestOptions.headers["Content-Type"] = "application/json";
9798
const auth = confguration.authentication;
9899
if (!notApplyAuthToRequest) {
99100
await auth.applyToRequest(requestOptions, confguration);

test/CellsOneApi.ts

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,45 +27,38 @@ import "mocha";
2727

2828
import * as model from "../src/model/model";
2929
import * as BaseTest from "./baseTest";
30+
31+
const localPath = "../TestData/";
3032
var fs = require('fs');
3133
var path = require('path');
3234
var assert = require('assert');
33-
const localPath = "../TestData/";
34-
35-
describe('cellsWorkbookPostDigitalSignature', function () {
36-
it('should call cellsWorkbookPostDigitalSignature successfully', function () {
37-
const cellsApi = BaseTest.initializeCellsApi();
38-
const filename = "Book1.xlsx";
39-
var data = fs.createReadStream(localPath + filename);
40-
var req = new model.UploadFileRequest();
41-
req.path = "Temp/" + filename;
42-
req.file = data;
4335

44-
return cellsApi.uploadFile(req)
45-
.then((result) => {
46-
const pfxfilename = "roywang.pfx";
47-
var data1 = fs.createReadStream(localPath + pfxfilename);
48-
var req1 = new model.UploadFileRequest();
49-
req1.path = "Temp/" + pfxfilename;
50-
req1.file = data1;
51-
52-
return cellsApi.uploadFile(req1)
36+
describe('CellsSaveAsApi ', function() {
37+
this.timeout(200000);
38+
describe('cellsSaveAsPostDocumentSaveAsPDF 3', function() {
39+
it('should call cellsSaveAsPostDocumentSaveAsPDF successfully', function() {
40+
const cellsApi = BaseTest.initializeCellsApi();
41+
const filename = "Book1.xlsx";
42+
var data =fs.createReadStream(localPath + filename);
43+
var req = new model.UploadFileRequest();
44+
req.path = "Temp/" + filename;
45+
req.file = data;
46+
47+
return cellsApi.uploadFile(req)
5348
.then((result) => {
5449
expect(result.body.uploaded.length).greaterThan(0);
55-
const filename = "Book1.xlsx";
56-
const pfxfilename = "roywang.pfx";
57-
var req2 = new model.CellsWorkbook_PostDigitalSignatureRequest();
58-
req2.digitalsignaturefile = "Temp/" + pfxfilename;
59-
req2.folder = "Temp";
60-
req2.password ="123456";
61-
req2.name = filename;
62-
63-
return cellsApi.cellsWorkbookPostDigitalSignature(req2)
50+
var req = new model.CellsSaveAs_PostDocumentSaveAsRequest();
51+
req.name = filename;
52+
req.newfilename = "NewBook1.pdf"
53+
req.folder = "Temp";
54+
55+
return cellsApi.cellsSaveAsPostDocumentSaveAs(req)
6456
.then((result) => {
57+
expect(result.body.code).to.equal(200);
6558
expect(result.response.statusCode).to.equal(200);
6659
});
6760
});
6861
});
6962
});
63+
7064
});
71-

test/CellsSaveAsApi.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,29 @@ describe('CellsSaveAsApi ', function() {
192192
});
193193
});
194194
});
195+
describe('cellsSaveAsPostDocumentSaveAs without save option', function() {
196+
it('should call cellsSaveAsPostDocumentSaveAsPDF successfully', function() {
197+
const cellsApi = BaseTest.initializeCellsApi();
198+
const filename = "Book1.xlsx";
199+
var data =fs.createReadStream(localPath + filename);
200+
var req = new model.UploadFileRequest();
201+
req.path = "Temp/" + filename;
202+
req.file = data;
203+
204+
return cellsApi.uploadFile(req)
205+
.then((result) => {
206+
expect(result.body.uploaded.length).greaterThan(0);
207+
var req = new model.CellsSaveAs_PostDocumentSaveAsRequest();
208+
req.name = filename;
209+
req.newfilename = "NewBook1.pdf"
210+
req.folder = "Temp";
211+
212+
return cellsApi.cellsSaveAsPostDocumentSaveAs(req)
213+
.then((result) => {
214+
expect(result.body.code).to.equal(200);
215+
expect(result.response.statusCode).to.equal(200);
216+
});
217+
});
218+
});
219+
});
195220
});

0 commit comments

Comments
 (0)