@@ -36609,6 +36609,102 @@ export class LoadWebDocumentRequest implements RequestInterface {
3660936609 }
3661036610}
3661136611
36612+ /**
36613+ * Request model for LoadWebDocumentOnline operation.
36614+ * Downloads a document from the Web using URL and saves it to cloud storage in the specified format.
36615+ */
36616+ export class LoadWebDocumentOnlineRequest implements RequestInterface {
36617+
36618+ public constructor(init?: Partial< LoadWebDocumentOnlineRequest >) {
36619+ Object.assign(this, init);
36620+ }
36621+
36622+ /**
36623+ * The properties of data downloading.
36624+ */
36625+ public data: importedLoadWebDocumentData.LoadWebDocumentData;
36626+
36627+ /**
36628+ * create the requst options for this request
36629+ * @param configuration a configuration for the request
36630+ * @param data encryptor
36631+ */
36632+ public async createRequestOptions(configuration: Configuration, _encryptor: Encryptor) : Promise<request.OptionsWithUri> {
36633+ const localVarPath = configuration.getApiBaseUrl() + "/words/online/put/loadWebDocument"
36634+ .replace("//", "/");
36635+ var queryParameters: any = {};
36636+ var headerParams: any = {};
36637+ var formParams: any = [];
36638+ var filesContent: any = [];
36639+ // verify required parameter 'this.data' is not undefined
36640+ if (this.data === undefined) {
36641+ throw new Error('Required parameter "this.data" was undefined when calling loadWebDocumentOnline.');
36642+ }
36643+
36644+ // verify required parameter 'this.data' is not null
36645+ if (this.data === null) {
36646+ throw new Error('Required parameter "this.data" was null when calling loadWebDocumentOnline.');
36647+ }
36648+ this.data?.validate();
36649+
36650+ if (this.data !== undefined) {
36651+ let _obj = ObjectSerializer.serialize(this.data, this.data.constructor.name === "Object" ? "importedLoadWebDocumentData.LoadWebDocumentData" : this.data.constructor.name);
36652+ formParams.push(['Data', JSON.stringify(_obj), 'application/json']);
36653+ }
36654+
36655+ for (let fileContent of filesContent) {
36656+ await fileContent.encryptPassword(_encryptor);
36657+ if (fileContent.getSource() == FileReference.SourceEnum.Request) {
36658+ formParams.push([fileContent.getReference(), fileContent.getContent(), 'application/octet-stream']);
36659+ }
36660+ }
36661+
36662+ const requestOptions: request.Options = {
36663+ method: "PUT",
36664+ qs: queryParameters,
36665+ headers: headerParams,
36666+ uri: localVarPath,
36667+ };
36668+
36669+ if (formParams.length == 1) {
36670+ let formFirstParam = formParams[0];
36671+ requestOptions.body = formFirstParam[1];
36672+ requestOptions.headers["Content-Type"] = formFirstParam[2];
36673+ }
36674+ else if (formParams.length > 1) {
36675+ const requestParts = [];
36676+ for (let formParam of formParams) {
36677+ requestParts.push({
36678+ 'Content-Type': formParam[2],
36679+ 'Content-Disposition': 'form-data; name="' + formParam[0] + '"',
36680+ body: formParam[1],
36681+ });
36682+ }
36683+
36684+ requestOptions.headers["Content-Type"] = 'multipart/form-data';
36685+ requestOptions.multipart = requestParts;
36686+ }
36687+
36688+ return Promise.resolve(requestOptions);
36689+ }
36690+
36691+ /**
36692+ * create response from string
36693+ */
36694+ createResponse(_response: Buffer, _headers: http.IncomingHttpHeaders): any {
36695+ const result = new LoadWebDocumentOnlineResponse();
36696+ const boundary = getBoundary(_headers);
36697+ const parts = parseMultipart(_response, boundary);
36698+ result.model = ObjectSerializer.deserialize(JSON.parse(findMultipartElement(parts, "Model").body.toString()), "SaveResponse");
36699+
36700+
36701+ const partDocument = findMultipartElement(parts, "Document");
36702+ result.document = parseFilesCollection(partDocument.body, partDocument.headers);
36703+
36704+ return result;
36705+ }
36706+ }
36707+
3661236708/**
3661336709 * Request model for MergeWithNext operation.
3661436710 * Merge the section with the next one.
@@ -51314,6 +51410,22 @@ export class InsertWatermarkTextOnlineResponse {
5131451410 public document: Map<string, Buffer>;
5131551411}
5131651412
51413+ /**
51414+ * Response model for LoadWebDocumentOnline operation.
51415+ * Downloads a document from the Web using URL and saves it to cloud storage in the specified format.
51416+ */
51417+ export class LoadWebDocumentOnlineResponse {
51418+ /**
51419+ * The REST response with a save result.
51420+ */
51421+ public model: importedSaveResponse.SaveResponse;
51422+
51423+ /**
51424+ * The document after modification.
51425+ */
51426+ public document: Map<string, Buffer>;
51427+ }
51428+
5131751429/**
5131851430 * Response model for ProtectDocumentOnline operation.
5131951431 * Changes the document protection. The previous protection will be overwritten if it exist.
0 commit comments