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

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -6,7 +6,7 @@ from typing import Dict, List, Optional, Union
6
6
 
7
7
  import pangea.services.authn.models as m
8
8
  from pangea.config import PangeaConfig
9
- from pangea.response import PangeaResponse
9
+ from pangea.response import PangeaResponse, PangeaResponseResult
10
10
  from pangea.services.base import ServiceBase
11
11
 
12
12
  SERVICE_NAME = "authn"
@@ -96,7 +96,7 @@ class AuthN(ServiceBase):
96
96
  """
97
97
  input = m.SessionInvalidateRequest(session_id=session_id)
98
98
  return 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
  def list(
@@ -134,7 +134,7 @@ class AuthN(ServiceBase):
134
134
  filter = m.SessionListFilter(**filter)
135
135
 
136
136
  input = m.SessionListRequest(filter=filter, last=last, order=order, order_by=order_by, size=size)
137
- return self.request.post("v2/session/list", m.SessionListResults, data=input.dict(exclude_none=True))
137
+ return self.request.post("v2/session/list", m.SessionListResults, data=input.model_dump(exclude_none=True))
138
138
 
139
139
  def logout(self, user_id: str) -> PangeaResponse[m.SessionLogoutResult]:
140
140
  """
@@ -156,7 +156,9 @@ class AuthN(ServiceBase):
156
156
  )
157
157
  """
158
158
  input = m.SessionLogoutRequest(user_id=user_id)
159
- return self.request.post("v2/session/logout", m.SessionLogoutResult, data=input.dict(exclude_none=True))
159
+ return self.request.post(
160
+ "v2/session/logout", m.SessionLogoutResult, data=input.model_dump(exclude_none=True)
161
+ )
160
162
 
161
163
  class Client(ServiceBase):
162
164
  service_name = SERVICE_NAME
@@ -194,7 +196,9 @@ class AuthN(ServiceBase):
194
196
  )
195
197
  """
196
198
  input = m.ClientUserinfoRequest(code=code)
197
- return self.request.post("v2/client/userinfo", m.ClientUserinfoResult, data=input.dict(exclude_none=True))
199
+ return self.request.post(
200
+ "v2/client/userinfo", m.ClientUserinfoResult, data=input.model_dump(exclude_none=True)
201
+ )
198
202
 
199
203
  def jwks(
200
204
  self,
@@ -250,7 +254,9 @@ class AuthN(ServiceBase):
250
254
  """
251
255
  input = m.ClientSessionInvalidateRequest(token=token, session_id=session_id)
252
256
  return self.request.post(
253
- "v2/client/session/invalidate", m.ClientSessionInvalidateResult, data=input.dict(exclude_none=True)
257
+ "v2/client/session/invalidate",
258
+ m.ClientSessionInvalidateResult,
259
+ data=input.model_dump(exclude_none=True),
254
260
  )
255
261
 
256
262
  def list(
@@ -295,7 +301,7 @@ class AuthN(ServiceBase):
295
301
  token=token, filter=filter, last=last, order=order, order_by=order_by, size=size
296
302
  )
297
303
  return self.request.post(
298
- "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)
299
305
  )
300
306
 
301
307
  def logout(self, token: str) -> PangeaResponse[m.ClientSessionLogoutResult]:
@@ -319,7 +325,7 @@ class AuthN(ServiceBase):
319
325
  """
320
326
  input = m.ClientSessionLogoutRequest(token=token)
321
327
  return self.request.post(
322
- "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)
323
329
  )
324
330
 
325
331
  def refresh(
@@ -349,7 +355,7 @@ class AuthN(ServiceBase):
349
355
  """
350
356
  input = m.ClientSessionRefreshRequest(refresh_token=refresh_token, user_token=user_token)
351
357
  return self.request.post(
352
- "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)
353
359
  )
354
360
 
355
361
  class Password(ServiceBase):
@@ -357,10 +363,10 @@ class AuthN(ServiceBase):
357
363
 
358
364
  def __init__(
359
365
  self,
360
- token,
361
- config=None,
362
- logger_name="pangea",
363
- ):
366
+ token: str,
367
+ config: PangeaConfig | None = None,
368
+ logger_name: str = "pangea",
369
+ ) -> None:
364
370
  super().__init__(token, config, logger_name=logger_name)
365
371
 
366
372
  def change(
@@ -390,9 +396,28 @@ class AuthN(ServiceBase):
390
396
  """
391
397
  input = m.ClientPasswordChangeRequest(token=token, old_password=old_password, new_password=new_password)
392
398
  return self.request.post(
393
- "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)
394
400
  )
395
401
 
402
+ 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
+ authn.client.password.expire("pui_[...]")
418
+ """
419
+ return self.request.post("v2/user/password/expire", PangeaResponseResult, {"id": user_id})
420
+
396
421
  class Token(ServiceBase):
397
422
  service_name = SERVICE_NAME
398
423
 
@@ -427,7 +452,7 @@ class AuthN(ServiceBase):
427
452
  """
428
453
  input = m.ClientTokenCheckRequest(token=token)
429
454
  return self.request.post(
430
- "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)
431
456
  )
432
457
 
433
458
  class User(ServiceBase):
@@ -448,6 +473,8 @@ class AuthN(ServiceBase):
448
473
  self,
449
474
  email: str,
450
475
  profile: m.Profile,
476
+ *,
477
+ username: str | None = None,
451
478
  ) -> PangeaResponse[m.UserCreateResult]:
452
479
  """
453
480
  Create User
@@ -457,8 +484,9 @@ class AuthN(ServiceBase):
457
484
  OperationId: authn_post_v2_user_create
458
485
 
459
486
  Args:
460
- email (str): An email address
461
- 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.
462
490
 
463
491
  Returns:
464
492
  A PangeaResponse with a user and its information in the response.result field.
@@ -477,10 +505,13 @@ class AuthN(ServiceBase):
477
505
  input = m.UserCreateRequest(
478
506
  email=email,
479
507
  profile=profile,
508
+ username=username,
480
509
  )
481
- return self.request.post("v2/user/create", m.UserCreateResult, data=input.dict(exclude_none=True))
510
+ return self.request.post("v2/user/create", m.UserCreateResult, data=input.model_dump(exclude_none=True))
482
511
 
483
- def delete(self, email: Optional[str] = None, id: Optional[str] = None) -> PangeaResponse[m.UserDeleteResult]:
512
+ def delete(
513
+ self, email: str | None = None, id: str | None = None, *, username: str | None = None
514
+ ) -> PangeaResponse[m.UserDeleteResult]:
484
515
  """
485
516
  Delete User
486
517
 
@@ -489,8 +520,9 @@ class AuthN(ServiceBase):
489
520
  OperationId: authn_post_v2_user_delete
490
521
 
491
522
  Args:
492
- email (str, optional): An email address
493
- id (str, optional): The id of a user or a service
523
+ email: An email address.
524
+ id: The id of a user or a service.
525
+ username: A username.
494
526
 
495
527
  Returns:
496
528
  A PangeaResponse with an empty object in the response.result field.
@@ -498,8 +530,8 @@ class AuthN(ServiceBase):
498
530
  Examples:
499
531
  authn.user.delete(email="example@example.com")
500
532
  """
501
- input = m.UserDeleteRequest(email=email, id=id)
502
- return self.request.post("v2/user/delete", m.UserDeleteResult, data=input.dict(exclude_none=True))
533
+ input = m.UserDeleteRequest(email=email, id=id, username=username)
534
+ return self.request.post("v2/user/delete", m.UserDeleteResult, data=input.model_dump(exclude_none=True))
503
535
 
504
536
  def invite(
505
537
  self,
@@ -540,14 +572,16 @@ class AuthN(ServiceBase):
540
572
  callback=callback,
541
573
  state=state,
542
574
  )
543
- return self.request.post("v2/user/invite", m.UserInviteResult, data=input.dict(exclude_none=True))
575
+ return self.request.post("v2/user/invite", m.UserInviteResult, data=input.model_dump(exclude_none=True))
544
576
 
545
577
  def update(
546
578
  self,
547
- disabled: Optional[bool] = None,
548
- id: Optional[str] = None,
549
- email: Optional[str] = None,
550
- unlock: Optional[bool] = None,
579
+ disabled: bool | None = None,
580
+ id: str | None = None,
581
+ email: str | None = None,
582
+ unlock: bool | None = None,
583
+ *,
584
+ username: str | None = None,
551
585
  ) -> PangeaResponse[m.UserUpdateResult]:
552
586
  """
553
587
  Update user's settings
@@ -557,11 +591,12 @@ class AuthN(ServiceBase):
557
591
  OperationId: authn_post_v2_user_update
558
592
 
559
593
  Args:
560
- disabled (bool): New disabled value.
594
+ disabled: New disabled value.
561
595
  Disabling a user account will prevent them from logging in.
562
- unlock (bool): Unlock a user account if it has been locked out due to failed Authentication attempts.
563
- id (str, optional): The identity of a user or a service
564
- email (str, optional): An email address
596
+ unlock: Unlock a user account if it has been locked out due to failed authentication attempts.
597
+ id: The identity of a user or a service.
598
+ email: An email address.
599
+ username: A username.
565
600
 
566
601
  Returns:
567
602
  A PangeaResponse with a user and its information in the response.result field.
@@ -579,9 +614,10 @@ class AuthN(ServiceBase):
579
614
  email=email,
580
615
  disabled=disabled,
581
616
  unlock=unlock,
617
+ username=username,
582
618
  )
583
619
 
584
- return self.request.post("v2/user/update", m.UserUpdateResult, data=input.dict(exclude_none=True))
620
+ return self.request.post("v2/user/update", m.UserUpdateResult, data=input.model_dump(exclude_none=True))
585
621
 
586
622
  def list(
587
623
  self,
@@ -624,7 +660,7 @@ class AuthN(ServiceBase):
624
660
  order_by=order_by,
625
661
  size=size,
626
662
  )
627
- return self.request.post("v2/user/list", m.UserListResult, data=input.dict(exclude_none=True))
663
+ return self.request.post("v2/user/list", m.UserListResult, data=input.model_dump(exclude_none=True))
628
664
 
629
665
  class Invites(ServiceBase):
630
666
  service_name = SERVICE_NAME
@@ -671,7 +707,7 @@ class AuthN(ServiceBase):
671
707
 
672
708
  input = m.UserInviteListRequest(filter=filter, last=last, order=order, order_by=order_by, size=size)
673
709
  return self.request.post(
674
- "v2/user/invite/list", m.UserInviteListResult, data=input.dict(exclude_none=True)
710
+ "v2/user/invite/list", m.UserInviteListResult, data=input.model_dump(exclude_none=True)
675
711
  )
676
712
 
677
713
  def delete(self, id: str) -> PangeaResponse[m.UserInviteDeleteResult]:
@@ -695,7 +731,7 @@ class AuthN(ServiceBase):
695
731
  """
696
732
  input = m.UserInviteDeleteRequest(id=id)
697
733
  return self.request.post(
698
- "v2/user/invite/delete", m.UserInviteDeleteResult, data=input.dict(exclude_none=True)
734
+ "v2/user/invite/delete", m.UserInviteDeleteResult, data=input.model_dump(exclude_none=True)
699
735
  )
700
736
 
701
737
  class Authenticators(ServiceBase):
@@ -710,7 +746,12 @@ class AuthN(ServiceBase):
710
746
  super().__init__(token, config, logger_name=logger_name)
711
747
 
712
748
  def delete(
713
- self, authenticator_id: str, id: Optional[str] = None, email: Optional[str] = None
749
+ self,
750
+ authenticator_id: str,
751
+ id: str | None = None,
752
+ email: str | None = None,
753
+ *,
754
+ username: str | None = None,
714
755
  ) -> PangeaResponse[m.UserAuthenticatorsDeleteResult]:
715
756
  """
716
757
  Delete user authenticator
@@ -720,9 +761,10 @@ class AuthN(ServiceBase):
720
761
  OperationId: authn_post_v2_user_authenticators_delete
721
762
 
722
763
  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
764
+ authenticator_id: An ID for an authenticator.
765
+ id: The identity of a user or a service.
766
+ email: An email address.
767
+ username: A username.
726
768
 
727
769
  Returns:
728
770
  A PangeaResponse with an empty object in the response.result field.
@@ -733,15 +775,17 @@ class AuthN(ServiceBase):
733
775
  id="pui_xpkhwpnz2cmegsws737xbsqnmnuwtbm5",
734
776
  )
735
777
  """
736
- input = m.UserAuthenticatorsDeleteRequest(authenticator_id=authenticator_id, email=email, id=id)
778
+ input = m.UserAuthenticatorsDeleteRequest(
779
+ authenticator_id=authenticator_id, email=email, id=id, username=username
780
+ )
737
781
  return self.request.post(
738
782
  "v2/user/authenticators/delete",
739
783
  m.UserAuthenticatorsDeleteResult,
740
- data=input.dict(exclude_none=True),
784
+ data=input.model_dump(exclude_none=True),
741
785
  )
742
786
 
743
787
  def list(
744
- self, email: Optional[str] = None, id: Optional[str] = None
788
+ self, email: str | None = None, id: str | None = None, *, username: str | None = None
745
789
  ) -> PangeaResponse[m.UserAuthenticatorsListResult]:
746
790
  """
747
791
  Get user authenticators
@@ -751,8 +795,9 @@ class AuthN(ServiceBase):
751
795
  OperationId: authn_post_v2_user_authenticators_list
752
796
 
753
797
  Args:
754
- email (str, optional): An email address
755
- id (str, optional): The identity of a user or a service
798
+ email: An email address.
799
+ id: The identity of a user or a service.
800
+ username: A username.
756
801
 
757
802
  Returns:
758
803
  A PangeaResponse with a list of authenticators in the response.result field.
@@ -764,9 +809,11 @@ class AuthN(ServiceBase):
764
809
  id="pui_xpkhwpnz2cmegsws737xbsqnmnuwtbm5",
765
810
  )
766
811
  """
767
- input = m.UserAuthenticatorsListRequest(email=email, id=id)
812
+ input = m.UserAuthenticatorsListRequest(email=email, id=id, username=username)
768
813
  return self.request.post(
769
- "v2/user/authenticators/list", m.UserAuthenticatorsListResult, data=input.dict(exclude_none=True)
814
+ "v2/user/authenticators/list",
815
+ m.UserAuthenticatorsListResult,
816
+ data=input.model_dump(exclude_none=True),
770
817
  )
771
818
 
772
819
  class Profile(ServiceBase):
@@ -781,7 +828,7 @@ class AuthN(ServiceBase):
781
828
  super().__init__(token, config, logger_name=logger_name)
782
829
 
783
830
  def get(
784
- self, id: Optional[str] = None, email: Optional[str] = None
831
+ self, id: str | None = None, email: str | None = None, *, username: str | None = None
785
832
  ) -> PangeaResponse[m.UserProfileGetResult]:
786
833
  """
787
834
  Get user
@@ -791,8 +838,9 @@ class AuthN(ServiceBase):
791
838
  OperationId: authn_post_v2_user_profile_get
792
839
 
793
840
  Args:
794
- id (str, optional): The identity of a user or a service
795
- email (str, optional): An email address
841
+ id: The identity of a user or a service.
842
+ email: An email address.
843
+ username: A username.
796
844
 
797
845
  Returns:
798
846
  A PangeaResponse with a user and its information in the response.result field.
@@ -804,16 +852,18 @@ class AuthN(ServiceBase):
804
852
  email="joe.user@email.com",
805
853
  )
806
854
  """
807
- input = m.UserProfileGetRequest(id=id, email=email)
855
+ input = m.UserProfileGetRequest(id=id, email=email, username=username)
808
856
  return self.request.post(
809
- "v2/user/profile/get", m.UserProfileGetResult, data=input.dict(exclude_none=True)
857
+ "v2/user/profile/get", m.UserProfileGetResult, data=input.model_dump(exclude_none=True)
810
858
  )
811
859
 
812
860
  def update(
813
861
  self,
814
862
  profile: m.Profile,
815
- id: Optional[str] = None,
816
- email: Optional[str] = None,
863
+ id: str | None = None,
864
+ email: str | None = None,
865
+ *,
866
+ username: str | None = None,
817
867
  ) -> PangeaResponse[m.UserProfileUpdateResult]:
818
868
  """
819
869
  Update user
@@ -823,9 +873,10 @@ class AuthN(ServiceBase):
823
873
  OperationId: authn_post_v2_user_profile_update
824
874
 
825
875
  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
876
+ profile: Updates to a user profile.
877
+ id: The identity of a user or a service.
878
+ email: An email address.
879
+ username: A username.
829
880
 
830
881
  Returns:
831
882
  A PangeaResponse with a user and its information in the response.result field.
@@ -844,9 +895,10 @@ class AuthN(ServiceBase):
844
895
  id=id,
845
896
  email=email,
846
897
  profile=profile,
898
+ username=username,
847
899
  )
848
900
  return self.request.post(
849
- "v2/user/profile/update", m.UserProfileUpdateResult, data=input.dict(exclude_none=True)
901
+ "v2/user/profile/update", m.UserProfileUpdateResult, data=input.model_dump(exclude_none=True)
850
902
  )
851
903
 
852
904
  class Flow(ServiceBase):
@@ -882,7 +934,7 @@ class AuthN(ServiceBase):
882
934
  )
883
935
  """
884
936
  input = m.FlowCompleteRequest(flow_id=flow_id)
885
- return self.request.post("v2/flow/complete", m.FlowCompleteResult, data=input.dict(exclude_none=True))
937
+ return self.request.post("v2/flow/complete", m.FlowCompleteResult, data=input.model_dump(exclude_none=True))
886
938
 
887
939
  def restart(
888
940
  self, flow_id: str, choice: m.FlowChoice, data: m.FlowRestartData = {}
@@ -914,7 +966,7 @@ class AuthN(ServiceBase):
914
966
  """
915
967
 
916
968
  input = m.FlowRestartRequest(flow_id=flow_id, choice=choice, data=data)
917
- return self.request.post("v2/flow/restart", m.FlowRestartResult, data=input.dict(exclude_none=True))
969
+ return self.request.post("v2/flow/restart", m.FlowRestartResult, data=input.model_dump(exclude_none=True))
918
970
 
919
971
  def start(
920
972
  self,
@@ -953,7 +1005,7 @@ class AuthN(ServiceBase):
953
1005
  )
954
1006
  """
955
1007
  input = m.FlowStartRequest(cb_uri=cb_uri, email=email, flow_types=flow_types, invitation=invitation)
956
- return self.request.post("v2/flow/start", m.FlowStartResult, data=input.dict(exclude_none=True))
1008
+ return self.request.post("v2/flow/start", m.FlowStartResult, data=input.model_dump(exclude_none=True))
957
1009
 
958
1010
  def update(
959
1011
  self, flow_id: str, choice: m.FlowChoice, data: m.FlowUpdateData = {}
@@ -987,7 +1039,7 @@ class AuthN(ServiceBase):
987
1039
  """
988
1040
 
989
1041
  input = m.FlowUpdateRequest(flow_id=flow_id, choice=choice, data=data)
990
- return self.request.post("v2/flow/update", m.FlowUpdateResult, data=input.dict(exclude_none=True))
1042
+ return self.request.post("v2/flow/update", m.FlowUpdateResult, data=input.model_dump(exclude_none=True))
991
1043
 
992
1044
  class Agreements(ServiceBase):
993
1045
  service_name = SERVICE_NAME
@@ -1031,7 +1083,7 @@ class AuthN(ServiceBase):
1031
1083
 
1032
1084
  input = m.AgreementCreateRequest(type=type, name=name, text=text, active=active)
1033
1085
  return self.request.post(
1034
- "v2/agreements/create", m.AgreementCreateResult, data=input.dict(exclude_none=True)
1086
+ "v2/agreements/create", m.AgreementCreateResult, data=input.model_dump(exclude_none=True)
1035
1087
  )
1036
1088
 
1037
1089
  def delete(self, type: m.AgreementType, id: str) -> PangeaResponse[m.AgreementDeleteResult]:
@@ -1058,7 +1110,7 @@ class AuthN(ServiceBase):
1058
1110
 
1059
1111
  input = m.AgreementDeleteRequest(type=type, id=id)
1060
1112
  return self.request.post(
1061
- "v2/agreements/delete", m.AgreementDeleteResult, data=input.dict(exclude_none=True)
1113
+ "v2/agreements/delete", m.AgreementDeleteResult, data=input.model_dump(exclude_none=True)
1062
1114
  )
1063
1115
 
1064
1116
  def list(
@@ -1096,7 +1148,9 @@ class AuthN(ServiceBase):
1096
1148
  filter = m.AgreementListFilter(**filter)
1097
1149
 
1098
1150
  input = m.AgreementListRequest(filter=filter, last=last, order=order, order_by=order_by, size=size)
1099
- return self.request.post("v2/agreements/list", m.AgreementListResult, data=input.dict(exclude_none=True))
1151
+ return self.request.post(
1152
+ "v2/agreements/list", m.AgreementListResult, data=input.model_dump(exclude_none=True)
1153
+ )
1100
1154
 
1101
1155
  def update(
1102
1156
  self,
@@ -1136,5 +1190,5 @@ class AuthN(ServiceBase):
1136
1190
 
1137
1191
  input = m.AgreementUpdateRequest(type=type, id=id, name=name, text=text, active=active)
1138
1192
  return self.request.post(
1139
- "v2/agreements/update", m.AgreementUpdateResult, data=input.dict(exclude_none=True)
1193
+ "v2/agreements/update", m.AgreementUpdateResult, data=input.model_dump(exclude_none=True)
1140
1194
  )