@medplum/core 0.9.30 → 0.9.33

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;
@@ -152,11 +154,14 @@ export interface NewUserRequest {
152
154
  readonly recaptchaToken: string;
153
155
  readonly recaptchaSiteKey?: string;
154
156
  readonly remember?: boolean;
157
+ readonly projectId?: string;
155
158
  }
156
159
  export interface NewProjectRequest {
160
+ readonly login: string;
157
161
  readonly projectName: string;
158
162
  }
159
163
  export interface NewPatientRequest {
164
+ readonly login: string;
160
165
  readonly projectId: string;
161
166
  }
162
167
  export interface GoogleCredentialResponse {
@@ -170,6 +175,9 @@ export interface GoogleLoginRequest {
170
175
  readonly clientId?: string;
171
176
  readonly scope?: string;
172
177
  readonly nonce?: string;
178
+ readonly codeChallenge?: string;
179
+ readonly codeChallengeMethod?: string;
180
+ readonly createUser?: boolean;
173
181
  }
174
182
  export interface LoginAuthenticationResponse {
175
183
  readonly login: string;
@@ -199,9 +207,10 @@ export interface TokenResponse {
199
207
  readonly project: Reference<Project>;
200
208
  readonly profile: Reference<ProfileResource>;
201
209
  }
202
- export interface BotEvent {
210
+ export interface BotEvent<T = Resource | Hl7Message | string> {
203
211
  readonly contentType: string;
204
- readonly input: Resource | Hl7Message | string;
212
+ readonly input: T;
213
+ readonly secrets: Record<string, ProjectSecret>;
205
214
  }
206
215
  /**
207
216
  * JSONPatch patch operation.
@@ -424,20 +433,18 @@ export declare class MedplumClient extends EventTarget {
424
433
  * This requires a partial login from `startNewUser` or `startNewGoogleUser`.
425
434
  *
426
435
  * @param newProjectRequest Register request including email and password.
427
- * @param login The partial login to complete. This should come from the `startNewUser` method.
428
436
  * @returns Promise to the authentication response.
429
437
  */
430
- startNewProject(newProjectRequest: NewProjectRequest, login: LoginAuthenticationResponse): Promise<LoginAuthenticationResponse>;
438
+ startNewProject(newProjectRequest: NewProjectRequest): Promise<LoginAuthenticationResponse>;
431
439
  /**
432
440
  * Initiates a new patient flow.
433
441
  *
434
442
  * This requires a partial login from `startNewUser` or `startNewGoogleUser`.
435
443
  *
436
444
  * @param newPatientRequest Register request including email and password.
437
- * @param login The partial login to complete. This should come from the `startNewUser` method.
438
445
  * @returns Promise to the authentication response.
439
446
  */
440
- startNewPatient(newPatientRequest: NewPatientRequest, login: LoginAuthenticationResponse): Promise<LoginAuthenticationResponse>;
447
+ startNewPatient(newPatientRequest: NewPatientRequest): Promise<LoginAuthenticationResponse>;
441
448
  /**
442
449
  * Initiates a user login flow.
443
450
  * @category Authentication