asposeslidescloud 23.7.0 → 23.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/api.d.ts +25 -2
- package/api.js +88 -6
- package/internal/requestHelper.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,10 @@ You may want to check out Aspose free [Powerpoint to PDF](https://products.aspos
|
|
|
27
27
|
**Web:** HTML/HTML5
|
|
28
28
|
**Other:** MPEG4, SWF (export whole presentations)
|
|
29
29
|
|
|
30
|
+
## Enhancements in Version 23.9
|
|
31
|
+
|
|
32
|
+
* Added **ReplaceImage** and **ReplaceImageOnline** methods that enable replacing images in a presentation.
|
|
33
|
+
|
|
30
34
|
## Enhancements in Version 23.7
|
|
31
35
|
|
|
32
36
|
* New methods **ReplaceTextFormatting** and **ReplaceTextFormatting** allow to replace text with formatting.
|
package/api.d.ts
CHANGED
|
@@ -544,7 +544,7 @@ export declare class SlidesApi {
|
|
|
544
544
|
* @param storage Document storage.
|
|
545
545
|
* @param subShape Sub-shape path (e.g. \"3\", \"3/shapes/2).
|
|
546
546
|
*/
|
|
547
|
-
createSpecialSlideShape(name: string, slideIndex: number, slideType: model.SpecialSlideType, dto
|
|
547
|
+
createSpecialSlideShape(name: string, slideIndex: number, slideType: model.SpecialSlideType, dto: model.ShapeBase, shapeToClone?: number, position?: number, password?: string, folder?: string, storage?: string, subShape?: string): Promise<{
|
|
548
548
|
response: http.ServerResponse;
|
|
549
549
|
body: model.ShapeBase;
|
|
550
550
|
}>;
|
|
@@ -942,7 +942,7 @@ export declare class SlidesApi {
|
|
|
942
942
|
* @param document Document data.
|
|
943
943
|
* @param password Presentation password.
|
|
944
944
|
*/
|
|
945
|
-
deleteProtectionOnline(document: Readable, password
|
|
945
|
+
deleteProtectionOnline(document: Readable, password?: string): Promise<{
|
|
946
946
|
response: http.ServerResponse;
|
|
947
947
|
body: Buffer;
|
|
948
948
|
}>;
|
|
@@ -2659,6 +2659,29 @@ export declare class SlidesApi {
|
|
|
2659
2659
|
response: http.ServerResponse;
|
|
2660
2660
|
body: Buffer;
|
|
2661
2661
|
}>;
|
|
2662
|
+
/**
|
|
2663
|
+
* Replaces image by the specified index.
|
|
2664
|
+
* @param name Document name.
|
|
2665
|
+
* @param imageIndex Image index.
|
|
2666
|
+
* @param image Image data.
|
|
2667
|
+
* @param password Document password.
|
|
2668
|
+
* @param folder Document folder.
|
|
2669
|
+
* @param storage Document storage.
|
|
2670
|
+
*/
|
|
2671
|
+
replaceImage(name: string, imageIndex: number, image?: Readable, password?: string, folder?: string, storage?: string): Promise<{
|
|
2672
|
+
response: http.ServerResponse;
|
|
2673
|
+
}>;
|
|
2674
|
+
/**
|
|
2675
|
+
* Replaces image by the specified index and returns updated document.
|
|
2676
|
+
* @param document Document data.
|
|
2677
|
+
* @param imageIndex Image index.
|
|
2678
|
+
* @param image Image data.
|
|
2679
|
+
* @param password Password.
|
|
2680
|
+
*/
|
|
2681
|
+
replaceImageOnline(document: Readable, imageIndex: number, image?: Readable, password?: string): Promise<{
|
|
2682
|
+
response: http.ServerResponse;
|
|
2683
|
+
body: Buffer;
|
|
2684
|
+
}>;
|
|
2662
2685
|
/**
|
|
2663
2686
|
* Replace text with a new value.
|
|
2664
2687
|
* @param name Document name.
|
package/api.js
CHANGED
|
@@ -1756,7 +1756,7 @@ class SlidesApi {
|
|
|
1756
1756
|
* @param storage Document storage.
|
|
1757
1757
|
* @param subShape Sub-shape path (e.g. \"3\", \"3/shapes/2).
|
|
1758
1758
|
*/
|
|
1759
|
-
createSpecialSlideShape(name, slideIndex, slideType, dto
|
|
1759
|
+
createSpecialSlideShape(name, slideIndex, slideType, dto, shapeToClone = null, position = null, password = null, folder = null, storage = null, subShape = null) {
|
|
1760
1760
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1761
1761
|
// verify required parameter 'name' is not null or undefined
|
|
1762
1762
|
if (name === null || name === undefined) {
|
|
@@ -1774,6 +1774,10 @@ class SlidesApi {
|
|
|
1774
1774
|
if (!Object.keys(model.SpecialSlideType).filter(i => model.SpecialSlideType[i].toLowerCase() == slideType.toString().toLowerCase()).length) {
|
|
1775
1775
|
throw new Error('Invalid value for slideType: ' + slideType + '. Must be one of the following: ' + Object.keys(model.SpecialSlideType).map(key => model.SpecialSlideType[key]).join());
|
|
1776
1776
|
}
|
|
1777
|
+
// verify required parameter 'dto' is not null or undefined
|
|
1778
|
+
if (dto === null || dto === undefined) {
|
|
1779
|
+
throw new Error('The required parameter "dto" was null or undefined when calling createSpecialSlideShape.');
|
|
1780
|
+
}
|
|
1777
1781
|
let localVarPath = this.configuration.getApiBaseUrl() + "/slides/{name}/slides/{slideIndex}/{slideType}/shapes";
|
|
1778
1782
|
localVarPath = (0, requestHelper_1.addPathParameterToUrl)(localVarPath, "name", objectSerializer_1.ObjectSerializer.toString(name));
|
|
1779
1783
|
localVarPath = (0, requestHelper_1.addPathParameterToUrl)(localVarPath, "slideIndex", objectSerializer_1.ObjectSerializer.toString(slideIndex));
|
|
@@ -3037,16 +3041,12 @@ class SlidesApi {
|
|
|
3037
3041
|
* @param document Document data.
|
|
3038
3042
|
* @param password Presentation password.
|
|
3039
3043
|
*/
|
|
3040
|
-
deleteProtectionOnline(document, password) {
|
|
3044
|
+
deleteProtectionOnline(document, password = null) {
|
|
3041
3045
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3042
3046
|
// verify required parameter 'document' is not null or undefined
|
|
3043
3047
|
if (document === null || document === undefined) {
|
|
3044
3048
|
throw new Error('The required parameter "document" was null or undefined when calling deleteProtectionOnline.');
|
|
3045
3049
|
}
|
|
3046
|
-
// verify required parameter 'password' is not null or undefined
|
|
3047
|
-
if (password === null || password === undefined) {
|
|
3048
|
-
throw new Error('The required parameter "password" was null or undefined when calling deleteProtectionOnline.');
|
|
3049
|
-
}
|
|
3050
3050
|
let localVarPath = this.configuration.getApiBaseUrl() + "/slides/protection/delete";
|
|
3051
3051
|
const queryParameters = {};
|
|
3052
3052
|
const requestOptions = {
|
|
@@ -8632,6 +8632,88 @@ class SlidesApi {
|
|
|
8632
8632
|
return Promise.resolve({ body: result, response });
|
|
8633
8633
|
});
|
|
8634
8634
|
}
|
|
8635
|
+
/**
|
|
8636
|
+
* Replaces image by the specified index.
|
|
8637
|
+
* @param name Document name.
|
|
8638
|
+
* @param imageIndex Image index.
|
|
8639
|
+
* @param image Image data.
|
|
8640
|
+
* @param password Document password.
|
|
8641
|
+
* @param folder Document folder.
|
|
8642
|
+
* @param storage Document storage.
|
|
8643
|
+
*/
|
|
8644
|
+
replaceImage(name, imageIndex, image = null, password = null, folder = null, storage = null) {
|
|
8645
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
8646
|
+
// verify required parameter 'name' is not null or undefined
|
|
8647
|
+
if (name === null || name === undefined) {
|
|
8648
|
+
throw new Error('The required parameter "name" was null or undefined when calling replaceImage.');
|
|
8649
|
+
}
|
|
8650
|
+
// verify required parameter 'imageIndex' is not null or undefined
|
|
8651
|
+
if (imageIndex === null || imageIndex === undefined) {
|
|
8652
|
+
throw new Error('The required parameter "imageIndex" was null or undefined when calling replaceImage.');
|
|
8653
|
+
}
|
|
8654
|
+
let localVarPath = this.configuration.getApiBaseUrl() + "/slides/{name}/images/{imageIndex}/replace";
|
|
8655
|
+
localVarPath = (0, requestHelper_1.addPathParameterToUrl)(localVarPath, "name", objectSerializer_1.ObjectSerializer.toString(name));
|
|
8656
|
+
localVarPath = (0, requestHelper_1.addPathParameterToUrl)(localVarPath, "imageIndex", objectSerializer_1.ObjectSerializer.toString(imageIndex));
|
|
8657
|
+
const queryParameters = {};
|
|
8658
|
+
localVarPath = (0, requestHelper_1.addQueryParameterToUrl)(localVarPath, queryParameters, "folder", folder);
|
|
8659
|
+
localVarPath = (0, requestHelper_1.addQueryParameterToUrl)(localVarPath, queryParameters, "storage", storage);
|
|
8660
|
+
const requestOptions = {
|
|
8661
|
+
method: "PUT",
|
|
8662
|
+
headers: {},
|
|
8663
|
+
url: localVarPath,
|
|
8664
|
+
params: queryParameters
|
|
8665
|
+
};
|
|
8666
|
+
(0, requestHelper_1.addHeaderParameter)(requestOptions.headers, "password", password);
|
|
8667
|
+
let localVarFiles = [];
|
|
8668
|
+
if (image != null) {
|
|
8669
|
+
localVarFiles.push(image);
|
|
8670
|
+
}
|
|
8671
|
+
(0, requestHelper_1.checkMultipartContent)(requestOptions, localVarFiles);
|
|
8672
|
+
const response = yield (0, requestHelper_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
8673
|
+
return Promise.resolve({ response });
|
|
8674
|
+
});
|
|
8675
|
+
}
|
|
8676
|
+
/**
|
|
8677
|
+
* Replaces image by the specified index and returns updated document.
|
|
8678
|
+
* @param document Document data.
|
|
8679
|
+
* @param imageIndex Image index.
|
|
8680
|
+
* @param image Image data.
|
|
8681
|
+
* @param password Password.
|
|
8682
|
+
*/
|
|
8683
|
+
replaceImageOnline(document, imageIndex, image = null, password = null) {
|
|
8684
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
8685
|
+
// verify required parameter 'document' is not null or undefined
|
|
8686
|
+
if (document === null || document === undefined) {
|
|
8687
|
+
throw new Error('The required parameter "document" was null or undefined when calling replaceImageOnline.');
|
|
8688
|
+
}
|
|
8689
|
+
// verify required parameter 'imageIndex' is not null or undefined
|
|
8690
|
+
if (imageIndex === null || imageIndex === undefined) {
|
|
8691
|
+
throw new Error('The required parameter "imageIndex" was null or undefined when calling replaceImageOnline.');
|
|
8692
|
+
}
|
|
8693
|
+
let localVarPath = this.configuration.getApiBaseUrl() + "/slides/images/{imageIndex}/replace";
|
|
8694
|
+
localVarPath = (0, requestHelper_1.addPathParameterToUrl)(localVarPath, "imageIndex", objectSerializer_1.ObjectSerializer.toString(imageIndex));
|
|
8695
|
+
const queryParameters = {};
|
|
8696
|
+
const requestOptions = {
|
|
8697
|
+
method: "POST",
|
|
8698
|
+
headers: {},
|
|
8699
|
+
url: localVarPath,
|
|
8700
|
+
responseType: 'arraybuffer',
|
|
8701
|
+
params: queryParameters
|
|
8702
|
+
};
|
|
8703
|
+
(0, requestHelper_1.addHeaderParameter)(requestOptions.headers, "password", password);
|
|
8704
|
+
let localVarFiles = [];
|
|
8705
|
+
if (document != null) {
|
|
8706
|
+
localVarFiles.push(document);
|
|
8707
|
+
}
|
|
8708
|
+
if (image != null) {
|
|
8709
|
+
localVarFiles.push(image);
|
|
8710
|
+
}
|
|
8711
|
+
(0, requestHelper_1.checkMultipartContent)(requestOptions, localVarFiles);
|
|
8712
|
+
const response = yield (0, requestHelper_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
8713
|
+
const result = objectSerializer_1.ObjectSerializer.deserialize(response.body, "Buffer");
|
|
8714
|
+
return Promise.resolve({ body: result, response });
|
|
8715
|
+
});
|
|
8716
|
+
}
|
|
8635
8717
|
/**
|
|
8636
8718
|
* Replace text with a new value.
|
|
8637
8719
|
* @param name Document name.
|
|
@@ -157,7 +157,7 @@ function invokeApiMethodInternal(requestOptions, configuration, notApplyAuthToRe
|
|
|
157
157
|
if (!requestOptions.headers) {
|
|
158
158
|
requestOptions.headers = {};
|
|
159
159
|
}
|
|
160
|
-
requestOptions.headers["x-aspose-client"] = "nodejs sdk v23.
|
|
160
|
+
requestOptions.headers["x-aspose-client"] = "nodejs sdk v23.9.0";
|
|
161
161
|
if (configuration.timeout) {
|
|
162
162
|
requestOptions.headers["x-aspose-timeout"] = configuration.timeout;
|
|
163
163
|
}
|