getstream 2.2.2__tar.gz → 2.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. {getstream-2.2.2 → getstream-2.3.1}/PKG-INFO +1 -1
  2. {getstream-2.2.2 → getstream-2.3.1}/getstream/chat/rest_client.py +1 -244
  3. {getstream-2.2.2 → getstream-2.3.1}/getstream/common/rest_client.py +242 -6
  4. {getstream-2.2.2 → getstream-2.3.1}/getstream/models/__init__.py +637 -51
  5. getstream-2.3.1/getstream/version.py +1 -0
  6. {getstream-2.2.2 → getstream-2.3.1}/pyproject.toml +1 -1
  7. {getstream-2.2.2 → getstream-2.3.1}/tests/test_video_examples.py +6 -0
  8. {getstream-2.2.2 → getstream-2.3.1}/uv.lock +1 -1
  9. getstream-2.2.2/getstream/version.py +0 -1
  10. {getstream-2.2.2 → getstream-2.3.1}/.env.example +0 -0
  11. {getstream-2.2.2 → getstream-2.3.1}/.github/release.yml +0 -0
  12. {getstream-2.2.2 → getstream-2.3.1}/.github/workflows/ci.yml +0 -0
  13. {getstream-2.2.2 → getstream-2.3.1}/.github/workflows/initiate_release.yml +0 -0
  14. {getstream-2.2.2 → getstream-2.3.1}/.github/workflows/release-v2.yml +0 -0
  15. {getstream-2.2.2 → getstream-2.3.1}/.github/workflows/release.yml +0 -0
  16. {getstream-2.2.2 → getstream-2.3.1}/.gitignore +0 -0
  17. {getstream-2.2.2 → getstream-2.3.1}/.pre-commit-config.yaml +0 -0
  18. {getstream-2.2.2 → getstream-2.3.1}/CHANGELOG.md +0 -0
  19. {getstream-2.2.2 → getstream-2.3.1}/LICENSE.md +0 -0
  20. {getstream-2.2.2 → getstream-2.3.1}/README.md +0 -0
  21. {getstream-2.2.2 → getstream-2.3.1}/generate.sh +0 -0
  22. {getstream-2.2.2 → getstream-2.3.1}/getstream/__init__.py +0 -0
  23. {getstream-2.2.2 → getstream-2.3.1}/getstream/base.py +0 -0
  24. {getstream-2.2.2 → getstream-2.3.1}/getstream/chat/__init__.py +0 -0
  25. {getstream-2.2.2 → getstream-2.3.1}/getstream/chat/channel.py +0 -0
  26. {getstream-2.2.2 → getstream-2.3.1}/getstream/chat/client.py +0 -0
  27. {getstream-2.2.2 → getstream-2.3.1}/getstream/common/__init__.py +0 -0
  28. {getstream-2.2.2 → getstream-2.3.1}/getstream/common/client.py +0 -0
  29. {getstream-2.2.2 → getstream-2.3.1}/getstream/config.py +0 -0
  30. {getstream-2.2.2 → getstream-2.3.1}/getstream/generic.py +0 -0
  31. {getstream-2.2.2 → getstream-2.3.1}/getstream/meta.py +0 -0
  32. {getstream-2.2.2 → getstream-2.3.1}/getstream/moderation/client.py +0 -0
  33. {getstream-2.2.2 → getstream-2.3.1}/getstream/moderation/rest_client.py +0 -0
  34. {getstream-2.2.2 → getstream-2.3.1}/getstream/rate_limit.py +0 -0
  35. {getstream-2.2.2 → getstream-2.3.1}/getstream/stream.py +0 -0
  36. {getstream-2.2.2 → getstream-2.3.1}/getstream/stream_response.py +0 -0
  37. {getstream-2.2.2 → getstream-2.3.1}/getstream/utils.py +0 -0
  38. {getstream-2.2.2 → getstream-2.3.1}/getstream/video/__init__.py +0 -0
  39. {getstream-2.2.2 → getstream-2.3.1}/getstream/video/call.py +0 -0
  40. {getstream-2.2.2 → getstream-2.3.1}/getstream/video/client.py +0 -0
  41. {getstream-2.2.2 → getstream-2.3.1}/getstream/video/openai.py +0 -0
  42. {getstream-2.2.2 → getstream-2.3.1}/getstream/video/rest_client.py +0 -0
  43. {getstream-2.2.2 → getstream-2.3.1}/pytest.ini +0 -0
  44. {getstream-2.2.2 → getstream-2.3.1}/tests/__init__.py +0 -0
  45. {getstream-2.2.2 → getstream-2.3.1}/tests/base.py +0 -0
  46. {getstream-2.2.2 → getstream-2.3.1}/tests/conftest.py +0 -0
  47. {getstream-2.2.2 → getstream-2.3.1}/tests/fixtures/get_call_response.json +0 -0
  48. {getstream-2.2.2 → getstream-2.3.1}/tests/fixtures.py +0 -0
  49. {getstream-2.2.2 → getstream-2.3.1}/tests/test.env.example +0 -0
  50. {getstream-2.2.2 → getstream-2.3.1}/tests/test_api_error_remap.py +0 -0
  51. {getstream-2.2.2 → getstream-2.3.1}/tests/test_chat_integration.py +0 -0
  52. {getstream-2.2.2 → getstream-2.3.1}/tests/test_client.py +0 -0
  53. {getstream-2.2.2 → getstream-2.3.1}/tests/test_decoding.py +0 -0
  54. {getstream-2.2.2 → getstream-2.3.1}/tests/test_stream_response.py +0 -0
  55. {getstream-2.2.2 → getstream-2.3.1}/tests/test_video_integration.py +0 -0
  56. {getstream-2.2.2 → getstream-2.3.1}/tests/test_video_openai.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: getstream
3
- Version: 2.2.2
3
+ Version: 2.3.1
4
4
  Author-email: sachaarbonel <sacha.arbonel@hotmail.fr>, tbarbugli <tbarbugli@gmail.com>
5
5
  License-File: LICENSE.md
6
6
  Requires-Python: <4.0.0,>=3.9
@@ -1162,7 +1162,7 @@ class ChatRestClient(BaseClient):
1162
1162
  json=json,
1163
1163
  )
1164
1164
 
1165
- def remove_poll_vote(
1165
+ def delete_poll_vote(
1166
1166
  self, message_id: str, poll_id: str, vote_id: str, user_id: Optional[str] = None
1167
1167
  ) -> StreamResponse[PollVoteResponse]:
1168
1168
  query_params = build_query_param(user_id=user_id)
@@ -1316,249 +1316,6 @@ class ChatRestClient(BaseClient):
1316
1316
  "/api/v2/chat/moderation/unmute/channel", UnmuteResponse, json=json
1317
1317
  )
1318
1318
 
1319
- def create_poll(
1320
- self,
1321
- name: str,
1322
- allow_answers: Optional[bool] = None,
1323
- allow_user_suggested_options: Optional[bool] = None,
1324
- description: Optional[str] = None,
1325
- enforce_unique_vote: Optional[bool] = None,
1326
- id: Optional[str] = None,
1327
- is_closed: Optional[bool] = None,
1328
- max_votes_allowed: Optional[int] = None,
1329
- user_id: Optional[str] = None,
1330
- voting_visibility: Optional[str] = None,
1331
- options: Optional[List[PollOptionInput]] = None,
1332
- custom: Optional[Dict[str, object]] = None,
1333
- user: Optional[UserRequest] = None,
1334
- ) -> StreamResponse[PollResponse]:
1335
- json = build_body_dict(
1336
- name=name,
1337
- allow_answers=allow_answers,
1338
- allow_user_suggested_options=allow_user_suggested_options,
1339
- description=description,
1340
- enforce_unique_vote=enforce_unique_vote,
1341
- id=id,
1342
- is_closed=is_closed,
1343
- max_votes_allowed=max_votes_allowed,
1344
- user_id=user_id,
1345
- voting_visibility=voting_visibility,
1346
- options=options,
1347
- custom=custom,
1348
- user=user,
1349
- )
1350
-
1351
- return self.post("/api/v2/chat/polls", PollResponse, json=json)
1352
-
1353
- def update_poll(
1354
- self,
1355
- id: str,
1356
- name: str,
1357
- allow_answers: Optional[bool] = None,
1358
- allow_user_suggested_options: Optional[bool] = None,
1359
- description: Optional[str] = None,
1360
- enforce_unique_vote: Optional[bool] = None,
1361
- is_closed: Optional[bool] = None,
1362
- max_votes_allowed: Optional[int] = None,
1363
- user_id: Optional[str] = None,
1364
- voting_visibility: Optional[str] = None,
1365
- options: Optional[List[PollOptionRequest]] = None,
1366
- custom: Optional[Dict[str, object]] = None,
1367
- user: Optional[UserRequest] = None,
1368
- ) -> StreamResponse[PollResponse]:
1369
- json = build_body_dict(
1370
- id=id,
1371
- name=name,
1372
- allow_answers=allow_answers,
1373
- allow_user_suggested_options=allow_user_suggested_options,
1374
- description=description,
1375
- enforce_unique_vote=enforce_unique_vote,
1376
- is_closed=is_closed,
1377
- max_votes_allowed=max_votes_allowed,
1378
- user_id=user_id,
1379
- voting_visibility=voting_visibility,
1380
- options=options,
1381
- custom=custom,
1382
- user=user,
1383
- )
1384
-
1385
- return self.put("/api/v2/chat/polls", PollResponse, json=json)
1386
-
1387
- def query_polls(
1388
- self,
1389
- user_id: Optional[str] = None,
1390
- limit: Optional[int] = None,
1391
- next: Optional[str] = None,
1392
- prev: Optional[str] = None,
1393
- sort: Optional[List[SortParamRequest]] = None,
1394
- filter: Optional[Dict[str, object]] = None,
1395
- ) -> StreamResponse[QueryPollsResponse]:
1396
- query_params = build_query_param(user_id=user_id)
1397
- json = build_body_dict(
1398
- limit=limit, next=next, prev=prev, sort=sort, filter=filter
1399
- )
1400
-
1401
- return self.post(
1402
- "/api/v2/chat/polls/query",
1403
- QueryPollsResponse,
1404
- query_params=query_params,
1405
- json=json,
1406
- )
1407
-
1408
- def delete_poll(
1409
- self, poll_id: str, user_id: Optional[str] = None
1410
- ) -> StreamResponse[Response]:
1411
- query_params = build_query_param(user_id=user_id)
1412
- path_params = {
1413
- "poll_id": poll_id,
1414
- }
1415
-
1416
- return self.delete(
1417
- "/api/v2/chat/polls/{poll_id}",
1418
- Response,
1419
- query_params=query_params,
1420
- path_params=path_params,
1421
- )
1422
-
1423
- def get_poll(
1424
- self, poll_id: str, user_id: Optional[str] = None
1425
- ) -> StreamResponse[PollResponse]:
1426
- query_params = build_query_param(user_id=user_id)
1427
- path_params = {
1428
- "poll_id": poll_id,
1429
- }
1430
-
1431
- return self.get(
1432
- "/api/v2/chat/polls/{poll_id}",
1433
- PollResponse,
1434
- query_params=query_params,
1435
- path_params=path_params,
1436
- )
1437
-
1438
- def update_poll_partial(
1439
- self,
1440
- poll_id: str,
1441
- user_id: Optional[str] = None,
1442
- unset: Optional[List[str]] = None,
1443
- set: Optional[Dict[str, object]] = None,
1444
- user: Optional[UserRequest] = None,
1445
- ) -> StreamResponse[PollResponse]:
1446
- path_params = {
1447
- "poll_id": poll_id,
1448
- }
1449
- json = build_body_dict(user_id=user_id, unset=unset, set=set, user=user)
1450
-
1451
- return self.patch(
1452
- "/api/v2/chat/polls/{poll_id}",
1453
- PollResponse,
1454
- path_params=path_params,
1455
- json=json,
1456
- )
1457
-
1458
- def create_poll_option(
1459
- self,
1460
- poll_id: str,
1461
- text: str,
1462
- position: Optional[int] = None,
1463
- user_id: Optional[str] = None,
1464
- custom: Optional[Dict[str, object]] = None,
1465
- user: Optional[UserRequest] = None,
1466
- ) -> StreamResponse[PollOptionResponse]:
1467
- path_params = {
1468
- "poll_id": poll_id,
1469
- }
1470
- json = build_body_dict(
1471
- text=text, position=position, user_id=user_id, custom=custom, user=user
1472
- )
1473
-
1474
- return self.post(
1475
- "/api/v2/chat/polls/{poll_id}/options",
1476
- PollOptionResponse,
1477
- path_params=path_params,
1478
- json=json,
1479
- )
1480
-
1481
- def update_poll_option(
1482
- self,
1483
- poll_id: str,
1484
- id: str,
1485
- text: str,
1486
- user_id: Optional[str] = None,
1487
- custom: Optional[Dict[str, object]] = None,
1488
- user: Optional[UserRequest] = None,
1489
- ) -> StreamResponse[PollOptionResponse]:
1490
- path_params = {
1491
- "poll_id": poll_id,
1492
- }
1493
- json = build_body_dict(
1494
- id=id, text=text, user_id=user_id, custom=custom, user=user
1495
- )
1496
-
1497
- return self.put(
1498
- "/api/v2/chat/polls/{poll_id}/options",
1499
- PollOptionResponse,
1500
- path_params=path_params,
1501
- json=json,
1502
- )
1503
-
1504
- def delete_poll_option(
1505
- self, poll_id: str, option_id: str, user_id: Optional[str] = None
1506
- ) -> StreamResponse[Response]:
1507
- query_params = build_query_param(user_id=user_id)
1508
- path_params = {
1509
- "poll_id": poll_id,
1510
- "option_id": option_id,
1511
- }
1512
-
1513
- return self.delete(
1514
- "/api/v2/chat/polls/{poll_id}/options/{option_id}",
1515
- Response,
1516
- query_params=query_params,
1517
- path_params=path_params,
1518
- )
1519
-
1520
- def get_poll_option(
1521
- self, poll_id: str, option_id: str, user_id: Optional[str] = None
1522
- ) -> StreamResponse[PollOptionResponse]:
1523
- query_params = build_query_param(user_id=user_id)
1524
- path_params = {
1525
- "poll_id": poll_id,
1526
- "option_id": option_id,
1527
- }
1528
-
1529
- return self.get(
1530
- "/api/v2/chat/polls/{poll_id}/options/{option_id}",
1531
- PollOptionResponse,
1532
- query_params=query_params,
1533
- path_params=path_params,
1534
- )
1535
-
1536
- def query_poll_votes(
1537
- self,
1538
- poll_id: str,
1539
- user_id: Optional[str] = None,
1540
- limit: Optional[int] = None,
1541
- next: Optional[str] = None,
1542
- prev: Optional[str] = None,
1543
- sort: Optional[List[SortParamRequest]] = None,
1544
- filter: Optional[Dict[str, object]] = None,
1545
- ) -> StreamResponse[PollVotesResponse]:
1546
- query_params = build_query_param(user_id=user_id)
1547
- path_params = {
1548
- "poll_id": poll_id,
1549
- }
1550
- json = build_body_dict(
1551
- limit=limit, next=next, prev=prev, sort=sort, filter=filter
1552
- )
1553
-
1554
- return self.post(
1555
- "/api/v2/chat/polls/{poll_id}/votes",
1556
- PollVotesResponse,
1557
- query_params=query_params,
1558
- path_params=path_params,
1559
- json=json,
1560
- )
1561
-
1562
1319
  def update_push_notification_preferences(
1563
1320
  self, preferences: List[PushPreferenceInput]
1564
1321
  ) -> StreamResponse[UpsertPushPreferencesResponse]:
@@ -53,6 +53,7 @@ class CommonRestClient(BaseClient):
53
53
  sqs_key: Optional[str] = None,
54
54
  sqs_secret: Optional[str] = None,
55
55
  sqs_url: Optional[str] = None,
56
+ user_response_time_enabled: Optional[bool] = None,
56
57
  webhook_url: Optional[str] = None,
57
58
  allowed_flag_reasons: Optional[List[str]] = None,
58
59
  event_hooks: Optional[List[EventHook]] = None,
@@ -102,6 +103,7 @@ class CommonRestClient(BaseClient):
102
103
  sqs_key=sqs_key,
103
104
  sqs_secret=sqs_secret,
104
105
  sqs_url=sqs_url,
106
+ user_response_time_enabled=user_response_time_enabled,
105
107
  webhook_url=webhook_url,
106
108
  allowed_flag_reasons=allowed_flag_reasons,
107
109
  event_hooks=event_hooks,
@@ -412,6 +414,243 @@ class CommonRestClient(BaseClient):
412
414
  path_params=path_params,
413
415
  )
414
416
 
417
+ def create_poll(
418
+ self,
419
+ name: str,
420
+ allow_answers: Optional[bool] = None,
421
+ allow_user_suggested_options: Optional[bool] = None,
422
+ description: Optional[str] = None,
423
+ enforce_unique_vote: Optional[bool] = None,
424
+ id: Optional[str] = None,
425
+ is_closed: Optional[bool] = None,
426
+ max_votes_allowed: Optional[int] = None,
427
+ user_id: Optional[str] = None,
428
+ voting_visibility: Optional[str] = None,
429
+ options: Optional[List[PollOptionInput]] = None,
430
+ custom: Optional[Dict[str, object]] = None,
431
+ user: Optional[UserRequest] = None,
432
+ ) -> StreamResponse[PollResponse]:
433
+ json = build_body_dict(
434
+ name=name,
435
+ allow_answers=allow_answers,
436
+ allow_user_suggested_options=allow_user_suggested_options,
437
+ description=description,
438
+ enforce_unique_vote=enforce_unique_vote,
439
+ id=id,
440
+ is_closed=is_closed,
441
+ max_votes_allowed=max_votes_allowed,
442
+ user_id=user_id,
443
+ voting_visibility=voting_visibility,
444
+ options=options,
445
+ custom=custom,
446
+ user=user,
447
+ )
448
+
449
+ return self.post("/api/v2/polls", PollResponse, json=json)
450
+
451
+ def update_poll(
452
+ self,
453
+ id: str,
454
+ name: str,
455
+ allow_answers: Optional[bool] = None,
456
+ allow_user_suggested_options: Optional[bool] = None,
457
+ description: Optional[str] = None,
458
+ enforce_unique_vote: Optional[bool] = None,
459
+ is_closed: Optional[bool] = None,
460
+ max_votes_allowed: Optional[int] = None,
461
+ user_id: Optional[str] = None,
462
+ voting_visibility: Optional[str] = None,
463
+ options: Optional[List[PollOptionRequest]] = None,
464
+ custom: Optional[Dict[str, object]] = None,
465
+ user: Optional[UserRequest] = None,
466
+ ) -> StreamResponse[PollResponse]:
467
+ json = build_body_dict(
468
+ id=id,
469
+ name=name,
470
+ allow_answers=allow_answers,
471
+ allow_user_suggested_options=allow_user_suggested_options,
472
+ description=description,
473
+ enforce_unique_vote=enforce_unique_vote,
474
+ is_closed=is_closed,
475
+ max_votes_allowed=max_votes_allowed,
476
+ user_id=user_id,
477
+ voting_visibility=voting_visibility,
478
+ options=options,
479
+ custom=custom,
480
+ user=user,
481
+ )
482
+
483
+ return self.put("/api/v2/polls", PollResponse, json=json)
484
+
485
+ def query_polls(
486
+ self,
487
+ user_id: Optional[str] = None,
488
+ limit: Optional[int] = None,
489
+ next: Optional[str] = None,
490
+ prev: Optional[str] = None,
491
+ sort: Optional[List[SortParamRequest]] = None,
492
+ filter: Optional[Dict[str, object]] = None,
493
+ ) -> StreamResponse[QueryPollsResponse]:
494
+ query_params = build_query_param(user_id=user_id)
495
+ json = build_body_dict(
496
+ limit=limit, next=next, prev=prev, sort=sort, filter=filter
497
+ )
498
+
499
+ return self.post(
500
+ "/api/v2/polls/query",
501
+ QueryPollsResponse,
502
+ query_params=query_params,
503
+ json=json,
504
+ )
505
+
506
+ def delete_poll(
507
+ self, poll_id: str, user_id: Optional[str] = None
508
+ ) -> StreamResponse[Response]:
509
+ query_params = build_query_param(user_id=user_id)
510
+ path_params = {
511
+ "poll_id": poll_id,
512
+ }
513
+
514
+ return self.delete(
515
+ "/api/v2/polls/{poll_id}",
516
+ Response,
517
+ query_params=query_params,
518
+ path_params=path_params,
519
+ )
520
+
521
+ def get_poll(
522
+ self, poll_id: str, user_id: Optional[str] = None
523
+ ) -> StreamResponse[PollResponse]:
524
+ query_params = build_query_param(user_id=user_id)
525
+ path_params = {
526
+ "poll_id": poll_id,
527
+ }
528
+
529
+ return self.get(
530
+ "/api/v2/polls/{poll_id}",
531
+ PollResponse,
532
+ query_params=query_params,
533
+ path_params=path_params,
534
+ )
535
+
536
+ def update_poll_partial(
537
+ self,
538
+ poll_id: str,
539
+ user_id: Optional[str] = None,
540
+ unset: Optional[List[str]] = None,
541
+ set: Optional[Dict[str, object]] = None,
542
+ user: Optional[UserRequest] = None,
543
+ ) -> StreamResponse[PollResponse]:
544
+ path_params = {
545
+ "poll_id": poll_id,
546
+ }
547
+ json = build_body_dict(user_id=user_id, unset=unset, set=set, user=user)
548
+
549
+ return self.patch(
550
+ "/api/v2/polls/{poll_id}", PollResponse, path_params=path_params, json=json
551
+ )
552
+
553
+ def create_poll_option(
554
+ self,
555
+ poll_id: str,
556
+ text: str,
557
+ user_id: Optional[str] = None,
558
+ custom: Optional[Dict[str, object]] = None,
559
+ user: Optional[UserRequest] = None,
560
+ ) -> StreamResponse[PollOptionResponse]:
561
+ path_params = {
562
+ "poll_id": poll_id,
563
+ }
564
+ json = build_body_dict(text=text, user_id=user_id, custom=custom, user=user)
565
+
566
+ return self.post(
567
+ "/api/v2/polls/{poll_id}/options",
568
+ PollOptionResponse,
569
+ path_params=path_params,
570
+ json=json,
571
+ )
572
+
573
+ def update_poll_option(
574
+ self,
575
+ poll_id: str,
576
+ id: str,
577
+ text: str,
578
+ user_id: Optional[str] = None,
579
+ custom: Optional[Dict[str, object]] = None,
580
+ user: Optional[UserRequest] = None,
581
+ ) -> StreamResponse[PollOptionResponse]:
582
+ path_params = {
583
+ "poll_id": poll_id,
584
+ }
585
+ json = build_body_dict(
586
+ id=id, text=text, user_id=user_id, custom=custom, user=user
587
+ )
588
+
589
+ return self.put(
590
+ "/api/v2/polls/{poll_id}/options",
591
+ PollOptionResponse,
592
+ path_params=path_params,
593
+ json=json,
594
+ )
595
+
596
+ def delete_poll_option(
597
+ self, poll_id: str, option_id: str, user_id: Optional[str] = None
598
+ ) -> StreamResponse[Response]:
599
+ query_params = build_query_param(user_id=user_id)
600
+ path_params = {
601
+ "poll_id": poll_id,
602
+ "option_id": option_id,
603
+ }
604
+
605
+ return self.delete(
606
+ "/api/v2/polls/{poll_id}/options/{option_id}",
607
+ Response,
608
+ query_params=query_params,
609
+ path_params=path_params,
610
+ )
611
+
612
+ def get_poll_option(
613
+ self, poll_id: str, option_id: str, user_id: Optional[str] = None
614
+ ) -> StreamResponse[PollOptionResponse]:
615
+ query_params = build_query_param(user_id=user_id)
616
+ path_params = {
617
+ "poll_id": poll_id,
618
+ "option_id": option_id,
619
+ }
620
+
621
+ return self.get(
622
+ "/api/v2/polls/{poll_id}/options/{option_id}",
623
+ PollOptionResponse,
624
+ query_params=query_params,
625
+ path_params=path_params,
626
+ )
627
+
628
+ def query_poll_votes(
629
+ self,
630
+ poll_id: str,
631
+ user_id: Optional[str] = None,
632
+ limit: Optional[int] = None,
633
+ next: Optional[str] = None,
634
+ prev: Optional[str] = None,
635
+ sort: Optional[List[SortParamRequest]] = None,
636
+ filter: Optional[Dict[str, object]] = None,
637
+ ) -> StreamResponse[PollVotesResponse]:
638
+ query_params = build_query_param(user_id=user_id)
639
+ path_params = {
640
+ "poll_id": poll_id,
641
+ }
642
+ json = build_body_dict(
643
+ limit=limit, next=next, prev=prev, sort=sort, filter=filter
644
+ )
645
+
646
+ return self.post(
647
+ "/api/v2/polls/{poll_id}/votes",
648
+ PollVotesResponse,
649
+ query_params=query_params,
650
+ path_params=path_params,
651
+ json=json,
652
+ )
653
+
415
654
  def list_push_providers(self) -> StreamResponse[ListPushProvidersResponse]:
416
655
  return self.get("/api/v2/push_providers", ListPushProvidersResponse)
417
656
 
@@ -566,6 +805,7 @@ class CommonRestClient(BaseClient):
566
805
  user_ids: List[str],
567
806
  calls: Optional[str] = None,
568
807
  conversations: Optional[str] = None,
808
+ files: Optional[bool] = None,
569
809
  messages: Optional[str] = None,
570
810
  new_call_owner_id: Optional[str] = None,
571
811
  new_channel_owner_id: Optional[str] = None,
@@ -575,6 +815,7 @@ class CommonRestClient(BaseClient):
575
815
  user_ids=user_ids,
576
816
  calls=calls,
577
817
  conversations=conversations,
818
+ files=files,
578
819
  messages=messages,
579
820
  new_call_owner_id=new_call_owner_id,
580
821
  new_channel_owner_id=new_channel_owner_id,
@@ -596,7 +837,6 @@ class CommonRestClient(BaseClient):
596
837
 
597
838
  def update_live_location(
598
839
  self,
599
- created_by_device_id: str,
600
840
  message_id: str,
601
841
  end_at: Optional[datetime] = None,
602
842
  latitude: Optional[float] = None,
@@ -605,11 +845,7 @@ class CommonRestClient(BaseClient):
605
845
  ) -> StreamResponse[SharedLocationResponse]:
606
846
  query_params = build_query_param(user_id=user_id)
607
847
  json = build_body_dict(
608
- created_by_device_id=created_by_device_id,
609
- message_id=message_id,
610
- end_at=end_at,
611
- latitude=latitude,
612
- longitude=longitude,
848
+ message_id=message_id, end_at=end_at, latitude=latitude, longitude=longitude
613
849
  )
614
850
 
615
851
  return self.put(