pangea-sdk 3.8.0__py3-none-any.whl → 5.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. pangea/__init__.py +2 -1
  2. pangea/asyncio/__init__.py +1 -0
  3. pangea/asyncio/file_uploader.py +39 -0
  4. pangea/asyncio/request.py +46 -23
  5. pangea/asyncio/services/__init__.py +2 -0
  6. pangea/asyncio/services/audit.py +46 -20
  7. pangea/asyncio/services/authn.py +123 -61
  8. pangea/asyncio/services/authz.py +57 -31
  9. pangea/asyncio/services/base.py +21 -2
  10. pangea/asyncio/services/embargo.py +2 -2
  11. pangea/asyncio/services/file_scan.py +24 -9
  12. pangea/asyncio/services/intel.py +104 -30
  13. pangea/asyncio/services/redact.py +52 -3
  14. pangea/asyncio/services/sanitize.py +217 -0
  15. pangea/asyncio/services/share.py +733 -0
  16. pangea/asyncio/services/vault.py +1709 -766
  17. pangea/crypto/rsa.py +135 -0
  18. pangea/deep_verify.py +7 -1
  19. pangea/dump_audit.py +9 -8
  20. pangea/file_uploader.py +35 -0
  21. pangea/request.py +70 -49
  22. pangea/response.py +36 -17
  23. pangea/services/__init__.py +2 -0
  24. pangea/services/audit/audit.py +57 -29
  25. pangea/services/audit/models.py +12 -3
  26. pangea/services/audit/signing.py +6 -5
  27. pangea/services/audit/util.py +3 -3
  28. pangea/services/authn/authn.py +120 -66
  29. pangea/services/authn/models.py +167 -11
  30. pangea/services/authz.py +53 -30
  31. pangea/services/base.py +16 -2
  32. pangea/services/embargo.py +2 -2
  33. pangea/services/file_scan.py +32 -15
  34. pangea/services/intel.py +155 -30
  35. pangea/services/redact.py +132 -3
  36. pangea/services/sanitize.py +388 -0
  37. pangea/services/share/file_format.py +170 -0
  38. pangea/services/share/share.py +1440 -0
  39. pangea/services/vault/models/asymmetric.py +120 -18
  40. pangea/services/vault/models/common.py +439 -141
  41. pangea/services/vault/models/keys.py +94 -0
  42. pangea/services/vault/models/secret.py +27 -3
  43. pangea/services/vault/models/symmetric.py +68 -22
  44. pangea/services/vault/vault.py +1690 -766
  45. pangea/tools.py +6 -7
  46. pangea/utils.py +94 -33
  47. pangea/verify_audit.py +270 -83
  48. {pangea_sdk-3.8.0.dist-info → pangea_sdk-5.3.0.dist-info}/METADATA +21 -29
  49. pangea_sdk-5.3.0.dist-info/RECORD +56 -0
  50. {pangea_sdk-3.8.0.dist-info → pangea_sdk-5.3.0.dist-info}/WHEEL +1 -1
  51. pangea_sdk-3.8.0.dist-info/RECORD +0 -46
@@ -7,7 +7,7 @@ from typing import Dict, List, Optional, Union
7
7
  import pangea.services.authn.models as m
8
8
  from pangea.asyncio.services.base import ServiceBaseAsync
9
9
  from pangea.config import PangeaConfig
10
- from pangea.response import PangeaResponse
10
+ from pangea.response import PangeaResponse, PangeaResponseResult
11
11
 
12
12
  SERVICE_NAME = "authn"
13
13
 
@@ -25,14 +25,14 @@ class AuthNAsync(ServiceBaseAsync):
25
25
  import os
26
26
 
27
27
  # Pangea SDK
28
+ from pangea.asyncio.services import AuthNAsync
28
29
  from pangea.config import PangeaConfig
29
- from pangea.services import AuthN
30
30
 
31
31
  PANGEA_TOKEN = os.getenv("PANGEA_AUTHN_TOKEN")
32
32
  authn_config = PangeaConfig(domain="pangea.cloud")
33
33
 
34
34
  # Setup Pangea AuthN service
35
- authn = AuthN(token=PANGEA_TOKEN, config=authn_config)
35
+ authn = AuthNAsync(token=PANGEA_TOKEN, config=authn_config)
36
36
  """
37
37
 
38
38
  service_name = SERVICE_NAME
@@ -96,7 +96,7 @@ class AuthNAsync(ServiceBaseAsync):
96
96
  """
97
97
  input = m.SessionInvalidateRequest(session_id=session_id)
98
98
  return await self.request.post(
99
- "v2/session/invalidate", m.SessionInvalidateResult, data=input.dict(exclude_none=True)
99
+ "v2/session/invalidate", m.SessionInvalidateResult, data=input.model_dump(exclude_none=True)
100
100
  )
101
101
 
102
102
  async def list(
@@ -133,7 +133,9 @@ class AuthNAsync(ServiceBaseAsync):
133
133
  filter = m.SessionListFilter(**filter)
134
134
 
135
135
  input = m.SessionListRequest(filter=filter, last=last, order=order, order_by=order_by, size=size)
136
- return await self.request.post("v2/session/list", m.SessionListResults, data=input.dict(exclude_none=True))
136
+ return await self.request.post(
137
+ "v2/session/list", m.SessionListResults, data=input.model_dump(exclude_none=True)
138
+ )
137
139
 
138
140
  async def logout(self, user_id: str) -> PangeaResponse[m.SessionLogoutResult]:
139
141
  """
@@ -156,7 +158,7 @@ class AuthNAsync(ServiceBaseAsync):
156
158
  """
157
159
  input = m.SessionLogoutRequest(user_id=user_id)
158
160
  return await self.request.post(
159
- "v2/session/logout", m.SessionLogoutResult, data=input.dict(exclude_none=True)
161
+ "v2/session/logout", m.SessionLogoutResult, data=input.model_dump(exclude_none=True)
160
162
  )
161
163
 
162
164
  class ClientAsync(ServiceBaseAsync):
@@ -196,7 +198,7 @@ class AuthNAsync(ServiceBaseAsync):
196
198
  """
197
199
  input = m.ClientUserinfoRequest(code=code)
198
200
  return await self.request.post(
199
- "v2/client/userinfo", m.ClientUserinfoResult, data=input.dict(exclude_none=True)
201
+ "v2/client/userinfo", m.ClientUserinfoResult, data=input.model_dump(exclude_none=True)
200
202
  )
201
203
 
202
204
  async def jwks(
@@ -253,7 +255,9 @@ class AuthNAsync(ServiceBaseAsync):
253
255
  """
254
256
  input = m.ClientSessionInvalidateRequest(token=token, session_id=session_id)
255
257
  return await self.request.post(
256
- "v2/client/session/invalidate", m.ClientSessionInvalidateResult, data=input.dict(exclude_none=True)
258
+ "v2/client/session/invalidate",
259
+ m.ClientSessionInvalidateResult,
260
+ data=input.model_dump(exclude_none=True),
257
261
  )
258
262
 
259
263
  async def list(
@@ -297,7 +301,7 @@ class AuthNAsync(ServiceBaseAsync):
297
301
  token=token, filter=filter, last=last, order=order, order_by=order_by, size=size
298
302
  )
299
303
  return await self.request.post(
300
- "v2/client/session/list", m.ClientSessionListResults, data=input.dict(exclude_none=True)
304
+ "v2/client/session/list", m.ClientSessionListResults, data=input.model_dump(exclude_none=True)
301
305
  )
302
306
 
303
307
  async def logout(self, token: str) -> PangeaResponse[m.ClientSessionLogoutResult]:
@@ -321,7 +325,7 @@ class AuthNAsync(ServiceBaseAsync):
321
325
  """
322
326
  input = m.ClientSessionLogoutRequest(token=token)
323
327
  return await self.request.post(
324
- "v2/client/session/logout", m.ClientSessionLogoutResult, data=input.dict(exclude_none=True)
328
+ "v2/client/session/logout", m.ClientSessionLogoutResult, data=input.model_dump(exclude_none=True)
325
329
  )
326
330
 
327
331
  async def refresh(
@@ -351,7 +355,7 @@ class AuthNAsync(ServiceBaseAsync):
351
355
  """
352
356
  input = m.ClientSessionRefreshRequest(refresh_token=refresh_token, user_token=user_token)
353
357
  return await self.request.post(
354
- "v2/client/session/refresh", m.ClientSessionRefreshResult, data=input.dict(exclude_none=True)
358
+ "v2/client/session/refresh", m.ClientSessionRefreshResult, data=input.model_dump(exclude_none=True)
355
359
  )
356
360
 
357
361
  class PasswordAsync(ServiceBaseAsync):
@@ -392,9 +396,28 @@ class AuthNAsync(ServiceBaseAsync):
392
396
  """
393
397
  input = m.ClientPasswordChangeRequest(token=token, old_password=old_password, new_password=new_password)
394
398
  return await self.request.post(
395
- "v2/client/password/change", m.ClientPasswordChangeResult, data=input.dict(exclude_none=True)
399
+ "v2/client/password/change", m.ClientPasswordChangeResult, data=input.model_dump(exclude_none=True)
396
400
  )
397
401
 
402
+ async def expire(self, user_id: str) -> PangeaResponse[PangeaResponseResult]:
403
+ """
404
+ Expire a user's password
405
+
406
+ Expire a user's password.
407
+
408
+ OperationId: authn_post_v2_user_password_expire
409
+
410
+ Args:
411
+ user_id: The identity of a user or a service.
412
+
413
+ Returns:
414
+ A PangeaResponse with an empty object in the response.result field.
415
+
416
+ Examples:
417
+ await authn.client.password.expire("pui_[...]")
418
+ """
419
+ return await self.request.post("v2/user/password/expire", PangeaResponseResult, {"id": user_id})
420
+
398
421
  class TokenAsync(ServiceBaseAsync):
399
422
  service_name = SERVICE_NAME
400
423
 
@@ -429,7 +452,7 @@ class AuthNAsync(ServiceBaseAsync):
429
452
  """
430
453
  input = m.ClientTokenCheckRequest(token=token)
431
454
  return await self.request.post(
432
- "v2/client/token/check", m.ClientTokenCheckResult, data=input.dict(exclude_none=True)
455
+ "v2/client/token/check", m.ClientTokenCheckResult, data=input.model_dump(exclude_none=True)
433
456
  )
434
457
 
435
458
  class UserAsync(ServiceBaseAsync):
@@ -450,6 +473,8 @@ class AuthNAsync(ServiceBaseAsync):
450
473
  self,
451
474
  email: str,
452
475
  profile: m.Profile,
476
+ *,
477
+ username: str | None = None,
453
478
  ) -> PangeaResponse[m.UserCreateResult]:
454
479
  """
455
480
  Create User
@@ -459,8 +484,9 @@ class AuthNAsync(ServiceBaseAsync):
459
484
  OperationId: authn_post_v2_user_create
460
485
 
461
486
  Args:
462
- email (str): An email address
463
- profile (m.Profile): A user profile as a collection of string properties
487
+ email: An email address.
488
+ profile: A user profile as a collection of string properties.
489
+ username: A username.
464
490
 
465
491
  Returns:
466
492
  A PangeaResponse with a user and its information in the response.result field.
@@ -479,11 +505,14 @@ class AuthNAsync(ServiceBaseAsync):
479
505
  input = m.UserCreateRequest(
480
506
  email=email,
481
507
  profile=profile,
508
+ username=username,
509
+ )
510
+ return await self.request.post(
511
+ "v2/user/create", m.UserCreateResult, data=input.model_dump(exclude_none=True)
482
512
  )
483
- return await self.request.post("v2/user/create", m.UserCreateResult, data=input.dict(exclude_none=True))
484
513
 
485
514
  async def delete(
486
- self, email: Optional[str] = None, id: Optional[str] = None
515
+ self, email: str | None = None, id: str | None = None, *, username: str | None = None
487
516
  ) -> PangeaResponse[m.UserDeleteResult]:
488
517
  """
489
518
  Delete User
@@ -493,8 +522,9 @@ class AuthNAsync(ServiceBaseAsync):
493
522
  OperationId: authn_post_v2_user_delete
494
523
 
495
524
  Args:
496
- email (str, optional): An email address
497
- id (str, optional): The id of a user or a service
525
+ email: An email address.
526
+ id: The id of a user or a service.
527
+ username: A username.
498
528
 
499
529
  Returns:
500
530
  A PangeaResponse with an empty object in the response.result field.
@@ -502,8 +532,10 @@ class AuthNAsync(ServiceBaseAsync):
502
532
  Examples:
503
533
  authn.user.delete(email="example@example.com")
504
534
  """
505
- input = m.UserDeleteRequest(email=email, id=id)
506
- return await self.request.post("v2/user/delete", m.UserDeleteResult, data=input.dict(exclude_none=True))
535
+ input = m.UserDeleteRequest(email=email, id=id, username=username)
536
+ return await self.request.post(
537
+ "v2/user/delete", m.UserDeleteResult, data=input.model_dump(exclude_none=True)
538
+ )
507
539
 
508
540
  async def invite(
509
541
  self,
@@ -544,13 +576,17 @@ class AuthNAsync(ServiceBaseAsync):
544
576
  callback=callback,
545
577
  state=state,
546
578
  )
547
- return await self.request.post("v2/user/invite", m.UserInviteResult, data=input.dict(exclude_none=True))
579
+ return await self.request.post(
580
+ "v2/user/invite", m.UserInviteResult, data=input.model_dump(exclude_none=True)
581
+ )
548
582
 
549
583
  async def update(
550
584
  self,
551
585
  disabled: bool,
552
- id: Optional[str] = None,
553
- email: Optional[str] = None,
586
+ id: str | None = None,
587
+ email: str | None = None,
588
+ *,
589
+ username: str | None = None,
554
590
  ) -> PangeaResponse[m.UserUpdateResult]:
555
591
  """
556
592
  Update user's settings
@@ -560,10 +596,11 @@ class AuthNAsync(ServiceBaseAsync):
560
596
  OperationId: authn_post_v2_user_update
561
597
 
562
598
  Args:
563
- disabled (bool): New disabled value.
599
+ disabled: New disabled value.
564
600
  Disabling a user account will prevent them from logging in.
565
- id (str, optional): The identity of a user or a service
566
- email (str, optional): An email address
601
+ id: The identity of a user or a service.
602
+ email: An email address.
603
+ username: A username.
567
604
 
568
605
  Returns:
569
606
  A PangeaResponse with a user and its information in the response.result field.
@@ -580,9 +617,12 @@ class AuthNAsync(ServiceBaseAsync):
580
617
  id=id,
581
618
  email=email,
582
619
  disabled=disabled,
620
+ username=username,
583
621
  )
584
622
 
585
- return await self.request.post("v2/user/update", m.UserUpdateResult, data=input.dict(exclude_none=True))
623
+ return await self.request.post(
624
+ "v2/user/update", m.UserUpdateResult, data=input.model_dump(exclude_none=True)
625
+ )
586
626
 
587
627
  async def list(
588
628
  self,
@@ -624,7 +664,7 @@ class AuthNAsync(ServiceBaseAsync):
624
664
  order_by=order_by,
625
665
  size=size,
626
666
  )
627
- return await self.request.post("v2/user/list", m.UserListResult, data=input.dict(exclude_none=True))
667
+ return await self.request.post("v2/user/list", m.UserListResult, data=input.model_dump(exclude_none=True))
628
668
 
629
669
  class InvitesAsync(ServiceBaseAsync):
630
670
  service_name = SERVICE_NAME
@@ -671,7 +711,7 @@ class AuthNAsync(ServiceBaseAsync):
671
711
 
672
712
  input = m.UserInviteListRequest(filter=filter, last=last, order=order, order_by=order_by, size=size)
673
713
  return await self.request.post(
674
- "v2/user/invite/list", m.UserInviteListResult, data=input.dict(exclude_none=True)
714
+ "v2/user/invite/list", m.UserInviteListResult, data=input.model_dump(exclude_none=True)
675
715
  )
676
716
 
677
717
  async def delete(self, id: str) -> PangeaResponse[m.UserInviteDeleteResult]:
@@ -695,7 +735,7 @@ class AuthNAsync(ServiceBaseAsync):
695
735
  """
696
736
  input = m.UserInviteDeleteRequest(id=id)
697
737
  return await self.request.post(
698
- "v2/user/invite/delete", m.UserInviteDeleteResult, data=input.dict(exclude_none=True)
738
+ "v2/user/invite/delete", m.UserInviteDeleteResult, data=input.model_dump(exclude_none=True)
699
739
  )
700
740
 
701
741
  class AuthenticatorsAsync(ServiceBaseAsync):
@@ -710,7 +750,12 @@ class AuthNAsync(ServiceBaseAsync):
710
750
  super().__init__(token, config, logger_name=logger_name)
711
751
 
712
752
  async def delete(
713
- self, authenticator_id: str, id: Optional[str] = None, email: Optional[str] = None
753
+ self,
754
+ authenticator_id: str,
755
+ id: str | None = None,
756
+ email: str | None = None,
757
+ *,
758
+ username: str | None = None,
714
759
  ) -> PangeaResponse[m.UserAuthenticatorsDeleteResult]:
715
760
  """
716
761
  Delete user authenticator
@@ -720,9 +765,10 @@ class AuthNAsync(ServiceBaseAsync):
720
765
  OperationId: authn_post_v2_user_authenticators_delete
721
766
 
722
767
  Args:
723
- authenticator_id (str): An ID for an authenticator
724
- id (str, optional): The identity of a user or a service
725
- email (str, optional): An email address
768
+ authenticator_id: An ID for an authenticator.
769
+ id: The identity of a user or a service.
770
+ email: An email address.
771
+ username: A username.
726
772
 
727
773
  Returns:
728
774
  A PangeaResponse with an empty object in the response.result field.
@@ -733,15 +779,17 @@ class AuthNAsync(ServiceBaseAsync):
733
779
  id="pui_xpkhwpnz2cmegsws737xbsqnmnuwtbm5",
734
780
  )
735
781
  """
736
- input = m.UserAuthenticatorsDeleteRequest(authenticator_id=authenticator_id, email=email, id=id)
782
+ input = m.UserAuthenticatorsDeleteRequest(
783
+ authenticator_id=authenticator_id, email=email, id=id, username=username
784
+ )
737
785
  return await self.request.post(
738
786
  "v2/user/authenticators/delete",
739
787
  m.UserAuthenticatorsDeleteResult,
740
- data=input.dict(exclude_none=True),
788
+ data=input.model_dump(exclude_none=True),
741
789
  )
742
790
 
743
791
  async def list(
744
- self, email: Optional[str] = None, id: Optional[str] = None
792
+ self, email: str | None = None, id: str | None = None, *, username: str | None = None
745
793
  ) -> PangeaResponse[m.UserAuthenticatorsListResult]:
746
794
  """
747
795
  Get user authenticators
@@ -751,8 +799,9 @@ class AuthNAsync(ServiceBaseAsync):
751
799
  OperationId: authn_post_v2_user_authenticators_list
752
800
 
753
801
  Args:
754
- email (str, optional): An email address
755
- id (str, optional): The identity of a user or a service
802
+ email: An email address.
803
+ id: The identity of a user or a service.
804
+ username: A username.
756
805
 
757
806
  Returns:
758
807
  A PangeaResponse with a list of authenticators in the response.result field.
@@ -764,9 +813,11 @@ class AuthNAsync(ServiceBaseAsync):
764
813
  id="pui_xpkhwpnz2cmegsws737xbsqnmnuwtbm5",
765
814
  )
766
815
  """
767
- input = m.UserAuthenticatorsListRequest(email=email, id=id)
816
+ input = m.UserAuthenticatorsListRequest(email=email, id=id, username=username)
768
817
  return await self.request.post(
769
- "v2/user/authenticators/list", m.UserAuthenticatorsListResult, data=input.dict(exclude_none=True)
818
+ "v2/user/authenticators/list",
819
+ m.UserAuthenticatorsListResult,
820
+ data=input.model_dump(exclude_none=True),
770
821
  )
771
822
 
772
823
  class ProfileAsync(ServiceBaseAsync):
@@ -781,7 +832,7 @@ class AuthNAsync(ServiceBaseAsync):
781
832
  super().__init__(token, config, logger_name=logger_name)
782
833
 
783
834
  async def get(
784
- self, id: Optional[str] = None, email: Optional[str] = None
835
+ self, id: str | None = None, email: str | None = None, *, username: str | None = None
785
836
  ) -> PangeaResponse[m.UserProfileGetResult]:
786
837
  """
787
838
  Get user
@@ -791,8 +842,9 @@ class AuthNAsync(ServiceBaseAsync):
791
842
  OperationId: authn_post_v2_user_profile_get
792
843
 
793
844
  Args:
794
- id (str, optional): The identity of a user or a service
795
- email (str, optional): An email address
845
+ id: The identity of a user or a service.
846
+ email: An email address.
847
+ username: A username.
796
848
 
797
849
  Returns:
798
850
  A PangeaResponse with a user and its information in the response.result field.
@@ -804,16 +856,18 @@ class AuthNAsync(ServiceBaseAsync):
804
856
  email="joe.user@email.com",
805
857
  )
806
858
  """
807
- input = m.UserProfileGetRequest(id=id, email=email)
859
+ input = m.UserProfileGetRequest(id=id, email=email, username=username)
808
860
  return await self.request.post(
809
- "v2/user/profile/get", m.UserProfileGetResult, data=input.dict(exclude_none=True)
861
+ "v2/user/profile/get", m.UserProfileGetResult, data=input.model_dump(exclude_none=True)
810
862
  )
811
863
 
812
864
  async def update(
813
865
  self,
814
866
  profile: m.Profile,
815
- id: Optional[str] = None,
816
- email: Optional[str] = None,
867
+ id: str | None = None,
868
+ email: str | None = None,
869
+ *,
870
+ username: str | None = None,
817
871
  ) -> PangeaResponse[m.UserProfileUpdateResult]:
818
872
  """
819
873
  Update user
@@ -823,9 +877,10 @@ class AuthNAsync(ServiceBaseAsync):
823
877
  OperationId: authn_post_v2_user_profile_update
824
878
 
825
879
  Args:
826
- profile (m.Profile): Updates to a user profile
827
- id (str, optional): The identity of a user or a service
828
- email (str, optional): An email address
880
+ profile: Updates to a user profile.
881
+ id: The identity of a user or a service.
882
+ email: An email address.
883
+ username: A username.
829
884
 
830
885
  Returns:
831
886
  A PangeaResponse with a user and its information in the response.result field.
@@ -844,9 +899,10 @@ class AuthNAsync(ServiceBaseAsync):
844
899
  id=id,
845
900
  email=email,
846
901
  profile=profile,
902
+ username=username,
847
903
  )
848
904
  return await self.request.post(
849
- "v2/user/profile/update", m.UserProfileUpdateResult, data=input.dict(exclude_none=True)
905
+ "v2/user/profile/update", m.UserProfileUpdateResult, data=input.model_dump(exclude_none=True)
850
906
  )
851
907
 
852
908
  class FlowAsync(ServiceBaseAsync):
@@ -882,7 +938,9 @@ class AuthNAsync(ServiceBaseAsync):
882
938
  )
883
939
  """
884
940
  input = m.FlowCompleteRequest(flow_id=flow_id)
885
- return await self.request.post("v2/flow/complete", m.FlowCompleteResult, data=input.dict(exclude_none=True))
941
+ return await self.request.post(
942
+ "v2/flow/complete", m.FlowCompleteResult, data=input.model_dump(exclude_none=True)
943
+ )
886
944
 
887
945
  async def restart(
888
946
  self, flow_id: str, choice: m.FlowChoice, data: m.FlowRestartData = {}
@@ -914,7 +972,9 @@ class AuthNAsync(ServiceBaseAsync):
914
972
  """
915
973
 
916
974
  input = m.FlowRestartRequest(flow_id=flow_id, choice=choice, data=data)
917
- return await self.request.post("v2/flow/restart", m.FlowRestartResult, data=input.dict(exclude_none=True))
975
+ return await self.request.post(
976
+ "v2/flow/restart", m.FlowRestartResult, data=input.model_dump(exclude_none=True)
977
+ )
918
978
 
919
979
  async def start(
920
980
  self,
@@ -953,7 +1013,7 @@ class AuthNAsync(ServiceBaseAsync):
953
1013
  )
954
1014
  """
955
1015
  input = m.FlowStartRequest(cb_uri=cb_uri, email=email, flow_types=flow_types, invitation=invitation)
956
- return await self.request.post("v2/flow/start", m.FlowStartResult, data=input.dict(exclude_none=True))
1016
+ return await self.request.post("v2/flow/start", m.FlowStartResult, data=input.model_dump(exclude_none=True))
957
1017
 
958
1018
  async def update(
959
1019
  self, flow_id: str, choice: m.FlowChoice, data: m.FlowUpdateData = {}
@@ -987,7 +1047,9 @@ class AuthNAsync(ServiceBaseAsync):
987
1047
  """
988
1048
 
989
1049
  input = m.FlowUpdateRequest(flow_id=flow_id, choice=choice, data=data)
990
- return await self.request.post("v2/flow/update", m.FlowUpdateResult, data=input.dict(exclude_none=True))
1050
+ return await self.request.post(
1051
+ "v2/flow/update", m.FlowUpdateResult, data=input.model_dump(exclude_none=True)
1052
+ )
991
1053
 
992
1054
  class AgreementsAsync(ServiceBaseAsync):
993
1055
  service_name = SERVICE_NAME
@@ -1031,7 +1093,7 @@ class AuthNAsync(ServiceBaseAsync):
1031
1093
 
1032
1094
  input = m.AgreementCreateRequest(type=type, name=name, text=text, active=active)
1033
1095
  return await self.request.post(
1034
- "v2/agreements/create", m.AgreementCreateResult, data=input.dict(exclude_none=True)
1096
+ "v2/agreements/create", m.AgreementCreateResult, data=input.model_dump(exclude_none=True)
1035
1097
  )
1036
1098
 
1037
1099
  async def delete(self, type: m.AgreementType, id: str) -> PangeaResponse[m.AgreementDeleteResult]:
@@ -1058,7 +1120,7 @@ class AuthNAsync(ServiceBaseAsync):
1058
1120
 
1059
1121
  input = m.AgreementDeleteRequest(type=type, id=id)
1060
1122
  return await self.request.post(
1061
- "v2/agreements/delete", m.AgreementDeleteResult, data=input.dict(exclude_none=True)
1123
+ "v2/agreements/delete", m.AgreementDeleteResult, data=input.model_dump(exclude_none=True)
1062
1124
  )
1063
1125
 
1064
1126
  async def list(
@@ -1096,7 +1158,7 @@ class AuthNAsync(ServiceBaseAsync):
1096
1158
 
1097
1159
  input = m.AgreementListRequest(filter=filter, last=last, order=order, order_by=order_by, size=size)
1098
1160
  return await self.request.post(
1099
- "v2/agreements/list", m.AgreementListResult, data=input.dict(exclude_none=True)
1161
+ "v2/agreements/list", m.AgreementListResult, data=input.model_dump(exclude_none=True)
1100
1162
  )
1101
1163
 
1102
1164
  async def update(
@@ -1137,5 +1199,5 @@ class AuthNAsync(ServiceBaseAsync):
1137
1199
 
1138
1200
  input = m.AgreementUpdateRequest(type=type, id=id, name=name, text=text, active=active)
1139
1201
  return await self.request.post(
1140
- "v2/agreements/update", m.AgreementUpdateResult, data=input.dict(exclude_none=True)
1202
+ "v2/agreements/update", m.AgreementUpdateResult, data=input.model_dump(exclude_none=True)
1141
1203
  )