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 Apr 5, 2024
1 parent 1b876c7 commit caebf06
Show file tree
Hide file tree
Showing 6 changed files with 369 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
- Add & remove watermarks and protection.
- Read & write access to Document Object Model.

## Enhancements in Version 24.4

- Added the 'MergeWithNext' method to merge a section with the next one.


## Enhancements in Version 24.3

- Added support for 'RemoveEmptyCells' option for the 'Cleanup' parameter in the insert 'MailMerge' API method.
Expand Down
33 changes: 33 additions & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4597,6 +4597,39 @@ export class WordsApi implements Encryptor {
return Promise.resolve(result);
}

/**
* Merge the section with the next one.
* @param requestObj contains request parameters
*/
public async mergeWithNext(requestObj: model.MergeWithNextRequest): Promise< http.IncomingMessage > {
if (requestObj === null || requestObj === undefined) {
throw new Error('Required parameter "request" was null or undefined when calling mergeWithNext.');
}

const requestOptions = await requestObj.createRequestOptions(this.configuration, this);

const response = await invokeApiMethod(requestOptions, this.configuration);
return Promise.resolve(response);
}

/**
* Merge the section with the next one.
* @param requestObj contains request parameters
*/
public async mergeWithNextOnline(requestObj: model.MergeWithNextOnlineRequest): Promise< model.WordsIncomingMessage< Map<string, Buffer> > > {
if (requestObj === null || requestObj === undefined) {
throw new Error('Required parameter "request" was null or undefined when calling mergeWithNextOnline.');
}

const requestOptions = await requestObj.createRequestOptions(this.configuration, this);

const response = await invokeApiMethod(requestOptions, this.configuration);
const result = new model.WordsIncomingMessage< Map<string, Buffer> >();
result.response = response;
result.body = requestObj.createResponse(response.body, response.headers);
return Promise.resolve(result);
}

/**
* Move file.
* @param requestObj contains request parameters
Expand Down
280 changes: 280 additions & 0 deletions src/model/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34667,6 +34667,286 @@ export class LoadWebDocumentRequest implements RequestInterface {
}
}

/**
* Request model for MergeWithNext operation.
* Merge the section with the next one.
*/
export class MergeWithNextRequest implements RequestInterface {

public constructor(init?: Partial< MergeWithNextRequest >) {
Object.assign(this, init);
}

/**
* The filename of the input document.
*/
public name: string;

/**
* The index of the section.
*/
public sectionIndex: number;

/**
* Original document folder.
*/
public folder: string;

/**
* Original document storage.
*/
public storage: string;

/**
* Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
*/
public loadEncoding: string;

/**
* Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
*/
public password: string;

/**
* Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
*/
public encryptedPassword: string;

/**
* Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
*/
public destFileName: string;

/**
* Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
*/
public revisionAuthor: string;

/**
* The date and time to use for revisions.
*/
public revisionDateTime: string;

/**
* create the requst options for this request
* @param configuration a configuration for the request
* @param data encryptor
*/
public async createRequestOptions(configuration: Configuration, _encryptor: Encryptor) : Promise<request.OptionsWithUri> {
let localVarPath = configuration.getApiBaseUrl() + "/words/{name}/merge/sections/{sectionIndex}"
.replace("/{" + "name" + "}", (this.name !== null && this.name !== undefined) ? "/" + String(this.name) : "")
.replace("/{" + "sectionIndex" + "}", (this.sectionIndex !== null && this.sectionIndex !== undefined) ? "/" + String(this.sectionIndex) : "")
.replace("//", "/");
var queryParameters: any = {};
var headerParams: any = {};
var formParams: any = [];
var filesContent: any = [];
// verify required parameter 'this.name' is not undefined
if (this.name === undefined) {
throw new Error('Required parameter "this.name" was undefined when calling mergeWithNext.');
}

// verify required parameter 'this.name' is not null
if (this.name === null) {
throw new Error('Required parameter "this.name" was null when calling mergeWithNext.');
}
// verify required parameter 'this.sectionIndex' is not undefined
if (this.sectionIndex === undefined) {
throw new Error('Required parameter "this.sectionIndex" was undefined when calling mergeWithNext.');
}

// verify required parameter 'this.sectionIndex' is not null
if (this.sectionIndex === null) {
throw new Error('Required parameter "this.sectionIndex" was null when calling mergeWithNext.');
}
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "folder", this.folder, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "storage", this.storage, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "loadEncoding", this.loadEncoding, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "password", this.password, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "encryptedPassword", this.encryptedPassword, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "destFileName", this.destFileName, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "revisionAuthor", this.revisionAuthor, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "revisionDateTime", this.revisionDateTime, _encryptor);

for (let fileContent of filesContent) {
await fileContent.encryptPassword(_encryptor);
if (fileContent.getSource() == FileReference.SourceEnum.Request) {
formParams.push([fileContent.getReference(), fileContent.getContent(), 'application/octet-stream']);
}
}

const requestOptions: request.Options = {
method: "PUT",
qs: queryParameters,
headers: headerParams,
uri: localVarPath,
};

if (formParams.length == 1) {
let formFirstParam = formParams[0];
requestOptions.body = formFirstParam[1];
requestOptions.headers["Content-Type"] = formFirstParam[2];
}
else if (formParams.length > 1) {
const requestParts = [];
for (let formParam of formParams) {
requestParts.push({
'Content-Type': formParam[2],
'Content-Disposition': 'form-data; name="' + formParam[0] + '"',
body: formParam[1],
});
}

requestOptions.headers["Content-Type"] = 'multipart/form-data';
requestOptions.multipart = requestParts;
}

return Promise.resolve(requestOptions);
}

/**
* create response from string
*/
createResponse(_response: Buffer, _headers: http.IncomingHttpHeaders): any {
return null;
}
}

/**
* Request model for MergeWithNextOnline operation.
* Merge the section with the next one.
*/
export class MergeWithNextOnlineRequest implements RequestInterface {

public constructor(init?: Partial< MergeWithNextOnlineRequest >) {
Object.assign(this, init);
}

/**
* The document.
*/
public document: Readable;

/**
* The index of the section.
*/
public sectionIndex: number;

/**
* Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
*/
public loadEncoding: string;

/**
* Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
*/
public password: string;

/**
* Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
*/
public encryptedPassword: string;

/**
* Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
*/
public destFileName: string;

/**
* Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
*/
public revisionAuthor: string;

/**
* The date and time to use for revisions.
*/
public revisionDateTime: string;

/**
* create the requst options for this request
* @param configuration a configuration for the request
* @param data encryptor
*/
public async createRequestOptions(configuration: Configuration, _encryptor: Encryptor) : Promise<request.OptionsWithUri> {
let localVarPath = configuration.getApiBaseUrl() + "/words/online/put/merge/sections/{sectionIndex}"
.replace("/{" + "sectionIndex" + "}", (this.sectionIndex !== null && this.sectionIndex !== undefined) ? "/" + String(this.sectionIndex) : "")
.replace("//", "/");
var queryParameters: any = {};
var headerParams: any = {};
var formParams: any = [];
var filesContent: any = [];
// verify required parameter 'this.document' is not undefined
if (this.document === undefined) {
throw new Error('Required parameter "this.document" was undefined when calling mergeWithNextOnline.');
}

// verify required parameter 'this.document' is not null
if (this.document === null) {
throw new Error('Required parameter "this.document" was null when calling mergeWithNextOnline.');
}
// verify required parameter 'this.sectionIndex' is not undefined
if (this.sectionIndex === undefined) {
throw new Error('Required parameter "this.sectionIndex" was undefined when calling mergeWithNextOnline.');
}

// verify required parameter 'this.sectionIndex' is not null
if (this.sectionIndex === null) {
throw new Error('Required parameter "this.sectionIndex" was null when calling mergeWithNextOnline.');
}
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "loadEncoding", this.loadEncoding, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "password", this.password, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "encryptedPassword", this.encryptedPassword, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "destFileName", this.destFileName, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "revisionAuthor", this.revisionAuthor, _encryptor);
localVarPath = await addQueryParameterToUrl(localVarPath, queryParameters, "revisionDateTime", this.revisionDateTime, _encryptor);
if (this.document !== undefined) {
formParams.push(['Document', this.document, 'application/octet-stream']);
}

for (let fileContent of filesContent) {
await fileContent.encryptPassword(_encryptor);
if (fileContent.getSource() == FileReference.SourceEnum.Request) {
formParams.push([fileContent.getReference(), fileContent.getContent(), 'application/octet-stream']);
}
}

const requestOptions: request.Options = {
method: "PUT",
qs: queryParameters,
headers: headerParams,
uri: localVarPath,
};

if (formParams.length == 1) {
let formFirstParam = formParams[0];
requestOptions.body = formFirstParam[1];
requestOptions.headers["Content-Type"] = formFirstParam[2];
}
else if (formParams.length > 1) {
const requestParts = [];
for (let formParam of formParams) {
requestParts.push({
'Content-Type': formParam[2],
'Content-Disposition': 'form-data; name="' + formParam[0] + '"',
body: formParam[1],
});
}

requestOptions.headers["Content-Type"] = 'multipart/form-data';
requestOptions.multipart = requestParts;
}

return Promise.resolve(requestOptions);
}

/**
* create response from string
*/
createResponse(_response: Buffer, _headers: http.IncomingHttpHeaders): any {
return parseFilesCollection(_response, _headers);
}
}

/**
* Request model for MoveFile operation.
* Move file.
Expand Down
2 changes: 1 addition & 1 deletion src/model/structuredDocumentTagBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ export abstract class StructuredDocumentTagBase extends NodeLink {
// tslint:disable-next-line:no-namespace
export namespace StructuredDocumentTagBase {
export enum AppearanceEnum {
Default = 'Default' as any,
BoundingBox = 'BoundingBox' as any,
Default = 'Default' as any,
Tags = 'Tags' as any,
Hidden = 'Hidden' as any
}
Expand Down
2 changes: 1 addition & 1 deletion src/model/tableProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,8 @@ export namespace TableProperties {
}

export enum TextWrappingEnum {
Default = 'Default' as any,
None = 'None' as any,
Default = 'Default' as any,
Around = 'Around' as any
}
}
Expand Down
Loading

0 comments on commit caebf06

Please sign in to comment.