Skip to content

Commit 19da9bf

Browse files
committed
Release Aspose.Cells Cloud SDK 22.3
1 parent f87d848 commit 19da9bf

File tree

6 files changed

+141
-58
lines changed

6 files changed

+141
-58
lines changed

README.md

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

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

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

23-
## Feature & Enhancements in Version 22.2
23+
## Feature & Enhancements in Version 22.3
2424

25-
26-
- Update return value for the DeleteUnprotectWorksheet API on Aspose.Cells Cloud.
27-
- Update return value for the PutProtectWorksheet API on Aspose.Cells Cloud.
28-
- Update return value for the PostSetCellHtmlString API on Aspose.Cells Cloud.
29-
- Update return value for the PostUpdateWorksheetProperty API on Aspose.Cells Cloud.
25+
- Add new API about adding digital signature for cloud file.
3026

3127

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

src/api.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8979,6 +8979,50 @@ export class CellsApi {
89798979
return Promise.resolve({body: result, response});
89808980
}
89818981

8982+
/**
8983+
* Add digital signature.
8984+
* @param requestObj contains request parameters
8985+
*/
8986+
public async cellsWorkbookPostDigitalSignature(requestObj: model.CellsWorkbook_PostDigitalSignatureRequest): Promise<{response: http.ClientResponse, body: model.CellsCloudResponse}> {
8987+
if (requestObj === null || requestObj === undefined) {
8988+
throw new Error('Required parameter "requestObj" was null or undefined when calling cellsWorkbookPostDigitalSignature.');
8989+
}
8990+
8991+
let localVarPath = this.configuration.getApiBaseUrl() + "/cells/{name}/digitalsignature"
8992+
.replace("{" + "name" + "}", String(requestObj.name));
8993+
const queryParameters: any = {};
8994+
8995+
// verify required parameter 'requestObj.name' is not null or undefined
8996+
if (requestObj.name === null || requestObj.name === undefined) {
8997+
throw new Error('Required parameter "requestObj.name" was null or undefined when calling cellsWorkbookPostDigitalSignature.');
8998+
}
8999+
9000+
// verify required parameter 'requestObj.digitalsignaturefile' is not null or undefined
9001+
if (requestObj.digitalsignaturefile === null || requestObj.digitalsignaturefile === undefined) {
9002+
throw new Error('Required parameter "requestObj.digitalsignaturefile" was null or undefined when calling cellsWorkbookPostDigitalSignature.');
9003+
}
9004+
9005+
// verify required parameter 'requestObj.password' is not null or undefined
9006+
if (requestObj.password === null || requestObj.password === undefined) {
9007+
throw new Error('Required parameter "requestObj.password" was null or undefined when calling cellsWorkbookPostDigitalSignature.');
9008+
}
9009+
9010+
localVarPath = addQueryParameterToUrl(localVarPath, queryParameters, "digitalsignaturefile", requestObj.digitalsignaturefile);
9011+
localVarPath = addQueryParameterToUrl(localVarPath, queryParameters, "password", requestObj.password);
9012+
localVarPath = addQueryParameterToUrl(localVarPath, queryParameters, "folder", requestObj.folder);
9013+
localVarPath = addQueryParameterToUrl(localVarPath, queryParameters, "storageName", requestObj.storageName);
9014+
const requestOptions: request.Options = {
9015+
method: "POST",
9016+
qs: queryParameters,
9017+
uri: localVarPath,
9018+
json: true,
9019+
};
9020+
9021+
const response = await invokeApiMethod(requestOptions, this.configuration);
9022+
const result = ObjectSerializer.deserialize(response.body, "CellsCloudResponse");
9023+
return Promise.resolve({body: result, response});
9024+
}
9025+
89829026
/**
89839027
* Encript document.
89849028
* @param requestObj contains request parameters

src/model/model.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23832,6 +23832,40 @@ export class CellsWorkbook_PostAutofitWorkbookRowsRequest {
2383223832
}
2383323833
}
2383423834

23835+
/**
23836+
* Request model for CellsWorkbook_PostDigitalSignature operation.
23837+
*/
23838+
export class CellsWorkbook_PostDigitalSignatureRequest {
23839+
/**
23840+
* Workbook name.
23841+
*/
23842+
public name: string;
23843+
23844+
/**
23845+
* Digital signature file parameters.
23846+
*/
23847+
public digitalsignaturefile: string;
23848+
23849+
/**
23850+
* Gets or sets password
23851+
*/
23852+
public password: string;
23853+
23854+
/**
23855+
* Workbook's folder.
23856+
*/
23857+
public folder: string;
23858+
23859+
/**
23860+
* storage name.
23861+
*/
23862+
public storageName: string;
23863+
23864+
public constructor(init?: Partial<CellsWorkbook_PostDigitalSignatureRequest>) {
23865+
Object.assign(this, init);
23866+
}
23867+
}
23868+
2383523869
/**
2383623870
* Request model for CellsWorkbook_PostEncryptDocument operation.
2383723871
*/

test/CellsOneApi.ts

Lines changed: 23 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ var path = require('path');
3232
var assert = require('assert');
3333
const localPath = "../TestData/";
3434

35-
describe('CellsWorkbook_GetPageCountRequest', function () {
36-
it('should call CellsWorkbook_GetPageCountRequest successfully', function () {
35+
describe('cellsWorkbookPostDigitalSignature', function () {
36+
it('should call cellsWorkbookPostDigitalSignature successfully', function () {
3737
const cellsApi = BaseTest.initializeCellsApi();
3838
const filename = "Book1.xlsx";
3939
var data = fs.createReadStream(localPath + filename);
@@ -43,55 +43,29 @@ describe('CellsWorkbook_GetPageCountRequest', function () {
4343

4444
return cellsApi.uploadFile(req)
4545
.then((result) => {
46-
expect(result.body.uploaded.length).greaterThan(0);
47-
const filename = "Book1.xlsx";
48-
var req = new model.CellsWorkbook_GetPageCountRequest();
49-
req.folder = "Temp";
50-
req.name = filename;
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;
5151

52-
return cellsApi.cellsWorkbookGetPageCount(req)
52+
return cellsApi.uploadFile(req1)
5353
.then((result) => {
54-
expect(result.body).to.greaterThan(0);
54+
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)
64+
.then((result) => {
65+
expect(result.response.statusCode).to.equal(200);
66+
});
5567
});
5668
});
57-
});
58-
59-
// it('should call cellsWorkbookPutConvertWorkbook successfully', function() {
60-
// const cellsApi = BaseTest.initializeCellsApi();
61-
// const filename = "Book1.xlsx";
62-
63-
// var req = new model.CellsWorkbook_PutConvertWorkbookRequest({
64-
// file : fs.createReadStream(localPath + filename),
65-
// format : "pdf",
66-
// });
67-
68-
// return cellsApi.cellsWorkbookPutConvertWorkbook(req)
69-
// .then((result) => {
70-
// // console.log(result);
71-
// fs.writeFile('test.pdf',result['body'],'binary', err => {
72-
// if (err) {
73-
// console.error(err);
74-
// }
75-
// });
76-
// });
77-
// });
78-
// it('should call down file successfully', function() {
79-
// const cellsApi = BaseTest.initializeCellsApi();
80-
// const filename = "Book1.xlsx";
81-
82-
// var req = new model.DownloadFileRequest({
83-
// path:'CellsTests/Book1.xlsx',
84-
// storageName:'Cells',
85-
// });
86-
87-
// return cellsApi.downloadFile(req)
88-
// .then((result) => {
89-
// // console.log(result);
90-
// fs.writeFile('Book1.xlsx',result['body'],'binary', err => {
91-
// if (err) {
92-
// console.error(err);
93-
// }
94-
// }) ;
95-
// });
96-
// });
69+
});
9770
});
71+

test/CellsWorkbookApi.ts

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,5 +1001,40 @@ describe('CellsWorkbookApi', function () {
10011001
});
10021002
});
10031003
});
1004-
1004+
describe('cellsWorkbookPostDigitalSignature', function () {
1005+
it('should call cellsWorkbookPostDigitalSignature successfully', function () {
1006+
const cellsApi = BaseTest.initializeCellsApi();
1007+
const filename = "Book1.xlsx";
1008+
var data = fs.createReadStream(localPath + filename);
1009+
var req = new model.UploadFileRequest();
1010+
req.path = "Temp/" + filename;
1011+
req.file = data;
1012+
1013+
return cellsApi.uploadFile(req)
1014+
.then((result) => {
1015+
const pfxfilename = "roywang.pfx";
1016+
var data1 = fs.createReadStream(localPath + pfxfilename);
1017+
var req1 = new model.UploadFileRequest();
1018+
req1.path = "Temp/" + pfxfilename;
1019+
req1.file = data1;
1020+
1021+
return cellsApi.uploadFile(req1)
1022+
.then((result) => {
1023+
expect(result.body.uploaded.length).greaterThan(0);
1024+
const filename = "Book1.xlsx";
1025+
const pfxfilename = "roywang.pfx";
1026+
var req2 = new model.CellsWorkbook_PostDigitalSignatureRequest();
1027+
req2.digitalsignaturefile = "Temp/" + pfxfilename;
1028+
req2.folder = "Temp";
1029+
req2.password ="123456";
1030+
req2.name = filename;
1031+
1032+
return cellsApi.cellsWorkbookPostDigitalSignature(req2)
1033+
.then((result) => {
1034+
expect(result.response.statusCode).to.equal(200);
1035+
});
1036+
});
1037+
});
1038+
});
1039+
});
10051040
});

0 commit comments

Comments
 (0)