@medplum/core 0.9.18 → 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/dist/cjs/index.js +49 -2
- 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 +49 -2
- 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 +48 -1
- package/package.json +3 -3
package/dist/types/client.d.ts
CHANGED
|
@@ -844,7 +844,54 @@ export declare class MedplumClient extends EventTarget {
|
|
|
844
844
|
* @returns Promise to the operation outcome.
|
|
845
845
|
*/
|
|
846
846
|
sendEmail(email: MailOptions): Promise<OperationOutcome>;
|
|
847
|
-
|
|
847
|
+
/**
|
|
848
|
+
* Executes a GraphQL query.
|
|
849
|
+
*
|
|
850
|
+
* Example:
|
|
851
|
+
*
|
|
852
|
+
* ```typescript
|
|
853
|
+
* const result = await medplum.graphql(`{
|
|
854
|
+
* Patient(id: "123") {
|
|
855
|
+
* resourceType
|
|
856
|
+
* id
|
|
857
|
+
* name {
|
|
858
|
+
* given
|
|
859
|
+
* family
|
|
860
|
+
* }
|
|
861
|
+
* }
|
|
862
|
+
* }`);
|
|
863
|
+
* ```
|
|
864
|
+
*
|
|
865
|
+
* Advanced queries such as named operations and variable substitution are supported:
|
|
866
|
+
*
|
|
867
|
+
* ```typescript
|
|
868
|
+
* const result = await medplum.graphql(
|
|
869
|
+
* `query GetPatientById($patientId: ID!) {
|
|
870
|
+
* Patient(id: $patientId) {
|
|
871
|
+
* resourceType
|
|
872
|
+
* id
|
|
873
|
+
* name {
|
|
874
|
+
* given
|
|
875
|
+
* family
|
|
876
|
+
* }
|
|
877
|
+
* }
|
|
878
|
+
* }`,
|
|
879
|
+
* 'GetPatientById',
|
|
880
|
+
* { patientId: '123' }
|
|
881
|
+
* );
|
|
882
|
+
* ```
|
|
883
|
+
*
|
|
884
|
+
* See the GraphQL documentation for more details: https://graphql.org/learn/
|
|
885
|
+
*
|
|
886
|
+
* See the FHIR GraphQL documentation for FHIR specific details: https://www.hl7.org/fhir/graphql.html
|
|
887
|
+
*
|
|
888
|
+
* @param query The GraphQL query.
|
|
889
|
+
* @param operationName Optional GraphQL operation name.
|
|
890
|
+
* @param variables Optional GraphQL variables.
|
|
891
|
+
* @param options Optional fetch options.
|
|
892
|
+
* @returns The GraphQL result.
|
|
893
|
+
*/
|
|
894
|
+
graphql(query: string, operationName?: string | null, variables?: any, options?: RequestInit): Promise<any>;
|
|
848
895
|
getActiveLogin(): LoginState | undefined;
|
|
849
896
|
setActiveLogin(login: LoginState): Promise<void>;
|
|
850
897
|
getAccessToken(): string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medplum/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.19",
|
|
4
4
|
"description": "Medplum TS/JS Library",
|
|
5
5
|
"author": "Medplum <hello@medplum.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"test": "jest"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@medplum/definitions": "0.9.
|
|
21
|
-
"@medplum/fhirtypes": "0.9.
|
|
20
|
+
"@medplum/definitions": "0.9.19",
|
|
21
|
+
"@medplum/fhirtypes": "0.9.19"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"pdfmake": "0.2.5"
|