@medplum/mock 0.10.1 → 1.0.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.
- package/dist/cjs/client.d.ts +1 -1
- package/dist/cjs/index.js +11430 -2821
- 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/cjs/mocks/simpsons.d.ts +7 -2
- package/dist/cjs/mocks/types.d.ts +51 -4
- package/dist/cjs/repo.d.ts +0 -7
- package/dist/esm/client.d.ts +1 -1
- package/dist/esm/index.js +11426 -2819
- 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/esm/mocks/simpsons.d.ts +7 -2
- package/dist/esm/mocks/types.d.ts +51 -4
- package/dist/esm/repo.d.ts +0 -7
- package/dist/types/client.d.ts +1 -1
- package/dist/types/mocks/simpsons.d.ts +7 -2
- package/dist/types/mocks/types.d.ts +51 -4
- package/dist/types/repo.d.ts +0 -7
- package/package.json +9 -7
- package/rollup.config.mjs +58 -0
- package/tsconfig.cjs.json +9 -0
- package/tsconfig.esm.json +9 -0
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { SearchParameter } from '@medplum/fhirtypes';
|
|
2
|
-
export declare const PatientSearchParameters: SearchParameter[];
|
|
3
1
|
export declare const GraphQLSchemaResponse: {
|
|
4
2
|
data: {
|
|
5
|
-
StructureDefinitionList: {
|
|
3
|
+
StructureDefinitionList: ({
|
|
6
4
|
resourceType: string;
|
|
7
5
|
id: string;
|
|
8
6
|
name: string;
|
|
@@ -13,12 +11,22 @@ export declare const GraphQLSchemaResponse: {
|
|
|
13
11
|
path: string;
|
|
14
12
|
min: number;
|
|
15
13
|
max: string;
|
|
14
|
+
base: {
|
|
15
|
+
path: string;
|
|
16
|
+
min: number;
|
|
17
|
+
max: string;
|
|
18
|
+
};
|
|
16
19
|
type?: undefined;
|
|
17
20
|
} | {
|
|
18
21
|
id: string;
|
|
19
22
|
path: string;
|
|
20
23
|
min: number;
|
|
21
24
|
max: string;
|
|
25
|
+
base: {
|
|
26
|
+
path: string;
|
|
27
|
+
min: number;
|
|
28
|
+
max: string;
|
|
29
|
+
};
|
|
22
30
|
type: ({
|
|
23
31
|
code: string;
|
|
24
32
|
targetProfile?: undefined;
|
|
@@ -28,7 +36,46 @@ export declare const GraphQLSchemaResponse: {
|
|
|
28
36
|
})[];
|
|
29
37
|
})[];
|
|
30
38
|
};
|
|
39
|
+
} | {
|
|
40
|
+
resourceType: string;
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
type: string;
|
|
44
|
+
snapshot: {
|
|
45
|
+
element: ({
|
|
46
|
+
id: string;
|
|
47
|
+
path: string;
|
|
48
|
+
min: number;
|
|
49
|
+
max: string;
|
|
50
|
+
type?: undefined;
|
|
51
|
+
} | {
|
|
52
|
+
id: string;
|
|
53
|
+
path: string;
|
|
54
|
+
min: number;
|
|
55
|
+
max: string;
|
|
56
|
+
type: {
|
|
57
|
+
code: string;
|
|
58
|
+
}[];
|
|
59
|
+
} | {
|
|
60
|
+
id: string;
|
|
61
|
+
path: string;
|
|
62
|
+
min: number;
|
|
63
|
+
max: string;
|
|
64
|
+
type: {
|
|
65
|
+
code: string;
|
|
66
|
+
targetProfile: string[];
|
|
67
|
+
}[];
|
|
68
|
+
})[];
|
|
69
|
+
};
|
|
70
|
+
})[];
|
|
71
|
+
SearchParameterList: {
|
|
72
|
+
resourceType: string;
|
|
73
|
+
id: string;
|
|
74
|
+
name: string;
|
|
75
|
+
code: string;
|
|
76
|
+
base: string[];
|
|
77
|
+
type: string;
|
|
78
|
+
expression: string;
|
|
31
79
|
}[];
|
|
32
|
-
SearchParameterList: SearchParameter[];
|
|
33
80
|
};
|
|
34
81
|
};
|
package/dist/types/repo.d.ts
CHANGED
|
@@ -15,10 +15,3 @@ export declare class MemoryRepository {
|
|
|
15
15
|
deleteResource(resourceType: string, id: string): void;
|
|
16
16
|
private generateId;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Determines if the resource matches the search request.
|
|
20
|
-
* @param resource The resource that was created or updated.
|
|
21
|
-
* @param searchRequest The subscription criteria as a search request.
|
|
22
|
-
* @returns True if the resource satisfies the search request.
|
|
23
|
-
*/
|
|
24
|
-
export declare function matchesSearchRequest(resource: Resource, searchRequest: SearchRequest): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medplum/mock",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Medplum Mock Client",
|
|
5
5
|
"author": "Medplum <hello@medplum.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -13,17 +13,19 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"clean": "rimraf dist",
|
|
15
15
|
"build": "npm run clean && tsc && npm run rollup",
|
|
16
|
-
"rollup": "rollup --config rollup.config.
|
|
16
|
+
"rollup": "rollup --config rollup.config.mjs",
|
|
17
17
|
"test": "jest"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@medplum/core": "0.
|
|
21
|
-
"@medplum/
|
|
22
|
-
"@
|
|
20
|
+
"@medplum/core": "1.0.0",
|
|
21
|
+
"@medplum/definitions": "1.0.0",
|
|
22
|
+
"@medplum/fhirtypes": "1.0.0",
|
|
23
|
+
"@types/pdfmake": "0.1.21"
|
|
23
24
|
},
|
|
24
25
|
"peerDependencies": {
|
|
25
|
-
"@medplum/core": "0.
|
|
26
|
-
"
|
|
26
|
+
"@medplum/core": "1.0.0",
|
|
27
|
+
"@medplum/definitions": "1.0.0",
|
|
28
|
+
"fast-json-patch": "^3.1.1"
|
|
27
29
|
},
|
|
28
30
|
"peerDependenciesMeta": {
|
|
29
31
|
"fast-json-patch": {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import json from '@rollup/plugin-json';
|
|
2
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
3
|
+
import typescript from '@rollup/plugin-typescript';
|
|
4
|
+
import { mkdirSync, writeFileSync } from 'fs';
|
|
5
|
+
import { terser } from 'rollup-plugin-terser';
|
|
6
|
+
|
|
7
|
+
const extensions = ['.ts'];
|
|
8
|
+
|
|
9
|
+
const globals = {
|
|
10
|
+
'@medplum/core': 'medplum.core',
|
|
11
|
+
'fast-json-patch': 'fast-json-patch',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
input: 'src/index.ts',
|
|
16
|
+
output: [
|
|
17
|
+
{
|
|
18
|
+
file: 'dist/esm/index.js',
|
|
19
|
+
format: 'esm',
|
|
20
|
+
sourcemap: true,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
file: 'dist/esm/index.min.js',
|
|
24
|
+
format: 'esm',
|
|
25
|
+
plugins: [terser()],
|
|
26
|
+
sourcemap: true,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
file: 'dist/cjs/index.js',
|
|
30
|
+
format: 'umd',
|
|
31
|
+
name: 'medplum.mock',
|
|
32
|
+
sourcemap: true,
|
|
33
|
+
globals,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
file: 'dist/cjs/index.min.js',
|
|
37
|
+
format: 'umd',
|
|
38
|
+
name: 'medplum.mock',
|
|
39
|
+
plugins: [terser()],
|
|
40
|
+
sourcemap: true,
|
|
41
|
+
globals,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
plugins: [
|
|
45
|
+
resolve({ extensions }),
|
|
46
|
+
typescript(),
|
|
47
|
+
json(),
|
|
48
|
+
{
|
|
49
|
+
buildEnd: () => {
|
|
50
|
+
mkdirSync('./dist/cjs', { recursive: true });
|
|
51
|
+
mkdirSync('./dist/esm', { recursive: true });
|
|
52
|
+
writeFileSync('./dist/cjs/package.json', '{"type": "commonjs"}');
|
|
53
|
+
writeFileSync('./dist/esm/package.json', '{"type": "module"}');
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
external: Object.keys(globals),
|
|
58
|
+
};
|