@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
@@ -1,7 +1,24 @@
1
- export declare const QUERY_MODULE_HASH: "18cfd99921406e15722f3ac45867d3fbe0cebd4f2ecdd86c0ba099547c58cd91";
1
+ export declare const QUERY_MODULE_HASH: "8dff3a38f6c0a915d7653e7571a2ef5795a89b452990d705f38fe0ac93b5ad9a";
2
2
  export declare const CONTRACT_LINEAGE: "RiffDBBetterAuthCore";
3
3
  export declare const CONTRACT_VERSION: 1;
4
- export declare const CONTRACT_BUNDLE_HASH: "11c5a37724f40b92bf10b195e6a66ef30037f73f3df79a98e4c4ed1076883d2e";
4
+ export declare const CONTRACT_BUNDLE_HASH: "74fd255eefcf04f0b054dbb6c4a0bed43a7312d82f7755687c9229ee3206ddfc";
5
+ export interface ContractDriverIdentity {
6
+ readonly contractLineage: typeof CONTRACT_LINEAGE;
7
+ readonly contractVersion: bigint;
8
+ readonly contractBundleHash: typeof CONTRACT_BUNDLE_HASH;
9
+ readonly role: string;
10
+ readonly database?: string;
11
+ readonly applicationManifestHash?: string;
12
+ readonly operationCatalogHash?: string;
13
+ readonly roleDefinitionHash?: string;
14
+ readonly remoteIdentityHash?: string;
15
+ }
16
+ export declare const CONTRACT_DRIVER_IDENTITY: {
17
+ readonly contractLineage: "RiffDBBetterAuthCore";
18
+ readonly contractVersion: bigint;
19
+ readonly contractBundleHash: "74fd255eefcf04f0b054dbb6c4a0bed43a7312d82f7755687c9229ee3206ddfc";
20
+ };
21
+ export declare function driverIdentity(role: string, database?: string): ContractDriverIdentity;
5
22
  export declare const APPLICATION_ERROR_REGISTRY: {
6
23
  readonly "RDB-APP-0001": readonly ["application request is structurally invalid", "input", "correct_request", readonly ["correct_input"]];
7
24
  readonly "RDB-INPUT-0101": readonly ["application input is invalid", "input", "correct_request", readonly ["correct_input"]];
@@ -248,7 +265,7 @@ export type VectorModelVersionResult = {
248
265
  readonly items: ReadonlyArray<VectorModelVersionItem>;
249
266
  readonly observedFrontier: bigint | null;
250
267
  };
251
- export declare const ADMIN_USERS_ALL_EMAIL_ASC_QUERY_PLAN_HASH: "ea5056df116418329d03bc536a195247148360378e11444c10e7ca37df54c547";
268
+ export declare const ADMIN_USERS_ALL_EMAIL_ASC_QUERY_PLAN_HASH: "056edbaabe43e1dc95f1f6af9838747f54d927a90d5bc9f2be045ae266d107d3";
252
269
  export interface AdminUsersAllEmailAscParams {
253
270
  readonly organization_id: string;
254
271
  readonly minimum_email: string;
@@ -283,7 +300,7 @@ export type AdminUsersAllEmailAscResult = AdminUsersAllEmailAscFound;
283
300
  export declare function isAdminUsersAllEmailAscFound(value: AdminUsersAllEmailAscResult): value is AdminUsersAllEmailAscFound;
284
301
  export declare function unwrapAdminUsersAllEmailAscFound(value: AdminUsersAllEmailAscResult | TypedQueryResult<AdminUsersAllEmailAscResult>): AdminUsersAllEmailAscFound;
285
302
  export declare function adminUsersAllEmailAsc(parameters: AdminUsersAllEmailAscParams): NamedQueryRequest<AdminUsersAllEmailAscParams, AdminUsersAllEmailAscResult>;
286
- export declare const ADMIN_USERS_CONTAINS_ASC_QUERY_PLAN_HASH: "56132d4a48f43731e36b69e0fe922d67491bc0ad611375fbc3d372a840b739df";
303
+ export declare const ADMIN_USERS_CONTAINS_ASC_QUERY_PLAN_HASH: "b64d213477dd2275d98422a6c3460b0cae932dd96255fe9d565005e8afa37fc4";
287
304
  export interface AdminUsersContainsAscParams {
288
305
  readonly organization_id: string;
289
306
  readonly needle: string;
@@ -318,7 +335,7 @@ export type AdminUsersContainsAscResult = AdminUsersContainsAscFound;
318
335
  export declare function isAdminUsersContainsAscFound(value: AdminUsersContainsAscResult): value is AdminUsersContainsAscFound;
319
336
  export declare function unwrapAdminUsersContainsAscFound(value: AdminUsersContainsAscResult | TypedQueryResult<AdminUsersContainsAscResult>): AdminUsersContainsAscFound;
320
337
  export declare function adminUsersContainsAsc(parameters: AdminUsersContainsAscParams): NamedQueryRequest<AdminUsersContainsAscParams, AdminUsersContainsAscResult>;
321
- export declare const ADMIN_USERS_CONTAINS_DESC_QUERY_PLAN_HASH: "470b720e68aa2261d902378ebc7fb1ce5be51582761672da7ecb87bece977f0f";
338
+ export declare const ADMIN_USERS_CONTAINS_DESC_QUERY_PLAN_HASH: "57aba8cf311c301e985adc324f97b4d963a38e6efa6058a82e248854d75f2f05";
322
339
  export interface AdminUsersContainsDescParams {
323
340
  readonly organization_id: string;
324
341
  readonly needle: string;
@@ -353,7 +370,7 @@ export type AdminUsersContainsDescResult = AdminUsersContainsDescFound;
353
370
  export declare function isAdminUsersContainsDescFound(value: AdminUsersContainsDescResult): value is AdminUsersContainsDescFound;
354
371
  export declare function unwrapAdminUsersContainsDescFound(value: AdminUsersContainsDescResult | TypedQueryResult<AdminUsersContainsDescResult>): AdminUsersContainsDescFound;
355
372
  export declare function adminUsersContainsDesc(parameters: AdminUsersContainsDescParams): NamedQueryRequest<AdminUsersContainsDescParams, AdminUsersContainsDescResult>;
356
- export declare const ADMIN_USERS_EMAIL_CONTAINS_CREATED_DESC_QUERY_PLAN_HASH: "51def4488ff2a35fee0c5d7f267daaca11e60a03521be0fdaf8923c5486c5485";
373
+ export declare const ADMIN_USERS_EMAIL_CONTAINS_CREATED_DESC_QUERY_PLAN_HASH: "7aede9eda624f5b4eb4280ca7b8a1421466ce30091177c9abab4f125987eb4ff";
357
374
  export interface AdminUsersEmailContainsCreatedDescParams {
358
375
  readonly organization_id: string;
359
376
  readonly needle: string;
@@ -388,7 +405,7 @@ export type AdminUsersEmailContainsCreatedDescResult = AdminUsersEmailContainsCr
388
405
  export declare function isAdminUsersEmailContainsCreatedDescFound(value: AdminUsersEmailContainsCreatedDescResult): value is AdminUsersEmailContainsCreatedDescFound;
389
406
  export declare function unwrapAdminUsersEmailContainsCreatedDescFound(value: AdminUsersEmailContainsCreatedDescResult | TypedQueryResult<AdminUsersEmailContainsCreatedDescResult>): AdminUsersEmailContainsCreatedDescFound;
390
407
  export declare function adminUsersEmailContainsCreatedDesc(parameters: AdminUsersEmailContainsCreatedDescParams): NamedQueryRequest<AdminUsersEmailContainsCreatedDescParams, AdminUsersEmailContainsCreatedDescResult>;
391
- export declare const ADMIN_USERS_EMAIL_CONTAINS_IMAGE_ASC_QUERY_PLAN_HASH: "fd5dc86099567113dcce8ef61c280b22f35a2c3b9e6fc592f0bcfaded4008f80";
408
+ export declare const ADMIN_USERS_EMAIL_CONTAINS_IMAGE_ASC_QUERY_PLAN_HASH: "453cb6c81f506a1f0ac99bed3cc85da59176d2cb83597d5812d771683a60cb4c";
392
409
  export interface AdminUsersEmailContainsImageAscParams {
393
410
  readonly organization_id: string;
394
411
  readonly needle: string;
@@ -423,7 +440,7 @@ export type AdminUsersEmailContainsImageAscResult = AdminUsersEmailContainsImage
423
440
  export declare function isAdminUsersEmailContainsImageAscFound(value: AdminUsersEmailContainsImageAscResult): value is AdminUsersEmailContainsImageAscFound;
424
441
  export declare function unwrapAdminUsersEmailContainsImageAscFound(value: AdminUsersEmailContainsImageAscResult | TypedQueryResult<AdminUsersEmailContainsImageAscResult>): AdminUsersEmailContainsImageAscFound;
425
442
  export declare function adminUsersEmailContainsImageAsc(parameters: AdminUsersEmailContainsImageAscParams): NamedQueryRequest<AdminUsersEmailContainsImageAscParams, AdminUsersEmailContainsImageAscResult>;
426
- export declare const ADMIN_USERS_ENDS_WITH_ASC_QUERY_PLAN_HASH: "a83229249df961abbc113e7b808af6beca7ca915835ddcd06cd5c28bb7d3c920";
443
+ export declare const ADMIN_USERS_ENDS_WITH_ASC_QUERY_PLAN_HASH: "924c7acfdcf3f7970917ac611b6eafc9175ac69f735d9e1cc01414fcc6f0e696";
427
444
  export interface AdminUsersEndsWithAscParams {
428
445
  readonly organization_id: string;
429
446
  readonly needle: string;
@@ -458,7 +475,7 @@ export type AdminUsersEndsWithAscResult = AdminUsersEndsWithAscFound;
458
475
  export declare function isAdminUsersEndsWithAscFound(value: AdminUsersEndsWithAscResult): value is AdminUsersEndsWithAscFound;
459
476
  export declare function unwrapAdminUsersEndsWithAscFound(value: AdminUsersEndsWithAscResult | TypedQueryResult<AdminUsersEndsWithAscResult>): AdminUsersEndsWithAscFound;
460
477
  export declare function adminUsersEndsWithAsc(parameters: AdminUsersEndsWithAscParams): NamedQueryRequest<AdminUsersEndsWithAscParams, AdminUsersEndsWithAscResult>;
461
- export declare const ADMIN_USERS_ENDS_WITH_DESC_QUERY_PLAN_HASH: "ac6fdfacb6f36e2a68e36429171b5d8d502b2fd43f781d72541ece961f1da93c";
478
+ export declare const ADMIN_USERS_ENDS_WITH_DESC_QUERY_PLAN_HASH: "cab8ad8456533e4ce97388948e4f703cac6f2eebb641b83a91c3b005ece7fffb";
462
479
  export interface AdminUsersEndsWithDescParams {
463
480
  readonly organization_id: string;
464
481
  readonly needle: string;
@@ -493,7 +510,7 @@ export type AdminUsersEndsWithDescResult = AdminUsersEndsWithDescFound;
493
510
  export declare function isAdminUsersEndsWithDescFound(value: AdminUsersEndsWithDescResult): value is AdminUsersEndsWithDescFound;
494
511
  export declare function unwrapAdminUsersEndsWithDescFound(value: AdminUsersEndsWithDescResult | TypedQueryResult<AdminUsersEndsWithDescResult>): AdminUsersEndsWithDescFound;
495
512
  export declare function adminUsersEndsWithDesc(parameters: AdminUsersEndsWithDescParams): NamedQueryRequest<AdminUsersEndsWithDescParams, AdminUsersEndsWithDescResult>;
496
- export declare const ADMIN_USERS_STARTS_WITH_ASC_QUERY_PLAN_HASH: "e9594b9b9631b78e8cbd9a89c4a2f1b43cb40b62ef55bb18b704f790044b2332";
513
+ export declare const ADMIN_USERS_STARTS_WITH_ASC_QUERY_PLAN_HASH: "add0aed3dbd0caea0de2857133a857d49eb7bfc0e031d117270cc873137da5ec";
497
514
  export interface AdminUsersStartsWithAscParams {
498
515
  readonly organization_id: string;
499
516
  readonly needle: string;
@@ -528,7 +545,7 @@ export type AdminUsersStartsWithAscResult = AdminUsersStartsWithAscFound;
528
545
  export declare function isAdminUsersStartsWithAscFound(value: AdminUsersStartsWithAscResult): value is AdminUsersStartsWithAscFound;
529
546
  export declare function unwrapAdminUsersStartsWithAscFound(value: AdminUsersStartsWithAscResult | TypedQueryResult<AdminUsersStartsWithAscResult>): AdminUsersStartsWithAscFound;
530
547
  export declare function adminUsersStartsWithAsc(parameters: AdminUsersStartsWithAscParams): NamedQueryRequest<AdminUsersStartsWithAscParams, AdminUsersStartsWithAscResult>;
531
- export declare const ADMIN_USERS_STARTS_WITH_DESC_QUERY_PLAN_HASH: "1f52bcc4f1f3e778f33e3e47299009ce70d3f4c541d1bed35e6f953d0e79ffea";
548
+ export declare const ADMIN_USERS_STARTS_WITH_DESC_QUERY_PLAN_HASH: "23c1561fb3956217e79d1b358be468e55c4021b887e927a4fb3c0484c92be872";
532
549
  export interface AdminUsersStartsWithDescParams {
533
550
  readonly organization_id: string;
534
551
  readonly needle: string;
@@ -563,7 +580,7 @@ export type AdminUsersStartsWithDescResult = AdminUsersStartsWithDescFound;
563
580
  export declare function isAdminUsersStartsWithDescFound(value: AdminUsersStartsWithDescResult): value is AdminUsersStartsWithDescFound;
564
581
  export declare function unwrapAdminUsersStartsWithDescFound(value: AdminUsersStartsWithDescResult | TypedQueryResult<AdminUsersStartsWithDescResult>): AdminUsersStartsWithDescFound;
565
582
  export declare function adminUsersStartsWithDesc(parameters: AdminUsersStartsWithDescParams): NamedQueryRequest<AdminUsersStartsWithDescParams, AdminUsersStartsWithDescResult>;
566
- export declare const FIND_ACCOUNT_BY_ID_QUERY_PLAN_HASH: "51ece0c8e7396f3f9efea7595a4224f856ae7984ff9bf15bcf9049427ad1f110";
583
+ export declare const FIND_ACCOUNT_BY_ID_QUERY_PLAN_HASH: "14a08df3dd8a74ea0a5622804bf0c2424086ee73eb10ce57d7df336a7d25f5ba";
567
584
  export declare const FIND_ACCOUNT_BY_ID_SECRET_OUTPUTS: readonly [{
568
585
  readonly query: "FindAccountById";
569
586
  readonly entity: "Account";
@@ -624,7 +641,7 @@ export declare function redactFindAccountByIdResult(value: FindAccountByIdResult
624
641
  readonly redactedSecretOutputs: typeof FIND_ACCOUNT_BY_ID_SECRET_OUTPUTS;
625
642
  };
626
643
  export declare function findAccountById(parameters: FindAccountByIdParams): NamedQueryRequest<FindAccountByIdParams, FindAccountByIdResult>;
627
- export declare const FIND_ACCOUNT_BY_PROVIDER_QUERY_PLAN_HASH: "b104b38050396d747e59735cea4b562c305dccb7614a973f5177501825c91089";
644
+ export declare const FIND_ACCOUNT_BY_PROVIDER_QUERY_PLAN_HASH: "e6c4517a46d725780e79725ca3fdaba2208ef4b282d49f484121eee76c043831";
628
645
  export declare const FIND_ACCOUNT_BY_PROVIDER_SECRET_OUTPUTS: readonly [{
629
646
  readonly query: "FindAccountByProvider";
630
647
  readonly entity: "Account";
@@ -686,7 +703,7 @@ export declare function redactFindAccountByProviderResult(value: FindAccountByPr
686
703
  readonly redactedSecretOutputs: typeof FIND_ACCOUNT_BY_PROVIDER_SECRET_OUTPUTS;
687
704
  };
688
705
  export declare function findAccountByProvider(parameters: FindAccountByProviderParams): NamedQueryRequest<FindAccountByProviderParams, FindAccountByProviderResult>;
689
- export declare const FIND_ACCOUNTS_BY_USER_ID_QUERY_PLAN_HASH: "0e517c2b2a10d95c12812d6374107379c80ce4638b962fad6f9092cc6b8b6c2e";
706
+ export declare const FIND_ACCOUNTS_BY_USER_ID_QUERY_PLAN_HASH: "ccdc524ca64ad667c209de25b4ce977f43b53ffdd8eb1b70fedf29fc99f27da6";
690
707
  export declare const FIND_ACCOUNTS_BY_USER_ID_SECRET_OUTPUTS: readonly [{
691
708
  readonly query: "FindAccountsByUserId";
692
709
  readonly entity: "Account";
@@ -748,7 +765,7 @@ export declare function redactFindAccountsByUserIdResult(value: FindAccountsByUs
748
765
  readonly redactedSecretOutputs: typeof FIND_ACCOUNTS_BY_USER_ID_SECRET_OUTPUTS;
749
766
  };
750
767
  export declare function findAccountsByUserId(parameters: FindAccountsByUserIdParams): NamedQueryRequest<FindAccountsByUserIdParams, FindAccountsByUserIdResult>;
751
- export declare const FIND_ACCOUNTS_BY_USER_PROVIDER_QUERY_PLAN_HASH: "44124fb19b8f7fe35bb15824b87a0ed593c86b5821e81ad7fae1ab8636725183";
768
+ export declare const FIND_ACCOUNTS_BY_USER_PROVIDER_QUERY_PLAN_HASH: "21d13b3c30b4a4059f3c436e290d11c20f0f1d1154e05fb48ae3dd0da882526d";
752
769
  export declare const FIND_ACCOUNTS_BY_USER_PROVIDER_SECRET_OUTPUTS: readonly [{
753
770
  readonly query: "FindAccountsByUserProvider";
754
771
  readonly entity: "Account";
@@ -811,7 +828,7 @@ export declare function redactFindAccountsByUserProviderResult(value: FindAccoun
811
828
  readonly redactedSecretOutputs: typeof FIND_ACCOUNTS_BY_USER_PROVIDER_SECRET_OUTPUTS;
812
829
  };
813
830
  export declare function findAccountsByUserProvider(parameters: FindAccountsByUserProviderParams): NamedQueryRequest<FindAccountsByUserProviderParams, FindAccountsByUserProviderResult>;
814
- export declare const FIND_ACTIVE_SESSIONS_BY_USER_ID_QUERY_PLAN_HASH: "218dbdff73dce68ba48b7f8a179791e6b46139ee84da3edbd96438045f60f8dc";
831
+ export declare const FIND_ACTIVE_SESSIONS_BY_USER_ID_QUERY_PLAN_HASH: "de1e5232a64a32057699b5ac21f1b43e69d755a3c143595f906fe63e16147264";
815
832
  export declare const FIND_ACTIVE_SESSIONS_BY_USER_ID_SECRET_OUTPUTS: readonly [{
816
833
  readonly query: "FindActiveSessionsByUserId";
817
834
  readonly entity: "Session";
@@ -857,7 +874,71 @@ export declare function redactFindActiveSessionsByUserIdResult(value: FindActive
857
874
  readonly redactedSecretOutputs: typeof FIND_ACTIVE_SESSIONS_BY_USER_ID_SECRET_OUTPUTS;
858
875
  };
859
876
  export declare function findActiveSessionsByUserId(parameters: FindActiveSessionsByUserIdParams): NamedQueryRequest<FindActiveSessionsByUserIdParams, FindActiveSessionsByUserIdResult>;
860
- export declare const FIND_EXPIRED_VERIFICATION_IDS_QUERY_PLAN_HASH: "e24fe82a3a724a9d45044dc668d450e61b1177f5866423c07bd33100d49428c1";
877
+ export declare const FIND_CREDENTIAL_ACCOUNT_QUERY_PLAN_HASH: "f968271d103a76cc6b2a5496f5cceffe4cff5aa39d2a370379b518d8e7d90771";
878
+ export declare const FIND_CREDENTIAL_ACCOUNT_SECRET_OUTPUTS: readonly [{
879
+ readonly query: "FindCredentialAccount";
880
+ readonly entity: "Account";
881
+ readonly field: "access_token";
882
+ }, {
883
+ readonly query: "FindCredentialAccount";
884
+ readonly entity: "Account";
885
+ readonly field: "refresh_token";
886
+ }, {
887
+ readonly query: "FindCredentialAccount";
888
+ readonly entity: "Account";
889
+ readonly field: "id_token";
890
+ }, {
891
+ readonly query: "FindCredentialAccount";
892
+ readonly entity: "Account";
893
+ readonly field: "password";
894
+ }];
895
+ export interface FindCredentialAccountParams {
896
+ readonly organization_id: string;
897
+ readonly user_id: string;
898
+ readonly account_id: string;
899
+ readonly provider_id: string;
900
+ }
901
+ export interface FindCredentialAccountFound {
902
+ readonly outcome: "Found";
903
+ readonly accounts: ReadonlyArray<{
904
+ readonly organization_id: string;
905
+ readonly user_id: string;
906
+ readonly id: string;
907
+ readonly account_id: string;
908
+ readonly provider_id: string;
909
+ readonly access_token: string | null;
910
+ readonly refresh_token: string | null;
911
+ readonly id_token: string | null;
912
+ readonly password: string | null;
913
+ readonly access_token_expires_at: {
914
+ readonly seconds: bigint;
915
+ readonly nanos: number;
916
+ } | null;
917
+ readonly refresh_token_expires_at: {
918
+ readonly seconds: bigint;
919
+ readonly nanos: number;
920
+ } | null;
921
+ readonly scope: string | null;
922
+ readonly created_at: {
923
+ readonly seconds: bigint;
924
+ readonly nanos: number;
925
+ };
926
+ readonly updated_at: {
927
+ readonly seconds: bigint;
928
+ readonly nanos: number;
929
+ };
930
+ readonly revision: bigint;
931
+ }>;
932
+ }
933
+ export type FindCredentialAccountResult = FindCredentialAccountFound;
934
+ export declare function isFindCredentialAccountFound(value: FindCredentialAccountResult): value is FindCredentialAccountFound;
935
+ export declare function unwrapFindCredentialAccountFound(value: FindCredentialAccountResult | TypedQueryResult<FindCredentialAccountResult>): FindCredentialAccountFound;
936
+ export declare function redactFindCredentialAccountResult(value: FindCredentialAccountResult): {
937
+ readonly outcome: string;
938
+ readonly redactedSecretOutputs: typeof FIND_CREDENTIAL_ACCOUNT_SECRET_OUTPUTS;
939
+ };
940
+ export declare function findCredentialAccount(parameters: FindCredentialAccountParams): NamedQueryRequest<FindCredentialAccountParams, FindCredentialAccountResult>;
941
+ export declare const FIND_EXPIRED_VERIFICATION_IDS_QUERY_PLAN_HASH: "6c799850ba3b2eb3222aac85a76f40492c46de76870075b029f3b4ac897ed8b9";
861
942
  export interface FindExpiredVerificationIdsParams {
862
943
  readonly organization_id: string;
863
944
  readonly expires_before: {
@@ -876,7 +957,7 @@ export type FindExpiredVerificationIdsResult = FindExpiredVerificationIdsFound;
876
957
  export declare function isFindExpiredVerificationIdsFound(value: FindExpiredVerificationIdsResult): value is FindExpiredVerificationIdsFound;
877
958
  export declare function unwrapFindExpiredVerificationIdsFound(value: FindExpiredVerificationIdsResult | TypedQueryResult<FindExpiredVerificationIdsResult>): FindExpiredVerificationIdsFound;
878
959
  export declare function findExpiredVerificationIds(parameters: FindExpiredVerificationIdsParams): NamedQueryRequest<FindExpiredVerificationIdsParams, FindExpiredVerificationIdsResult>;
879
- export declare const FIND_LATEST_VERIFICATION_QUERY_PLAN_HASH: "54336205fa315da75d390d062055723e36d07ef6596e19f756d319a8bc875023";
960
+ export declare const FIND_LATEST_VERIFICATION_QUERY_PLAN_HASH: "b3832c0a8a316d3fcbc62b388fbe09ceb6624b55482195f7642553467cba6fcb";
880
961
  export declare const FIND_LATEST_VERIFICATION_SECRET_OUTPUTS: readonly [{
881
962
  readonly query: "FindLatestVerification";
882
963
  readonly entity: "Verification";
@@ -915,7 +996,7 @@ export declare function redactFindLatestVerificationResult(value: FindLatestVeri
915
996
  readonly redactedSecretOutputs: typeof FIND_LATEST_VERIFICATION_SECRET_OUTPUTS;
916
997
  };
917
998
  export declare function findLatestVerification(parameters: FindLatestVerificationParams): NamedQueryRequest<FindLatestVerificationParams, FindLatestVerificationResult>;
918
- export declare const FIND_SESSION_BY_ID_QUERY_PLAN_HASH: "653cfab6a75b5e2624620b0b5504b19d36f778c8775606fa0f3bb0c1d51e6bc0";
999
+ export declare const FIND_SESSION_BY_ID_QUERY_PLAN_HASH: "c92eb2035c0e3ca7dedbaa42a4e2efe7bc4786a65213394da7f5d3beb579a2a1";
919
1000
  export declare const FIND_SESSION_BY_ID_SECRET_OUTPUTS: readonly [{
920
1001
  readonly query: "FindSessionById";
921
1002
  readonly entity: "Session";
@@ -956,7 +1037,7 @@ export declare function redactFindSessionByIdResult(value: FindSessionByIdResult
956
1037
  readonly redactedSecretOutputs: typeof FIND_SESSION_BY_ID_SECRET_OUTPUTS;
957
1038
  };
958
1039
  export declare function findSessionById(parameters: FindSessionByIdParams): NamedQueryRequest<FindSessionByIdParams, FindSessionByIdResult>;
959
- export declare const FIND_SESSION_BY_TOKEN_QUERY_PLAN_HASH: "b5e701701b0ac99b4328200089b2507f31c0be55df78a275d83f7be99f8b7061";
1040
+ export declare const FIND_SESSION_BY_TOKEN_QUERY_PLAN_HASH: "a8a12334a3d34c30d54be828bdcc9b9b77223303c3f9681e4a602c92341876ec";
960
1041
  export declare const FIND_SESSION_BY_TOKEN_SECRET_OUTPUTS: readonly [{
961
1042
  readonly query: "FindSessionByToken";
962
1043
  readonly entity: "Session";
@@ -997,7 +1078,8 @@ export declare function redactFindSessionByTokenResult(value: FindSessionByToken
997
1078
  readonly redactedSecretOutputs: typeof FIND_SESSION_BY_TOKEN_SECRET_OUTPUTS;
998
1079
  };
999
1080
  export declare function findSessionByToken(parameters: FindSessionByTokenParams): NamedQueryRequest<FindSessionByTokenParams, FindSessionByTokenResult>;
1000
- export declare const FIND_SESSIONS_BY_TOKEN_SET_QUERY_PLAN_HASH: "56c683d1815bf0c3e14c0585f314de378b43f9f4e401312c645efc70bd42969b";
1081
+ export declare const FIND_SESSIONS_BY_TOKEN_SET_QUERY_PLAN_HASH: "7e23187b537599c4c2361d34ea866b5b719f63feda0135587b5ec6afd5ce62f6";
1082
+ export declare const FIND_SESSIONS_BY_TOKEN_SET_TOKENS_MAX_ITEMS: 32;
1001
1083
  export declare const FIND_SESSIONS_BY_TOKEN_SET_SECRET_OUTPUTS: readonly [{
1002
1084
  readonly query: "FindSessionsByTokenSet";
1003
1085
  readonly entity: "Session";
@@ -1038,7 +1120,7 @@ export declare function redactFindSessionsByTokenSetResult(value: FindSessionsBy
1038
1120
  readonly redactedSecretOutputs: typeof FIND_SESSIONS_BY_TOKEN_SET_SECRET_OUTPUTS;
1039
1121
  };
1040
1122
  export declare function findSessionsByTokenSet(parameters: FindSessionsByTokenSetParams): NamedQueryRequest<FindSessionsByTokenSetParams, FindSessionsByTokenSetResult>;
1041
- export declare const FIND_SESSIONS_BY_USER_ID_QUERY_PLAN_HASH: "84de4cd840d30dc9cd575e1f1daea8de94f0efa63187b646e273ba633a5d693f";
1123
+ export declare const FIND_SESSIONS_BY_USER_ID_QUERY_PLAN_HASH: "a3277546d8b0c0059b850c368ae4925000c255e69b7ff005f4b3d2ef61b504af";
1042
1124
  export declare const FIND_SESSIONS_BY_USER_ID_SECRET_OUTPUTS: readonly [{
1043
1125
  readonly query: "FindSessionsByUserId";
1044
1126
  readonly entity: "Session";
@@ -1080,7 +1162,7 @@ export declare function redactFindSessionsByUserIdResult(value: FindSessionsByUs
1080
1162
  readonly redactedSecretOutputs: typeof FIND_SESSIONS_BY_USER_ID_SECRET_OUTPUTS;
1081
1163
  };
1082
1164
  export declare function findSessionsByUserId(parameters: FindSessionsByUserIdParams): NamedQueryRequest<FindSessionsByUserIdParams, FindSessionsByUserIdResult>;
1083
- export declare const FIND_USER_BY_EMAIL_QUERY_PLAN_HASH: "ef647a48d55b825dbe566c29b03dd3fb97444df49f991bd0441d60cbb4115078";
1165
+ export declare const FIND_USER_BY_EMAIL_QUERY_PLAN_HASH: "b167b8cb2fb5ce19685491b47da4e816665b840e0f0e463666f6302134472b9a";
1084
1166
  export interface FindUserByEmailParams {
1085
1167
  readonly organization_id: string;
1086
1168
  readonly email: string;
@@ -1108,7 +1190,7 @@ export type FindUserByEmailResult = FindUserByEmailFound;
1108
1190
  export declare function isFindUserByEmailFound(value: FindUserByEmailResult): value is FindUserByEmailFound;
1109
1191
  export declare function unwrapFindUserByEmailFound(value: FindUserByEmailResult | TypedQueryResult<FindUserByEmailResult>): FindUserByEmailFound;
1110
1192
  export declare function findUserByEmail(parameters: FindUserByEmailParams): NamedQueryRequest<FindUserByEmailParams, FindUserByEmailResult>;
1111
- export declare const FIND_USER_BY_ID_QUERY_PLAN_HASH: "45fe0e1bda91ecd52e3a5c64c656c168c1200b1869b0f68665fd9e578439b9fd";
1193
+ export declare const FIND_USER_BY_ID_QUERY_PLAN_HASH: "25d4a0a77d5df64ab6187528f9fac6b205a03c33e01c9ea6b573e8316b78b924";
1112
1194
  export interface FindUserByIdParams {
1113
1195
  readonly organization_id: string;
1114
1196
  readonly id: string;
@@ -1140,7 +1222,7 @@ export declare function isFindUserByIdFound(value: FindUserByIdResult): value is
1140
1222
  export declare function isFindUserByIdMissing(value: FindUserByIdResult): value is FindUserByIdMissing;
1141
1223
  export declare function unwrapFindUserByIdFound(value: FindUserByIdResult | TypedQueryResult<FindUserByIdResult>): FindUserByIdFound;
1142
1224
  export declare function findUserById(parameters: FindUserByIdParams): NamedQueryRequest<FindUserByIdParams, FindUserByIdResult>;
1143
- export declare const FIND_VERIFICATION_BY_ID_QUERY_PLAN_HASH: "3755eceb567801c6795c13a9e8868955cfe1bf185d204196f4c614d29f78c6aa";
1225
+ export declare const FIND_VERIFICATION_BY_ID_QUERY_PLAN_HASH: "54f07c7eba7d51857dd6473e39304dc798bf7084ca946dfa7f0203633a5133ac";
1144
1226
  export declare const FIND_VERIFICATION_BY_ID_SECRET_OUTPUTS: readonly [{
1145
1227
  readonly query: "FindVerificationById";
1146
1228
  readonly entity: "Verification";
@@ -1183,7 +1265,7 @@ export declare function redactFindVerificationByIdResult(value: FindVerification
1183
1265
  readonly redactedSecretOutputs: typeof FIND_VERIFICATION_BY_ID_SECRET_OUTPUTS;
1184
1266
  };
1185
1267
  export declare function findVerificationById(parameters: FindVerificationByIdParams): NamedQueryRequest<FindVerificationByIdParams, FindVerificationByIdResult>;
1186
- export declare const FIND_VERIFICATIONS_BY_IDENTIFIER_QUERY_PLAN_HASH: "d98f43e146032b3cd1d0dfb2eacd432795f1545fcfa00e0e45b0fbd891d8b3ed";
1268
+ export declare const FIND_VERIFICATIONS_BY_IDENTIFIER_QUERY_PLAN_HASH: "4c768ae1d966454e9b791cd57a6311476947b5c457020943a50bc3cfee90765b";
1187
1269
  export declare const FIND_VERIFICATIONS_BY_IDENTIFIER_SECRET_OUTPUTS: readonly [{
1188
1270
  readonly query: "FindVerificationsByIdentifier";
1189
1271
  readonly entity: "Verification";
@@ -1285,6 +1367,30 @@ export declare function isConsumeVerificationSetVerificationConsumeMissing(value
1285
1367
  }>;
1286
1368
  export declare const CONSUME_VERIFICATION_SET_PLAN_HASH: "cc5e0d69851c61f11bbbca45ad00bec80b32687a94272379e133fbf854d59780";
1287
1369
  export declare function consumeVerificationSet(input: ConsumeVerificationSetInput): CommandRequest<ConsumeVerificationSetInput, ConsumeVerificationSetOutcome>;
1370
+ export interface ConsumeVerificationSnapshotInput {
1371
+ readonly request_id: string;
1372
+ readonly organization_id: string;
1373
+ readonly verification_id: string;
1374
+ readonly expected_revision: bigint;
1375
+ }
1376
+ export type ConsumeVerificationSnapshotOutcome = {
1377
+ readonly outcome: "VerificationConsumed";
1378
+ } | {
1379
+ readonly outcome: "VerificationConsumeStale";
1380
+ } | {
1381
+ readonly outcome: "VerificationConsumeMissing";
1382
+ };
1383
+ export declare function isConsumeVerificationSnapshotVerificationConsumed(value: ConsumeVerificationSnapshotOutcome): value is Extract<ConsumeVerificationSnapshotOutcome, {
1384
+ readonly outcome: "VerificationConsumed";
1385
+ }>;
1386
+ export declare function isConsumeVerificationSnapshotVerificationConsumeStale(value: ConsumeVerificationSnapshotOutcome): value is Extract<ConsumeVerificationSnapshotOutcome, {
1387
+ readonly outcome: "VerificationConsumeStale";
1388
+ }>;
1389
+ export declare function isConsumeVerificationSnapshotVerificationConsumeMissing(value: ConsumeVerificationSnapshotOutcome): value is Extract<ConsumeVerificationSnapshotOutcome, {
1390
+ readonly outcome: "VerificationConsumeMissing";
1391
+ }>;
1392
+ export declare const CONSUME_VERIFICATION_SNAPSHOT_PLAN_HASH: "1a80a36f34b4699c972fc1e6f48cad3f85da54e202831a6986aea084db09788b";
1393
+ export declare function consumeVerificationSnapshot(input: ConsumeVerificationSnapshotInput): CommandRequest<ConsumeVerificationSnapshotInput, ConsumeVerificationSnapshotOutcome>;
1288
1394
  export interface CreateAccountInput {
1289
1395
  readonly id: string;
1290
1396
  readonly scope: string | null;
@@ -1639,6 +1745,54 @@ export declare function isDeleteVerificationVerificationMissing(value: DeleteVer
1639
1745
  }>;
1640
1746
  export declare const DELETE_VERIFICATION_PLAN_HASH: "bffc0c5ef5ad2b602954492d043e833785ec3f9d6f0520fbc0f933422544ae6a";
1641
1747
  export declare function deleteVerification(input: DeleteVerificationInput): CommandRequest<DeleteVerificationInput, DeleteVerificationOutcome>;
1748
+ export interface ResetCredentialPasswordInput {
1749
+ readonly user_id: string;
1750
+ readonly password: string;
1751
+ readonly account_id: string;
1752
+ readonly request_id: string;
1753
+ readonly updated_at: {
1754
+ readonly seconds: bigint;
1755
+ readonly nanos: number;
1756
+ };
1757
+ readonly organization_id: string;
1758
+ readonly account_revision: bigint;
1759
+ readonly verification_ids: ReadonlyArray<string>;
1760
+ readonly external_account_id: string;
1761
+ readonly verification_revision: bigint;
1762
+ }
1763
+ export type ResetCredentialPasswordOutcome = {
1764
+ readonly outcome: "PasswordAccountStale";
1765
+ } | {
1766
+ readonly outcome: "PasswordAccountMissing";
1767
+ } | {
1768
+ readonly outcome: "CredentialPasswordReset";
1769
+ } | {
1770
+ readonly outcome: "PasswordProviderMismatch";
1771
+ } | {
1772
+ readonly outcome: "VerificationConsumeStale";
1773
+ } | {
1774
+ readonly outcome: "VerificationConsumeMissing";
1775
+ };
1776
+ export declare function isResetCredentialPasswordPasswordAccountStale(value: ResetCredentialPasswordOutcome): value is Extract<ResetCredentialPasswordOutcome, {
1777
+ readonly outcome: "PasswordAccountStale";
1778
+ }>;
1779
+ export declare function isResetCredentialPasswordPasswordAccountMissing(value: ResetCredentialPasswordOutcome): value is Extract<ResetCredentialPasswordOutcome, {
1780
+ readonly outcome: "PasswordAccountMissing";
1781
+ }>;
1782
+ export declare function isResetCredentialPasswordCredentialPasswordReset(value: ResetCredentialPasswordOutcome): value is Extract<ResetCredentialPasswordOutcome, {
1783
+ readonly outcome: "CredentialPasswordReset";
1784
+ }>;
1785
+ export declare function isResetCredentialPasswordPasswordProviderMismatch(value: ResetCredentialPasswordOutcome): value is Extract<ResetCredentialPasswordOutcome, {
1786
+ readonly outcome: "PasswordProviderMismatch";
1787
+ }>;
1788
+ export declare function isResetCredentialPasswordVerificationConsumeStale(value: ResetCredentialPasswordOutcome): value is Extract<ResetCredentialPasswordOutcome, {
1789
+ readonly outcome: "VerificationConsumeStale";
1790
+ }>;
1791
+ export declare function isResetCredentialPasswordVerificationConsumeMissing(value: ResetCredentialPasswordOutcome): value is Extract<ResetCredentialPasswordOutcome, {
1792
+ readonly outcome: "VerificationConsumeMissing";
1793
+ }>;
1794
+ export declare const RESET_CREDENTIAL_PASSWORD_PLAN_HASH: "ed87f267831fb0823b0e9bbf51d7b302a715a95c0cea69faf7922c0e4e7f375e";
1795
+ export declare function resetCredentialPassword(input: ResetCredentialPasswordInput): CommandRequest<ResetCredentialPasswordInput, ResetCredentialPasswordOutcome>;
1642
1796
  export interface UpdateAccountInput {
1643
1797
  readonly scope: string | null;
1644
1798
  readonly user_id: string;
@@ -1723,6 +1877,42 @@ export declare function isUpdateAccountPasswordsPasswordProviderMismatch(value:
1723
1877
  }>;
1724
1878
  export declare const UPDATE_ACCOUNT_PASSWORDS_PLAN_HASH: "5f18c741b5e9c09203c67b5985af9d034fad670462ecdda32a0a1f031ef288f6";
1725
1879
  export declare function updateAccountPasswords(input: UpdateAccountPasswordsInput): CommandRequest<UpdateAccountPasswordsInput, UpdateAccountPasswordsOutcome>;
1880
+ export interface UpdateCredentialPasswordInput {
1881
+ readonly user_id: string;
1882
+ readonly password: string;
1883
+ readonly account_id: string;
1884
+ readonly request_id: string;
1885
+ readonly updated_at: {
1886
+ readonly seconds: bigint;
1887
+ readonly nanos: number;
1888
+ };
1889
+ readonly organization_id: string;
1890
+ readonly expected_revision: bigint;
1891
+ readonly external_account_id: string;
1892
+ }
1893
+ export type UpdateCredentialPasswordOutcome = {
1894
+ readonly outcome: "PasswordAccountStale";
1895
+ } | {
1896
+ readonly outcome: "PasswordAccountMissing";
1897
+ } | {
1898
+ readonly outcome: "PasswordProviderMismatch";
1899
+ } | {
1900
+ readonly outcome: "CredentialPasswordUpdated";
1901
+ };
1902
+ export declare function isUpdateCredentialPasswordPasswordAccountStale(value: UpdateCredentialPasswordOutcome): value is Extract<UpdateCredentialPasswordOutcome, {
1903
+ readonly outcome: "PasswordAccountStale";
1904
+ }>;
1905
+ export declare function isUpdateCredentialPasswordPasswordAccountMissing(value: UpdateCredentialPasswordOutcome): value is Extract<UpdateCredentialPasswordOutcome, {
1906
+ readonly outcome: "PasswordAccountMissing";
1907
+ }>;
1908
+ export declare function isUpdateCredentialPasswordPasswordProviderMismatch(value: UpdateCredentialPasswordOutcome): value is Extract<UpdateCredentialPasswordOutcome, {
1909
+ readonly outcome: "PasswordProviderMismatch";
1910
+ }>;
1911
+ export declare function isUpdateCredentialPasswordCredentialPasswordUpdated(value: UpdateCredentialPasswordOutcome): value is Extract<UpdateCredentialPasswordOutcome, {
1912
+ readonly outcome: "CredentialPasswordUpdated";
1913
+ }>;
1914
+ export declare const UPDATE_CREDENTIAL_PASSWORD_PLAN_HASH: "08781a68739c705ab6ffe51a0de547605e1a7dd2fd2b8075445d40db923d1f15";
1915
+ export declare function updateCredentialPassword(input: UpdateCredentialPasswordInput): CommandRequest<UpdateCredentialPasswordInput, UpdateCredentialPasswordOutcome>;
1726
1916
  export interface UpdateSessionInput {
1727
1917
  readonly user_id: string;
1728
1918
  readonly expires_at: {
@@ -1830,6 +2020,48 @@ export declare class RiffDBBetterAuthCoreClient {
1830
2020
  private lastCommitSeq;
1831
2021
  constructor(transport: ApplicationTransport, commandAttemptBudget?: number, defaultReadAfterCommit?: bigint, trackCausalWrites?: boolean);
1832
2022
  static fromTransport(transport: ApplicationTransport, commandAttemptBudget?: number): RiffDBBetterAuthCoreClient;
2023
+ static driverIdentity(role: string, database?: string): ContractDriverIdentity;
2024
+ static connect(driver: {
2025
+ connect(config: {
2026
+ readonly socketPath: string;
2027
+ readonly identity: ContractDriverIdentity;
2028
+ }): Promise<ApplicationTransport>;
2029
+ } | ((config: {
2030
+ readonly socketPath: string;
2031
+ readonly identity: ContractDriverIdentity;
2032
+ }) => Promise<ApplicationTransport>), options: {
2033
+ readonly socketPath: string;
2034
+ readonly role: string;
2035
+ readonly database?: string;
2036
+ readonly commandAttemptBudget?: number;
2037
+ }): Promise<RiffDBBetterAuthCoreClient>;
2038
+ static connectFromEnv(driver: {
2039
+ connectFromEnv(options: {
2040
+ readonly socketPath?: string;
2041
+ readonly role?: string;
2042
+ readonly database?: string;
2043
+ readonly tenant?: string;
2044
+ readonly prefix?: string;
2045
+ readonly envPrefix?: string;
2046
+ readonly identity: typeof CONTRACT_DRIVER_IDENTITY;
2047
+ }): Promise<ApplicationTransport>;
2048
+ } | ((options: {
2049
+ readonly socketPath?: string;
2050
+ readonly role?: string;
2051
+ readonly database?: string;
2052
+ readonly tenant?: string;
2053
+ readonly prefix?: string;
2054
+ readonly envPrefix?: string;
2055
+ readonly identity: typeof CONTRACT_DRIVER_IDENTITY;
2056
+ }) => Promise<ApplicationTransport>), options?: {
2057
+ readonly socketPath?: string;
2058
+ readonly role?: string;
2059
+ readonly database?: string;
2060
+ readonly tenant?: string;
2061
+ readonly prefix?: string;
2062
+ readonly envPrefix?: string;
2063
+ readonly commandAttemptBudget?: number;
2064
+ }): Promise<RiffDBBetterAuthCoreClient>;
1833
2065
  withReadAfterCommit(commitSequence: bigint | undefined): RiffDBBetterAuthCoreClient;
1834
2066
  causalSession(initialCommitSequence?: bigint): RiffDBBetterAuthCoreClient;
1835
2067
  get lastCommitSequence(): bigint | undefined;
@@ -1864,6 +2096,8 @@ export declare class RiffDBBetterAuthCoreClient {
1864
2096
  findActiveSessionsByUserId(parameters: FindActiveSessionsByUserIdParams, options?: QueryOptions): Promise<TypedQueryResult<FindActiveSessionsByUserIdResult>>;
1865
2097
  findActiveSessionsByUserIdAfterCommit(parameters: FindActiveSessionsByUserIdParams, commitSequence: bigint, options?: QueryOptions): Promise<TypedQueryResult<FindActiveSessionsByUserIdResult>>;
1866
2098
  findActiveSessionsByUserIdPages(parameters: FindActiveSessionsByUserIdParams, maxPages?: number, options?: QueryOptions): AsyncGenerator<TypedQueryResult<FindActiveSessionsByUserIdResult>, void, undefined>;
2099
+ findCredentialAccount(parameters: FindCredentialAccountParams, options?: QueryOptions): Promise<TypedQueryResult<FindCredentialAccountResult>>;
2100
+ findCredentialAccountAfterCommit(parameters: FindCredentialAccountParams, commitSequence: bigint, options?: QueryOptions): Promise<TypedQueryResult<FindCredentialAccountResult>>;
1867
2101
  findExpiredVerificationIds(parameters: FindExpiredVerificationIdsParams, options?: QueryOptions): Promise<TypedQueryResult<FindExpiredVerificationIdsResult>>;
1868
2102
  findExpiredVerificationIdsAfterCommit(parameters: FindExpiredVerificationIdsParams, commitSequence: bigint, options?: QueryOptions): Promise<TypedQueryResult<FindExpiredVerificationIdsResult>>;
1869
2103
  findExpiredVerificationIdsPages(parameters: FindExpiredVerificationIdsParams, maxPages?: number, options?: QueryOptions): AsyncGenerator<TypedQueryResult<FindExpiredVerificationIdsResult>, void, undefined>;
@@ -1875,6 +2109,7 @@ export declare class RiffDBBetterAuthCoreClient {
1875
2109
  findSessionByTokenAfterCommit(parameters: FindSessionByTokenParams, commitSequence: bigint, options?: QueryOptions): Promise<TypedQueryResult<FindSessionByTokenResult>>;
1876
2110
  findSessionsByTokenSet(parameters: FindSessionsByTokenSetParams, options?: QueryOptions): Promise<TypedQueryResult<FindSessionsByTokenSetResult>>;
1877
2111
  findSessionsByTokenSetAfterCommit(parameters: FindSessionsByTokenSetParams, commitSequence: bigint, options?: QueryOptions): Promise<TypedQueryResult<FindSessionsByTokenSetResult>>;
2112
+ findSessionsByTokenSetAll(parameters: FindSessionsByTokenSetParams, maxPages?: number, options?: QueryOptions): Promise<TypedQueryResult<FindSessionsByTokenSetFound>>;
1878
2113
  findSessionsByUserId(parameters: FindSessionsByUserIdParams, options?: QueryOptions): Promise<TypedQueryResult<FindSessionsByUserIdResult>>;
1879
2114
  findSessionsByUserIdAfterCommit(parameters: FindSessionsByUserIdParams, commitSequence: bigint, options?: QueryOptions): Promise<TypedQueryResult<FindSessionsByUserIdResult>>;
1880
2115
  findSessionsByUserIdPages(parameters: FindSessionsByUserIdParams, maxPages?: number, options?: QueryOptions): AsyncGenerator<TypedQueryResult<FindSessionsByUserIdResult>, void, undefined>;
@@ -1891,6 +2126,8 @@ export declare class RiffDBBetterAuthCoreClient {
1891
2126
  consumeVerificationBatch(inputs: ReadonlyArray<ConsumeVerificationInput>, options: CommandBatchOptions): Promise<CommandBatchResult<ConsumeVerificationOutcome>>;
1892
2127
  consumeVerificationSet(input: ConsumeVerificationSetInput): Promise<TypedCommandResult<ConsumeVerificationSetOutcome>>;
1893
2128
  consumeVerificationSetBatch(inputs: ReadonlyArray<ConsumeVerificationSetInput>, options: CommandBatchOptions): Promise<CommandBatchResult<ConsumeVerificationSetOutcome>>;
2129
+ consumeVerificationSnapshot(input: ConsumeVerificationSnapshotInput): Promise<TypedCommandResult<ConsumeVerificationSnapshotOutcome>>;
2130
+ consumeVerificationSnapshotBatch(inputs: ReadonlyArray<ConsumeVerificationSnapshotInput>, options: CommandBatchOptions): Promise<CommandBatchResult<ConsumeVerificationSnapshotOutcome>>;
1894
2131
  createAccount(input: CreateAccountInput): Promise<TypedCommandResult<CreateAccountOutcome>>;
1895
2132
  createAccountBatch(inputs: ReadonlyArray<CreateAccountInput>, options: CommandBatchOptions): Promise<CommandBatchResult<CreateAccountOutcome>>;
1896
2133
  createOAuthUserGraph(input: CreateOAuthUserGraphInput): Promise<TypedCommandResult<CreateOAuthUserGraphOutcome>>;
@@ -1911,10 +2148,14 @@ export declare class RiffDBBetterAuthCoreClient {
1911
2148
  deleteUserBatch(inputs: ReadonlyArray<DeleteUserInput>, options: CommandBatchOptions): Promise<CommandBatchResult<DeleteUserOutcome>>;
1912
2149
  deleteVerification(input: DeleteVerificationInput): Promise<TypedCommandResult<DeleteVerificationOutcome>>;
1913
2150
  deleteVerificationBatch(inputs: ReadonlyArray<DeleteVerificationInput>, options: CommandBatchOptions): Promise<CommandBatchResult<DeleteVerificationOutcome>>;
2151
+ resetCredentialPassword(input: ResetCredentialPasswordInput): Promise<TypedCommandResult<ResetCredentialPasswordOutcome>>;
2152
+ resetCredentialPasswordBatch(inputs: ReadonlyArray<ResetCredentialPasswordInput>, options: CommandBatchOptions): Promise<CommandBatchResult<ResetCredentialPasswordOutcome>>;
1914
2153
  updateAccount(input: UpdateAccountInput): Promise<TypedCommandResult<UpdateAccountOutcome>>;
1915
2154
  updateAccountBatch(inputs: ReadonlyArray<UpdateAccountInput>, options: CommandBatchOptions): Promise<CommandBatchResult<UpdateAccountOutcome>>;
1916
2155
  updateAccountPasswords(input: UpdateAccountPasswordsInput): Promise<TypedCommandResult<UpdateAccountPasswordsOutcome>>;
1917
2156
  updateAccountPasswordsBatch(inputs: ReadonlyArray<UpdateAccountPasswordsInput>, options: CommandBatchOptions): Promise<CommandBatchResult<UpdateAccountPasswordsOutcome>>;
2157
+ updateCredentialPassword(input: UpdateCredentialPasswordInput): Promise<TypedCommandResult<UpdateCredentialPasswordOutcome>>;
2158
+ updateCredentialPasswordBatch(inputs: ReadonlyArray<UpdateCredentialPasswordInput>, options: CommandBatchOptions): Promise<CommandBatchResult<UpdateCredentialPasswordOutcome>>;
1918
2159
  updateSession(input: UpdateSessionInput): Promise<TypedCommandResult<UpdateSessionOutcome>>;
1919
2160
  updateSessionBatch(inputs: ReadonlyArray<UpdateSessionInput>, options: CommandBatchOptions): Promise<CommandBatchResult<UpdateSessionOutcome>>;
1920
2161
  updateUser(input: UpdateUserInput): Promise<TypedCommandResult<UpdateUserOutcome>>;