@colijnit/mainapi 259.1.2 → 259.1.4
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/build/main-public.js +15 -4
- package/package.json +1 -1
package/build/main-public.js
CHANGED
|
@@ -51,8 +51,15 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
51
51
|
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
52
52
|
}
|
|
53
53
|
getDocumentContent(id, thumbnail) {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
if (id === undefined || id === null) {
|
|
55
|
+
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
56
|
+
}
|
|
57
|
+
const params = {
|
|
58
|
+
documentId: id,
|
|
59
|
+
thumbnail: thumbnail
|
|
60
|
+
};
|
|
61
|
+
const data = Object.assign(Object.assign({}, this.createServiceRequestData()), { parameterValues: params });
|
|
62
|
+
return this._call(public_service_method_1.PublicServiceMethod.GetDocumentContent, data);
|
|
56
63
|
}
|
|
57
64
|
loadDocuments(key, table) {
|
|
58
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -330,8 +337,12 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
330
337
|
});
|
|
331
338
|
}
|
|
332
339
|
getImageForCoDocument(document, thumb = false) {
|
|
333
|
-
|
|
334
|
-
|
|
340
|
+
if (document) {
|
|
341
|
+
const type = document.documentType;
|
|
342
|
+
const fileType = document.fileType;
|
|
343
|
+
const hasPublicAccess = document.hasPublicAccess;
|
|
344
|
+
return this._handleCoDocumentRequest(type, fileType, hasPublicAccess, document.documentId, document.mimeTypeInternal, thumb, document.filePath);
|
|
345
|
+
}
|
|
335
346
|
}
|
|
336
347
|
createServiceRequestData() {
|
|
337
348
|
const data = { languageCode: this.languageCode };
|