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,169 @@
1
+ # This file was generated automatically. Do not edit it directly.
2
+ # generated by datamodel-codegen:
3
+ # filename: ehr-ingestion-wearables-api.json
4
+ from typing import List, 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 GetAnchorParams(TypedDict):
14
+ type: str
15
+ projectId: str
16
+
17
+
18
+ class GetAnchorResponse(TypedDict):
19
+ anchor: NotRequired[str]
20
+
21
+
22
+ class Source(TypedDict):
23
+ name: str
24
+
25
+
26
+ class SourceRevision(TypedDict):
27
+ """
28
+ The source of the device or app that recorded the data.
29
+ """
30
+
31
+ source: Source
32
+
33
+
34
+ class Metadata(TypedDict):
35
+ HKTimeZone: NotRequired[str]
36
+
37
+
38
+ class Sample(TypedDict):
39
+ uuid: str
40
+ startDate: str
41
+ endDate: str
42
+ sourceRevision: NotRequired[SourceRevision]
43
+ metadata: NotRequired[Metadata]
44
+
45
+
46
+ class DeletedSample(TypedDict):
47
+ uuid: str
48
+
49
+
50
+ class PutRecordsRequest(TypedDict):
51
+ type: str
52
+ projectId: str
53
+ newAnchor: str
54
+ tz: NotRequired[str]
55
+ samples: List[Sample]
56
+ deletedSamples: List[DeletedSample]
57
+
58
+
59
+ class PutRecordsResponse(TypedDict):
60
+ runId: NotRequired[str]
61
+
62
+
63
+ class DeleteRecordsParams(TypedDict):
64
+ type: NotRequired[
65
+ Literal[
66
+ "HKQuantityTypeIdentifierBodyMass",
67
+ "HKQuantityTypeIdentifierHeight",
68
+ "HKQuantityTypeIdentifierBodyMassIndex",
69
+ "HKQuantityTypeIdentifierBodyFatPercentage",
70
+ "HKWorkoutTypeIdentifier",
71
+ "HKCategoryTypeIdentifierSleepAnalysis",
72
+ "HKQuantityTypeIdentifierActiveEnergyBurned",
73
+ "HKCategoryTypeIdentifierMenstrualFlow",
74
+ "HKQuantityTypeIdentifierBloodGlucose",
75
+ "HKQuantityTypeIdentifierOxygenSaturation",
76
+ "HKQuantityTypeIdentifierAppleWalkingSteadiness",
77
+ "HKQuantityTypeIdentifierWalkingHeartRateAverage",
78
+ "HKQuantityTypeIdentifierRestingHeartRate",
79
+ "HKCategoryTypeIdentifierHighHeartRateEvent",
80
+ "HKCategoryTypeIdentifierLowHeartRateEvent",
81
+ "HKQuantityTypeIdentifierHeartRateVariabilitySDNN",
82
+ "HKQuantityTypeIdentifierSixMinuteWalkTestDistance",
83
+ "HKClinicalTypeIdentifierLabResultRecord",
84
+ "HKClinicalTypeIdentifierAllergyRecord",
85
+ "HKClinicalTypeIdentifierMedicationRecord",
86
+ "HKClinicalTypeIdentifierConditionRecord",
87
+ "HKClinicalTypeIdentifierImmunizationRecord",
88
+ "HKClinicalTypeIdentifierProcedureRecord",
89
+ ]
90
+ ]
91
+ projectId: str
92
+
93
+
94
+ class BackfillRecordsRequest(TypedDict):
95
+ hkType: Literal[
96
+ "HKQuantityTypeIdentifierBodyMass",
97
+ "HKQuantityTypeIdentifierHeight",
98
+ "HKQuantityTypeIdentifierBodyMassIndex",
99
+ "HKQuantityTypeIdentifierBodyFatPercentage",
100
+ "HKWorkoutTypeIdentifier",
101
+ "HKCategoryTypeIdentifierSleepAnalysis",
102
+ "HKQuantityTypeIdentifierActiveEnergyBurned",
103
+ "HKCategoryTypeIdentifierMenstrualFlow",
104
+ "HKQuantityTypeIdentifierBloodGlucose",
105
+ "HKQuantityTypeIdentifierOxygenSaturation",
106
+ "HKQuantityTypeIdentifierAppleWalkingSteadiness",
107
+ "HKQuantityTypeIdentifierWalkingHeartRateAverage",
108
+ "HKQuantityTypeIdentifierRestingHeartRate",
109
+ "HKCategoryTypeIdentifierHighHeartRateEvent",
110
+ "HKCategoryTypeIdentifierLowHeartRateEvent",
111
+ "HKQuantityTypeIdentifierHeartRateVariabilitySDNN",
112
+ "HKQuantityTypeIdentifierSixMinuteWalkTestDistance",
113
+ "HKClinicalTypeIdentifierLabResultRecord",
114
+ "HKClinicalTypeIdentifierAllergyRecord",
115
+ "HKClinicalTypeIdentifierMedicationRecord",
116
+ "HKClinicalTypeIdentifierConditionRecord",
117
+ "HKClinicalTypeIdentifierImmunizationRecord",
118
+ "HKClinicalTypeIdentifierProcedureRecord",
119
+ ]
120
+ projectId: str
121
+ patientId: NotRequired[str]
122
+
123
+
124
+ class BackfillRecordsResponse(TypedDict):
125
+ runId: str
126
+
127
+
128
+ class EhrIngestionWearablesApiClient(BaseClient):
129
+ def __init__(self, **cfg: Unpack[AlphaConfig]):
130
+ kwargs = {
131
+ "target": "lambda://ehr-ingestion-wearables-api:deployed",
132
+ **(cfg or {}),
133
+ }
134
+ super().__init__(**kwargs)
135
+
136
+ async def get_anchor(self, params: GetAnchorParams):
137
+ """Get the member's most recently processed anchor for a given healthkit sample type."""
138
+ res = await self.client.request(
139
+ path="/v1/ehr-ingestion-wearables/v1/healthkit/anchor",
140
+ method="GET",
141
+ params=cast(dict, params),
142
+ )
143
+ return cast(AlphaResponse[GetAnchorResponse], res)
144
+
145
+ async def put_records(self, body: PutRecordsRequest):
146
+ """Put records of a given healthkit sample type. Supports idempotent creation and deletion."""
147
+ res = await self.client.request(
148
+ path="/v1/ehr-ingestion-wearables/v1/healthkit/records",
149
+ method="PUT",
150
+ body=cast(dict, body),
151
+ )
152
+ return cast(AlphaResponse[PutRecordsResponse], res)
153
+
154
+ async def delete_records(self, params: DeleteRecordsParams):
155
+ """Delete all records for a member's given healthkit sample type."""
156
+ await self.client.request(
157
+ path="/v1/ehr-ingestion-wearables/v1/healthkit/records",
158
+ method="DELETE",
159
+ params=cast(dict, params),
160
+ )
161
+
162
+ async def backfill_records(self, body: BackfillRecordsRequest):
163
+ """Backfill all records for a given healthkit sample type."""
164
+ res = await self.client.request(
165
+ path="/private/v1/healthkit/records/backfill",
166
+ method="POST",
167
+ body=cast(dict, body),
168
+ )
169
+ return cast(AlphaResponse[BackfillRecordsResponse], res)
@@ -0,0 +1,334 @@
1
+ # This file was generated automatically. Do not edit it directly.
2
+ # generated by datamodel-codegen:
3
+ # filename: ehr-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 Item(TypedDict):
15
+ id: str
16
+ name: str
17
+ ehrType: str
18
+ creator: NotRequired[str]
19
+ apiBaseUrl: str
20
+ apiAuthType: str
21
+ ingestionModel: NotRequired[str]
22
+ delayBetweenRecords: NotRequired[float]
23
+
24
+
25
+ class Links(TypedDict):
26
+ self: str
27
+ next: NotRequired[str]
28
+
29
+
30
+ class GetEhrsResponse(TypedDict):
31
+ items: List[Item]
32
+ links: Links
33
+
34
+
35
+ class CreateEhrRequest(TypedDict):
36
+ id: NotRequired[str]
37
+ name: str
38
+ ehrType: str
39
+ apiBaseUrl: str
40
+ apiKey: str
41
+ apiSecret: str
42
+ apiAuthType: str
43
+ ingestionModel: NotRequired[Literal["ASYNCHRONOUS", "SYNCHRONOUS"]]
44
+ delayBetweenRecords: NotRequired[float]
45
+
46
+
47
+ class CreateEhrResponse(TypedDict):
48
+ id: NotRequired[str]
49
+ name: str
50
+ ehrType: str
51
+ apiBaseUrl: str
52
+ apiKey: str
53
+ apiSecret: str
54
+ apiAuthType: str
55
+ ingestionModel: NotRequired[Literal["ASYNCHRONOUS", "SYNCHRONOUS"]]
56
+ delayBetweenRecords: NotRequired[float]
57
+
58
+
59
+ class GetEhrResponse(TypedDict):
60
+ id: NotRequired[str]
61
+ name: str
62
+ ehrType: str
63
+ apiBaseUrl: str
64
+ apiKey: str
65
+ apiSecret: str
66
+ apiAuthType: str
67
+ ingestionModel: NotRequired[Literal["ASYNCHRONOUS", "SYNCHRONOUS"]]
68
+ delayBetweenRecords: NotRequired[float]
69
+
70
+
71
+ class UpdateEhrRequest(TypedDict):
72
+ id: NotRequired[str]
73
+ name: str
74
+ ehrType: str
75
+ apiBaseUrl: str
76
+ apiKey: str
77
+ apiSecret: str
78
+ apiAuthType: str
79
+ ingestionModel: NotRequired[Literal["ASYNCHRONOUS", "SYNCHRONOUS"]]
80
+ delayBetweenRecords: NotRequired[float]
81
+
82
+
83
+ class UpdateEhrResponse(TypedDict):
84
+ id: NotRequired[str]
85
+ name: str
86
+ ehrType: str
87
+ apiBaseUrl: str
88
+ apiKey: str
89
+ apiSecret: str
90
+ apiAuthType: str
91
+ ingestionModel: NotRequired[Literal["ASYNCHRONOUS", "SYNCHRONOUS"]]
92
+ delayBetweenRecords: NotRequired[float]
93
+
94
+
95
+ class item(TypedDict):
96
+ id: str
97
+ ehrId: str
98
+ project: str
99
+
100
+
101
+ class GetConnectorsResponse(TypedDict):
102
+ items: List[item]
103
+ links: Links
104
+
105
+
106
+ class CreateConnectorRequest(TypedDict):
107
+ id: str
108
+ ehrId: str
109
+ project: str
110
+
111
+
112
+ class CreateConnectorResponse(TypedDict):
113
+ id: str
114
+ ehrId: str
115
+ project: str
116
+
117
+
118
+ class GetConnectorResponse(TypedDict):
119
+ id: str
120
+ ehrId: str
121
+ project: str
122
+
123
+
124
+ class Connector(TypedDict):
125
+ id: str
126
+ ehrId: str
127
+ project: str
128
+
129
+
130
+ class Record(TypedDict):
131
+ type: str
132
+ id: str
133
+
134
+
135
+ class Item2(TypedDict):
136
+ connectors: List[Connector]
137
+ records: List[Record]
138
+ consumePendingUpdates: bool
139
+
140
+
141
+ class GetIngestionsResponse(TypedDict):
142
+ items: List[Item2]
143
+ links: Links
144
+
145
+
146
+ class CreateIngestionRequest(TypedDict):
147
+ connectors: List[Connector]
148
+ records: List[Record]
149
+ consumePendingUpdates: bool
150
+
151
+
152
+ class CreateIngestionResponse(TypedDict):
153
+ connectors: List[Connector]
154
+ records: List[Record]
155
+ consumePendingUpdates: bool
156
+
157
+
158
+ class GetIngestionResponse(TypedDict):
159
+ connectors: List[Connector]
160
+ records: List[Record]
161
+ consumePendingUpdates: bool
162
+
163
+
164
+ class Ingestion(TypedDict):
165
+ connectors: List[Connector]
166
+ records: List[Record]
167
+ consumePendingUpdates: bool
168
+
169
+
170
+ class Item3(TypedDict):
171
+ ingestion: Ingestion
172
+ cronExpression: str
173
+
174
+
175
+ class GetScheduledIngestionsResponse(TypedDict):
176
+ items: List[Item3]
177
+ links: Links
178
+
179
+
180
+ class ingestion(TypedDict):
181
+ connectors: List[Connector]
182
+ records: List[Record]
183
+ consumePendingUpdates: bool
184
+
185
+
186
+ class CreateScheduledIngestionRequest(TypedDict):
187
+ ingestion: ingestion
188
+ cronExpression: str
189
+
190
+
191
+ class Ingestion2(TypedDict):
192
+ connectors: List[Connector]
193
+ records: List[Record]
194
+ consumePendingUpdates: bool
195
+
196
+
197
+ class CreateScheduledIngestionResponse(TypedDict):
198
+ ingestion: Ingestion2
199
+ cronExpression: str
200
+
201
+
202
+ class Ingestion3(TypedDict):
203
+ connectors: List[Connector]
204
+ records: List[Record]
205
+ consumePendingUpdates: bool
206
+
207
+
208
+ class GetScheduledIngestionResponse(TypedDict):
209
+ ingestion: Ingestion3
210
+ cronExpression: str
211
+
212
+
213
+ class EhrServiceClient(BaseClient):
214
+ def __init__(self, **cfg: Unpack[AlphaConfig]):
215
+ kwargs = {"target": "lambda://ehr-service:deployed", **(cfg or {})}
216
+ super().__init__(**kwargs)
217
+
218
+ async def get_ehrs(self):
219
+ """Returns a list of EHRs that the user has access to."""
220
+ res = await self.client.request(path="/v1/ehrs", method="GET")
221
+ return cast(AlphaResponse[GetEhrsResponse], res)
222
+
223
+ async def create_ehr(self, body: CreateEhrRequest):
224
+ """Create an EHR configuration, which can then be connected to projects and used to sync data from your EHR to the LifeOmic Platform."""
225
+ res = await self.client.request(
226
+ path="/v1/ehrs", method="POST", body=cast(dict, body)
227
+ )
228
+ return cast(AlphaResponse[CreateEhrResponse], res)
229
+
230
+ async def get_ehr(self, ehr_id: str):
231
+ """Returns an EHR."""
232
+ res = await self.client.request(path=f"/v1/ehrs/{quote(ehr_id)}", method="GET")
233
+ return cast(AlphaResponse[GetEhrResponse], res)
234
+
235
+ async def delete_ehr(self, ehr_id: str):
236
+ """Deletes an EHR."""
237
+ await self.client.request(path=f"/v1/ehrs/{quote(ehr_id)}", method="DELETE")
238
+
239
+ async def update_ehr(self, ehr_id: str, body: UpdateEhrRequest):
240
+ """Updates an EHR."""
241
+ res = await self.client.request(
242
+ path=f"/v1/ehrs/{quote(ehr_id)}", method="PUT", body=cast(dict, body)
243
+ )
244
+ return cast(AlphaResponse[UpdateEhrResponse], res)
245
+
246
+ async def get_connectors(self, ehr_id: str):
247
+ """Returns a list of project connectors configured for this EHR."""
248
+ res = await self.client.request(
249
+ path=f"/v1/ehrs/{quote(ehr_id)}/connectors", method="GET"
250
+ )
251
+ return cast(AlphaResponse[GetConnectorsResponse], res)
252
+
253
+ async def create_connector(self, ehr_id: str, body: CreateConnectorRequest):
254
+ """Creates an EHR project connector, which represents the ability for this EHR to tie ingested records to the connected project."""
255
+ res = await self.client.request(
256
+ path=f"/v1/ehrs/{quote(ehr_id)}/connectors",
257
+ method="POST",
258
+ body=cast(dict, body),
259
+ )
260
+ return cast(AlphaResponse[CreateConnectorResponse], res)
261
+
262
+ async def get_connector(self, ehr_id: str, connector_id: str):
263
+ """Returns an EHR project connector."""
264
+ res = await self.client.request(
265
+ path=f"/v1/ehrs/{quote(ehr_id)}/connectors/{quote(connector_id)}",
266
+ method="GET",
267
+ )
268
+ return cast(AlphaResponse[GetConnectorResponse], res)
269
+
270
+ async def delete_connector(self, ehr_id: str, connector_id: str):
271
+ """Deletes the EHR project connector."""
272
+ await self.client.request(
273
+ path=f"/v1/ehrs/{quote(ehr_id)}/connectors/{quote(connector_id)}",
274
+ method="DELETE",
275
+ )
276
+
277
+ async def get_ingestions(self, ehr_id: str):
278
+ """Returns a list of EHR ingestions."""
279
+ res = await self.client.request(
280
+ path=f"/v1/ehrs/{quote(ehr_id)}/ingestions", method="GET"
281
+ )
282
+ return cast(AlphaResponse[GetIngestionsResponse], res)
283
+
284
+ async def create_ingestion(self, ehr_id: str, body: CreateIngestionRequest):
285
+ """Creates an EHR ingestion, which represents a synchronization of EHR data to the LifeOmic Platform."""
286
+ res = await self.client.request(
287
+ path=f"/v1/ehrs/{quote(ehr_id)}/ingestions",
288
+ method="POST",
289
+ body=cast(dict, body),
290
+ )
291
+ return cast(AlphaResponse[CreateIngestionResponse], res)
292
+
293
+ async def get_ingestion(self, ehr_id: str, ingestion_id: str):
294
+ """Returns an EHR ingestion."""
295
+ res = await self.client.request(
296
+ path=f"/v1/ehrs/{quote(ehr_id)}/ingestions/{quote(ingestion_id)}",
297
+ method="GET",
298
+ )
299
+ return cast(AlphaResponse[GetIngestionResponse], res)
300
+
301
+ async def get_scheduled_ingestions(self, ehr_id: str):
302
+ """Returns a list of scheduled EHR ingestions."""
303
+ res = await self.client.request(
304
+ path=f"/v1/ehrs/{quote(ehr_id)}/scheduled-ingestions", method="GET"
305
+ )
306
+ return cast(AlphaResponse[GetScheduledIngestionsResponse], res)
307
+
308
+ async def create_scheduled_ingestion(
309
+ self, ehr_id: str, body: CreateScheduledIngestionRequest
310
+ ):
311
+ """Creates a recurring schedule on which an EHR ingestion should run."""
312
+ res = await self.client.request(
313
+ path=f"/v1/ehrs/{quote(ehr_id)}/scheduled-ingestions",
314
+ method="POST",
315
+ body=cast(dict, body),
316
+ )
317
+ return cast(AlphaResponse[CreateScheduledIngestionResponse], res)
318
+
319
+ async def get_scheduled_ingestion(self, ehr_id: str, scheduled_ingestion_id: str):
320
+ """Returns a scheduled EHR ingestion."""
321
+ res = await self.client.request(
322
+ path=f"/v1/ehrs/{quote(ehr_id)}/scheduled-ingestions/{quote(scheduled_ingestion_id)}",
323
+ method="GET",
324
+ )
325
+ return cast(AlphaResponse[GetScheduledIngestionResponse], res)
326
+
327
+ async def delete_scheduled_ingestion(
328
+ self, ehr_id: str, scheduled_ingestion_id: str
329
+ ):
330
+ """Deletes the scheduled EHR ingestion."""
331
+ await self.client.request(
332
+ path=f"/v1/ehrs/{quote(ehr_id)}/scheduled-ingestions/{quote(scheduled_ingestion_id)}",
333
+ method="DELETE",
334
+ )
@@ -0,0 +1,81 @@
1
+ # This file was generated automatically. Do not edit it directly.
2
+ # generated by datamodel-codegen:
3
+ # filename: email-service-email.json
4
+ from typing import (
5
+ Any,
6
+ Dict,
7
+ List,
8
+ Literal,
9
+ NotRequired,
10
+ Optional,
11
+ TypedDict,
12
+ Unpack,
13
+ cast,
14
+ )
15
+
16
+ from fountain_life_service_clients._base_client import (
17
+ AlphaConfig,
18
+ AlphaResponse,
19
+ BaseClient,
20
+ )
21
+
22
+
23
+ class Attachment(TypedDict):
24
+ filename: str
25
+ content: str
26
+ contentType: str
27
+
28
+
29
+ class SendMailRequest(TypedDict):
30
+ email: str
31
+ expirationDateTime: str
32
+ language: NotRequired[Optional[str]]
33
+ messageId: str
34
+ priority: Literal["HIGH", "LOW"]
35
+ source: NotRequired[str]
36
+ replyToAddresses: NotRequired[List[str]]
37
+ attachments: NotRequired[List[Attachment]]
38
+ account: NotRequired[str]
39
+ subject: str
40
+ html: str
41
+ text: NotRequired[str]
42
+
43
+
44
+ class SendMailResponse(TypedDict):
45
+ pass
46
+
47
+
48
+ class SendTemplatedEmailRequest(TypedDict):
49
+ email: str
50
+ expirationDateTime: str
51
+ language: NotRequired[Optional[str]]
52
+ messageId: str
53
+ priority: Literal["HIGH", "LOW"]
54
+ source: NotRequired[str]
55
+ replyToAddresses: NotRequired[List[str]]
56
+ attachments: NotRequired[List[Attachment]]
57
+ account: NotRequired[str]
58
+ templateName: str
59
+ templateData: Dict[str, Any]
60
+
61
+
62
+ class SendTemplatedEmailResponse(TypedDict):
63
+ pass
64
+
65
+
66
+ class EmailServiceEmailClient(BaseClient):
67
+ def __init__(self, **cfg: Unpack[AlphaConfig]):
68
+ kwargs = {"target": "lambda://email-service:deployed", **(cfg or {})}
69
+ super().__init__(**kwargs)
70
+
71
+ async def send_mail(self, body: SendMailRequest):
72
+ res = await self.client.request(
73
+ path="/v1/private/sendEmail", method="POST", body=cast(dict, body)
74
+ )
75
+ return cast(AlphaResponse[SendMailResponse], res)
76
+
77
+ async def send_templated_email(self, body: SendTemplatedEmailRequest):
78
+ res = await self.client.request(
79
+ path="/v1/private/sendTemplatedEmail", method="POST", body=cast(dict, body)
80
+ )
81
+ return cast(AlphaResponse[SendTemplatedEmailResponse], res)
@@ -0,0 +1,33 @@
1
+ # This file was generated automatically. Do not edit it directly.
2
+ # generated by datamodel-codegen:
3
+ # filename: email-service-sms.json
4
+ from typing import TypedDict, Unpack, cast
5
+
6
+ from fountain_life_service_clients._base_client import (
7
+ AlphaConfig,
8
+ AlphaResponse,
9
+ BaseClient,
10
+ )
11
+
12
+
13
+ class SendSmsRequest(TypedDict):
14
+ messageId: str
15
+ phoneNumber: str
16
+ content: str
17
+
18
+
19
+ class SendSmsResponse(TypedDict):
20
+ pass
21
+
22
+
23
+ class EmailServiceSmsClient(BaseClient):
24
+ def __init__(self, **cfg: Unpack[AlphaConfig]):
25
+ kwargs = {"target": "lambda://email-service:deployed", **(cfg or {})}
26
+ super().__init__(**kwargs)
27
+
28
+ async def send_sms(self, body: SendSmsRequest):
29
+ """Private endpoint for sending Fountain Life specific SMS."""
30
+ res = await self.client.request(
31
+ path="/v1/private/sendSms", method="POST", body=cast(dict, body)
32
+ )
33
+ return cast(AlphaResponse[SendSmsResponse], res)
@@ -0,0 +1,55 @@
1
+ # This file was generated automatically. Do not edit it directly.
2
+ # generated by datamodel-codegen:
3
+ # filename: fhir-post-processor-service.json
4
+ from typing import Any, NotRequired, TypedDict, Union, 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 Meta(TypedDict):
15
+ tag: NotRequired[Any]
16
+
17
+
18
+ class Partial(TypedDict):
19
+ meta: Meta
20
+
21
+
22
+ class GetPartialFhirResourceResponse1(TypedDict):
23
+ id: str
24
+ resourceType: NotRequired[str]
25
+ partial: Partial
26
+
27
+
28
+ class partial(TypedDict):
29
+ identifier: NotRequired[Any]
30
+
31
+
32
+ class GetPartialFhirResourceResponse2(TypedDict):
33
+ id: str
34
+ resourceType: NotRequired[str]
35
+ partial: partial
36
+
37
+
38
+ GetPartialFhirResourceResponse = Union[
39
+ GetPartialFhirResourceResponse1, GetPartialFhirResourceResponse2
40
+ ]
41
+
42
+
43
+ class FhirPostProcessorServiceClient(BaseClient):
44
+ def __init__(self, **cfg: Unpack[AlphaConfig]):
45
+ kwargs = {
46
+ "target": "lambda://fhir-post-processor-service:deployed",
47
+ **(cfg or {}),
48
+ }
49
+ super().__init__(**kwargs)
50
+
51
+ async def get_partial_fhir_resource(self, resource_type: str, id: str):
52
+ res = await self.client.request(
53
+ path=f"/v1/private/{quote(resource_type)}/{quote(id)}", method="GET"
54
+ )
55
+ return cast(AlphaResponse[GetPartialFhirResourceResponse], res)