Skip to content

Commit

Permalink
SDK regenerated by CI server [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
dynabic-billing-team committed Oct 6, 2023
1 parent 97c5725 commit 2c7bb69
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 63 deletions.
2 changes: 2 additions & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5036,6 +5036,7 @@ export class WordsApi implements Encryptor {

/**
* Converts a document in cloud storage to TIFF format using detailed conversion settings.
* @deprecated This operation will be removed in the future.
* @param requestObj contains request parameters
*/
public async saveAsTiff(requestObj: model.SaveAsTiffRequest): Promise< model.WordsIncomingMessage< model.SaveResponse > > {
Expand All @@ -5054,6 +5055,7 @@ export class WordsApi implements Encryptor {

/**
* Converts a document in cloud storage to TIFF format using detailed conversion settings.
* @deprecated This operation will be removed in the future.
* @param requestObj contains request parameters
*/
public async saveAsTiffOnline(requestObj: model.SaveAsTiffOnlineRequest): Promise< model.WordsIncomingMessage< model.SaveAsTiffOnlineResponse > > {
Expand Down
60 changes: 0 additions & 60 deletions test/document/convertDocumentTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,66 +160,6 @@ describe("convertDocument", () => {
});
});

// Test for converting document to one of the available formats.
describe("saveAsTiff test", () => {
it("should return response with code 200", () => {
const wordsApi = BaseTest.initializeWordsApi();
const localName = "test_multi_pages.docx";
const remoteName = "TestSaveAsTiff.pdf";

return wordsApi.uploadFileToStorage(
remoteFolder + "/" + remoteName,
BaseTest.localBaseTestDataFolder + "Common/" + localName
).then((result0) => {
expect(result0.response.statusMessage).to.equal("OK");
const requestSaveOptions = new model.TiffSaveOptionsData({
fileName: BaseTest.remoteBaseTestOutFolder + "/abc.tiff"
})
const request = new model.SaveAsTiffRequest({
name: remoteName,
saveOptions: requestSaveOptions,
folder: remoteFolder
});

// Act
return wordsApi.saveAsTiff(request)
.then((resultApi) => {
// Assert
expect(resultApi.response.statusCode).to.equal(200);
expect(resultApi.body.saveResult).to.exist;
expect(resultApi.body.saveResult.destDocument).to.exist;
});

});

});
});

// Test for converting document to one of the available formats.
describe("saveAsTiffOnline test", () => {
it("should return response with code 200", () => {
const wordsApi = BaseTest.initializeWordsApi();
const localName = "test_multi_pages.docx";

const requestDocument = fs.createReadStream(BaseTest.localBaseTestDataFolder + "Common/" + localName);
const requestSaveOptions = new model.TiffSaveOptionsData({
fileName: BaseTest.remoteBaseTestOutFolder + "/abc.tiff"
})
const request = new model.SaveAsTiffOnlineRequest({
document: requestDocument,
saveOptions: requestSaveOptions
});

// Act
return wordsApi.saveAsTiffOnline(request)
.then((resultApi) => {
// Assert
expect(resultApi.response.statusCode).to.equal(200);
});

});
});

// A test for ConvertDocument.
describe("convertDocument test", () => {
it("should return response with code 200", () => {
Expand Down
13 changes: 10 additions & 3 deletions test/testCoverage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ describe("API method coverage", () => {
});
});

const deprecatedMethods = [
"saveAsTiff",
"saveAsTiffOnline",

];

const getAllMethods = (obj) => {
let props = [];

Expand All @@ -68,10 +74,11 @@ const getAllMethods = (obj) => {
.concat(Object.getOwnPropertySymbols(obj).map((s) => s.toString()))
.sort()
.filter((p, i, arr) =>
typeof obj[p] === "function" && // only the methods
p !== "constructor" && // not the constructor
typeof obj[p] === "function" && // only the methods
p !== "constructor" && // not the constructor
(i === 0 || p !== arr[i - 1]) && // not overriding in this prototype
props.indexOf(p) === -1 && // not overridden in a child
props.indexOf(p) === -1 && // not overridden in a child
!deprecatedMethods.includes(p) && // not deprecated
!p.startsWith("_"));

props = props.concat(l);
Expand Down

0 comments on commit 2c7bb69

Please sign in to comment.