phenoml 0.0.18__py3-none-any.whl → 0.0.20__py3-none-any.whl
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.
- phenoml/agent/__init__.py +4 -0
- phenoml/agent/client.py +27 -52
- phenoml/agent/raw_client.py +23 -44
- phenoml/agent/types/__init__.py +4 -0
- phenoml/agent/types/agent_create_request.py +0 -5
- phenoml/agent/types/agent_get_chat_messages_request_role.py +5 -0
- phenoml/agent/types/chat_message_template.py +7 -2
- phenoml/agent/types/chat_message_template_role.py +5 -0
- phenoml/core/client_wrapper.py +2 -2
- phenoml/fhir_provider/__init__.py +8 -2
- phenoml/fhir_provider/client.py +66 -21
- phenoml/fhir_provider/raw_client.py +70 -47
- phenoml/fhir_provider/types/__init__.py +8 -2
- phenoml/fhir_provider/types/fhir_provider_auth_config.py +12 -0
- phenoml/fhir_provider/types/fhir_provider_list_response.py +14 -2
- phenoml/fhir_provider/types/fhir_provider_list_response_fhir_providers_item.py +8 -0
- phenoml/fhir_provider/types/fhir_provider_response.py +9 -2
- phenoml/fhir_provider/types/fhir_provider_response_data.py +8 -0
- phenoml/fhir_provider/types/fhir_provider_sandbox_info.py +46 -0
- phenoml/fhir_provider/types/provider.py +3 -1
- phenoml/fhir_provider/types/service_account_metadata.py +41 -0
- phenoml/lang2fhir/__init__.py +2 -0
- phenoml/lang2fhir/client.py +34 -4
- phenoml/lang2fhir/raw_client.py +34 -4
- phenoml/lang2fhir/types/__init__.py +2 -0
- phenoml/lang2fhir/types/search_response.py +7 -4
- phenoml/lang2fhir/types/search_response_resource_type.py +39 -0
- {phenoml-0.0.18.dist-info → phenoml-0.0.20.dist-info}/METADATA +1 -1
- {phenoml-0.0.18.dist-info → phenoml-0.0.20.dist-info}/RECORD +31 -25
- phenoml/fhir_provider/types/fhir_provider_set_active_auth_config_response.py +0 -22
- {phenoml-0.0.18.dist-info → phenoml-0.0.20.dist-info}/LICENSE +0 -0
- {phenoml-0.0.18.dist-info → phenoml-0.0.20.dist-info}/WHEEL +0 -0
phenoml/fhir_provider/client.py
CHANGED
|
@@ -11,7 +11,6 @@ from .types.fhir_provider_delete_response import FhirProviderDeleteResponse
|
|
|
11
11
|
from .types.fhir_provider_list_response import FhirProviderListResponse
|
|
12
12
|
from .types.fhir_provider_remove_auth_config_response import FhirProviderRemoveAuthConfigResponse
|
|
13
13
|
from .types.fhir_provider_response import FhirProviderResponse
|
|
14
|
-
from .types.fhir_provider_set_active_auth_config_response import FhirProviderSetActiveAuthConfigResponse
|
|
15
14
|
from .types.provider import Provider
|
|
16
15
|
from .types.role import Role
|
|
17
16
|
from .types.service_account_key import ServiceAccountKey
|
|
@@ -51,7 +50,9 @@ class FhirProviderClient:
|
|
|
51
50
|
request_options: typing.Optional[RequestOptions] = None,
|
|
52
51
|
) -> FhirProviderResponse:
|
|
53
52
|
"""
|
|
54
|
-
Creates a new FHIR provider configuration with authentication credentials
|
|
53
|
+
Creates a new FHIR provider configuration with authentication credentials.
|
|
54
|
+
|
|
55
|
+
Note: The "sandbox" provider type cannot be created via this API - it is managed internally.
|
|
55
56
|
|
|
56
57
|
Parameters
|
|
57
58
|
----------
|
|
@@ -120,7 +121,10 @@ class FhirProviderClient:
|
|
|
120
121
|
|
|
121
122
|
def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> FhirProviderListResponse:
|
|
122
123
|
"""
|
|
123
|
-
Retrieves a list of all active FHIR providers for the authenticated user
|
|
124
|
+
Retrieves a list of all active FHIR providers for the authenticated user.
|
|
125
|
+
|
|
126
|
+
On shared instances, only sandbox providers are returned.
|
|
127
|
+
Sandbox providers return FhirProviderSandboxInfo.
|
|
124
128
|
|
|
125
129
|
Parameters
|
|
126
130
|
----------
|
|
@@ -148,7 +152,10 @@ class FhirProviderClient:
|
|
|
148
152
|
self, fhir_provider_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
149
153
|
) -> FhirProviderResponse:
|
|
150
154
|
"""
|
|
151
|
-
Retrieves a specific FHIR provider configuration by its ID
|
|
155
|
+
Retrieves a specific FHIR provider configuration by its ID.
|
|
156
|
+
|
|
157
|
+
Sandbox providers return FhirProviderSandboxInfo.
|
|
158
|
+
On shared instances, only sandbox providers can be accessed.
|
|
152
159
|
|
|
153
160
|
Parameters
|
|
154
161
|
----------
|
|
@@ -181,7 +188,9 @@ class FhirProviderClient:
|
|
|
181
188
|
self, fhir_provider_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
182
189
|
) -> FhirProviderDeleteResponse:
|
|
183
190
|
"""
|
|
184
|
-
Soft deletes a FHIR provider by setting is_active to false
|
|
191
|
+
Soft deletes a FHIR provider by setting is_active to false.
|
|
192
|
+
|
|
193
|
+
Note: Sandbox providers cannot be deleted.
|
|
185
194
|
|
|
186
195
|
Parameters
|
|
187
196
|
----------
|
|
@@ -223,7 +232,10 @@ class FhirProviderClient:
|
|
|
223
232
|
request_options: typing.Optional[RequestOptions] = None,
|
|
224
233
|
) -> FhirProviderResponse:
|
|
225
234
|
"""
|
|
226
|
-
Adds a new authentication configuration to an existing FHIR provider.
|
|
235
|
+
Adds a new authentication configuration to an existing FHIR provider.
|
|
236
|
+
This enables key rotation and multiple auth configurations per provider.
|
|
237
|
+
|
|
238
|
+
Note: Sandbox providers cannot be modified.
|
|
227
239
|
|
|
228
240
|
Parameters
|
|
229
241
|
----------
|
|
@@ -279,9 +291,15 @@ class FhirProviderClient:
|
|
|
279
291
|
|
|
280
292
|
def set_active_auth_config(
|
|
281
293
|
self, fhir_provider_id: str, *, auth_config_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
282
|
-
) ->
|
|
294
|
+
) -> FhirProviderResponse:
|
|
283
295
|
"""
|
|
284
|
-
Sets which authentication configuration should be active for a FHIR provider.
|
|
296
|
+
Sets which authentication configuration should be active for a FHIR provider.
|
|
297
|
+
Only one auth config can be active at a time.
|
|
298
|
+
|
|
299
|
+
If the specified auth config is already active, the request succeeds without
|
|
300
|
+
making any changes and returns a message indicating the config is already active.
|
|
301
|
+
|
|
302
|
+
Note: Sandbox providers cannot be modified.
|
|
285
303
|
|
|
286
304
|
Parameters
|
|
287
305
|
----------
|
|
@@ -296,8 +314,9 @@ class FhirProviderClient:
|
|
|
296
314
|
|
|
297
315
|
Returns
|
|
298
316
|
-------
|
|
299
|
-
|
|
300
|
-
Active auth configuration set successfully
|
|
317
|
+
FhirProviderResponse
|
|
318
|
+
Active auth configuration set successfully, or the config was already active.
|
|
319
|
+
Check the message field to determine which case occurred.
|
|
301
320
|
|
|
302
321
|
Examples
|
|
303
322
|
--------
|
|
@@ -320,7 +339,10 @@ class FhirProviderClient:
|
|
|
320
339
|
self, fhir_provider_id: str, *, auth_config_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
321
340
|
) -> FhirProviderRemoveAuthConfigResponse:
|
|
322
341
|
"""
|
|
323
|
-
Removes an authentication configuration from a FHIR provider.
|
|
342
|
+
Removes an authentication configuration from a FHIR provider.
|
|
343
|
+
Cannot remove the currently active auth configuration.
|
|
344
|
+
|
|
345
|
+
Note: Sandbox providers cannot be modified.
|
|
324
346
|
|
|
325
347
|
Parameters
|
|
326
348
|
----------
|
|
@@ -387,7 +409,9 @@ class AsyncFhirProviderClient:
|
|
|
387
409
|
request_options: typing.Optional[RequestOptions] = None,
|
|
388
410
|
) -> FhirProviderResponse:
|
|
389
411
|
"""
|
|
390
|
-
Creates a new FHIR provider configuration with authentication credentials
|
|
412
|
+
Creates a new FHIR provider configuration with authentication credentials.
|
|
413
|
+
|
|
414
|
+
Note: The "sandbox" provider type cannot be created via this API - it is managed internally.
|
|
391
415
|
|
|
392
416
|
Parameters
|
|
393
417
|
----------
|
|
@@ -464,7 +488,10 @@ class AsyncFhirProviderClient:
|
|
|
464
488
|
|
|
465
489
|
async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> FhirProviderListResponse:
|
|
466
490
|
"""
|
|
467
|
-
Retrieves a list of all active FHIR providers for the authenticated user
|
|
491
|
+
Retrieves a list of all active FHIR providers for the authenticated user.
|
|
492
|
+
|
|
493
|
+
On shared instances, only sandbox providers are returned.
|
|
494
|
+
Sandbox providers return FhirProviderSandboxInfo.
|
|
468
495
|
|
|
469
496
|
Parameters
|
|
470
497
|
----------
|
|
@@ -500,7 +527,10 @@ class AsyncFhirProviderClient:
|
|
|
500
527
|
self, fhir_provider_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
501
528
|
) -> FhirProviderResponse:
|
|
502
529
|
"""
|
|
503
|
-
Retrieves a specific FHIR provider configuration by its ID
|
|
530
|
+
Retrieves a specific FHIR provider configuration by its ID.
|
|
531
|
+
|
|
532
|
+
Sandbox providers return FhirProviderSandboxInfo.
|
|
533
|
+
On shared instances, only sandbox providers can be accessed.
|
|
504
534
|
|
|
505
535
|
Parameters
|
|
506
536
|
----------
|
|
@@ -541,7 +571,9 @@ class AsyncFhirProviderClient:
|
|
|
541
571
|
self, fhir_provider_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
542
572
|
) -> FhirProviderDeleteResponse:
|
|
543
573
|
"""
|
|
544
|
-
Soft deletes a FHIR provider by setting is_active to false
|
|
574
|
+
Soft deletes a FHIR provider by setting is_active to false.
|
|
575
|
+
|
|
576
|
+
Note: Sandbox providers cannot be deleted.
|
|
545
577
|
|
|
546
578
|
Parameters
|
|
547
579
|
----------
|
|
@@ -591,7 +623,10 @@ class AsyncFhirProviderClient:
|
|
|
591
623
|
request_options: typing.Optional[RequestOptions] = None,
|
|
592
624
|
) -> FhirProviderResponse:
|
|
593
625
|
"""
|
|
594
|
-
Adds a new authentication configuration to an existing FHIR provider.
|
|
626
|
+
Adds a new authentication configuration to an existing FHIR provider.
|
|
627
|
+
This enables key rotation and multiple auth configurations per provider.
|
|
628
|
+
|
|
629
|
+
Note: Sandbox providers cannot be modified.
|
|
595
630
|
|
|
596
631
|
Parameters
|
|
597
632
|
----------
|
|
@@ -655,9 +690,15 @@ class AsyncFhirProviderClient:
|
|
|
655
690
|
|
|
656
691
|
async def set_active_auth_config(
|
|
657
692
|
self, fhir_provider_id: str, *, auth_config_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
658
|
-
) ->
|
|
693
|
+
) -> FhirProviderResponse:
|
|
659
694
|
"""
|
|
660
|
-
Sets which authentication configuration should be active for a FHIR provider.
|
|
695
|
+
Sets which authentication configuration should be active for a FHIR provider.
|
|
696
|
+
Only one auth config can be active at a time.
|
|
697
|
+
|
|
698
|
+
If the specified auth config is already active, the request succeeds without
|
|
699
|
+
making any changes and returns a message indicating the config is already active.
|
|
700
|
+
|
|
701
|
+
Note: Sandbox providers cannot be modified.
|
|
661
702
|
|
|
662
703
|
Parameters
|
|
663
704
|
----------
|
|
@@ -672,8 +713,9 @@ class AsyncFhirProviderClient:
|
|
|
672
713
|
|
|
673
714
|
Returns
|
|
674
715
|
-------
|
|
675
|
-
|
|
676
|
-
Active auth configuration set successfully
|
|
716
|
+
FhirProviderResponse
|
|
717
|
+
Active auth configuration set successfully, or the config was already active.
|
|
718
|
+
Check the message field to determine which case occurred.
|
|
677
719
|
|
|
678
720
|
Examples
|
|
679
721
|
--------
|
|
@@ -704,7 +746,10 @@ class AsyncFhirProviderClient:
|
|
|
704
746
|
self, fhir_provider_id: str, *, auth_config_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
705
747
|
) -> FhirProviderRemoveAuthConfigResponse:
|
|
706
748
|
"""
|
|
707
|
-
Removes an authentication configuration from a FHIR provider.
|
|
749
|
+
Removes an authentication configuration from a FHIR provider.
|
|
750
|
+
Cannot remove the currently active auth configuration.
|
|
751
|
+
|
|
752
|
+
Note: Sandbox providers cannot be modified.
|
|
708
753
|
|
|
709
754
|
Parameters
|
|
710
755
|
----------
|
|
@@ -21,7 +21,6 @@ from .types.fhir_provider_delete_response import FhirProviderDeleteResponse
|
|
|
21
21
|
from .types.fhir_provider_list_response import FhirProviderListResponse
|
|
22
22
|
from .types.fhir_provider_remove_auth_config_response import FhirProviderRemoveAuthConfigResponse
|
|
23
23
|
from .types.fhir_provider_response import FhirProviderResponse
|
|
24
|
-
from .types.fhir_provider_set_active_auth_config_response import FhirProviderSetActiveAuthConfigResponse
|
|
25
24
|
from .types.provider import Provider
|
|
26
25
|
from .types.role import Role
|
|
27
26
|
from .types.service_account_key import ServiceAccountKey
|
|
@@ -50,7 +49,9 @@ class RawFhirProviderClient:
|
|
|
50
49
|
request_options: typing.Optional[RequestOptions] = None,
|
|
51
50
|
) -> HttpResponse[FhirProviderResponse]:
|
|
52
51
|
"""
|
|
53
|
-
Creates a new FHIR provider configuration with authentication credentials
|
|
52
|
+
Creates a new FHIR provider configuration with authentication credentials.
|
|
53
|
+
|
|
54
|
+
Note: The "sandbox" provider type cannot be created via this API - it is managed internally.
|
|
54
55
|
|
|
55
56
|
Parameters
|
|
56
57
|
----------
|
|
@@ -174,7 +175,10 @@ class RawFhirProviderClient:
|
|
|
174
175
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
175
176
|
) -> HttpResponse[FhirProviderListResponse]:
|
|
176
177
|
"""
|
|
177
|
-
Retrieves a list of all active FHIR providers for the authenticated user
|
|
178
|
+
Retrieves a list of all active FHIR providers for the authenticated user.
|
|
179
|
+
|
|
180
|
+
On shared instances, only sandbox providers are returned.
|
|
181
|
+
Sandbox providers return FhirProviderSandboxInfo.
|
|
178
182
|
|
|
179
183
|
Parameters
|
|
180
184
|
----------
|
|
@@ -212,17 +216,6 @@ class RawFhirProviderClient:
|
|
|
212
216
|
),
|
|
213
217
|
),
|
|
214
218
|
)
|
|
215
|
-
if _response.status_code == 403:
|
|
216
|
-
raise ForbiddenError(
|
|
217
|
-
headers=dict(_response.headers),
|
|
218
|
-
body=typing.cast(
|
|
219
|
-
typing.Optional[typing.Any],
|
|
220
|
-
parse_obj_as(
|
|
221
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
|
222
|
-
object_=_response.json(),
|
|
223
|
-
),
|
|
224
|
-
),
|
|
225
|
-
)
|
|
226
219
|
if _response.status_code == 500:
|
|
227
220
|
raise InternalServerError(
|
|
228
221
|
headers=dict(_response.headers),
|
|
@@ -243,7 +236,10 @@ class RawFhirProviderClient:
|
|
|
243
236
|
self, fhir_provider_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
244
237
|
) -> HttpResponse[FhirProviderResponse]:
|
|
245
238
|
"""
|
|
246
|
-
Retrieves a specific FHIR provider configuration by its ID
|
|
239
|
+
Retrieves a specific FHIR provider configuration by its ID.
|
|
240
|
+
|
|
241
|
+
Sandbox providers return FhirProviderSandboxInfo.
|
|
242
|
+
On shared instances, only sandbox providers can be accessed.
|
|
247
243
|
|
|
248
244
|
Parameters
|
|
249
245
|
----------
|
|
@@ -326,7 +322,9 @@ class RawFhirProviderClient:
|
|
|
326
322
|
self, fhir_provider_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
327
323
|
) -> HttpResponse[FhirProviderDeleteResponse]:
|
|
328
324
|
"""
|
|
329
|
-
Soft deletes a FHIR provider by setting is_active to false
|
|
325
|
+
Soft deletes a FHIR provider by setting is_active to false.
|
|
326
|
+
|
|
327
|
+
Note: Sandbox providers cannot be deleted.
|
|
330
328
|
|
|
331
329
|
Parameters
|
|
332
330
|
----------
|
|
@@ -418,7 +416,10 @@ class RawFhirProviderClient:
|
|
|
418
416
|
request_options: typing.Optional[RequestOptions] = None,
|
|
419
417
|
) -> HttpResponse[FhirProviderResponse]:
|
|
420
418
|
"""
|
|
421
|
-
Adds a new authentication configuration to an existing FHIR provider.
|
|
419
|
+
Adds a new authentication configuration to an existing FHIR provider.
|
|
420
|
+
This enables key rotation and multiple auth configurations per provider.
|
|
421
|
+
|
|
422
|
+
Note: Sandbox providers cannot be modified.
|
|
422
423
|
|
|
423
424
|
Parameters
|
|
424
425
|
----------
|
|
@@ -539,9 +540,15 @@ class RawFhirProviderClient:
|
|
|
539
540
|
|
|
540
541
|
def set_active_auth_config(
|
|
541
542
|
self, fhir_provider_id: str, *, auth_config_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
542
|
-
) -> HttpResponse[
|
|
543
|
+
) -> HttpResponse[FhirProviderResponse]:
|
|
543
544
|
"""
|
|
544
|
-
Sets which authentication configuration should be active for a FHIR provider.
|
|
545
|
+
Sets which authentication configuration should be active for a FHIR provider.
|
|
546
|
+
Only one auth config can be active at a time.
|
|
547
|
+
|
|
548
|
+
If the specified auth config is already active, the request succeeds without
|
|
549
|
+
making any changes and returns a message indicating the config is already active.
|
|
550
|
+
|
|
551
|
+
Note: Sandbox providers cannot be modified.
|
|
545
552
|
|
|
546
553
|
Parameters
|
|
547
554
|
----------
|
|
@@ -556,8 +563,9 @@ class RawFhirProviderClient:
|
|
|
556
563
|
|
|
557
564
|
Returns
|
|
558
565
|
-------
|
|
559
|
-
HttpResponse[
|
|
560
|
-
Active auth configuration set successfully
|
|
566
|
+
HttpResponse[FhirProviderResponse]
|
|
567
|
+
Active auth configuration set successfully, or the config was already active.
|
|
568
|
+
Check the message field to determine which case occurred.
|
|
561
569
|
"""
|
|
562
570
|
_response = self._client_wrapper.httpx_client.request(
|
|
563
571
|
f"fhir-provider/{jsonable_encoder(fhir_provider_id)}/set-active-auth-config",
|
|
@@ -574,9 +582,9 @@ class RawFhirProviderClient:
|
|
|
574
582
|
try:
|
|
575
583
|
if 200 <= _response.status_code < 300:
|
|
576
584
|
_data = typing.cast(
|
|
577
|
-
|
|
585
|
+
FhirProviderResponse,
|
|
578
586
|
parse_obj_as(
|
|
579
|
-
type_=
|
|
587
|
+
type_=FhirProviderResponse, # type: ignore
|
|
580
588
|
object_=_response.json(),
|
|
581
589
|
),
|
|
582
590
|
)
|
|
@@ -645,7 +653,10 @@ class RawFhirProviderClient:
|
|
|
645
653
|
self, fhir_provider_id: str, *, auth_config_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
646
654
|
) -> HttpResponse[FhirProviderRemoveAuthConfigResponse]:
|
|
647
655
|
"""
|
|
648
|
-
Removes an authentication configuration from a FHIR provider.
|
|
656
|
+
Removes an authentication configuration from a FHIR provider.
|
|
657
|
+
Cannot remove the currently active auth configuration.
|
|
658
|
+
|
|
659
|
+
Note: Sandbox providers cannot be modified.
|
|
649
660
|
|
|
650
661
|
Parameters
|
|
651
662
|
----------
|
|
@@ -766,7 +777,9 @@ class AsyncRawFhirProviderClient:
|
|
|
766
777
|
request_options: typing.Optional[RequestOptions] = None,
|
|
767
778
|
) -> AsyncHttpResponse[FhirProviderResponse]:
|
|
768
779
|
"""
|
|
769
|
-
Creates a new FHIR provider configuration with authentication credentials
|
|
780
|
+
Creates a new FHIR provider configuration with authentication credentials.
|
|
781
|
+
|
|
782
|
+
Note: The "sandbox" provider type cannot be created via this API - it is managed internally.
|
|
770
783
|
|
|
771
784
|
Parameters
|
|
772
785
|
----------
|
|
@@ -890,7 +903,10 @@ class AsyncRawFhirProviderClient:
|
|
|
890
903
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
891
904
|
) -> AsyncHttpResponse[FhirProviderListResponse]:
|
|
892
905
|
"""
|
|
893
|
-
Retrieves a list of all active FHIR providers for the authenticated user
|
|
906
|
+
Retrieves a list of all active FHIR providers for the authenticated user.
|
|
907
|
+
|
|
908
|
+
On shared instances, only sandbox providers are returned.
|
|
909
|
+
Sandbox providers return FhirProviderSandboxInfo.
|
|
894
910
|
|
|
895
911
|
Parameters
|
|
896
912
|
----------
|
|
@@ -928,17 +944,6 @@ class AsyncRawFhirProviderClient:
|
|
|
928
944
|
),
|
|
929
945
|
),
|
|
930
946
|
)
|
|
931
|
-
if _response.status_code == 403:
|
|
932
|
-
raise ForbiddenError(
|
|
933
|
-
headers=dict(_response.headers),
|
|
934
|
-
body=typing.cast(
|
|
935
|
-
typing.Optional[typing.Any],
|
|
936
|
-
parse_obj_as(
|
|
937
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
|
938
|
-
object_=_response.json(),
|
|
939
|
-
),
|
|
940
|
-
),
|
|
941
|
-
)
|
|
942
947
|
if _response.status_code == 500:
|
|
943
948
|
raise InternalServerError(
|
|
944
949
|
headers=dict(_response.headers),
|
|
@@ -959,7 +964,10 @@ class AsyncRawFhirProviderClient:
|
|
|
959
964
|
self, fhir_provider_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
960
965
|
) -> AsyncHttpResponse[FhirProviderResponse]:
|
|
961
966
|
"""
|
|
962
|
-
Retrieves a specific FHIR provider configuration by its ID
|
|
967
|
+
Retrieves a specific FHIR provider configuration by its ID.
|
|
968
|
+
|
|
969
|
+
Sandbox providers return FhirProviderSandboxInfo.
|
|
970
|
+
On shared instances, only sandbox providers can be accessed.
|
|
963
971
|
|
|
964
972
|
Parameters
|
|
965
973
|
----------
|
|
@@ -1042,7 +1050,9 @@ class AsyncRawFhirProviderClient:
|
|
|
1042
1050
|
self, fhir_provider_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1043
1051
|
) -> AsyncHttpResponse[FhirProviderDeleteResponse]:
|
|
1044
1052
|
"""
|
|
1045
|
-
Soft deletes a FHIR provider by setting is_active to false
|
|
1053
|
+
Soft deletes a FHIR provider by setting is_active to false.
|
|
1054
|
+
|
|
1055
|
+
Note: Sandbox providers cannot be deleted.
|
|
1046
1056
|
|
|
1047
1057
|
Parameters
|
|
1048
1058
|
----------
|
|
@@ -1134,7 +1144,10 @@ class AsyncRawFhirProviderClient:
|
|
|
1134
1144
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1135
1145
|
) -> AsyncHttpResponse[FhirProviderResponse]:
|
|
1136
1146
|
"""
|
|
1137
|
-
Adds a new authentication configuration to an existing FHIR provider.
|
|
1147
|
+
Adds a new authentication configuration to an existing FHIR provider.
|
|
1148
|
+
This enables key rotation and multiple auth configurations per provider.
|
|
1149
|
+
|
|
1150
|
+
Note: Sandbox providers cannot be modified.
|
|
1138
1151
|
|
|
1139
1152
|
Parameters
|
|
1140
1153
|
----------
|
|
@@ -1255,9 +1268,15 @@ class AsyncRawFhirProviderClient:
|
|
|
1255
1268
|
|
|
1256
1269
|
async def set_active_auth_config(
|
|
1257
1270
|
self, fhir_provider_id: str, *, auth_config_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
1258
|
-
) -> AsyncHttpResponse[
|
|
1271
|
+
) -> AsyncHttpResponse[FhirProviderResponse]:
|
|
1259
1272
|
"""
|
|
1260
|
-
Sets which authentication configuration should be active for a FHIR provider.
|
|
1273
|
+
Sets which authentication configuration should be active for a FHIR provider.
|
|
1274
|
+
Only one auth config can be active at a time.
|
|
1275
|
+
|
|
1276
|
+
If the specified auth config is already active, the request succeeds without
|
|
1277
|
+
making any changes and returns a message indicating the config is already active.
|
|
1278
|
+
|
|
1279
|
+
Note: Sandbox providers cannot be modified.
|
|
1261
1280
|
|
|
1262
1281
|
Parameters
|
|
1263
1282
|
----------
|
|
@@ -1272,8 +1291,9 @@ class AsyncRawFhirProviderClient:
|
|
|
1272
1291
|
|
|
1273
1292
|
Returns
|
|
1274
1293
|
-------
|
|
1275
|
-
AsyncHttpResponse[
|
|
1276
|
-
Active auth configuration set successfully
|
|
1294
|
+
AsyncHttpResponse[FhirProviderResponse]
|
|
1295
|
+
Active auth configuration set successfully, or the config was already active.
|
|
1296
|
+
Check the message field to determine which case occurred.
|
|
1277
1297
|
"""
|
|
1278
1298
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1279
1299
|
f"fhir-provider/{jsonable_encoder(fhir_provider_id)}/set-active-auth-config",
|
|
@@ -1290,9 +1310,9 @@ class AsyncRawFhirProviderClient:
|
|
|
1290
1310
|
try:
|
|
1291
1311
|
if 200 <= _response.status_code < 300:
|
|
1292
1312
|
_data = typing.cast(
|
|
1293
|
-
|
|
1313
|
+
FhirProviderResponse,
|
|
1294
1314
|
parse_obj_as(
|
|
1295
|
-
type_=
|
|
1315
|
+
type_=FhirProviderResponse, # type: ignore
|
|
1296
1316
|
object_=_response.json(),
|
|
1297
1317
|
),
|
|
1298
1318
|
)
|
|
@@ -1361,7 +1381,10 @@ class AsyncRawFhirProviderClient:
|
|
|
1361
1381
|
self, fhir_provider_id: str, *, auth_config_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
1362
1382
|
) -> AsyncHttpResponse[FhirProviderRemoveAuthConfigResponse]:
|
|
1363
1383
|
"""
|
|
1364
|
-
Removes an authentication configuration from a FHIR provider.
|
|
1384
|
+
Removes an authentication configuration from a FHIR provider.
|
|
1385
|
+
Cannot remove the currently active auth configuration.
|
|
1386
|
+
|
|
1387
|
+
Note: Sandbox providers cannot be modified.
|
|
1365
1388
|
|
|
1366
1389
|
Parameters
|
|
1367
1390
|
----------
|
|
@@ -6,9 +6,11 @@ from .auth_method import AuthMethod
|
|
|
6
6
|
from .fhir_provider_auth_config import FhirProviderAuthConfig
|
|
7
7
|
from .fhir_provider_delete_response import FhirProviderDeleteResponse
|
|
8
8
|
from .fhir_provider_list_response import FhirProviderListResponse
|
|
9
|
+
from .fhir_provider_list_response_fhir_providers_item import FhirProviderListResponseFhirProvidersItem
|
|
9
10
|
from .fhir_provider_remove_auth_config_response import FhirProviderRemoveAuthConfigResponse
|
|
10
11
|
from .fhir_provider_response import FhirProviderResponse
|
|
11
|
-
from .
|
|
12
|
+
from .fhir_provider_response_data import FhirProviderResponseData
|
|
13
|
+
from .fhir_provider_sandbox_info import FhirProviderSandboxInfo
|
|
12
14
|
from .fhir_provider_template import FhirProviderTemplate
|
|
13
15
|
from .fhir_query_response import FhirQueryResponse
|
|
14
16
|
from .fhir_query_response_data import FhirQueryResponseData
|
|
@@ -16,6 +18,7 @@ from .json_web_key import JsonWebKey
|
|
|
16
18
|
from .provider import Provider
|
|
17
19
|
from .role import Role
|
|
18
20
|
from .service_account_key import ServiceAccountKey
|
|
21
|
+
from .service_account_metadata import ServiceAccountMetadata
|
|
19
22
|
from .smart_configuration import SmartConfiguration
|
|
20
23
|
|
|
21
24
|
__all__ = [
|
|
@@ -23,9 +26,11 @@ __all__ = [
|
|
|
23
26
|
"FhirProviderAuthConfig",
|
|
24
27
|
"FhirProviderDeleteResponse",
|
|
25
28
|
"FhirProviderListResponse",
|
|
29
|
+
"FhirProviderListResponseFhirProvidersItem",
|
|
26
30
|
"FhirProviderRemoveAuthConfigResponse",
|
|
27
31
|
"FhirProviderResponse",
|
|
28
|
-
"
|
|
32
|
+
"FhirProviderResponseData",
|
|
33
|
+
"FhirProviderSandboxInfo",
|
|
29
34
|
"FhirProviderTemplate",
|
|
30
35
|
"FhirQueryResponse",
|
|
31
36
|
"FhirQueryResponseData",
|
|
@@ -33,5 +38,6 @@ __all__ = [
|
|
|
33
38
|
"Provider",
|
|
34
39
|
"Role",
|
|
35
40
|
"ServiceAccountKey",
|
|
41
|
+
"ServiceAccountMetadata",
|
|
36
42
|
"SmartConfiguration",
|
|
37
43
|
]
|
|
@@ -7,6 +7,7 @@ import pydantic
|
|
|
7
7
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
8
|
from .auth_method import AuthMethod
|
|
9
9
|
from .json_web_key import JsonWebKey
|
|
10
|
+
from .service_account_metadata import ServiceAccountMetadata
|
|
10
11
|
from .smart_configuration import SmartConfiguration
|
|
11
12
|
|
|
12
13
|
|
|
@@ -26,6 +27,16 @@ class FhirProviderAuthConfig(UniversalBaseModel):
|
|
|
26
27
|
Whether this auth configuration is currently active
|
|
27
28
|
"""
|
|
28
29
|
|
|
30
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
Timestamp when this auth configuration was created
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
36
|
+
"""
|
|
37
|
+
Timestamp when this auth configuration was last updated
|
|
38
|
+
"""
|
|
39
|
+
|
|
29
40
|
public_key_cert_pem: typing.Optional[str] = pydantic.Field(default=None)
|
|
30
41
|
"""
|
|
31
42
|
Public key certificate in PEM format (visible for JWT auth)
|
|
@@ -38,6 +49,7 @@ class FhirProviderAuthConfig(UniversalBaseModel):
|
|
|
38
49
|
"""
|
|
39
50
|
|
|
40
51
|
smart_configuration: typing.Optional[SmartConfiguration] = None
|
|
52
|
+
service_account_metadata: typing.Optional[ServiceAccountMetadata] = None
|
|
41
53
|
scopes: typing.Optional[str] = pydantic.Field(default=None)
|
|
42
54
|
"""
|
|
43
55
|
OAuth scopes
|
|
@@ -4,13 +4,25 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
import pydantic
|
|
6
6
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
-
from .
|
|
7
|
+
from .fhir_provider_list_response_fhir_providers_item import FhirProviderListResponseFhirProvidersItem
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class FhirProviderListResponse(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Response payload for listing FHIR Providers.
|
|
13
|
+
On shared instances, only sandbox providers are returned (as FhirProviderSandboxInfo).
|
|
14
|
+
On dedicated instances, full provider details are returned (as FhirProviderTemplate).
|
|
15
|
+
"""
|
|
16
|
+
|
|
11
17
|
success: typing.Optional[bool] = None
|
|
12
18
|
message: typing.Optional[str] = None
|
|
13
|
-
fhir_providers: typing.Optional[typing.List[
|
|
19
|
+
fhir_providers: typing.Optional[typing.List[FhirProviderListResponseFhirProvidersItem]] = pydantic.Field(
|
|
20
|
+
default=None
|
|
21
|
+
)
|
|
22
|
+
"""
|
|
23
|
+
List of FHIR providers. Sandbox providers return FhirProviderSandboxInfo,
|
|
24
|
+
other providers return FhirProviderTemplate.
|
|
25
|
+
"""
|
|
14
26
|
|
|
15
27
|
if IS_PYDANTIC_V2:
|
|
16
28
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .fhir_provider_sandbox_info import FhirProviderSandboxInfo
|
|
6
|
+
from .fhir_provider_template import FhirProviderTemplate
|
|
7
|
+
|
|
8
|
+
FhirProviderListResponseFhirProvidersItem = typing.Union[FhirProviderTemplate, FhirProviderSandboxInfo]
|
|
@@ -4,13 +4,20 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
import pydantic
|
|
6
6
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
-
from .
|
|
7
|
+
from .fhir_provider_response_data import FhirProviderResponseData
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class FhirProviderResponse(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Response payload for a single FHIR Provider operation.
|
|
13
|
+
"""
|
|
14
|
+
|
|
11
15
|
success: typing.Optional[bool] = None
|
|
12
16
|
message: typing.Optional[str] = None
|
|
13
|
-
data: typing.Optional[
|
|
17
|
+
data: typing.Optional[FhirProviderResponseData] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
Provider details. Sandbox providers return FhirProviderSandboxInfo.
|
|
20
|
+
"""
|
|
14
21
|
|
|
15
22
|
if IS_PYDANTIC_V2:
|
|
16
23
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .fhir_provider_sandbox_info import FhirProviderSandboxInfo
|
|
6
|
+
from .fhir_provider_template import FhirProviderTemplate
|
|
7
|
+
|
|
8
|
+
FhirProviderResponseData = typing.Union[FhirProviderTemplate, FhirProviderSandboxInfo]
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FhirProviderSandboxInfo(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Information returned for sandbox FHIR providers.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
15
|
+
"""
|
|
16
|
+
Unique identifier for the FHIR provider
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
20
|
+
"""
|
|
21
|
+
Display name for the FHIR provider
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
25
|
+
"""
|
|
26
|
+
Optional description of the FHIR provider
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
provider: typing.Optional[typing.Literal["sandbox"]] = pydantic.Field(default=None)
|
|
30
|
+
"""
|
|
31
|
+
Provider type (always "sandbox" for this schema)
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
is_active: typing.Optional[bool] = pydantic.Field(default=None)
|
|
35
|
+
"""
|
|
36
|
+
Whether the FHIR provider is active
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
if IS_PYDANTIC_V2:
|
|
40
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
41
|
+
else:
|
|
42
|
+
|
|
43
|
+
class Config:
|
|
44
|
+
frozen = True
|
|
45
|
+
smart_union = True
|
|
46
|
+
extra = pydantic.Extra.allow
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
5
|
Provider = typing.Union[
|
|
6
|
-
typing.Literal[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"athenahealth", "canvas", "cerner", "elation", "epic", "google_healthcare", "hapi", "medplum", "sandbox"
|
|
8
|
+
],
|
|
7
9
|
typing.Any,
|
|
8
10
|
]
|