Skip to content

Commit a53cfe4

Browse files
SDK regenerated by CI server [ci skip]
1 parent 6b033db commit a53cfe4

File tree

7 files changed

+283
-7
lines changed

7 files changed

+283
-7
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
1616
- Add & remove watermarks and protection.
1717
- Read & write access to Document Object Model.
1818

19+
## Enhancements in Version 22.7
20+
21+
- Expand 'AppendDocument' API method to support 'ImageEntryList' for directly appending images to documents and another images.
22+
23+
1924
## Enhancements in Version 22.6
2025

2126
- Added 'DeleteBookmark' and 'DeleteBookmarkOnline' API methods for delete bookmarks by name from the document.

src/model/baseEntry.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="baseEntry.ts">
4+
* Copyright (c) 2022 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
import { AttributeInfo } from '../internal/attributeInfo';
29+
30+
export const importsMapBaseEntry = {
31+
};
32+
33+
/**
34+
* Represents a entry which will be appended to the original resource document.
35+
*/
36+
export class BaseEntry {
37+
/**
38+
* Attribute type map
39+
*/
40+
public static attributeTypeMap: Array<AttributeInfo> = [
41+
{
42+
name: "href",
43+
baseName: "Href",
44+
type: "string",
45+
}
46+
];
47+
48+
/**
49+
* Returns attribute type map
50+
*/
51+
public static getAttributeTypeMap() {
52+
return BaseEntry.attributeTypeMap;
53+
}
54+
55+
/**
56+
* Gets or sets the path to entry to append at the server.
57+
*/
58+
public href: string;
59+
60+
public constructor(init?: Partial< BaseEntry >) {
61+
Object.assign(this, init);
62+
}
63+
}
64+

src/model/baseEntryList.ts

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="baseEntryList.ts">
4+
* Copyright (c) 2022 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
import { AttributeInfo } from '../internal/attributeInfo';
29+
30+
export const importsMapBaseEntryList = {
31+
};
32+
33+
/**
34+
* Represents a list of entries which will be appended to the original resource entry.
35+
*/
36+
export abstract class BaseEntryList {
37+
/**
38+
* Attribute type map
39+
*/
40+
public static attributeTypeMap: Array<AttributeInfo> = [
41+
];
42+
43+
/**
44+
* Returns attribute type map
45+
*/
46+
public static getAttributeTypeMap() {
47+
return BaseEntryList.attributeTypeMap;
48+
}
49+
50+
51+
public constructor(init?: Partial< BaseEntryList >) {
52+
Object.assign(this, init);
53+
}
54+
}
55+

src/model/documentEntryList.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,18 @@
2626
*/
2727

2828
import { AttributeInfo } from '../internal/attributeInfo';
29+
import { BaseEntryList } from './baseEntryList';
2930
import { DocumentEntry } from './documentEntry';
3031

3132
export const importsMapDocumentEntryList = {
33+
BaseEntryList,
3234
DocumentEntry,
3335
};
3436

3537
/**
3638
* Represents a list of documents which will be appended to the original resource document.
3739
*/
38-
export class DocumentEntryList {
40+
export class DocumentEntryList extends BaseEntryList {
3941
/**
4042
* Attribute type map
4143
*/
@@ -56,7 +58,7 @@ export class DocumentEntryList {
5658
* Returns attribute type map
5759
*/
5860
public static getAttributeTypeMap() {
59-
return DocumentEntryList.attributeTypeMap;
61+
return super.getAttributeTypeMap().concat(DocumentEntryList.attributeTypeMap);
6062
}
6163

6264
/**
@@ -70,6 +72,7 @@ export class DocumentEntryList {
7072
public documentEntries: Array<DocumentEntry>;
7173

7274
public constructor(init?: Partial< DocumentEntryList >) {
75+
super(init);
7376
Object.assign(this, init);
7477
}
7578
}

src/model/imageEntry.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="imageEntry.ts">
4+
* Copyright (c) 2022 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
import { AttributeInfo } from '../internal/attributeInfo';
29+
import { BaseEntry } from './baseEntry';
30+
31+
export const importsMapImageEntry = {
32+
BaseEntry,
33+
};
34+
35+
/**
36+
* Represents a image which will be appended to the original resource image or document.
37+
*/
38+
export class ImageEntry extends BaseEntry {
39+
/**
40+
* Attribute type map
41+
*/
42+
public static attributeTypeMap: Array<AttributeInfo> = [
43+
];
44+
45+
/**
46+
* Returns attribute type map
47+
*/
48+
public static getAttributeTypeMap() {
49+
return super.getAttributeTypeMap().concat(ImageEntry.attributeTypeMap);
50+
}
51+
52+
53+
public constructor(init?: Partial< ImageEntry >) {
54+
super(init);
55+
Object.assign(this, init);
56+
}
57+
}
58+

src/model/imageEntryList.ts

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="imageEntryList.ts">
4+
* Copyright (c) 2022 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
import { AttributeInfo } from '../internal/attributeInfo';
29+
import { BaseEntryList } from './baseEntryList';
30+
import { ImageEntry } from './imageEntry';
31+
32+
export const importsMapImageEntryList = {
33+
BaseEntryList,
34+
ImageEntry,
35+
};
36+
37+
/**
38+
* Represents a list of images which will be appended to the original resource document or image.
39+
*/
40+
export class ImageEntryList extends BaseEntryList {
41+
/**
42+
* Attribute type map
43+
*/
44+
public static attributeTypeMap: Array<AttributeInfo> = [
45+
{
46+
name: "appendEachImageOnNewPage",
47+
baseName: "AppendEachImageOnNewPage",
48+
type: "boolean",
49+
},
50+
{
51+
name: "imageEntries",
52+
baseName: "ImageEntries",
53+
type: "Array<ImageEntry>",
54+
}
55+
];
56+
57+
/**
58+
* Returns attribute type map
59+
*/
60+
public static getAttributeTypeMap() {
61+
return super.getAttributeTypeMap().concat(ImageEntryList.attributeTypeMap);
62+
}
63+
64+
/**
65+
* Gets or sets a value indicating whether each image should be added to a new page in the document.
66+
*/
67+
public appendEachImageOnNewPage: boolean;
68+
69+
/**
70+
* Gets or sets the list of images.
71+
*/
72+
public imageEntries: Array<ImageEntry>;
73+
74+
public constructor(init?: Partial< ImageEntryList >) {
75+
super(init);
76+
Object.assign(this, init);
77+
}
78+
}
79+

src/model/model.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ import { ObjectSerializer } from "../internal/objectSerializer";
3636
import { Encryptor } from '../api';
3737
import * as importedApiError from './apiError';
3838
import * as importedAvailableFontsResponse from './availableFontsResponse';
39+
import * as importedBaseEntry from './baseEntry';
40+
import * as importedBaseEntryList from './baseEntryList';
3941
import * as importedBmpSaveOptionsData from './bmpSaveOptionsData';
4042
import * as importedBookmark from './bookmark';
4143
import * as importedBookmarkData from './bookmarkData';
@@ -149,6 +151,8 @@ import * as importedHyperlink from './hyperlink';
149151
import * as importedHyperlinkResponse from './hyperlinkResponse';
150152
import * as importedHyperlinks from './hyperlinks';
151153
import * as importedHyperlinksResponse from './hyperlinksResponse';
154+
import * as importedImageEntry from './imageEntry';
155+
import * as importedImageEntryList from './imageEntryList';
152156
import * as importedImageSaveOptionsData from './imageSaveOptionsData';
153157
import * as importedInfoAdditionalItem from './infoAdditionalItem';
154158
import * as importedInfoResponse from './infoResponse';
@@ -303,6 +307,8 @@ import * as importedXpsSaveOptionsData from './xpsSaveOptionsData';
303307
export { AttributeInfo } from '../internal/attributeInfo';
304308
export * from './apiError';
305309
export * from './availableFontsResponse';
310+
export * from './baseEntry';
311+
export * from './baseEntryList';
306312
export * from './bmpSaveOptionsData';
307313
export * from './bookmark';
308314
export * from './bookmarkData';
@@ -416,6 +422,8 @@ export * from './hyperlink';
416422
export * from './hyperlinkResponse';
417423
export * from './hyperlinks';
418424
export * from './hyperlinksResponse';
425+
export * from './imageEntry';
426+
export * from './imageEntryList';
419427
export * from './imageSaveOptionsData';
420428
export * from './infoAdditionalItem';
421429
export * from './infoResponse';
@@ -692,6 +700,8 @@ const enumsMap = {
692700
const typeMap = {
693701
ApiError: importedApiError.ApiError,
694702
AvailableFontsResponse: importedAvailableFontsResponse.AvailableFontsResponse,
703+
BaseEntry: importedBaseEntry.BaseEntry,
704+
BaseEntryList: importedBaseEntryList.BaseEntryList,
695705
BmpSaveOptionsData: importedBmpSaveOptionsData.BmpSaveOptionsData,
696706
Bookmark: importedBookmark.Bookmark,
697707
BookmarkData: importedBookmarkData.BookmarkData,
@@ -805,6 +815,8 @@ const typeMap = {
805815
HyperlinkResponse: importedHyperlinkResponse.HyperlinkResponse,
806816
Hyperlinks: importedHyperlinks.Hyperlinks,
807817
HyperlinksResponse: importedHyperlinksResponse.HyperlinksResponse,
818+
ImageEntry: importedImageEntry.ImageEntry,
819+
ImageEntryList: importedImageEntryList.ImageEntryList,
808820
ImageSaveOptionsData: importedImageSaveOptionsData.ImageSaveOptionsData,
809821
InfoAdditionalItem: importedInfoAdditionalItem.InfoAdditionalItem,
810822
InfoResponse: importedInfoResponse.InfoResponse,
@@ -1184,9 +1196,9 @@ export class AppendDocumentRequest implements RequestInterface {
11841196
public name: string;
11851197

11861198
/**
1187-
* <see cref="DocumentEntryList"/> with a list of documents to append.
1199+
* <see cref="BaseEntryList"/> with a list of entries to append.
11881200
*/
1189-
public documentList: importedDocumentEntryList.DocumentEntryList;
1201+
public documentList: importedBaseEntryList.BaseEntryList;
11901202

11911203
/**
11921204
* Original document folder.
@@ -1272,7 +1284,7 @@ export class AppendDocumentRequest implements RequestInterface {
12721284
qs: queryParameters,
12731285
uri: localVarPath,
12741286
json: true,
1275-
body: ObjectSerializer.serialize(this.documentList, this.documentList.constructor.name === "Object" ? "importedDocumentEntryList.DocumentEntryList" : this.documentList.constructor.name),
1287+
body: ObjectSerializer.serialize(this.documentList, this.documentList.constructor.name === "Object" ? "importedBaseEntryList.BaseEntryList" : this.documentList.constructor.name),
12761288
};
12771289

12781290

@@ -1303,9 +1315,9 @@ export class AppendDocumentOnlineRequest implements RequestInterface {
13031315
public document: Readable;
13041316

13051317
/**
1306-
* <see cref="DocumentEntryList"/> with a list of documents to append.
1318+
* <see cref="BaseEntryList"/> with a list of entries to append.
13071319
*/
1308-
public documentList: importedDocumentEntryList.DocumentEntryList;
1320+
public documentList: importedBaseEntryList.BaseEntryList;
13091321

13101322
/**
13111323
* Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.

0 commit comments

Comments
 (0)