@esushealth/sdk 0.0.0-stage → 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.
@@ -0,0 +1,2327 @@
1
+ export declare const tenantWebhookEvents: readonly ["allergy_intolerance.created", "allergy_intolerance.deleted", "allergy_intolerance.updated", "appointment.created", "appointment.deleted", "appointment.updated", "condition.created", "condition.deleted", "condition.updated", "consent.revoked", "diagnostic_report.created", "diagnostic_report.deleted", "diagnostic_report.updated", "document_reference.created", "document_reference.deleted", "document_reference.updated", "encounter.created", "encounter.deleted", "encounter.updated", "immunization.created", "immunization.deleted", "immunization.updated", "medication_request.created", "medication_request.deleted", "medication_request.updated", "observation.created", "observation.deleted", "observation.updated", "patient.created", "patient.deleted", "patient.updated", "procedure.created", "procedure.deleted", "procedure.updated", "service_request.created", "service_request.deleted", "service_request.updated", "user.created", "user.deactivated", "user.deleted", "user.email_changed", "user.email_verified", "user.locked", "user.mfa_disabled", "user.mfa_enabled", "user.password_changed", "user.password_reset", "user.patient_linked", "user.patient_unlinked", "user.reactivated", "user.refresh_reuse", "user.role_assigned", "user.role_removed", "user.webauthn_registered", "user.webauthn_removed"];
2
+ export type TenantWebhookEvent = (typeof tenantWebhookEvents)[number];
3
+ export declare const patientPortalResources: readonly ["AllergyIntolerance", "Condition", "Consent", "DiagnosticReport", "DocumentReference", "Encounter", "Immunization", "MedicationRequest", "Observation"];
4
+ export type PatientPortalResource = (typeof patientPortalResources)[number];
5
+ export interface IntegrationInputs {
6
+ "POST /files/upload": {
7
+ readonly "file": File;
8
+ };
9
+ "PUT /organizations/:id/cors-origins": {
10
+ readonly "origins": ReadonlyArray<string>;
11
+ };
12
+ "POST /pharmacy/adjust": {
13
+ readonly "lotNumber"?: string;
14
+ readonly "medicationId": string;
15
+ readonly "locationId": string;
16
+ readonly "quantity": string | number;
17
+ readonly "reason": string;
18
+ };
19
+ "POST /pharmacy/dispense": {
20
+ readonly "lotNumber"?: string;
21
+ readonly "medicationId": string;
22
+ readonly "locationId": string;
23
+ readonly "quantity": string | number;
24
+ readonly "patientId"?: string;
25
+ readonly "encounterId"?: string;
26
+ readonly "note"?: string;
27
+ };
28
+ "POST /pharmacy/restock": {
29
+ readonly "minQuantity"?: string | number;
30
+ readonly "maxQuantity"?: string | number;
31
+ readonly "medicationId": string;
32
+ readonly "locationId": string;
33
+ readonly "quantity": string | number;
34
+ readonly "lotNumber"?: string;
35
+ readonly "expirationDate"?: string;
36
+ };
37
+ "POST /queue/call-next": {
38
+ readonly "locationId"?: string;
39
+ readonly "practitionerId"?: string;
40
+ };
41
+ "POST /queue/check-in": {
42
+ readonly "patientId": string;
43
+ readonly "appointmentId"?: string;
44
+ readonly "locationId"?: string;
45
+ readonly "practitionerId"?: string;
46
+ readonly "priority"?: number;
47
+ readonly "note"?: string;
48
+ };
49
+ "PUT /smart/apps/:id": {
50
+ readonly "name"?: string;
51
+ readonly "redirectUris"?: ReadonlyArray<string>;
52
+ readonly "scopes"?: ReadonlyArray<string>;
53
+ readonly "description"?: string;
54
+ readonly "launchUri"?: string;
55
+ readonly "logoUri"?: string;
56
+ readonly "active"?: boolean;
57
+ readonly "isConfidential"?: boolean;
58
+ };
59
+ "POST /smart/apps": {
60
+ readonly "name": string;
61
+ readonly "redirectUris": ReadonlyArray<string>;
62
+ readonly "scopes": ReadonlyArray<string>;
63
+ readonly "description"?: string;
64
+ readonly "launchUri"?: string;
65
+ readonly "logoUri"?: string;
66
+ readonly "isConfidential"?: boolean;
67
+ };
68
+ "POST /tenant-apps/:id/email/test": {
69
+ readonly "to": string;
70
+ readonly "smtpHost"?: string;
71
+ readonly "smtpPort"?: string | number;
72
+ readonly "smtpSecure"?: boolean;
73
+ readonly "smtpUser"?: string;
74
+ readonly "smtpPassword"?: string;
75
+ };
76
+ "PATCH /tenant-apps/:id/roles/:roleId": {
77
+ readonly "name"?: string;
78
+ readonly "displayName"?: string;
79
+ readonly "description"?: string;
80
+ readonly "permissions"?: ReadonlyArray<{
81
+ readonly "resource": string;
82
+ readonly "action": string;
83
+ }>;
84
+ readonly "isStaff"?: boolean;
85
+ };
86
+ "POST /tenant-apps/:id/roles": {
87
+ readonly "name": string;
88
+ readonly "displayName"?: string;
89
+ readonly "description"?: string;
90
+ readonly "permissions"?: ReadonlyArray<{
91
+ readonly "resource": string;
92
+ readonly "action": string;
93
+ }>;
94
+ readonly "isStaff"?: boolean;
95
+ };
96
+ "POST /tenant-apps/:id/staff-invitations": {
97
+ readonly "email": string;
98
+ readonly "name"?: {
99
+ readonly "given"?: ReadonlyArray<string>;
100
+ readonly "family"?: string;
101
+ };
102
+ readonly "specialty"?: string;
103
+ readonly "roleId"?: string | null;
104
+ };
105
+ "POST /tenant-apps/:id/user-invitations/bulk": {
106
+ readonly "invitations": ReadonlyArray<{
107
+ readonly "email": string;
108
+ readonly "roleId"?: string | null;
109
+ readonly "patientId"?: string | null;
110
+ }>;
111
+ };
112
+ "POST /tenant-apps/:id/user-invitations": {
113
+ readonly "email": string;
114
+ readonly "patientId"?: string | null;
115
+ readonly "practitionerId"?: string | null;
116
+ readonly "roleId"?: string | null;
117
+ };
118
+ "PATCH /tenant-apps/:id/users/:userId": {
119
+ readonly "patientId"?: string | null;
120
+ readonly "practitionerId"?: string | null;
121
+ readonly "isActive"?: boolean;
122
+ readonly "clearLockout"?: boolean;
123
+ };
124
+ "PATCH /tenant-apps/:id/webhooks/:webhookId": {
125
+ readonly "url"?: string;
126
+ readonly "events"?: ReadonlyArray<"user.created" | "user.email_verified" | "user.password_changed" | "user.password_reset" | "user.email_changed" | "user.deleted" | "user.mfa_enabled" | "user.mfa_disabled" | "user.webauthn_registered" | "user.webauthn_removed" | "user.locked" | "user.refresh_reuse" | "user.role_assigned" | "user.role_removed" | "user.deactivated" | "user.reactivated" | "user.patient_linked" | "user.patient_unlinked" | "consent.revoked" | "patient.created" | "patient.updated" | "patient.deleted" | "encounter.created" | "encounter.updated" | "encounter.deleted" | "observation.created" | "observation.updated" | "observation.deleted" | "condition.created" | "condition.updated" | "condition.deleted" | "allergy_intolerance.created" | "allergy_intolerance.updated" | "allergy_intolerance.deleted" | "procedure.created" | "procedure.updated" | "procedure.deleted" | "immunization.created" | "immunization.updated" | "immunization.deleted" | "medication_request.created" | "medication_request.updated" | "medication_request.deleted" | "diagnostic_report.created" | "diagnostic_report.updated" | "diagnostic_report.deleted" | "service_request.created" | "service_request.updated" | "service_request.deleted" | "document_reference.created" | "document_reference.updated" | "document_reference.deleted" | "appointment.created" | "appointment.updated" | "appointment.deleted">;
127
+ readonly "description"?: string | null;
128
+ readonly "active"?: boolean;
129
+ readonly "rotateSecret"?: boolean;
130
+ };
131
+ "POST /tenant-apps/:id/webhooks": {
132
+ readonly "url": string;
133
+ readonly "events": ReadonlyArray<"user.created" | "user.email_verified" | "user.password_changed" | "user.password_reset" | "user.email_changed" | "user.deleted" | "user.mfa_enabled" | "user.mfa_disabled" | "user.webauthn_registered" | "user.webauthn_removed" | "user.locked" | "user.refresh_reuse" | "user.role_assigned" | "user.role_removed" | "user.deactivated" | "user.reactivated" | "user.patient_linked" | "user.patient_unlinked" | "consent.revoked" | "patient.created" | "patient.updated" | "patient.deleted" | "encounter.created" | "encounter.updated" | "encounter.deleted" | "observation.created" | "observation.updated" | "observation.deleted" | "condition.created" | "condition.updated" | "condition.deleted" | "allergy_intolerance.created" | "allergy_intolerance.updated" | "allergy_intolerance.deleted" | "procedure.created" | "procedure.updated" | "procedure.deleted" | "immunization.created" | "immunization.updated" | "immunization.deleted" | "medication_request.created" | "medication_request.updated" | "medication_request.deleted" | "diagnostic_report.created" | "diagnostic_report.updated" | "diagnostic_report.deleted" | "service_request.created" | "service_request.updated" | "service_request.deleted" | "document_reference.created" | "document_reference.updated" | "document_reference.deleted" | "appointment.created" | "appointment.updated" | "appointment.deleted">;
134
+ readonly "description"?: string;
135
+ readonly "secret"?: string;
136
+ };
137
+ "PATCH /tenant-apps/:id": {
138
+ readonly "name"?: string;
139
+ readonly "active"?: boolean;
140
+ readonly "settings"?: {
141
+ readonly "appDisplayName"?: string;
142
+ readonly "logoUri"?: string | null;
143
+ readonly "primaryColor"?: string | null;
144
+ readonly "supportEmail"?: string | null;
145
+ readonly "footerText"?: string | null;
146
+ readonly "fromEmail"?: string | null;
147
+ readonly "fromName"?: string | null;
148
+ readonly "replyTo"?: string | null;
149
+ readonly "siteUrl"?: string;
150
+ readonly "redirectAllowList"?: ReadonlyArray<string>;
151
+ readonly "emailActionPaths"?: {
152
+ readonly "invite"?: string;
153
+ readonly "verifyEmail"?: string;
154
+ readonly "resetPassword"?: string;
155
+ } | null;
156
+ readonly "googleEnabled"?: boolean;
157
+ readonly "googleClientId"?: string | null;
158
+ readonly "googleClientSecret"?: string | null;
159
+ readonly "googleRedirectUri"?: string | null;
160
+ readonly "webauthnEnabled"?: boolean;
161
+ readonly "emailCopy"?: {
162
+ readonly "inviteSubject"?: string;
163
+ readonly "inviteHeading"?: string;
164
+ readonly "inviteCta"?: string;
165
+ readonly "verifySubject"?: string;
166
+ readonly "resetSubject"?: string;
167
+ } | null;
168
+ readonly "smtpHost"?: string | null;
169
+ readonly "smtpPort"?: string | number | null;
170
+ readonly "smtpSecure"?: boolean;
171
+ readonly "smtpUser"?: string | null;
172
+ readonly "smtpPassword"?: string | null;
173
+ readonly "turnstileSiteKey"?: string | null;
174
+ readonly "turnstileSecret"?: string | null;
175
+ };
176
+ };
177
+ "POST /tenant-apps": {
178
+ readonly "name": string;
179
+ readonly "settings": {
180
+ readonly "appDisplayName": string;
181
+ readonly "logoUri"?: string;
182
+ readonly "primaryColor"?: string;
183
+ readonly "supportEmail"?: string;
184
+ readonly "footerText"?: string;
185
+ readonly "fromEmail"?: string;
186
+ readonly "fromName"?: string;
187
+ readonly "replyTo"?: string;
188
+ readonly "siteUrl": string;
189
+ readonly "redirectAllowList": ReadonlyArray<string>;
190
+ readonly "emailActionPaths"?: {
191
+ readonly "invite"?: string;
192
+ readonly "verifyEmail"?: string;
193
+ readonly "resetPassword"?: string;
194
+ };
195
+ readonly "googleEnabled": boolean;
196
+ readonly "googleClientId"?: string;
197
+ readonly "googleClientSecret"?: string;
198
+ readonly "googleRedirectUri"?: string;
199
+ readonly "webauthnEnabled"?: boolean;
200
+ readonly "emailCopy"?: {
201
+ readonly "inviteSubject"?: string;
202
+ readonly "inviteHeading"?: string;
203
+ readonly "inviteCta"?: string;
204
+ readonly "verifySubject"?: string;
205
+ readonly "resetSubject"?: string;
206
+ };
207
+ readonly "smtpHost"?: string;
208
+ readonly "smtpPort"?: string | number;
209
+ readonly "smtpSecure"?: boolean;
210
+ readonly "smtpUser"?: string;
211
+ readonly "smtpPassword"?: string;
212
+ readonly "turnstileSiteKey"?: string;
213
+ readonly "turnstileSecret"?: string;
214
+ };
215
+ };
216
+ "POST /v1/auth/email/change/verify": {
217
+ readonly "code": string;
218
+ };
219
+ "POST /v1/auth/email/change": {
220
+ readonly "newEmail": string;
221
+ readonly "currentPassword": string;
222
+ };
223
+ "POST /v1/auth/email/verify": {
224
+ readonly "email": string;
225
+ readonly "code": string;
226
+ };
227
+ "POST /v1/auth/google/exchange": {
228
+ readonly "code": string;
229
+ };
230
+ "POST /v1/auth/me/webauthn/register/options": {
231
+ readonly "currentPassword"?: string;
232
+ readonly "mfaCode"?: string;
233
+ };
234
+ "POST /v1/auth/me/webauthn/register/verify": {
235
+ readonly "credential": unknown;
236
+ readonly "label"?: string;
237
+ };
238
+ "DELETE /v1/auth/me": {
239
+ readonly "verificationCode"?: string;
240
+ readonly "currentPassword"?: string;
241
+ readonly "mfaCode"?: string;
242
+ };
243
+ "PATCH /v1/auth/me": {
244
+ readonly "firstName"?: string | null;
245
+ readonly "lastName"?: string | null;
246
+ readonly "avatarUrl"?: string | null;
247
+ };
248
+ "POST /v1/auth/mfa/disable": {
249
+ readonly "currentPassword": string;
250
+ readonly "code": string;
251
+ };
252
+ "POST /v1/auth/mfa/enable": {
253
+ readonly "code": string;
254
+ };
255
+ "POST /v1/auth/mfa/recovery-codes/regenerate": {
256
+ readonly "currentPassword": string;
257
+ };
258
+ "POST /v1/auth/mfa/setup": {
259
+ readonly "currentPassword": string;
260
+ };
261
+ "POST /v1/auth/otp/request": {
262
+ readonly "email": string;
263
+ readonly "purpose": "email_verify" | "password_reset";
264
+ };
265
+ "POST /v1/auth/password/change": {
266
+ readonly "currentPassword": string;
267
+ readonly "newPassword": string;
268
+ };
269
+ "POST /v1/auth/password/reset/confirm": {
270
+ readonly "email": string;
271
+ readonly "code": string;
272
+ readonly "newPassword": string;
273
+ };
274
+ "POST /v1/auth/signup": {
275
+ readonly "email": string;
276
+ readonly "password": string;
277
+ readonly "firstName"?: string;
278
+ readonly "lastName"?: string;
279
+ readonly "inviteToken"?: string;
280
+ };
281
+ "PATCH /v1/auth/users/:userId": {
282
+ readonly "patientId": string | null;
283
+ readonly "practitionerId"?: string | null;
284
+ };
285
+ "POST /v1/auth/webauthn/login/options": {
286
+ readonly "email"?: string;
287
+ };
288
+ "POST /v1/auth/webauthn/login/verify": {
289
+ readonly "credential": unknown;
290
+ };
291
+ }
292
+ export interface IntegrationQueries {
293
+ "GET /admin/audit": {
294
+ readonly "_count"?: string;
295
+ readonly "_offset"?: string;
296
+ readonly "date"?: string | ReadonlyArray<string>;
297
+ readonly "agent"?: string;
298
+ readonly "entity"?: string;
299
+ readonly "type"?: string;
300
+ readonly "outcome"?: string;
301
+ };
302
+ "GET /admin/audit/patient/:patientId": {
303
+ readonly "_count"?: string;
304
+ readonly "_offset"?: string;
305
+ readonly "date"?: string | ReadonlyArray<string>;
306
+ readonly "agent"?: string;
307
+ readonly "entity"?: string;
308
+ readonly "type"?: string;
309
+ readonly "outcome"?: string;
310
+ };
311
+ "GET /admin/audit/user/:userId": {
312
+ readonly "_count"?: string;
313
+ readonly "_offset"?: string;
314
+ readonly "date"?: string | ReadonlyArray<string>;
315
+ readonly "agent"?: string;
316
+ readonly "entity"?: string;
317
+ readonly "type"?: string;
318
+ readonly "outcome"?: string;
319
+ };
320
+ "GET /admin/email-log": {
321
+ readonly "to"?: string;
322
+ readonly "appId"?: string;
323
+ readonly "status"?: "queued" | "accepted" | "delivered" | "failed" | "suppressed";
324
+ readonly "template"?: string;
325
+ readonly "after"?: string;
326
+ readonly "before"?: string;
327
+ readonly "cursor"?: string;
328
+ readonly "limit"?: string;
329
+ };
330
+ "GET /billing/usage/history": {
331
+ readonly "months"?: string;
332
+ };
333
+ "GET /health/history": {
334
+ readonly "days"?: string | number;
335
+ readonly "bucket"?: "1m" | "5m" | "1h" | "1d";
336
+ };
337
+ "GET /pharmacy/expiring": {
338
+ readonly "days"?: string | number;
339
+ };
340
+ "GET /pharmacy/low-stock": {
341
+ readonly "locationId"?: string;
342
+ };
343
+ "GET /pharmacy/stock": {
344
+ readonly "locationId"?: string;
345
+ readonly "medicationId"?: string;
346
+ };
347
+ "GET /queue/board": {
348
+ readonly "locationId"?: string;
349
+ };
350
+ "GET /queue/stats": {
351
+ readonly "locationId"?: string;
352
+ };
353
+ "GET /queue/waiting": {
354
+ readonly "locationId"?: string;
355
+ readonly "practitionerId"?: string;
356
+ };
357
+ "GET /smart/apps": {
358
+ readonly "active"?: string;
359
+ readonly "name"?: string;
360
+ };
361
+ "GET /tenant-apps/:id/users": {
362
+ readonly "cursor"?: string;
363
+ readonly "limit"?: string;
364
+ readonly "q"?: string;
365
+ readonly "roleId"?: string;
366
+ };
367
+ "GET /tenant-apps/:id/webhooks/:webhookId/deliveries": {
368
+ readonly "limit"?: string;
369
+ };
370
+ "GET /v1/admin/audit": {
371
+ readonly "type"?: "auth" | "rest" | "system";
372
+ readonly "action"?: "C" | "R" | "U" | "D" | "E";
373
+ readonly "resourceType"?: string;
374
+ readonly "resourceId"?: string;
375
+ readonly "userId"?: string;
376
+ readonly "after"?: string;
377
+ readonly "before"?: string;
378
+ readonly "cursor"?: string;
379
+ readonly "limit"?: string;
380
+ };
381
+ }
382
+ export declare const clinicalWorkflowStatuses: {
383
+ readonly "POST /pharmacy/adjust": 200;
384
+ readonly "POST /pharmacy/dispense": 200;
385
+ readonly "GET /pharmacy/expiring": 200;
386
+ readonly "GET /pharmacy/low-stock": 200;
387
+ readonly "POST /pharmacy/restock": 201;
388
+ readonly "GET /pharmacy/stock": 200;
389
+ readonly "POST /queue/:id/complete": 200;
390
+ readonly "POST /queue/:id/no-show": 200;
391
+ readonly "POST /queue/:id/start": 200;
392
+ readonly "GET /queue/board": 200;
393
+ readonly "POST /queue/call-next": 200;
394
+ readonly "POST /queue/check-in": 201;
395
+ readonly "GET /queue/stats": 200;
396
+ readonly "GET /queue/waiting": 200;
397
+ };
398
+ export declare const tenantAppStatuses: {
399
+ readonly "POST /tenant-apps/:id/backfill-patient-consents": 200;
400
+ readonly "POST /tenant-apps/:id/email/test": 200;
401
+ readonly "GET /tenant-apps/:id/roles/:roleId/users": 200;
402
+ readonly "DELETE /tenant-apps/:id/roles/:roleId": 204;
403
+ readonly "PATCH /tenant-apps/:id/roles/:roleId": 200;
404
+ readonly "GET /tenant-apps/:id/roles": 200;
405
+ readonly "POST /tenant-apps/:id/roles": 201;
406
+ readonly "POST /tenant-apps/:id/staff-invitations": 201;
407
+ readonly "GET /tenant-apps/:id/stats": 200;
408
+ readonly "POST /tenant-apps/:id/user-invitations/:invId/resend": 200;
409
+ readonly "DELETE /tenant-apps/:id/user-invitations/:invId": 204;
410
+ readonly "POST /tenant-apps/:id/user-invitations/bulk": 200;
411
+ readonly "GET /tenant-apps/:id/user-invitations": 200;
412
+ readonly "POST /tenant-apps/:id/user-invitations": 201;
413
+ readonly "DELETE /tenant-apps/:id/users/:userId/roles/:roleId": 204;
414
+ readonly "POST /tenant-apps/:id/users/:userId/roles/:roleId": 204;
415
+ readonly "GET /tenant-apps/:id/users/:userId/roles": 200;
416
+ readonly "POST /tenant-apps/:id/users/:userId/send-password-reset": 204;
417
+ readonly "POST /tenant-apps/:id/users/:userId/verify-email": 204;
418
+ readonly "DELETE /tenant-apps/:id/users/:userId": 204;
419
+ readonly "GET /tenant-apps/:id/users/:userId": 200;
420
+ readonly "PATCH /tenant-apps/:id/users/:userId": 204;
421
+ readonly "GET /tenant-apps/:id/users": 200;
422
+ readonly "DELETE /tenant-apps/:id": 204;
423
+ readonly "GET /tenant-apps/:id": 200;
424
+ readonly "PATCH /tenant-apps/:id": 200;
425
+ readonly "GET /tenant-apps": 200;
426
+ readonly "POST /tenant-apps": 201;
427
+ readonly "PATCH /v1/auth/users/:userId": 200;
428
+ };
429
+ export declare const organizationStatuses: {
430
+ readonly "GET /admin/audit": 200;
431
+ readonly "GET /admin/audit/patient/:patientId": 200;
432
+ readonly "GET /admin/audit/user/:userId": 200;
433
+ readonly "GET /admin/email-log": 200;
434
+ readonly "GET /billing/plan": 200;
435
+ readonly "GET /billing/usage/history": 200;
436
+ readonly "GET /billing/usage": 200;
437
+ readonly "GET /organizations/:id/cors-origins": 200;
438
+ readonly "PUT /organizations/:id/cors-origins": 200;
439
+ readonly "GET /plan/quota": 200;
440
+ readonly "DELETE /smart/apps/:id": 204;
441
+ readonly "GET /smart/apps/:id": 200;
442
+ readonly "PUT /smart/apps/:id": 200;
443
+ readonly "GET /smart/apps": 200;
444
+ readonly "POST /smart/apps": 201;
445
+ readonly "GET /v1/admin/audit": 200;
446
+ };
447
+ export interface IntegrationResults {
448
+ "GET /admin/audit": {
449
+ readonly status: 200;
450
+ readonly body: {
451
+ readonly "rows": ReadonlyArray<{
452
+ readonly "id": string;
453
+ readonly "organizationId"?: string | null;
454
+ readonly "type": string;
455
+ readonly "subtype"?: string | null;
456
+ readonly "action": "C" | "R" | "U" | "D" | "E";
457
+ readonly "outcome": "success" | "failure";
458
+ readonly "outcomeDesc"?: string | null;
459
+ readonly "agent": {
460
+ readonly "userId"?: string;
461
+ readonly "email"?: string;
462
+ readonly "ip"?: string;
463
+ readonly "userAgent"?: string;
464
+ };
465
+ readonly "source"?: {
466
+ readonly "site"?: string;
467
+ readonly "observer"?: string;
468
+ readonly "integrity"?: string;
469
+ } | null;
470
+ readonly "entity"?: {
471
+ readonly "resourceType"?: string;
472
+ readonly "resourceId"?: string;
473
+ readonly "query"?: string;
474
+ readonly "patients"?: ReadonlyArray<string>;
475
+ } | null;
476
+ readonly "recorded": string;
477
+ }>;
478
+ readonly "total": number;
479
+ };
480
+ };
481
+ "GET /admin/audit/patient/:patientId": {
482
+ readonly status: 200;
483
+ readonly body: {
484
+ readonly "rows": ReadonlyArray<{
485
+ readonly "id": string;
486
+ readonly "organizationId"?: string | null;
487
+ readonly "type": string;
488
+ readonly "subtype"?: string | null;
489
+ readonly "action": "C" | "R" | "U" | "D" | "E";
490
+ readonly "outcome": "success" | "failure";
491
+ readonly "outcomeDesc"?: string | null;
492
+ readonly "agent": {
493
+ readonly "userId"?: string;
494
+ readonly "email"?: string;
495
+ readonly "ip"?: string;
496
+ readonly "userAgent"?: string;
497
+ };
498
+ readonly "source"?: {
499
+ readonly "site"?: string;
500
+ readonly "observer"?: string;
501
+ readonly "integrity"?: string;
502
+ } | null;
503
+ readonly "entity"?: {
504
+ readonly "resourceType"?: string;
505
+ readonly "resourceId"?: string;
506
+ readonly "query"?: string;
507
+ readonly "patients"?: ReadonlyArray<string>;
508
+ } | null;
509
+ readonly "recorded": string;
510
+ }>;
511
+ readonly "total": number;
512
+ };
513
+ };
514
+ "GET /admin/audit/user/:userId": {
515
+ readonly status: 200;
516
+ readonly body: {
517
+ readonly "rows": ReadonlyArray<{
518
+ readonly "id": string;
519
+ readonly "organizationId"?: string | null;
520
+ readonly "type": string;
521
+ readonly "subtype"?: string | null;
522
+ readonly "action": "C" | "R" | "U" | "D" | "E";
523
+ readonly "outcome": "success" | "failure";
524
+ readonly "outcomeDesc"?: string | null;
525
+ readonly "agent": {
526
+ readonly "userId"?: string;
527
+ readonly "email"?: string;
528
+ readonly "ip"?: string;
529
+ readonly "userAgent"?: string;
530
+ };
531
+ readonly "source"?: {
532
+ readonly "site"?: string;
533
+ readonly "observer"?: string;
534
+ readonly "integrity"?: string;
535
+ } | null;
536
+ readonly "entity"?: {
537
+ readonly "resourceType"?: string;
538
+ readonly "resourceId"?: string;
539
+ readonly "query"?: string;
540
+ readonly "patients"?: ReadonlyArray<string>;
541
+ } | null;
542
+ readonly "recorded": string;
543
+ }>;
544
+ readonly "total": number;
545
+ };
546
+ };
547
+ "GET /admin/email-log": {
548
+ readonly status: 200;
549
+ readonly body: {
550
+ readonly "entries": ReadonlyArray<{
551
+ readonly "id": string;
552
+ readonly "appId": string | null;
553
+ readonly "toAddress": string;
554
+ readonly "subject": string;
555
+ readonly "template": string;
556
+ readonly "status": string;
557
+ readonly "attempts": number;
558
+ readonly "lastError": string | null;
559
+ readonly "queuedAt": string;
560
+ readonly "deliveredAt": string | null;
561
+ readonly "failedAt": string | null;
562
+ }>;
563
+ readonly "nextCursor": string | null;
564
+ };
565
+ };
566
+ "GET /billing/catalog": {
567
+ readonly status: 200;
568
+ readonly body: {
569
+ readonly "plans": ReadonlyArray<{
570
+ readonly "name": string;
571
+ readonly "displayName": string;
572
+ readonly "limits": {
573
+ readonly "patients": string | number;
574
+ readonly "practitioners": string | number;
575
+ readonly "users": string | number;
576
+ readonly "apiKeys": string | number;
577
+ readonly "requests": string | number;
578
+ readonly "rateLimit": string | number;
579
+ readonly "writeLimit": string | number;
580
+ };
581
+ readonly "features": {
582
+ readonly "smart_on_fhir": boolean;
583
+ readonly "bulk_export": boolean;
584
+ readonly "webhooks": boolean;
585
+ };
586
+ readonly "pricing": {
587
+ readonly "currency": "USD";
588
+ readonly "monthlyPriceCents": string | number | null;
589
+ readonly "annualPriceCents": string | number | null;
590
+ readonly "launchEndsAt": string | null;
591
+ readonly "annualMonthlyEquivalentCents": string | number | null;
592
+ readonly "annualSavingsCents": string | number | null;
593
+ readonly "freeMonths": string | number;
594
+ };
595
+ readonly "support": "community" | "email" | "dedicated";
596
+ readonly "sla": "none" | "standard" | "custom";
597
+ readonly "checkout": {
598
+ readonly "month": boolean;
599
+ readonly "year": boolean;
600
+ };
601
+ }>;
602
+ };
603
+ };
604
+ "GET /billing/plan": {
605
+ readonly status: 200;
606
+ readonly body: {
607
+ readonly "organizationId": string;
608
+ readonly "tier": {
609
+ readonly "id": string;
610
+ readonly "name": string;
611
+ readonly "displayName": string;
612
+ readonly "description": string | null;
613
+ readonly "isActive": boolean;
614
+ readonly "maxPatients": number;
615
+ readonly "maxPractitioners": number;
616
+ readonly "maxUsers": number;
617
+ readonly "maxApiKeys": number;
618
+ readonly "maxRequestsPerMonth": number;
619
+ readonly "rateLimitPerMinute": number;
620
+ readonly "writeLimitPerMinute": number;
621
+ readonly "features": {
622
+ readonly [key: string]: boolean;
623
+ };
624
+ readonly "commercial": {
625
+ readonly "published": boolean;
626
+ readonly "currency": "USD";
627
+ readonly "monthlyPriceCents": string | number | null;
628
+ readonly "annualPriceCents": string | number | null;
629
+ readonly "launchEndsAt": string | null;
630
+ readonly "support": "community" | "email" | "dedicated";
631
+ readonly "sla": "none" | "standard" | "custom";
632
+ } | null;
633
+ readonly "createdAt": string;
634
+ readonly "updatedAt": string;
635
+ };
636
+ readonly "effectiveLimits": {
637
+ readonly "tierName": string;
638
+ readonly "tierDisplayName": string;
639
+ readonly "maxPatients": number;
640
+ readonly "maxPractitioners": number;
641
+ readonly "maxUsers": number;
642
+ readonly "maxApiKeys": number;
643
+ readonly "maxRequestsPerMonth": number;
644
+ readonly "rateLimitPerMinute": number;
645
+ readonly "writeLimitPerMinute": number;
646
+ readonly "features": {
647
+ readonly [key: string]: boolean;
648
+ };
649
+ };
650
+ readonly "assignedAt": string;
651
+ readonly "assignedBy": string | null;
652
+ readonly "notes": string | null;
653
+ readonly "hasOverrides": boolean;
654
+ };
655
+ };
656
+ "GET /billing/usage/history": {
657
+ readonly status: 200;
658
+ readonly body: {
659
+ readonly "entries": ReadonlyArray<{
660
+ readonly "id": string;
661
+ readonly "organizationId": string;
662
+ readonly "period": string;
663
+ readonly "requestCount": number;
664
+ readonly "resourceCount": number;
665
+ readonly "storageBytes": number;
666
+ readonly "lastUpdated": string;
667
+ }>;
668
+ readonly "total": number;
669
+ };
670
+ };
671
+ "GET /billing/usage": {
672
+ readonly status: 200;
673
+ readonly body: {
674
+ readonly "organizationId": string;
675
+ readonly "tierName": string;
676
+ readonly "patients": {
677
+ readonly "current": number;
678
+ readonly "limit": number;
679
+ readonly "remaining": number;
680
+ readonly "percentUsed": number;
681
+ };
682
+ readonly "practitioners": {
683
+ readonly "current": number;
684
+ readonly "limit": number;
685
+ readonly "remaining": number;
686
+ readonly "percentUsed": number;
687
+ };
688
+ readonly "users": {
689
+ readonly "current": number;
690
+ readonly "limit": number;
691
+ readonly "remaining": number;
692
+ readonly "percentUsed": number;
693
+ };
694
+ readonly "apiKeys": {
695
+ readonly "current": number;
696
+ readonly "limit": number;
697
+ readonly "remaining": number;
698
+ readonly "percentUsed": number;
699
+ };
700
+ readonly "requestsThisMonth": {
701
+ readonly "current": number;
702
+ readonly "limit": number;
703
+ readonly "remaining": number;
704
+ readonly "percentUsed": number;
705
+ };
706
+ };
707
+ };
708
+ "DELETE /files/:fileId": {
709
+ readonly status: 200;
710
+ readonly body: {
711
+ readonly "success": boolean;
712
+ };
713
+ };
714
+ "GET /files/:fileId": {
715
+ readonly status: 200;
716
+ readonly body: ReadableStream<Uint8Array>;
717
+ };
718
+ "POST /files/upload": {
719
+ readonly status: 200;
720
+ readonly body: {
721
+ readonly "id": string;
722
+ readonly "key": string;
723
+ readonly "contentType": string;
724
+ readonly "size": number;
725
+ readonly "url": string;
726
+ };
727
+ };
728
+ "GET /health": {
729
+ readonly status: 200;
730
+ readonly body: {
731
+ readonly "status": "ok" | "degraded" | "down";
732
+ readonly "timestamp": string;
733
+ };
734
+ };
735
+ "GET /health/history": {
736
+ readonly status: 200;
737
+ readonly body: {
738
+ readonly "range": {
739
+ readonly "from": string;
740
+ readonly "to": string;
741
+ readonly "bucket": "1m" | "5m" | "1h" | "1d";
742
+ };
743
+ readonly "uptime": {
744
+ readonly "percent": number;
745
+ readonly "samples": number;
746
+ readonly "days": number;
747
+ };
748
+ readonly "overall": ReadonlyArray<{
749
+ readonly "at": string;
750
+ readonly "status": "ok" | "degraded" | "down";
751
+ }>;
752
+ readonly "components": {
753
+ readonly "database": ReadonlyArray<{
754
+ readonly "at": string;
755
+ readonly "status": "ok" | "degraded" | "down" | null;
756
+ }>;
757
+ readonly "redis": ReadonlyArray<{
758
+ readonly "at": string;
759
+ readonly "status": "ok" | "degraded" | "down" | null;
760
+ }>;
761
+ readonly "storage": ReadonlyArray<{
762
+ readonly "at": string;
763
+ readonly "status": "ok" | "degraded" | "down" | null;
764
+ }>;
765
+ readonly "email": ReadonlyArray<{
766
+ readonly "at": string;
767
+ readonly "status": "ok" | "degraded" | "down" | null;
768
+ }>;
769
+ readonly "queues": ReadonlyArray<{
770
+ readonly "at": string;
771
+ readonly "status": "ok" | "degraded" | "down" | null;
772
+ }>;
773
+ readonly "backup": ReadonlyArray<{
774
+ readonly "at": string;
775
+ readonly "status": "ok" | "degraded" | "down" | null;
776
+ }>;
777
+ readonly "vault": ReadonlyArray<{
778
+ readonly "at": string;
779
+ readonly "status": "ok" | "degraded" | "down" | null;
780
+ }>;
781
+ };
782
+ };
783
+ };
784
+ "GET /health/live": {
785
+ readonly status: 200;
786
+ readonly body: {
787
+ readonly "status": "ok";
788
+ };
789
+ };
790
+ "GET /health/ready": {
791
+ readonly status: 200;
792
+ readonly body: {
793
+ readonly "status": "ok" | "degraded" | "down";
794
+ readonly "timestamp": string;
795
+ readonly "checks": {
796
+ readonly "database": {
797
+ readonly "status": string;
798
+ };
799
+ readonly "redis": {
800
+ readonly "status": string;
801
+ };
802
+ readonly "storage": {
803
+ readonly "status": string;
804
+ };
805
+ readonly "email": {
806
+ readonly "status": string;
807
+ };
808
+ readonly "queues": {
809
+ readonly "status": string;
810
+ };
811
+ readonly "backup": {
812
+ readonly "status": string;
813
+ readonly "heartbeatAt"?: string;
814
+ };
815
+ readonly "vault": {
816
+ readonly "status": string;
817
+ };
818
+ };
819
+ };
820
+ };
821
+ "GET /organizations/:id/cors-origins": {
822
+ readonly status: 200;
823
+ readonly body: {
824
+ readonly "origins": ReadonlyArray<string>;
825
+ };
826
+ };
827
+ "PUT /organizations/:id/cors-origins": {
828
+ readonly status: 200;
829
+ readonly body: {
830
+ readonly "origins": ReadonlyArray<string>;
831
+ };
832
+ };
833
+ "POST /pharmacy/adjust": {
834
+ readonly status: 200;
835
+ readonly body: {
836
+ readonly "id": string;
837
+ readonly "organizationId": string;
838
+ readonly "medicationId": string;
839
+ readonly "locationId": string;
840
+ readonly "quantity": string | number;
841
+ readonly "minQuantity": number | null;
842
+ readonly "maxQuantity": number | null;
843
+ readonly "lotNumber": string | null;
844
+ readonly "expirationDate": string | null;
845
+ readonly "lastRestockedAt": string | null;
846
+ readonly "createdAt": string;
847
+ readonly "updatedAt": string;
848
+ };
849
+ };
850
+ "POST /pharmacy/dispense": {
851
+ readonly status: 200;
852
+ readonly body: {
853
+ readonly "id": string;
854
+ readonly "organizationId": string;
855
+ readonly "medicationId": string;
856
+ readonly "locationId": string;
857
+ readonly "quantity": string | number;
858
+ readonly "minQuantity": number | null;
859
+ readonly "maxQuantity": number | null;
860
+ readonly "lotNumber": string | null;
861
+ readonly "expirationDate": string | null;
862
+ readonly "lastRestockedAt": string | null;
863
+ readonly "createdAt": string;
864
+ readonly "updatedAt": string;
865
+ };
866
+ };
867
+ "GET /pharmacy/expiring": {
868
+ readonly status: 200;
869
+ readonly body: ReadonlyArray<{
870
+ readonly "id": string;
871
+ readonly "organizationId": string;
872
+ readonly "medicationId": string;
873
+ readonly "locationId": string;
874
+ readonly "quantity": string | number;
875
+ readonly "minQuantity": number | null;
876
+ readonly "maxQuantity": number | null;
877
+ readonly "lotNumber": string | null;
878
+ readonly "expirationDate": string | null;
879
+ readonly "lastRestockedAt": string | null;
880
+ readonly "createdAt": string;
881
+ readonly "updatedAt": string;
882
+ }>;
883
+ };
884
+ "GET /pharmacy/low-stock": {
885
+ readonly status: 200;
886
+ readonly body: ReadonlyArray<{
887
+ readonly "id": string;
888
+ readonly "organizationId": string;
889
+ readonly "medicationId": string;
890
+ readonly "locationId": string;
891
+ readonly "quantity": string | number;
892
+ readonly "minQuantity": number | null;
893
+ readonly "maxQuantity": number | null;
894
+ readonly "lotNumber": string | null;
895
+ readonly "expirationDate": string | null;
896
+ readonly "lastRestockedAt": string | null;
897
+ readonly "createdAt": string;
898
+ readonly "updatedAt": string;
899
+ }>;
900
+ };
901
+ "POST /pharmacy/restock": {
902
+ readonly status: 201;
903
+ readonly body: {
904
+ readonly "id": string;
905
+ readonly "organizationId": string;
906
+ readonly "medicationId": string;
907
+ readonly "locationId": string;
908
+ readonly "quantity": string | number;
909
+ readonly "minQuantity": number | null;
910
+ readonly "maxQuantity": number | null;
911
+ readonly "lotNumber": string | null;
912
+ readonly "expirationDate": string | null;
913
+ readonly "lastRestockedAt": string | null;
914
+ readonly "createdAt": string;
915
+ readonly "updatedAt": string;
916
+ };
917
+ };
918
+ "GET /pharmacy/stock": {
919
+ readonly status: 200;
920
+ readonly body: ReadonlyArray<{
921
+ readonly "id": string;
922
+ readonly "organizationId": string;
923
+ readonly "medicationId": string;
924
+ readonly "locationId": string;
925
+ readonly "quantity": string | number;
926
+ readonly "minQuantity": number | null;
927
+ readonly "maxQuantity": number | null;
928
+ readonly "lotNumber": string | null;
929
+ readonly "expirationDate": string | null;
930
+ readonly "lastRestockedAt": string | null;
931
+ readonly "createdAt": string;
932
+ readonly "updatedAt": string;
933
+ }>;
934
+ };
935
+ "GET /plan/quota": {
936
+ readonly status: 200;
937
+ readonly body: {
938
+ readonly "patients": {
939
+ readonly "current": number;
940
+ readonly "limit": number;
941
+ };
942
+ readonly "practitioners": {
943
+ readonly "current": number;
944
+ readonly "limit": number;
945
+ };
946
+ readonly "apiKeys": {
947
+ readonly "current": number;
948
+ readonly "limit": number;
949
+ };
950
+ };
951
+ };
952
+ "POST /queue/:id/complete": {
953
+ readonly status: 200;
954
+ readonly body: {
955
+ readonly "id": string;
956
+ readonly "organizationId": string;
957
+ readonly "patientId": string;
958
+ readonly "appointmentId": string | null;
959
+ readonly "locationId": string | null;
960
+ readonly "practitionerId": string | null;
961
+ readonly "status": string;
962
+ readonly "priority": number;
963
+ readonly "queueNumber": number | null;
964
+ readonly "checkedInAt": string;
965
+ readonly "calledAt": string | null;
966
+ readonly "startedAt": string | null;
967
+ readonly "completedAt": string | null;
968
+ readonly "note": string | null;
969
+ readonly "createdAt": string;
970
+ readonly "updatedAt": string;
971
+ };
972
+ };
973
+ "POST /queue/:id/no-show": {
974
+ readonly status: 200;
975
+ readonly body: {
976
+ readonly "id": string;
977
+ readonly "organizationId": string;
978
+ readonly "patientId": string;
979
+ readonly "appointmentId": string | null;
980
+ readonly "locationId": string | null;
981
+ readonly "practitionerId": string | null;
982
+ readonly "status": string;
983
+ readonly "priority": number;
984
+ readonly "queueNumber": number | null;
985
+ readonly "checkedInAt": string;
986
+ readonly "calledAt": string | null;
987
+ readonly "startedAt": string | null;
988
+ readonly "completedAt": string | null;
989
+ readonly "note": string | null;
990
+ readonly "createdAt": string;
991
+ readonly "updatedAt": string;
992
+ };
993
+ };
994
+ "POST /queue/:id/start": {
995
+ readonly status: 200;
996
+ readonly body: {
997
+ readonly "id": string;
998
+ readonly "organizationId": string;
999
+ readonly "patientId": string;
1000
+ readonly "appointmentId": string | null;
1001
+ readonly "locationId": string | null;
1002
+ readonly "practitionerId": string | null;
1003
+ readonly "status": string;
1004
+ readonly "priority": number;
1005
+ readonly "queueNumber": number | null;
1006
+ readonly "checkedInAt": string;
1007
+ readonly "calledAt": string | null;
1008
+ readonly "startedAt": string | null;
1009
+ readonly "completedAt": string | null;
1010
+ readonly "note": string | null;
1011
+ readonly "createdAt": string;
1012
+ readonly "updatedAt": string;
1013
+ };
1014
+ };
1015
+ "GET /queue/board": {
1016
+ readonly status: 200;
1017
+ readonly body: {
1018
+ readonly "waiting": ReadonlyArray<{
1019
+ readonly "id": string;
1020
+ readonly "organizationId": string;
1021
+ readonly "patientId": string;
1022
+ readonly "appointmentId": string | null;
1023
+ readonly "locationId": string | null;
1024
+ readonly "practitionerId": string | null;
1025
+ readonly "status": string;
1026
+ readonly "priority": number;
1027
+ readonly "queueNumber": number | null;
1028
+ readonly "checkedInAt": string;
1029
+ readonly "calledAt": string | null;
1030
+ readonly "startedAt": string | null;
1031
+ readonly "completedAt": string | null;
1032
+ readonly "note": string | null;
1033
+ readonly "createdAt": string;
1034
+ readonly "updatedAt": string;
1035
+ }>;
1036
+ readonly "called": ReadonlyArray<{
1037
+ readonly "id": string;
1038
+ readonly "organizationId": string;
1039
+ readonly "patientId": string;
1040
+ readonly "appointmentId": string | null;
1041
+ readonly "locationId": string | null;
1042
+ readonly "practitionerId": string | null;
1043
+ readonly "status": string;
1044
+ readonly "priority": number;
1045
+ readonly "queueNumber": number | null;
1046
+ readonly "checkedInAt": string;
1047
+ readonly "calledAt": string | null;
1048
+ readonly "startedAt": string | null;
1049
+ readonly "completedAt": string | null;
1050
+ readonly "note": string | null;
1051
+ readonly "createdAt": string;
1052
+ readonly "updatedAt": string;
1053
+ }>;
1054
+ readonly "inProgress": ReadonlyArray<{
1055
+ readonly "id": string;
1056
+ readonly "organizationId": string;
1057
+ readonly "patientId": string;
1058
+ readonly "appointmentId": string | null;
1059
+ readonly "locationId": string | null;
1060
+ readonly "practitionerId": string | null;
1061
+ readonly "status": string;
1062
+ readonly "priority": number;
1063
+ readonly "queueNumber": number | null;
1064
+ readonly "checkedInAt": string;
1065
+ readonly "calledAt": string | null;
1066
+ readonly "startedAt": string | null;
1067
+ readonly "completedAt": string | null;
1068
+ readonly "note": string | null;
1069
+ readonly "createdAt": string;
1070
+ readonly "updatedAt": string;
1071
+ }>;
1072
+ readonly "completed": ReadonlyArray<{
1073
+ readonly "id": string;
1074
+ readonly "organizationId": string;
1075
+ readonly "patientId": string;
1076
+ readonly "appointmentId": string | null;
1077
+ readonly "locationId": string | null;
1078
+ readonly "practitionerId": string | null;
1079
+ readonly "status": string;
1080
+ readonly "priority": number;
1081
+ readonly "queueNumber": number | null;
1082
+ readonly "checkedInAt": string;
1083
+ readonly "calledAt": string | null;
1084
+ readonly "startedAt": string | null;
1085
+ readonly "completedAt": string | null;
1086
+ readonly "note": string | null;
1087
+ readonly "createdAt": string;
1088
+ readonly "updatedAt": string;
1089
+ }>;
1090
+ };
1091
+ };
1092
+ "POST /queue/call-next": {
1093
+ readonly status: 200;
1094
+ readonly body: {
1095
+ readonly "id": string;
1096
+ readonly "organizationId": string;
1097
+ readonly "patientId": string;
1098
+ readonly "appointmentId": string | null;
1099
+ readonly "locationId": string | null;
1100
+ readonly "practitionerId": string | null;
1101
+ readonly "status": string;
1102
+ readonly "priority": number;
1103
+ readonly "queueNumber": number | null;
1104
+ readonly "checkedInAt": string;
1105
+ readonly "calledAt": string | null;
1106
+ readonly "startedAt": string | null;
1107
+ readonly "completedAt": string | null;
1108
+ readonly "note": string | null;
1109
+ readonly "createdAt": string;
1110
+ readonly "updatedAt": string;
1111
+ };
1112
+ };
1113
+ "POST /queue/check-in": {
1114
+ readonly status: 201;
1115
+ readonly body: {
1116
+ readonly "id": string;
1117
+ readonly "organizationId": string;
1118
+ readonly "patientId": string;
1119
+ readonly "appointmentId": string | null;
1120
+ readonly "locationId": string | null;
1121
+ readonly "practitionerId": string | null;
1122
+ readonly "status": string;
1123
+ readonly "priority": number;
1124
+ readonly "queueNumber": number | null;
1125
+ readonly "checkedInAt": string;
1126
+ readonly "calledAt": string | null;
1127
+ readonly "startedAt": string | null;
1128
+ readonly "completedAt": string | null;
1129
+ readonly "note": string | null;
1130
+ readonly "createdAt": string;
1131
+ readonly "updatedAt": string;
1132
+ };
1133
+ };
1134
+ "GET /queue/stats": {
1135
+ readonly status: 200;
1136
+ readonly body: ReadonlyArray<{
1137
+ readonly "status": string;
1138
+ readonly "count": number;
1139
+ readonly "avgWaitMinutes": number | null;
1140
+ }>;
1141
+ };
1142
+ "GET /queue/waiting": {
1143
+ readonly status: 200;
1144
+ readonly body: ReadonlyArray<{
1145
+ readonly "id": string;
1146
+ readonly "organizationId": string;
1147
+ readonly "patientId": string;
1148
+ readonly "appointmentId": string | null;
1149
+ readonly "locationId": string | null;
1150
+ readonly "practitionerId": string | null;
1151
+ readonly "status": string;
1152
+ readonly "priority": number;
1153
+ readonly "queueNumber": number | null;
1154
+ readonly "checkedInAt": string;
1155
+ readonly "calledAt": string | null;
1156
+ readonly "startedAt": string | null;
1157
+ readonly "completedAt": string | null;
1158
+ readonly "note": string | null;
1159
+ readonly "createdAt": string;
1160
+ readonly "updatedAt": string;
1161
+ }>;
1162
+ };
1163
+ "DELETE /smart/apps/:id": {
1164
+ readonly status: 204;
1165
+ readonly body: undefined;
1166
+ };
1167
+ "GET /smart/apps/:id": {
1168
+ readonly status: 200;
1169
+ readonly body: {
1170
+ readonly "id": string;
1171
+ readonly "clientId": string;
1172
+ readonly "name": string;
1173
+ readonly "description"?: string;
1174
+ readonly "redirectUris": ReadonlyArray<string>;
1175
+ readonly "scopes": ReadonlyArray<string>;
1176
+ readonly "launchUri"?: string;
1177
+ readonly "logoUri"?: string;
1178
+ readonly "isConfidential": boolean;
1179
+ readonly "active": boolean;
1180
+ readonly "createdAt": string;
1181
+ readonly "updatedAt": string;
1182
+ };
1183
+ };
1184
+ "PUT /smart/apps/:id": {
1185
+ readonly status: 200;
1186
+ readonly body: {
1187
+ readonly "id": string;
1188
+ readonly "clientId": string;
1189
+ readonly "name": string;
1190
+ readonly "description"?: string;
1191
+ readonly "redirectUris": ReadonlyArray<string>;
1192
+ readonly "scopes": ReadonlyArray<string>;
1193
+ readonly "launchUri"?: string;
1194
+ readonly "logoUri"?: string;
1195
+ readonly "isConfidential": boolean;
1196
+ readonly "active": boolean;
1197
+ readonly "createdAt": string;
1198
+ readonly "updatedAt": string;
1199
+ };
1200
+ };
1201
+ "GET /smart/apps": {
1202
+ readonly status: 200;
1203
+ readonly body: {
1204
+ readonly "items": ReadonlyArray<{
1205
+ readonly "id": string;
1206
+ readonly "clientId": string;
1207
+ readonly "name": string;
1208
+ readonly "description"?: string;
1209
+ readonly "redirectUris": ReadonlyArray<string>;
1210
+ readonly "scopes": ReadonlyArray<string>;
1211
+ readonly "launchUri"?: string;
1212
+ readonly "logoUri"?: string;
1213
+ readonly "isConfidential": boolean;
1214
+ readonly "active": boolean;
1215
+ readonly "createdAt": string;
1216
+ readonly "updatedAt": string;
1217
+ }>;
1218
+ readonly "total": number;
1219
+ };
1220
+ };
1221
+ "POST /smart/apps": {
1222
+ readonly status: 201;
1223
+ readonly body: {
1224
+ readonly "id": string;
1225
+ readonly "clientId": string;
1226
+ readonly "name": string;
1227
+ readonly "description"?: string;
1228
+ readonly "redirectUris": ReadonlyArray<string>;
1229
+ readonly "scopes": ReadonlyArray<string>;
1230
+ readonly "launchUri"?: string;
1231
+ readonly "logoUri"?: string;
1232
+ readonly "isConfidential": boolean;
1233
+ readonly "active": boolean;
1234
+ readonly "createdAt": string;
1235
+ readonly "updatedAt": string;
1236
+ readonly "clientSecret": string;
1237
+ };
1238
+ };
1239
+ "POST /tenant-apps/:id/backfill-patient-consents": {
1240
+ readonly status: 200;
1241
+ readonly body: {
1242
+ readonly "created": number;
1243
+ readonly "skipped": number;
1244
+ readonly "total": number;
1245
+ };
1246
+ };
1247
+ "POST /tenant-apps/:id/email/test": {
1248
+ readonly status: 200;
1249
+ readonly body: {
1250
+ readonly "delivered": true;
1251
+ };
1252
+ };
1253
+ "GET /tenant-apps/:id/roles/:roleId/users": {
1254
+ readonly status: 200;
1255
+ readonly body: {
1256
+ readonly "items": ReadonlyArray<{
1257
+ readonly "id": string;
1258
+ readonly "email": string;
1259
+ }>;
1260
+ readonly "total": number;
1261
+ };
1262
+ };
1263
+ "DELETE /tenant-apps/:id/roles/:roleId": {
1264
+ readonly status: 204;
1265
+ readonly body: undefined;
1266
+ };
1267
+ "PATCH /tenant-apps/:id/roles/:roleId": {
1268
+ readonly status: 200;
1269
+ readonly body: {
1270
+ readonly "id": string;
1271
+ readonly "name": string;
1272
+ readonly "isStaff": boolean;
1273
+ readonly "permissions": ReadonlyArray<{
1274
+ readonly "resource": string;
1275
+ readonly "action": string;
1276
+ }>;
1277
+ readonly "organizationId": string;
1278
+ readonly "displayName": string | null;
1279
+ readonly "description": string | null;
1280
+ readonly "isSystem": boolean;
1281
+ readonly "createdAt": string;
1282
+ readonly "updatedAt": string;
1283
+ };
1284
+ };
1285
+ "GET /tenant-apps/:id/roles": {
1286
+ readonly status: 200;
1287
+ readonly body: {
1288
+ readonly "items": ReadonlyArray<{
1289
+ readonly "id": string;
1290
+ readonly "name": string;
1291
+ readonly "isStaff": boolean;
1292
+ readonly "permissions": ReadonlyArray<{
1293
+ readonly "resource": string;
1294
+ readonly "action": string;
1295
+ }>;
1296
+ readonly "organizationId": string;
1297
+ readonly "displayName": string | null;
1298
+ readonly "description": string | null;
1299
+ readonly "isSystem": boolean;
1300
+ readonly "createdAt": string;
1301
+ readonly "updatedAt": string;
1302
+ readonly "userCount": number;
1303
+ }>;
1304
+ readonly "total": number;
1305
+ };
1306
+ };
1307
+ "POST /tenant-apps/:id/roles": {
1308
+ readonly status: 201;
1309
+ readonly body: {
1310
+ readonly "id": string;
1311
+ readonly "name": string;
1312
+ readonly "isStaff": boolean;
1313
+ readonly "permissions": ReadonlyArray<{
1314
+ readonly "resource": string;
1315
+ readonly "action": string;
1316
+ }>;
1317
+ readonly "organizationId": string;
1318
+ readonly "displayName": string | null;
1319
+ readonly "description": string | null;
1320
+ readonly "isSystem": boolean;
1321
+ readonly "createdAt": string;
1322
+ readonly "updatedAt": string;
1323
+ };
1324
+ };
1325
+ "POST /tenant-apps/:id/staff-invitations": {
1326
+ readonly status: 201;
1327
+ readonly body: {
1328
+ readonly "invitationId": string;
1329
+ readonly "practitionerId": string;
1330
+ };
1331
+ };
1332
+ "GET /tenant-apps/:id/stats": {
1333
+ readonly status: 200;
1334
+ readonly body: {
1335
+ readonly "userCount": number;
1336
+ readonly "activeSessionsLast24h": number;
1337
+ readonly "signupsLast7d": number;
1338
+ readonly "lastActivityAt": string | null;
1339
+ };
1340
+ };
1341
+ "POST /tenant-apps/:id/user-invitations/:invId/resend": {
1342
+ readonly status: 200;
1343
+ readonly body: {
1344
+ readonly "message": string;
1345
+ };
1346
+ };
1347
+ "DELETE /tenant-apps/:id/user-invitations/:invId": {
1348
+ readonly status: 204;
1349
+ readonly body: undefined;
1350
+ };
1351
+ "POST /tenant-apps/:id/user-invitations/bulk": {
1352
+ readonly status: 200;
1353
+ readonly body: {
1354
+ readonly "created": ReadonlyArray<{
1355
+ readonly "email": string;
1356
+ readonly "invitationId": string;
1357
+ }>;
1358
+ readonly "failed": ReadonlyArray<{
1359
+ readonly "email": string;
1360
+ readonly "error": string;
1361
+ }>;
1362
+ };
1363
+ };
1364
+ "GET /tenant-apps/:id/user-invitations": {
1365
+ readonly status: 200;
1366
+ readonly body: {
1367
+ readonly "items": ReadonlyArray<{
1368
+ readonly "id": string;
1369
+ readonly "email": string;
1370
+ readonly "hasLinkedPatient": boolean;
1371
+ readonly "hasLinkedPractitioner": boolean;
1372
+ readonly "hasLinkedRole": boolean;
1373
+ readonly "expiresAt": string;
1374
+ readonly "createdAt": string;
1375
+ }>;
1376
+ readonly "total": number;
1377
+ };
1378
+ };
1379
+ "POST /tenant-apps/:id/user-invitations": {
1380
+ readonly status: 201;
1381
+ readonly body: {
1382
+ readonly "invitationId": string;
1383
+ };
1384
+ };
1385
+ "DELETE /tenant-apps/:id/users/:userId/roles/:roleId": {
1386
+ readonly status: 204;
1387
+ readonly body: undefined;
1388
+ };
1389
+ "POST /tenant-apps/:id/users/:userId/roles/:roleId": {
1390
+ readonly status: 204;
1391
+ readonly body: undefined;
1392
+ };
1393
+ "GET /tenant-apps/:id/users/:userId/roles": {
1394
+ readonly status: 200;
1395
+ readonly body: {
1396
+ readonly "items": ReadonlyArray<{
1397
+ readonly "id": string;
1398
+ readonly "name": string;
1399
+ readonly "isStaff": boolean;
1400
+ readonly "permissions": ReadonlyArray<{
1401
+ readonly "resource": string;
1402
+ readonly "action": string;
1403
+ }>;
1404
+ }>;
1405
+ readonly "total": number;
1406
+ };
1407
+ };
1408
+ "POST /tenant-apps/:id/users/:userId/send-password-reset": {
1409
+ readonly status: 204;
1410
+ readonly body: undefined;
1411
+ };
1412
+ "POST /tenant-apps/:id/users/:userId/verify-email": {
1413
+ readonly status: 204;
1414
+ readonly body: undefined;
1415
+ };
1416
+ "DELETE /tenant-apps/:id/users/:userId": {
1417
+ readonly status: 204;
1418
+ readonly body: undefined;
1419
+ };
1420
+ "GET /tenant-apps/:id/users/:userId": {
1421
+ readonly status: 200;
1422
+ readonly body: {
1423
+ readonly "id": string;
1424
+ readonly "appId": string;
1425
+ readonly "email": string;
1426
+ readonly "firstName": string | null;
1427
+ readonly "lastName": string | null;
1428
+ readonly "isActive": boolean;
1429
+ readonly "emailVerified": boolean;
1430
+ readonly "mfaEnabled": boolean;
1431
+ readonly "lastLoginAt": string | null;
1432
+ readonly "patientId": string | null;
1433
+ readonly "practitionerId": string | null;
1434
+ readonly "createdAt": string;
1435
+ readonly "lockedUntil": string | null;
1436
+ readonly "failedLoginAttempts": string | number;
1437
+ readonly "roles": ReadonlyArray<{
1438
+ readonly "id": string;
1439
+ readonly "name": string;
1440
+ readonly "isStaff": boolean;
1441
+ }>;
1442
+ };
1443
+ };
1444
+ "PATCH /tenant-apps/:id/users/:userId": {
1445
+ readonly status: 204;
1446
+ readonly body: undefined;
1447
+ };
1448
+ "GET /tenant-apps/:id/users": {
1449
+ readonly status: 200;
1450
+ readonly body: {
1451
+ readonly "users": ReadonlyArray<{
1452
+ readonly "id": string;
1453
+ readonly "appId": string;
1454
+ readonly "email": string;
1455
+ readonly "firstName": string | null;
1456
+ readonly "lastName": string | null;
1457
+ readonly "isActive": boolean;
1458
+ readonly "emailVerified": boolean;
1459
+ readonly "mfaEnabled": boolean;
1460
+ readonly "lastLoginAt": string | null;
1461
+ readonly "patientId": string | null;
1462
+ readonly "practitionerId": string | null;
1463
+ readonly "createdAt": string;
1464
+ readonly "lockedUntil": string | null;
1465
+ readonly "failedLoginAttempts": string | number;
1466
+ readonly "roles": ReadonlyArray<{
1467
+ readonly "id": string;
1468
+ readonly "name": string;
1469
+ readonly "isStaff": boolean;
1470
+ }>;
1471
+ }>;
1472
+ readonly "nextCursor": string | null;
1473
+ };
1474
+ };
1475
+ "GET /tenant-apps/:id/webhooks/:webhookId/deliveries": {
1476
+ readonly status: 200;
1477
+ readonly body: {
1478
+ readonly "deliveries": ReadonlyArray<{
1479
+ readonly "id": string;
1480
+ readonly "webhookId": string;
1481
+ readonly "eventId": string;
1482
+ readonly "eventType": string;
1483
+ readonly "status": "pending" | "delivered" | "failed" | "dead";
1484
+ readonly "attempts": number;
1485
+ readonly "lastStatusCode": number | null;
1486
+ readonly "lastError": string | null;
1487
+ readonly "lastAttemptAt": string | null;
1488
+ readonly "deliveredAt": string | null;
1489
+ readonly "createdAt": string;
1490
+ }>;
1491
+ };
1492
+ };
1493
+ "POST /tenant-apps/:id/webhooks/:webhookId/ping": {
1494
+ readonly status: 200;
1495
+ readonly body: {
1496
+ readonly "deliveryId": string;
1497
+ };
1498
+ };
1499
+ "DELETE /tenant-apps/:id/webhooks/:webhookId": {
1500
+ readonly status: 204;
1501
+ readonly body: undefined;
1502
+ };
1503
+ "GET /tenant-apps/:id/webhooks/:webhookId": {
1504
+ readonly status: 200;
1505
+ readonly body: {
1506
+ readonly "id": string;
1507
+ readonly "appId": string;
1508
+ readonly "url": string;
1509
+ readonly "events": ReadonlyArray<string>;
1510
+ readonly "description": string | null;
1511
+ readonly "active": boolean;
1512
+ readonly "secret"?: string;
1513
+ readonly "createdAt": string;
1514
+ readonly "updatedAt": string;
1515
+ };
1516
+ };
1517
+ "PATCH /tenant-apps/:id/webhooks/:webhookId": {
1518
+ readonly status: 200;
1519
+ readonly body: {
1520
+ readonly "id": string;
1521
+ readonly "appId": string;
1522
+ readonly "url": string;
1523
+ readonly "events": ReadonlyArray<string>;
1524
+ readonly "description": string | null;
1525
+ readonly "active": boolean;
1526
+ readonly "secret"?: string;
1527
+ readonly "createdAt": string;
1528
+ readonly "updatedAt": string;
1529
+ };
1530
+ };
1531
+ "GET /tenant-apps/:id/webhooks": {
1532
+ readonly status: 200;
1533
+ readonly body: {
1534
+ readonly "webhooks": ReadonlyArray<{
1535
+ readonly "id": string;
1536
+ readonly "appId": string;
1537
+ readonly "url": string;
1538
+ readonly "events": ReadonlyArray<string>;
1539
+ readonly "description": string | null;
1540
+ readonly "active": boolean;
1541
+ readonly "secret"?: string;
1542
+ readonly "createdAt": string;
1543
+ readonly "updatedAt": string;
1544
+ }>;
1545
+ };
1546
+ };
1547
+ "POST /tenant-apps/:id/webhooks": {
1548
+ readonly status: 201;
1549
+ readonly body: {
1550
+ readonly "id": string;
1551
+ readonly "appId": string;
1552
+ readonly "url": string;
1553
+ readonly "events": ReadonlyArray<string>;
1554
+ readonly "description": string | null;
1555
+ readonly "active": boolean;
1556
+ readonly "secret"?: string;
1557
+ readonly "createdAt": string;
1558
+ readonly "updatedAt": string;
1559
+ };
1560
+ };
1561
+ "DELETE /tenant-apps/:id": {
1562
+ readonly status: 204;
1563
+ readonly body: undefined;
1564
+ };
1565
+ "GET /tenant-apps/:id": {
1566
+ readonly status: 200;
1567
+ readonly body: {
1568
+ readonly "id": string;
1569
+ readonly "organizationId": string;
1570
+ readonly "publicId": string;
1571
+ readonly "name": string;
1572
+ readonly "active": boolean;
1573
+ readonly "settings": {
1574
+ readonly "appId": string;
1575
+ readonly "appDisplayName": string;
1576
+ readonly "logoUri"?: string | null;
1577
+ readonly "primaryColor"?: string | null;
1578
+ readonly "supportEmail"?: string | null;
1579
+ readonly "footerText"?: string | null;
1580
+ readonly "fromEmail"?: string | null;
1581
+ readonly "fromName"?: string | null;
1582
+ readonly "replyTo"?: string | null;
1583
+ readonly "siteUrl": string;
1584
+ readonly "redirectAllowList": ReadonlyArray<string>;
1585
+ readonly "emailActionPaths"?: {
1586
+ readonly [key: string]: unknown;
1587
+ } | null;
1588
+ readonly "googleEnabled": boolean;
1589
+ readonly "googleClientId"?: string | null;
1590
+ readonly "googleConfigured": boolean;
1591
+ readonly "googleRedirectUri"?: string | null;
1592
+ readonly "webauthnEnabled": boolean;
1593
+ readonly "emailCopy"?: {
1594
+ readonly [key: string]: unknown;
1595
+ } | null;
1596
+ readonly "smtpHost"?: string | null;
1597
+ readonly "smtpPort"?: string | number | null;
1598
+ readonly "smtpSecure": boolean;
1599
+ readonly "smtpUser"?: string | null;
1600
+ readonly "smtpConfigured": boolean;
1601
+ readonly "turnstileSiteKey"?: string | null;
1602
+ readonly "turnstileConfigured": boolean;
1603
+ };
1604
+ readonly "createdAt": string;
1605
+ readonly "updatedAt": string;
1606
+ };
1607
+ };
1608
+ "PATCH /tenant-apps/:id": {
1609
+ readonly status: 200;
1610
+ readonly body: {
1611
+ readonly "id": string;
1612
+ readonly "organizationId": string;
1613
+ readonly "publicId": string;
1614
+ readonly "name": string;
1615
+ readonly "active": boolean;
1616
+ readonly "settings": {
1617
+ readonly "appId": string;
1618
+ readonly "appDisplayName": string;
1619
+ readonly "logoUri"?: string | null;
1620
+ readonly "primaryColor"?: string | null;
1621
+ readonly "supportEmail"?: string | null;
1622
+ readonly "footerText"?: string | null;
1623
+ readonly "fromEmail"?: string | null;
1624
+ readonly "fromName"?: string | null;
1625
+ readonly "replyTo"?: string | null;
1626
+ readonly "siteUrl": string;
1627
+ readonly "redirectAllowList": ReadonlyArray<string>;
1628
+ readonly "emailActionPaths"?: {
1629
+ readonly [key: string]: unknown;
1630
+ } | null;
1631
+ readonly "googleEnabled": boolean;
1632
+ readonly "googleClientId"?: string | null;
1633
+ readonly "googleConfigured": boolean;
1634
+ readonly "googleRedirectUri"?: string | null;
1635
+ readonly "webauthnEnabled": boolean;
1636
+ readonly "emailCopy"?: {
1637
+ readonly [key: string]: unknown;
1638
+ } | null;
1639
+ readonly "smtpHost"?: string | null;
1640
+ readonly "smtpPort"?: string | number | null;
1641
+ readonly "smtpSecure": boolean;
1642
+ readonly "smtpUser"?: string | null;
1643
+ readonly "smtpConfigured": boolean;
1644
+ readonly "turnstileSiteKey"?: string | null;
1645
+ readonly "turnstileConfigured": boolean;
1646
+ };
1647
+ readonly "createdAt": string;
1648
+ readonly "updatedAt": string;
1649
+ };
1650
+ };
1651
+ "GET /tenant-apps": {
1652
+ readonly status: 200;
1653
+ readonly body: {
1654
+ readonly "apps": ReadonlyArray<{
1655
+ readonly "id": string;
1656
+ readonly "organizationId": string;
1657
+ readonly "publicId": string;
1658
+ readonly "name": string;
1659
+ readonly "active": boolean;
1660
+ readonly "settings": {
1661
+ readonly "appId": string;
1662
+ readonly "appDisplayName": string;
1663
+ readonly "logoUri"?: string | null;
1664
+ readonly "primaryColor"?: string | null;
1665
+ readonly "supportEmail"?: string | null;
1666
+ readonly "footerText"?: string | null;
1667
+ readonly "fromEmail"?: string | null;
1668
+ readonly "fromName"?: string | null;
1669
+ readonly "replyTo"?: string | null;
1670
+ readonly "siteUrl": string;
1671
+ readonly "redirectAllowList": ReadonlyArray<string>;
1672
+ readonly "emailActionPaths"?: {
1673
+ readonly [key: string]: unknown;
1674
+ } | null;
1675
+ readonly "googleEnabled": boolean;
1676
+ readonly "googleClientId"?: string | null;
1677
+ readonly "googleConfigured": boolean;
1678
+ readonly "googleRedirectUri"?: string | null;
1679
+ readonly "webauthnEnabled": boolean;
1680
+ readonly "emailCopy"?: {
1681
+ readonly [key: string]: unknown;
1682
+ } | null;
1683
+ readonly "smtpHost"?: string | null;
1684
+ readonly "smtpPort"?: string | number | null;
1685
+ readonly "smtpSecure": boolean;
1686
+ readonly "smtpUser"?: string | null;
1687
+ readonly "smtpConfigured": boolean;
1688
+ readonly "turnstileSiteKey"?: string | null;
1689
+ readonly "turnstileConfigured": boolean;
1690
+ };
1691
+ readonly "createdAt": string;
1692
+ readonly "updatedAt": string;
1693
+ }>;
1694
+ };
1695
+ };
1696
+ "POST /tenant-apps": {
1697
+ readonly status: 201;
1698
+ readonly body: {
1699
+ readonly "id": string;
1700
+ readonly "organizationId": string;
1701
+ readonly "publicId": string;
1702
+ readonly "name": string;
1703
+ readonly "active": boolean;
1704
+ readonly "settings": {
1705
+ readonly "appId": string;
1706
+ readonly "appDisplayName": string;
1707
+ readonly "logoUri"?: string | null;
1708
+ readonly "primaryColor"?: string | null;
1709
+ readonly "supportEmail"?: string | null;
1710
+ readonly "footerText"?: string | null;
1711
+ readonly "fromEmail"?: string | null;
1712
+ readonly "fromName"?: string | null;
1713
+ readonly "replyTo"?: string | null;
1714
+ readonly "siteUrl": string;
1715
+ readonly "redirectAllowList": ReadonlyArray<string>;
1716
+ readonly "emailActionPaths"?: {
1717
+ readonly [key: string]: unknown;
1718
+ } | null;
1719
+ readonly "googleEnabled": boolean;
1720
+ readonly "googleClientId"?: string | null;
1721
+ readonly "googleConfigured": boolean;
1722
+ readonly "googleRedirectUri"?: string | null;
1723
+ readonly "webauthnEnabled": boolean;
1724
+ readonly "emailCopy"?: {
1725
+ readonly [key: string]: unknown;
1726
+ } | null;
1727
+ readonly "smtpHost"?: string | null;
1728
+ readonly "smtpPort"?: string | number | null;
1729
+ readonly "smtpSecure": boolean;
1730
+ readonly "smtpUser"?: string | null;
1731
+ readonly "smtpConfigured": boolean;
1732
+ readonly "turnstileSiteKey"?: string | null;
1733
+ readonly "turnstileConfigured": boolean;
1734
+ };
1735
+ readonly "createdAt": string;
1736
+ readonly "updatedAt": string;
1737
+ };
1738
+ };
1739
+ "GET /v1/admin/audit": {
1740
+ readonly status: 200;
1741
+ readonly body: {
1742
+ readonly "events": ReadonlyArray<{
1743
+ readonly "id": string;
1744
+ readonly "type": string;
1745
+ readonly "subtype": string | null;
1746
+ readonly "action": "C" | "R" | "U" | "D" | "E";
1747
+ readonly "outcome": "success" | "failure";
1748
+ readonly "outcomeDesc": string | null;
1749
+ readonly "agent": {
1750
+ readonly "userId"?: string;
1751
+ readonly "email"?: string;
1752
+ readonly "ip"?: string;
1753
+ readonly "userAgent"?: string;
1754
+ };
1755
+ readonly "entity": {
1756
+ readonly "resourceType"?: string;
1757
+ readonly "resourceId"?: string;
1758
+ readonly "query"?: string;
1759
+ } | null;
1760
+ readonly "recordedAt": string;
1761
+ }>;
1762
+ readonly "nextCursor": string | null;
1763
+ };
1764
+ };
1765
+ "POST /v1/auth/email/change/verify": {
1766
+ readonly status: 200;
1767
+ readonly body: {
1768
+ readonly "success": boolean;
1769
+ };
1770
+ };
1771
+ "POST /v1/auth/email/change": {
1772
+ readonly status: 200;
1773
+ readonly body: {
1774
+ readonly "success": boolean;
1775
+ };
1776
+ };
1777
+ "POST /v1/auth/email/verify": {
1778
+ readonly status: 200;
1779
+ readonly body: {
1780
+ readonly "success": boolean;
1781
+ readonly "userId": string;
1782
+ };
1783
+ };
1784
+ "POST /v1/auth/google/exchange": {
1785
+ readonly status: 200;
1786
+ readonly body: {
1787
+ readonly "accessToken": string;
1788
+ readonly "refreshToken": string;
1789
+ readonly "expiresIn": number;
1790
+ readonly "tokenType": "Bearer";
1791
+ } | {
1792
+ readonly "mfaRequired": true;
1793
+ readonly "mfaToken": string;
1794
+ readonly "expiresIn": number;
1795
+ };
1796
+ };
1797
+ "GET /v1/auth/me/AllergyIntolerance": {
1798
+ readonly status: 200;
1799
+ readonly body: {
1800
+ readonly "resourceType"?: "Bundle";
1801
+ readonly "type"?: string;
1802
+ readonly "total"?: string | number;
1803
+ readonly "link"?: ReadonlyArray<{
1804
+ readonly "relation"?: string;
1805
+ readonly "url"?: string;
1806
+ readonly [key: string]: unknown;
1807
+ }>;
1808
+ readonly "entry"?: ReadonlyArray<{
1809
+ readonly "fullUrl"?: string;
1810
+ readonly "resource"?: {
1811
+ readonly "resourceType"?: string;
1812
+ readonly "id"?: string;
1813
+ readonly "meta"?: {
1814
+ readonly "versionId"?: string;
1815
+ readonly "lastUpdated"?: string;
1816
+ readonly [key: string]: unknown;
1817
+ };
1818
+ readonly [key: string]: unknown;
1819
+ };
1820
+ readonly "search"?: {
1821
+ readonly "mode"?: string;
1822
+ readonly "score"?: number;
1823
+ };
1824
+ readonly "request"?: unknown;
1825
+ readonly "response"?: unknown;
1826
+ readonly [key: string]: unknown;
1827
+ }>;
1828
+ readonly [key: string]: unknown;
1829
+ };
1830
+ };
1831
+ "GET /v1/auth/me/Condition": {
1832
+ readonly status: 200;
1833
+ readonly body: {
1834
+ readonly "resourceType"?: "Bundle";
1835
+ readonly "type"?: string;
1836
+ readonly "total"?: string | number;
1837
+ readonly "link"?: ReadonlyArray<{
1838
+ readonly "relation"?: string;
1839
+ readonly "url"?: string;
1840
+ readonly [key: string]: unknown;
1841
+ }>;
1842
+ readonly "entry"?: ReadonlyArray<{
1843
+ readonly "fullUrl"?: string;
1844
+ readonly "resource"?: {
1845
+ readonly "resourceType"?: string;
1846
+ readonly "id"?: string;
1847
+ readonly "meta"?: {
1848
+ readonly "versionId"?: string;
1849
+ readonly "lastUpdated"?: string;
1850
+ readonly [key: string]: unknown;
1851
+ };
1852
+ readonly [key: string]: unknown;
1853
+ };
1854
+ readonly "search"?: {
1855
+ readonly "mode"?: string;
1856
+ readonly "score"?: number;
1857
+ };
1858
+ readonly "request"?: unknown;
1859
+ readonly "response"?: unknown;
1860
+ readonly [key: string]: unknown;
1861
+ }>;
1862
+ readonly [key: string]: unknown;
1863
+ };
1864
+ };
1865
+ "POST /v1/auth/me/consent/:id/revoke": {
1866
+ readonly status: 200;
1867
+ readonly body: {
1868
+ readonly "success": boolean;
1869
+ };
1870
+ };
1871
+ "GET /v1/auth/me/Consent": {
1872
+ readonly status: 200;
1873
+ readonly body: {
1874
+ readonly "resourceType"?: "Bundle";
1875
+ readonly "type"?: string;
1876
+ readonly "total"?: string | number;
1877
+ readonly "link"?: ReadonlyArray<{
1878
+ readonly "relation"?: string;
1879
+ readonly "url"?: string;
1880
+ readonly [key: string]: unknown;
1881
+ }>;
1882
+ readonly "entry"?: ReadonlyArray<{
1883
+ readonly "fullUrl"?: string;
1884
+ readonly "resource"?: {
1885
+ readonly "resourceType"?: string;
1886
+ readonly "id"?: string;
1887
+ readonly "meta"?: {
1888
+ readonly "versionId"?: string;
1889
+ readonly "lastUpdated"?: string;
1890
+ readonly [key: string]: unknown;
1891
+ };
1892
+ readonly [key: string]: unknown;
1893
+ };
1894
+ readonly "search"?: {
1895
+ readonly "mode"?: string;
1896
+ readonly "score"?: number;
1897
+ };
1898
+ readonly "request"?: unknown;
1899
+ readonly "response"?: unknown;
1900
+ readonly [key: string]: unknown;
1901
+ }>;
1902
+ readonly [key: string]: unknown;
1903
+ };
1904
+ };
1905
+ "POST /v1/auth/me/deletion-code": {
1906
+ readonly status: 200;
1907
+ readonly body: {
1908
+ readonly "success": boolean;
1909
+ };
1910
+ };
1911
+ "GET /v1/auth/me/DiagnosticReport": {
1912
+ readonly status: 200;
1913
+ readonly body: {
1914
+ readonly "resourceType"?: "Bundle";
1915
+ readonly "type"?: string;
1916
+ readonly "total"?: string | number;
1917
+ readonly "link"?: ReadonlyArray<{
1918
+ readonly "relation"?: string;
1919
+ readonly "url"?: string;
1920
+ readonly [key: string]: unknown;
1921
+ }>;
1922
+ readonly "entry"?: ReadonlyArray<{
1923
+ readonly "fullUrl"?: string;
1924
+ readonly "resource"?: {
1925
+ readonly "resourceType"?: string;
1926
+ readonly "id"?: string;
1927
+ readonly "meta"?: {
1928
+ readonly "versionId"?: string;
1929
+ readonly "lastUpdated"?: string;
1930
+ readonly [key: string]: unknown;
1931
+ };
1932
+ readonly [key: string]: unknown;
1933
+ };
1934
+ readonly "search"?: {
1935
+ readonly "mode"?: string;
1936
+ readonly "score"?: number;
1937
+ };
1938
+ readonly "request"?: unknown;
1939
+ readonly "response"?: unknown;
1940
+ readonly [key: string]: unknown;
1941
+ }>;
1942
+ readonly [key: string]: unknown;
1943
+ };
1944
+ };
1945
+ "GET /v1/auth/me/DocumentReference": {
1946
+ readonly status: 200;
1947
+ readonly body: {
1948
+ readonly "resourceType"?: "Bundle";
1949
+ readonly "type"?: string;
1950
+ readonly "total"?: string | number;
1951
+ readonly "link"?: ReadonlyArray<{
1952
+ readonly "relation"?: string;
1953
+ readonly "url"?: string;
1954
+ readonly [key: string]: unknown;
1955
+ }>;
1956
+ readonly "entry"?: ReadonlyArray<{
1957
+ readonly "fullUrl"?: string;
1958
+ readonly "resource"?: {
1959
+ readonly "resourceType"?: string;
1960
+ readonly "id"?: string;
1961
+ readonly "meta"?: {
1962
+ readonly "versionId"?: string;
1963
+ readonly "lastUpdated"?: string;
1964
+ readonly [key: string]: unknown;
1965
+ };
1966
+ readonly [key: string]: unknown;
1967
+ };
1968
+ readonly "search"?: {
1969
+ readonly "mode"?: string;
1970
+ readonly "score"?: number;
1971
+ };
1972
+ readonly "request"?: unknown;
1973
+ readonly "response"?: unknown;
1974
+ readonly [key: string]: unknown;
1975
+ }>;
1976
+ readonly [key: string]: unknown;
1977
+ };
1978
+ };
1979
+ "GET /v1/auth/me/Encounter": {
1980
+ readonly status: 200;
1981
+ readonly body: {
1982
+ readonly "resourceType"?: "Bundle";
1983
+ readonly "type"?: string;
1984
+ readonly "total"?: string | number;
1985
+ readonly "link"?: ReadonlyArray<{
1986
+ readonly "relation"?: string;
1987
+ readonly "url"?: string;
1988
+ readonly [key: string]: unknown;
1989
+ }>;
1990
+ readonly "entry"?: ReadonlyArray<{
1991
+ readonly "fullUrl"?: string;
1992
+ readonly "resource"?: {
1993
+ readonly "resourceType"?: string;
1994
+ readonly "id"?: string;
1995
+ readonly "meta"?: {
1996
+ readonly "versionId"?: string;
1997
+ readonly "lastUpdated"?: string;
1998
+ readonly [key: string]: unknown;
1999
+ };
2000
+ readonly [key: string]: unknown;
2001
+ };
2002
+ readonly "search"?: {
2003
+ readonly "mode"?: string;
2004
+ readonly "score"?: number;
2005
+ };
2006
+ readonly "request"?: unknown;
2007
+ readonly "response"?: unknown;
2008
+ readonly [key: string]: unknown;
2009
+ }>;
2010
+ readonly [key: string]: unknown;
2011
+ };
2012
+ };
2013
+ "GET /v1/auth/me/Immunization": {
2014
+ readonly status: 200;
2015
+ readonly body: {
2016
+ readonly "resourceType"?: "Bundle";
2017
+ readonly "type"?: string;
2018
+ readonly "total"?: string | number;
2019
+ readonly "link"?: ReadonlyArray<{
2020
+ readonly "relation"?: string;
2021
+ readonly "url"?: string;
2022
+ readonly [key: string]: unknown;
2023
+ }>;
2024
+ readonly "entry"?: ReadonlyArray<{
2025
+ readonly "fullUrl"?: string;
2026
+ readonly "resource"?: {
2027
+ readonly "resourceType"?: string;
2028
+ readonly "id"?: string;
2029
+ readonly "meta"?: {
2030
+ readonly "versionId"?: string;
2031
+ readonly "lastUpdated"?: string;
2032
+ readonly [key: string]: unknown;
2033
+ };
2034
+ readonly [key: string]: unknown;
2035
+ };
2036
+ readonly "search"?: {
2037
+ readonly "mode"?: string;
2038
+ readonly "score"?: number;
2039
+ };
2040
+ readonly "request"?: unknown;
2041
+ readonly "response"?: unknown;
2042
+ readonly [key: string]: unknown;
2043
+ }>;
2044
+ readonly [key: string]: unknown;
2045
+ };
2046
+ };
2047
+ "GET /v1/auth/me/MedicationRequest": {
2048
+ readonly status: 200;
2049
+ readonly body: {
2050
+ readonly "resourceType"?: "Bundle";
2051
+ readonly "type"?: string;
2052
+ readonly "total"?: string | number;
2053
+ readonly "link"?: ReadonlyArray<{
2054
+ readonly "relation"?: string;
2055
+ readonly "url"?: string;
2056
+ readonly [key: string]: unknown;
2057
+ }>;
2058
+ readonly "entry"?: ReadonlyArray<{
2059
+ readonly "fullUrl"?: string;
2060
+ readonly "resource"?: {
2061
+ readonly "resourceType"?: string;
2062
+ readonly "id"?: string;
2063
+ readonly "meta"?: {
2064
+ readonly "versionId"?: string;
2065
+ readonly "lastUpdated"?: string;
2066
+ readonly [key: string]: unknown;
2067
+ };
2068
+ readonly [key: string]: unknown;
2069
+ };
2070
+ readonly "search"?: {
2071
+ readonly "mode"?: string;
2072
+ readonly "score"?: number;
2073
+ };
2074
+ readonly "request"?: unknown;
2075
+ readonly "response"?: unknown;
2076
+ readonly [key: string]: unknown;
2077
+ }>;
2078
+ readonly [key: string]: unknown;
2079
+ };
2080
+ };
2081
+ "GET /v1/auth/me/Observation": {
2082
+ readonly status: 200;
2083
+ readonly body: {
2084
+ readonly "resourceType"?: "Bundle";
2085
+ readonly "type"?: string;
2086
+ readonly "total"?: string | number;
2087
+ readonly "link"?: ReadonlyArray<{
2088
+ readonly "relation"?: string;
2089
+ readonly "url"?: string;
2090
+ readonly [key: string]: unknown;
2091
+ }>;
2092
+ readonly "entry"?: ReadonlyArray<{
2093
+ readonly "fullUrl"?: string;
2094
+ readonly "resource"?: {
2095
+ readonly "resourceType"?: string;
2096
+ readonly "id"?: string;
2097
+ readonly "meta"?: {
2098
+ readonly "versionId"?: string;
2099
+ readonly "lastUpdated"?: string;
2100
+ readonly [key: string]: unknown;
2101
+ };
2102
+ readonly [key: string]: unknown;
2103
+ };
2104
+ readonly "search"?: {
2105
+ readonly "mode"?: string;
2106
+ readonly "score"?: number;
2107
+ };
2108
+ readonly "request"?: unknown;
2109
+ readonly "response"?: unknown;
2110
+ readonly [key: string]: unknown;
2111
+ }>;
2112
+ readonly [key: string]: unknown;
2113
+ };
2114
+ };
2115
+ "DELETE /v1/auth/me/webauthn/credentials/:id": {
2116
+ readonly status: 204;
2117
+ readonly body: undefined;
2118
+ };
2119
+ "GET /v1/auth/me/webauthn/credentials": {
2120
+ readonly status: 200;
2121
+ readonly body: {
2122
+ readonly "credentials": ReadonlyArray<{
2123
+ readonly "id": string;
2124
+ readonly "label": string | null;
2125
+ readonly "deviceType": string | null;
2126
+ readonly "backedUp": boolean;
2127
+ readonly "createdAt": string;
2128
+ readonly "lastUsedAt": string | null;
2129
+ }>;
2130
+ };
2131
+ };
2132
+ "POST /v1/auth/me/webauthn/register/options": {
2133
+ readonly status: 200;
2134
+ readonly body: unknown;
2135
+ };
2136
+ "POST /v1/auth/me/webauthn/register/verify": {
2137
+ readonly status: 200;
2138
+ readonly body: {
2139
+ readonly "id": string;
2140
+ readonly "label": string | null;
2141
+ readonly "deviceType": string | null;
2142
+ readonly "backedUp": boolean;
2143
+ readonly "createdAt": string;
2144
+ readonly "lastUsedAt": string | null;
2145
+ };
2146
+ };
2147
+ "DELETE /v1/auth/me": {
2148
+ readonly status: 204;
2149
+ readonly body: undefined;
2150
+ };
2151
+ "PATCH /v1/auth/me": {
2152
+ readonly status: 200;
2153
+ readonly body: {
2154
+ readonly "id": string;
2155
+ readonly "email": string;
2156
+ readonly "firstName": string | null;
2157
+ readonly "lastName": string | null;
2158
+ readonly "avatarUrl": string | null;
2159
+ readonly "emailVerified": boolean;
2160
+ readonly "patientId": string | null;
2161
+ readonly "practitionerId": string | null;
2162
+ readonly "isActive": boolean;
2163
+ readonly "lastLoginAt": string | null;
2164
+ readonly "createdAt": string;
2165
+ readonly "roles": ReadonlyArray<{
2166
+ readonly "name": string;
2167
+ readonly "isStaff": boolean;
2168
+ readonly "permissions": ReadonlyArray<{
2169
+ readonly "resource": string;
2170
+ readonly "action": string;
2171
+ }>;
2172
+ }>;
2173
+ };
2174
+ };
2175
+ "POST /v1/auth/mfa/disable": {
2176
+ readonly status: 200;
2177
+ readonly body: {
2178
+ readonly "success": boolean;
2179
+ };
2180
+ };
2181
+ "POST /v1/auth/mfa/enable": {
2182
+ readonly status: 200;
2183
+ readonly body: {
2184
+ readonly "recoveryCodes": ReadonlyArray<string>;
2185
+ };
2186
+ };
2187
+ "POST /v1/auth/mfa/recovery-codes/regenerate": {
2188
+ readonly status: 200;
2189
+ readonly body: {
2190
+ readonly "recoveryCodes": ReadonlyArray<string>;
2191
+ };
2192
+ };
2193
+ "POST /v1/auth/mfa/setup": {
2194
+ readonly status: 200;
2195
+ readonly body: {
2196
+ readonly "secret": string;
2197
+ readonly "otpauthUri": string;
2198
+ };
2199
+ };
2200
+ "GET /v1/auth/mfa/status": {
2201
+ readonly status: 200;
2202
+ readonly body: {
2203
+ readonly "enabled": boolean;
2204
+ readonly "recoveryCodesRemaining": number;
2205
+ };
2206
+ };
2207
+ "POST /v1/auth/otp/request": {
2208
+ readonly status: 200;
2209
+ readonly body: {
2210
+ readonly "message": string;
2211
+ };
2212
+ };
2213
+ "POST /v1/auth/password/change": {
2214
+ readonly status: 200;
2215
+ readonly body: {
2216
+ readonly "success": boolean;
2217
+ };
2218
+ };
2219
+ "POST /v1/auth/password/reset/confirm": {
2220
+ readonly status: 200;
2221
+ readonly body: {
2222
+ readonly "success": boolean;
2223
+ };
2224
+ };
2225
+ "GET /v1/auth/Patient": {
2226
+ readonly status: 200;
2227
+ readonly body: {
2228
+ readonly "resourceType"?: string;
2229
+ readonly "id"?: string;
2230
+ readonly "meta"?: {
2231
+ readonly "versionId"?: string;
2232
+ readonly "lastUpdated"?: string;
2233
+ readonly [key: string]: unknown;
2234
+ };
2235
+ readonly [key: string]: unknown;
2236
+ };
2237
+ };
2238
+ "GET /v1/auth/Practitioner": {
2239
+ readonly status: 200;
2240
+ readonly body: {
2241
+ readonly "resourceType"?: string;
2242
+ readonly "id"?: string;
2243
+ readonly "meta"?: {
2244
+ readonly "versionId"?: string;
2245
+ readonly "lastUpdated"?: string;
2246
+ readonly [key: string]: unknown;
2247
+ };
2248
+ readonly [key: string]: unknown;
2249
+ };
2250
+ };
2251
+ "GET /v1/auth/profile": {
2252
+ readonly status: 200;
2253
+ readonly body: {
2254
+ readonly "kind": "patient" | "practitioner" | "none";
2255
+ readonly "resource": {
2256
+ readonly "resourceType"?: string;
2257
+ readonly "id"?: string;
2258
+ readonly "meta"?: {
2259
+ readonly "versionId"?: string;
2260
+ readonly "lastUpdated"?: string;
2261
+ readonly [key: string]: unknown;
2262
+ };
2263
+ readonly [key: string]: unknown;
2264
+ } | null;
2265
+ };
2266
+ };
2267
+ "DELETE /v1/auth/sessions/:sessionId": {
2268
+ readonly status: 204;
2269
+ readonly body: undefined;
2270
+ };
2271
+ "DELETE /v1/auth/sessions": {
2272
+ readonly status: 204;
2273
+ readonly body: undefined;
2274
+ };
2275
+ "GET /v1/auth/sessions": {
2276
+ readonly status: 200;
2277
+ readonly body: {
2278
+ readonly "sessions": ReadonlyArray<{
2279
+ readonly "sessionId": string;
2280
+ readonly "current": boolean;
2281
+ readonly "ipAddress": string | null;
2282
+ readonly "userAgent": string | null;
2283
+ readonly "createdAt": string;
2284
+ readonly "lastSeenAt": string;
2285
+ }>;
2286
+ readonly "total": number;
2287
+ };
2288
+ };
2289
+ "POST /v1/auth/signup": {
2290
+ readonly status: 201;
2291
+ readonly body: {
2292
+ readonly "appUserId": string;
2293
+ readonly "emailVerificationRequired": boolean;
2294
+ };
2295
+ };
2296
+ "GET /v1/auth/user-invite/:token": {
2297
+ readonly status: 200;
2298
+ readonly body: {
2299
+ readonly "email": string;
2300
+ readonly "hasHealthRecord": boolean;
2301
+ readonly "hasProfessionalRole": boolean;
2302
+ readonly "expiresAt": string;
2303
+ };
2304
+ };
2305
+ "PATCH /v1/auth/users/:userId": {
2306
+ readonly status: 200;
2307
+ readonly body: {
2308
+ readonly "id": string;
2309
+ readonly "email": string;
2310
+ readonly "patientId": string | null;
2311
+ readonly "practitionerId": string | null;
2312
+ };
2313
+ };
2314
+ "POST /v1/auth/webauthn/login/options": {
2315
+ readonly status: 200;
2316
+ readonly body: unknown;
2317
+ };
2318
+ "POST /v1/auth/webauthn/login/verify": {
2319
+ readonly status: 200;
2320
+ readonly body: {
2321
+ readonly "accessToken": string;
2322
+ readonly "refreshToken": string;
2323
+ readonly "expiresIn": number;
2324
+ readonly "tokenType": "Bearer";
2325
+ };
2326
+ };
2327
+ }