@riffdb/better-auth 0.2.0 → 0.2.1

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 (176) hide show
  1. package/DESIGN.md +90 -14
  2. package/README.md +157 -25
  3. package/dist/adapter.d.ts +7 -1
  4. package/dist/adapter.d.ts.map +1 -1
  5. package/dist/adapter.js +385 -47
  6. package/dist/adapter.js.map +1 -1
  7. package/dist/generated/client.d.ts +267 -26
  8. package/dist/generated/client.d.ts.map +1 -1
  9. package/dist/generated/client.js +479 -69
  10. package/dist/generated/client.js.map +1 -1
  11. package/dist/index.d.ts +3 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +3 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/plugin-dispatch.d.ts +37 -0
  16. package/dist/plugin-dispatch.d.ts.map +1 -0
  17. package/dist/plugin-dispatch.js +293 -0
  18. package/dist/plugin-dispatch.js.map +1 -0
  19. package/dist/profile-contract.d.ts +3 -0
  20. package/dist/profile-contract.d.ts.map +1 -1
  21. package/dist/profile-contract.js +8 -0
  22. package/dist/profile-contract.js.map +1 -1
  23. package/dist/profile-plan.js +1 -1
  24. package/dist/profile-plan.js.map +1 -1
  25. package/dist/profile.d.ts +2 -1
  26. package/dist/profile.d.ts.map +1 -1
  27. package/dist/profile.js +2 -1
  28. package/dist/profile.js.map +1 -1
  29. package/dist/profiles/custom-fields/profile.d.ts +3 -0
  30. package/dist/profiles/custom-fields/profile.d.ts.map +1 -0
  31. package/dist/profiles/custom-fields/profile.js +475 -0
  32. package/dist/profiles/custom-fields/profile.js.map +1 -0
  33. package/dist/profiles/custom-fields/src/generated/client.d.ts +2710 -0
  34. package/dist/profiles/custom-fields/src/generated/client.d.ts.map +1 -0
  35. package/dist/profiles/custom-fields/src/generated/client.js +2663 -0
  36. package/dist/profiles/custom-fields/src/generated/client.js.map +1 -0
  37. package/dist/profiles/runtime/profile.d.ts +3 -0
  38. package/dist/profiles/runtime/profile.d.ts.map +1 -0
  39. package/dist/profiles/runtime/profile.js +1065 -0
  40. package/dist/profiles/runtime/profile.js.map +1 -0
  41. package/dist/profiles/runtime/src/generated/client.d.ts +4274 -0
  42. package/dist/profiles/runtime/src/generated/client.d.ts.map +1 -0
  43. package/dist/profiles/runtime/src/generated/client.js +4607 -0
  44. package/dist/profiles/runtime/src/generated/client.js.map +1 -0
  45. package/dist/runtime-materialize.d.ts +10 -0
  46. package/dist/runtime-materialize.d.ts.map +1 -0
  47. package/dist/runtime-materialize.js +344 -0
  48. package/dist/runtime-materialize.js.map +1 -0
  49. package/dist/runtime-profile.d.ts +34 -0
  50. package/dist/runtime-profile.d.ts.map +1 -0
  51. package/dist/runtime-profile.js +203 -0
  52. package/dist/runtime-profile.js.map +1 -0
  53. package/generated/go/client.go +350 -96
  54. package/generated/mcp/tools.json +3338 -1768
  55. package/generated/python/client.py +603 -26
  56. package/generated/riffdb.application.exact.json +1 -1
  57. package/generated/riffdb.contract.bundle +0 -0
  58. package/generated/rust/client.rs +522 -26
  59. package/package.json +34 -13
  60. package/profiles/custom-fields/generated/go/client.go +2578 -0
  61. package/profiles/custom-fields/generated/mcp/tools.json +15998 -0
  62. package/profiles/custom-fields/generated/python/client.py +5141 -0
  63. package/profiles/custom-fields/generated/riffdb.application.exact.json +1 -0
  64. package/profiles/custom-fields/generated/riffdb.contract.bundle +0 -0
  65. package/profiles/custom-fields/generated/rust/client.rs +7980 -0
  66. package/profiles/custom-fields/profile.ts +474 -0
  67. package/profiles/custom-fields/riffdb/contract.riff +568 -0
  68. package/profiles/custom-fields/riffdb/queries/admin_users_all_email_asc.riffq +24 -0
  69. package/profiles/custom-fields/riffdb/queries/admin_users_contains_asc.riffq +24 -0
  70. package/profiles/custom-fields/riffdb/queries/admin_users_contains_desc.riffq +24 -0
  71. package/profiles/custom-fields/riffdb/queries/admin_users_email_contains_created_desc.riffq +24 -0
  72. package/profiles/custom-fields/riffdb/queries/admin_users_email_contains_image_asc.riffq +24 -0
  73. package/profiles/custom-fields/riffdb/queries/admin_users_ends_with_asc.riffq +24 -0
  74. package/profiles/custom-fields/riffdb/queries/admin_users_ends_with_desc.riffq +24 -0
  75. package/profiles/custom-fields/riffdb/queries/admin_users_starts_with_asc.riffq +24 -0
  76. package/profiles/custom-fields/riffdb/queries/admin_users_starts_with_desc.riffq +24 -0
  77. package/profiles/custom-fields/riffdb/queries/find_account_by_id.riffq +24 -0
  78. package/profiles/custom-fields/riffdb/queries/find_account_by_provider.riffq +26 -0
  79. package/profiles/custom-fields/riffdb/queries/find_accounts_by_user_id.riffq +25 -0
  80. package/profiles/custom-fields/riffdb/queries/find_accounts_by_user_provider.riffq +27 -0
  81. package/profiles/custom-fields/riffdb/queries/find_active_sessions_by_user_id.riffq +23 -0
  82. package/profiles/custom-fields/riffdb/queries/find_credential_account.riffq +25 -0
  83. package/profiles/custom-fields/riffdb/queries/find_expired_verification_ids.riffq +17 -0
  84. package/profiles/custom-fields/riffdb/queries/find_latest_verification.riffq +20 -0
  85. package/profiles/custom-fields/riffdb/queries/find_session_by_id.riffq +20 -0
  86. package/profiles/custom-fields/riffdb/queries/find_session_by_token.riffq +20 -0
  87. package/profiles/custom-fields/riffdb/queries/find_sessions_by_token_set.riffq +20 -0
  88. package/profiles/custom-fields/riffdb/queries/find_sessions_by_user_id.riffq +21 -0
  89. package/profiles/custom-fields/riffdb/queries/find_user_by_email.riffq +16 -0
  90. package/profiles/custom-fields/riffdb/queries/find_user_by_id.riffq +15 -0
  91. package/profiles/custom-fields/riffdb/queries/find_verification_by_id.riffq +19 -0
  92. package/profiles/custom-fields/riffdb/queries/find_verifications_by_identifier.riffq +21 -0
  93. package/profiles/custom-fields/riffdb/queries/profile_account_with_user_by_provider.riffq +31 -0
  94. package/profiles/custom-fields/riffdb/queries/profile_session_with_user_by_id.riffq +14 -0
  95. package/profiles/custom-fields/riffdb/queries/profile_session_with_user_by_token.riffq +14 -0
  96. package/profiles/custom-fields/riffdb/queries/profile_sessions_with_users_by_token_set.riffq +25 -0
  97. package/profiles/custom-fields/riffdb/queries/profile_user_with_accounts_by_email.riffq +19 -0
  98. package/profiles/custom-fields/riffdb/queries/profile_user_with_accounts_by_id.riffq +19 -0
  99. package/profiles/custom-fields/riffdb.application.json +217 -0
  100. package/profiles/custom-fields/riffdb.application.lock.json +1 -0
  101. package/profiles/custom-fields/riffdb.toml +3 -0
  102. package/profiles/custom-fields/src/generated/client.ts +3096 -0
  103. package/profiles/organization-security/materialization.json +3 -0
  104. package/profiles/organization-security/riffdb/contract.riff +12 -0
  105. package/profiles/organization-security/riffdb/queries/find_team_by_id.riffq +1 -1
  106. package/profiles/organization-security/riffdb/queries/find_team_member_by_id.riffq +1 -1
  107. package/profiles/organization-security/riffdb/queries/find_team_member_by_membership_key.riffq +16 -0
  108. package/profiles/organization-security/riffdb/queries/find_team_member_by_team_id.riffq +1 -1
  109. package/profiles/organization-security/riffdb.application.json +5 -0
  110. package/profiles/organization-security.profile.json +27 -1
  111. package/profiles/runtime/generated/go/client.go +4511 -0
  112. package/profiles/runtime/generated/mcp/tools.json +30004 -0
  113. package/profiles/runtime/generated/python/client.py +9337 -0
  114. package/profiles/runtime/generated/riffdb.application.exact.json +1 -0
  115. package/profiles/runtime/generated/riffdb.contract.bundle +0 -0
  116. package/profiles/runtime/generated/rust/client.rs +13297 -0
  117. package/profiles/runtime/profile.ts +1064 -0
  118. package/profiles/runtime/riffdb/contract.riff +1053 -0
  119. package/profiles/runtime/riffdb/queries/admin_users_all_email_asc.riffq +24 -0
  120. package/profiles/runtime/riffdb/queries/admin_users_contains_asc.riffq +24 -0
  121. package/profiles/runtime/riffdb/queries/admin_users_contains_desc.riffq +24 -0
  122. package/profiles/runtime/riffdb/queries/admin_users_email_contains_created_desc.riffq +24 -0
  123. package/profiles/runtime/riffdb/queries/admin_users_email_contains_image_asc.riffq +24 -0
  124. package/profiles/runtime/riffdb/queries/admin_users_ends_with_asc.riffq +24 -0
  125. package/profiles/runtime/riffdb/queries/admin_users_ends_with_desc.riffq +24 -0
  126. package/profiles/runtime/riffdb/queries/admin_users_starts_with_asc.riffq +24 -0
  127. package/profiles/runtime/riffdb/queries/admin_users_starts_with_desc.riffq +24 -0
  128. package/profiles/runtime/riffdb/queries/find_account_by_id.riffq +24 -0
  129. package/profiles/runtime/riffdb/queries/find_account_by_provider.riffq +26 -0
  130. package/profiles/runtime/riffdb/queries/find_accounts_by_user_id.riffq +25 -0
  131. package/profiles/runtime/riffdb/queries/find_accounts_by_user_provider.riffq +27 -0
  132. package/profiles/runtime/riffdb/queries/find_active_sessions_by_user_id.riffq +23 -0
  133. package/profiles/runtime/riffdb/queries/find_credential_account.riffq +25 -0
  134. package/profiles/runtime/riffdb/queries/find_expired_verification_ids.riffq +17 -0
  135. package/profiles/runtime/riffdb/queries/find_latest_verification.riffq +20 -0
  136. package/profiles/runtime/riffdb/queries/find_session_by_id.riffq +20 -0
  137. package/profiles/runtime/riffdb/queries/find_session_by_token.riffq +20 -0
  138. package/profiles/runtime/riffdb/queries/find_sessions_by_token_set.riffq +20 -0
  139. package/profiles/runtime/riffdb/queries/find_sessions_by_user_id.riffq +21 -0
  140. package/profiles/runtime/riffdb/queries/find_user_by_email.riffq +16 -0
  141. package/profiles/runtime/riffdb/queries/find_user_by_id.riffq +15 -0
  142. package/profiles/runtime/riffdb/queries/find_verification_by_id.riffq +19 -0
  143. package/profiles/runtime/riffdb/queries/find_verifications_by_identifier.riffq +21 -0
  144. package/profiles/runtime/riffdb/queries/profile_account_with_user_by_provider.riffq +31 -0
  145. package/profiles/runtime/riffdb/queries/profile_invitation_by_email.riffq +17 -0
  146. package/profiles/runtime/riffdb/queries/profile_invitation_by_id.riffq +17 -0
  147. package/profiles/runtime/riffdb/queries/profile_invitation_by_organization_email_status.riffq +19 -0
  148. package/profiles/runtime/riffdb/queries/profile_invitation_by_organization_id.riffq +17 -0
  149. package/profiles/runtime/riffdb/queries/profile_invitation_by_organization_status.riffq +18 -0
  150. package/profiles/runtime/riffdb/queries/profile_member_by_id.riffq +27 -0
  151. package/profiles/runtime/riffdb/queries/profile_member_by_organization.riffq +20 -0
  152. package/profiles/runtime/riffdb/queries/profile_member_by_organization_created_at_asc.riffq +20 -0
  153. package/profiles/runtime/riffdb/queries/profile_member_by_organization_created_at_desc.riffq +20 -0
  154. package/profiles/runtime/riffdb/queries/profile_member_by_organization_role_asc.riffq +20 -0
  155. package/profiles/runtime/riffdb/queries/profile_member_by_organization_role_desc.riffq +20 -0
  156. package/profiles/runtime/riffdb/queries/profile_member_by_organization_user.riffq +28 -0
  157. package/profiles/runtime/riffdb/queries/profile_member_by_user.riffq +27 -0
  158. package/profiles/runtime/riffdb/queries/profile_organization_by_id.riffq +27 -0
  159. package/profiles/runtime/riffdb/queries/profile_organization_by_slug.riffq +27 -0
  160. package/profiles/runtime/riffdb/queries/profile_session_with_user_by_id.riffq +14 -0
  161. package/profiles/runtime/riffdb/queries/profile_session_with_user_by_token.riffq +14 -0
  162. package/profiles/runtime/riffdb/queries/profile_sessions_with_users_by_token_set.riffq +25 -0
  163. package/profiles/runtime/riffdb/queries/profile_two_factor_by_id.riffq +17 -0
  164. package/profiles/runtime/riffdb/queries/profile_two_factor_by_user.riffq +17 -0
  165. package/profiles/runtime/riffdb/queries/profile_user_with_accounts_by_email.riffq +19 -0
  166. package/profiles/runtime/riffdb/queries/profile_user_with_accounts_by_id.riffq +19 -0
  167. package/profiles/runtime/riffdb/queries/profile_users_by_id_set.riffq +8 -0
  168. package/profiles/runtime/riffdb.application.json +324 -0
  169. package/profiles/runtime/riffdb.application.lock.json +1 -0
  170. package/profiles/runtime/riffdb.toml +3 -0
  171. package/profiles/runtime/src/generated/client.ts +5186 -0
  172. package/riffdb/contract.riff +58 -0
  173. package/riffdb/queries/find_credential_account.riffq +25 -0
  174. package/riffdb.application.json +106 -26
  175. package/riffdb.application.lock.json +1 -1
  176. package/src/generated/client.ts +2746 -0
@@ -22,8 +22,8 @@ def _compact_tag(value: object, tag: str, keys: frozenset[str]) -> dict[str, obj
22
22
 
23
23
  CONTRACT_LINEAGE: Final[str] = "RiffDBBetterAuthCore"
24
24
  CONTRACT_VERSION: Final[int] = 1
25
- CONTRACT_BUNDLE_HASH: Final[str] = "11c5a37724f40b92bf10b195e6a66ef30037f73f3df79a98e4c4ed1076883d2e"
26
- QUERY_MODULE_HASH: Final[str] = "18cfd99921406e15722f3ac45867d3fbe0cebd4f2ecdd86c0ba099547c58cd91"
25
+ CONTRACT_BUNDLE_HASH: Final[str] = "74fd255eefcf04f0b054dbb6c4a0bed43a7312d82f7755687c9229ee3206ddfc"
26
+ QUERY_MODULE_HASH: Final[str] = "8dff3a38f6c0a915d7653e7571a2ef5795a89b452990d705f38fe0ac93b5ad9a"
27
27
 
28
28
  @dataclass(frozen=True, slots=True, kw_only=True)
29
29
  class User:
@@ -89,7 +89,7 @@ class AccountPasswordUpdate:
89
89
  organization_id: UUID
90
90
  expected_revision: Annotated[int, "u64"]
91
91
 
92
- ADMIN_USERS_ALL_EMAIL_ASC_QUERY_PLAN_HASH: Final[str] = "ea5056df116418329d03bc536a195247148360378e11444c10e7ca37df54c547"
92
+ ADMIN_USERS_ALL_EMAIL_ASC_QUERY_PLAN_HASH: Final[str] = "056edbaabe43e1dc95f1f6af9838747f54d927a90d5bc9f2be045ae266d107d3"
93
93
 
94
94
  @dataclass(frozen=True, slots=True, kw_only=True)
95
95
  class AdminUsersAllEmailAscParams:
@@ -129,7 +129,7 @@ class AdminUsersAllEmailAscFound:
129
129
 
130
130
  AdminUsersAllEmailAscResult: TypeAlias = AdminUsersAllEmailAscFound
131
131
 
132
- ADMIN_USERS_CONTAINS_ASC_QUERY_PLAN_HASH: Final[str] = "56132d4a48f43731e36b69e0fe922d67491bc0ad611375fbc3d372a840b739df"
132
+ ADMIN_USERS_CONTAINS_ASC_QUERY_PLAN_HASH: Final[str] = "b64d213477dd2275d98422a6c3460b0cae932dd96255fe9d565005e8afa37fc4"
133
133
 
134
134
  @dataclass(frozen=True, slots=True, kw_only=True)
135
135
  class AdminUsersContainsAscParams:
@@ -169,7 +169,7 @@ class AdminUsersContainsAscFound:
169
169
 
170
170
  AdminUsersContainsAscResult: TypeAlias = AdminUsersContainsAscFound
171
171
 
172
- ADMIN_USERS_CONTAINS_DESC_QUERY_PLAN_HASH: Final[str] = "470b720e68aa2261d902378ebc7fb1ce5be51582761672da7ecb87bece977f0f"
172
+ ADMIN_USERS_CONTAINS_DESC_QUERY_PLAN_HASH: Final[str] = "57aba8cf311c301e985adc324f97b4d963a38e6efa6058a82e248854d75f2f05"
173
173
 
174
174
  @dataclass(frozen=True, slots=True, kw_only=True)
175
175
  class AdminUsersContainsDescParams:
@@ -209,7 +209,7 @@ class AdminUsersContainsDescFound:
209
209
 
210
210
  AdminUsersContainsDescResult: TypeAlias = AdminUsersContainsDescFound
211
211
 
212
- ADMIN_USERS_EMAIL_CONTAINS_CREATED_DESC_QUERY_PLAN_HASH: Final[str] = "51def4488ff2a35fee0c5d7f267daaca11e60a03521be0fdaf8923c5486c5485"
212
+ ADMIN_USERS_EMAIL_CONTAINS_CREATED_DESC_QUERY_PLAN_HASH: Final[str] = "7aede9eda624f5b4eb4280ca7b8a1421466ce30091177c9abab4f125987eb4ff"
213
213
 
214
214
  @dataclass(frozen=True, slots=True, kw_only=True)
215
215
  class AdminUsersEmailContainsCreatedDescParams:
@@ -249,7 +249,7 @@ class AdminUsersEmailContainsCreatedDescFound:
249
249
 
250
250
  AdminUsersEmailContainsCreatedDescResult: TypeAlias = AdminUsersEmailContainsCreatedDescFound
251
251
 
252
- ADMIN_USERS_EMAIL_CONTAINS_IMAGE_ASC_QUERY_PLAN_HASH: Final[str] = "fd5dc86099567113dcce8ef61c280b22f35a2c3b9e6fc592f0bcfaded4008f80"
252
+ ADMIN_USERS_EMAIL_CONTAINS_IMAGE_ASC_QUERY_PLAN_HASH: Final[str] = "453cb6c81f506a1f0ac99bed3cc85da59176d2cb83597d5812d771683a60cb4c"
253
253
 
254
254
  @dataclass(frozen=True, slots=True, kw_only=True)
255
255
  class AdminUsersEmailContainsImageAscParams:
@@ -289,7 +289,7 @@ class AdminUsersEmailContainsImageAscFound:
289
289
 
290
290
  AdminUsersEmailContainsImageAscResult: TypeAlias = AdminUsersEmailContainsImageAscFound
291
291
 
292
- ADMIN_USERS_ENDS_WITH_ASC_QUERY_PLAN_HASH: Final[str] = "a83229249df961abbc113e7b808af6beca7ca915835ddcd06cd5c28bb7d3c920"
292
+ ADMIN_USERS_ENDS_WITH_ASC_QUERY_PLAN_HASH: Final[str] = "924c7acfdcf3f7970917ac611b6eafc9175ac69f735d9e1cc01414fcc6f0e696"
293
293
 
294
294
  @dataclass(frozen=True, slots=True, kw_only=True)
295
295
  class AdminUsersEndsWithAscParams:
@@ -329,7 +329,7 @@ class AdminUsersEndsWithAscFound:
329
329
 
330
330
  AdminUsersEndsWithAscResult: TypeAlias = AdminUsersEndsWithAscFound
331
331
 
332
- ADMIN_USERS_ENDS_WITH_DESC_QUERY_PLAN_HASH: Final[str] = "ac6fdfacb6f36e2a68e36429171b5d8d502b2fd43f781d72541ece961f1da93c"
332
+ ADMIN_USERS_ENDS_WITH_DESC_QUERY_PLAN_HASH: Final[str] = "cab8ad8456533e4ce97388948e4f703cac6f2eebb641b83a91c3b005ece7fffb"
333
333
 
334
334
  @dataclass(frozen=True, slots=True, kw_only=True)
335
335
  class AdminUsersEndsWithDescParams:
@@ -369,7 +369,7 @@ class AdminUsersEndsWithDescFound:
369
369
 
370
370
  AdminUsersEndsWithDescResult: TypeAlias = AdminUsersEndsWithDescFound
371
371
 
372
- ADMIN_USERS_STARTS_WITH_ASC_QUERY_PLAN_HASH: Final[str] = "e9594b9b9631b78e8cbd9a89c4a2f1b43cb40b62ef55bb18b704f790044b2332"
372
+ ADMIN_USERS_STARTS_WITH_ASC_QUERY_PLAN_HASH: Final[str] = "add0aed3dbd0caea0de2857133a857d49eb7bfc0e031d117270cc873137da5ec"
373
373
 
374
374
  @dataclass(frozen=True, slots=True, kw_only=True)
375
375
  class AdminUsersStartsWithAscParams:
@@ -409,7 +409,7 @@ class AdminUsersStartsWithAscFound:
409
409
 
410
410
  AdminUsersStartsWithAscResult: TypeAlias = AdminUsersStartsWithAscFound
411
411
 
412
- ADMIN_USERS_STARTS_WITH_DESC_QUERY_PLAN_HASH: Final[str] = "1f52bcc4f1f3e778f33e3e47299009ce70d3f4c541d1bed35e6f953d0e79ffea"
412
+ ADMIN_USERS_STARTS_WITH_DESC_QUERY_PLAN_HASH: Final[str] = "23c1561fb3956217e79d1b358be468e55c4021b887e927a4fb3c0484c92be872"
413
413
 
414
414
  @dataclass(frozen=True, slots=True, kw_only=True)
415
415
  class AdminUsersStartsWithDescParams:
@@ -449,7 +449,7 @@ class AdminUsersStartsWithDescFound:
449
449
 
450
450
  AdminUsersStartsWithDescResult: TypeAlias = AdminUsersStartsWithDescFound
451
451
 
452
- FIND_ACCOUNT_BY_ID_QUERY_PLAN_HASH: Final[str] = "51ece0c8e7396f3f9efea7595a4224f856ae7984ff9bf15bcf9049427ad1f110"
452
+ FIND_ACCOUNT_BY_ID_QUERY_PLAN_HASH: Final[str] = "14a08df3dd8a74ea0a5622804bf0c2424086ee73eb10ce57d7df336a7d25f5ba"
453
453
  FIND_ACCOUNT_BY_ID_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
454
454
  ("FindAccountById", "Account", "access_token"),
455
455
  ("FindAccountById", "Account", "refresh_token"),
@@ -493,7 +493,7 @@ class FindAccountByIdFound:
493
493
 
494
494
  FindAccountByIdResult: TypeAlias = FindAccountByIdFound
495
495
 
496
- FIND_ACCOUNT_BY_PROVIDER_QUERY_PLAN_HASH: Final[str] = "b104b38050396d747e59735cea4b562c305dccb7614a973f5177501825c91089"
496
+ FIND_ACCOUNT_BY_PROVIDER_QUERY_PLAN_HASH: Final[str] = "e6c4517a46d725780e79725ca3fdaba2208ef4b282d49f484121eee76c043831"
497
497
  FIND_ACCOUNT_BY_PROVIDER_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
498
498
  ("FindAccountByProvider", "Account", "access_token"),
499
499
  ("FindAccountByProvider", "Account", "refresh_token"),
@@ -538,7 +538,7 @@ class FindAccountByProviderFound:
538
538
 
539
539
  FindAccountByProviderResult: TypeAlias = FindAccountByProviderFound
540
540
 
541
- FIND_ACCOUNTS_BY_USER_ID_QUERY_PLAN_HASH: Final[str] = "0e517c2b2a10d95c12812d6374107379c80ce4638b962fad6f9092cc6b8b6c2e"
541
+ FIND_ACCOUNTS_BY_USER_ID_QUERY_PLAN_HASH: Final[str] = "ccdc524ca64ad667c209de25b4ce977f43b53ffdd8eb1b70fedf29fc99f27da6"
542
542
  FIND_ACCOUNTS_BY_USER_ID_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
543
543
  ("FindAccountsByUserId", "Account", "access_token"),
544
544
  ("FindAccountsByUserId", "Account", "refresh_token"),
@@ -583,7 +583,7 @@ class FindAccountsByUserIdFound:
583
583
 
584
584
  FindAccountsByUserIdResult: TypeAlias = FindAccountsByUserIdFound
585
585
 
586
- FIND_ACCOUNTS_BY_USER_PROVIDER_QUERY_PLAN_HASH: Final[str] = "44124fb19b8f7fe35bb15824b87a0ed593c86b5821e81ad7fae1ab8636725183"
586
+ FIND_ACCOUNTS_BY_USER_PROVIDER_QUERY_PLAN_HASH: Final[str] = "21d13b3c30b4a4059f3c436e290d11c20f0f1d1154e05fb48ae3dd0da882526d"
587
587
  FIND_ACCOUNTS_BY_USER_PROVIDER_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
588
588
  ("FindAccountsByUserProvider", "Account", "access_token"),
589
589
  ("FindAccountsByUserProvider", "Account", "refresh_token"),
@@ -629,7 +629,7 @@ class FindAccountsByUserProviderFound:
629
629
 
630
630
  FindAccountsByUserProviderResult: TypeAlias = FindAccountsByUserProviderFound
631
631
 
632
- FIND_ACTIVE_SESSIONS_BY_USER_ID_QUERY_PLAN_HASH: Final[str] = "218dbdff73dce68ba48b7f8a179791e6b46139ee84da3edbd96438045f60f8dc"
632
+ FIND_ACTIVE_SESSIONS_BY_USER_ID_QUERY_PLAN_HASH: Final[str] = "de1e5232a64a32057699b5ac21f1b43e69d755a3c143595f906fe63e16147264"
633
633
  FIND_ACTIVE_SESSIONS_BY_USER_ID_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
634
634
  ("FindActiveSessionsByUserId", "Session", "token"),
635
635
  )
@@ -667,7 +667,54 @@ class FindActiveSessionsByUserIdFound:
667
667
 
668
668
  FindActiveSessionsByUserIdResult: TypeAlias = FindActiveSessionsByUserIdFound
669
669
 
670
- FIND_EXPIRED_VERIFICATION_IDS_QUERY_PLAN_HASH: Final[str] = "e24fe82a3a724a9d45044dc668d450e61b1177f5866423c07bd33100d49428c1"
670
+ FIND_CREDENTIAL_ACCOUNT_QUERY_PLAN_HASH: Final[str] = "f968271d103a76cc6b2a5496f5cceffe4cff5aa39d2a370379b518d8e7d90771"
671
+ FIND_CREDENTIAL_ACCOUNT_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
672
+ ("FindCredentialAccount", "Account", "access_token"),
673
+ ("FindCredentialAccount", "Account", "refresh_token"),
674
+ ("FindCredentialAccount", "Account", "id_token"),
675
+ ("FindCredentialAccount", "Account", "password"),
676
+ )
677
+
678
+
679
+ @dataclass(frozen=True, slots=True, kw_only=True)
680
+ class FindCredentialAccountParams:
681
+ organization_id: UUID
682
+ user_id: UUID
683
+ account_id: str
684
+ provider_id: str
685
+
686
+ @dataclass(frozen=True, slots=True, kw_only=True)
687
+ class FindCredentialAccountFoundAccounts:
688
+ organization_id: UUID = field(repr=False)
689
+ user_id: UUID = field(repr=False)
690
+ id: UUID = field(repr=False)
691
+ account_id: str = field(repr=False)
692
+ provider_id: str = field(repr=False)
693
+ access_token: str | None = field(repr=False)
694
+ refresh_token: str | None = field(repr=False)
695
+ id_token: str | None = field(repr=False)
696
+ password: str | None = field(repr=False)
697
+ access_token_expires_at: Timestamp | None = field(repr=False)
698
+ refresh_token_expires_at: Timestamp | None = field(repr=False)
699
+ scope: str | None = field(repr=False)
700
+ created_at: Timestamp = field(repr=False)
701
+ updated_at: Timestamp = field(repr=False)
702
+ revision: Annotated[int, "u64"] = field(repr=False)
703
+
704
+ @dataclass(frozen=True, slots=True, kw_only=True)
705
+ class FindCredentialAccountFound:
706
+ accounts: tuple[FindCredentialAccountFoundAccounts, ...] = field(repr=False)
707
+ outcome: Literal["Found"] = field(default="Found", init=False)
708
+
709
+ def is_found(self) -> bool:
710
+ return True
711
+
712
+ def unwrap_found(self) -> FindCredentialAccountFound:
713
+ return self
714
+
715
+ FindCredentialAccountResult: TypeAlias = FindCredentialAccountFound
716
+
717
+ FIND_EXPIRED_VERIFICATION_IDS_QUERY_PLAN_HASH: Final[str] = "6c799850ba3b2eb3222aac85a76f40492c46de76870075b029f3b4ac897ed8b9"
671
718
 
672
719
  @dataclass(frozen=True, slots=True, kw_only=True)
673
720
  class FindExpiredVerificationIdsParams:
@@ -692,7 +739,7 @@ class FindExpiredVerificationIdsFound:
692
739
 
693
740
  FindExpiredVerificationIdsResult: TypeAlias = FindExpiredVerificationIdsFound
694
741
 
695
- FIND_LATEST_VERIFICATION_QUERY_PLAN_HASH: Final[str] = "54336205fa315da75d390d062055723e36d07ef6596e19f756d319a8bc875023"
742
+ FIND_LATEST_VERIFICATION_QUERY_PLAN_HASH: Final[str] = "b3832c0a8a316d3fcbc62b388fbe09ceb6624b55482195f7642553467cba6fcb"
696
743
  FIND_LATEST_VERIFICATION_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
697
744
  ("FindLatestVerification", "Verification", "value"),
698
745
  )
@@ -726,7 +773,7 @@ class FindLatestVerificationFound:
726
773
 
727
774
  FindLatestVerificationResult: TypeAlias = FindLatestVerificationFound
728
775
 
729
- FIND_SESSION_BY_ID_QUERY_PLAN_HASH: Final[str] = "653cfab6a75b5e2624620b0b5504b19d36f778c8775606fa0f3bb0c1d51e6bc0"
776
+ FIND_SESSION_BY_ID_QUERY_PLAN_HASH: Final[str] = "c92eb2035c0e3ca7dedbaa42a4e2efe7bc4786a65213394da7f5d3beb579a2a1"
730
777
  FIND_SESSION_BY_ID_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
731
778
  ("FindSessionById", "Session", "token"),
732
779
  )
@@ -762,7 +809,7 @@ class FindSessionByIdFound:
762
809
 
763
810
  FindSessionByIdResult: TypeAlias = FindSessionByIdFound
764
811
 
765
- FIND_SESSION_BY_TOKEN_QUERY_PLAN_HASH: Final[str] = "b5e701701b0ac99b4328200089b2507f31c0be55df78a275d83f7be99f8b7061"
812
+ FIND_SESSION_BY_TOKEN_QUERY_PLAN_HASH: Final[str] = "a8a12334a3d34c30d54be828bdcc9b9b77223303c3f9681e4a602c92341876ec"
766
813
  FIND_SESSION_BY_TOKEN_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
767
814
  ("FindSessionByToken", "Session", "token"),
768
815
  )
@@ -798,7 +845,8 @@ class FindSessionByTokenFound:
798
845
 
799
846
  FindSessionByTokenResult: TypeAlias = FindSessionByTokenFound
800
847
 
801
- FIND_SESSIONS_BY_TOKEN_SET_QUERY_PLAN_HASH: Final[str] = "56c683d1815bf0c3e14c0585f314de378b43f9f4e401312c645efc70bd42969b"
848
+ FIND_SESSIONS_BY_TOKEN_SET_QUERY_PLAN_HASH: Final[str] = "7e23187b537599c4c2361d34ea866b5b719f63feda0135587b5ec6afd5ce62f6"
849
+ FIND_SESSIONS_BY_TOKEN_SET_TOKENS_MAX_ITEMS: Final[int] = 32
802
850
  FIND_SESSIONS_BY_TOKEN_SET_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
803
851
  ("FindSessionsByTokenSet", "Session", "token"),
804
852
  )
@@ -834,7 +882,7 @@ class FindSessionsByTokenSetFound:
834
882
 
835
883
  FindSessionsByTokenSetResult: TypeAlias = FindSessionsByTokenSetFound
836
884
 
837
- FIND_SESSIONS_BY_USER_ID_QUERY_PLAN_HASH: Final[str] = "84de4cd840d30dc9cd575e1f1daea8de94f0efa63187b646e273ba633a5d693f"
885
+ FIND_SESSIONS_BY_USER_ID_QUERY_PLAN_HASH: Final[str] = "a3277546d8b0c0059b850c368ae4925000c255e69b7ff005f4b3d2ef61b504af"
838
886
  FIND_SESSIONS_BY_USER_ID_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
839
887
  ("FindSessionsByUserId", "Session", "token"),
840
888
  )
@@ -871,7 +919,7 @@ class FindSessionsByUserIdFound:
871
919
 
872
920
  FindSessionsByUserIdResult: TypeAlias = FindSessionsByUserIdFound
873
921
 
874
- FIND_USER_BY_EMAIL_QUERY_PLAN_HASH: Final[str] = "ef647a48d55b825dbe566c29b03dd3fb97444df49f991bd0441d60cbb4115078"
922
+ FIND_USER_BY_EMAIL_QUERY_PLAN_HASH: Final[str] = "b167b8cb2fb5ce19685491b47da4e816665b840e0f0e463666f6302134472b9a"
875
923
 
876
924
  @dataclass(frozen=True, slots=True, kw_only=True)
877
925
  class FindUserByEmailParams:
@@ -925,7 +973,7 @@ def _decode_find_user_by_email_compact(value: object) -> FindUserByEmailResult:
925
973
  ))
926
974
  return FindUserByEmailFound(users=tuple(decoded))
927
975
 
928
- FIND_USER_BY_ID_QUERY_PLAN_HASH: Final[str] = "45fe0e1bda91ecd52e3a5c64c656c168c1200b1869b0f68665fd9e578439b9fd"
976
+ FIND_USER_BY_ID_QUERY_PLAN_HASH: Final[str] = "25d4a0a77d5df64ab6187528f9fac6b205a03c33e01c9ea6b573e8316b78b924"
929
977
 
930
978
  @dataclass(frozen=True, slots=True, kw_only=True)
931
979
  class FindUserByIdParams:
@@ -972,7 +1020,7 @@ class FindUserByIdMissing:
972
1020
 
973
1021
  FindUserByIdResult: TypeAlias = FindUserByIdFound | FindUserByIdMissing
974
1022
 
975
- FIND_VERIFICATION_BY_ID_QUERY_PLAN_HASH: Final[str] = "3755eceb567801c6795c13a9e8868955cfe1bf185d204196f4c614d29f78c6aa"
1023
+ FIND_VERIFICATION_BY_ID_QUERY_PLAN_HASH: Final[str] = "54f07c7eba7d51857dd6473e39304dc798bf7084ca946dfa7f0203633a5133ac"
976
1024
  FIND_VERIFICATION_BY_ID_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
977
1025
  ("FindVerificationById", "Verification", "value"),
978
1026
  )
@@ -1022,7 +1070,7 @@ class FindVerificationByIdMissing:
1022
1070
 
1023
1071
  FindVerificationByIdResult: TypeAlias = FindVerificationByIdFound | FindVerificationByIdMissing
1024
1072
 
1025
- FIND_VERIFICATIONS_BY_IDENTIFIER_QUERY_PLAN_HASH: Final[str] = "d98f43e146032b3cd1d0dfb2eacd432795f1545fcfa00e0e45b0fbd891d8b3ed"
1073
+ FIND_VERIFICATIONS_BY_IDENTIFIER_QUERY_PLAN_HASH: Final[str] = "4c768ae1d966454e9b791cd57a6311476947b5c457020943a50bc3cfee90765b"
1026
1074
  FIND_VERIFICATIONS_BY_IDENTIFIER_SECRET_OUTPUTS: Final[tuple[tuple[str, str, str], ...]] = (
1027
1075
  ("FindVerificationsByIdentifier", "Verification", "value"),
1028
1076
  )
@@ -1129,6 +1177,55 @@ class ConsumeVerificationSetVerificationConsumeMissing:
1129
1177
 
1130
1178
  ConsumeVerificationSetOutcome: TypeAlias = ConsumeVerificationSetVerificationSetConsumed | ConsumeVerificationSetVerificationConsumeMissing
1131
1179
 
1180
+ @dataclass(frozen=True, slots=True, kw_only=True)
1181
+ class ConsumeVerificationSnapshotInput:
1182
+ request_id: UUID
1183
+ organization_id: UUID
1184
+ verification_id: UUID
1185
+ expected_revision: Annotated[int, "u64"]
1186
+
1187
+ CONSUME_VERIFICATION_SNAPSHOT_PLAN_HASH: Final[str] = "1a80a36f34b4699c972fc1e6f48cad3f85da54e202831a6986aea084db09788b"
1188
+ @dataclass(frozen=True, slots=True, kw_only=True)
1189
+ class ConsumeVerificationSnapshotVerificationConsumed:
1190
+ outcome: Literal["VerificationConsumed"] = field(default="VerificationConsumed", init=False)
1191
+
1192
+ def is_verification_consumed(self) -> bool:
1193
+ return True
1194
+
1195
+ def is_verification_consume_stale(self) -> bool:
1196
+ return False
1197
+
1198
+ def is_verification_consume_missing(self) -> bool:
1199
+ return False
1200
+
1201
+ @dataclass(frozen=True, slots=True, kw_only=True)
1202
+ class ConsumeVerificationSnapshotVerificationConsumeStale:
1203
+ outcome: Literal["VerificationConsumeStale"] = field(default="VerificationConsumeStale", init=False)
1204
+
1205
+ def is_verification_consumed(self) -> bool:
1206
+ return False
1207
+
1208
+ def is_verification_consume_stale(self) -> bool:
1209
+ return True
1210
+
1211
+ def is_verification_consume_missing(self) -> bool:
1212
+ return False
1213
+
1214
+ @dataclass(frozen=True, slots=True, kw_only=True)
1215
+ class ConsumeVerificationSnapshotVerificationConsumeMissing:
1216
+ outcome: Literal["VerificationConsumeMissing"] = field(default="VerificationConsumeMissing", init=False)
1217
+
1218
+ def is_verification_consumed(self) -> bool:
1219
+ return False
1220
+
1221
+ def is_verification_consume_stale(self) -> bool:
1222
+ return False
1223
+
1224
+ def is_verification_consume_missing(self) -> bool:
1225
+ return True
1226
+
1227
+ ConsumeVerificationSnapshotOutcome: TypeAlias = ConsumeVerificationSnapshotVerificationConsumed | ConsumeVerificationSnapshotVerificationConsumeStale | ConsumeVerificationSnapshotVerificationConsumeMissing
1228
+
1132
1229
  @dataclass(frozen=True, slots=True, kw_only=True)
1133
1230
  class CreateAccountInput:
1134
1231
  id: UUID
@@ -1608,6 +1705,154 @@ class DeleteVerificationVerificationMissing:
1608
1705
 
1609
1706
  DeleteVerificationOutcome: TypeAlias = DeleteVerificationVerificationDeleted | DeleteVerificationVerificationMissing
1610
1707
 
1708
+ @dataclass(frozen=True, slots=True, kw_only=True)
1709
+ class ResetCredentialPasswordInput:
1710
+ user_id: UUID
1711
+ password: str
1712
+ account_id: UUID
1713
+ request_id: UUID
1714
+ updated_at: Timestamp
1715
+ organization_id: UUID
1716
+ account_revision: Annotated[int, "u64"]
1717
+ verification_ids: tuple[UUID, ...]
1718
+ external_account_id: str
1719
+ verification_revision: Annotated[int, "u64"]
1720
+
1721
+ RESET_CREDENTIAL_PASSWORD_PLAN_HASH: Final[str] = "ed87f267831fb0823b0e9bbf51d7b302a715a95c0cea69faf7922c0e4e7f375e"
1722
+ @dataclass(frozen=True, slots=True, kw_only=True)
1723
+ class ResetCredentialPasswordPasswordAccountStale:
1724
+ outcome: Literal["PasswordAccountStale"] = field(default="PasswordAccountStale", init=False)
1725
+
1726
+ def is_password_account_stale(self) -> bool:
1727
+ return True
1728
+
1729
+ def is_password_account_missing(self) -> bool:
1730
+ return False
1731
+
1732
+ def is_credential_password_reset(self) -> bool:
1733
+ return False
1734
+
1735
+ def is_password_provider_mismatch(self) -> bool:
1736
+ return False
1737
+
1738
+ def is_verification_consume_stale(self) -> bool:
1739
+ return False
1740
+
1741
+ def is_verification_consume_missing(self) -> bool:
1742
+ return False
1743
+
1744
+ @dataclass(frozen=True, slots=True, kw_only=True)
1745
+ class ResetCredentialPasswordPasswordAccountMissing:
1746
+ outcome: Literal["PasswordAccountMissing"] = field(default="PasswordAccountMissing", init=False)
1747
+
1748
+ def is_password_account_stale(self) -> bool:
1749
+ return False
1750
+
1751
+ def is_password_account_missing(self) -> bool:
1752
+ return True
1753
+
1754
+ def is_credential_password_reset(self) -> bool:
1755
+ return False
1756
+
1757
+ def is_password_provider_mismatch(self) -> bool:
1758
+ return False
1759
+
1760
+ def is_verification_consume_stale(self) -> bool:
1761
+ return False
1762
+
1763
+ def is_verification_consume_missing(self) -> bool:
1764
+ return False
1765
+
1766
+ @dataclass(frozen=True, slots=True, kw_only=True)
1767
+ class ResetCredentialPasswordCredentialPasswordReset:
1768
+ outcome: Literal["CredentialPasswordReset"] = field(default="CredentialPasswordReset", init=False)
1769
+
1770
+ def is_password_account_stale(self) -> bool:
1771
+ return False
1772
+
1773
+ def is_password_account_missing(self) -> bool:
1774
+ return False
1775
+
1776
+ def is_credential_password_reset(self) -> bool:
1777
+ return True
1778
+
1779
+ def is_password_provider_mismatch(self) -> bool:
1780
+ return False
1781
+
1782
+ def is_verification_consume_stale(self) -> bool:
1783
+ return False
1784
+
1785
+ def is_verification_consume_missing(self) -> bool:
1786
+ return False
1787
+
1788
+ @dataclass(frozen=True, slots=True, kw_only=True)
1789
+ class ResetCredentialPasswordPasswordProviderMismatch:
1790
+ outcome: Literal["PasswordProviderMismatch"] = field(default="PasswordProviderMismatch", init=False)
1791
+
1792
+ def is_password_account_stale(self) -> bool:
1793
+ return False
1794
+
1795
+ def is_password_account_missing(self) -> bool:
1796
+ return False
1797
+
1798
+ def is_credential_password_reset(self) -> bool:
1799
+ return False
1800
+
1801
+ def is_password_provider_mismatch(self) -> bool:
1802
+ return True
1803
+
1804
+ def is_verification_consume_stale(self) -> bool:
1805
+ return False
1806
+
1807
+ def is_verification_consume_missing(self) -> bool:
1808
+ return False
1809
+
1810
+ @dataclass(frozen=True, slots=True, kw_only=True)
1811
+ class ResetCredentialPasswordVerificationConsumeStale:
1812
+ outcome: Literal["VerificationConsumeStale"] = field(default="VerificationConsumeStale", init=False)
1813
+
1814
+ def is_password_account_stale(self) -> bool:
1815
+ return False
1816
+
1817
+ def is_password_account_missing(self) -> bool:
1818
+ return False
1819
+
1820
+ def is_credential_password_reset(self) -> bool:
1821
+ return False
1822
+
1823
+ def is_password_provider_mismatch(self) -> bool:
1824
+ return False
1825
+
1826
+ def is_verification_consume_stale(self) -> bool:
1827
+ return True
1828
+
1829
+ def is_verification_consume_missing(self) -> bool:
1830
+ return False
1831
+
1832
+ @dataclass(frozen=True, slots=True, kw_only=True)
1833
+ class ResetCredentialPasswordVerificationConsumeMissing:
1834
+ outcome: Literal["VerificationConsumeMissing"] = field(default="VerificationConsumeMissing", init=False)
1835
+
1836
+ def is_password_account_stale(self) -> bool:
1837
+ return False
1838
+
1839
+ def is_password_account_missing(self) -> bool:
1840
+ return False
1841
+
1842
+ def is_credential_password_reset(self) -> bool:
1843
+ return False
1844
+
1845
+ def is_password_provider_mismatch(self) -> bool:
1846
+ return False
1847
+
1848
+ def is_verification_consume_stale(self) -> bool:
1849
+ return False
1850
+
1851
+ def is_verification_consume_missing(self) -> bool:
1852
+ return True
1853
+
1854
+ ResetCredentialPasswordOutcome: TypeAlias = ResetCredentialPasswordPasswordAccountStale | ResetCredentialPasswordPasswordAccountMissing | ResetCredentialPasswordCredentialPasswordReset | ResetCredentialPasswordPasswordProviderMismatch | ResetCredentialPasswordVerificationConsumeStale | ResetCredentialPasswordVerificationConsumeMissing
1855
+
1611
1856
  @dataclass(frozen=True, slots=True, kw_only=True)
1612
1857
  class UpdateAccountInput:
1613
1858
  scope: str | None
@@ -1742,6 +1987,84 @@ class UpdateAccountPasswordsPasswordProviderMismatch:
1742
1987
 
1743
1988
  UpdateAccountPasswordsOutcome: TypeAlias = UpdateAccountPasswordsPasswordAccountStale | UpdateAccountPasswordsPasswordAccountMissing | UpdateAccountPasswordsAccountPasswordsUpdated | UpdateAccountPasswordsPasswordProviderMismatch
1744
1989
 
1990
+ @dataclass(frozen=True, slots=True, kw_only=True)
1991
+ class UpdateCredentialPasswordInput:
1992
+ user_id: UUID
1993
+ password: str
1994
+ account_id: UUID
1995
+ request_id: UUID
1996
+ updated_at: Timestamp
1997
+ organization_id: UUID
1998
+ expected_revision: Annotated[int, "u64"]
1999
+ external_account_id: str
2000
+
2001
+ UPDATE_CREDENTIAL_PASSWORD_PLAN_HASH: Final[str] = "08781a68739c705ab6ffe51a0de547605e1a7dd2fd2b8075445d40db923d1f15"
2002
+ @dataclass(frozen=True, slots=True, kw_only=True)
2003
+ class UpdateCredentialPasswordPasswordAccountStale:
2004
+ outcome: Literal["PasswordAccountStale"] = field(default="PasswordAccountStale", init=False)
2005
+
2006
+ def is_password_account_stale(self) -> bool:
2007
+ return True
2008
+
2009
+ def is_password_account_missing(self) -> bool:
2010
+ return False
2011
+
2012
+ def is_password_provider_mismatch(self) -> bool:
2013
+ return False
2014
+
2015
+ def is_credential_password_updated(self) -> bool:
2016
+ return False
2017
+
2018
+ @dataclass(frozen=True, slots=True, kw_only=True)
2019
+ class UpdateCredentialPasswordPasswordAccountMissing:
2020
+ outcome: Literal["PasswordAccountMissing"] = field(default="PasswordAccountMissing", init=False)
2021
+
2022
+ def is_password_account_stale(self) -> bool:
2023
+ return False
2024
+
2025
+ def is_password_account_missing(self) -> bool:
2026
+ return True
2027
+
2028
+ def is_password_provider_mismatch(self) -> bool:
2029
+ return False
2030
+
2031
+ def is_credential_password_updated(self) -> bool:
2032
+ return False
2033
+
2034
+ @dataclass(frozen=True, slots=True, kw_only=True)
2035
+ class UpdateCredentialPasswordPasswordProviderMismatch:
2036
+ outcome: Literal["PasswordProviderMismatch"] = field(default="PasswordProviderMismatch", init=False)
2037
+
2038
+ def is_password_account_stale(self) -> bool:
2039
+ return False
2040
+
2041
+ def is_password_account_missing(self) -> bool:
2042
+ return False
2043
+
2044
+ def is_password_provider_mismatch(self) -> bool:
2045
+ return True
2046
+
2047
+ def is_credential_password_updated(self) -> bool:
2048
+ return False
2049
+
2050
+ @dataclass(frozen=True, slots=True, kw_only=True)
2051
+ class UpdateCredentialPasswordCredentialPasswordUpdated:
2052
+ outcome: Literal["CredentialPasswordUpdated"] = field(default="CredentialPasswordUpdated", init=False)
2053
+
2054
+ def is_password_account_stale(self) -> bool:
2055
+ return False
2056
+
2057
+ def is_password_account_missing(self) -> bool:
2058
+ return False
2059
+
2060
+ def is_password_provider_mismatch(self) -> bool:
2061
+ return False
2062
+
2063
+ def is_credential_password_updated(self) -> bool:
2064
+ return True
2065
+
2066
+ UpdateCredentialPasswordOutcome: TypeAlias = UpdateCredentialPasswordPasswordAccountStale | UpdateCredentialPasswordPasswordAccountMissing | UpdateCredentialPasswordPasswordProviderMismatch | UpdateCredentialPasswordCredentialPasswordUpdated
2067
+
1745
2068
  @dataclass(frozen=True, slots=True, kw_only=True)
1746
2069
  class UpdateSessionInput:
1747
2070
  user_id: UUID
@@ -2248,6 +2571,23 @@ class RiffDBBetterAuthCoreClient:
2248
2571
  cursor = page.next_cursor
2249
2572
  return pages
2250
2573
 
2574
+ def find_credential_account(self, parameters: FindCredentialAccountParams, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindCredentialAccountResult]:
2575
+ if options.read_after_commit is None and self._read_after_commit is not None:
2576
+ options = QueryOptions(cursor=options.cursor, read_after_commit=self._read_after_commit, consistency=options.consistency)
2577
+ raw = self._transport._execute_named_query(
2578
+ contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
2579
+ contract_bundle_hash=CONTRACT_BUNDLE_HASH, module_hash=QUERY_MODULE_HASH,
2580
+ query_name="FindCredentialAccount", plan_hash=FIND_CREDENTIAL_ACCOUNT_QUERY_PLAN_HASH,
2581
+ parameters=encode_record(parameters), options=options,
2582
+ )
2583
+ outcomes = {
2584
+ "Found": FindCredentialAccountFound,
2585
+ }
2586
+ return raw._map_value(lambda value: decode_variant(outcomes, value))
2587
+
2588
+ def find_credential_account_after_commit(self, parameters: FindCredentialAccountParams, commit_sequence: int, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindCredentialAccountResult]:
2589
+ return self.find_credential_account(parameters, QueryOptions(cursor=options.cursor, read_after_commit=commit_sequence, consistency=options.consistency))
2590
+
2251
2591
  def find_expired_verification_ids(self, parameters: FindExpiredVerificationIdsParams, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindExpiredVerificationIdsResult]:
2252
2592
  encoded_parameters = encode_record(parameters)
2253
2593
  generated_cursor = parameters.after
@@ -2356,6 +2696,41 @@ class RiffDBBetterAuthCoreClient:
2356
2696
  def find_sessions_by_token_set_after_commit(self, parameters: FindSessionsByTokenSetParams, commit_sequence: int, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindSessionsByTokenSetResult]:
2357
2697
  return self.find_sessions_by_token_set(parameters, QueryOptions(cursor=options.cursor, read_after_commit=commit_sequence, consistency=options.consistency))
2358
2698
 
2699
+ def find_sessions_by_token_set_all(self, parameters: FindSessionsByTokenSetParams, max_pages: int = 64, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindSessionsByTokenSetFound]:
2700
+ if isinstance(max_pages, bool) or not isinstance(max_pages, int) or max_pages < 1 or max_pages > 1024:
2701
+ raise ValueError("max_pages must be an integer from 1 through 1024")
2702
+ if options.cursor is not None:
2703
+ raise ValueError("find_sessions_by_token_set_all does not accept an initial cursor")
2704
+ items = tuple(dict.fromkeys(parameters.tokens))
2705
+ if not items:
2706
+ raise ValueError("tokens must contain at least 1 item")
2707
+ pinned_head = options.read_after_commit if options.read_after_commit is not None else self._read_after_commit
2708
+ highest_head = 0
2709
+ merged: list[FindSessionsByTokenSetFoundSessions] = []
2710
+ latest_page: TypedQueryResult[FindSessionsByTokenSetResult] | None = None
2711
+ pages_remaining = max_pages
2712
+ for offset in range(0, len(items), FIND_SESSIONS_BY_TOKEN_SET_TOKENS_MAX_ITEMS):
2713
+ chunk = items[offset:offset + FIND_SESSIONS_BY_TOKEN_SET_TOKENS_MAX_ITEMS]
2714
+ chunk_cursor: str | None = None
2715
+ while True:
2716
+ if pages_remaining < 1:
2717
+ raise ValueError("find_sessions_by_token_set_all exceeded max_pages (1..=1024)")
2718
+ pages_remaining -= 1
2719
+ chunk_parameters = FindSessionsByTokenSetParams(organization_id=parameters.organization_id, tokens=chunk)
2720
+ page = self.find_sessions_by_token_set(chunk_parameters, QueryOptions(cursor=chunk_cursor, read_after_commit=pinned_head, consistency=options.consistency))
2721
+ found = page.value.unwrap_found()
2722
+ merged.extend(found.sessions)
2723
+ latest_page = page
2724
+ if page.application_head > highest_head:
2725
+ highest_head = page.application_head
2726
+ if pinned_head is None or page.application_head > pinned_head:
2727
+ pinned_head = page.application_head
2728
+ if not page.next_cursor:
2729
+ break
2730
+ chunk_cursor = page.next_cursor
2731
+ assert latest_page is not None
2732
+ return TypedQueryResult(identity=latest_page.identity, value=FindSessionsByTokenSetFound(sessions=tuple(merged)), application_head=highest_head, next_cursor=None)
2733
+
2359
2734
  def find_sessions_by_user_id(self, parameters: FindSessionsByUserIdParams, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindSessionsByUserIdResult]:
2360
2735
  encoded_parameters = encode_record(parameters)
2361
2736
  generated_cursor = parameters.after
@@ -2537,6 +2912,28 @@ class RiffDBBetterAuthCoreClient:
2537
2912
  raise ValueError("invalid bounded collection length for ConsumeVerificationSet.verification_ids")
2538
2913
  return self._transport._command_batch(inputs, options, self.consume_verification_set, progress)
2539
2914
 
2915
+ def consume_verification_snapshot(self, input: ConsumeVerificationSnapshotInput) -> TypedCommandResult[ConsumeVerificationSnapshotOutcome]:
2916
+ raw = self._transport._execute_command(
2917
+ contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
2918
+ command_name="ConsumeVerificationSnapshot", plan_hash=CONSUME_VERIFICATION_SNAPSHOT_PLAN_HASH,
2919
+ input=encode_record(input), attempts=self._command_attempts,
2920
+ )
2921
+ outcomes = {
2922
+ "VerificationConsumed": ConsumeVerificationSnapshotVerificationConsumed,
2923
+ "VerificationConsumeStale": ConsumeVerificationSnapshotVerificationConsumeStale,
2924
+ "VerificationConsumeMissing": ConsumeVerificationSnapshotVerificationConsumeMissing,
2925
+ }
2926
+ result: TypedCommandResult[ConsumeVerificationSnapshotOutcome] = raw._map_outcome(lambda value: decode_variant(outcomes, value))
2927
+ if self._track_causal_writes and result.commit_sequence is not None and result.commit_sequence > 0:
2928
+ self._read_after_commit = result.commit_sequence if self._read_after_commit is None or result.commit_sequence > self._read_after_commit else self._read_after_commit
2929
+ return result
2930
+
2931
+ def consume_verification_snapshot_batch(
2932
+ self, inputs: Sequence[ConsumeVerificationSnapshotInput], options: CommandBatchOptions,
2933
+ progress: Callable[[CommandBatchProgress], None] | None = None,
2934
+ ) -> CommandBatchResult[ConsumeVerificationSnapshotOutcome]:
2935
+ return self._transport._command_batch(inputs, options, self.consume_verification_snapshot, progress)
2936
+
2540
2937
  def create_account(self, input: CreateAccountInput) -> TypedCommandResult[CreateAccountOutcome]:
2541
2938
  raw = self._transport._execute_command(
2542
2939
  contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
@@ -2773,6 +3170,36 @@ class RiffDBBetterAuthCoreClient:
2773
3170
  raise ValueError("invalid bounded collection length for DeleteVerification.verification_ids")
2774
3171
  return self._transport._command_batch(inputs, options, self.delete_verification, progress)
2775
3172
 
3173
+ def reset_credential_password(self, input: ResetCredentialPasswordInput) -> TypedCommandResult[ResetCredentialPasswordOutcome]:
3174
+ if not 1 <= len(input.verification_ids) <= 1:
3175
+ raise ValueError("invalid bounded collection length for ResetCredentialPassword.verification_ids")
3176
+ raw = self._transport._execute_command(
3177
+ contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
3178
+ command_name="ResetCredentialPassword", plan_hash=RESET_CREDENTIAL_PASSWORD_PLAN_HASH,
3179
+ input=encode_record(input), attempts=self._command_attempts,
3180
+ )
3181
+ outcomes = {
3182
+ "PasswordAccountStale": ResetCredentialPasswordPasswordAccountStale,
3183
+ "PasswordAccountMissing": ResetCredentialPasswordPasswordAccountMissing,
3184
+ "CredentialPasswordReset": ResetCredentialPasswordCredentialPasswordReset,
3185
+ "PasswordProviderMismatch": ResetCredentialPasswordPasswordProviderMismatch,
3186
+ "VerificationConsumeStale": ResetCredentialPasswordVerificationConsumeStale,
3187
+ "VerificationConsumeMissing": ResetCredentialPasswordVerificationConsumeMissing,
3188
+ }
3189
+ result: TypedCommandResult[ResetCredentialPasswordOutcome] = raw._map_outcome(lambda value: decode_variant(outcomes, value))
3190
+ if self._track_causal_writes and result.commit_sequence is not None and result.commit_sequence > 0:
3191
+ self._read_after_commit = result.commit_sequence if self._read_after_commit is None or result.commit_sequence > self._read_after_commit else self._read_after_commit
3192
+ return result
3193
+
3194
+ def reset_credential_password_batch(
3195
+ self, inputs: Sequence[ResetCredentialPasswordInput], options: CommandBatchOptions,
3196
+ progress: Callable[[CommandBatchProgress], None] | None = None,
3197
+ ) -> CommandBatchResult[ResetCredentialPasswordOutcome]:
3198
+ for input in inputs:
3199
+ if not 1 <= len(input.verification_ids) <= 1:
3200
+ raise ValueError("invalid bounded collection length for ResetCredentialPassword.verification_ids")
3201
+ return self._transport._command_batch(inputs, options, self.reset_credential_password, progress)
3202
+
2776
3203
  def update_account(self, input: UpdateAccountInput) -> TypedCommandResult[UpdateAccountOutcome]:
2777
3204
  raw = self._transport._execute_command(
2778
3205
  contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
@@ -2823,6 +3250,29 @@ class RiffDBBetterAuthCoreClient:
2823
3250
  raise ValueError("invalid bounded collection length for UpdateAccountPasswords.updates")
2824
3251
  return self._transport._command_batch(inputs, options, self.update_account_passwords, progress)
2825
3252
 
3253
+ def update_credential_password(self, input: UpdateCredentialPasswordInput) -> TypedCommandResult[UpdateCredentialPasswordOutcome]:
3254
+ raw = self._transport._execute_command(
3255
+ contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
3256
+ command_name="UpdateCredentialPassword", plan_hash=UPDATE_CREDENTIAL_PASSWORD_PLAN_HASH,
3257
+ input=encode_record(input), attempts=self._command_attempts,
3258
+ )
3259
+ outcomes = {
3260
+ "PasswordAccountStale": UpdateCredentialPasswordPasswordAccountStale,
3261
+ "PasswordAccountMissing": UpdateCredentialPasswordPasswordAccountMissing,
3262
+ "PasswordProviderMismatch": UpdateCredentialPasswordPasswordProviderMismatch,
3263
+ "CredentialPasswordUpdated": UpdateCredentialPasswordCredentialPasswordUpdated,
3264
+ }
3265
+ result: TypedCommandResult[UpdateCredentialPasswordOutcome] = raw._map_outcome(lambda value: decode_variant(outcomes, value))
3266
+ if self._track_causal_writes and result.commit_sequence is not None and result.commit_sequence > 0:
3267
+ self._read_after_commit = result.commit_sequence if self._read_after_commit is None or result.commit_sequence > self._read_after_commit else self._read_after_commit
3268
+ return result
3269
+
3270
+ def update_credential_password_batch(
3271
+ self, inputs: Sequence[UpdateCredentialPasswordInput], options: CommandBatchOptions,
3272
+ progress: Callable[[CommandBatchProgress], None] | None = None,
3273
+ ) -> CommandBatchResult[UpdateCredentialPasswordOutcome]:
3274
+ return self._transport._command_batch(inputs, options, self.update_credential_password, progress)
3275
+
2826
3276
  def update_session(self, input: UpdateSessionInput) -> TypedCommandResult[UpdateSessionOutcome]:
2827
3277
  raw = self._transport._execute_command(
2828
3278
  contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
@@ -3235,6 +3685,23 @@ class AsyncRiffDBBetterAuthCoreClient:
3235
3685
  cursor = page.next_cursor
3236
3686
  return pages
3237
3687
 
3688
+ async def find_credential_account(self, parameters: FindCredentialAccountParams, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindCredentialAccountResult]:
3689
+ if options.read_after_commit is None and self._read_after_commit is not None:
3690
+ options = QueryOptions(cursor=options.cursor, read_after_commit=self._read_after_commit, consistency=options.consistency)
3691
+ raw = await self._transport._execute_named_query(
3692
+ contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
3693
+ contract_bundle_hash=CONTRACT_BUNDLE_HASH, module_hash=QUERY_MODULE_HASH,
3694
+ query_name="FindCredentialAccount", plan_hash=FIND_CREDENTIAL_ACCOUNT_QUERY_PLAN_HASH,
3695
+ parameters=encode_record(parameters), options=options,
3696
+ )
3697
+ outcomes = {
3698
+ "Found": FindCredentialAccountFound,
3699
+ }
3700
+ return raw._map_value(lambda value: decode_variant(outcomes, value))
3701
+
3702
+ async def find_credential_account_after_commit(self, parameters: FindCredentialAccountParams, commit_sequence: int, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindCredentialAccountResult]:
3703
+ return await self.find_credential_account(parameters, QueryOptions(cursor=options.cursor, read_after_commit=commit_sequence, consistency=options.consistency))
3704
+
3238
3705
  async def find_expired_verification_ids(self, parameters: FindExpiredVerificationIdsParams, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindExpiredVerificationIdsResult]:
3239
3706
  encoded_parameters = encode_record(parameters)
3240
3707
  generated_cursor = parameters.after
@@ -3343,6 +3810,41 @@ class AsyncRiffDBBetterAuthCoreClient:
3343
3810
  async def find_sessions_by_token_set_after_commit(self, parameters: FindSessionsByTokenSetParams, commit_sequence: int, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindSessionsByTokenSetResult]:
3344
3811
  return await self.find_sessions_by_token_set(parameters, QueryOptions(cursor=options.cursor, read_after_commit=commit_sequence, consistency=options.consistency))
3345
3812
 
3813
+ async def find_sessions_by_token_set_all(self, parameters: FindSessionsByTokenSetParams, max_pages: int = 64, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindSessionsByTokenSetFound]:
3814
+ if isinstance(max_pages, bool) or not isinstance(max_pages, int) or max_pages < 1 or max_pages > 1024:
3815
+ raise ValueError("max_pages must be an integer from 1 through 1024")
3816
+ if options.cursor is not None:
3817
+ raise ValueError("find_sessions_by_token_set_all does not accept an initial cursor")
3818
+ items = tuple(dict.fromkeys(parameters.tokens))
3819
+ if not items:
3820
+ raise ValueError("tokens must contain at least 1 item")
3821
+ pinned_head = options.read_after_commit if options.read_after_commit is not None else self._read_after_commit
3822
+ highest_head = 0
3823
+ merged: list[FindSessionsByTokenSetFoundSessions] = []
3824
+ latest_page: TypedQueryResult[FindSessionsByTokenSetResult] | None = None
3825
+ pages_remaining = max_pages
3826
+ for offset in range(0, len(items), FIND_SESSIONS_BY_TOKEN_SET_TOKENS_MAX_ITEMS):
3827
+ chunk = items[offset:offset + FIND_SESSIONS_BY_TOKEN_SET_TOKENS_MAX_ITEMS]
3828
+ chunk_cursor: str | None = None
3829
+ while True:
3830
+ if pages_remaining < 1:
3831
+ raise ValueError("find_sessions_by_token_set_all exceeded max_pages (1..=1024)")
3832
+ pages_remaining -= 1
3833
+ chunk_parameters = FindSessionsByTokenSetParams(organization_id=parameters.organization_id, tokens=chunk)
3834
+ page = await self.find_sessions_by_token_set(chunk_parameters, QueryOptions(cursor=chunk_cursor, read_after_commit=pinned_head, consistency=options.consistency))
3835
+ found = page.value.unwrap_found()
3836
+ merged.extend(found.sessions)
3837
+ latest_page = page
3838
+ if page.application_head > highest_head:
3839
+ highest_head = page.application_head
3840
+ if pinned_head is None or page.application_head > pinned_head:
3841
+ pinned_head = page.application_head
3842
+ if not page.next_cursor:
3843
+ break
3844
+ chunk_cursor = page.next_cursor
3845
+ assert latest_page is not None
3846
+ return TypedQueryResult(identity=latest_page.identity, value=FindSessionsByTokenSetFound(sessions=tuple(merged)), application_head=highest_head, next_cursor=None)
3847
+
3346
3848
  async def find_sessions_by_user_id(self, parameters: FindSessionsByUserIdParams, options: QueryOptions = QueryOptions()) -> TypedQueryResult[FindSessionsByUserIdResult]:
3347
3849
  encoded_parameters = encode_record(parameters)
3348
3850
  generated_cursor = parameters.after
@@ -3524,6 +4026,28 @@ class AsyncRiffDBBetterAuthCoreClient:
3524
4026
  raise ValueError("invalid bounded collection length for ConsumeVerificationSet.verification_ids")
3525
4027
  return await self._transport._command_batch(inputs, options, self.consume_verification_set, progress)
3526
4028
 
4029
+ async def consume_verification_snapshot(self, input: ConsumeVerificationSnapshotInput) -> TypedCommandResult[ConsumeVerificationSnapshotOutcome]:
4030
+ raw = await self._transport._execute_command(
4031
+ contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
4032
+ command_name="ConsumeVerificationSnapshot", plan_hash=CONSUME_VERIFICATION_SNAPSHOT_PLAN_HASH,
4033
+ input=encode_record(input), attempts=self._command_attempts,
4034
+ )
4035
+ outcomes = {
4036
+ "VerificationConsumed": ConsumeVerificationSnapshotVerificationConsumed,
4037
+ "VerificationConsumeStale": ConsumeVerificationSnapshotVerificationConsumeStale,
4038
+ "VerificationConsumeMissing": ConsumeVerificationSnapshotVerificationConsumeMissing,
4039
+ }
4040
+ result: TypedCommandResult[ConsumeVerificationSnapshotOutcome] = raw._map_outcome(lambda value: decode_variant(outcomes, value))
4041
+ if self._track_causal_writes and result.commit_sequence is not None and result.commit_sequence > 0:
4042
+ self._read_after_commit = result.commit_sequence if self._read_after_commit is None or result.commit_sequence > self._read_after_commit else self._read_after_commit
4043
+ return result
4044
+
4045
+ async def consume_verification_snapshot_batch(
4046
+ self, inputs: Sequence[ConsumeVerificationSnapshotInput], options: CommandBatchOptions,
4047
+ progress: Callable[[CommandBatchProgress], None] | None = None,
4048
+ ) -> CommandBatchResult[ConsumeVerificationSnapshotOutcome]:
4049
+ return await self._transport._command_batch(inputs, options, self.consume_verification_snapshot, progress)
4050
+
3527
4051
  async def create_account(self, input: CreateAccountInput) -> TypedCommandResult[CreateAccountOutcome]:
3528
4052
  raw = await self._transport._execute_command(
3529
4053
  contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
@@ -3760,6 +4284,36 @@ class AsyncRiffDBBetterAuthCoreClient:
3760
4284
  raise ValueError("invalid bounded collection length for DeleteVerification.verification_ids")
3761
4285
  return await self._transport._command_batch(inputs, options, self.delete_verification, progress)
3762
4286
 
4287
+ async def reset_credential_password(self, input: ResetCredentialPasswordInput) -> TypedCommandResult[ResetCredentialPasswordOutcome]:
4288
+ if not 1 <= len(input.verification_ids) <= 1:
4289
+ raise ValueError("invalid bounded collection length for ResetCredentialPassword.verification_ids")
4290
+ raw = await self._transport._execute_command(
4291
+ contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
4292
+ command_name="ResetCredentialPassword", plan_hash=RESET_CREDENTIAL_PASSWORD_PLAN_HASH,
4293
+ input=encode_record(input), attempts=self._command_attempts,
4294
+ )
4295
+ outcomes = {
4296
+ "PasswordAccountStale": ResetCredentialPasswordPasswordAccountStale,
4297
+ "PasswordAccountMissing": ResetCredentialPasswordPasswordAccountMissing,
4298
+ "CredentialPasswordReset": ResetCredentialPasswordCredentialPasswordReset,
4299
+ "PasswordProviderMismatch": ResetCredentialPasswordPasswordProviderMismatch,
4300
+ "VerificationConsumeStale": ResetCredentialPasswordVerificationConsumeStale,
4301
+ "VerificationConsumeMissing": ResetCredentialPasswordVerificationConsumeMissing,
4302
+ }
4303
+ result: TypedCommandResult[ResetCredentialPasswordOutcome] = raw._map_outcome(lambda value: decode_variant(outcomes, value))
4304
+ if self._track_causal_writes and result.commit_sequence is not None and result.commit_sequence > 0:
4305
+ self._read_after_commit = result.commit_sequence if self._read_after_commit is None or result.commit_sequence > self._read_after_commit else self._read_after_commit
4306
+ return result
4307
+
4308
+ async def reset_credential_password_batch(
4309
+ self, inputs: Sequence[ResetCredentialPasswordInput], options: CommandBatchOptions,
4310
+ progress: Callable[[CommandBatchProgress], None] | None = None,
4311
+ ) -> CommandBatchResult[ResetCredentialPasswordOutcome]:
4312
+ for input in inputs:
4313
+ if not 1 <= len(input.verification_ids) <= 1:
4314
+ raise ValueError("invalid bounded collection length for ResetCredentialPassword.verification_ids")
4315
+ return await self._transport._command_batch(inputs, options, self.reset_credential_password, progress)
4316
+
3763
4317
  async def update_account(self, input: UpdateAccountInput) -> TypedCommandResult[UpdateAccountOutcome]:
3764
4318
  raw = await self._transport._execute_command(
3765
4319
  contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
@@ -3810,6 +4364,29 @@ class AsyncRiffDBBetterAuthCoreClient:
3810
4364
  raise ValueError("invalid bounded collection length for UpdateAccountPasswords.updates")
3811
4365
  return await self._transport._command_batch(inputs, options, self.update_account_passwords, progress)
3812
4366
 
4367
+ async def update_credential_password(self, input: UpdateCredentialPasswordInput) -> TypedCommandResult[UpdateCredentialPasswordOutcome]:
4368
+ raw = await self._transport._execute_command(
4369
+ contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,
4370
+ command_name="UpdateCredentialPassword", plan_hash=UPDATE_CREDENTIAL_PASSWORD_PLAN_HASH,
4371
+ input=encode_record(input), attempts=self._command_attempts,
4372
+ )
4373
+ outcomes = {
4374
+ "PasswordAccountStale": UpdateCredentialPasswordPasswordAccountStale,
4375
+ "PasswordAccountMissing": UpdateCredentialPasswordPasswordAccountMissing,
4376
+ "PasswordProviderMismatch": UpdateCredentialPasswordPasswordProviderMismatch,
4377
+ "CredentialPasswordUpdated": UpdateCredentialPasswordCredentialPasswordUpdated,
4378
+ }
4379
+ result: TypedCommandResult[UpdateCredentialPasswordOutcome] = raw._map_outcome(lambda value: decode_variant(outcomes, value))
4380
+ if self._track_causal_writes and result.commit_sequence is not None and result.commit_sequence > 0:
4381
+ self._read_after_commit = result.commit_sequence if self._read_after_commit is None or result.commit_sequence > self._read_after_commit else self._read_after_commit
4382
+ return result
4383
+
4384
+ async def update_credential_password_batch(
4385
+ self, inputs: Sequence[UpdateCredentialPasswordInput], options: CommandBatchOptions,
4386
+ progress: Callable[[CommandBatchProgress], None] | None = None,
4387
+ ) -> CommandBatchResult[UpdateCredentialPasswordOutcome]:
4388
+ return await self._transport._command_batch(inputs, options, self.update_credential_password, progress)
4389
+
3813
4390
  async def update_session(self, input: UpdateSessionInput) -> TypedCommandResult[UpdateSessionOutcome]:
3814
4391
  raw = await self._transport._execute_command(
3815
4392
  contract_lineage=CONTRACT_LINEAGE, contract_version=CONTRACT_VERSION,