vintasend-medplum 0.4.0 → 0.4.1
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/dist/index.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var medplum_attachment_manager_1 = require("./medplum-attachment-manager");
|
|
5
|
-
Object.defineProperty(exports, "MedplumAttachmentManager", { enumerable: true, get: function () { return medplum_attachment_manager_1.MedplumAttachmentManager; } });
|
|
6
|
-
Object.defineProperty(exports, "MedplumAttachmentFile", { enumerable: true, get: function () { return medplum_attachment_manager_1.MedplumAttachmentFile; } });
|
|
7
|
-
var medplum_backend_1 = require("./medplum-backend");
|
|
8
|
-
Object.defineProperty(exports, "MedplumNotificationBackend", { enumerable: true, get: function () { return medplum_backend_1.MedplumNotificationBackend; } });
|
|
9
|
-
Object.defineProperty(exports, "MedplumNotificationBackendFactory", { enumerable: true, get: function () { return medplum_backend_1.MedplumNotificationBackendFactory; } });
|
|
10
|
-
var medplum_adapter_1 = require("./medplum-adapter");
|
|
11
|
-
Object.defineProperty(exports, "MedplumNotificationAdapter", { enumerable: true, get: function () { return medplum_adapter_1.MedplumNotificationAdapter; } });
|
|
1
|
+
export { MedplumAttachmentManager, MedplumAttachmentFile } from './medplum-attachment-manager';
|
|
2
|
+
export { MedplumNotificationBackend, MedplumNotificationBackendFactory } from './medplum-backend';
|
|
3
|
+
export { MedplumNotificationAdapter } from './medplum-adapter';
|
package/dist/medplum-adapter.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.MedplumNotificationAdapter = void 0;
|
|
4
|
-
const base_notification_adapter_1 = require("vintasend/dist/services/notification-adapters/base-notification-adapter");
|
|
5
|
-
class MedplumNotificationAdapter extends base_notification_adapter_1.BaseNotificationAdapter {
|
|
1
|
+
import { BaseNotificationAdapter } from 'vintasend/dist/services/notification-adapters/base-notification-adapter';
|
|
2
|
+
export class MedplumNotificationAdapter extends BaseNotificationAdapter {
|
|
6
3
|
constructor(medplum, templateRenderer) {
|
|
7
4
|
const notificationType = 'EMAIL';
|
|
8
5
|
super(templateRenderer, notificationType, false);
|
|
@@ -46,4 +43,3 @@ class MedplumNotificationAdapter extends base_notification_adapter_1.BaseNotific
|
|
|
46
43
|
}));
|
|
47
44
|
}
|
|
48
45
|
}
|
|
49
|
-
exports.MedplumNotificationAdapter = MedplumNotificationAdapter;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MedplumAttachmentFile = exports.MedplumAttachmentManager = void 0;
|
|
4
|
-
const base_attachment_manager_1 = require("vintasend/dist/services/attachment-manager/base-attachment-manager");
|
|
1
|
+
import { BaseAttachmentManager } from 'vintasend/dist/services/attachment-manager/base-attachment-manager';
|
|
5
2
|
/**
|
|
6
3
|
* Medplum AttachmentManager implementation.
|
|
7
4
|
*
|
|
@@ -11,7 +8,7 @@ const base_attachment_manager_1 = require("vintasend/dist/services/attachment-ma
|
|
|
11
8
|
*
|
|
12
9
|
* Files are uploaded to Medplum's storage and can be accessed via URLs.
|
|
13
10
|
*/
|
|
14
|
-
class MedplumAttachmentManager extends
|
|
11
|
+
export class MedplumAttachmentManager extends BaseAttachmentManager {
|
|
15
12
|
constructor(medplum) {
|
|
16
13
|
super();
|
|
17
14
|
this.medplum = medplum;
|
|
@@ -162,13 +159,12 @@ class MedplumAttachmentManager extends base_attachment_manager_1.BaseAttachmentM
|
|
|
162
159
|
return new MedplumAttachmentFile(this.medplum, binaryUrl);
|
|
163
160
|
}
|
|
164
161
|
}
|
|
165
|
-
exports.MedplumAttachmentManager = MedplumAttachmentManager;
|
|
166
162
|
/**
|
|
167
163
|
* Medplum AttachmentFile implementation.
|
|
168
164
|
*
|
|
169
165
|
* Provides access to files stored in Medplum Binary resources.
|
|
170
166
|
*/
|
|
171
|
-
class MedplumAttachmentFile {
|
|
167
|
+
export class MedplumAttachmentFile {
|
|
172
168
|
constructor(medplum, binaryUrl) {
|
|
173
169
|
this.medplum = medplum;
|
|
174
170
|
// Extract Binary ID from URL (format: "Binary/{id}")
|
|
@@ -225,4 +221,3 @@ class MedplumAttachmentFile {
|
|
|
225
221
|
await this.medplum.deleteResource('Binary', this.binaryId);
|
|
226
222
|
}
|
|
227
223
|
}
|
|
228
|
-
exports.MedplumAttachmentFile = MedplumAttachmentFile;
|
package/dist/medplum-backend.js
CHANGED
|
@@ -1,40 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.MedplumNotificationBackendFactory = exports.MedplumNotificationBackend = void 0;
|
|
37
|
-
class MedplumNotificationBackend {
|
|
1
|
+
export class MedplumNotificationBackend {
|
|
38
2
|
constructor(medplum, options = {
|
|
39
3
|
emailNotificationSubjectExtensionUrl: 'http://vintasend.com/fhir/StructureDefinition/email-notification-subject',
|
|
40
4
|
}) {
|
|
@@ -475,7 +439,7 @@ class MedplumNotificationBackend {
|
|
|
475
439
|
}
|
|
476
440
|
if (typeof file === 'string') {
|
|
477
441
|
// File path - read from filesystem
|
|
478
|
-
const fs = await
|
|
442
|
+
const fs = await import('node:fs/promises');
|
|
479
443
|
return await fs.readFile(file);
|
|
480
444
|
}
|
|
481
445
|
// ReadableStream or Readable
|
|
@@ -822,10 +786,8 @@ class MedplumNotificationBackend {
|
|
|
822
786
|
await this.medplum.updateResource(updated);
|
|
823
787
|
}
|
|
824
788
|
}
|
|
825
|
-
|
|
826
|
-
class MedplumNotificationBackendFactory {
|
|
789
|
+
export class MedplumNotificationBackendFactory {
|
|
827
790
|
create(medplum) {
|
|
828
791
|
return new MedplumNotificationBackend(medplum);
|
|
829
792
|
}
|
|
830
793
|
}
|
|
831
|
-
exports.MedplumNotificationBackendFactory = MedplumNotificationBackendFactory;
|
package/dist/medplum-logger.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MedplumLogger = void 0;
|
|
4
|
-
class MedplumLogger {
|
|
1
|
+
export class MedplumLogger {
|
|
5
2
|
constructor() {
|
|
6
3
|
this.logger = console;
|
|
7
4
|
}
|
|
@@ -15,4 +12,3 @@ class MedplumLogger {
|
|
|
15
12
|
this.logger.warn(message);
|
|
16
13
|
}
|
|
17
14
|
}
|
|
18
|
-
exports.MedplumLogger = MedplumLogger;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vintasend-medplum",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"author": "Hugo Bessa",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@medplum/core": "^
|
|
20
|
-
"@medplum/fhirtypes": "^
|
|
19
|
+
"@medplum/core": "^5.0.10",
|
|
20
|
+
"@medplum/fhirtypes": "^5.0.10",
|
|
21
21
|
"pdfmake": "^0.2.23",
|
|
22
22
|
"vintasend": "^0.4.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@medplum/definitions": "^
|
|
26
|
-
"@medplum/mock": "^
|
|
25
|
+
"@medplum/definitions": "^5.0.10",
|
|
26
|
+
"@medplum/mock": "^5.0.10",
|
|
27
27
|
"@types/jest": "^30.0.0",
|
|
28
28
|
"@types/pdfmake": "^0.2.12",
|
|
29
29
|
"jest": "^30.2.0",
|