@medplum/core 0.9.13 → 0.9.16
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/cjs/index.js +184 -173
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +1 -1
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/esm/index.js +184 -173
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/types/client.d.ts +12 -0
- package/package.json +2 -2
- package/cody-pdf-test.js +0 -32
- package/wget-log +0 -6
package/dist/types/client.d.ts
CHANGED
|
@@ -58,6 +58,18 @@ export interface MedplumClientOptions {
|
|
|
58
58
|
* Consider using this for performance of displaying Patient or Practitioner resources.
|
|
59
59
|
*/
|
|
60
60
|
resourceCacheSize?: number;
|
|
61
|
+
/**
|
|
62
|
+
* The length of time in milliseconds to cache resources.
|
|
63
|
+
*
|
|
64
|
+
* Default value is 10000 (10 seconds).
|
|
65
|
+
*
|
|
66
|
+
* Cache time of zero disables all caching.
|
|
67
|
+
*
|
|
68
|
+
* For any individual request, the cache behavior can be overridden by setting the cache property on request options.
|
|
69
|
+
*
|
|
70
|
+
* See: https://developer.mozilla.org/en-US/docs/Web/API/Request/cache
|
|
71
|
+
*/
|
|
72
|
+
cacheTime?: number;
|
|
61
73
|
/**
|
|
62
74
|
* Fetch implementation.
|
|
63
75
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medplum/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.16",
|
|
4
4
|
"description": "Medplum TS/JS Library",
|
|
5
5
|
"author": "Medplum <hello@medplum.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"test": "jest"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@medplum/fhirtypes": "0.9.
|
|
20
|
+
"@medplum/fhirtypes": "0.9.16"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"pdfmake": "0.2.5"
|
package/cody-pdf-test.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// import fetch from 'node-fetch';
|
|
2
|
-
// import { MedplumClient } from './client';
|
|
3
|
-
const fetch = require('node-fetch');
|
|
4
|
-
const { MedplumClient } = require('./dist/cjs/index.js');
|
|
5
|
-
|
|
6
|
-
async function main() {
|
|
7
|
-
try {
|
|
8
|
-
console.log('create client...');
|
|
9
|
-
const medplum = new MedplumClient({ fetch });
|
|
10
|
-
|
|
11
|
-
console.log('set access token...');
|
|
12
|
-
medplum.setAccessToken(
|
|
13
|
-
'eyJhbGciOiJSUzI1NiIsImtpZCI6Ijk5MjI2MjNmLTVmMjctNDFiYi04NTQ1LTZkY2IwZmVkODk4MSIsInR5cCI6IkpXVCJ9.eyJsb2dpbl9pZCI6ImVkNmNiY2Q2LTVjZjQtNDljMS05ODQzLWU1OWIyZmRlN2Q5NCIsInN1YiI6ImJiNjJmNmQzLTNiYjAtNDRjYS1iN2UzLTBmZDAwYmRmYTYyNCIsInVzZXJuYW1lIjoiYmI2MmY2ZDMtM2JiMC00NGNhLWI3ZTMtMGZkMDBiZGZhNjI0Iiwic2NvcGUiOiJvcGVuaWQiLCJwcm9maWxlIjoiUHJhY3RpdGlvbmVyL2ZkNWFiZjYyLWE5NmEtNDdkYi04MDczLTQ4ZDgxOWI0NWU4NCIsImlhdCI6MTY1NDgwOTgzOSwiaXNzIjoiaHR0cHM6Ly9hcGkubWVkcGx1bS5jb20vIiwiZXhwIjoxNjU0ODEzNDM5fQ.acK1yXI8v4_a2UWikBwOaa6JItXhh4fma92pQeIuRTsfvnduWC8eOCGOOemxwpCvtrnECCilG1FNVDHTtGKFSVzStAi9TAnO-pHf69OVRJVH1xMqJvlEi-LRiu3uCflOhiqKcnGRDfpecZ0sTcLhIpSg-Kn2-nj8pGz_DG27JfjKpPIqU2X53S3SumZU-2bRPxoSu7lPXINn_1qMTxUOpV1qY54gqX4GVhim2OTdbARx-QtO9Q7A3JR64CvS9_WLbBzsDUqfKfJJ-X6KOHnM8Dz-dieV5rjQ54Sv3yvl-B5gozMvO2ZYm4P3fQ_IBEosim8CHQEa_23UTFGEo36Axg'
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
console.log('createpdf...');
|
|
17
|
-
const binary = await medplum.createPdf({
|
|
18
|
-
content: [
|
|
19
|
-
'First paragraph',
|
|
20
|
-
'Another paragraph, this time a little bit longer to make sure, this line will be divided into at least two lines',
|
|
21
|
-
],
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
console.log(JSON.stringify(binary, null, 2));
|
|
25
|
-
} catch (error) {
|
|
26
|
-
console.log('error', error);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
console.log('before main');
|
|
31
|
-
main().catch(console.log);
|
|
32
|
-
console.log('after main');
|
package/wget-log
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
--2022-06-07 14:46:15-- https://storage.medplum.com/binary/1edc2089-033f-4178-a829-ba8d28cc510b/09f34af8-9e37-4960-9c1c-6213706131f4?Expires=1654641902
|
|
2
|
-
Resolving storage.medplum.com (storage.medplum.com)... 52.84.162.127, 52.84.162.94, 52.84.162.128, ...
|
|
3
|
-
Connecting to storage.medplum.com (storage.medplum.com)|52.84.162.127|:443... connected.
|
|
4
|
-
HTTP request sent, awaiting response... 403 Forbidden
|
|
5
|
-
2022-06-07 14:46:15 ERROR 403: Forbidden.
|
|
6
|
-
|