@medplum/core 0.9.16 → 0.9.19
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/cody-pdf-test.js +32 -0
- package/dist/cjs/index.js +5173 -77
- 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 +5135 -78
- 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 +49 -1
- package/dist/types/fhirpath/atoms.d.ts +8 -6
- package/dist/types/fhirpath/index.d.ts +2 -0
- package/dist/types/fhirpath/parse.d.ts +9 -2
- package/dist/types/fhirpath/utils.d.ts +11 -0
- package/dist/types/readablepromise.d.ts +5 -0
- package/dist/types/search.d.ts +3 -1
- package/dist/types/types.d.ts +12 -3
- package/package.json +3 -2
- package/wget-log +6 -0
package/cody-pdf-test.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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');
|