fountain-life-service-clients 3.28.2__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 (28) hide show
  1. fountain_life_service_clients/__init__.py +0 -0
  2. fountain_life_service_clients/_base_client.py +30 -0
  3. fountain_life_service_clients/account_service.py +116 -0
  4. fountain_life_service_clients/account_service_policy_attributes.py +46 -0
  5. fountain_life_service_clients/agents_api_service.py +197 -0
  6. fountain_life_service_clients/claimed_domains_service.py +70 -0
  7. fountain_life_service_clients/cohorts_service.py +184 -0
  8. fountain_life_service_clients/ehr_ingestion_wearables_api.py +169 -0
  9. fountain_life_service_clients/ehr_service.py +334 -0
  10. fountain_life_service_clients/email_service_email.py +81 -0
  11. fountain_life_service_clients/email_service_sms.py +33 -0
  12. fountain_life_service_clients/fhir_post_processor_service.py +55 -0
  13. fountain_life_service_clients/fhir_search_service.py +262 -0
  14. fountain_life_service_clients/file_service.py +124 -0
  15. fountain_life_service_clients/invitation_service.py +94 -0
  16. fountain_life_service_clients/medical_results_service_results.py +228 -0
  17. fountain_life_service_clients/member_notification_service.py +69 -0
  18. fountain_life_service_clients/member_operations_service_members.py +40 -0
  19. fountain_life_service_clients/member_scheduling_service_scheduling_prompts.py +62 -0
  20. fountain_life_service_clients/oauth_apps_service.py +253 -0
  21. fountain_life_service_clients/patient_service.py +157 -0
  22. fountain_life_service_clients/rules_service.py +249 -0
  23. fountain_life_service_clients/scheduler_service.py +146 -0
  24. fountain_life_service_clients/survey_service.py +404 -0
  25. fountain_life_service_clients/user_service.py +152 -0
  26. fountain_life_service_clients-3.28.2.dist-info/METADATA +53 -0
  27. fountain_life_service_clients-3.28.2.dist-info/RECORD +28 -0
  28. fountain_life_service_clients-3.28.2.dist-info/WHEEL +4 -0
@@ -0,0 +1,69 @@
1
+ # This file was generated automatically. Do not edit it directly.
2
+ # generated by datamodel-codegen:
3
+ # filename: member-notification-service.json
4
+ from typing import List, NotRequired, TypedDict, Union, Unpack, cast
5
+
6
+ from fountain_life_service_clients._base_client import (
7
+ AlphaConfig,
8
+ AlphaResponse,
9
+ BaseClient,
10
+ )
11
+
12
+
13
+ class SendTemplatedNotificationRequest1(TypedDict):
14
+ name: NotRequired[str]
15
+ appointmentId: str
16
+ patientId: str
17
+ messageId: str
18
+
19
+
20
+ class SendTemplatedNotificationRequest2(TypedDict):
21
+ name: NotRequired[str]
22
+ type: str
23
+ patientId: str
24
+ messageId: str
25
+
26
+
27
+ class SendTemplatedNotificationRequest3(TypedDict):
28
+ name: NotRequired[str]
29
+ procedureRequestId: str
30
+ patientId: str
31
+ messageId: str
32
+
33
+
34
+ class SendTemplatedNotificationRequest4(TypedDict):
35
+ name: NotRequired[str]
36
+ surveyNames: List[str]
37
+ patientId: str
38
+ messageId: str
39
+
40
+
41
+ SendTemplatedNotificationRequest = Union[
42
+ SendTemplatedNotificationRequest1,
43
+ SendTemplatedNotificationRequest2,
44
+ SendTemplatedNotificationRequest3,
45
+ SendTemplatedNotificationRequest4,
46
+ ]
47
+
48
+
49
+ class SendTemplatedNotificationResponse(TypedDict):
50
+ emailSent: bool
51
+ smsSent: bool
52
+ errors: NotRequired[List[str]]
53
+
54
+
55
+ class MemberNotificationServiceClient(BaseClient):
56
+ def __init__(self, **cfg: Unpack[AlphaConfig]):
57
+ kwargs = {
58
+ "target": "lambda://member-notification-service:deployed",
59
+ **(cfg or {}),
60
+ }
61
+ super().__init__(**kwargs)
62
+
63
+ async def send_templated_notification(self, body: SendTemplatedNotificationRequest):
64
+ res = await self.client.request(
65
+ path="/v1/private/notifications/templated",
66
+ method="POST",
67
+ body=cast(dict, body),
68
+ )
69
+ return cast(AlphaResponse[SendTemplatedNotificationResponse], res)
@@ -0,0 +1,40 @@
1
+ # This file was generated automatically. Do not edit it directly.
2
+ # generated by datamodel-codegen:
3
+ # filename: member-operations-service-members.json
4
+ from typing import Literal, NotRequired, TypedDict, Unpack, cast
5
+
6
+ from fountain_life_service_clients._base_client import (
7
+ AlphaConfig,
8
+ AlphaResponse,
9
+ BaseClient,
10
+ )
11
+
12
+
13
+ class OnboardMemberToAppRequest(TypedDict):
14
+ patientId: str
15
+ preferredContactMethod: NotRequired[Literal["email", "sms", "phone", "none"]]
16
+ scheduleSurveyReminders: NotRequired[bool]
17
+ skipOnboardingSurveys: NotRequired[bool]
18
+ skipSecondaryConsents: NotRequired[bool]
19
+ username: NotRequired[str]
20
+
21
+
22
+ class OnboardMemberToAppResponse(TypedDict):
23
+ pass
24
+
25
+
26
+ class MemberOperationsServiceMembersClient(BaseClient):
27
+ def __init__(self, **cfg: Unpack[AlphaConfig]):
28
+ kwargs = {
29
+ "target": "lambda://member-operations-service:deployed",
30
+ **(cfg or {}),
31
+ }
32
+ super().__init__(**kwargs)
33
+
34
+ async def onboard_member_to_app(self, body: OnboardMemberToAppRequest):
35
+ res = await self.client.request(
36
+ path="/v1/member-operations/members/onboard",
37
+ method="POST",
38
+ body=cast(dict, body),
39
+ )
40
+ return cast(AlphaResponse[OnboardMemberToAppResponse], res)
@@ -0,0 +1,62 @@
1
+ # This file was generated automatically. Do not edit it directly.
2
+ # generated by datamodel-codegen:
3
+ # filename: member-scheduling-service-scheduling-prompts.json
4
+ from typing import List, NotRequired, TypedDict, Unpack, cast
5
+
6
+ from fountain_life_service_clients._base_client import (
7
+ AlphaConfig,
8
+ AlphaResponse,
9
+ BaseClient,
10
+ )
11
+
12
+
13
+ class Email(TypedDict):
14
+ headerImage: str
15
+ subject: str
16
+ body: str
17
+ buttonText: str
18
+ buttonLink: str
19
+
20
+
21
+ class Notification(TypedDict):
22
+ """
23
+ A configuration for sending notifications about this prompt. If not provided, notifications will not be sent.
24
+ """
25
+
26
+ email: NotRequired[Email]
27
+
28
+
29
+ class Tag(TypedDict):
30
+ system: NotRequired[str]
31
+ code: NotRequired[str]
32
+
33
+
34
+ class CreateSchedulingPromptRequest(TypedDict):
35
+ patientId: str
36
+ practitionerId: str
37
+ appointmentDisplayTitle: str
38
+ calendarEventDisplayTitle: str
39
+ notification: NotRequired[Notification]
40
+ tags: NotRequired[List[Tag]]
41
+ durationInMinutes: NotRequired[int]
42
+
43
+
44
+ class CreateSchedulingPromptResponse(TypedDict):
45
+ pass
46
+
47
+
48
+ class MemberSchedulingServiceSchedulingPromptsClient(BaseClient):
49
+ def __init__(self, **cfg: Unpack[AlphaConfig]):
50
+ kwargs = {
51
+ "target": "lambda://member-scheduling-service:deployed",
52
+ **(cfg or {}),
53
+ }
54
+ super().__init__(**kwargs)
55
+
56
+ async def create_scheduling_prompt(self, body: CreateSchedulingPromptRequest):
57
+ res = await self.client.request(
58
+ path="/v1/member-scheduling/scheduling-prompts",
59
+ method="POST",
60
+ body=cast(dict, body),
61
+ )
62
+ return cast(AlphaResponse[CreateSchedulingPromptResponse], res)
@@ -0,0 +1,253 @@
1
+ # This file was generated automatically. Do not edit it directly.
2
+ # generated by datamodel-codegen:
3
+ # filename: oauth-apps-service.json
4
+ from typing import List, Literal, NotRequired, TypedDict, Unpack, cast
5
+ from urllib.parse import quote
6
+
7
+ from fountain_life_service_clients._base_client import (
8
+ AlphaConfig,
9
+ AlphaResponse,
10
+ BaseClient,
11
+ )
12
+
13
+
14
+ class PrivateListOAuthAppsParams(TypedDict):
15
+ nextPageToken: NotRequired[str]
16
+ pageSize: NotRequired[str]
17
+ origin: NotRequired[str]
18
+
19
+
20
+ class Theme(TypedDict):
21
+ primaryColor: str
22
+ textOnPrimaryColor: str
23
+ backgroundImageUrl: NotRequired[str]
24
+ disabledColor: NotRequired[str]
25
+
26
+
27
+ class SubjectInviteSettings(TypedDict):
28
+ customEmailTemplateName: NotRequired[str]
29
+
30
+
31
+ class Item(TypedDict):
32
+ account: str
33
+ name: str
34
+ description: str
35
+ icon: NotRequired[str]
36
+ headerImage: NotRequired[str]
37
+ appUrl: str
38
+ appType: Literal["standalone", "launched", "embedded"]
39
+ clientId: str
40
+ status: Literal["developing", "live"]
41
+ termsLink: NotRequired[str]
42
+ theme: NotRequired[Theme]
43
+ addUserToGroups: NotRequired[List[str]]
44
+ allowedOAuthScopes: List[str]
45
+ allowedAccounts: List[str]
46
+ callbackUrls: List[str]
47
+ logoutUrls: List[str]
48
+ confirmSignUpUrl: NotRequired[str]
49
+ passwordlessLoginUrl: NotRequired[str]
50
+ fromEmailAddress: NotRequired[str]
51
+ subjectInviteSettings: NotRequired[SubjectInviteSettings]
52
+ refreshTokenValidityDays: NotRequired[int]
53
+ id: str
54
+ lastUpdated: str
55
+
56
+
57
+ class Links(TypedDict):
58
+ self: str
59
+ next: NotRequired[str]
60
+
61
+
62
+ class PrivateListOAuthAppsResponse(TypedDict):
63
+ items: List[Item]
64
+ links: Links
65
+
66
+
67
+ class PrivateGetOAuthAppResponse(TypedDict):
68
+ account: str
69
+ name: str
70
+ description: str
71
+ icon: NotRequired[str]
72
+ headerImage: NotRequired[str]
73
+ appUrl: str
74
+ appType: Literal["standalone", "launched", "embedded"]
75
+ clientId: str
76
+ status: Literal["developing", "live"]
77
+ termsLink: NotRequired[str]
78
+ theme: NotRequired[Theme]
79
+ addUserToGroups: NotRequired[List[str]]
80
+ allowedOAuthScopes: List[str]
81
+ allowedAccounts: List[str]
82
+ callbackUrls: List[str]
83
+ logoutUrls: List[str]
84
+ confirmSignUpUrl: NotRequired[str]
85
+ passwordlessLoginUrl: NotRequired[str]
86
+ fromEmailAddress: NotRequired[str]
87
+ subjectInviteSettings: NotRequired[SubjectInviteSettings]
88
+ refreshTokenValidityDays: NotRequired[int]
89
+ id: str
90
+ lastUpdated: str
91
+
92
+
93
+ class PrivateDeleteOAuthAppResponse(TypedDict):
94
+ pass
95
+
96
+
97
+ class PrivateUpsertOAuthAppRequest(TypedDict):
98
+ account: str
99
+ name: str
100
+ description: str
101
+ icon: NotRequired[str]
102
+ headerImage: NotRequired[str]
103
+ appUrl: str
104
+ appType: Literal["standalone", "launched", "embedded"]
105
+ clientId: str
106
+ status: Literal["developing", "live"]
107
+ termsLink: NotRequired[str]
108
+ theme: NotRequired[Theme]
109
+ addUserToGroups: NotRequired[List[str]]
110
+ allowedOAuthScopes: List[str]
111
+ allowedAccounts: List[str]
112
+ callbackUrls: List[str]
113
+ logoutUrls: List[str]
114
+ confirmSignUpUrl: NotRequired[str]
115
+ passwordlessLoginUrl: NotRequired[str]
116
+ fromEmailAddress: NotRequired[str]
117
+ subjectInviteSettings: NotRequired[SubjectInviteSettings]
118
+ refreshTokenValidityDays: NotRequired[int]
119
+
120
+
121
+ class PrivateUpsertOAuthAppResponse(TypedDict):
122
+ account: str
123
+ name: str
124
+ description: str
125
+ icon: NotRequired[str]
126
+ headerImage: NotRequired[str]
127
+ appUrl: str
128
+ appType: Literal["standalone", "launched", "embedded"]
129
+ clientId: str
130
+ status: Literal["developing", "live"]
131
+ termsLink: NotRequired[str]
132
+ theme: NotRequired[Theme]
133
+ addUserToGroups: NotRequired[List[str]]
134
+ allowedOAuthScopes: List[str]
135
+ allowedAccounts: List[str]
136
+ callbackUrls: List[str]
137
+ logoutUrls: List[str]
138
+ confirmSignUpUrl: NotRequired[str]
139
+ passwordlessLoginUrl: NotRequired[str]
140
+ fromEmailAddress: NotRequired[str]
141
+ subjectInviteSettings: NotRequired[SubjectInviteSettings]
142
+ refreshTokenValidityDays: NotRequired[int]
143
+ id: str
144
+ lastUpdated: str
145
+
146
+
147
+ class PrivateGetByClientIdResponse(TypedDict):
148
+ account: str
149
+ name: str
150
+ description: str
151
+ icon: NotRequired[str]
152
+ headerImage: NotRequired[str]
153
+ appUrl: str
154
+ appType: Literal["standalone", "launched", "embedded"]
155
+ clientId: str
156
+ status: Literal["developing", "live"]
157
+ termsLink: NotRequired[str]
158
+ theme: NotRequired[Theme]
159
+ addUserToGroups: NotRequired[List[str]]
160
+ allowedOAuthScopes: List[str]
161
+ allowedAccounts: List[str]
162
+ callbackUrls: List[str]
163
+ logoutUrls: List[str]
164
+ confirmSignUpUrl: NotRequired[str]
165
+ passwordlessLoginUrl: NotRequired[str]
166
+ fromEmailAddress: NotRequired[str]
167
+ subjectInviteSettings: NotRequired[SubjectInviteSettings]
168
+ refreshTokenValidityDays: NotRequired[int]
169
+ id: str
170
+ lastUpdated: str
171
+
172
+
173
+ class ListAppsParams(TypedDict):
174
+ nextPageToken: NotRequired[str]
175
+ pageSize: NotRequired[str]
176
+ appType: NotRequired[Literal["standalone", "launched", "embedded"]]
177
+
178
+
179
+ class item(TypedDict):
180
+ account: str
181
+ name: str
182
+ description: str
183
+ icon: NotRequired[str]
184
+ headerImage: NotRequired[str]
185
+ appUrl: str
186
+ appType: Literal["standalone", "launched", "embedded"]
187
+ clientId: str
188
+ status: Literal["developing", "live"]
189
+ termsLink: NotRequired[str]
190
+ theme: NotRequired[Theme]
191
+ addUserToGroups: NotRequired[List[str]]
192
+ allowedOAuthScopes: List[str]
193
+ allowedAccounts: List[str]
194
+ callbackUrls: List[str]
195
+ logoutUrls: List[str]
196
+ confirmSignUpUrl: NotRequired[str]
197
+ passwordlessLoginUrl: NotRequired[str]
198
+ fromEmailAddress: NotRequired[str]
199
+ subjectInviteSettings: NotRequired[SubjectInviteSettings]
200
+ refreshTokenValidityDays: NotRequired[int]
201
+ id: str
202
+ lastUpdated: str
203
+
204
+
205
+ class ListAppsResponse(TypedDict):
206
+ items: List[item]
207
+ links: Links
208
+
209
+
210
+ class OauthAppsServiceClient(BaseClient):
211
+ def __init__(self, **cfg: Unpack[AlphaConfig]):
212
+ kwargs = {"target": "lambda://oauth-apps-service:deployed", **(cfg or {})}
213
+ super().__init__(**kwargs)
214
+
215
+ async def private_list_o_auth_apps(self, params: PrivateListOAuthAppsParams):
216
+ res = await self.client.request(
217
+ path="/v1/private/oauth-apps", method="GET", params=cast(dict, params)
218
+ )
219
+ return cast(AlphaResponse[PrivateListOAuthAppsResponse], res)
220
+
221
+ async def private_get_o_auth_app(self, id: str):
222
+ res = await self.client.request(
223
+ path=f"/v1/private/oauth-apps/{quote(id)}", method="GET"
224
+ )
225
+ return cast(AlphaResponse[PrivateGetOAuthAppResponse], res)
226
+
227
+ async def private_delete_o_auth_app(self, id: str):
228
+ res = await self.client.request(
229
+ path=f"/v1/private/oauth-apps/{quote(id)}", method="DELETE"
230
+ )
231
+ return cast(AlphaResponse[PrivateDeleteOAuthAppResponse], res)
232
+
233
+ async def private_upsert_o_auth_app(
234
+ self, id: str, body: PrivateUpsertOAuthAppRequest
235
+ ):
236
+ res = await self.client.request(
237
+ path=f"/v1/private/oauth-apps/{quote(id)}",
238
+ method="PUT",
239
+ body=cast(dict, body),
240
+ )
241
+ return cast(AlphaResponse[PrivateUpsertOAuthAppResponse], res)
242
+
243
+ async def private_get_by_client_id(self, client_id: str):
244
+ res = await self.client.request(
245
+ path=f"/v1/private/oauth-clients/{quote(client_id)}", method="GET"
246
+ )
247
+ return cast(AlphaResponse[PrivateGetByClientIdResponse], res)
248
+
249
+ async def list_apps(self, params: ListAppsParams):
250
+ res = await self.client.request(
251
+ path="/v1/oauth-apps", method="GET", params=cast(dict, params)
252
+ )
253
+ return cast(AlphaResponse[ListAppsResponse], res)
@@ -0,0 +1,157 @@
1
+ # This file was generated automatically. Do not edit it directly.
2
+ # generated by datamodel-codegen:
3
+ # filename: patient-service.json
4
+ from typing import Any, Dict, List, NotRequired, TypedDict, Unpack, cast
5
+ from urllib.parse import quote
6
+
7
+ from fountain_life_service_clients._base_client import (
8
+ AlphaConfig,
9
+ AlphaResponse,
10
+ BaseClient,
11
+ )
12
+
13
+
14
+ class Tag(TypedDict):
15
+ key: str
16
+ value: str
17
+
18
+
19
+ class CreateFileRequest(TypedDict):
20
+ id: NotRequired[str]
21
+ name: str
22
+ datasetId: str
23
+ attributes: NotRequired[Dict[str, Any]]
24
+ contentType: NotRequired[str]
25
+ contentMD5: NotRequired[str]
26
+ checksum: NotRequired[str]
27
+ tags: NotRequired[List[Tag]]
28
+ managedDocumentReference: NotRequired[bool]
29
+
30
+
31
+ class CreateFileResponse(TypedDict):
32
+ id: str
33
+ name: str
34
+ datasetId: str
35
+ attributes: NotRequired[Dict[str, Any]]
36
+ contentType: NotRequired[str]
37
+ contentMD5: NotRequired[str]
38
+ checksum: NotRequired[str]
39
+ tags: NotRequired[List[Tag]]
40
+ userId: str
41
+ uploadUrl: str
42
+
43
+
44
+ class UpdateFileRequest(TypedDict):
45
+ name: NotRequired[str]
46
+ attributes: NotRequired[Dict[str, Any]]
47
+ checksum: NotRequired[str]
48
+ managedDocumentReference: NotRequired[bool]
49
+
50
+
51
+ class UpdateFileResponse(TypedDict):
52
+ id: str
53
+ name: str
54
+ datasetId: str
55
+ attributes: NotRequired[Dict[str, Any]]
56
+ contentType: NotRequired[str]
57
+ contentMD5: NotRequired[str]
58
+ checksum: NotRequired[str]
59
+ tags: NotRequired[List[Tag]]
60
+ userId: str
61
+
62
+
63
+ class GetFileByIdParams(TypedDict):
64
+ subject: NotRequired[str]
65
+ include: NotRequired[str]
66
+ includeContentDisposition: NotRequired[bool]
67
+
68
+
69
+ class GetFileByIdResponse(TypedDict):
70
+ id: str
71
+ name: str
72
+ datasetId: str
73
+ attributes: NotRequired[Dict[str, Any]]
74
+ contentType: NotRequired[str]
75
+ contentMD5: NotRequired[str]
76
+ checksum: NotRequired[str]
77
+ tags: NotRequired[List[Tag]]
78
+ userId: str
79
+ downloadUrl: NotRequired[str]
80
+
81
+
82
+ class Item(TypedDict):
83
+ account: str
84
+ dataset: str
85
+ patient: str
86
+ user: str
87
+ date: str
88
+
89
+
90
+ class GetAllUserMappingsResponse(TypedDict):
91
+ items: List[Item]
92
+
93
+
94
+ class GetPatientMappingResponse(TypedDict):
95
+ patientId: str
96
+
97
+
98
+ class GetUserMappingResponse(TypedDict):
99
+ items: List[str]
100
+
101
+
102
+ class PatientServiceClient(BaseClient):
103
+ def __init__(self, **cfg: Unpack[AlphaConfig]):
104
+ kwargs = {"target": "lambda://patient-service:deployed", **(cfg or {})}
105
+ super().__init__(**kwargs)
106
+
107
+ async def create_file(self, project_id: str, body: CreateFileRequest):
108
+ """Create a new file in the project."""
109
+ res = await self.client.request(
110
+ path=f"/v1/fhir/files/projects/{quote(project_id)}/files",
111
+ method="POST",
112
+ body=cast(dict, body),
113
+ )
114
+ return cast(AlphaResponse[CreateFileResponse], res)
115
+
116
+ async def update_file(self, project_id: str, file_id: str, body: UpdateFileRequest):
117
+ """Update an existing file."""
118
+ res = await self.client.request(
119
+ path=f"/v1/fhir/files/projects/{quote(project_id)}/files/{quote(file_id)}",
120
+ method="PATCH",
121
+ body=cast(dict, body),
122
+ )
123
+ return cast(AlphaResponse[UpdateFileResponse], res)
124
+
125
+ async def get_file_by_id(
126
+ self, project_id: str, file_id: str, params: GetFileByIdParams
127
+ ):
128
+ """Get a file by its identifier."""
129
+ res = await self.client.request(
130
+ path=f"/v1/fhir/files/projects/{quote(project_id)}/files/{quote(file_id)}",
131
+ method="GET",
132
+ params=cast(dict, params),
133
+ )
134
+ return cast(AlphaResponse[GetFileByIdResponse], res)
135
+
136
+ async def get_all_user_mappings(self, user_id: str):
137
+ """Private endpoint to fetch all mappings for a given user. Not available via the public API."""
138
+ res = await self.client.request(
139
+ path=f"/private/patient-mappings/users/{quote(user_id)}", method="GET"
140
+ )
141
+ return cast(AlphaResponse[GetAllUserMappingsResponse], res)
142
+
143
+ async def get_patient_mapping(self, project_id: str, user_id: str):
144
+ """Private endpoint to fetch the single FHIR patient ID for a given user in a given project. Not available via the public API."""
145
+ res = await self.client.request(
146
+ path=f"/private/patient-mappings/projects/{quote(project_id)}/users/{quote(user_id)}",
147
+ method="GET",
148
+ )
149
+ return cast(AlphaResponse[GetPatientMappingResponse], res)
150
+
151
+ async def get_user_mapping(self, project_id: str, patient_id: str):
152
+ """Private endpoint to fetch the platform user IDs for a given FHIR patient in a given project. Not available via the public API."""
153
+ res = await self.client.request(
154
+ path=f"/private/patient-mappings/projects/{quote(project_id)}/patients/{quote(patient_id)}",
155
+ method="GET",
156
+ )
157
+ return cast(AlphaResponse[GetUserMappingResponse], res)