fathom-python 0.0.37__tar.gz → 0.0.38__tar.gz

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 (72) hide show
  1. {fathom_python-0.0.37 → fathom_python-0.0.38}/PKG-INFO +12 -10
  2. {fathom_python-0.0.37 → fathom_python-0.0.38}/README.md +9 -8
  3. {fathom_python-0.0.37 → fathom_python-0.0.38}/pyproject.toml +1 -1
  4. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/_version.py +2 -2
  5. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/__init__.py +28 -2
  6. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/listmeetingsop.py +12 -15
  7. fathom_python-0.0.38/src/fathom_python/models/listmeetingtypesop.py +34 -0
  8. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/meeting.py +6 -0
  9. fathom_python-0.0.38/src/fathom_python/models/meetingtype.py +34 -0
  10. fathom_python-0.0.38/src/fathom_python/models/meetingtypelistresponse.py +52 -0
  11. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/sdk.py +220 -4
  12. fathom_python-0.0.38/src/fathom_python/types/base64fileinput.py +39 -0
  13. fathom_python-0.0.38/src/fathom_python/utils/dynamic_imports.py +54 -0
  14. {fathom_python-0.0.37 → fathom_python-0.0.38}/py.typed +0 -0
  15. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/__init__.py +0 -0
  16. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/_hooks/__init__.py +0 -0
  17. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/_hooks/registration.py +0 -0
  18. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/_hooks/sdkhooks.py +0 -0
  19. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/_hooks/types.py +0 -0
  20. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/basesdk.py +0 -0
  21. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/errors/__init__.py +0 -0
  22. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/errors/apierror.py +0 -0
  23. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/errors/fathomerror.py +0 -0
  24. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/errors/no_response_error.py +0 -0
  25. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/errors/responsevalidationerror.py +0 -0
  26. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/httpclient.py +0 -0
  27. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/actionitem.py +0 -0
  28. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/assignee.py +0 -0
  29. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/callbackresponse.py +0 -0
  30. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/createwebhookop.py +0 -0
  31. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/crmcompanymatch.py +0 -0
  32. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/crmcontactmatch.py +0 -0
  33. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/crmdealmatch.py +0 -0
  34. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/crmmatches.py +0 -0
  35. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/deletewebhookop.py +0 -0
  36. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/fathomuser.py +0 -0
  37. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/getrecordingsummaryop.py +0 -0
  38. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/getrecordingtranscriptop.py +0 -0
  39. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/invitee.py +0 -0
  40. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/listteammembersop.py +0 -0
  41. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/listteamsop.py +0 -0
  42. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/meetinglistresponse.py +0 -0
  43. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/meetingsummary.py +0 -0
  44. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/security.py +0 -0
  45. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/team.py +0 -0
  46. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/teamlistresponse.py +0 -0
  47. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/teammember.py +0 -0
  48. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/teammemberlistresponse.py +0 -0
  49. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/transcriptitem.py +0 -0
  50. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/transcriptitemspeaker.py +0 -0
  51. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/models/webhook.py +0 -0
  52. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/py.typed +0 -0
  53. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/sdkconfiguration.py +0 -0
  54. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/types/__init__.py +0 -0
  55. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/types/basemodel.py +0 -0
  56. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/__init__.py +0 -0
  57. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/annotations.py +0 -0
  58. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/datetimes.py +0 -0
  59. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/enums.py +0 -0
  60. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/eventstreaming.py +0 -0
  61. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/forms.py +0 -0
  62. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/headers.py +0 -0
  63. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/logger.py +0 -0
  64. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/metadata.py +0 -0
  65. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/queryparams.py +0 -0
  66. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/requestbodies.py +0 -0
  67. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/retries.py +0 -0
  68. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/security.py +0 -0
  69. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/serializers.py +0 -0
  70. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/unmarshal_json_response.py +0 -0
  71. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/url.py +0 -0
  72. {fathom_python-0.0.37 → fathom_python-0.0.38}/src/fathom_python/utils/values.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: fathom-python
3
- Version: 0.0.37
3
+ Version: 0.0.38
4
4
  Summary: Fathom's official Python SDK.
5
5
  Author: Speakeasy
6
6
  Requires-Python: >=3.9.2
@@ -9,6 +9,7 @@ Classifier: Programming Language :: Python :: 3.10
9
9
  Classifier: Programming Language :: Python :: 3.11
10
10
  Classifier: Programming Language :: Python :: 3.12
11
11
  Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Python :: 3.14
12
13
  Requires-Dist: httpcore (>=1.0.9)
13
14
  Requires-Dist: httpx (>=0.28.1)
14
15
  Requires-Dist: jsonpath-python (>=1.0.6)
@@ -123,7 +124,7 @@ with Fathom(
123
124
  res = fathom.list_meetings(calendar_invitees_domains=[
124
125
  "acme.com",
125
126
  "client.com",
126
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
127
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
127
128
  "ceo@acme.com",
128
129
  "pm@acme.com",
129
130
  ], teams=[
@@ -158,7 +159,7 @@ async def main():
158
159
  res = await fathom.list_meetings_async(calendar_invitees_domains=[
159
160
  "acme.com",
160
161
  "client.com",
161
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
162
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
162
163
  "ceo@acme.com",
163
164
  "pm@acme.com",
164
165
  ], teams=[
@@ -202,7 +203,7 @@ with Fathom(
202
203
  res = fathom.list_meetings(calendar_invitees_domains=[
203
204
  "acme.com",
204
205
  "client.com",
205
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
206
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
206
207
  "ceo@acme.com",
207
208
  "pm@acme.com",
208
209
  ], teams=[
@@ -231,6 +232,7 @@ with Fathom(
231
232
  * [get_recording_transcript](docs/sdks/fathom/README.md#get_recording_transcript) - Get transcript
232
233
  * [list_teams](docs/sdks/fathom/README.md#list_teams) - List teams
233
234
  * [list_team_members](docs/sdks/fathom/README.md#list_team_members) - List team members
235
+ * [list_meeting_types](docs/sdks/fathom/README.md#list_meeting_types) - List meeting types
234
236
  * [create_webhook](docs/sdks/fathom/README.md#create_webhook) - Create a webhook
235
237
  * [delete_webhook](docs/sdks/fathom/README.md#delete_webhook) - Delete a webhook
236
238
 
@@ -259,7 +261,7 @@ with Fathom(
259
261
  res = fathom.list_meetings(calendar_invitees_domains=[
260
262
  "acme.com",
261
263
  "client.com",
262
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
264
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
263
265
  "ceo@acme.com",
264
266
  "pm@acme.com",
265
267
  ], teams=[
@@ -296,7 +298,7 @@ with Fathom(
296
298
  res = fathom.list_meetings(calendar_invitees_domains=[
297
299
  "acme.com",
298
300
  "client.com",
299
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
301
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
300
302
  "ceo@acme.com",
301
303
  "pm@acme.com",
302
304
  ], teams=[
@@ -329,7 +331,7 @@ with Fathom(
329
331
  res = fathom.list_meetings(calendar_invitees_domains=[
330
332
  "acme.com",
331
333
  "client.com",
332
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
334
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
333
335
  "ceo@acme.com",
334
336
  "pm@acme.com",
335
337
  ], teams=[
@@ -375,7 +377,7 @@ with Fathom(
375
377
  res = fathom.list_meetings(calendar_invitees_domains=[
376
378
  "acme.com",
377
379
  "client.com",
378
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
380
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
379
381
  "ceo@acme.com",
380
382
  "pm@acme.com",
381
383
  ], teams=[
@@ -440,7 +442,7 @@ with Fathom(
440
442
  res = fathom.list_meetings(calendar_invitees_domains=[
441
443
  "acme.com",
442
444
  "client.com",
443
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
445
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
444
446
  "ceo@acme.com",
445
447
  "pm@acme.com",
446
448
  ], teams=[
@@ -103,7 +103,7 @@ with Fathom(
103
103
  res = fathom.list_meetings(calendar_invitees_domains=[
104
104
  "acme.com",
105
105
  "client.com",
106
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
106
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
107
107
  "ceo@acme.com",
108
108
  "pm@acme.com",
109
109
  ], teams=[
@@ -138,7 +138,7 @@ async def main():
138
138
  res = await fathom.list_meetings_async(calendar_invitees_domains=[
139
139
  "acme.com",
140
140
  "client.com",
141
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
141
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
142
142
  "ceo@acme.com",
143
143
  "pm@acme.com",
144
144
  ], teams=[
@@ -182,7 +182,7 @@ with Fathom(
182
182
  res = fathom.list_meetings(calendar_invitees_domains=[
183
183
  "acme.com",
184
184
  "client.com",
185
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
185
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
186
186
  "ceo@acme.com",
187
187
  "pm@acme.com",
188
188
  ], teams=[
@@ -211,6 +211,7 @@ with Fathom(
211
211
  * [get_recording_transcript](docs/sdks/fathom/README.md#get_recording_transcript) - Get transcript
212
212
  * [list_teams](docs/sdks/fathom/README.md#list_teams) - List teams
213
213
  * [list_team_members](docs/sdks/fathom/README.md#list_team_members) - List team members
214
+ * [list_meeting_types](docs/sdks/fathom/README.md#list_meeting_types) - List meeting types
214
215
  * [create_webhook](docs/sdks/fathom/README.md#create_webhook) - Create a webhook
215
216
  * [delete_webhook](docs/sdks/fathom/README.md#delete_webhook) - Delete a webhook
216
217
 
@@ -239,7 +240,7 @@ with Fathom(
239
240
  res = fathom.list_meetings(calendar_invitees_domains=[
240
241
  "acme.com",
241
242
  "client.com",
242
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
243
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
243
244
  "ceo@acme.com",
244
245
  "pm@acme.com",
245
246
  ], teams=[
@@ -276,7 +277,7 @@ with Fathom(
276
277
  res = fathom.list_meetings(calendar_invitees_domains=[
277
278
  "acme.com",
278
279
  "client.com",
279
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
280
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
280
281
  "ceo@acme.com",
281
282
  "pm@acme.com",
282
283
  ], teams=[
@@ -309,7 +310,7 @@ with Fathom(
309
310
  res = fathom.list_meetings(calendar_invitees_domains=[
310
311
  "acme.com",
311
312
  "client.com",
312
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
313
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
313
314
  "ceo@acme.com",
314
315
  "pm@acme.com",
315
316
  ], teams=[
@@ -355,7 +356,7 @@ with Fathom(
355
356
  res = fathom.list_meetings(calendar_invitees_domains=[
356
357
  "acme.com",
357
358
  "client.com",
358
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
359
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
359
360
  "ceo@acme.com",
360
361
  "pm@acme.com",
361
362
  ], teams=[
@@ -420,7 +421,7 @@ with Fathom(
420
421
  res = fathom.list_meetings(calendar_invitees_domains=[
421
422
  "acme.com",
422
423
  "client.com",
423
- ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
424
+ ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type="Quarterly Business Review", recorded_by=[
424
425
  "ceo@acme.com",
425
426
  "pm@acme.com",
426
427
  ], teams=[
@@ -1,7 +1,7 @@
1
1
 
2
2
  [project]
3
3
  name = "fathom-python"
4
- version = "0.0.37"
4
+ version = "0.0.38"
5
5
  description = "Fathom's official Python SDK."
6
6
  authors = [{ name = "Speakeasy" },]
7
7
  readme = "README.md"
@@ -3,10 +3,10 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "fathom-python"
6
- __version__: str = "0.0.37"
6
+ __version__: str = "0.0.38"
7
7
  __openapi_doc_version__: str = "1.0.0"
8
8
  __gen_version__: str = "2.762.0"
9
- __user_agent__: str = "speakeasy-sdk/python 0.0.37 2.762.0 1.0.0 fathom-python"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.0.38 2.762.0 1.0.0 fathom-python"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
@@ -43,7 +43,12 @@ if TYPE_CHECKING:
43
43
  ListMeetingsRequestTypedDict,
44
44
  ListMeetingsResponse,
45
45
  ListMeetingsResponseTypedDict,
46
- MeetingType,
46
+ )
47
+ from .listmeetingtypesop import (
48
+ ListMeetingTypesRequest,
49
+ ListMeetingTypesRequestTypedDict,
50
+ ListMeetingTypesResponse,
51
+ ListMeetingTypesResponseTypedDict,
47
52
  )
48
53
  from .listteammembersop import (
49
54
  ListTeamMembersRequest,
@@ -60,6 +65,11 @@ if TYPE_CHECKING:
60
65
  from .meeting import CalendarInviteesDomainsType, Meeting, MeetingTypedDict
61
66
  from .meetinglistresponse import MeetingListResponse, MeetingListResponseTypedDict
62
67
  from .meetingsummary import MeetingSummary, MeetingSummaryTypedDict
68
+ from .meetingtype import MeetingType, MeetingTypeTypedDict, Status
69
+ from .meetingtypelistresponse import (
70
+ MeetingTypeListResponse,
71
+ MeetingTypeListResponseTypedDict,
72
+ )
63
73
  from .security import Security, SecurityTypedDict
64
74
  from .team import Team, TeamTypedDict
65
75
  from .teamlistresponse import TeamListResponse, TeamListResponseTypedDict
@@ -112,6 +122,10 @@ __all__ = [
112
122
  "GetRecordingTranscriptResponseTypedDict",
113
123
  "Invitee",
114
124
  "InviteeTypedDict",
125
+ "ListMeetingTypesRequest",
126
+ "ListMeetingTypesRequestTypedDict",
127
+ "ListMeetingTypesResponse",
128
+ "ListMeetingTypesResponseTypedDict",
115
129
  "ListMeetingsCalendarInviteesDomainsType",
116
130
  "ListMeetingsRequest",
117
131
  "ListMeetingsRequestTypedDict",
@@ -131,9 +145,13 @@ __all__ = [
131
145
  "MeetingSummary",
132
146
  "MeetingSummaryTypedDict",
133
147
  "MeetingType",
148
+ "MeetingTypeListResponse",
149
+ "MeetingTypeListResponseTypedDict",
150
+ "MeetingTypeTypedDict",
134
151
  "MeetingTypedDict",
135
152
  "Security",
136
153
  "SecurityTypedDict",
154
+ "Status",
137
155
  "Team",
138
156
  "TeamListResponse",
139
157
  "TeamListResponseTypedDict",
@@ -192,7 +210,10 @@ _dynamic_imports: dict[str, str] = {
192
210
  "ListMeetingsRequestTypedDict": ".listmeetingsop",
193
211
  "ListMeetingsResponse": ".listmeetingsop",
194
212
  "ListMeetingsResponseTypedDict": ".listmeetingsop",
195
- "MeetingType": ".listmeetingsop",
213
+ "ListMeetingTypesRequest": ".listmeetingtypesop",
214
+ "ListMeetingTypesRequestTypedDict": ".listmeetingtypesop",
215
+ "ListMeetingTypesResponse": ".listmeetingtypesop",
216
+ "ListMeetingTypesResponseTypedDict": ".listmeetingtypesop",
196
217
  "ListTeamMembersRequest": ".listteammembersop",
197
218
  "ListTeamMembersRequestTypedDict": ".listteammembersop",
198
219
  "ListTeamMembersResponse": ".listteammembersop",
@@ -208,6 +229,11 @@ _dynamic_imports: dict[str, str] = {
208
229
  "MeetingListResponseTypedDict": ".meetinglistresponse",
209
230
  "MeetingSummary": ".meetingsummary",
210
231
  "MeetingSummaryTypedDict": ".meetingsummary",
232
+ "MeetingType": ".meetingtype",
233
+ "MeetingTypeTypedDict": ".meetingtype",
234
+ "Status": ".meetingtype",
235
+ "MeetingTypeListResponse": ".meetingtypelistresponse",
236
+ "MeetingTypeListResponseTypedDict": ".meetingtypelistresponse",
211
237
  "Security": ".security",
212
238
  "SecurityTypedDict": ".security",
213
239
  "Team": ".team",
@@ -18,14 +18,6 @@ class ListMeetingsCalendarInviteesDomainsType(str, Enum):
18
18
  ONE_OR_MORE_EXTERNAL = "one_or_more_external"
19
19
 
20
20
 
21
- class MeetingType(str, Enum):
22
- r"""Filter by meeting type."""
23
-
24
- ALL = "all"
25
- INTERNAL = "internal"
26
- EXTERNAL = "external"
27
-
28
-
29
21
  class ListMeetingsRequestTypedDict(TypedDict):
30
22
  calendar_invitees_domains: NotRequired[List[str]]
31
23
  r"""Domains of the companies to filter by. Exact match.
@@ -52,8 +44,12 @@ class ListMeetingsRequestTypedDict(TypedDict):
52
44
  r"""Include the summary for each meeting. Unavailable for OAuth connected apps (use /recordings instead)."""
53
45
  include_transcript: NotRequired[bool]
54
46
  r"""Include the transcript for each meeting. Unavailable for OAuth connected apps (use /recordings instead)."""
55
- meeting_type: NotRequired[MeetingType]
56
- r"""Filter by meeting type."""
47
+ meeting_type: NotRequired[str]
48
+ r"""Filter by meeting type name.
49
+
50
+ Returns only meetings assigned the meeting type with this name. Use /meeting_types to discover valid values. An unknown or non-matching name returns an empty list.
51
+
52
+ """
57
53
  recorded_by: NotRequired[List[str]]
58
54
  r"""Email addresses of users who recorded meetings.
59
55
 
@@ -138,13 +134,14 @@ class ListMeetingsRequest(BaseModel):
138
134
  r"""Include the transcript for each meeting. Unavailable for OAuth connected apps (use /recordings instead)."""
139
135
 
140
136
  meeting_type: Annotated[
141
- Optional[MeetingType],
142
- pydantic.Field(
143
- deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
144
- ),
137
+ Optional[str],
145
138
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
146
139
  ] = None
147
- r"""Filter by meeting type."""
140
+ r"""Filter by meeting type name.
141
+
142
+ Returns only meetings assigned the meeting type with this name. Use /meeting_types to discover valid values. An unknown or non-matching name returns an empty list.
143
+
144
+ """
148
145
 
149
146
  recorded_by: Annotated[
150
147
  Optional[List[str]],
@@ -0,0 +1,34 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .meetingtypelistresponse import (
5
+ MeetingTypeListResponse,
6
+ MeetingTypeListResponseTypedDict,
7
+ )
8
+ from fathom_python.types import BaseModel
9
+ from fathom_python.utils import FieldMetadata, QueryParamMetadata
10
+ from typing import Callable, Optional
11
+ from typing_extensions import Annotated, NotRequired, TypedDict
12
+
13
+
14
+ class ListMeetingTypesRequestTypedDict(TypedDict):
15
+ cursor: NotRequired[str]
16
+ r"""Cursor for pagination."""
17
+
18
+
19
+ class ListMeetingTypesRequest(BaseModel):
20
+ cursor: Annotated[
21
+ Optional[str],
22
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
23
+ ] = None
24
+ r"""Cursor for pagination."""
25
+
26
+
27
+ class ListMeetingTypesResponseTypedDict(TypedDict):
28
+ result: MeetingTypeListResponseTypedDict
29
+
30
+
31
+ class ListMeetingTypesResponse(BaseModel):
32
+ next: Callable[[], Optional[ListMeetingTypesResponse]]
33
+
34
+ result: MeetingTypeListResponse
@@ -30,6 +30,8 @@ class MeetingTypedDict(TypedDict):
30
30
  title: str
31
31
  meeting_title: Nullable[str]
32
32
  r"""Calendar event title."""
33
+ meeting_type: Nullable[str]
34
+ r"""The name of the meeting type assigned to this meeting, or `null` if none is assigned."""
33
35
  recording_id: int
34
36
  r"""The ID of the meeting recording."""
35
37
  url: str
@@ -59,6 +61,9 @@ class Meeting(BaseModel):
59
61
  meeting_title: Nullable[str]
60
62
  r"""Calendar event title."""
61
63
 
64
+ meeting_type: Nullable[str]
65
+ r"""The name of the meeting type assigned to this meeting, or `null` if none is assigned."""
66
+
62
67
  recording_id: int
63
68
  r"""The ID of the meeting recording."""
64
69
 
@@ -106,6 +111,7 @@ class Meeting(BaseModel):
106
111
  ]
107
112
  nullable_fields = [
108
113
  "meeting_title",
114
+ "meeting_type",
109
115
  "transcript",
110
116
  "default_summary",
111
117
  "action_items",
@@ -0,0 +1,34 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from datetime import datetime
5
+ from enum import Enum
6
+ from fathom_python.types import BaseModel
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class Status(str, Enum):
11
+ r"""Whether the meeting type is currently assignable. `active` types can be assigned to meetings going forward; `inactive` types are no longer assigned going forward but may still appear on historical meetings."""
12
+
13
+ ACTIVE = "active"
14
+ INACTIVE = "inactive"
15
+
16
+
17
+ class MeetingTypeTypedDict(TypedDict):
18
+ name: str
19
+ status: Status
20
+ r"""Whether the meeting type is currently assignable. `active` types can be assigned to meetings going forward; `inactive` types are no longer assigned going forward but may still appear on historical meetings.
21
+
22
+ """
23
+ created_at: datetime
24
+
25
+
26
+ class MeetingType(BaseModel):
27
+ name: str
28
+
29
+ status: Status
30
+ r"""Whether the meeting type is currently assignable. `active` types can be assigned to meetings going forward; `inactive` types are no longer assigned going forward but may still appear on historical meetings.
31
+
32
+ """
33
+
34
+ created_at: datetime
@@ -0,0 +1,52 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .meetingtype import MeetingType, MeetingTypeTypedDict
5
+ from fathom_python.types import BaseModel, Nullable, UNSET_SENTINEL
6
+ from pydantic import model_serializer
7
+ from typing import List
8
+ from typing_extensions import TypedDict
9
+
10
+
11
+ class MeetingTypeListResponseTypedDict(TypedDict):
12
+ limit: Nullable[int]
13
+ next_cursor: Nullable[str]
14
+ items: List[MeetingTypeTypedDict]
15
+
16
+
17
+ class MeetingTypeListResponse(BaseModel):
18
+ limit: Nullable[int]
19
+
20
+ next_cursor: Nullable[str]
21
+
22
+ items: List[MeetingType]
23
+
24
+ @model_serializer(mode="wrap")
25
+ def serialize_model(self, handler):
26
+ optional_fields = []
27
+ nullable_fields = ["limit", "next_cursor"]
28
+ null_default_fields = []
29
+
30
+ serialized = handler(self)
31
+
32
+ m = {}
33
+
34
+ for n, f in type(self).model_fields.items():
35
+ k = f.alias or n
36
+ val = serialized.get(k)
37
+ serialized.pop(k, None)
38
+
39
+ optional_nullable = k in optional_fields and k in nullable_fields
40
+ is_set = (
41
+ self.__pydantic_fields_set__.intersection({n})
42
+ or k in null_default_fields
43
+ ) # pylint: disable=no-member
44
+
45
+ if val is not None and val != UNSET_SENTINEL:
46
+ m[k] = val
47
+ elif val != UNSET_SENTINEL and (
48
+ not k in optional_fields or (optional_nullable and is_set)
49
+ ):
50
+ m[k] = val
51
+
52
+ return m
@@ -277,7 +277,7 @@ class Fathom(BaseSDK):
277
277
  include_crm_matches: Optional[bool] = False,
278
278
  include_summary: Optional[bool] = False,
279
279
  include_transcript: Optional[bool] = False,
280
- meeting_type: Optional[models.MeetingType] = None,
280
+ meeting_type: Optional[str] = None,
281
281
  recorded_by: Optional[List[str]] = None,
282
282
  teams: Optional[List[str]] = None,
283
283
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
@@ -302,7 +302,10 @@ class Fathom(BaseSDK):
302
302
  :param include_crm_matches: Include CRM matches for each meeting. Only returns data from your or your team's linked CRM.
303
303
  :param include_summary: Include the summary for each meeting. Unavailable for OAuth connected apps (use /recordings instead).
304
304
  :param include_transcript: Include the transcript for each meeting. Unavailable for OAuth connected apps (use /recordings instead).
305
- :param meeting_type: Filter by meeting type.
305
+ :param meeting_type: Filter by meeting type name.
306
+
307
+ Returns only meetings assigned the meeting type with this name. Use /meeting_types to discover valid values. An unknown or non-matching name returns an empty list.
308
+
306
309
  :param recorded_by: Email addresses of users who recorded meetings.
307
310
 
308
311
  Pass the parameter once per value, e.g.
@@ -441,7 +444,7 @@ class Fathom(BaseSDK):
441
444
  include_crm_matches: Optional[bool] = False,
442
445
  include_summary: Optional[bool] = False,
443
446
  include_transcript: Optional[bool] = False,
444
- meeting_type: Optional[models.MeetingType] = None,
447
+ meeting_type: Optional[str] = None,
445
448
  recorded_by: Optional[List[str]] = None,
446
449
  teams: Optional[List[str]] = None,
447
450
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
@@ -466,7 +469,10 @@ class Fathom(BaseSDK):
466
469
  :param include_crm_matches: Include CRM matches for each meeting. Only returns data from your or your team's linked CRM.
467
470
  :param include_summary: Include the summary for each meeting. Unavailable for OAuth connected apps (use /recordings instead).
468
471
  :param include_transcript: Include the transcript for each meeting. Unavailable for OAuth connected apps (use /recordings instead).
469
- :param meeting_type: Filter by meeting type.
472
+ :param meeting_type: Filter by meeting type name.
473
+
474
+ Returns only meetings assigned the meeting type with this name. Use /meeting_types to discover valid values. An unknown or non-matching name returns an empty list.
475
+
470
476
  :param recorded_by: Email addresses of users who recorded meetings.
471
477
 
472
478
  Pass the parameter once per value, e.g.
@@ -1359,6 +1365,216 @@ class Fathom(BaseSDK):
1359
1365
 
1360
1366
  raise errors.APIError("Unexpected response received", http_res)
1361
1367
 
1368
+ def list_meeting_types(
1369
+ self,
1370
+ *,
1371
+ cursor: Optional[str] = None,
1372
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1373
+ server_url: Optional[str] = None,
1374
+ timeout_ms: Optional[int] = None,
1375
+ http_headers: Optional[Mapping[str, str]] = None,
1376
+ ) -> Optional[models.ListMeetingTypesResponse]:
1377
+ r"""List meeting types
1378
+
1379
+ List your team's published meeting types (both `active` and `inactive`). Draft meeting types, which are not yet fully created and never appear on meetings, are excluded. Use the returned `name` values to filter /meetings via its meeting_type parameter.
1380
+
1381
+
1382
+ :param cursor: Cursor for pagination.
1383
+ :param retries: Override the default retry configuration for this method
1384
+ :param server_url: Override the default server URL for this method
1385
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1386
+ :param http_headers: Additional headers to set or replace on requests.
1387
+ """
1388
+ base_url = None
1389
+ url_variables = None
1390
+ if timeout_ms is None:
1391
+ timeout_ms = self.sdk_configuration.timeout_ms
1392
+
1393
+ if server_url is not None:
1394
+ base_url = server_url
1395
+ else:
1396
+ base_url = self._get_url(base_url, url_variables)
1397
+
1398
+ request = models.ListMeetingTypesRequest(
1399
+ cursor=cursor,
1400
+ )
1401
+
1402
+ req = self._build_request(
1403
+ method="GET",
1404
+ path="/meeting_types",
1405
+ base_url=base_url,
1406
+ url_variables=url_variables,
1407
+ request=request,
1408
+ request_body_required=False,
1409
+ request_has_path_params=False,
1410
+ request_has_query_params=True,
1411
+ user_agent_header="user-agent",
1412
+ accept_header_value="application/json",
1413
+ http_headers=http_headers,
1414
+ security=self.sdk_configuration.security,
1415
+ timeout_ms=timeout_ms,
1416
+ )
1417
+
1418
+ if retries == UNSET:
1419
+ if self.sdk_configuration.retry_config is not UNSET:
1420
+ retries = self.sdk_configuration.retry_config
1421
+
1422
+ retry_config = None
1423
+ if isinstance(retries, utils.RetryConfig):
1424
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1425
+
1426
+ http_res = self.do_request(
1427
+ hook_ctx=HookContext(
1428
+ config=self.sdk_configuration,
1429
+ base_url=base_url or "",
1430
+ operation_id="listMeetingTypes",
1431
+ oauth2_scopes=None,
1432
+ security_source=get_security_from_env(
1433
+ self.sdk_configuration.security, models.Security
1434
+ ),
1435
+ ),
1436
+ request=req,
1437
+ error_status_codes=["400", "401", "429", "4XX", "5XX"],
1438
+ retry_config=retry_config,
1439
+ )
1440
+
1441
+ def next_func() -> Optional[models.ListMeetingTypesResponse]:
1442
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
1443
+ next_cursor = JSONPath("$.next_cursor").parse(body)
1444
+
1445
+ if len(next_cursor) == 0:
1446
+ return None
1447
+
1448
+ next_cursor = next_cursor[0]
1449
+ if next_cursor is None or str(next_cursor).strip() == "":
1450
+ return None
1451
+
1452
+ return self.list_meeting_types(
1453
+ cursor=next_cursor,
1454
+ retries=retries,
1455
+ )
1456
+
1457
+ if utils.match_response(http_res, "200", "application/json"):
1458
+ return models.ListMeetingTypesResponse(
1459
+ result=unmarshal_json_response(
1460
+ models.MeetingTypeListResponse, http_res
1461
+ ),
1462
+ next=next_func,
1463
+ )
1464
+ if utils.match_response(http_res, ["400", "401", "429", "4XX"], "*"):
1465
+ http_res_text = utils.stream_to_text(http_res)
1466
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1467
+ if utils.match_response(http_res, "5XX", "*"):
1468
+ http_res_text = utils.stream_to_text(http_res)
1469
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1470
+
1471
+ raise errors.APIError("Unexpected response received", http_res)
1472
+
1473
+ async def list_meeting_types_async(
1474
+ self,
1475
+ *,
1476
+ cursor: Optional[str] = None,
1477
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1478
+ server_url: Optional[str] = None,
1479
+ timeout_ms: Optional[int] = None,
1480
+ http_headers: Optional[Mapping[str, str]] = None,
1481
+ ) -> Optional[models.ListMeetingTypesResponse]:
1482
+ r"""List meeting types
1483
+
1484
+ List your team's published meeting types (both `active` and `inactive`). Draft meeting types, which are not yet fully created and never appear on meetings, are excluded. Use the returned `name` values to filter /meetings via its meeting_type parameter.
1485
+
1486
+
1487
+ :param cursor: Cursor for pagination.
1488
+ :param retries: Override the default retry configuration for this method
1489
+ :param server_url: Override the default server URL for this method
1490
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1491
+ :param http_headers: Additional headers to set or replace on requests.
1492
+ """
1493
+ base_url = None
1494
+ url_variables = None
1495
+ if timeout_ms is None:
1496
+ timeout_ms = self.sdk_configuration.timeout_ms
1497
+
1498
+ if server_url is not None:
1499
+ base_url = server_url
1500
+ else:
1501
+ base_url = self._get_url(base_url, url_variables)
1502
+
1503
+ request = models.ListMeetingTypesRequest(
1504
+ cursor=cursor,
1505
+ )
1506
+
1507
+ req = self._build_request_async(
1508
+ method="GET",
1509
+ path="/meeting_types",
1510
+ base_url=base_url,
1511
+ url_variables=url_variables,
1512
+ request=request,
1513
+ request_body_required=False,
1514
+ request_has_path_params=False,
1515
+ request_has_query_params=True,
1516
+ user_agent_header="user-agent",
1517
+ accept_header_value="application/json",
1518
+ http_headers=http_headers,
1519
+ security=self.sdk_configuration.security,
1520
+ timeout_ms=timeout_ms,
1521
+ )
1522
+
1523
+ if retries == UNSET:
1524
+ if self.sdk_configuration.retry_config is not UNSET:
1525
+ retries = self.sdk_configuration.retry_config
1526
+
1527
+ retry_config = None
1528
+ if isinstance(retries, utils.RetryConfig):
1529
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1530
+
1531
+ http_res = await self.do_request_async(
1532
+ hook_ctx=HookContext(
1533
+ config=self.sdk_configuration,
1534
+ base_url=base_url or "",
1535
+ operation_id="listMeetingTypes",
1536
+ oauth2_scopes=None,
1537
+ security_source=get_security_from_env(
1538
+ self.sdk_configuration.security, models.Security
1539
+ ),
1540
+ ),
1541
+ request=req,
1542
+ error_status_codes=["400", "401", "429", "4XX", "5XX"],
1543
+ retry_config=retry_config,
1544
+ )
1545
+
1546
+ def next_func() -> Optional[models.ListMeetingTypesResponse]:
1547
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
1548
+ next_cursor = JSONPath("$.next_cursor").parse(body)
1549
+
1550
+ if len(next_cursor) == 0:
1551
+ return None
1552
+
1553
+ next_cursor = next_cursor[0]
1554
+ if next_cursor is None or str(next_cursor).strip() == "":
1555
+ return None
1556
+
1557
+ return self.list_meeting_types(
1558
+ cursor=next_cursor,
1559
+ retries=retries,
1560
+ )
1561
+
1562
+ if utils.match_response(http_res, "200", "application/json"):
1563
+ return models.ListMeetingTypesResponse(
1564
+ result=unmarshal_json_response(
1565
+ models.MeetingTypeListResponse, http_res
1566
+ ),
1567
+ next=next_func,
1568
+ )
1569
+ if utils.match_response(http_res, ["400", "401", "429", "4XX"], "*"):
1570
+ http_res_text = await utils.stream_to_text_async(http_res)
1571
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1572
+ if utils.match_response(http_res, "5XX", "*"):
1573
+ http_res_text = await utils.stream_to_text_async(http_res)
1574
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1575
+
1576
+ raise errors.APIError("Unexpected response received", http_res)
1577
+
1362
1578
  def create_webhook(
1363
1579
  self,
1364
1580
  *,
@@ -0,0 +1,39 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import base64
6
+ import io
7
+ from os import PathLike
8
+ from typing import IO, Any, Union
9
+
10
+ from pydantic.functional_validators import BeforeValidator
11
+ from typing_extensions import Annotated
12
+
13
+
14
+ Base64FileInput = Union[IO[bytes], PathLike[str]]
15
+
16
+
17
+ def encode_base64_file_input(value: Any) -> Any:
18
+ """Convert PathLike or IO[bytes] inputs to a base64 string. All standard binary streams
19
+ that inherit from io.IOBase are handled. Other values pass through.
20
+ """
21
+ if isinstance(value, (PathLike, io.IOBase)):
22
+ if isinstance(value, PathLike):
23
+ with open(value, "rb") as fh:
24
+ binary = fh.read()
25
+ else:
26
+ binary = value.read()
27
+ if isinstance(binary, str):
28
+ binary = binary.encode()
29
+ if not isinstance(binary, (bytes, bytearray)):
30
+ raise TypeError(
31
+ f"Base64FileInput expected binary IO returning bytes; got {type(binary).__name__}"
32
+ )
33
+ return base64.b64encode(binary).decode("ascii")
34
+ return value
35
+
36
+
37
+ # Non-str inputs are converted to base64 by the BeforeValidator at construction time.
38
+ # Callers can also pass a pre-encoded base64 str.
39
+ Base64EncodedString = Annotated[str, BeforeValidator(encode_base64_file_input)]
@@ -0,0 +1,54 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from importlib import import_module
4
+ import builtins
5
+ import sys
6
+
7
+
8
+ def dynamic_import(package, modname, retries=3):
9
+ """Import a module relative to package, retrying on KeyError from half-initialized modules."""
10
+ for attempt in range(retries):
11
+ try:
12
+ return import_module(modname, package)
13
+ except KeyError:
14
+ sys.modules.pop(modname, None)
15
+ if attempt == retries - 1:
16
+ break
17
+ raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")
18
+
19
+
20
+ def lazy_getattr(attr_name, *, package, dynamic_imports, sub_packages=None):
21
+ """Module-level __getattr__ that lazily loads from a dynamic_imports mapping.
22
+
23
+ Args:
24
+ attr_name: The attribute being looked up.
25
+ package: The caller's __package__ (for relative imports).
26
+ dynamic_imports: Dict mapping attribute names to relative module paths.
27
+ sub_packages: Optional list of subpackage names to lazy-load.
28
+ """
29
+ module_name = dynamic_imports.get(attr_name)
30
+ if module_name is not None:
31
+ try:
32
+ module = dynamic_import(package, module_name)
33
+ return getattr(module, attr_name)
34
+ except ImportError as e:
35
+ raise ImportError(
36
+ f"Failed to import {attr_name} from {module_name}: {e}"
37
+ ) from e
38
+ except AttributeError as e:
39
+ raise AttributeError(
40
+ f"Failed to get {attr_name} from {module_name}: {e}"
41
+ ) from e
42
+
43
+ if sub_packages and attr_name in sub_packages:
44
+ return import_module(f".{attr_name}", package)
45
+
46
+ raise AttributeError(f"module '{package}' has no attribute '{attr_name}'")
47
+
48
+
49
+ def lazy_dir(*, dynamic_imports, sub_packages=None):
50
+ """Module-level __dir__ that lists lazily-loadable attributes."""
51
+ lazy_attrs = builtins.list(dynamic_imports.keys())
52
+ if sub_packages:
53
+ lazy_attrs.extend(sub_packages)
54
+ return builtins.sorted(lazy_attrs)
File without changes