universal-mcp-applications 0.1.22__py3-none-any.whl → 0.1.39rc8__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.

Potentially problematic release.


This version of universal-mcp-applications might be problematic. Click here for more details.

Files changed (120) hide show
  1. universal_mcp/applications/ahrefs/app.py +92 -238
  2. universal_mcp/applications/airtable/app.py +23 -122
  3. universal_mcp/applications/apollo/app.py +122 -475
  4. universal_mcp/applications/asana/app.py +605 -1755
  5. universal_mcp/applications/aws_s3/app.py +36 -103
  6. universal_mcp/applications/bill/app.py +644 -2055
  7. universal_mcp/applications/box/app.py +1246 -4159
  8. universal_mcp/applications/braze/app.py +410 -1476
  9. universal_mcp/applications/browser_use/README.md +15 -1
  10. universal_mcp/applications/browser_use/__init__.py +1 -0
  11. universal_mcp/applications/browser_use/app.py +94 -37
  12. universal_mcp/applications/cal_com_v2/app.py +207 -625
  13. universal_mcp/applications/calendly/app.py +103 -242
  14. universal_mcp/applications/canva/app.py +75 -140
  15. universal_mcp/applications/clickup/app.py +331 -798
  16. universal_mcp/applications/coda/app.py +240 -520
  17. universal_mcp/applications/confluence/app.py +497 -1285
  18. universal_mcp/applications/contentful/app.py +36 -151
  19. universal_mcp/applications/crustdata/app.py +42 -121
  20. universal_mcp/applications/dialpad/app.py +451 -924
  21. universal_mcp/applications/digitalocean/app.py +2071 -6082
  22. universal_mcp/applications/domain_checker/app.py +3 -54
  23. universal_mcp/applications/e2b/app.py +14 -64
  24. universal_mcp/applications/elevenlabs/app.py +9 -47
  25. universal_mcp/applications/exa/README.md +8 -4
  26. universal_mcp/applications/exa/app.py +408 -186
  27. universal_mcp/applications/falai/app.py +24 -101
  28. universal_mcp/applications/figma/app.py +91 -175
  29. universal_mcp/applications/file_system/app.py +2 -13
  30. universal_mcp/applications/firecrawl/app.py +186 -163
  31. universal_mcp/applications/fireflies/app.py +59 -281
  32. universal_mcp/applications/fpl/app.py +92 -529
  33. universal_mcp/applications/fpl/utils/fixtures.py +15 -49
  34. universal_mcp/applications/fpl/utils/helper.py +25 -89
  35. universal_mcp/applications/fpl/utils/league_utils.py +20 -64
  36. universal_mcp/applications/ghost_content/app.py +66 -175
  37. universal_mcp/applications/github/app.py +28 -65
  38. universal_mcp/applications/gong/app.py +140 -300
  39. universal_mcp/applications/google_calendar/app.py +26 -78
  40. universal_mcp/applications/google_docs/app.py +324 -354
  41. universal_mcp/applications/google_drive/app.py +194 -793
  42. universal_mcp/applications/google_gemini/app.py +29 -64
  43. universal_mcp/applications/google_mail/README.md +1 -0
  44. universal_mcp/applications/google_mail/app.py +93 -214
  45. universal_mcp/applications/google_searchconsole/app.py +25 -58
  46. universal_mcp/applications/google_sheet/app.py +174 -623
  47. universal_mcp/applications/google_sheet/helper.py +26 -53
  48. universal_mcp/applications/hashnode/app.py +57 -269
  49. universal_mcp/applications/heygen/app.py +77 -155
  50. universal_mcp/applications/http_tools/app.py +10 -32
  51. universal_mcp/applications/hubspot/README.md +1 -1
  52. universal_mcp/applications/hubspot/app.py +7508 -99
  53. universal_mcp/applications/jira/app.py +2419 -8334
  54. universal_mcp/applications/klaviyo/app.py +737 -1619
  55. universal_mcp/applications/linkedin/README.md +23 -4
  56. universal_mcp/applications/linkedin/app.py +861 -155
  57. universal_mcp/applications/mailchimp/app.py +696 -1851
  58. universal_mcp/applications/markitdown/app.py +8 -20
  59. universal_mcp/applications/miro/app.py +333 -815
  60. universal_mcp/applications/ms_teams/app.py +85 -207
  61. universal_mcp/applications/neon/app.py +144 -250
  62. universal_mcp/applications/notion/app.py +36 -51
  63. universal_mcp/applications/onedrive/README.md +24 -0
  64. universal_mcp/applications/onedrive/__init__.py +1 -0
  65. universal_mcp/applications/onedrive/app.py +316 -0
  66. universal_mcp/applications/openai/app.py +42 -165
  67. universal_mcp/applications/outlook/README.md +22 -9
  68. universal_mcp/applications/outlook/app.py +606 -262
  69. universal_mcp/applications/perplexity/README.md +2 -1
  70. universal_mcp/applications/perplexity/app.py +162 -20
  71. universal_mcp/applications/pipedrive/app.py +1021 -3331
  72. universal_mcp/applications/posthog/app.py +272 -541
  73. universal_mcp/applications/reddit/app.py +88 -204
  74. universal_mcp/applications/resend/app.py +41 -107
  75. universal_mcp/applications/retell/app.py +23 -50
  76. universal_mcp/applications/rocketlane/app.py +250 -963
  77. universal_mcp/applications/scraper/README.md +7 -4
  78. universal_mcp/applications/scraper/app.py +245 -283
  79. universal_mcp/applications/semanticscholar/app.py +36 -78
  80. universal_mcp/applications/semrush/app.py +43 -77
  81. universal_mcp/applications/sendgrid/app.py +826 -1576
  82. universal_mcp/applications/sentry/app.py +444 -1079
  83. universal_mcp/applications/serpapi/app.py +40 -143
  84. universal_mcp/applications/sharepoint/README.md +16 -14
  85. universal_mcp/applications/sharepoint/app.py +245 -154
  86. universal_mcp/applications/shopify/app.py +1743 -4479
  87. universal_mcp/applications/shortcut/app.py +272 -534
  88. universal_mcp/applications/slack/app.py +58 -109
  89. universal_mcp/applications/spotify/app.py +206 -405
  90. universal_mcp/applications/supabase/app.py +174 -283
  91. universal_mcp/applications/tavily/app.py +2 -2
  92. universal_mcp/applications/trello/app.py +853 -2816
  93. universal_mcp/applications/twilio/app.py +14 -50
  94. universal_mcp/applications/twitter/api_segments/compliance_api.py +4 -14
  95. universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +6 -18
  96. universal_mcp/applications/twitter/api_segments/likes_api.py +1 -3
  97. universal_mcp/applications/twitter/api_segments/lists_api.py +5 -15
  98. universal_mcp/applications/twitter/api_segments/trends_api.py +1 -3
  99. universal_mcp/applications/twitter/api_segments/tweets_api.py +9 -31
  100. universal_mcp/applications/twitter/api_segments/usage_api.py +1 -5
  101. universal_mcp/applications/twitter/api_segments/users_api.py +14 -42
  102. universal_mcp/applications/whatsapp/app.py +35 -186
  103. universal_mcp/applications/whatsapp/audio.py +2 -6
  104. universal_mcp/applications/whatsapp/whatsapp.py +17 -51
  105. universal_mcp/applications/whatsapp_business/app.py +86 -299
  106. universal_mcp/applications/wrike/app.py +80 -153
  107. universal_mcp/applications/yahoo_finance/app.py +19 -65
  108. universal_mcp/applications/youtube/app.py +120 -306
  109. universal_mcp/applications/zenquotes/app.py +4 -4
  110. {universal_mcp_applications-0.1.22.dist-info → universal_mcp_applications-0.1.39rc8.dist-info}/METADATA +4 -2
  111. {universal_mcp_applications-0.1.22.dist-info → universal_mcp_applications-0.1.39rc8.dist-info}/RECORD +113 -117
  112. {universal_mcp_applications-0.1.22.dist-info → universal_mcp_applications-0.1.39rc8.dist-info}/WHEEL +1 -1
  113. universal_mcp/applications/hubspot/api_segments/__init__.py +0 -0
  114. universal_mcp/applications/hubspot/api_segments/api_segment_base.py +0 -54
  115. universal_mcp/applications/hubspot/api_segments/crm_api.py +0 -7337
  116. universal_mcp/applications/hubspot/api_segments/marketing_api.py +0 -1467
  117. universal_mcp/applications/unipile/README.md +0 -28
  118. universal_mcp/applications/unipile/__init__.py +0 -1
  119. universal_mcp/applications/unipile/app.py +0 -1077
  120. {universal_mcp_applications-0.1.22.dist-info → universal_mcp_applications-0.1.39rc8.dist-info}/licenses/LICENSE +0 -0
@@ -1,5 +1,4 @@
1
1
  from typing import Any
2
-
3
2
  from universal_mcp.applications.application import APIApplication
4
3
  from universal_mcp.integrations import Integration
5
4
 
@@ -9,7 +8,7 @@ class PosthogApp(APIApplication):
9
8
  super().__init__(name="posthog", integration=integration, **kwargs)
10
9
  self.base_url = "https://us.posthog.com"
11
10
 
12
- def is_generating_demo_data_retrieve(self, organization_id, id) -> dict[str, Any]:
11
+ async def is_generating_demo_data_retrieve(self, organization_id, id) -> dict[str, Any]:
13
12
  """
14
13
  Checks if demo data is being generated for a specific project within an organization.
15
14
 
@@ -29,11 +28,11 @@ class PosthogApp(APIApplication):
29
28
  raise ValueError("Missing required parameter 'id'")
30
29
  url = f"{self.base_url}/api/organizations/{organization_id}/projects/{id}/is_generating_demo_data/"
31
30
  query_params = {}
32
- response = self._get(url, params=query_params)
31
+ response = await self._aget(url, params=query_params)
33
32
  response.raise_for_status()
34
33
  return response.json()
35
34
 
36
- def reset_token_partial_update(
35
+ async def reset_token_partial_update(
37
36
  self,
38
37
  organization_id,
39
38
  id,
@@ -824,9 +823,7 @@ class PosthogApp(APIApplication):
824
823
  response.raise_for_status()
825
824
  return response.json()
826
825
 
827
- def proxy_records_list(
828
- self, organization_id, limit=None, offset=None
829
- ) -> dict[str, Any]:
826
+ async def proxy_records_list(self, organization_id, limit=None, offset=None) -> dict[str, Any]:
830
827
  """
831
828
  Retrieves a paginated list of proxy records for a specified organization using query parameters for limit and offset.
832
829
 
@@ -844,24 +841,13 @@ class PosthogApp(APIApplication):
844
841
  if organization_id is None:
845
842
  raise ValueError("Missing required parameter 'organization_id'")
846
843
  url = f"{self.base_url}/api/organizations/{organization_id}/proxy_records/"
847
- query_params = {
848
- k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
849
- }
850
- response = self._get(url, params=query_params)
844
+ query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
845
+ response = await self._aget(url, params=query_params)
851
846
  response.raise_for_status()
852
847
  return response.json()
853
848
 
854
- def proxy_records_create(
855
- self,
856
- organization_id,
857
- id,
858
- domain,
859
- target_cname,
860
- status,
861
- message,
862
- created_at,
863
- updated_at,
864
- created_by,
849
+ async def proxy_records_create(
850
+ self, organization_id, id, domain, target_cname, status, message, created_at, updated_at, created_by
865
851
  ) -> dict[str, Any]:
866
852
  """
867
853
  Creates a proxy record for the specified organization using the provided organization ID.
@@ -898,11 +884,11 @@ class PosthogApp(APIApplication):
898
884
  request_body = {k: v for k, v in request_body.items() if v is not None}
899
885
  url = f"{self.base_url}/api/organizations/{organization_id}/proxy_records/"
900
886
  query_params = {}
901
- response = self._post(url, data=request_body, params=query_params)
887
+ response = await self._apost(url, data=request_body, params=query_params)
902
888
  response.raise_for_status()
903
889
  return response.json()
904
890
 
905
- def proxy_records_retrieve(self, organization_id, id) -> dict[str, Any]:
891
+ async def proxy_records_retrieve(self, organization_id, id) -> dict[str, Any]:
906
892
  """
907
893
  Retrieves a specific proxy record by its ID for a given organization using the PostHog API.
908
894
 
@@ -922,22 +908,12 @@ class PosthogApp(APIApplication):
922
908
  raise ValueError("Missing required parameter 'id'")
923
909
  url = f"{self.base_url}/api/organizations/{organization_id}/proxy_records/{id}/"
924
910
  query_params = {}
925
- response = self._get(url, params=query_params)
911
+ response = await self._aget(url, params=query_params)
926
912
  response.raise_for_status()
927
913
  return response.json()
928
914
 
929
- def proxy_records_update(
930
- self,
931
- organization_id,
932
- id,
933
- id_body,
934
- domain,
935
- target_cname,
936
- status,
937
- message,
938
- created_at,
939
- updated_at,
940
- created_by,
915
+ async def proxy_records_update(
916
+ self, organization_id, id, id_body, domain, target_cname, status, message, created_at, updated_at, created_by
941
917
  ) -> dict[str, Any]:
942
918
  """
943
919
  Updates a specific proxy record within an organization using the provided identifier and returns a status upon success.
@@ -977,11 +953,11 @@ class PosthogApp(APIApplication):
977
953
  request_body = {k: v for k, v in request_body.items() if v is not None}
978
954
  url = f"{self.base_url}/api/organizations/{organization_id}/proxy_records/{id}/"
979
955
  query_params = {}
980
- response = self._put(url, data=request_body, params=query_params)
956
+ response = await self._aput(url, data=request_body, params=query_params)
981
957
  response.raise_for_status()
982
958
  return response.json()
983
959
 
984
- def proxy_records_partial_update(
960
+ async def proxy_records_partial_update(
985
961
  self,
986
962
  organization_id,
987
963
  id,
@@ -1036,7 +1012,7 @@ class PosthogApp(APIApplication):
1036
1012
  response.raise_for_status()
1037
1013
  return response.json()
1038
1014
 
1039
- def proxy_records_destroy(self, organization_id, id) -> Any:
1015
+ async def proxy_records_destroy(self, organization_id, id) -> Any:
1040
1016
  """
1041
1017
  Deletes a specific proxy record identified by `{id}` within an organization specified by `{organization_id}` using the `DELETE` method.
1042
1018
 
@@ -1056,11 +1032,11 @@ class PosthogApp(APIApplication):
1056
1032
  raise ValueError("Missing required parameter 'id'")
1057
1033
  url = f"{self.base_url}/api/organizations/{organization_id}/proxy_records/{id}/"
1058
1034
  query_params = {}
1059
- response = self._delete(url, params=query_params)
1035
+ response = await self._adelete(url, params=query_params)
1060
1036
  response.raise_for_status()
1061
1037
  return response.json()
1062
1038
 
1063
- def roles_list(self, organization_id, limit=None, offset=None) -> dict[str, Any]:
1039
+ async def roles_list(self, organization_id, limit=None, offset=None) -> dict[str, Any]:
1064
1040
  """
1065
1041
  Retrieves a list of roles for a specified organization using the provided organization ID, with optional parameters to limit and offset the results.
1066
1042
 
@@ -1078,22 +1054,13 @@ class PosthogApp(APIApplication):
1078
1054
  if organization_id is None:
1079
1055
  raise ValueError("Missing required parameter 'organization_id'")
1080
1056
  url = f"{self.base_url}/api/organizations/{organization_id}/roles/"
1081
- query_params = {
1082
- k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
1083
- }
1084
- response = self._get(url, params=query_params)
1057
+ query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
1058
+ response = await self._aget(url, params=query_params)
1085
1059
  response.raise_for_status()
1086
1060
  return response.json()
1087
1061
 
1088
- def roles_create(
1089
- self,
1090
- organization_id,
1091
- id,
1092
- name,
1093
- created_at,
1094
- created_by,
1095
- members,
1096
- feature_flags_access_level=None,
1062
+ async def roles_create(
1063
+ self, organization_id, id, name, created_at, created_by, members, feature_flags_access_level=None
1097
1064
  ) -> dict[str, Any]:
1098
1065
  """
1099
1066
  Creates a new role within the specified organization and returns the created resource upon success.
@@ -1126,11 +1093,11 @@ class PosthogApp(APIApplication):
1126
1093
  request_body = {k: v for k, v in request_body.items() if v is not None}
1127
1094
  url = f"{self.base_url}/api/organizations/{organization_id}/roles/"
1128
1095
  query_params = {}
1129
- response = self._post(url, data=request_body, params=query_params)
1096
+ response = await self._apost(url, data=request_body, params=query_params)
1130
1097
  response.raise_for_status()
1131
1098
  return response.json()
1132
1099
 
1133
- def roles_retrieve(self, organization_id, id) -> dict[str, Any]:
1100
+ async def roles_retrieve(self, organization_id, id) -> dict[str, Any]:
1134
1101
  """
1135
1102
  Retrieves a specific role within an organization based on the role and organization identifiers.
1136
1103
 
@@ -1150,20 +1117,12 @@ class PosthogApp(APIApplication):
1150
1117
  raise ValueError("Missing required parameter 'id'")
1151
1118
  url = f"{self.base_url}/api/organizations/{organization_id}/roles/{id}/"
1152
1119
  query_params = {}
1153
- response = self._get(url, params=query_params)
1120
+ response = await self._aget(url, params=query_params)
1154
1121
  response.raise_for_status()
1155
1122
  return response.json()
1156
1123
 
1157
- def roles_update(
1158
- self,
1159
- organization_id,
1160
- id,
1161
- id_body,
1162
- name,
1163
- created_at,
1164
- created_by,
1165
- members,
1166
- feature_flags_access_level=None,
1124
+ async def roles_update(
1125
+ self, organization_id, id, id_body, name, created_at, created_by, members, feature_flags_access_level=None
1167
1126
  ) -> dict[str, Any]:
1168
1127
  """
1169
1128
  Updates a specific role in an organization using the provided role ID and organization ID.
@@ -1199,20 +1158,12 @@ class PosthogApp(APIApplication):
1199
1158
  request_body = {k: v for k, v in request_body.items() if v is not None}
1200
1159
  url = f"{self.base_url}/api/organizations/{organization_id}/roles/{id}/"
1201
1160
  query_params = {}
1202
- response = self._put(url, data=request_body, params=query_params)
1161
+ response = await self._aput(url, data=request_body, params=query_params)
1203
1162
  response.raise_for_status()
1204
1163
  return response.json()
1205
1164
 
1206
- def roles_partial_update(
1207
- self,
1208
- organization_id,
1209
- id,
1210
- id_body=None,
1211
- name=None,
1212
- feature_flags_access_level=None,
1213
- created_at=None,
1214
- created_by=None,
1215
- members=None,
1165
+ async def roles_partial_update(
1166
+ self, organization_id, id, id_body=None, name=None, feature_flags_access_level=None, created_at=None, created_by=None, members=None
1216
1167
  ) -> dict[str, Any]:
1217
1168
  """
1218
1169
  Updates the specified role within an organization using partial modifications via the PATCH method and returns a success response.
@@ -1252,7 +1203,7 @@ class PosthogApp(APIApplication):
1252
1203
  response.raise_for_status()
1253
1204
  return response.json()
1254
1205
 
1255
- def roles_destroy(self, organization_id, id) -> Any:
1206
+ async def roles_destroy(self, organization_id, id) -> Any:
1256
1207
  """
1257
1208
  Removes a specific role from an organization by its ID using a DELETE request and returns a 204 No Content response upon success.
1258
1209
 
@@ -1272,13 +1223,11 @@ class PosthogApp(APIApplication):
1272
1223
  raise ValueError("Missing required parameter 'id'")
1273
1224
  url = f"{self.base_url}/api/organizations/{organization_id}/roles/{id}/"
1274
1225
  query_params = {}
1275
- response = self._delete(url, params=query_params)
1226
+ response = await self._adelete(url, params=query_params)
1276
1227
  response.raise_for_status()
1277
1228
  return response.json()
1278
1229
 
1279
- def roles_role_memberships_list(
1280
- self, organization_id, role_id, limit=None, offset=None
1281
- ) -> dict[str, Any]:
1230
+ async def roles_role_memberships_list(self, organization_id, role_id, limit=None, offset=None) -> dict[str, Any]:
1282
1231
  """
1283
1232
  Retrieves a paginated list of role memberships for a specific role within an organization using query parameters for limit and offset.
1284
1233
 
@@ -1299,24 +1248,13 @@ class PosthogApp(APIApplication):
1299
1248
  if role_id is None:
1300
1249
  raise ValueError("Missing required parameter 'role_id'")
1301
1250
  url = f"{self.base_url}/api/organizations/{organization_id}/roles/{role_id}/role_memberships/"
1302
- query_params = {
1303
- k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
1304
- }
1305
- response = self._get(url, params=query_params)
1251
+ query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
1252
+ response = await self._aget(url, params=query_params)
1306
1253
  response.raise_for_status()
1307
1254
  return response.json()
1308
1255
 
1309
- def roles_role_memberships_create(
1310
- self,
1311
- organization_id,
1312
- role_id,
1313
- id,
1314
- role_id_body,
1315
- organization_member,
1316
- user,
1317
- joined_at,
1318
- updated_at,
1319
- user_uuid,
1256
+ async def roles_role_memberships_create(
1257
+ self, organization_id, role_id, id, role_id_body, organization_member, user, joined_at, updated_at, user_uuid
1320
1258
  ) -> dict[str, Any]:
1321
1259
  """
1322
1260
  Assigns a role to an organization member by associating the role ID with the membership via a POST request.
@@ -1354,11 +1292,11 @@ class PosthogApp(APIApplication):
1354
1292
  request_body = {k: v for k, v in request_body.items() if v is not None}
1355
1293
  url = f"{self.base_url}/api/organizations/{organization_id}/roles/{role_id}/role_memberships/"
1356
1294
  query_params = {}
1357
- response = self._post(url, data=request_body, params=query_params)
1295
+ response = await self._apost(url, data=request_body, params=query_params)
1358
1296
  response.raise_for_status()
1359
1297
  return response.json()
1360
1298
 
1361
- def roles_role_memberships_destroy(self, organization_id, role_id, id) -> Any:
1299
+ async def roles_role_memberships_destroy(self, organization_id, role_id, id) -> Any:
1362
1300
  """
1363
1301
  Removes a specific role membership from an organization role using the provided organization ID, role ID, and membership ID.
1364
1302
 
@@ -1381,13 +1319,11 @@ class PosthogApp(APIApplication):
1381
1319
  raise ValueError("Missing required parameter 'id'")
1382
1320
  url = f"{self.base_url}/api/organizations/{organization_id}/roles/{role_id}/role_memberships/{id}/"
1383
1321
  query_params = {}
1384
- response = self._delete(url, params=query_params)
1322
+ response = await self._adelete(url, params=query_params)
1385
1323
  response.raise_for_status()
1386
1324
  return response.json()
1387
1325
 
1388
- def actions_list(
1389
- self, project_id, format=None, limit=None, offset=None
1390
- ) -> dict[str, Any]:
1326
+ async def actions_list(self, project_id, format=None, limit=None, offset=None) -> dict[str, Any]:
1391
1327
  """
1392
1328
  Retrieves a list of actions for a specified project using the "GET" method, allowing optional filtering by format, limit, and offset.
1393
1329
 
@@ -1406,16 +1342,12 @@ class PosthogApp(APIApplication):
1406
1342
  if project_id is None:
1407
1343
  raise ValueError("Missing required parameter 'project_id'")
1408
1344
  url = f"{self.base_url}/api/projects/{project_id}/actions/"
1409
- query_params = {
1410
- k: v
1411
- for k, v in [("format", format), ("limit", limit), ("offset", offset)]
1412
- if v is not None
1413
- }
1414
- response = self._get(url, params=query_params)
1345
+ query_params = {k: v for k, v in [("format", format), ("limit", limit), ("offset", offset)] if v is not None}
1346
+ response = await self._aget(url, params=query_params)
1415
1347
  response.raise_for_status()
1416
1348
  return response.json()
1417
1349
 
1418
- def actions_create(
1350
+ async def actions_create(
1419
1351
  self,
1420
1352
  project_id,
1421
1353
  format=None,
@@ -1494,20 +1426,12 @@ class PosthogApp(APIApplication):
1494
1426
  request_body = {k: v for k, v in request_body.items() if v is not None}
1495
1427
  url = f"{self.base_url}/api/projects/{project_id}/actions/"
1496
1428
  query_params = {k: v for k, v in [("format", format)] if v is not None}
1497
- response = self._post(url, data=request_body, params=query_params)
1429
+ response = await self._apost(url, data=request_body, params=query_params)
1498
1430
  response.raise_for_status()
1499
1431
  return response.json()
1500
1432
 
1501
- def notebooks_list(
1502
- self,
1503
- project_id,
1504
- contains=None,
1505
- created_by=None,
1506
- date_from=None,
1507
- date_to=None,
1508
- limit=None,
1509
- offset=None,
1510
- user=None,
1433
+ async def notebooks_list(
1434
+ self, project_id, contains=None, created_by=None, date_from=None, date_to=None, limit=None, offset=None, user=None
1511
1435
  ) -> dict[str, Any]:
1512
1436
  """
1513
1437
  Retrieves a list of notebooks for a specific project with optional filtering by content, creator, date range, and pagination parameters.
@@ -1544,11 +1468,11 @@ class PosthogApp(APIApplication):
1544
1468
  ]
1545
1469
  if v is not None
1546
1470
  }
1547
- response = self._get(url, params=query_params)
1471
+ response = await self._aget(url, params=query_params)
1548
1472
  response.raise_for_status()
1549
1473
  return response.json()
1550
1474
 
1551
- def notebooks_create(
1475
+ async def notebooks_create(
1552
1476
  self,
1553
1477
  project_id,
1554
1478
  id=None,
@@ -1610,11 +1534,11 @@ class PosthogApp(APIApplication):
1610
1534
  request_body = {k: v for k, v in request_body.items() if v is not None}
1611
1535
  url = f"{self.base_url}/api/projects/{project_id}/notebooks/"
1612
1536
  query_params = {}
1613
- response = self._post(url, data=request_body, params=query_params)
1537
+ response = await self._apost(url, data=request_body, params=query_params)
1614
1538
  response.raise_for_status()
1615
1539
  return response.json()
1616
1540
 
1617
- def notebooks_retrieve(self, project_id, short_id) -> dict[str, Any]:
1541
+ async def notebooks_retrieve(self, project_id, short_id) -> dict[str, Any]:
1618
1542
  """
1619
1543
  Retrieves the details of a specific notebook identified by its short ID within a given project.
1620
1544
 
@@ -1634,11 +1558,11 @@ class PosthogApp(APIApplication):
1634
1558
  raise ValueError("Missing required parameter 'short_id'")
1635
1559
  url = f"{self.base_url}/api/projects/{project_id}/notebooks/{short_id}/"
1636
1560
  query_params = {}
1637
- response = self._get(url, params=query_params)
1561
+ response = await self._aget(url, params=query_params)
1638
1562
  response.raise_for_status()
1639
1563
  return response.json()
1640
1564
 
1641
- def notebooks_update(
1565
+ async def notebooks_update(
1642
1566
  self,
1643
1567
  project_id,
1644
1568
  short_id,
@@ -1704,11 +1628,11 @@ class PosthogApp(APIApplication):
1704
1628
  request_body = {k: v for k, v in request_body.items() if v is not None}
1705
1629
  url = f"{self.base_url}/api/projects/{project_id}/notebooks/{short_id}/"
1706
1630
  query_params = {}
1707
- response = self._put(url, data=request_body, params=query_params)
1631
+ response = await self._aput(url, data=request_body, params=query_params)
1708
1632
  response.raise_for_status()
1709
1633
  return response.json()
1710
1634
 
1711
- def notebooks_partial_update(
1635
+ async def notebooks_partial_update(
1712
1636
  self,
1713
1637
  project_id,
1714
1638
  short_id,
@@ -1778,7 +1702,7 @@ class PosthogApp(APIApplication):
1778
1702
  response.raise_for_status()
1779
1703
  return response.json()
1780
1704
 
1781
- def notebooks_destroy(self, project_id, short_id) -> Any:
1705
+ async def notebooks_destroy(self, project_id, short_id) -> Any:
1782
1706
  """
1783
1707
  Deletes a notebook specified by its short ID from a project identified by its project ID using the API.
1784
1708
 
@@ -1798,11 +1722,11 @@ class PosthogApp(APIApplication):
1798
1722
  raise ValueError("Missing required parameter 'short_id'")
1799
1723
  url = f"{self.base_url}/api/projects/{project_id}/notebooks/{short_id}/"
1800
1724
  query_params = {}
1801
- response = self._delete(url, params=query_params)
1725
+ response = await self._adelete(url, params=query_params)
1802
1726
  response.raise_for_status()
1803
1727
  return response.json()
1804
1728
 
1805
- def notebooks_activity_retrieve_2(self, project_id, short_id) -> Any:
1729
+ async def notebooks_activity_retrieve_2(self, project_id, short_id) -> Any:
1806
1730
  """
1807
1731
  Retrieves the activity history for a specific notebook within a project.
1808
1732
 
@@ -1820,15 +1744,13 @@ class PosthogApp(APIApplication):
1820
1744
  raise ValueError("Missing required parameter 'project_id'")
1821
1745
  if short_id is None:
1822
1746
  raise ValueError("Missing required parameter 'short_id'")
1823
- url = (
1824
- f"{self.base_url}/api/projects/{project_id}/notebooks/{short_id}/activity/"
1825
- )
1747
+ url = f"{self.base_url}/api/projects/{project_id}/notebooks/{short_id}/activity/"
1826
1748
  query_params = {}
1827
- response = self._get(url, params=query_params)
1749
+ response = await self._aget(url, params=query_params)
1828
1750
  response.raise_for_status()
1829
1751
  return response.json()
1830
1752
 
1831
- def notebooks_activity_retrieve(self, project_id) -> Any:
1753
+ async def notebooks_activity_retrieve(self, project_id) -> Any:
1832
1754
  """
1833
1755
  Retrieves activity information for a notebook within a specified project.
1834
1756
 
@@ -1845,11 +1767,11 @@ class PosthogApp(APIApplication):
1845
1767
  raise ValueError("Missing required parameter 'project_id'")
1846
1768
  url = f"{self.base_url}/api/projects/{project_id}/notebooks/activity/"
1847
1769
  query_params = {}
1848
- response = self._get(url, params=query_params)
1770
+ response = await self._aget(url, params=query_params)
1849
1771
  response.raise_for_status()
1850
1772
  return response.json()
1851
1773
 
1852
- def notebooks_recording_comments_retrieve(self, project_id) -> Any:
1774
+ async def notebooks_recording_comments_retrieve(self, project_id) -> Any:
1853
1775
  """
1854
1776
  Retrieves a list of recording comments associated with a specific project by its ID.
1855
1777
 
@@ -1866,20 +1788,12 @@ class PosthogApp(APIApplication):
1866
1788
  raise ValueError("Missing required parameter 'project_id'")
1867
1789
  url = f"{self.base_url}/api/projects/{project_id}/notebooks/recording_comments/"
1868
1790
  query_params = {}
1869
- response = self._get(url, params=query_params)
1791
+ response = await self._aget(url, params=query_params)
1870
1792
  response.raise_for_status()
1871
1793
  return response.json()
1872
1794
 
1873
- def persons_list(
1874
- self,
1875
- project_id,
1876
- distinct_id=None,
1877
- email=None,
1878
- format=None,
1879
- limit=None,
1880
- offset=None,
1881
- properties=None,
1882
- search=None,
1795
+ async def persons_list(
1796
+ self, project_id, distinct_id=None, email=None, format=None, limit=None, offset=None, properties=None, search=None
1883
1797
  ) -> dict[str, Any]:
1884
1798
  """
1885
1799
  Retrieves a list of persons associated with a specific project, optionally filtered by distinct ID, email, properties, or search criteria.
@@ -1916,11 +1830,11 @@ class PosthogApp(APIApplication):
1916
1830
  ]
1917
1831
  if v is not None
1918
1832
  }
1919
- response = self._get(url, params=query_params)
1833
+ response = await self._aget(url, params=query_params)
1920
1834
  response.raise_for_status()
1921
1835
  return response.json()
1922
1836
 
1923
- def persons_retrieve(self, project_id, id, format=None) -> dict[str, Any]:
1837
+ async def persons_retrieve(self, project_id, id, format=None) -> dict[str, Any]:
1924
1838
  """
1925
1839
  Retrieves a specific person's details from a project using their ID and allows optional response formatting.
1926
1840
 
@@ -1941,21 +1855,12 @@ class PosthogApp(APIApplication):
1941
1855
  raise ValueError("Missing required parameter 'id'")
1942
1856
  url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/"
1943
1857
  query_params = {k: v for k, v in [("format", format)] if v is not None}
1944
- response = self._get(url, params=query_params)
1858
+ response = await self._aget(url, params=query_params)
1945
1859
  response.raise_for_status()
1946
1860
  return response.json()
1947
1861
 
1948
- def persons_update(
1949
- self,
1950
- project_id,
1951
- id,
1952
- format=None,
1953
- id_body=None,
1954
- name=None,
1955
- distinct_ids=None,
1956
- properties=None,
1957
- created_at=None,
1958
- uuid=None,
1862
+ async def persons_update(
1863
+ self, project_id, id, format=None, id_body=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
1959
1864
  ) -> dict[str, Any]:
1960
1865
  """
1961
1866
  Updates a specific person's details within a designated project and returns a success response upon completion.
@@ -1992,21 +1897,12 @@ class PosthogApp(APIApplication):
1992
1897
  request_body = {k: v for k, v in request_body.items() if v is not None}
1993
1898
  url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/"
1994
1899
  query_params = {k: v for k, v in [("format", format)] if v is not None}
1995
- response = self._put(url, data=request_body, params=query_params)
1900
+ response = await self._aput(url, data=request_body, params=query_params)
1996
1901
  response.raise_for_status()
1997
1902
  return response.json()
1998
1903
 
1999
- def persons_partial_update(
2000
- self,
2001
- project_id,
2002
- id,
2003
- format=None,
2004
- id_body=None,
2005
- name=None,
2006
- distinct_ids=None,
2007
- properties=None,
2008
- created_at=None,
2009
- uuid=None,
1904
+ async def persons_partial_update(
1905
+ self, project_id, id, format=None, id_body=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
2010
1906
  ) -> dict[str, Any]:
2011
1907
  """
2012
1908
  Updates the details of a specific person associated with a project using the PATCH method, allowing for partial modification of the person's information.
@@ -2047,7 +1943,7 @@ class PosthogApp(APIApplication):
2047
1943
  response.raise_for_status()
2048
1944
  return response.json()
2049
1945
 
2050
- def persons_destroy(self, project_id, id, delete_events=None, format=None) -> Any:
1946
+ async def persons_destroy(self, project_id, id, delete_events=None, format=None) -> Any:
2051
1947
  """
2052
1948
  Deletes a specific person within a project, optionally removing associated events, without returning content.
2053
1949
 
@@ -2068,16 +1964,12 @@ class PosthogApp(APIApplication):
2068
1964
  if id is None:
2069
1965
  raise ValueError("Missing required parameter 'id'")
2070
1966
  url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/"
2071
- query_params = {
2072
- k: v
2073
- for k, v in [("delete_events", delete_events), ("format", format)]
2074
- if v is not None
2075
- }
2076
- response = self._delete(url, params=query_params)
1967
+ query_params = {k: v for k, v in [("delete_events", delete_events), ("format", format)] if v is not None}
1968
+ response = await self._adelete(url, params=query_params)
2077
1969
  response.raise_for_status()
2078
1970
  return response.json()
2079
1971
 
2080
- def persons_activity_retrieve_2(self, project_id, id, format=None) -> Any:
1972
+ async def persons_activity_retrieve_2(self, project_id, id, format=None) -> Any:
2081
1973
  """
2082
1974
  Retrieves activity information for a specific person within a project using the "GET" method.
2083
1975
 
@@ -2098,21 +1990,12 @@ class PosthogApp(APIApplication):
2098
1990
  raise ValueError("Missing required parameter 'id'")
2099
1991
  url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/activity/"
2100
1992
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2101
- response = self._get(url, params=query_params)
1993
+ response = await self._aget(url, params=query_params)
2102
1994
  response.raise_for_status()
2103
1995
  return response.json()
2104
1996
 
2105
- def persons_delete_events_create(
2106
- self,
2107
- project_id,
2108
- id,
2109
- format=None,
2110
- id_body=None,
2111
- name=None,
2112
- distinct_ids=None,
2113
- properties=None,
2114
- created_at=None,
2115
- uuid=None,
1997
+ async def persons_delete_events_create(
1998
+ self, project_id, id, format=None, id_body=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
2116
1999
  ) -> Any:
2117
2000
  """
2118
2001
  Deletes events associated with a person in a project using the POST method and returns a status message.
@@ -2149,22 +2032,12 @@ class PosthogApp(APIApplication):
2149
2032
  request_body = {k: v for k, v in request_body.items() if v is not None}
2150
2033
  url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/delete_events/"
2151
2034
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2152
- response = self._post(url, data=request_body, params=query_params)
2035
+ response = await self._apost(url, data=request_body, params=query_params)
2153
2036
  response.raise_for_status()
2154
2037
  return response.json()
2155
2038
 
2156
- def persons_delete_property_create(
2157
- self,
2158
- project_id,
2159
- id,
2160
- unset,
2161
- format=None,
2162
- id_body=None,
2163
- name=None,
2164
- distinct_ids=None,
2165
- properties=None,
2166
- created_at=None,
2167
- uuid=None,
2039
+ async def persons_delete_property_create(
2040
+ self, project_id, id, unset, format=None, id_body=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
2168
2041
  ) -> Any:
2169
2042
  """
2170
2043
  Removes a specified property from a person within a project using a POST request, returning a success status on completion.
@@ -2201,14 +2074,12 @@ class PosthogApp(APIApplication):
2201
2074
  }
2202
2075
  request_body = {k: v for k, v in request_body.items() if v is not None}
2203
2076
  url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/delete_property/"
2204
- query_params = {
2205
- k: v for k, v in [("$unset", unset), ("format", format)] if v is not None
2206
- }
2207
- response = self._post(url, data=request_body, params=query_params)
2077
+ query_params = {k: v for k, v in [("$unset", unset), ("format", format)] if v is not None}
2078
+ response = await self._apost(url, data=request_body, params=query_params)
2208
2079
  response.raise_for_status()
2209
2080
  return response.json()
2210
2081
 
2211
- def persons_properties_timeline_retrieve(self, project_id, id, format=None) -> Any:
2082
+ async def persons_properties_timeline_retrieve(self, project_id, id, format=None) -> Any:
2212
2083
  """
2213
2084
  Retrieves a timeline of property changes for a specific person in a project, optionally formatted.
2214
2085
 
@@ -2229,21 +2100,12 @@ class PosthogApp(APIApplication):
2229
2100
  raise ValueError("Missing required parameter 'id'")
2230
2101
  url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/properties_timeline/"
2231
2102
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2232
- response = self._get(url, params=query_params)
2103
+ response = await self._aget(url, params=query_params)
2233
2104
  response.raise_for_status()
2234
2105
  return response.json()
2235
2106
 
2236
- def persons_split_create(
2237
- self,
2238
- project_id,
2239
- id,
2240
- format=None,
2241
- id_body=None,
2242
- name=None,
2243
- distinct_ids=None,
2244
- properties=None,
2245
- created_at=None,
2246
- uuid=None,
2107
+ async def persons_split_create(
2108
+ self, project_id, id, format=None, id_body=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
2247
2109
  ) -> Any:
2248
2110
  """
2249
2111
  Splits a specified person into separate entities within a project and returns the operation result.
@@ -2280,11 +2142,11 @@ class PosthogApp(APIApplication):
2280
2142
  request_body = {k: v for k, v in request_body.items() if v is not None}
2281
2143
  url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/split/"
2282
2144
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2283
- response = self._post(url, data=request_body, params=query_params)
2145
+ response = await self._apost(url, data=request_body, params=query_params)
2284
2146
  response.raise_for_status()
2285
2147
  return response.json()
2286
2148
 
2287
- def persons_update_property_create(
2149
+ async def persons_update_property_create(
2288
2150
  self,
2289
2151
  project_id,
2290
2152
  id,
@@ -2334,16 +2196,12 @@ class PosthogApp(APIApplication):
2334
2196
  }
2335
2197
  request_body = {k: v for k, v in request_body.items() if v is not None}
2336
2198
  url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/update_property/"
2337
- query_params = {
2338
- k: v
2339
- for k, v in [("format", format), ("key", key), ("value", value)]
2340
- if v is not None
2341
- }
2342
- response = self._post(url, data=request_body, params=query_params)
2199
+ query_params = {k: v for k, v in [("format", format), ("key", key), ("value", value)] if v is not None}
2200
+ response = await self._apost(url, data=request_body, params=query_params)
2343
2201
  response.raise_for_status()
2344
2202
  return response.json()
2345
2203
 
2346
- def persons_activity_retrieve(self, project_id, format=None) -> Any:
2204
+ async def persons_activity_retrieve(self, project_id, format=None) -> Any:
2347
2205
  """
2348
2206
  Retrieves activity data for persons associated with a specific project in the requested format.
2349
2207
 
@@ -2361,11 +2219,11 @@ class PosthogApp(APIApplication):
2361
2219
  raise ValueError("Missing required parameter 'project_id'")
2362
2220
  url = f"{self.base_url}/api/projects/{project_id}/persons/activity/"
2363
2221
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2364
- response = self._get(url, params=query_params)
2222
+ response = await self._aget(url, params=query_params)
2365
2223
  response.raise_for_status()
2366
2224
  return response.json()
2367
2225
 
2368
- def persons_bulk_delete_create(
2226
+ async def persons_bulk_delete_create(
2369
2227
  self,
2370
2228
  project_id,
2371
2229
  delete_events=None,
@@ -2415,19 +2273,14 @@ class PosthogApp(APIApplication):
2415
2273
  url = f"{self.base_url}/api/projects/{project_id}/persons/bulk_delete/"
2416
2274
  query_params = {
2417
2275
  k: v
2418
- for k, v in [
2419
- ("delete_events", delete_events),
2420
- ("distinct_ids", distinct_ids),
2421
- ("format", format),
2422
- ("ids", ids),
2423
- ]
2276
+ for k, v in [("delete_events", delete_events), ("distinct_ids", distinct_ids), ("format", format), ("ids", ids)]
2424
2277
  if v is not None
2425
2278
  }
2426
- response = self._post(url, data=request_body, params=query_params)
2279
+ response = await self._apost(url, data=request_body, params=query_params)
2427
2280
  response.raise_for_status()
2428
2281
  return response.json()
2429
2282
 
2430
- def persons_cohorts_retrieve(self, project_id, format=None) -> Any:
2283
+ async def persons_cohorts_retrieve(self, project_id, format=None) -> Any:
2431
2284
  """
2432
2285
  Retrieves a list of person cohorts for a specified project using the provided project ID.
2433
2286
 
@@ -2445,11 +2298,11 @@ class PosthogApp(APIApplication):
2445
2298
  raise ValueError("Missing required parameter 'project_id'")
2446
2299
  url = f"{self.base_url}/api/projects/{project_id}/persons/cohorts/"
2447
2300
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2448
- response = self._get(url, params=query_params)
2301
+ response = await self._aget(url, params=query_params)
2449
2302
  response.raise_for_status()
2450
2303
  return response.json()
2451
2304
 
2452
- def persons_funnel_retrieve(self, project_id, format=None) -> Any:
2305
+ async def persons_funnel_retrieve(self, project_id, format=None) -> Any:
2453
2306
  """
2454
2307
  Retrieves a list of persons in a funnel for a specific project using the project ID and optionally formats the output.
2455
2308
 
@@ -2467,20 +2320,12 @@ class PosthogApp(APIApplication):
2467
2320
  raise ValueError("Missing required parameter 'project_id'")
2468
2321
  url = f"{self.base_url}/api/projects/{project_id}/persons/funnel/"
2469
2322
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2470
- response = self._get(url, params=query_params)
2323
+ response = await self._aget(url, params=query_params)
2471
2324
  response.raise_for_status()
2472
2325
  return response.json()
2473
2326
 
2474
- def persons_funnel_create(
2475
- self,
2476
- project_id,
2477
- format=None,
2478
- id=None,
2479
- name=None,
2480
- distinct_ids=None,
2481
- properties=None,
2482
- created_at=None,
2483
- uuid=None,
2327
+ async def persons_funnel_create(
2328
+ self, project_id, format=None, id=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
2484
2329
  ) -> Any:
2485
2330
  """
2486
2331
  Tracks user funnel data for a specific project and returns formatted results.
@@ -2514,11 +2359,11 @@ class PosthogApp(APIApplication):
2514
2359
  request_body = {k: v for k, v in request_body.items() if v is not None}
2515
2360
  url = f"{self.base_url}/api/projects/{project_id}/persons/funnel/"
2516
2361
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2517
- response = self._post(url, data=request_body, params=query_params)
2362
+ response = await self._apost(url, data=request_body, params=query_params)
2518
2363
  response.raise_for_status()
2519
2364
  return response.json()
2520
2365
 
2521
- def persons_funnel_correlation_retrieve(self, project_id, format=None) -> Any:
2366
+ async def persons_funnel_correlation_retrieve(self, project_id, format=None) -> Any:
2522
2367
  """
2523
2368
  Retrieves correlation data for persons in a project, identified by the project ID, and optionally formats the output based on the specified format parameter.
2524
2369
 
@@ -2536,20 +2381,12 @@ class PosthogApp(APIApplication):
2536
2381
  raise ValueError("Missing required parameter 'project_id'")
2537
2382
  url = f"{self.base_url}/api/projects/{project_id}/persons/funnel/correlation/"
2538
2383
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2539
- response = self._get(url, params=query_params)
2384
+ response = await self._aget(url, params=query_params)
2540
2385
  response.raise_for_status()
2541
2386
  return response.json()
2542
2387
 
2543
- def persons_funnel_correlation_create(
2544
- self,
2545
- project_id,
2546
- format=None,
2547
- id=None,
2548
- name=None,
2549
- distinct_ids=None,
2550
- properties=None,
2551
- created_at=None,
2552
- uuid=None,
2388
+ async def persons_funnel_correlation_create(
2389
+ self, project_id, format=None, id=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
2553
2390
  ) -> Any:
2554
2391
  """
2555
2392
  Calculates and returns the correlation between funnel data for individuals within a specified project using the POST method.
@@ -2583,11 +2420,11 @@ class PosthogApp(APIApplication):
2583
2420
  request_body = {k: v for k, v in request_body.items() if v is not None}
2584
2421
  url = f"{self.base_url}/api/projects/{project_id}/persons/funnel/correlation/"
2585
2422
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2586
- response = self._post(url, data=request_body, params=query_params)
2423
+ response = await self._apost(url, data=request_body, params=query_params)
2587
2424
  response.raise_for_status()
2588
2425
  return response.json()
2589
2426
 
2590
- def persons_lifecycle_retrieve(self, project_id, format=None) -> Any:
2427
+ async def persons_lifecycle_retrieve(self, project_id, format=None) -> Any:
2591
2428
  """
2592
2429
  Retrieves lifecycle information for persons associated with a project, identified by the specified project ID, allowing optional format specification.
2593
2430
 
@@ -2605,20 +2442,12 @@ class PosthogApp(APIApplication):
2605
2442
  raise ValueError("Missing required parameter 'project_id'")
2606
2443
  url = f"{self.base_url}/api/projects/{project_id}/persons/lifecycle/"
2607
2444
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2608
- response = self._get(url, params=query_params)
2445
+ response = await self._aget(url, params=query_params)
2609
2446
  response.raise_for_status()
2610
2447
  return response.json()
2611
2448
 
2612
- def persons_reset_person_distinct_id_create(
2613
- self,
2614
- project_id,
2615
- format=None,
2616
- id=None,
2617
- name=None,
2618
- distinct_ids=None,
2619
- properties=None,
2620
- created_at=None,
2621
- uuid=None,
2449
+ async def persons_reset_person_distinct_id_create(
2450
+ self, project_id, format=None, id=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
2622
2451
  ) -> Any:
2623
2452
  """
2624
2453
  Resets and unlinks a person's distinct identifier in the specified project, clearing associated user data across devices or sessions.
@@ -2652,11 +2481,11 @@ class PosthogApp(APIApplication):
2652
2481
  request_body = {k: v for k, v in request_body.items() if v is not None}
2653
2482
  url = f"{self.base_url}/api/projects/{project_id}/persons/reset_person_distinct_id/"
2654
2483
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2655
- response = self._post(url, data=request_body, params=query_params)
2484
+ response = await self._apost(url, data=request_body, params=query_params)
2656
2485
  response.raise_for_status()
2657
2486
  return response.json()
2658
2487
 
2659
- def persons_stickiness_retrieve(self, project_id, format=None) -> Any:
2488
+ async def persons_stickiness_retrieve(self, project_id, format=None) -> Any:
2660
2489
  """
2661
2490
  Retrieves stickiness data for persons associated with a specific project, optionally formatted.
2662
2491
 
@@ -2674,11 +2503,11 @@ class PosthogApp(APIApplication):
2674
2503
  raise ValueError("Missing required parameter 'project_id'")
2675
2504
  url = f"{self.base_url}/api/projects/{project_id}/persons/stickiness/"
2676
2505
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2677
- response = self._get(url, params=query_params)
2506
+ response = await self._aget(url, params=query_params)
2678
2507
  response.raise_for_status()
2679
2508
  return response.json()
2680
2509
 
2681
- def persons_trends_retrieve(self, project_id, format=None) -> Any:
2510
+ async def persons_trends_retrieve(self, project_id, format=None) -> Any:
2682
2511
  """
2683
2512
  Retrieves trends related to persons in a specified project using the GET method and returns the data in a requested format.
2684
2513
 
@@ -2696,11 +2525,11 @@ class PosthogApp(APIApplication):
2696
2525
  raise ValueError("Missing required parameter 'project_id'")
2697
2526
  url = f"{self.base_url}/api/projects/{project_id}/persons/trends/"
2698
2527
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2699
- response = self._get(url, params=query_params)
2528
+ response = await self._aget(url, params=query_params)
2700
2529
  response.raise_for_status()
2701
2530
  return response.json()
2702
2531
 
2703
- def persons_values_retrieve(self, project_id, format=None) -> Any:
2532
+ async def persons_values_retrieve(self, project_id, format=None) -> Any:
2704
2533
  """
2705
2534
  Retrieves a list of person values for a specified project using the provided project ID.
2706
2535
 
@@ -2718,13 +2547,11 @@ class PosthogApp(APIApplication):
2718
2547
  raise ValueError("Missing required parameter 'project_id'")
2719
2548
  url = f"{self.base_url}/api/projects/{project_id}/persons/values/"
2720
2549
  query_params = {k: v for k, v in [("format", format)] if v is not None}
2721
- response = self._get(url, params=query_params)
2550
+ response = await self._aget(url, params=query_params)
2722
2551
  response.raise_for_status()
2723
2552
  return response.json()
2724
2553
 
2725
- def plugin_configs_logs_list(
2726
- self, project_id, plugin_config_id, limit=None, offset=None
2727
- ) -> dict[str, Any]:
2554
+ async def plugin_configs_logs_list(self, project_id, plugin_config_id, limit=None, offset=None) -> dict[str, Any]:
2728
2555
  """
2729
2556
  Retrieves and returns log entries for a specific plugin configuration within a project, allowing pagination through query parameters for limit and offset.
2730
2557
 
@@ -2745,14 +2572,12 @@ class PosthogApp(APIApplication):
2745
2572
  if plugin_config_id is None:
2746
2573
  raise ValueError("Missing required parameter 'plugin_config_id'")
2747
2574
  url = f"{self.base_url}/api/projects/{project_id}/plugin_configs/{plugin_config_id}/logs/"
2748
- query_params = {
2749
- k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
2750
- }
2751
- response = self._get(url, params=query_params)
2575
+ query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
2576
+ response = await self._aget(url, params=query_params)
2752
2577
  response.raise_for_status()
2753
2578
  return response.json()
2754
2579
 
2755
- def property_definitions_list(
2580
+ async def property_definitions_list(
2756
2581
  self,
2757
2582
  project_id,
2758
2583
  event_names=None,
@@ -2819,11 +2644,11 @@ class PosthogApp(APIApplication):
2819
2644
  ]
2820
2645
  if v is not None
2821
2646
  }
2822
- response = self._get(url, params=query_params)
2647
+ response = await self._aget(url, params=query_params)
2823
2648
  response.raise_for_status()
2824
2649
  return response.json()
2825
2650
 
2826
- def property_definitions_retrieve(self, project_id, id) -> dict[str, Any]:
2651
+ async def property_definitions_retrieve(self, project_id, id) -> dict[str, Any]:
2827
2652
  """
2828
2653
  Retrieves a specific property definition by ID for a given project.
2829
2654
 
@@ -2843,20 +2668,12 @@ class PosthogApp(APIApplication):
2843
2668
  raise ValueError("Missing required parameter 'id'")
2844
2669
  url = f"{self.base_url}/api/projects/{project_id}/property_definitions/{id}/"
2845
2670
  query_params = {}
2846
- response = self._get(url, params=query_params)
2671
+ response = await self._aget(url, params=query_params)
2847
2672
  response.raise_for_status()
2848
2673
  return response.json()
2849
2674
 
2850
- def property_definitions_update(
2851
- self,
2852
- project_id,
2853
- id,
2854
- id_body,
2855
- name,
2856
- is_seen_on_filtered_events,
2857
- is_numerical=None,
2858
- property_type=None,
2859
- tags=None,
2675
+ async def property_definitions_update(
2676
+ self, project_id, id, id_body, name, is_seen_on_filtered_events, is_numerical=None, property_type=None, tags=None
2860
2677
  ) -> dict[str, Any]:
2861
2678
  """
2862
2679
  Updates or replaces a specific property definition within a project using the PUT method, where the project and property definition are identified by their respective IDs.
@@ -2892,20 +2709,12 @@ class PosthogApp(APIApplication):
2892
2709
  request_body = {k: v for k, v in request_body.items() if v is not None}
2893
2710
  url = f"{self.base_url}/api/projects/{project_id}/property_definitions/{id}/"
2894
2711
  query_params = {}
2895
- response = self._put(url, data=request_body, params=query_params)
2712
+ response = await self._aput(url, data=request_body, params=query_params)
2896
2713
  response.raise_for_status()
2897
2714
  return response.json()
2898
2715
 
2899
- def property_definitions_partial_update(
2900
- self,
2901
- project_id,
2902
- id,
2903
- id_body=None,
2904
- name=None,
2905
- is_numerical=None,
2906
- property_type=None,
2907
- tags=None,
2908
- is_seen_on_filtered_events=None,
2716
+ async def property_definitions_partial_update(
2717
+ self, project_id, id, id_body=None, name=None, is_numerical=None, property_type=None, tags=None, is_seen_on_filtered_events=None
2909
2718
  ) -> dict[str, Any]:
2910
2719
  """
2911
2720
  Updates a specific property definition for a project using the "PATCH" method, allowing partial modifications to the resource at "/api/projects/{project_id}/property_definitions/{id}/".
@@ -2945,7 +2754,7 @@ class PosthogApp(APIApplication):
2945
2754
  response.raise_for_status()
2946
2755
  return response.json()
2947
2756
 
2948
- def property_definitions_destroy(self, project_id, id) -> Any:
2757
+ async def property_definitions_destroy(self, project_id, id) -> Any:
2949
2758
  """
2950
2759
  Deletes a specified property definition from a project using the provided project ID and property definition ID.
2951
2760
 
@@ -2965,11 +2774,11 @@ class PosthogApp(APIApplication):
2965
2774
  raise ValueError("Missing required parameter 'id'")
2966
2775
  url = f"{self.base_url}/api/projects/{project_id}/property_definitions/{id}/"
2967
2776
  query_params = {}
2968
- response = self._delete(url, params=query_params)
2777
+ response = await self._adelete(url, params=query_params)
2969
2778
  response.raise_for_status()
2970
2779
  return response.json()
2971
2780
 
2972
- def property_definitions_seen_together_retrieve(self, project_id) -> Any:
2781
+ async def property_definitions_seen_together_retrieve(self, project_id) -> Any:
2973
2782
  """
2974
2783
  Retrieves property definitions that are commonly seen together for a specified project.
2975
2784
 
@@ -2986,19 +2795,12 @@ class PosthogApp(APIApplication):
2986
2795
  raise ValueError("Missing required parameter 'project_id'")
2987
2796
  url = f"{self.base_url}/api/projects/{project_id}/property_definitions/seen_together/"
2988
2797
  query_params = {}
2989
- response = self._get(url, params=query_params)
2798
+ response = await self._aget(url, params=query_params)
2990
2799
  response.raise_for_status()
2991
2800
  return response.json()
2992
2801
 
2993
- def query_create(
2994
- self,
2995
- project_id,
2996
- query,
2997
- async_=None,
2998
- client_query_id=None,
2999
- filters_override=None,
3000
- refresh=None,
3001
- variables_override=None,
2802
+ async def query_create(
2803
+ self, project_id, query, async_=None, client_query_id=None, filters_override=None, refresh=None, variables_override=None
3002
2804
  ) -> Any:
3003
2805
  """
3004
2806
  Submits a query to process or retrieve project-specific data and returns the results.
@@ -3047,11 +2849,11 @@ class PosthogApp(APIApplication):
3047
2849
  request_body = {k: v for k, v in request_body.items() if v is not None}
3048
2850
  url = f"{self.base_url}/api/projects/{project_id}/query/"
3049
2851
  query_params = {}
3050
- response = self._post(url, data=request_body, params=query_params)
2852
+ response = await self._apost(url, data=request_body, params=query_params)
3051
2853
  response.raise_for_status()
3052
2854
  return response.json()
3053
2855
 
3054
- def query_retrieve(self, project_id, id) -> dict[str, Any]:
2856
+ async def query_retrieve(self, project_id, id) -> dict[str, Any]:
3055
2857
  """
3056
2858
  Retrieves query details for a specific query within a project identified by the project ID and query ID.
3057
2859
 
@@ -3071,11 +2873,11 @@ class PosthogApp(APIApplication):
3071
2873
  raise ValueError("Missing required parameter 'id'")
3072
2874
  url = f"{self.base_url}/api/projects/{project_id}/query/{id}/"
3073
2875
  query_params = {}
3074
- response = self._get(url, params=query_params)
2876
+ response = await self._aget(url, params=query_params)
3075
2877
  response.raise_for_status()
3076
2878
  return response.json()
3077
2879
 
3078
- def query_destroy(self, project_id, id) -> Any:
2880
+ async def query_destroy(self, project_id, id) -> Any:
3079
2881
  """
3080
2882
  Deletes a query identified by the given ID within a specified project using the DELETE method and returns a successful response without content upon deletion.
3081
2883
 
@@ -3095,11 +2897,11 @@ class PosthogApp(APIApplication):
3095
2897
  raise ValueError("Missing required parameter 'id'")
3096
2898
  url = f"{self.base_url}/api/projects/{project_id}/query/{id}/"
3097
2899
  query_params = {}
3098
- response = self._delete(url, params=query_params)
2900
+ response = await self._adelete(url, params=query_params)
3099
2901
  response.raise_for_status()
3100
2902
  return response.json()
3101
2903
 
3102
- def query_check_auth_for_async_create(self, project_id) -> Any:
2904
+ async def query_check_auth_for_async_create(self, project_id) -> Any:
3103
2905
  """
3104
2906
  Checks authorization for asynchronous operations on a specified project and returns the result.
3105
2907
 
@@ -3116,11 +2918,11 @@ class PosthogApp(APIApplication):
3116
2918
  raise ValueError("Missing required parameter 'project_id'")
3117
2919
  url = f"{self.base_url}/api/projects/{project_id}/query/check_auth_for_async/"
3118
2920
  query_params = {}
3119
- response = self._post(url, data={}, params=query_params)
2921
+ response = await self._apost(url, data={}, params=query_params)
3120
2922
  response.raise_for_status()
3121
2923
  return response.json()
3122
2924
 
3123
- def query_draft_sql_retrieve(self, project_id) -> Any:
2925
+ async def query_draft_sql_retrieve(self, project_id) -> Any:
3124
2926
  """
3125
2927
  Retrieves draft SQL queries for a specified project using the project's ID.
3126
2928
 
@@ -3137,13 +2939,11 @@ class PosthogApp(APIApplication):
3137
2939
  raise ValueError("Missing required parameter 'project_id'")
3138
2940
  url = f"{self.base_url}/api/projects/{project_id}/query/draft_sql/"
3139
2941
  query_params = {}
3140
- response = self._get(url, params=query_params)
2942
+ response = await self._aget(url, params=query_params)
3141
2943
  response.raise_for_status()
3142
2944
  return response.json()
3143
2945
 
3144
- def session_recording_playlists_list(
3145
- self, project_id, created_by=None, limit=None, offset=None, short_id=None
3146
- ) -> dict[str, Any]:
2946
+ async def session_recording_playlists_list(self, project_id, created_by=None, limit=None, offset=None, short_id=None) -> dict[str, Any]:
3147
2947
  """
3148
2948
  Retrieves a paginated list of session recording playlists for a specified project, filtered by creator, short ID, or other parameters.
3149
2949
 
@@ -3164,20 +2964,13 @@ class PosthogApp(APIApplication):
3164
2964
  raise ValueError("Missing required parameter 'project_id'")
3165
2965
  url = f"{self.base_url}/api/projects/{project_id}/session_recording_playlists/"
3166
2966
  query_params = {
3167
- k: v
3168
- for k, v in [
3169
- ("created_by", created_by),
3170
- ("limit", limit),
3171
- ("offset", offset),
3172
- ("short_id", short_id),
3173
- ]
3174
- if v is not None
2967
+ k: v for k, v in [("created_by", created_by), ("limit", limit), ("offset", offset), ("short_id", short_id)] if v is not None
3175
2968
  }
3176
- response = self._get(url, params=query_params)
2969
+ response = await self._aget(url, params=query_params)
3177
2970
  response.raise_for_status()
3178
2971
  return response.json()
3179
2972
 
3180
- def session_recording_playlists_create(
2973
+ async def session_recording_playlists_create(
3181
2974
  self,
3182
2975
  project_id,
3183
2976
  id=None,
@@ -3242,13 +3035,11 @@ class PosthogApp(APIApplication):
3242
3035
  request_body = {k: v for k, v in request_body.items() if v is not None}
3243
3036
  url = f"{self.base_url}/api/projects/{project_id}/session_recording_playlists/"
3244
3037
  query_params = {}
3245
- response = self._post(url, data=request_body, params=query_params)
3038
+ response = await self._apost(url, data=request_body, params=query_params)
3246
3039
  response.raise_for_status()
3247
3040
  return response.json()
3248
3041
 
3249
- def session_recording_playlists_retrieve(
3250
- self, project_id, short_id
3251
- ) -> dict[str, Any]:
3042
+ async def session_recording_playlists_retrieve(self, project_id, short_id) -> dict[str, Any]:
3252
3043
  """
3253
3044
  Retrieves a session recording playlist by project ID and short ID using the GET method.
3254
3045
 
@@ -3268,11 +3059,11 @@ class PosthogApp(APIApplication):
3268
3059
  raise ValueError("Missing required parameter 'short_id'")
3269
3060
  url = f"{self.base_url}/api/projects/{project_id}/session_recording_playlists/{short_id}/"
3270
3061
  query_params = {}
3271
- response = self._get(url, params=query_params)
3062
+ response = await self._aget(url, params=query_params)
3272
3063
  response.raise_for_status()
3273
3064
  return response.json()
3274
3065
 
3275
- def session_recording_playlists_update(
3066
+ async def session_recording_playlists_update(
3276
3067
  self,
3277
3068
  project_id,
3278
3069
  short_id,
@@ -3341,11 +3132,11 @@ class PosthogApp(APIApplication):
3341
3132
  request_body = {k: v for k, v in request_body.items() if v is not None}
3342
3133
  url = f"{self.base_url}/api/projects/{project_id}/session_recording_playlists/{short_id}/"
3343
3134
  query_params = {}
3344
- response = self._put(url, data=request_body, params=query_params)
3135
+ response = await self._aput(url, data=request_body, params=query_params)
3345
3136
  response.raise_for_status()
3346
3137
  return response.json()
3347
3138
 
3348
- def session_recording_playlists_partial_update(
3139
+ async def session_recording_playlists_partial_update(
3349
3140
  self,
3350
3141
  project_id,
3351
3142
  short_id,
@@ -3418,7 +3209,7 @@ class PosthogApp(APIApplication):
3418
3209
  response.raise_for_status()
3419
3210
  return response.json()
3420
3211
 
3421
- def session_recording_playlists_destroy(self, project_id, short_id) -> Any:
3212
+ async def session_recording_playlists_destroy(self, project_id, short_id) -> Any:
3422
3213
  """
3423
3214
  Deletes a session recording playlist in a specified project using its short identifier, returning a 405 status code (method not allowed for hard deletes).
3424
3215
 
@@ -3438,13 +3229,11 @@ class PosthogApp(APIApplication):
3438
3229
  raise ValueError("Missing required parameter 'short_id'")
3439
3230
  url = f"{self.base_url}/api/projects/{project_id}/session_recording_playlists/{short_id}/"
3440
3231
  query_params = {}
3441
- response = self._delete(url, params=query_params)
3232
+ response = await self._adelete(url, params=query_params)
3442
3233
  response.raise_for_status()
3443
3234
  return response.json()
3444
3235
 
3445
- def session_recording_playlists_recordings_retrieve(
3446
- self, project_id, short_id
3447
- ) -> Any:
3236
+ async def session_recording_playlists_recordings_retrieve(self, project_id, short_id) -> Any:
3448
3237
  """
3449
3238
  Retrieves a list of recordings associated with a specific session recording playlist in a project.
3450
3239
 
@@ -3464,11 +3253,11 @@ class PosthogApp(APIApplication):
3464
3253
  raise ValueError("Missing required parameter 'short_id'")
3465
3254
  url = f"{self.base_url}/api/projects/{project_id}/session_recording_playlists/{short_id}/recordings/"
3466
3255
  query_params = {}
3467
- response = self._get(url, params=query_params)
3256
+ response = await self._aget(url, params=query_params)
3468
3257
  response.raise_for_status()
3469
3258
  return response.json()
3470
3259
 
3471
- def session_recording_playlists_recordings_create(
3260
+ async def session_recording_playlists_recordings_create(
3472
3261
  self,
3473
3262
  project_id,
3474
3263
  short_id,
@@ -3541,13 +3330,11 @@ class PosthogApp(APIApplication):
3541
3330
  request_body = {k: v for k, v in request_body.items() if v is not None}
3542
3331
  url = f"{self.base_url}/api/projects/{project_id}/session_recording_playlists/{short_id}/recordings/{session_recording_id}/"
3543
3332
  query_params = {}
3544
- response = self._post(url, data=request_body, params=query_params)
3333
+ response = await self._apost(url, data=request_body, params=query_params)
3545
3334
  response.raise_for_status()
3546
3335
  return response.json()
3547
3336
 
3548
- def session_recording_playlists_recordings_destroy(
3549
- self, project_id, short_id, session_recording_id
3550
- ) -> Any:
3337
+ async def session_recording_playlists_recordings_destroy(self, project_id, short_id, session_recording_id) -> Any:
3551
3338
  """
3552
3339
  Deletes a specific session recording from a session recording playlist in a project using the provided project, playlist, and recording identifiers.
3553
3340
 
@@ -3570,13 +3357,11 @@ class PosthogApp(APIApplication):
3570
3357
  raise ValueError("Missing required parameter 'session_recording_id'")
3571
3358
  url = f"{self.base_url}/api/projects/{project_id}/session_recording_playlists/{short_id}/recordings/{session_recording_id}/"
3572
3359
  query_params = {}
3573
- response = self._delete(url, params=query_params)
3360
+ response = await self._adelete(url, params=query_params)
3574
3361
  response.raise_for_status()
3575
3362
  return response.json()
3576
3363
 
3577
- def session_recordings_list(
3578
- self, project_id, limit=None, offset=None
3579
- ) -> dict[str, Any]:
3364
+ async def session_recordings_list(self, project_id, limit=None, offset=None) -> dict[str, Any]:
3580
3365
  """
3581
3366
  Retrieves a list of session recordings for a specified project, allowing pagination through limit and offset parameters.
3582
3367
 
@@ -3594,14 +3379,12 @@ class PosthogApp(APIApplication):
3594
3379
  if project_id is None:
3595
3380
  raise ValueError("Missing required parameter 'project_id'")
3596
3381
  url = f"{self.base_url}/api/projects/{project_id}/session_recordings/"
3597
- query_params = {
3598
- k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
3599
- }
3600
- response = self._get(url, params=query_params)
3382
+ query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
3383
+ response = await self._aget(url, params=query_params)
3601
3384
  response.raise_for_status()
3602
3385
  return response.json()
3603
3386
 
3604
- def session_recordings_retrieve(self, project_id, id) -> dict[str, Any]:
3387
+ async def session_recordings_retrieve(self, project_id, id) -> dict[str, Any]:
3605
3388
  """
3606
3389
  Retrieves a specific session recording for a project identified by project_id and session ID.
3607
3390
 
@@ -3621,11 +3404,11 @@ class PosthogApp(APIApplication):
3621
3404
  raise ValueError("Missing required parameter 'id'")
3622
3405
  url = f"{self.base_url}/api/projects/{project_id}/session_recordings/{id}/"
3623
3406
  query_params = {}
3624
- response = self._get(url, params=query_params)
3407
+ response = await self._aget(url, params=query_params)
3625
3408
  response.raise_for_status()
3626
3409
  return response.json()
3627
3410
 
3628
- def session_recordings_update(
3411
+ async def session_recordings_update(
3629
3412
  self,
3630
3413
  project_id,
3631
3414
  id,
@@ -3715,11 +3498,11 @@ class PosthogApp(APIApplication):
3715
3498
  request_body = {k: v for k, v in request_body.items() if v is not None}
3716
3499
  url = f"{self.base_url}/api/projects/{project_id}/session_recordings/{id}/"
3717
3500
  query_params = {}
3718
- response = self._put(url, data=request_body, params=query_params)
3501
+ response = await self._aput(url, data=request_body, params=query_params)
3719
3502
  response.raise_for_status()
3720
3503
  return response.json()
3721
3504
 
3722
- def session_recordings_partial_update(
3505
+ async def session_recordings_partial_update(
3723
3506
  self,
3724
3507
  project_id,
3725
3508
  id,
@@ -3813,7 +3596,7 @@ class PosthogApp(APIApplication):
3813
3596
  response.raise_for_status()
3814
3597
  return response.json()
3815
3598
 
3816
- def session_recordings_destroy(self, project_id, id) -> Any:
3599
+ async def session_recordings_destroy(self, project_id, id) -> Any:
3817
3600
  """
3818
3601
  Deletes a specific session recording using the provided project ID and session recording ID.
3819
3602
 
@@ -3833,11 +3616,11 @@ class PosthogApp(APIApplication):
3833
3616
  raise ValueError("Missing required parameter 'id'")
3834
3617
  url = f"{self.base_url}/api/projects/{project_id}/session_recordings/{id}/"
3835
3618
  query_params = {}
3836
- response = self._delete(url, params=query_params)
3619
+ response = await self._adelete(url, params=query_params)
3837
3620
  response.raise_for_status()
3838
3621
  return response.json()
3839
3622
 
3840
- def session_recordings_analyze_similar_retrieve(self, project_id, id) -> Any:
3623
+ async def session_recordings_analyze_similar_retrieve(self, project_id, id) -> Any:
3841
3624
  """
3842
3625
  Analyzes a session recording for similar recordings within a specific project using the provided project ID and session recording ID.
3843
3626
 
@@ -3857,11 +3640,11 @@ class PosthogApp(APIApplication):
3857
3640
  raise ValueError("Missing required parameter 'id'")
3858
3641
  url = f"{self.base_url}/api/projects/{project_id}/session_recordings/{id}/analyze/similar/"
3859
3642
  query_params = {}
3860
- response = self._get(url, params=query_params)
3643
+ response = await self._aget(url, params=query_params)
3861
3644
  response.raise_for_status()
3862
3645
  return response.json()
3863
3646
 
3864
- def session_recordings_sharing_list(self, project_id, recording_id) -> list[Any]:
3647
+ async def session_recordings_sharing_list(self, project_id, recording_id) -> list[Any]:
3865
3648
  """
3866
3649
  Retrieves sharing details for a specific session recording within a project.
3867
3650
 
@@ -3881,11 +3664,11 @@ class PosthogApp(APIApplication):
3881
3664
  raise ValueError("Missing required parameter 'recording_id'")
3882
3665
  url = f"{self.base_url}/api/projects/{project_id}/session_recordings/{recording_id}/sharing/"
3883
3666
  query_params = {}
3884
- response = self._get(url, params=query_params)
3667
+ response = await self._aget(url, params=query_params)
3885
3668
  response.raise_for_status()
3886
3669
  return response.json()
3887
3670
 
3888
- def session_recordings_ai_regex_create(
3671
+ async def session_recordings_ai_regex_create(
3889
3672
  self,
3890
3673
  project_id,
3891
3674
  id=None,
@@ -3971,11 +3754,11 @@ class PosthogApp(APIApplication):
3971
3754
  request_body = {k: v for k, v in request_body.items() if v is not None}
3972
3755
  url = f"{self.base_url}/api/projects/{project_id}/session_recordings/ai/regex/"
3973
3756
  query_params = {}
3974
- response = self._post(url, data=request_body, params=query_params)
3757
+ response = await self._apost(url, data=request_body, params=query_params)
3975
3758
  response.raise_for_status()
3976
3759
  return response.json()
3977
3760
 
3978
- def sessions_property_definitions_retrieve(self, project_id) -> Any:
3761
+ async def sessions_property_definitions_retrieve(self, project_id) -> Any:
3979
3762
  """
3980
3763
  Retrieves property definitions associated with sessions for a specified project.
3981
3764
 
@@ -3990,15 +3773,13 @@ class PosthogApp(APIApplication):
3990
3773
  """
3991
3774
  if project_id is None:
3992
3775
  raise ValueError("Missing required parameter 'project_id'")
3993
- url = (
3994
- f"{self.base_url}/api/projects/{project_id}/sessions/property_definitions/"
3995
- )
3776
+ url = f"{self.base_url}/api/projects/{project_id}/sessions/property_definitions/"
3996
3777
  query_params = {}
3997
- response = self._get(url, params=query_params)
3778
+ response = await self._aget(url, params=query_params)
3998
3779
  response.raise_for_status()
3999
3780
  return response.json()
4000
3781
 
4001
- def sessions_values_retrieve(self, project_id) -> Any:
3782
+ async def sessions_values_retrieve(self, project_id) -> Any:
4002
3783
  """
4003
3784
  Retrieves session values for a specific project identified by its project_id.
4004
3785
 
@@ -4015,11 +3796,11 @@ class PosthogApp(APIApplication):
4015
3796
  raise ValueError("Missing required parameter 'project_id'")
4016
3797
  url = f"{self.base_url}/api/projects/{project_id}/sessions/values/"
4017
3798
  query_params = {}
4018
- response = self._get(url, params=query_params)
3799
+ response = await self._aget(url, params=query_params)
4019
3800
  response.raise_for_status()
4020
3801
  return response.json()
4021
3802
 
4022
- def subscriptions_list(self, project_id, limit=None, offset=None) -> dict[str, Any]:
3803
+ async def subscriptions_list(self, project_id, limit=None, offset=None) -> dict[str, Any]:
4023
3804
  """
4024
3805
  Retrieves a list of subscriptions for a specified project by project ID, allowing pagination through query parameters for limit and offset.
4025
3806
 
@@ -4037,14 +3818,12 @@ class PosthogApp(APIApplication):
4037
3818
  if project_id is None:
4038
3819
  raise ValueError("Missing required parameter 'project_id'")
4039
3820
  url = f"{self.base_url}/api/projects/{project_id}/subscriptions/"
4040
- query_params = {
4041
- k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
4042
- }
4043
- response = self._get(url, params=query_params)
3821
+ query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
3822
+ response = await self._aget(url, params=query_params)
4044
3823
  response.raise_for_status()
4045
3824
  return response.json()
4046
3825
 
4047
- def subscriptions_create(
3826
+ async def subscriptions_create(
4048
3827
  self,
4049
3828
  project_id,
4050
3829
  id,
@@ -4129,11 +3908,11 @@ class PosthogApp(APIApplication):
4129
3908
  request_body = {k: v for k, v in request_body.items() if v is not None}
4130
3909
  url = f"{self.base_url}/api/projects/{project_id}/subscriptions/"
4131
3910
  query_params = {}
4132
- response = self._post(url, data=request_body, params=query_params)
3911
+ response = await self._apost(url, data=request_body, params=query_params)
4133
3912
  response.raise_for_status()
4134
3913
  return response.json()
4135
3914
 
4136
- def subscriptions_retrieve(self, project_id, id) -> dict[str, Any]:
3915
+ async def subscriptions_retrieve(self, project_id, id) -> dict[str, Any]:
4137
3916
  """
4138
3917
  Retrieves details about a specific subscription within a project.
4139
3918
 
@@ -4153,11 +3932,11 @@ class PosthogApp(APIApplication):
4153
3932
  raise ValueError("Missing required parameter 'id'")
4154
3933
  url = f"{self.base_url}/api/projects/{project_id}/subscriptions/{id}/"
4155
3934
  query_params = {}
4156
- response = self._get(url, params=query_params)
3935
+ response = await self._aget(url, params=query_params)
4157
3936
  response.raise_for_status()
4158
3937
  return response.json()
4159
3938
 
4160
- def subscriptions_update(
3939
+ async def subscriptions_update(
4161
3940
  self,
4162
3941
  project_id,
4163
3942
  id,
@@ -4246,11 +4025,11 @@ class PosthogApp(APIApplication):
4246
4025
  request_body = {k: v for k, v in request_body.items() if v is not None}
4247
4026
  url = f"{self.base_url}/api/projects/{project_id}/subscriptions/{id}/"
4248
4027
  query_params = {}
4249
- response = self._put(url, data=request_body, params=query_params)
4028
+ response = await self._aput(url, data=request_body, params=query_params)
4250
4029
  response.raise_for_status()
4251
4030
  return response.json()
4252
4031
 
4253
- def subscriptions_partial_update(
4032
+ async def subscriptions_partial_update(
4254
4033
  self,
4255
4034
  project_id,
4256
4035
  id,
@@ -4343,7 +4122,7 @@ class PosthogApp(APIApplication):
4343
4122
  response.raise_for_status()
4344
4123
  return response.json()
4345
4124
 
4346
- def subscriptions_destroy(self, project_id, id) -> Any:
4125
+ async def subscriptions_destroy(self, project_id, id) -> Any:
4347
4126
  """
4348
4127
  Deletes a specific subscription associated with a project by its identifier.
4349
4128
 
@@ -4363,13 +4142,11 @@ class PosthogApp(APIApplication):
4363
4142
  raise ValueError("Missing required parameter 'id'")
4364
4143
  url = f"{self.base_url}/api/projects/{project_id}/subscriptions/{id}/"
4365
4144
  query_params = {}
4366
- response = self._delete(url, params=query_params)
4145
+ response = await self._adelete(url, params=query_params)
4367
4146
  response.raise_for_status()
4368
4147
  return response.json()
4369
4148
 
4370
- def surveys_list(
4371
- self, project_id, limit=None, offset=None, search=None
4372
- ) -> dict[str, Any]:
4149
+ async def surveys_list(self, project_id, limit=None, offset=None, search=None) -> dict[str, Any]:
4373
4150
  """
4374
4151
  Retrieves a paginated list of surveys for a specific project with optional search and pagination parameters.
4375
4152
 
@@ -4388,16 +4165,12 @@ class PosthogApp(APIApplication):
4388
4165
  if project_id is None:
4389
4166
  raise ValueError("Missing required parameter 'project_id'")
4390
4167
  url = f"{self.base_url}/api/projects/{project_id}/surveys/"
4391
- query_params = {
4392
- k: v
4393
- for k, v in [("limit", limit), ("offset", offset), ("search", search)]
4394
- if v is not None
4395
- }
4396
- response = self._get(url, params=query_params)
4168
+ query_params = {k: v for k, v in [("limit", limit), ("offset", offset), ("search", search)] if v is not None}
4169
+ response = await self._aget(url, params=query_params)
4397
4170
  response.raise_for_status()
4398
4171
  return response.json()
4399
4172
 
4400
- def surveys_create(
4173
+ async def surveys_create(
4401
4174
  self,
4402
4175
  project_id,
4403
4176
  id,
@@ -4604,11 +4377,11 @@ class PosthogApp(APIApplication):
4604
4377
  request_body = {k: v for k, v in request_body.items() if v is not None}
4605
4378
  url = f"{self.base_url}/api/projects/{project_id}/surveys/"
4606
4379
  query_params = {}
4607
- response = self._post(url, data=request_body, params=query_params)
4380
+ response = await self._apost(url, data=request_body, params=query_params)
4608
4381
  response.raise_for_status()
4609
4382
  return response.json()
4610
4383
 
4611
- def surveys_retrieve(self, project_id, id) -> dict[str, Any]:
4384
+ async def surveys_retrieve(self, project_id, id) -> dict[str, Any]:
4612
4385
  """
4613
4386
  Retrieves details for a specific survey in a project using the provided ID.
4614
4387
 
@@ -4628,11 +4401,11 @@ class PosthogApp(APIApplication):
4628
4401
  raise ValueError("Missing required parameter 'id'")
4629
4402
  url = f"{self.base_url}/api/projects/{project_id}/surveys/{id}/"
4630
4403
  query_params = {}
4631
- response = self._get(url, params=query_params)
4404
+ response = await self._aget(url, params=query_params)
4632
4405
  response.raise_for_status()
4633
4406
  return response.json()
4634
4407
 
4635
- def surveys_update(
4408
+ async def surveys_update(
4636
4409
  self,
4637
4410
  project_id,
4638
4411
  id,
@@ -4834,11 +4607,11 @@ class PosthogApp(APIApplication):
4834
4607
  request_body = {k: v for k, v in request_body.items() if v is not None}
4835
4608
  url = f"{self.base_url}/api/projects/{project_id}/surveys/{id}/"
4836
4609
  query_params = {}
4837
- response = self._put(url, data=request_body, params=query_params)
4610
+ response = await self._aput(url, data=request_body, params=query_params)
4838
4611
  response.raise_for_status()
4839
4612
  return response.json()
4840
4613
 
4841
- def surveys_partial_update(
4614
+ async def surveys_partial_update(
4842
4615
  self,
4843
4616
  project_id,
4844
4617
  id,
@@ -5053,7 +4826,7 @@ class PosthogApp(APIApplication):
5053
4826
  response.raise_for_status()
5054
4827
  return response.json()
5055
4828
 
5056
- def surveys_destroy(self, project_id, id) -> Any:
4829
+ async def surveys_destroy(self, project_id, id) -> Any:
5057
4830
  """
5058
4831
  Deletes a survey identified by `{id}` within a project specified by `{project_id}` using the HTTP DELETE method.
5059
4832
 
@@ -5073,11 +4846,11 @@ class PosthogApp(APIApplication):
5073
4846
  raise ValueError("Missing required parameter 'id'")
5074
4847
  url = f"{self.base_url}/api/projects/{project_id}/surveys/{id}/"
5075
4848
  query_params = {}
5076
- response = self._delete(url, params=query_params)
4849
+ response = await self._adelete(url, params=query_params)
5077
4850
  response.raise_for_status()
5078
4851
  return response.json()
5079
4852
 
5080
- def surveys_activity_retrieve_2(self, project_id, id) -> Any:
4853
+ async def surveys_activity_retrieve_2(self, project_id, id) -> Any:
5081
4854
  """
5082
4855
  Retrieves the activity details for a specific survey within a project.
5083
4856
 
@@ -5097,11 +4870,11 @@ class PosthogApp(APIApplication):
5097
4870
  raise ValueError("Missing required parameter 'id'")
5098
4871
  url = f"{self.base_url}/api/projects/{project_id}/surveys/{id}/activity/"
5099
4872
  query_params = {}
5100
- response = self._get(url, params=query_params)
4873
+ response = await self._aget(url, params=query_params)
5101
4874
  response.raise_for_status()
5102
4875
  return response.json()
5103
4876
 
5104
- def surveys_stats_retrieve_2(self, project_id, id) -> Any:
4877
+ async def surveys_stats_retrieve_2(self, project_id, id) -> Any:
5105
4878
  """
5106
4879
  Retrieves aggregated response statistics for a specific survey within a project.
5107
4880
 
@@ -5121,11 +4894,11 @@ class PosthogApp(APIApplication):
5121
4894
  raise ValueError("Missing required parameter 'id'")
5122
4895
  url = f"{self.base_url}/api/projects/{project_id}/surveys/{id}/stats/"
5123
4896
  query_params = {}
5124
- response = self._get(url, params=query_params)
4897
+ response = await self._aget(url, params=query_params)
5125
4898
  response.raise_for_status()
5126
4899
  return response.json()
5127
4900
 
5128
- def surveys_summarize_responses_create(
4901
+ async def surveys_summarize_responses_create(
5129
4902
  self,
5130
4903
  project_id,
5131
4904
  id,
@@ -5336,11 +5109,11 @@ class PosthogApp(APIApplication):
5336
5109
  request_body = {k: v for k, v in request_body.items() if v is not None}
5337
5110
  url = f"{self.base_url}/api/projects/{project_id}/surveys/{id}/summarize_responses/"
5338
5111
  query_params = {}
5339
- response = self._post(url, data=request_body, params=query_params)
5112
+ response = await self._apost(url, data=request_body, params=query_params)
5340
5113
  response.raise_for_status()
5341
5114
  return response.json()
5342
5115
 
5343
- def surveys_activity_retrieve(self, project_id) -> Any:
5116
+ async def surveys_activity_retrieve(self, project_id) -> Any:
5344
5117
  """
5345
5118
  Retrieves activity data for surveys associated with a specific project ID.
5346
5119
 
@@ -5357,11 +5130,11 @@ class PosthogApp(APIApplication):
5357
5130
  raise ValueError("Missing required parameter 'project_id'")
5358
5131
  url = f"{self.base_url}/api/projects/{project_id}/surveys/activity/"
5359
5132
  query_params = {}
5360
- response = self._get(url, params=query_params)
5133
+ response = await self._aget(url, params=query_params)
5361
5134
  response.raise_for_status()
5362
5135
  return response.json()
5363
5136
 
5364
- def surveys_responses_count_retrieve(self, project_id) -> Any:
5137
+ async def surveys_responses_count_retrieve(self, project_id) -> Any:
5365
5138
  """
5366
5139
  Retrieves the count of survey responses for a specified project using the project ID.
5367
5140
 
@@ -5378,11 +5151,11 @@ class PosthogApp(APIApplication):
5378
5151
  raise ValueError("Missing required parameter 'project_id'")
5379
5152
  url = f"{self.base_url}/api/projects/{project_id}/surveys/responses_count/"
5380
5153
  query_params = {}
5381
- response = self._get(url, params=query_params)
5154
+ response = await self._aget(url, params=query_params)
5382
5155
  response.raise_for_status()
5383
5156
  return response.json()
5384
5157
 
5385
- def surveys_stats_retrieve(self, project_id) -> Any:
5158
+ async def surveys_stats_retrieve(self, project_id) -> Any:
5386
5159
  """
5387
5160
  Retrieves aggregated response statistics across all surveys for a specified project, providing total counts and rates, using the "GET" method.
5388
5161
 
@@ -5399,13 +5172,11 @@ class PosthogApp(APIApplication):
5399
5172
  raise ValueError("Missing required parameter 'project_id'")
5400
5173
  url = f"{self.base_url}/api/projects/{project_id}/surveys/stats/"
5401
5174
  query_params = {}
5402
- response = self._get(url, params=query_params)
5175
+ response = await self._aget(url, params=query_params)
5403
5176
  response.raise_for_status()
5404
5177
  return response.json()
5405
5178
 
5406
- def web_experiments_list(
5407
- self, project_id, limit=None, offset=None
5408
- ) -> dict[str, Any]:
5179
+ async def web_experiments_list(self, project_id, limit=None, offset=None) -> dict[str, Any]:
5409
5180
  """
5410
5181
  Retrieves a list of web experiments for a specified project using the Optimizely Web Experimentation API, allowing for pagination via optional limit and offset parameters.
5411
5182
 
@@ -5423,16 +5194,12 @@ class PosthogApp(APIApplication):
5423
5194
  if project_id is None:
5424
5195
  raise ValueError("Missing required parameter 'project_id'")
5425
5196
  url = f"{self.base_url}/api/projects/{project_id}/web_experiments/"
5426
- query_params = {
5427
- k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
5428
- }
5429
- response = self._get(url, params=query_params)
5197
+ query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
5198
+ response = await self._aget(url, params=query_params)
5430
5199
  response.raise_for_status()
5431
5200
  return response.json()
5432
5201
 
5433
- def web_experiments_create(
5434
- self, project_id, id, name, feature_flag_key, created_at=None, variants=None
5435
- ) -> dict[str, Any]:
5202
+ async def web_experiments_create(self, project_id, id, name, feature_flag_key, created_at=None, variants=None) -> dict[str, Any]:
5436
5203
  """
5437
5204
  Creates a new web experiment within a specified project using the Optimizely Web Experimentation API and returns a successful creation status message.
5438
5205
 
@@ -5452,21 +5219,15 @@ class PosthogApp(APIApplication):
5452
5219
  """
5453
5220
  if project_id is None:
5454
5221
  raise ValueError("Missing required parameter 'project_id'")
5455
- request_body = {
5456
- "id": id,
5457
- "name": name,
5458
- "created_at": created_at,
5459
- "feature_flag_key": feature_flag_key,
5460
- "variants": variants,
5461
- }
5222
+ request_body = {"id": id, "name": name, "created_at": created_at, "feature_flag_key": feature_flag_key, "variants": variants}
5462
5223
  request_body = {k: v for k, v in request_body.items() if v is not None}
5463
5224
  url = f"{self.base_url}/api/projects/{project_id}/web_experiments/"
5464
5225
  query_params = {}
5465
- response = self._post(url, data=request_body, params=query_params)
5226
+ response = await self._apost(url, data=request_body, params=query_params)
5466
5227
  response.raise_for_status()
5467
5228
  return response.json()
5468
5229
 
5469
- def web_experiments_retrieve(self, project_id, id) -> dict[str, Any]:
5230
+ async def web_experiments_retrieve(self, project_id, id) -> dict[str, Any]:
5470
5231
  """
5471
5232
  Retrieves details about a specific web experiment defined by its ID within a specified project using the Optimizely Web Experimentation API.
5472
5233
 
@@ -5486,19 +5247,12 @@ class PosthogApp(APIApplication):
5486
5247
  raise ValueError("Missing required parameter 'id'")
5487
5248
  url = f"{self.base_url}/api/projects/{project_id}/web_experiments/{id}/"
5488
5249
  query_params = {}
5489
- response = self._get(url, params=query_params)
5250
+ response = await self._aget(url, params=query_params)
5490
5251
  response.raise_for_status()
5491
5252
  return response.json()
5492
5253
 
5493
- def web_experiments_update(
5494
- self,
5495
- project_id,
5496
- id,
5497
- id_body,
5498
- name,
5499
- feature_flag_key,
5500
- created_at=None,
5501
- variants=None,
5254
+ async def web_experiments_update(
5255
+ self, project_id, id, id_body, name, feature_flag_key, created_at=None, variants=None
5502
5256
  ) -> dict[str, Any]:
5503
5257
  """
5504
5258
  Updates a web experiment for a specified project using the provided ID and returns a success status upon completion.
@@ -5522,29 +5276,16 @@ class PosthogApp(APIApplication):
5522
5276
  raise ValueError("Missing required parameter 'project_id'")
5523
5277
  if id is None:
5524
5278
  raise ValueError("Missing required parameter 'id'")
5525
- request_body = {
5526
- "id": id_body,
5527
- "name": name,
5528
- "created_at": created_at,
5529
- "feature_flag_key": feature_flag_key,
5530
- "variants": variants,
5531
- }
5279
+ request_body = {"id": id_body, "name": name, "created_at": created_at, "feature_flag_key": feature_flag_key, "variants": variants}
5532
5280
  request_body = {k: v for k, v in request_body.items() if v is not None}
5533
5281
  url = f"{self.base_url}/api/projects/{project_id}/web_experiments/{id}/"
5534
5282
  query_params = {}
5535
- response = self._put(url, data=request_body, params=query_params)
5283
+ response = await self._aput(url, data=request_body, params=query_params)
5536
5284
  response.raise_for_status()
5537
5285
  return response.json()
5538
5286
 
5539
- def web_experiments_partial_update(
5540
- self,
5541
- project_id,
5542
- id,
5543
- id_body=None,
5544
- name=None,
5545
- created_at=None,
5546
- feature_flag_key=None,
5547
- variants=None,
5287
+ async def web_experiments_partial_update(
5288
+ self, project_id, id, id_body=None, name=None, created_at=None, feature_flag_key=None, variants=None
5548
5289
  ) -> dict[str, Any]:
5549
5290
  """
5550
5291
  Updates specific properties of a web experiment in a project using the PATCH method, returning a successful response upon modification.
@@ -5568,13 +5309,7 @@ class PosthogApp(APIApplication):
5568
5309
  raise ValueError("Missing required parameter 'project_id'")
5569
5310
  if id is None:
5570
5311
  raise ValueError("Missing required parameter 'id'")
5571
- request_body = {
5572
- "id": id_body,
5573
- "name": name,
5574
- "created_at": created_at,
5575
- "feature_flag_key": feature_flag_key,
5576
- "variants": variants,
5577
- }
5312
+ request_body = {"id": id_body, "name": name, "created_at": created_at, "feature_flag_key": feature_flag_key, "variants": variants}
5578
5313
  request_body = {k: v for k, v in request_body.items() if v is not None}
5579
5314
  url = f"{self.base_url}/api/projects/{project_id}/web_experiments/{id}/"
5580
5315
  query_params = {}
@@ -5582,7 +5317,7 @@ class PosthogApp(APIApplication):
5582
5317
  response.raise_for_status()
5583
5318
  return response.json()
5584
5319
 
5585
- def web_experiments_destroy(self, project_id, id) -> Any:
5320
+ async def web_experiments_destroy(self, project_id, id) -> Any:
5586
5321
  """
5587
5322
  Deletes a web experiment associated with a specified project using the project ID and experiment ID.
5588
5323
 
@@ -5602,11 +5337,11 @@ class PosthogApp(APIApplication):
5602
5337
  raise ValueError("Missing required parameter 'id'")
5603
5338
  url = f"{self.base_url}/api/projects/{project_id}/web_experiments/{id}/"
5604
5339
  query_params = {}
5605
- response = self._delete(url, params=query_params)
5340
+ response = await self._adelete(url, params=query_params)
5606
5341
  response.raise_for_status()
5607
5342
  return response.json()
5608
5343
 
5609
- def users_list(self, is_staff=None, limit=None, offset=None) -> dict[str, Any]:
5344
+ async def users_list(self, is_staff=None, limit=None, offset=None) -> dict[str, Any]:
5610
5345
  """
5611
5346
  Retrieves a list of user records from the system, filtered by staff status, with optional pagination using limit and offset parameters.
5612
5347
 
@@ -5622,16 +5357,12 @@ class PosthogApp(APIApplication):
5622
5357
  users, users
5623
5358
  """
5624
5359
  url = f"{self.base_url}/api/users/"
5625
- query_params = {
5626
- k: v
5627
- for k, v in [("is_staff", is_staff), ("limit", limit), ("offset", offset)]
5628
- if v is not None
5629
- }
5630
- response = self._get(url, params=query_params)
5360
+ query_params = {k: v for k, v in [("is_staff", is_staff), ("limit", limit), ("offset", offset)] if v is not None}
5361
+ response = await self._aget(url, params=query_params)
5631
5362
  response.raise_for_status()
5632
5363
  return response.json()
5633
5364
 
5634
- def users_retrieve(self, uuid) -> dict[str, Any]:
5365
+ async def users_retrieve(self, uuid) -> dict[str, Any]:
5635
5366
  """
5636
5367
  Retrieves user data for a specific user identified by the provided UUID using the GET method.
5637
5368
 
@@ -5648,11 +5379,11 @@ class PosthogApp(APIApplication):
5648
5379
  raise ValueError("Missing required parameter 'uuid'")
5649
5380
  url = f"{self.base_url}/api/users/{uuid}/"
5650
5381
  query_params = {}
5651
- response = self._get(url, params=query_params)
5382
+ response = await self._aget(url, params=query_params)
5652
5383
  response.raise_for_status()
5653
5384
  return response.json()
5654
5385
 
5655
- def users_update(
5386
+ async def users_update(
5656
5387
  self,
5657
5388
  uuid,
5658
5389
  date_joined,
@@ -5775,11 +5506,11 @@ class PosthogApp(APIApplication):
5775
5506
  request_body = {k: v for k, v in request_body.items() if v is not None}
5776
5507
  url = f"{self.base_url}/api/users/{uuid}/"
5777
5508
  query_params = {}
5778
- response = self._put(url, data=request_body, params=query_params)
5509
+ response = await self._aput(url, data=request_body, params=query_params)
5779
5510
  response.raise_for_status()
5780
5511
  return response.json()
5781
5512
 
5782
- def users_partial_update(
5513
+ async def users_partial_update(
5783
5514
  self,
5784
5515
  uuid,
5785
5516
  date_joined=None,
@@ -5906,7 +5637,7 @@ class PosthogApp(APIApplication):
5906
5637
  response.raise_for_status()
5907
5638
  return response.json()
5908
5639
 
5909
- def users_hedgehog_config_retrieve(self, uuid) -> Any:
5640
+ async def users_hedgehog_config_retrieve(self, uuid) -> Any:
5910
5641
  """
5911
5642
  Retrieves the hedgehog configuration for a user identified by the specified UUID.
5912
5643
 
@@ -5923,11 +5654,11 @@ class PosthogApp(APIApplication):
5923
5654
  raise ValueError("Missing required parameter 'uuid'")
5924
5655
  url = f"{self.base_url}/api/users/{uuid}/hedgehog_config/"
5925
5656
  query_params = {}
5926
- response = self._get(url, params=query_params)
5657
+ response = await self._aget(url, params=query_params)
5927
5658
  response.raise_for_status()
5928
5659
  return response.json()
5929
5660
 
5930
- def users_hedgehog_config_partial_update(
5661
+ async def users_hedgehog_config_partial_update(
5931
5662
  self,
5932
5663
  uuid,
5933
5664
  date_joined=None,
@@ -6054,7 +5785,7 @@ class PosthogApp(APIApplication):
6054
5785
  response.raise_for_status()
6055
5786
  return response.json()
6056
5787
 
6057
- def users_scene_personalisation_create(
5788
+ async def users_scene_personalisation_create(
6058
5789
  self,
6059
5790
  uuid,
6060
5791
  date_joined,
@@ -6177,11 +5908,11 @@ class PosthogApp(APIApplication):
6177
5908
  request_body = {k: v for k, v in request_body.items() if v is not None}
6178
5909
  url = f"{self.base_url}/api/users/{uuid}/scene_personalisation/"
6179
5910
  query_params = {}
6180
- response = self._post(url, data=request_body, params=query_params)
5911
+ response = await self._apost(url, data=request_body, params=query_params)
6181
5912
  response.raise_for_status()
6182
5913
  return response.json()
6183
5914
 
6184
- def users_start_2fa_setup_retrieve(self, uuid) -> Any:
5915
+ async def users_start_2fa_setup_retrieve(self, uuid) -> Any:
6185
5916
  """
6186
5917
  Starts the setup process for two-factor authentication (2FA) for a user identified by their UUID.
6187
5918
 
@@ -6198,11 +5929,11 @@ class PosthogApp(APIApplication):
6198
5929
  raise ValueError("Missing required parameter 'uuid'")
6199
5930
  url = f"{self.base_url}/api/users/{uuid}/start_2fa_setup/"
6200
5931
  query_params = {}
6201
- response = self._get(url, params=query_params)
5932
+ response = await self._aget(url, params=query_params)
6202
5933
  response.raise_for_status()
6203
5934
  return response.json()
6204
5935
 
6205
- def users_two_factor_backup_codes_create(
5936
+ async def users_two_factor_backup_codes_create(
6206
5937
  self,
6207
5938
  uuid,
6208
5939
  date_joined,
@@ -6325,11 +6056,11 @@ class PosthogApp(APIApplication):
6325
6056
  request_body = {k: v for k, v in request_body.items() if v is not None}
6326
6057
  url = f"{self.base_url}/api/users/{uuid}/two_factor_backup_codes/"
6327
6058
  query_params = {}
6328
- response = self._post(url, data=request_body, params=query_params)
6059
+ response = await self._apost(url, data=request_body, params=query_params)
6329
6060
  response.raise_for_status()
6330
6061
  return response.json()
6331
6062
 
6332
- def users_two_factor_disable_create(
6063
+ async def users_two_factor_disable_create(
6333
6064
  self,
6334
6065
  uuid,
6335
6066
  date_joined,
@@ -6452,11 +6183,11 @@ class PosthogApp(APIApplication):
6452
6183
  request_body = {k: v for k, v in request_body.items() if v is not None}
6453
6184
  url = f"{self.base_url}/api/users/{uuid}/two_factor_disable/"
6454
6185
  query_params = {}
6455
- response = self._post(url, data=request_body, params=query_params)
6186
+ response = await self._apost(url, data=request_body, params=query_params)
6456
6187
  response.raise_for_status()
6457
6188
  return response.json()
6458
6189
 
6459
- def users_two_factor_start_setup_retrieve(self, uuid) -> Any:
6190
+ async def users_two_factor_start_setup_retrieve(self, uuid) -> Any:
6460
6191
  """
6461
6192
  Initiates two-factor authentication setup for a user identified by their UUID, facilitating an additional security layer beyond the primary login credentials.
6462
6193
 
@@ -6473,11 +6204,11 @@ class PosthogApp(APIApplication):
6473
6204
  raise ValueError("Missing required parameter 'uuid'")
6474
6205
  url = f"{self.base_url}/api/users/{uuid}/two_factor_start_setup/"
6475
6206
  query_params = {}
6476
- response = self._get(url, params=query_params)
6207
+ response = await self._aget(url, params=query_params)
6477
6208
  response.raise_for_status()
6478
6209
  return response.json()
6479
6210
 
6480
- def users_two_factor_status_retrieve(self, uuid) -> Any:
6211
+ async def users_two_factor_status_retrieve(self, uuid) -> Any:
6481
6212
  """
6482
6213
  Retrieves the two-factor authentication status for a user identified by the specified UUID using the GET method.
6483
6214
 
@@ -6494,11 +6225,11 @@ class PosthogApp(APIApplication):
6494
6225
  raise ValueError("Missing required parameter 'uuid'")
6495
6226
  url = f"{self.base_url}/api/users/{uuid}/two_factor_status/"
6496
6227
  query_params = {}
6497
- response = self._get(url, params=query_params)
6228
+ response = await self._aget(url, params=query_params)
6498
6229
  response.raise_for_status()
6499
6230
  return response.json()
6500
6231
 
6501
- def users_two_factor_validate_create(
6232
+ async def users_two_factor_validate_create(
6502
6233
  self,
6503
6234
  uuid,
6504
6235
  date_joined,
@@ -6621,11 +6352,11 @@ class PosthogApp(APIApplication):
6621
6352
  request_body = {k: v for k, v in request_body.items() if v is not None}
6622
6353
  url = f"{self.base_url}/api/users/{uuid}/two_factor_validate/"
6623
6354
  query_params = {}
6624
- response = self._post(url, data=request_body, params=query_params)
6355
+ response = await self._apost(url, data=request_body, params=query_params)
6625
6356
  response.raise_for_status()
6626
6357
  return response.json()
6627
6358
 
6628
- def users_validate_2fa_create(
6359
+ async def users_validate_2fa_create(
6629
6360
  self,
6630
6361
  uuid,
6631
6362
  date_joined,
@@ -6748,11 +6479,11 @@ class PosthogApp(APIApplication):
6748
6479
  request_body = {k: v for k, v in request_body.items() if v is not None}
6749
6480
  url = f"{self.base_url}/api/users/{uuid}/validate_2fa/"
6750
6481
  query_params = {}
6751
- response = self._post(url, data=request_body, params=query_params)
6482
+ response = await self._apost(url, data=request_body, params=query_params)
6752
6483
  response.raise_for_status()
6753
6484
  return response.json()
6754
6485
 
6755
- def users_request_email_verification_create(
6486
+ async def users_request_email_verification_create(
6756
6487
  self,
6757
6488
  date_joined,
6758
6489
  uuid,
@@ -6871,11 +6602,11 @@ class PosthogApp(APIApplication):
6871
6602
  request_body = {k: v for k, v in request_body.items() if v is not None}
6872
6603
  url = f"{self.base_url}/api/users/request_email_verification/"
6873
6604
  query_params = {}
6874
- response = self._post(url, data=request_body, params=query_params)
6605
+ response = await self._apost(url, data=request_body, params=query_params)
6875
6606
  response.raise_for_status()
6876
6607
  return response.json()
6877
6608
 
6878
- def users_verify_email_create(
6609
+ async def users_verify_email_create(
6879
6610
  self,
6880
6611
  date_joined,
6881
6612
  uuid,
@@ -6994,7 +6725,7 @@ class PosthogApp(APIApplication):
6994
6725
  request_body = {k: v for k, v in request_body.items() if v is not None}
6995
6726
  url = f"{self.base_url}/api/users/verify_email/"
6996
6727
  query_params = {}
6997
- response = self._post(url, data=request_body, params=query_params)
6728
+ response = await self._apost(url, data=request_body, params=query_params)
6998
6729
  response.raise_for_status()
6999
6730
  return response.json()
7000
6731