asposeslidescloud 22.2.0 → 22.6.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.
@@ -1,44 +1,44 @@
1
- /**
2
- * Slides API configuration
3
- */
4
- export declare class Configuration {
5
- /**
6
- * Client ID.
7
- */
8
- appSid: string;
9
- /**
10
- * Client Secret.
11
- */
12
- appKey: string;
13
- /**
14
- * access token.
15
- */
16
- accessToken: string;
17
- /**
18
- * Base Url.
19
- */
20
- baseUrl: string;
21
- /**
22
- * Base Url.
23
- */
24
- authBaseUrl: string;
25
- /**
26
- * Gets or sets slides operation timeout in seconds. 0 stands for no timeout. The timeout applies to the Slides operation, not to the HTTP request.
27
- */
28
- timeout: number;
29
- /**
30
- * Gets or sets a value indicating whether debug mode. In debug mode all requests and responses are logged to console.
31
- */
32
- debugMode: boolean;
33
- /**
34
- * Gets or sets collection of custom headers to be added to HTTP requests.
35
- */
36
- customHeaders: {
37
- [key: string]: string;
38
- };
39
- constructor(appSid: string, appKey: string, baseUrl?: string, authBaseUrl?: string, debugMode?: boolean, timeout?: number);
40
- /**
41
- * Returns api base url
42
- */
43
- getApiBaseUrl(): string;
44
- }
1
+ /**
2
+ * Slides API configuration
3
+ */
4
+ export declare class Configuration {
5
+ /**
6
+ * Client ID.
7
+ */
8
+ appSid: string;
9
+ /**
10
+ * Client Secret.
11
+ */
12
+ appKey: string;
13
+ /**
14
+ * access token.
15
+ */
16
+ accessToken: string;
17
+ /**
18
+ * Base Url.
19
+ */
20
+ baseUrl: string;
21
+ /**
22
+ * Base Url.
23
+ */
24
+ authBaseUrl: string;
25
+ /**
26
+ * Gets or sets slides operation timeout in seconds. 0 stands for no timeout. The timeout applies to the Slides operation, not to the HTTP request.
27
+ */
28
+ timeout: number;
29
+ /**
30
+ * Gets or sets a value indicating whether debug mode. In debug mode all requests and responses are logged to console.
31
+ */
32
+ debugMode: boolean;
33
+ /**
34
+ * Gets or sets collection of custom headers to be added to HTTP requests.
35
+ */
36
+ customHeaders: {
37
+ [key: string]: string;
38
+ };
39
+ constructor(appSid: string, appKey: string, baseUrl?: string, authBaseUrl?: string, debugMode?: boolean, timeout?: number);
40
+ /**
41
+ * Returns api base url
42
+ */
43
+ getApiBaseUrl(): string;
44
+ }
@@ -1,60 +1,61 @@
1
- "use strict";
2
- /*
3
- * MIT License
4
-
5
- * Copyright (c) 2017 Aspose Pty Ltd
6
-
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
- */
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- const defaultBasePath = "https://api.aspose.cloud";
27
- /**
28
- * Slides API configuration
29
- */
30
- class Configuration {
31
- constructor(appSid, appKey, baseUrl, authBaseUrl, debugMode, timeout) {
32
- /**
33
- * Base Url.
34
- */
35
- this.baseUrl = defaultBasePath;
36
- /**
37
- * Base Url.
38
- */
39
- this.authBaseUrl = defaultBasePath;
40
- if (baseUrl) {
41
- this.baseUrl = baseUrl;
42
- this.authBaseUrl = baseUrl;
43
- }
44
- if (authBaseUrl) {
45
- this.authBaseUrl = authBaseUrl;
46
- }
47
- this.appSid = appSid;
48
- this.appKey = appKey;
49
- this.debugMode = debugMode;
50
- this.timeout = timeout;
51
- this.customHeaders = {};
52
- }
53
- /**
54
- * Returns api base url
55
- */
56
- getApiBaseUrl() {
57
- return this.baseUrl + "/v3.0";
58
- }
59
- }
60
- exports.Configuration = Configuration;
1
+ "use strict";
2
+ /*
3
+ * MIT License
4
+
5
+ * Copyright (c) 2017 Aspose Pty Ltd
6
+
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
+ */
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.Configuration = void 0;
27
+ const defaultBasePath = "https://api.aspose.cloud";
28
+ /**
29
+ * Slides API configuration
30
+ */
31
+ class Configuration {
32
+ constructor(appSid, appKey, baseUrl, authBaseUrl, debugMode, timeout) {
33
+ /**
34
+ * Base Url.
35
+ */
36
+ this.baseUrl = defaultBasePath;
37
+ /**
38
+ * Base Url.
39
+ */
40
+ this.authBaseUrl = defaultBasePath;
41
+ if (baseUrl) {
42
+ this.baseUrl = baseUrl;
43
+ this.authBaseUrl = baseUrl;
44
+ }
45
+ if (authBaseUrl) {
46
+ this.authBaseUrl = authBaseUrl;
47
+ }
48
+ this.appSid = appSid;
49
+ this.appKey = appKey;
50
+ this.debugMode = debugMode;
51
+ this.timeout = timeout;
52
+ this.customHeaders = {};
53
+ }
54
+ /**
55
+ * Returns api base url
56
+ */
57
+ getApiBaseUrl() {
58
+ return this.baseUrl + "/v3.0";
59
+ }
60
+ }
61
+ exports.Configuration = Configuration;
@@ -1,18 +1,18 @@
1
- /**
2
- * Serialisation helper.
3
- */
4
- export declare class ObjectSerializer {
5
- /**
6
- * Serilize object to json string.
7
- */
8
- static serialize(data: any, type: string): any;
9
- /**
10
- * Deserialize object from json string
11
- */
12
- static deserialize(data: any, type: string): any;
13
- /**
14
- * cast object to string
15
- */
16
- static toString(data: any): string;
17
- private static findCorrectType;
18
- }
1
+ /**
2
+ * Serialisation helper.
3
+ */
4
+ export declare class ObjectSerializer {
5
+ /**
6
+ * Serilize object to json string.
7
+ */
8
+ static serialize(data: any, type: string): any;
9
+ /**
10
+ * Deserialize object from json string
11
+ */
12
+ static deserialize(data: any, type: string): any;
13
+ /**
14
+ * cast object to string
15
+ */
16
+ static toString(data: any): string;
17
+ private static findCorrectType;
18
+ }
@@ -1,184 +1,185 @@
1
- "use strict";
2
- /*
3
- * MIT License
4
-
5
- * Copyright (c) 2017 Aspose Pty Ltd
6
-
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
- */
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- //import { enumsMap, typeMap } from "../model/model";
27
- const enumsMap = {};
28
- const typeMap = {};
29
- const primitives = [
30
- "string",
31
- "boolean",
32
- "double",
33
- "integer",
34
- "long",
35
- "float",
36
- "number",
37
- "any",
38
- ];
39
- /**
40
- * Serialisation helper.
41
- */
42
- class ObjectSerializer {
43
- /**
44
- * Serilize object to json string.
45
- */
46
- static serialize(data, type) {
47
- if (data === undefined) {
48
- return data;
49
- }
50
- else if (primitives.indexOf(type.toLowerCase()) !== -1) {
51
- return data;
52
- }
53
- else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
54
- let subType = type.replace("Array<", ""); // Array<Type> => Type>
55
- subType = subType.substring(0, subType.length - 1); // Type> => Type
56
- const transformedData = [];
57
- for (const index in data) {
58
- if (data.hasOwnProperty(index)) {
59
- const date = data[index];
60
- transformedData.push(ObjectSerializer.serialize(date, subType));
61
- }
62
- }
63
- return transformedData;
64
- }
65
- else if (type === "Date") {
66
- return data.toString();
67
- }
68
- else {
69
- if (enumsMap[type]) {
70
- return data;
71
- }
72
- if (!typeMap[type]) { // in case we dont know the type
73
- return data;
74
- }
75
- // get the map for the correct type.
76
- const attributeTypes = typeMap[type].getAttributeTypeMap();
77
- const instance = {};
78
- for (const index in attributeTypes) {
79
- if (attributeTypes.hasOwnProperty(index)) {
80
- const attributeType = attributeTypes[index];
81
- instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);
82
- }
83
- }
84
- return instance;
85
- }
86
- }
87
- /**
88
- * Deserialize object from json string
89
- */
90
- static deserialize(data, type) {
91
- // polymorphism may change the actual type.
92
- type = ObjectSerializer.findCorrectType(data, type);
93
- if (data === undefined || data === null) {
94
- return data;
95
- }
96
- else if (primitives.indexOf(type.toLowerCase()) !== -1) {
97
- return data;
98
- }
99
- else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
100
- let subType = type.replace("Array<", ""); // Array<Type> => Type>
101
- subType = subType.substring(0, subType.length - 1); // Type> => Type
102
- const transformedData = [];
103
- for (const index in data) {
104
- if (data.hasOwnProperty(index)) {
105
- const date = data[index];
106
- transformedData.push(ObjectSerializer.deserialize(date, subType));
107
- }
108
- }
109
- return transformedData;
110
- }
111
- else if (type === "Date") {
112
- return new Date(data);
113
- }
114
- else {
115
- if (enumsMap[type]) { // is Enum
116
- return data;
117
- }
118
- if (!typeMap[type]) { // dont know the type
119
- if (type == "Buffer") {
120
- return data;
121
- }
122
- if (typeof data == "string") {
123
- return JSON.parse(data);
124
- }
125
- if (Buffer.isBuffer(data)) {
126
- return JSON.parse(data.toString());
127
- }
128
- return data;
129
- }
130
- const instance = new typeMap[type]();
131
- const attributeTypes = typeMap[type].getAttributeTypeMap();
132
- for (const index in attributeTypes) {
133
- if (attributeTypes.hasOwnProperty(index)) {
134
- const attributeType = attributeTypes[index];
135
- if (data.hasOwnProperty(attributeType.baseName)) {
136
- instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);
137
- }
138
- }
139
- }
140
- return instance;
141
- }
142
- }
143
- /**
144
- * cast object to string
145
- */
146
- static toString(data) {
147
- if (data === undefined)
148
- return "";
149
- return String(data);
150
- }
151
- static findCorrectType(data, expectedType) {
152
- if (data === undefined) {
153
- return expectedType;
154
- }
155
- else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
156
- return expectedType;
157
- }
158
- else if (expectedType === "Date") {
159
- return expectedType;
160
- }
161
- else {
162
- if (enumsMap[expectedType]) {
163
- return expectedType;
164
- }
165
- if (!typeMap[expectedType]) {
166
- return expectedType; // w/e we don't know the type
167
- }
168
- // Check the discriminator
169
- const discriminatorProperty = typeMap[expectedType].discriminator;
170
- if (discriminatorProperty == null) {
171
- return expectedType; // the type does not have a discriminator. use it.
172
- }
173
- else {
174
- if (data[discriminatorProperty]) {
175
- return data[discriminatorProperty]; // use the type given in the discriminator
176
- }
177
- else {
178
- return expectedType; // discriminator was not present (or an empty string)
179
- }
180
- }
181
- }
182
- }
183
- }
184
- exports.ObjectSerializer = ObjectSerializer;
1
+ "use strict";
2
+ /*
3
+ * MIT License
4
+
5
+ * Copyright (c) 2017 Aspose Pty Ltd
6
+
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
+ */
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.ObjectSerializer = void 0;
27
+ //import { enumsMap, typeMap } from "../model/model";
28
+ const enumsMap = {};
29
+ const typeMap = {};
30
+ const primitives = [
31
+ "string",
32
+ "boolean",
33
+ "double",
34
+ "integer",
35
+ "long",
36
+ "float",
37
+ "number",
38
+ "any",
39
+ ];
40
+ /**
41
+ * Serialisation helper.
42
+ */
43
+ class ObjectSerializer {
44
+ /**
45
+ * Serilize object to json string.
46
+ */
47
+ static serialize(data, type) {
48
+ if (data === undefined) {
49
+ return data;
50
+ }
51
+ else if (primitives.indexOf(type.toLowerCase()) !== -1) {
52
+ return data;
53
+ }
54
+ else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
55
+ let subType = type.replace("Array<", ""); // Array<Type> => Type>
56
+ subType = subType.substring(0, subType.length - 1); // Type> => Type
57
+ const transformedData = [];
58
+ for (const index in data) {
59
+ if (data.hasOwnProperty(index)) {
60
+ const date = data[index];
61
+ transformedData.push(ObjectSerializer.serialize(date, subType));
62
+ }
63
+ }
64
+ return transformedData;
65
+ }
66
+ else if (type === "Date") {
67
+ return data.toString();
68
+ }
69
+ else {
70
+ if (enumsMap[type]) {
71
+ return data;
72
+ }
73
+ if (!typeMap[type]) { // in case we dont know the type
74
+ return data;
75
+ }
76
+ // get the map for the correct type.
77
+ const attributeTypes = typeMap[type].getAttributeTypeMap();
78
+ const instance = {};
79
+ for (const index in attributeTypes) {
80
+ if (attributeTypes.hasOwnProperty(index)) {
81
+ const attributeType = attributeTypes[index];
82
+ instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);
83
+ }
84
+ }
85
+ return instance;
86
+ }
87
+ }
88
+ /**
89
+ * Deserialize object from json string
90
+ */
91
+ static deserialize(data, type) {
92
+ // polymorphism may change the actual type.
93
+ type = ObjectSerializer.findCorrectType(data, type);
94
+ if (data === undefined || data === null) {
95
+ return data;
96
+ }
97
+ else if (primitives.indexOf(type.toLowerCase()) !== -1) {
98
+ return data;
99
+ }
100
+ else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
101
+ let subType = type.replace("Array<", ""); // Array<Type> => Type>
102
+ subType = subType.substring(0, subType.length - 1); // Type> => Type
103
+ const transformedData = [];
104
+ for (const index in data) {
105
+ if (data.hasOwnProperty(index)) {
106
+ const date = data[index];
107
+ transformedData.push(ObjectSerializer.deserialize(date, subType));
108
+ }
109
+ }
110
+ return transformedData;
111
+ }
112
+ else if (type === "Date") {
113
+ return new Date(data);
114
+ }
115
+ else {
116
+ if (enumsMap[type]) { // is Enum
117
+ return data;
118
+ }
119
+ if (!typeMap[type]) { // dont know the type
120
+ if (type == "Buffer") {
121
+ return data;
122
+ }
123
+ if (typeof data == "string") {
124
+ return JSON.parse(data);
125
+ }
126
+ if (Buffer.isBuffer(data)) {
127
+ return JSON.parse(data.toString());
128
+ }
129
+ return data;
130
+ }
131
+ const instance = new typeMap[type]();
132
+ const attributeTypes = typeMap[type].getAttributeTypeMap();
133
+ for (const index in attributeTypes) {
134
+ if (attributeTypes.hasOwnProperty(index)) {
135
+ const attributeType = attributeTypes[index];
136
+ if (data.hasOwnProperty(attributeType.baseName)) {
137
+ instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);
138
+ }
139
+ }
140
+ }
141
+ return instance;
142
+ }
143
+ }
144
+ /**
145
+ * cast object to string
146
+ */
147
+ static toString(data) {
148
+ if (data === undefined)
149
+ return "";
150
+ return String(data);
151
+ }
152
+ static findCorrectType(data, expectedType) {
153
+ if (data === undefined) {
154
+ return expectedType;
155
+ }
156
+ else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
157
+ return expectedType;
158
+ }
159
+ else if (expectedType === "Date") {
160
+ return expectedType;
161
+ }
162
+ else {
163
+ if (enumsMap[expectedType]) {
164
+ return expectedType;
165
+ }
166
+ if (!typeMap[expectedType]) {
167
+ return expectedType; // w/e we don't know the type
168
+ }
169
+ // Check the discriminator
170
+ const discriminatorProperty = typeMap[expectedType].discriminator;
171
+ if (discriminatorProperty == null) {
172
+ return expectedType; // the type does not have a discriminator. use it.
173
+ }
174
+ else {
175
+ if (data[discriminatorProperty]) {
176
+ return data[discriminatorProperty]; // use the type given in the discriminator
177
+ }
178
+ else {
179
+ return expectedType; // discriminator was not present (or an empty string)
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ exports.ObjectSerializer = ObjectSerializer;