phenoml 0.0.6__py3-none-any.whl → 0.0.8__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.
Files changed (54) hide show
  1. phenoml/client.py +3 -0
  2. phenoml/core/client_wrapper.py +2 -2
  3. phenoml/summary/__init__.py +39 -0
  4. phenoml/summary/client.py +656 -0
  5. phenoml/summary/errors/__init__.py +11 -0
  6. phenoml/summary/errors/bad_request_error.py +10 -0
  7. phenoml/summary/errors/forbidden_error.py +10 -0
  8. phenoml/summary/errors/internal_server_error.py +10 -0
  9. phenoml/summary/errors/not_found_error.py +10 -0
  10. phenoml/summary/errors/unauthorized_error.py +10 -0
  11. phenoml/{workflows/workflows → summary}/raw_client.py +236 -312
  12. phenoml/summary/types/__init__.py +31 -0
  13. phenoml/summary/types/create_summary_request_fhir_resources.py +8 -0
  14. phenoml/summary/types/create_summary_request_mode.py +5 -0
  15. phenoml/summary/types/create_summary_response.py +29 -0
  16. phenoml/summary/types/create_summary_template_response.py +23 -0
  17. phenoml/summary/types/fhir_bundle.py +23 -0
  18. phenoml/summary/types/fhir_bundle_entry_item.py +20 -0
  19. phenoml/summary/types/fhir_resource.py +24 -0
  20. phenoml/summary/types/summary_delete_template_response.py +20 -0
  21. phenoml/summary/types/summary_get_template_response.py +21 -0
  22. phenoml/summary/types/summary_list_templates_response.py +21 -0
  23. phenoml/summary/types/summary_template.py +41 -0
  24. phenoml/summary/types/summary_update_template_response.py +22 -0
  25. phenoml/workflows/__init__.py +3 -8
  26. phenoml/workflows/client.py +517 -33
  27. phenoml/workflows/raw_client.py +1129 -32
  28. phenoml/workflows/types/__init__.py +10 -0
  29. phenoml/workflows/{workflows/types → types}/workflows_delete_response.py +1 -1
  30. phenoml/workflows/{workflows/types → types}/workflows_get_response.py +3 -3
  31. phenoml/workflows/{workflows/types → types}/workflows_update_response.py +3 -3
  32. {phenoml-0.0.6.dist-info → phenoml-0.0.8.dist-info}/METADATA +1 -1
  33. {phenoml-0.0.6.dist-info → phenoml-0.0.8.dist-info}/RECORD +37 -33
  34. phenoml/types/__init__.py +0 -21
  35. phenoml/types/cohort_response.py +0 -5
  36. phenoml/types/lang2fhir_and_create_response.py +0 -5
  37. phenoml/types/lang2fhir_and_search_response.py +0 -5
  38. phenoml/types/mcp_server_response.py +0 -5
  39. phenoml/types/mcp_server_tool_call_response.py +0 -5
  40. phenoml/types/mcp_server_tool_response.py +0 -5
  41. phenoml/types/search_concept.py +0 -5
  42. phenoml/workflows/mcp_server/__init__.py +0 -7
  43. phenoml/workflows/mcp_server/client.py +0 -274
  44. phenoml/workflows/mcp_server/raw_client.py +0 -226
  45. phenoml/workflows/mcp_server/tools/__init__.py +0 -4
  46. phenoml/workflows/mcp_server/tools/client.py +0 -287
  47. phenoml/workflows/mcp_server/tools/raw_client.py +0 -244
  48. phenoml/workflows/workflows/__init__.py +0 -19
  49. phenoml/workflows/workflows/client.py +0 -694
  50. phenoml/workflows/workflows/types/__init__.py +0 -17
  51. /phenoml/workflows/{workflows/types → types}/create_workflow_request_fhir_provider_id.py +0 -0
  52. /phenoml/workflows/{workflows/types → types}/update_workflow_request_fhir_provider_id.py +0 -0
  53. {phenoml-0.0.6.dist-info → phenoml-0.0.8.dist-info}/LICENSE +0 -0
  54. {phenoml-0.0.6.dist-info → phenoml-0.0.8.dist-info}/WHEEL +0 -0
@@ -1,244 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
- from json.decoder import JSONDecodeError
5
-
6
- from ....core.api_error import ApiError
7
- from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
- from ....core.http_response import AsyncHttpResponse, HttpResponse
9
- from ....core.jsonable_encoder import jsonable_encoder
10
- from ....core.request_options import RequestOptions
11
-
12
-
13
- class RawToolsClient:
14
- def __init__(self, *, client_wrapper: SyncClientWrapper):
15
- self._client_wrapper = client_wrapper
16
-
17
- def list(
18
- self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None
19
- ) -> HttpResponse[None]:
20
- """
21
- Parameters
22
- ----------
23
- mcp_server_id : str
24
-
25
- request_options : typing.Optional[RequestOptions]
26
- Request-specific configuration.
27
-
28
- Returns
29
- -------
30
- HttpResponse[None]
31
- """
32
- _response = self._client_wrapper.httpx_client.request(
33
- f"tools/mcp-server/{jsonable_encoder(mcp_server_id)}/list",
34
- method="GET",
35
- request_options=request_options,
36
- )
37
- try:
38
- if 200 <= _response.status_code < 300:
39
- return HttpResponse(response=_response, data=None)
40
- _response_json = _response.json()
41
- except JSONDecodeError:
42
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
43
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
44
-
45
- def get(
46
- self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
47
- ) -> HttpResponse[None]:
48
- """
49
- Parameters
50
- ----------
51
- mcp_server_tool_id : str
52
-
53
- request_options : typing.Optional[RequestOptions]
54
- Request-specific configuration.
55
-
56
- Returns
57
- -------
58
- HttpResponse[None]
59
- """
60
- _response = self._client_wrapper.httpx_client.request(
61
- f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}",
62
- method="GET",
63
- request_options=request_options,
64
- )
65
- try:
66
- if 200 <= _response.status_code < 300:
67
- return HttpResponse(response=_response, data=None)
68
- _response_json = _response.json()
69
- except JSONDecodeError:
70
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
71
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
72
-
73
- def delete(
74
- self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
75
- ) -> HttpResponse[None]:
76
- """
77
- Parameters
78
- ----------
79
- mcp_server_tool_id : str
80
-
81
- request_options : typing.Optional[RequestOptions]
82
- Request-specific configuration.
83
-
84
- Returns
85
- -------
86
- HttpResponse[None]
87
- """
88
- _response = self._client_wrapper.httpx_client.request(
89
- f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}",
90
- method="DELETE",
91
- request_options=request_options,
92
- )
93
- try:
94
- if 200 <= _response.status_code < 300:
95
- return HttpResponse(response=_response, data=None)
96
- _response_json = _response.json()
97
- except JSONDecodeError:
98
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
99
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
100
-
101
- def call(
102
- self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
103
- ) -> HttpResponse[None]:
104
- """
105
- Parameters
106
- ----------
107
- mcp_server_tool_id : str
108
-
109
- request_options : typing.Optional[RequestOptions]
110
- Request-specific configuration.
111
-
112
- Returns
113
- -------
114
- HttpResponse[None]
115
- """
116
- _response = self._client_wrapper.httpx_client.request(
117
- f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}/call",
118
- method="POST",
119
- request_options=request_options,
120
- )
121
- try:
122
- if 200 <= _response.status_code < 300:
123
- return HttpResponse(response=_response, data=None)
124
- _response_json = _response.json()
125
- except JSONDecodeError:
126
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
127
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
128
-
129
-
130
- class AsyncRawToolsClient:
131
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
132
- self._client_wrapper = client_wrapper
133
-
134
- async def list(
135
- self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None
136
- ) -> AsyncHttpResponse[None]:
137
- """
138
- Parameters
139
- ----------
140
- mcp_server_id : str
141
-
142
- request_options : typing.Optional[RequestOptions]
143
- Request-specific configuration.
144
-
145
- Returns
146
- -------
147
- AsyncHttpResponse[None]
148
- """
149
- _response = await self._client_wrapper.httpx_client.request(
150
- f"tools/mcp-server/{jsonable_encoder(mcp_server_id)}/list",
151
- method="GET",
152
- request_options=request_options,
153
- )
154
- try:
155
- if 200 <= _response.status_code < 300:
156
- return AsyncHttpResponse(response=_response, data=None)
157
- _response_json = _response.json()
158
- except JSONDecodeError:
159
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
160
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
161
-
162
- async def get(
163
- self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
164
- ) -> AsyncHttpResponse[None]:
165
- """
166
- Parameters
167
- ----------
168
- mcp_server_tool_id : str
169
-
170
- request_options : typing.Optional[RequestOptions]
171
- Request-specific configuration.
172
-
173
- Returns
174
- -------
175
- AsyncHttpResponse[None]
176
- """
177
- _response = await self._client_wrapper.httpx_client.request(
178
- f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}",
179
- method="GET",
180
- request_options=request_options,
181
- )
182
- try:
183
- if 200 <= _response.status_code < 300:
184
- return AsyncHttpResponse(response=_response, data=None)
185
- _response_json = _response.json()
186
- except JSONDecodeError:
187
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
188
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
189
-
190
- async def delete(
191
- self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
192
- ) -> AsyncHttpResponse[None]:
193
- """
194
- Parameters
195
- ----------
196
- mcp_server_tool_id : str
197
-
198
- request_options : typing.Optional[RequestOptions]
199
- Request-specific configuration.
200
-
201
- Returns
202
- -------
203
- AsyncHttpResponse[None]
204
- """
205
- _response = await self._client_wrapper.httpx_client.request(
206
- f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}",
207
- method="DELETE",
208
- request_options=request_options,
209
- )
210
- try:
211
- if 200 <= _response.status_code < 300:
212
- return AsyncHttpResponse(response=_response, data=None)
213
- _response_json = _response.json()
214
- except JSONDecodeError:
215
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
216
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
217
-
218
- async def call(
219
- self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
220
- ) -> AsyncHttpResponse[None]:
221
- """
222
- Parameters
223
- ----------
224
- mcp_server_tool_id : str
225
-
226
- request_options : typing.Optional[RequestOptions]
227
- Request-specific configuration.
228
-
229
- Returns
230
- -------
231
- AsyncHttpResponse[None]
232
- """
233
- _response = await self._client_wrapper.httpx_client.request(
234
- f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}/call",
235
- method="POST",
236
- request_options=request_options,
237
- )
238
- try:
239
- if 200 <= _response.status_code < 300:
240
- return AsyncHttpResponse(response=_response, data=None)
241
- _response_json = _response.json()
242
- except JSONDecodeError:
243
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
244
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
@@ -1,19 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- # isort: skip_file
4
-
5
- from .types import (
6
- CreateWorkflowRequestFhirProviderId,
7
- UpdateWorkflowRequestFhirProviderId,
8
- WorkflowsDeleteResponse,
9
- WorkflowsGetResponse,
10
- WorkflowsUpdateResponse,
11
- )
12
-
13
- __all__ = [
14
- "CreateWorkflowRequestFhirProviderId",
15
- "UpdateWorkflowRequestFhirProviderId",
16
- "WorkflowsDeleteResponse",
17
- "WorkflowsGetResponse",
18
- "WorkflowsUpdateResponse",
19
- ]