@medplum/core 0.9.31 → 0.9.34

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.
@@ -1,4 +1,4 @@
1
- import { Binary, Bundle, Communication, ExtractResource, OperationOutcome, Project, ProjectMembership, Reference, Resource, ResourceType, UserConfiguration, ValueSet } from '@medplum/fhirtypes';
1
+ import { Binary, Bundle, Communication, ExtractResource, OperationOutcome, Project, ProjectMembership, ProjectSecret, Reference, Resource, ResourceType, UserConfiguration, ValueSet } from '@medplum/fhirtypes';
2
2
  /** @ts-ignore */
3
3
  import type { CustomTableLayout, TDocumentDefinitions, TFontDictionary } from 'pdfmake/interfaces';
4
4
  import { EventTarget } from './eventtarget';
@@ -143,6 +143,8 @@ export interface LoginRequest {
143
143
  readonly clientId?: string;
144
144
  readonly scope?: string;
145
145
  readonly nonce?: string;
146
+ readonly codeChallenge?: string;
147
+ readonly codeChallengeMethod?: string;
146
148
  }
147
149
  export interface NewUserRequest {
148
150
  readonly firstName: string;
@@ -173,6 +175,8 @@ export interface GoogleLoginRequest {
173
175
  readonly clientId?: string;
174
176
  readonly scope?: string;
175
177
  readonly nonce?: string;
178
+ readonly codeChallenge?: string;
179
+ readonly codeChallengeMethod?: string;
176
180
  readonly createUser?: boolean;
177
181
  }
178
182
  export interface LoginAuthenticationResponse {
@@ -203,9 +207,10 @@ export interface TokenResponse {
203
207
  readonly project: Reference<Project>;
204
208
  readonly profile: Reference<ProfileResource>;
205
209
  }
206
- export interface BotEvent {
210
+ export interface BotEvent<T = Resource | Hl7Message | string> {
207
211
  readonly contentType: string;
208
- readonly input: Resource | Hl7Message | string;
212
+ readonly input: T;
213
+ readonly secrets: Record<string, ProjectSecret>;
209
214
  }
210
215
  /**
211
216
  * JSONPatch patch operation.
@@ -613,7 +618,7 @@ export declare class MedplumClient extends EventTarget {
613
618
  *
614
619
  * See the FHIR "read" operation for full details: https://www.hl7.org/fhir/http.html#read
615
620
  *
616
- * @category Caching
621
+ * @category Read
617
622
  * @param resourceType The FHIR resource type.
618
623
  * @param id The resource ID.
619
624
  * @returns The resource if available; undefined otherwise.
@@ -1032,6 +1037,18 @@ export declare class MedplumClient extends EventTarget {
1032
1037
  * @returns The GraphQL result.
1033
1038
  */
1034
1039
  graphql(query: string, operationName?: string | null, variables?: any, options?: RequestInit): Promise<any>;
1040
+ /**
1041
+ *
1042
+ * Executes the $graph operation on this resource to fetch a Bundle of resources linked to the target resource
1043
+ * according to a graph definition
1044
+
1045
+ * @category Read
1046
+ * @param resourceType The FHIR resource type.
1047
+ * @param id The resource ID.
1048
+ * @param graphName `name` parameter of the GraphDefinition
1049
+ * @returns A Bundle
1050
+ */
1051
+ readResourceGraph<K extends ResourceType>(resourceType: K, id: string, graphName: string): ReadablePromise<Bundle<Resource>>;
1035
1052
  /**
1036
1053
  * @category Authentication
1037
1054
  * @returns The Login State