Skip to content

Commit 11c7bda

Browse files
committed
Release Aspose.Cells Cloud SDK 21.9
1 parent 1245933 commit 11c7bda

File tree

9 files changed

+479
-94
lines changed

9 files changed

+479
-94
lines changed
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
const { CellsWorkbookApi, CellsWorkbook_PutConvertWorkbookRequest } = require("asposecellscloud");
2-
1+
const { CellsApi, CellsWorkbook_PutConvertWorkbookRequest } = require("asposecellscloud");
2+
var fs = require('fs');
33
const clientId = process.env.CellsCloudTestClientId;
44
const clientSecret = process.env.CellsCloudTestClientSecret;
5-
cellsApi = new CellsApi(clientId, clientSecret);
6-
filename = "Book1.xlsx"
7-
5+
const ApiURL = process.env.CellsCloudTestApiBaseUrl;
6+
const cellsApi = new api.CellsApi(clientId, clientSecret,"v3.0",ApiURL);
7+
const filename = "Book1.xlsx"
8+
const localPath = "../TestData/";
89

910

1011
var req = new CellsWorkbook_PutConvertWorkbookRequest({
11-
workbook: fs.readFileSync("Examples/" + filename),
12+
workbook: fs.readFileSync(localPath + filename),
1213
format: "pdf",
1314
});
1415

1516
cellsApi.cellsWorkbookPutConvertWorkbook(req)
1617
.then((result) => {
1718
console.log(result)
18-
});
19+
});
20+

README.md

Lines changed: 23 additions & 6 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/21.7)
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/21.9)
22

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

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

23-
## Feature & Enhancements in Version 21.8
24-
25-
- Improvement for getting list object Api.
26-
- Add import Api.
27-
23+
## Feature & Enhancements in Version 21.9
24+
25+
- Correct the return type of the following REST APIs.
26+
27+
Delete WorksheetDeleteChart
28+
Post WorksheetChartLegend
29+
Post WorksheetChartTitle
30+
Put WorksheetAddChart
31+
Put WorksheetChartTitle
32+
Post WorksheetHyperlink
33+
Put WorksheetHyperlink
34+
Put WorksheetListObject
35+
Put WorksheetOleObject
36+
Post WorksheetPicture
37+
Put WorksheetAddPicture
38+
Put WorksheetPivotTable
39+
Delete DocumentProperties
40+
Delete DocumentProperty
41+
Put DocumentProperty
42+
Put WorksheetShape
43+
Delete WorksheetValidation
44+
2845

2946
## Read & Write Spreadsheet Formats
3047

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "asposecellscloud",
3-
"version": "21.8.0",
3+
"version": "21.9.0",
44
"description": "Aspose.Cells Cloud SDK for Node.js",
55
"keywords": [
66
"Aspose",
@@ -26,26 +26,26 @@
2626
"gulp": "gulp"
2727
},
2828
"dependencies": {
29-
"@types/jest": "^26.0.14",
30-
"@types/request": "^2.47.0",
29+
"@types/jest": "^26.0.24",
30+
"@types/request": "^2.48.7",
3131
"request": "^2.88.2",
3232
"request-debug": "^0.2.0"
3333
},
3434
"devDependencies": {
35-
"@types/chai": "^4.0.10",
35+
"@types/chai": "^4.2.22",
3636
"@types/mocha": "^2.2.44",
37-
"@types/node": "^8.10.64",
38-
"chai": "^4.2.0",
37+
"@types/node": "^8.10.66",
38+
"chai": "^4.3.4",
3939
"cross-env": "^5.1.4",
4040
"cucumber": "^3.0.0",
4141
"del": "^3.0.0",
4242
"gulp": "^4.0.0",
4343
"gulp-cucumber": "0.0.23",
4444
"gulp-typescript": "^4.0.1",
4545
"gulp-util": "^3.0.8",
46-
"mocha": "^8.1.3",
46+
"mocha": "^8.4.0",
4747
"mocha-cases": "^0.2.1",
48-
"mocha-jenkins-reporter": "^0.4.1",
48+
"mocha-jenkins-reporter": "^0.4.7",
4949
"mocha-sinon": "^2.0.0",
5050
"sinon": "^7.0.0",
5151
"ts-node": "^4.1.0",

src/api.ts

Lines changed: 52 additions & 40 deletions
Large diffs are not rendered by default.

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"] = "21.6.0";
96+
requestOptions.headers["x-aspose-client-version"] = "21.9.0";
9797
const auth = confguration.authentication;
9898
if (!notApplyAuthToRequest) {
9999
await auth.applyToRequest(requestOptions, confguration);

src/model/model.ts

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25548,7 +25548,7 @@ export class DeleteMetadataRequest {
2554825548
/**
2554925549
* File to upload
2555025550
*/
25551-
public file: {};
25551+
public file: Buffer;
2555225552

2555325553
/**
2555425554
* Gets or sets type
@@ -25563,7 +25563,7 @@ export class DeleteMetadataRequest {
2556325563
/**
2556425564
* Request model for operation.
2556525565
*/
25566-
export class GetMetadataRequest {
25566+
export class GetMetadataRequest {
2556725567
/**
2556825568
* File to upload
2556925569
*/
@@ -25586,7 +25586,7 @@ export class PostAssembleRequest {
2558625586
/**
2558725587
* File to upload
2558825588
*/
25589-
public file: {};
25589+
public file: Buffer;
2559025590

2559125591
/**
2559225592
* Gets or sets datasource
@@ -25610,7 +25610,7 @@ export class PostClearObjectsRequest {
2561025610
/**
2561125611
* File to upload
2561225612
*/
25613-
public file: {};
25613+
public file: Buffer;
2561425614

2561525615
/**
2561625616
* Gets or sets objecttype
@@ -25629,7 +25629,7 @@ export class PostExportRequest {
2562925629
/**
2563025630
* File to upload
2563125631
*/
25632-
public file: {};
25632+
public file: Buffer;
2563325633

2563425634
/**
2563525635
* Gets or sets objectType
@@ -25653,14 +25653,12 @@ export class PostImportRequest {
2565325653
/**
2565425654
* File to upload
2565525655
*/
25656-
public file: {};
25656+
public file: Buffer;
2565725657

2565825658
/**
25659-
* Gets or sets ImportOption
25659+
* Gets or sets importOption
2566025660
*/
25661-
public importOption: ImportOption;
25662-
25663-
25661+
public importOption: ImportOption;
2566425662

2566525663
public constructor(init?: Partial<PostImportRequest>) {
2566625664
Object.assign(this, init);
@@ -25674,7 +25672,7 @@ export class PostMergeRequest {
2567425672
/**
2567525673
* File to upload
2567625674
*/
25677-
public file: {};
25675+
public file: Buffer;
2567825676

2567925677
/**
2568025678
* Gets or sets format
@@ -25698,10 +25696,10 @@ export class PostMetadataRequest {
2569825696
/**
2569925697
* File to upload
2570025698
*/
25701-
public file: {};
25699+
public file: Buffer;
2570225700

2570325701
/**
25704-
* Gets or sets documentProperties
25702+
* Cells document property.
2570525703
*/
2570625704
public documentProperties: Array<CellsDocumentProperty>;
2570725705

@@ -25717,7 +25715,7 @@ export class PostProtectRequest {
2571725715
/**
2571825716
* File to upload
2571925717
*/
25720-
public file: {};
25718+
public file: Buffer;
2572125719

2572225720
/**
2572325721
* Gets or sets password
@@ -25736,7 +25734,7 @@ export class PostSearchRequest {
2573625734
/**
2573725735
* File to upload
2573825736
*/
25739-
public file: {};
25737+
public file: Buffer;
2574025738

2574125739
/**
2574225740
* Gets or sets text
@@ -25765,7 +25763,7 @@ export class PostSplitRequest {
2576525763
/**
2576625764
* File to upload
2576725765
*/
25768-
public file: {};
25766+
public file: Buffer;
2576925767

2577025768
/**
2577125769
* Gets or sets format
@@ -25799,7 +25797,7 @@ export class PostUnlockRequest {
2579925797
/**
2580025798
* File to upload
2580125799
*/
25802-
public file: {};
25800+
public file: Buffer;
2580325801

2580425802
/**
2580525803
* Gets or sets password
@@ -25818,7 +25816,7 @@ export class PostWatermarkRequest {
2581825816
/**
2581925817
* File to upload
2582025818
*/
25821-
public file: {};
25819+
public file: Buffer;
2582225820

2582325821
/**
2582425822
* Gets or sets text

test/CellsOneApi.ts

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ var fs = require('fs');
3131
var path = require('path');
3232
var assert = require('assert');
3333
const localPath = "../TestData/";
34-
describe('cellsHypelinksPutWorksheetHyperlink', function() {
35-
it('should call cellsHypelinksPutWorksheetHyperlink successfully', function() {
34+
35+
describe('Cells sdk for NodeJS test ok.', function() {
36+
it('should call cellsWorkbookPostWorkbookGetSmartMarkerResult successfully', function() {
3637
const cellsApi = BaseTest.initializeCellsApi();
3738
const filename = "Book1.xlsx";
3839
var data =fs.createReadStream(localPath + filename);
@@ -43,21 +44,55 @@ describe('cellsHypelinksPutWorksheetHyperlink', function() {
4344
return cellsApi.uploadFile(req)
4445
.then((result) => {
4546
expect(result.body.uploaded.length).greaterThan(0);
46-
var req = new model.CellsHypelinks_PutWorksheetHyperlinkRequest();
47+
var req = new model.CellsWorkbook_PostWorkbookGetSmartMarkerResultRequest();
4748
req.name = filename;
48-
req.sheetName = "Sheet1";
49-
req.firstRow = 1;
50-
req.firstColumn = 1;
51-
req.totalRows = 2;
52-
req.totalColumns = 3;
53-
req.address = "http://wwww.aspose.com";
49+
req.xmlFile = "ReportData.xml";
50+
// req.outPath = null;
5451
req.folder = "Temp";
5552

56-
return cellsApi.cellsHypelinksPutWorksheetHyperlink(req)
53+
return cellsApi.cellsWorkbookPostWorkbookGetSmartMarkerResult(req)
5754
.then((result) => {
58-
expect(result.body.code).to.equal(200);
59-
expect(result.response.statusCode).to.equal(200);
55+
// expect(result.response.statusCode).to.equal(200);
56+
expect(result.body.toString().length).to.greaterThan(0);
6057
});
6158
});
6259
});
60+
// it('should call cellsWorkbookPutConvertWorkbook successfully', function() {
61+
// const cellsApi = BaseTest.initializeCellsApi();
62+
// const filename = "Book1.xlsx";
63+
64+
// var req = new model.CellsWorkbook_PutConvertWorkbookRequest({
65+
// file : fs.createReadStream(localPath + filename),
66+
// format : "pdf",
67+
// });
68+
69+
// return cellsApi.cellsWorkbookPutConvertWorkbook(req)
70+
// .then((result) => {
71+
// // console.log(result);
72+
// fs.writeFile('test.pdf',result['body'],'binary', err => {
73+
// if (err) {
74+
// console.error(err);
75+
// }
76+
// });
77+
// });
78+
// });
79+
// it('should call down file successfully', function() {
80+
// const cellsApi = BaseTest.initializeCellsApi();
81+
// const filename = "Book1.xlsx";
82+
83+
// var req = new model.DownloadFileRequest({
84+
// path:'CellsTests/Book1.xlsx',
85+
// storageName:'Cells',
86+
// });
87+
88+
// return cellsApi.downloadFile(req)
89+
// .then((result) => {
90+
// // console.log(result);
91+
// fs.writeFile('Book1.xlsx',result['body'],'binary', err => {
92+
// if (err) {
93+
// console.error(err);
94+
// }
95+
// }) ;
96+
// });
97+
// });
6398
});

0 commit comments

Comments
 (0)