@yielded/auth-persistence-drizzle 0.1.0-beta.0 → 0.1.0-beta.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 (204) hide show
  1. package/README.md +6 -1
  2. package/dist/D1.d.mts +135 -25
  3. package/dist/D1.mjs +1 -3
  4. package/dist/D1.mjs.map +1 -1
  5. package/dist/Libsql.d.mts +192 -75
  6. package/dist/Libsql.mjs +1 -7
  7. package/dist/Libsql.mjs.map +1 -1
  8. package/dist/Mysql2.d.mts +177 -37
  9. package/dist/Mysql2.mjs +1 -3
  10. package/dist/Mysql2.mjs.map +1 -1
  11. package/dist/Pglite.d.mts +171 -30
  12. package/dist/Pglite.mjs +2 -3
  13. package/dist/Pglite.mjs.map +1 -1
  14. package/dist/Postgres.d.mts +177 -36
  15. package/dist/Postgres.mjs +2 -3
  16. package/dist/Postgres.mjs.map +1 -1
  17. package/dist/SqliteBun.d.mts +192 -74
  18. package/dist/SqliteBun.mjs +1 -5
  19. package/dist/SqliteBun.mjs.map +1 -1
  20. package/dist/SqliteDo.d.mts +194 -110
  21. package/dist/SqliteDo.mjs +2 -32
  22. package/dist/SqliteDo.mjs.map +1 -1
  23. package/dist/SqliteNode.d.mts +190 -72
  24. package/dist/SqliteNode.mjs +1 -5
  25. package/dist/SqliteNode.mjs.map +1 -1
  26. package/dist/SqliteWasm.d.mts +192 -74
  27. package/dist/SqliteWasm.mjs +1 -5
  28. package/dist/SqliteWasm.mjs.map +1 -1
  29. package/dist/drizzle/D1BatchStatements.d.mts +1 -1
  30. package/dist/drizzle/D1BatchStatements.mjs.map +1 -1
  31. package/dist/drizzle/d1-emails.mjs.map +1 -1
  32. package/dist/drizzle/d1-generated-statement.mjs.map +1 -1
  33. package/dist/drizzle/d1-identity.d.mts +1 -1
  34. package/dist/drizzle/d1-oauth.d.mts +35 -5
  35. package/dist/drizzle/d1-oauth.mjs +1 -1
  36. package/dist/drizzle/d1-password-prepared.mjs.map +1 -1
  37. package/dist/drizzle/d1-passwords.d.mts +1 -1
  38. package/dist/drizzle/d1-passwords.mjs.map +1 -1
  39. package/dist/drizzle/d1-proofs.d.mts +1 -1
  40. package/dist/drizzle/d1-proofs.mjs.map +1 -1
  41. package/dist/drizzle/d1-sessions.d.mts +3 -3
  42. package/dist/drizzle/d1-sessions.mjs.map +1 -1
  43. package/dist/drizzle/email-registration.d.mts +1 -1
  44. package/dist/drizzle/email-target.d.mts +1 -1
  45. package/dist/drizzle/email-target.mjs.map +1 -1
  46. package/dist/drizzle/model.d.mts +2 -126
  47. package/dist/drizzle/model.mjs +2 -21
  48. package/dist/drizzle/model.mjs.map +1 -1
  49. package/dist/drizzle/mysql-emails.d.mts +1 -1
  50. package/dist/drizzle/mysql-emails.mjs.map +1 -1
  51. package/dist/drizzle/mysql-identity.d.mts +1 -1
  52. package/dist/drizzle/mysql-password-prepared.d.mts +1 -1
  53. package/dist/drizzle/mysql-password-prepared.mjs.map +1 -1
  54. package/dist/drizzle/mysql-passwords.d.mts +1 -1
  55. package/dist/drizzle/mysql-passwords.mjs.map +1 -1
  56. package/dist/drizzle/mysql-proofs.d.mts +1 -1
  57. package/dist/drizzle/mysql-proofs.mjs.map +1 -1
  58. package/dist/drizzle/mysql-sessions.d.mts +1 -1
  59. package/dist/drizzle/mysql-sessions.mjs.map +1 -1
  60. package/dist/drizzle/oauth-accounts.mjs +1 -1
  61. package/dist/drizzle/oauth-connected-access.mjs +14 -12
  62. package/dist/drizzle/oauth-connected-access.mjs.map +1 -1
  63. package/dist/drizzle/oauth-connected-custody.mjs +2 -2
  64. package/dist/drizzle/oauth-connected-drivers.mjs +4 -1
  65. package/dist/drizzle/oauth-connected-drivers.mjs.map +1 -1
  66. package/dist/drizzle/oauth-connected-flow.mjs +2 -2
  67. package/dist/drizzle/oauth-connected-input.mjs +14 -1
  68. package/dist/drizzle/oauth-connected-input.mjs.map +1 -1
  69. package/dist/drizzle/oauth-connected-maintenance.mjs +1 -1
  70. package/dist/drizzle/oauth-connected-management.mjs +2 -2
  71. package/dist/drizzle/oauth-connected-model.d.mts +17 -3
  72. package/dist/drizzle/oauth-connected-model.mjs.map +1 -1
  73. package/dist/drizzle/oauth-connected-settlement.mjs +51 -41
  74. package/dist/drizzle/oauth-connected-settlement.mjs.map +1 -1
  75. package/dist/drizzle/oauth-connected-sign-in.mjs +263 -0
  76. package/dist/drizzle/oauth-connected-sign-in.mjs.map +1 -0
  77. package/dist/drizzle/oauth-connected-state.d.mts +110 -2
  78. package/dist/drizzle/oauth-connected-state.mjs +9 -4
  79. package/dist/drizzle/oauth-connected-state.mjs.map +1 -1
  80. package/dist/drizzle/oauth-connected-target.d.mts +137 -9
  81. package/dist/drizzle/oauth-connected-target.mjs +6 -2
  82. package/dist/drizzle/oauth-connected-target.mjs.map +1 -1
  83. package/dist/drizzle/oauth-drivers.mjs +1 -1
  84. package/dist/drizzle/oauth-flow.d.mts +1 -1
  85. package/dist/drizzle/oauth-flow.mjs +1 -1
  86. package/dist/drizzle/oauth-input.mjs +1 -1
  87. package/dist/drizzle/oauth-model.d.mts +1 -1
  88. package/dist/drizzle/oauth-owner.d.mts +1 -1
  89. package/dist/drizzle/oauth-registration.d.mts +2 -2
  90. package/dist/drizzle/oauth-registration.mjs +1 -1
  91. package/dist/drizzle/oauth-state.mjs +5 -4
  92. package/dist/drizzle/oauth-state.mjs.map +1 -1
  93. package/dist/drizzle/oauth-target.d.mts +2 -2
  94. package/dist/drizzle/oauth-target.mjs +1 -1
  95. package/dist/drizzle/oauth-target.mjs.map +1 -1
  96. package/dist/drizzle/passkey-write-target.d.mts +1 -1
  97. package/dist/drizzle/password-prepared-state.mjs +1 -1
  98. package/dist/drizzle/password-prepared-target.d.mts +1 -1
  99. package/dist/drizzle/password-prepared-target.mjs.map +1 -1
  100. package/dist/drizzle/password-target.d.mts +1 -1
  101. package/dist/drizzle/password-target.mjs.map +1 -1
  102. package/dist/drizzle/pg-emails.d.mts +1 -1
  103. package/dist/drizzle/pg-emails.mjs.map +1 -1
  104. package/dist/drizzle/pg-identity.d.mts +22 -0
  105. package/dist/drizzle/pg-identity.mjs +89 -0
  106. package/dist/drizzle/pg-identity.mjs.map +1 -0
  107. package/dist/drizzle/pg-password-prepared.d.mts +1 -1
  108. package/dist/drizzle/pg-password-prepared.mjs.map +1 -1
  109. package/dist/drizzle/pg-passwords.d.mts +1 -1
  110. package/dist/drizzle/pg-passwords.mjs.map +1 -1
  111. package/dist/drizzle/pg-proofs.d.mts +1 -1
  112. package/dist/drizzle/pg-proofs.mjs.map +1 -1
  113. package/dist/drizzle/pg-sessions.d.mts +1 -1
  114. package/dist/drizzle/pg-sessions.mjs.map +1 -1
  115. package/dist/drizzle/phone-model.d.mts +1 -1
  116. package/dist/drizzle/phone-target.d.mts +1 -1
  117. package/dist/drizzle/phone-target.mjs.map +1 -1
  118. package/dist/drizzle/proof-target.d.mts +1 -1
  119. package/dist/drizzle/proof-target.mjs.map +1 -1
  120. package/dist/drizzle/session-target.d.mts +1 -1
  121. package/dist/drizzle/session-target.mjs.map +1 -1
  122. package/dist/drizzle/sqlite-emails.mjs.map +1 -1
  123. package/dist/drizzle/sqlite-password-prepared.mjs.map +1 -1
  124. package/dist/drizzle/sqlite-passwords.mjs.map +1 -1
  125. package/dist/drizzle/sqlite-proofs.mjs.map +1 -1
  126. package/dist/drizzle/sqlite-sessions.mjs.map +1 -1
  127. package/dist/drizzle/standalone-guard.mjs.map +1 -1
  128. package/dist/drizzle/totp-model.d.mts +1 -1
  129. package/dist/drizzle/totp-target.d.mts +1 -1
  130. package/dist/drizzle/totp-target.mjs.map +1 -1
  131. package/dist/drizzle/transaction-mysql.mjs +1 -1
  132. package/dist/drizzle/transaction-mysql.mjs.map +1 -1
  133. package/dist/index.d.mts +2 -4
  134. package/dist/index.mjs +2 -4
  135. package/dist/internal/drizzle-postgres.mjs.map +1 -1
  136. package/dist/internal/drizzle-sqlite.mjs.map +1 -1
  137. package/package.json +1 -1
  138. package/src/D1.ts +1 -17
  139. package/src/Libsql.ts +0 -44
  140. package/src/Mysql2.ts +1 -23
  141. package/src/Pglite.ts +2 -18
  142. package/src/Postgres.ts +2 -18
  143. package/src/SqliteBun.ts +1 -38
  144. package/src/SqliteDo.ts +1 -256
  145. package/src/SqliteNode.ts +1 -38
  146. package/src/SqliteWasm.ts +1 -38
  147. package/src/drizzle/D1BatchStatements.ts +1 -1
  148. package/src/drizzle/d1-emails.ts +2 -4
  149. package/src/drizzle/d1-generated-statement.ts +1 -1
  150. package/src/drizzle/d1-password-prepared.ts +2 -5
  151. package/src/drizzle/d1-passwords.ts +2 -4
  152. package/src/drizzle/d1-proofs.ts +2 -4
  153. package/src/drizzle/d1-sessions.ts +2 -2
  154. package/src/drizzle/email-target.ts +1 -1
  155. package/src/drizzle/model.ts +1 -208
  156. package/src/drizzle/mysql-emails.ts +1 -1
  157. package/src/drizzle/mysql-password-prepared.ts +1 -1
  158. package/src/drizzle/mysql-passwords.ts +1 -1
  159. package/src/drizzle/mysql-proofs.ts +1 -1
  160. package/src/drizzle/mysql-sessions.ts +1 -1
  161. package/src/drizzle/oauth-connected-access.ts +8 -1
  162. package/src/drizzle/oauth-connected-drivers.ts +3 -0
  163. package/src/drizzle/oauth-connected-input.ts +13 -0
  164. package/src/drizzle/oauth-connected-model.ts +17 -0
  165. package/src/drizzle/oauth-connected-settlement.ts +65 -42
  166. package/src/drizzle/oauth-connected-sign-in.ts +438 -0
  167. package/src/drizzle/oauth-connected-state.ts +19 -7
  168. package/src/drizzle/oauth-connected-target.ts +10 -1
  169. package/src/drizzle/oauth-state.ts +5 -4
  170. package/src/drizzle/oauth-target.ts +1 -1
  171. package/src/drizzle/password-prepared-target.ts +1 -1
  172. package/src/drizzle/password-target.ts +1 -1
  173. package/src/drizzle/pg-emails.ts +1 -1
  174. package/src/drizzle/pg-identity.ts +301 -0
  175. package/src/drizzle/pg-password-prepared.ts +1 -1
  176. package/src/drizzle/pg-passwords.ts +1 -1
  177. package/src/drizzle/pg-proofs.ts +1 -1
  178. package/src/drizzle/pg-sessions.ts +1 -1
  179. package/src/drizzle/phone-target.ts +1 -1
  180. package/src/drizzle/proof-target.ts +1 -1
  181. package/src/drizzle/session-target.ts +1 -1
  182. package/src/drizzle/sqlite-emails.ts +1 -1
  183. package/src/drizzle/sqlite-password-prepared.ts +1 -1
  184. package/src/drizzle/sqlite-passwords.ts +1 -1
  185. package/src/drizzle/sqlite-proofs.ts +1 -1
  186. package/src/drizzle/sqlite-sessions.ts +1 -1
  187. package/src/drizzle/standalone-guard.ts +1 -1
  188. package/src/drizzle/totp-target.ts +1 -1
  189. package/src/drizzle/transaction-mysql.ts +1 -1
  190. package/src/index.ts +0 -24
  191. package/src/internal/drizzle-postgres.ts +1 -1
  192. package/src/internal/drizzle-sqlite.ts +1 -1
  193. package/dist/drizzle/mysql.d.mts +0 -69
  194. package/dist/drizzle/mysql.mjs +0 -218
  195. package/dist/drizzle/mysql.mjs.map +0 -1
  196. package/dist/drizzle/pg.d.mts +0 -80
  197. package/dist/drizzle/pg.mjs +0 -289
  198. package/dist/drizzle/pg.mjs.map +0 -1
  199. package/dist/drizzle/sqlite.d.mts +0 -77
  200. package/dist/drizzle/sqlite.mjs +0 -217
  201. package/dist/drizzle/sqlite.mjs.map +0 -1
  202. package/src/drizzle/mysql.ts +0 -687
  203. package/src/drizzle/pg.ts +0 -984
  204. package/src/drizzle/sqlite.ts +0 -705
package/dist/Libsql.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import { sqlClientOAuthStandaloneGuard } from "./drizzle/oauth-target.mjs";
2
2
  import { passwordPreparedPersistenceLayer } from "./drizzle/password-prepared-target.mjs";
3
3
  import { makeTotpTarget, sqlClientTotpStandaloneGuard } from "./drizzle/totp-target.mjs";
4
- import { coordinateSqliteAuthStoreTransaction, coordinateSqliteAuthTransaction, coordinateSqliteOAuthStateTransaction, makeSqliteAuthServices, makeSqliteAuthStoreServices, makeSqliteOAuthStateServices } from "./drizzle/sqlite.mjs";
5
4
  import { sqlClientPasskeyStandaloneGuard } from "./drizzle/passkey-target.mjs";
6
5
  import { makePasskeyTarget } from "./drizzle/passkey-drivers.mjs";
7
6
  import { makePhoneTarget, sqlClientPhoneStandaloneGuard } from "./drizzle/phone-target.mjs";
@@ -15,7 +14,6 @@ import { makeOAuthTarget } from "./drizzle/oauth-drivers.mjs";
15
14
  import { drizzleMigrationsLayer } from "./internal/drizzle-migrations.mjs";
16
15
  import { sqlitePersistence } from "./internal/drizzle-sqlite.mjs";
17
16
  import { requireStandalone } from "@yielded/auth-persistence/Adapter";
18
- import { AuthStoreError } from "@yielded/auth/Errors";
19
17
  import { Effect } from "effect";
20
18
  import { SessionUnavailable } from "@yielded/auth/Sessions";
21
19
  import { EmailUnavailable } from "@yielded/auth/Email";
@@ -23,7 +21,6 @@ import { ProofUnavailable } from "@yielded/auth/Proofs";
23
21
  import { PasswordUnavailable } from "@yielded/auth/Password";
24
22
  import { makeWithDefaults } from "drizzle-orm/effect-libsql";
25
23
  //#region src/Libsql.ts
26
- const requireStandalone$1 = requireStandalone(() => AuthStoreError.make({ message: "Use the decision consume API inside an outer database transaction" }));
27
24
  const requireStandaloneSession = requireStandalone(() => SessionUnavailable.make({}));
28
25
  const requireStandaloneProof = requireStandalone(() => ProofUnavailable.make({}));
29
26
  const requireStandalonePassword = requireStandalone(() => PasswordUnavailable.make({}));
@@ -36,9 +33,6 @@ const { coordinatePasswordPersistence, coordinatePasswordRegistration, makePassw
36
33
  const { coordinateProofPersistence, makeProofPersistenceServices } = proofTarget;
37
34
  const { coordinateAuthenticationAuthority, coordinatePendingAuthentication, coordinateSignedSessionValidity, coordinateStatefulSessions, makeAuthenticationAuthorityServices, makePendingAuthenticationServices, makeSessionStepUpServices, coordinateSessionStepUp, makeSignedSessionValidityServices, makeStatefulSessionServices } = sessionTarget;
38
35
  const commitMode = "interactive";
39
- const makeAuthStoreServices = (database, mapping) => makeSqliteAuthStoreServices(database, mapping, requireStandalone$1);
40
- const makeOAuthStateServices = (database, mapping) => makeSqliteOAuthStateServices(database, mapping, requireStandalone$1);
41
- const makeAuthServices = (database, mapping) => makeSqliteAuthServices(database, mapping, requireStandalone$1);
42
36
  const makeIdentityServices = (database, mapping) => makeSqliteIdentityServices(database, mapping, "interactive");
43
37
  const makeSubjectProvisioningServices = (database, mapping) => makeSqliteSubjectProvisioningServices(database, mapping, "interactive");
44
38
  const makeExternalIdentityServices = (database, mapping) => makeSqliteExternalIdentityServices(database, mapping);
@@ -72,6 +66,6 @@ const AuthPersistence = {
72
66
  migrationsLayer: drizzleMigrationsLayer(makeWithDefaults({}), Effect.promise(() => import("drizzle-orm/effect-libsql/migrator")).pipe(Effect.map((module) => module.migrate)))
73
67
  };
74
68
  //#endregion
75
- export { AuthPersistence, commitMode, coordinateSqliteAuthStoreTransaction as coordinateAuthStoreTransaction, coordinateSqliteAuthTransaction as coordinateAuthTransaction, coordinateAuthenticationAuthority, coordinateEmailAddress, coordinateEmailRegistration, coordinateOAuthAccounts, coordinateOAuthConnected, coordinateOAuthConnectedRevocations, coordinateOAuthRegistration, coordinateOAuthRegistrationIntents, coordinateOAuthSignIn, coordinateSqliteOAuthStateTransaction as coordinateOAuthStateTransaction, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinatePasswordPersistence, coordinatePasswordPreparedPersistence, coordinatePasswordRegistration, coordinatePendingAuthentication, coordinatePhonePersistence, coordinateProofPersistence, coordinateSessionStepUp, coordinateSignedSessionValidity, coordinateStatefulSessions, coordinateTotpPersistence, makeAuthServices, makeAuthStoreServices, makeAuthenticationAuthorityServices, makeEmailAddressServices, makeEmailRegistrationServices, makeEmailSignInServices, makeExternalIdentityServices, makeIdentityServices, makeOAuthAccountsServices, makeOAuthConnectedRevocationServices, makeOAuthConnectedServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, makeOAuthSignInServices, makeOAuthStateServices, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices, makePasswordPersistenceServices, makePasswordPreparedPersistenceServices, makePasswordRegistrationServices, makePendingAuthenticationServices, makePhonePersistenceServices, makeProofPersistenceServices, makeSessionStepUpServices, makeSignedSessionValidityServices, makeStatefulSessionServices, makeSubjectProvisioningServices, makeTotpPersistenceServices, passwordPreparedPersistenceLayer };
69
+ export { AuthPersistence, commitMode, coordinateAuthenticationAuthority, coordinateEmailAddress, coordinateEmailRegistration, coordinateOAuthAccounts, coordinateOAuthConnected, coordinateOAuthConnectedRevocations, coordinateOAuthRegistration, coordinateOAuthRegistrationIntents, coordinateOAuthSignIn, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinatePasswordPersistence, coordinatePasswordPreparedPersistence, coordinatePasswordRegistration, coordinatePendingAuthentication, coordinatePhonePersistence, coordinateProofPersistence, coordinateSessionStepUp, coordinateSignedSessionValidity, coordinateStatefulSessions, coordinateTotpPersistence, makeAuthenticationAuthorityServices, makeEmailAddressServices, makeEmailRegistrationServices, makeEmailSignInServices, makeExternalIdentityServices, makeIdentityServices, makeOAuthAccountsServices, makeOAuthConnectedRevocationServices, makeOAuthConnectedServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, makeOAuthSignInServices, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices, makePasswordPersistenceServices, makePasswordPreparedPersistenceServices, makePasswordRegistrationServices, makePendingAuthenticationServices, makePhonePersistenceServices, makeProofPersistenceServices, makeSessionStepUpServices, makeSignedSessionValidityServices, makeStatefulSessionServices, makeSubjectProvisioningServices, makeTotpPersistenceServices, passwordPreparedPersistenceLayer };
76
70
 
77
71
  //# sourceMappingURL=Libsql.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Libsql.mjs","names":["requireStandalone","standalone"],"sources":["../src/Libsql.ts"],"sourcesContent":["import { requireStandalone as standalone } from \"@yielded/auth-persistence/Adapter\";\nimport { EmailUnavailable } from \"@yielded/auth/Email\";\nimport { AuthStoreError } from \"@yielded/auth/Errors\";\nimport { PasswordUnavailable } from \"@yielded/auth/Password\";\nimport { ProofUnavailable } from \"@yielded/auth/Proofs\";\nimport { SessionUnavailable } from \"@yielded/auth/Sessions\";\nimport type { AnyRelations } from \"drizzle-orm\";\nimport { type EffectLibsqlDatabase, makeWithDefaults } from \"drizzle-orm/effect-libsql\";\nimport type { AnySQLiteTable } from \"drizzle-orm/sqlite-core\";\nimport { Effect } from \"effect\";\n\nimport type {\n AuthStoreTables,\n AuthTables,\n ExternalIdentityTables,\n IdentityTables,\n OAuthStateTables,\n SubjectProvisioningTables,\n} from \"./drizzle/model\";\nimport {\n coordinateSqliteAuthStoreTransaction,\n coordinateSqliteAuthTransaction,\n coordinateSqliteOAuthStateTransaction,\n makeSqliteAuthServices,\n makeSqliteAuthStoreServices,\n makeSqliteOAuthStateServices,\n} from \"./drizzle/sqlite\";\n\nexport {\n coordinateSqliteAuthStoreTransaction as coordinateAuthStoreTransaction,\n coordinateSqliteAuthTransaction as coordinateAuthTransaction,\n coordinateSqliteOAuthStateTransaction as coordinateOAuthStateTransaction,\n};\n\nimport { makeSqliteEmailTarget, sqliteEmailConfiguration } from \"./drizzle/sqlite-emails\";\nimport {\n makeSqliteExternalIdentityServices,\n makeSqliteIdentityServices,\n makeSqliteSubjectProvisioningServices,\n} from \"./drizzle/sqlite-identity\";\nimport { makeSqlitePasswordTarget, sqlitePasswordConfiguration } from \"./drizzle/sqlite-passwords\";\nimport { makeSqliteProofTarget, sqliteProofConfiguration } from \"./drizzle/sqlite-proofs\";\nimport { makeSqliteSessionTarget, sqliteSessionConfiguration } from \"./drizzle/sqlite-sessions\";\n\nconst requireStandalone = standalone(() =>\n AuthStoreError.make({\n message: \"Use the decision consume API inside an outer database transaction\",\n }),\n);\n\nconst requireStandaloneSession = standalone(() => SessionUnavailable.make({}));\nconst requireStandaloneProof = standalone(() => ProofUnavailable.make({}));\nconst requireStandalonePassword = standalone(() => PasswordUnavailable.make({}));\nconst requireStandaloneEmail = standalone(() => EmailUnavailable.make({}));\n\nconst sessionTarget = makeSqliteSessionTarget<EffectLibsqlDatabase<AnyRelations>>(\n sqliteSessionConfiguration(\"interactive\", requireStandaloneSession),\n);\n\nconst proofTarget = makeSqliteProofTarget<EffectLibsqlDatabase<AnyRelations>>(\n sqliteProofConfiguration(\"interactive\", requireStandaloneProof),\n);\n\nconst passwordTarget = makeSqlitePasswordTarget<EffectLibsqlDatabase<AnyRelations>>(\n sqlitePasswordConfiguration(\"interactive\", requireStandalonePassword, requireStandaloneProof),\n);\n\nconst emailTarget = makeSqliteEmailTarget<EffectLibsqlDatabase<AnyRelations>>(\n sqliteEmailConfiguration(\"interactive\", requireStandaloneEmail, requireStandaloneProof),\n);\n\nexport const {\n coordinateEmailAddress,\n coordinateEmailRegistration,\n makeEmailAddressServices,\n makeEmailRegistrationServices,\n makeEmailSignInServices,\n} = emailTarget;\n\nexport const {\n coordinatePasswordPersistence,\n coordinatePasswordRegistration,\n makePasswordPersistenceServices,\n makePasswordRegistrationServices,\n} = passwordTarget;\n\nexport const { coordinateProofPersistence, makeProofPersistenceServices } = proofTarget;\n\nexport const {\n coordinateAuthenticationAuthority,\n coordinatePendingAuthentication,\n coordinateSignedSessionValidity,\n coordinateStatefulSessions,\n makeAuthenticationAuthorityServices,\n makePendingAuthenticationServices,\n makeSessionStepUpServices,\n coordinateSessionStepUp,\n makeSignedSessionValidityServices,\n makeStatefulSessionServices,\n} = sessionTarget;\n\nexport const commitMode = \"interactive\" as const;\n\nexport const makeAuthStoreServices = <C extends AnySQLiteTable, R extends AnySQLiteTable>(\n database: EffectLibsqlDatabase<AnyRelations>,\n mapping: AuthStoreTables<C, R>,\n) => makeSqliteAuthStoreServices(database, mapping, requireStandalone);\n\nexport const makeOAuthStateServices = <S extends AnySQLiteTable>(\n database: EffectLibsqlDatabase<AnyRelations>,\n mapping: OAuthStateTables<S>,\n) => makeSqliteOAuthStateServices(database, mapping, requireStandalone);\n\nexport const makeAuthServices = <\n C extends AnySQLiteTable,\n R extends AnySQLiteTable,\n S extends AnySQLiteTable,\n>(\n database: EffectLibsqlDatabase<AnyRelations>,\n mapping: AuthTables<C, R, S>,\n) => makeSqliteAuthServices(database, mapping, requireStandalone);\n\nexport const makeIdentityServices = <\n Subject extends AnySQLiteTable,\n Identifier extends AnySQLiteTable,\n External extends AnySQLiteTable,\n Request extends AnySQLiteTable,\n NativeId,\n>(\n database: EffectLibsqlDatabase<AnyRelations>,\n mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>,\n) => makeSqliteIdentityServices(database, mapping, \"interactive\");\n\nexport const makeSubjectProvisioningServices = <\n Subject extends AnySQLiteTable,\n Identifier extends AnySQLiteTable,\n Request extends AnySQLiteTable,\n NativeId,\n>(\n database: EffectLibsqlDatabase<AnyRelations>,\n mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>,\n) => makeSqliteSubjectProvisioningServices(database, mapping, \"interactive\");\n\nexport const makeExternalIdentityServices = <\n Subject extends AnySQLiteTable,\n External extends AnySQLiteTable,\n NativeId,\n>(\n database: EffectLibsqlDatabase<AnyRelations>,\n mapping: ExternalIdentityTables<Subject, External, NativeId>,\n) => makeSqliteExternalIdentityServices(database, mapping);\n\nimport { makeSqlitePasswordPreparedTarget } from \"./drizzle/sqlite-password-prepared\";\n\nconst passwordPreparedTarget = makeSqlitePasswordPreparedTarget<EffectLibsqlDatabase<AnyRelations>>(\n sqlitePasswordConfiguration(\"interactive\", requireStandalonePassword, requireStandaloneProof),\n);\n\nexport const { makePasswordPreparedPersistenceServices, coordinatePasswordPreparedPersistence } =\n passwordPreparedTarget;\n\nexport { passwordPreparedPersistenceLayer } from \"./drizzle/password-prepared-target\";\n\nimport { makeOAuthTarget } from \"./drizzle/oauth-drivers\";\nimport { sqlClientOAuthStandaloneGuard } from \"./drizzle/oauth-target\";\n\nconst oauthTarget = makeOAuthTarget<\n EffectLibsqlDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>({\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientOAuthStandaloneGuard,\n});\n\nexport const {\n makeOAuthAccountsServices,\n makeOAuthSignInServices,\n makeOAuthRegistrationIntentServices,\n makeOAuthRegistrationServices,\n coordinateOAuthRegistration,\n coordinateOAuthSignIn,\n coordinateOAuthRegistrationIntents,\n coordinateOAuthAccounts,\n makeOAuthConnectedServices,\n makeOAuthConnectedRevocationServices,\n coordinateOAuthConnected,\n coordinateOAuthConnectedRevocations,\n} = oauthTarget;\n\nimport { makePasskeyTarget } from \"./drizzle/passkey-drivers\";\nimport { sqlClientPasskeyStandaloneGuard } from \"./drizzle/passkey-target\";\n\nconst passkeyTarget = makePasskeyTarget<\n EffectLibsqlDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>({\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientPasskeyStandaloneGuard,\n});\n\nexport const {\n makePasskeyCredentialServices,\n makePasskeyPersistenceServices,\n makePasskeyEnrollmentContextServices,\n makePasskeyRegistrationCeremonyServices,\n coordinatePasskeyPersistence,\n coordinatePasskeyRegistrationCeremony,\n makePasskeyManagementServices,\n makePasskeyRegistrationServices,\n coordinatePasskeyManagement,\n coordinatePasskeyRegistration,\n} = passkeyTarget;\n\nimport { makeTotpTarget, sqlClientTotpStandaloneGuard } from \"./drizzle/totp-target\";\n\nconst totpTarget = makeTotpTarget<\n EffectLibsqlDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>({\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientTotpStandaloneGuard,\n});\n\nexport const { makeTotpPersistenceServices, coordinateTotpPersistence } = totpTarget;\n\nimport { makePhoneTarget, sqlClientPhoneStandaloneGuard } from \"./drizzle/phone-target\";\n\nconst phoneTarget = makePhoneTarget<\n EffectLibsqlDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>({\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientPhoneStandaloneGuard,\n});\n\nexport const { makePhonePersistenceServices, coordinatePhonePersistence } = phoneTarget;\n\nimport { drizzleMigrationsLayer } from \"./internal/drizzle-migrations\";\nimport { sqlitePersistence } from \"./internal/drizzle-sqlite\";\n\nexport const AuthPersistence = {\n ...sqlitePersistence(makeWithDefaults({})),\n migrationsLayer: drizzleMigrationsLayer(\n makeWithDefaults({}),\n Effect.promise(() => import(\"drizzle-orm/effect-libsql/migrator\")).pipe(\n Effect.map((module) => module.migrate),\n ),\n ),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAMA,sBAAoBC,wBACxB,eAAe,KAAK,EAClB,SAAS,oEACX,CAAC,CACH;AAEA,MAAM,2BAA2BA,wBAAiB,mBAAmB,KAAK,CAAC,CAAC,CAAC;AAC7E,MAAM,yBAAyBA,wBAAiB,iBAAiB,KAAK,CAAC,CAAC,CAAC;AACzE,MAAM,4BAA4BA,wBAAiB,oBAAoB,KAAK,CAAC,CAAC,CAAC;AAC/E,MAAM,yBAAyBA,wBAAiB,iBAAiB,KAAK,CAAC,CAAC,CAAC;AAEzE,MAAM,gBAAgB,wBACpB,2BAA2B,eAAe,wBAAwB,CACpE;AAEA,MAAM,cAAc,sBAClB,yBAAyB,eAAe,sBAAsB,CAChE;AAEA,MAAM,iBAAiB,yBACrB,4BAA4B,eAAe,2BAA2B,sBAAsB,CAC9F;AAMA,MAAa,EACX,wBACA,6BACA,0BACA,+BACA,4BATkB,sBAClB,yBAAyB,eAAe,wBAAwB,sBAAsB,CASpF;AAEJ,MAAa,EACX,+BACA,gCACA,iCACA,qCACE;AAEJ,MAAa,EAAE,4BAA4B,iCAAiC;AAE5E,MAAa,EACX,mCACA,iCACA,iCACA,4BACA,qCACA,mCACA,2BACA,yBACA,mCACA,gCACE;AAEJ,MAAa,aAAa;AAE1B,MAAa,yBACX,UACA,YACG,4BAA4B,UAAU,SAASD,mBAAiB;AAErE,MAAa,0BACX,UACA,YACG,6BAA6B,UAAU,SAASA,mBAAiB;AAEtE,MAAa,oBAKX,UACA,YACG,uBAAuB,UAAU,SAASA,mBAAiB;AAEhE,MAAa,wBAOX,UACA,YACG,2BAA2B,UAAU,SAAS,aAAa;AAEhE,MAAa,mCAMX,UACA,YACG,sCAAsC,UAAU,SAAS,aAAa;AAE3E,MAAa,gCAKX,UACA,YACG,mCAAmC,UAAU,OAAO;AAQzD,MAAa,EAAE,yCAAyC,0CAJzB,iCAC7B,4BAA4B,eAAe,2BAA2B,sBAAsB,CAI5F;AAiBF,MAAa,EACX,2BACA,yBACA,qCACA,+BACA,6BACA,uBACA,oCACA,yBACA,4BACA,sCACA,0BACA,wCAtBkB,gBAGlB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAeI;AAeJ,MAAa,EACX,+BACA,gCACA,sCACA,yCACA,8BACA,uCACA,+BACA,iCACA,6BACA,kCApBoB,kBAGpB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAaI;AAcJ,MAAa,EAAE,6BAA6B,8BAVzB,eAGjB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAE0E;AAc1E,MAAa,EAAE,8BAA8B,+BAVzB,gBAGlB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAE4E;AAK5E,MAAa,kBAAkB;CAC7B,GAAG,kBAAkB,iBAAiB,CAAC,CAAC,CAAC;CACzC,iBAAiB,uBACf,iBAAiB,CAAC,CAAC,GACnB,OAAO,cAAc,OAAO,qCAAqC,CAAC,CAAC,KACjE,OAAO,KAAK,WAAW,OAAO,OAAO,CACvC,CACF;AACF"}
1
+ {"version":3,"file":"Libsql.mjs","names":["standalone"],"sources":["../src/Libsql.ts"],"sourcesContent":["import { requireStandalone as standalone } from \"@yielded/auth-persistence/Adapter\";\nimport { EmailUnavailable } from \"@yielded/auth/Email\";\nimport { PasswordUnavailable } from \"@yielded/auth/Password\";\nimport { ProofUnavailable } from \"@yielded/auth/Proofs\";\nimport { SessionUnavailable } from \"@yielded/auth/Sessions\";\nimport type { AnyRelations } from \"drizzle-orm\";\nimport { type EffectLibsqlDatabase, makeWithDefaults } from \"drizzle-orm/effect-libsql\";\nimport type { AnySQLiteTable } from \"drizzle-orm/sqlite-core\";\nimport { Effect } from \"effect\";\n\nimport type {\n ExternalIdentityTables,\n IdentityTables,\n SubjectProvisioningTables,\n} from \"./drizzle/model\";\nimport { makeSqliteEmailTarget, sqliteEmailConfiguration } from \"./drizzle/sqlite-emails\";\nimport {\n makeSqliteExternalIdentityServices,\n makeSqliteIdentityServices,\n makeSqliteSubjectProvisioningServices,\n} from \"./drizzle/sqlite-identity\";\nimport { makeSqlitePasswordTarget, sqlitePasswordConfiguration } from \"./drizzle/sqlite-passwords\";\nimport { makeSqliteProofTarget, sqliteProofConfiguration } from \"./drizzle/sqlite-proofs\";\nimport { makeSqliteSessionTarget, sqliteSessionConfiguration } from \"./drizzle/sqlite-sessions\";\n\nconst requireStandaloneSession = standalone(() => SessionUnavailable.make({}));\nconst requireStandaloneProof = standalone(() => ProofUnavailable.make({}));\nconst requireStandalonePassword = standalone(() => PasswordUnavailable.make({}));\nconst requireStandaloneEmail = standalone(() => EmailUnavailable.make({}));\n\nconst sessionTarget = makeSqliteSessionTarget<EffectLibsqlDatabase<AnyRelations>>(\n sqliteSessionConfiguration(\"interactive\", requireStandaloneSession),\n);\n\nconst proofTarget = makeSqliteProofTarget<EffectLibsqlDatabase<AnyRelations>>(\n sqliteProofConfiguration(\"interactive\", requireStandaloneProof),\n);\n\nconst passwordTarget = makeSqlitePasswordTarget<EffectLibsqlDatabase<AnyRelations>>(\n sqlitePasswordConfiguration(\"interactive\", requireStandalonePassword, requireStandaloneProof),\n);\n\nconst emailTarget = makeSqliteEmailTarget<EffectLibsqlDatabase<AnyRelations>>(\n sqliteEmailConfiguration(\"interactive\", requireStandaloneEmail, requireStandaloneProof),\n);\n\nexport const {\n coordinateEmailAddress,\n coordinateEmailRegistration,\n makeEmailAddressServices,\n makeEmailRegistrationServices,\n makeEmailSignInServices,\n} = emailTarget;\n\nexport const {\n coordinatePasswordPersistence,\n coordinatePasswordRegistration,\n makePasswordPersistenceServices,\n makePasswordRegistrationServices,\n} = passwordTarget;\n\nexport const { coordinateProofPersistence, makeProofPersistenceServices } = proofTarget;\n\nexport const {\n coordinateAuthenticationAuthority,\n coordinatePendingAuthentication,\n coordinateSignedSessionValidity,\n coordinateStatefulSessions,\n makeAuthenticationAuthorityServices,\n makePendingAuthenticationServices,\n makeSessionStepUpServices,\n coordinateSessionStepUp,\n makeSignedSessionValidityServices,\n makeStatefulSessionServices,\n} = sessionTarget;\n\nexport const commitMode = \"interactive\" as const;\n\nexport const makeIdentityServices = <\n Subject extends AnySQLiteTable,\n Identifier extends AnySQLiteTable,\n External extends AnySQLiteTable,\n Request extends AnySQLiteTable,\n NativeId,\n>(\n database: EffectLibsqlDatabase<AnyRelations>,\n mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>,\n) => makeSqliteIdentityServices(database, mapping, \"interactive\");\n\nexport const makeSubjectProvisioningServices = <\n Subject extends AnySQLiteTable,\n Identifier extends AnySQLiteTable,\n Request extends AnySQLiteTable,\n NativeId,\n>(\n database: EffectLibsqlDatabase<AnyRelations>,\n mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>,\n) => makeSqliteSubjectProvisioningServices(database, mapping, \"interactive\");\n\nexport const makeExternalIdentityServices = <\n Subject extends AnySQLiteTable,\n External extends AnySQLiteTable,\n NativeId,\n>(\n database: EffectLibsqlDatabase<AnyRelations>,\n mapping: ExternalIdentityTables<Subject, External, NativeId>,\n) => makeSqliteExternalIdentityServices(database, mapping);\n\nimport { makeSqlitePasswordPreparedTarget } from \"./drizzle/sqlite-password-prepared\";\n\nconst passwordPreparedTarget = makeSqlitePasswordPreparedTarget<EffectLibsqlDatabase<AnyRelations>>(\n sqlitePasswordConfiguration(\"interactive\", requireStandalonePassword, requireStandaloneProof),\n);\n\nexport const { makePasswordPreparedPersistenceServices, coordinatePasswordPreparedPersistence } =\n passwordPreparedTarget;\n\nexport { passwordPreparedPersistenceLayer } from \"./drizzle/password-prepared-target\";\n\nimport { makeOAuthTarget } from \"./drizzle/oauth-drivers\";\nimport { sqlClientOAuthStandaloneGuard } from \"./drizzle/oauth-target\";\n\nconst oauthTarget = makeOAuthTarget<\n EffectLibsqlDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>({\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientOAuthStandaloneGuard,\n});\n\nexport const {\n makeOAuthAccountsServices,\n makeOAuthSignInServices,\n makeOAuthRegistrationIntentServices,\n makeOAuthRegistrationServices,\n coordinateOAuthRegistration,\n coordinateOAuthSignIn,\n coordinateOAuthRegistrationIntents,\n coordinateOAuthAccounts,\n makeOAuthConnectedServices,\n makeOAuthConnectedRevocationServices,\n coordinateOAuthConnected,\n coordinateOAuthConnectedRevocations,\n} = oauthTarget;\n\nimport { makePasskeyTarget } from \"./drizzle/passkey-drivers\";\nimport { sqlClientPasskeyStandaloneGuard } from \"./drizzle/passkey-target\";\n\nconst passkeyTarget = makePasskeyTarget<\n EffectLibsqlDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>({\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientPasskeyStandaloneGuard,\n});\n\nexport const {\n makePasskeyCredentialServices,\n makePasskeyPersistenceServices,\n makePasskeyEnrollmentContextServices,\n makePasskeyRegistrationCeremonyServices,\n coordinatePasskeyPersistence,\n coordinatePasskeyRegistrationCeremony,\n makePasskeyManagementServices,\n makePasskeyRegistrationServices,\n coordinatePasskeyManagement,\n coordinatePasskeyRegistration,\n} = passkeyTarget;\n\nimport { makeTotpTarget, sqlClientTotpStandaloneGuard } from \"./drizzle/totp-target\";\n\nconst totpTarget = makeTotpTarget<\n EffectLibsqlDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>({\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientTotpStandaloneGuard,\n});\n\nexport const { makeTotpPersistenceServices, coordinateTotpPersistence } = totpTarget;\n\nimport { makePhoneTarget, sqlClientPhoneStandaloneGuard } from \"./drizzle/phone-target\";\n\nconst phoneTarget = makePhoneTarget<\n EffectLibsqlDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>({\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientPhoneStandaloneGuard,\n});\n\nexport const { makePhonePersistenceServices, coordinatePhonePersistence } = phoneTarget;\n\nimport { drizzleMigrationsLayer } from \"./internal/drizzle-migrations\";\nimport { sqlitePersistence } from \"./internal/drizzle-sqlite\";\n\nexport const AuthPersistence = {\n ...sqlitePersistence(makeWithDefaults({})),\n migrationsLayer: drizzleMigrationsLayer(\n makeWithDefaults({}),\n Effect.promise(() => import(\"drizzle-orm/effect-libsql/migrator\")).pipe(\n Effect.map((module) => module.migrate),\n ),\n ),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,2BAA2BA,wBAAiB,mBAAmB,KAAK,CAAC,CAAC,CAAC;AAC7E,MAAM,yBAAyBA,wBAAiB,iBAAiB,KAAK,CAAC,CAAC,CAAC;AACzE,MAAM,4BAA4BA,wBAAiB,oBAAoB,KAAK,CAAC,CAAC,CAAC;AAC/E,MAAM,yBAAyBA,wBAAiB,iBAAiB,KAAK,CAAC,CAAC,CAAC;AAEzE,MAAM,gBAAgB,wBACpB,2BAA2B,eAAe,wBAAwB,CACpE;AAEA,MAAM,cAAc,sBAClB,yBAAyB,eAAe,sBAAsB,CAChE;AAEA,MAAM,iBAAiB,yBACrB,4BAA4B,eAAe,2BAA2B,sBAAsB,CAC9F;AAMA,MAAa,EACX,wBACA,6BACA,0BACA,+BACA,4BATkB,sBAClB,yBAAyB,eAAe,wBAAwB,sBAAsB,CASpF;AAEJ,MAAa,EACX,+BACA,gCACA,iCACA,qCACE;AAEJ,MAAa,EAAE,4BAA4B,iCAAiC;AAE5E,MAAa,EACX,mCACA,iCACA,iCACA,4BACA,qCACA,mCACA,2BACA,yBACA,mCACA,gCACE;AAEJ,MAAa,aAAa;AAE1B,MAAa,wBAOX,UACA,YACG,2BAA2B,UAAU,SAAS,aAAa;AAEhE,MAAa,mCAMX,UACA,YACG,sCAAsC,UAAU,SAAS,aAAa;AAE3E,MAAa,gCAKX,UACA,YACG,mCAAmC,UAAU,OAAO;AAQzD,MAAa,EAAE,yCAAyC,0CAJzB,iCAC7B,4BAA4B,eAAe,2BAA2B,sBAAsB,CAI5F;AAiBF,MAAa,EACX,2BACA,yBACA,qCACA,+BACA,6BACA,uBACA,oCACA,yBACA,4BACA,sCACA,0BACA,wCAtBkB,gBAGlB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAeI;AAeJ,MAAa,EACX,+BACA,gCACA,sCACA,yCACA,8BACA,uCACA,+BACA,iCACA,6BACA,kCApBoB,kBAGpB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAaI;AAcJ,MAAa,EAAE,6BAA6B,8BAVzB,eAGjB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAE0E;AAc1E,MAAa,EAAE,8BAA8B,+BAVzB,gBAGlB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAE4E;AAK5E,MAAa,kBAAkB;CAC7B,GAAG,kBAAkB,iBAAiB,CAAC,CAAC,CAAC;CACzC,iBAAiB,uBACf,iBAAiB,CAAC,CAAC,GACnB,OAAO,cAAc,OAAO,qCAAqC,CAAC,CAAC,KACjE,OAAO,KAAK,WAAW,OAAO,OAAO,CACvC,CACF;AACF"}
package/dist/Mysql2.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { AuthTables, IdentityTables } from "./drizzle/model.mjs";
1
+ import { IdentityTables } from "./drizzle/model.mjs";
2
2
  import { PasskeyCredentialMapping, PasskeyEnrollmentContextMapping, PasskeyPersistenceMapping } from "./drizzle/passkey-model.mjs";
3
3
  import { OAuthAccountsMapping, OAuthRegistrationAuthority, OAuthRegistrationIntentMapping, OAuthRegistrationMapping, OAuthSignInMapping } from "./drizzle/oauth-model.mjs";
4
4
  import { OAuthConnectedMapping, OAuthConnectedRevocationMapping } from "./drizzle/oauth-connected-model.mjs";
@@ -12,7 +12,6 @@ import "./index.mjs";
12
12
  import { SuppliedService } from "./drizzle/SuppliedService.mjs";
13
13
  import { TotpCoordinatorError } from "./drizzle/totp-target.mjs";
14
14
  import { PhoneCoordinatorError } from "./drizzle/phone-target.mjs";
15
- import { coordinateMysqlAuthStoreTransaction, coordinateMysqlAuthTransaction, coordinateMysqlOAuthStateTransaction, makeMysqlAuthStoreServices, makeMysqlOAuthStateServices } from "./drizzle/mysql.mjs";
16
15
  import { makeMysqlExternalIdentityServices, makeMysqlSubjectProvisioningServices } from "./drizzle/mysql-identity.mjs";
17
16
  import { coordinateMysqlAuthenticationAuthority, coordinateMysqlPendingAuthentication, coordinateMysqlSessionStepUp, coordinateMysqlSignedSessionValidity, coordinateMysqlStatefulSessions, makeMysqlAuthenticationAuthorityServices, makeMysqlPendingAuthenticationServices, makeMysqlSessionStepUpServices, makeMysqlSignedSessionValidityServices, makeMysqlStatefulSessionServices } from "./drizzle/mysql-sessions.mjs";
18
17
  import { coordinateMysqlProofPersistence, makeMysqlProofPersistenceServices } from "./drizzle/mysql-proofs.mjs";
@@ -24,24 +23,6 @@ import { EffectMysql2Database } from "drizzle-orm/effect-mysql2";
24
23
  import { AnyMySqlTable } from "drizzle-orm/mysql-core";
25
24
  //#region src/Mysql2.d.ts
26
25
  export declare const commitMode: "interactive";
27
- export declare const makeAuthServices: <C extends AnyMySqlTable, R extends AnyMySqlTable, S extends AnyMySqlTable>(database: EffectMysql2Database<AnyRelations>, mapping: AuthTables<C, R, S>) => {
28
- readonly authStore: {
29
- readonly issueChallenge: (input: import("@yielded/auth/Schema").NewChallenge) => import("effect/Effect").Effect<void, import("@yielded/auth/AuthStore").IssueChallengeError>;
30
- readonly consumeChallenge: (input: import("@yielded/auth/Schema").ConsumeChallenge) => import("effect/Effect").Effect<import("@yielded/auth/Schema").VerifiedEmail, import("@yielded/auth/AuthStore").EmailOtpRejected | import("@yielded/auth/Errors").AuthStoreError>;
31
- readonly issueRegistration: (input: import("@yielded/auth/Schema").NewRegistration) => import("effect/Effect").Effect<void, import("@yielded/auth/Errors").AuthStoreError>;
32
- readonly inspectRegistration: (tokenDigest: import("@yielded/auth/Schema").TokenDigest) => import("effect/Effect").Effect<import("@yielded/auth/Schema").PendingRegistration, import("@yielded/auth/Errors").InvalidRegistration | import("@yielded/auth/Errors").AuthStoreError>;
33
- readonly consumeRegistration: (input: import("@yielded/auth/Schema").ConsumeRegistration) => import("effect/Effect").Effect<void, import("@yielded/auth/Errors").InvalidRegistration | import("@yielded/auth/Errors").AuthStoreError>;
34
- };
35
- readonly oauthStateStore: {
36
- readonly issue: (state: import("@yielded/auth/OAuth").OAuthState) => import("effect/Effect").Effect<void, import("@yielded/auth/Errors").AuthStoreError>;
37
- readonly consume: (stateDigest: import("@yielded/auth/Schema").TokenDigest) => import("effect/Effect").Effect<import("@yielded/auth/OAuth").OAuthState, import("@yielded/auth/OAuth").InvalidOAuthState | import("@yielded/auth/Errors").AuthStoreError>;
38
- };
39
- readonly decisions: {
40
- readonly consumeChallenge: (input: import("@yielded/auth/Schema").ConsumeChallenge) => import("effect/Effect").Effect<import("@yielded/auth/AuthStore").ChallengeConsumeDecision, import("@yielded/auth/Errors").AuthStoreError, never>;
41
- readonly consumeRegistration: (input: import("@yielded/auth/Schema").ConsumeRegistration) => import("effect/Effect").Effect<import("@yielded/auth/AuthStore").ConsumeDecision<void>, import("@yielded/auth/Errors").AuthStoreError, never>;
42
- readonly consumeOAuthState: (digest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">) => import("effect/Effect").Effect<import("@yielded/auth/AuthStore").ConsumeDecision<import("@yielded/auth/OAuth").OAuthState>, import("@yielded/auth/Errors").AuthStoreError, never>;
43
- };
44
- };
45
26
  export declare const makeIdentityServices: <Subject extends AnyMySqlTable, Identifier extends AnyMySqlTable, External extends AnyMySqlTable, Request extends AnyMySqlTable, NativeId>(database: EffectMysql2Database<AnyRelations>, mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => {
46
27
  subjectProvisioner: {
47
28
  readonly provision: (input: import("@yielded/auth/Identity").SubjectProvisioningInput) => import("effect/Effect").Effect<import("@yielded/auth/Identity").ProvisioningResult, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
@@ -90,6 +71,21 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
90
71
  readonly generation: number;
91
72
  readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
92
73
  readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
74
+ readonly access?: {
75
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
76
+ readonly generation: number;
77
+ readonly issuance: "active" | "retired";
78
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
79
+ readonly clientRegistrationId: string;
80
+ readonly scopes: readonly string[];
81
+ readonly resources: readonly string[];
82
+ readonly retention: "access-and-refresh" | "access-only";
83
+ readonly maximumAccessLifetimeMillis: number;
84
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
85
+ readonly refreshAheadMillis: number;
86
+ readonly refresh: "confidential" | "rotating" | "unsupported";
87
+ readonly revocation: "cohort" | "unsupported";
88
+ } | undefined;
93
89
  readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
94
90
  readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
95
91
  readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
@@ -141,6 +137,21 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
141
137
  readonly generation: number;
142
138
  readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
143
139
  readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
140
+ readonly access?: {
141
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
142
+ readonly generation: number;
143
+ readonly issuance: "active" | "retired";
144
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
145
+ readonly clientRegistrationId: string;
146
+ readonly scopes: readonly string[];
147
+ readonly resources: readonly string[];
148
+ readonly retention: "access-and-refresh" | "access-only";
149
+ readonly maximumAccessLifetimeMillis: number;
150
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
151
+ readonly refreshAheadMillis: number;
152
+ readonly refresh: "confidential" | "rotating" | "unsupported";
153
+ readonly revocation: "cohort" | "unsupported";
154
+ } | undefined;
144
155
  readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
145
156
  readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
146
157
  readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
@@ -179,13 +190,13 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
179
190
  readonly invalidation: import("@yielded/auth/Sessions").SessionInvalidationWindow;
180
191
  readonly nowMillis: number;
181
192
  }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
182
- readonly _tag: "Rejected";
183
- } | {
184
- readonly _tag: "Conflict";
185
- } | {
186
193
  readonly _tag: "Cancelled";
194
+ } | {
195
+ readonly _tag: "Rejected";
187
196
  } | {
188
197
  readonly _tag: "Ambiguous";
198
+ } | {
199
+ readonly _tag: "Conflict";
189
200
  } | {
190
201
  readonly _tag: "Linked";
191
202
  readonly credential: {
@@ -539,6 +550,98 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
539
550
  dialect: "mysql";
540
551
  }> = never>(database: EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, mapping: OAuthConnectedMapping<S, AC, T, O, F, G, C, H, UA, DC, N, J>) => import("effect/Effect").Effect<{
541
552
  oauthConnectedPersistence: {
553
+ readonly claimSignIn: <A>(input: {
554
+ readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
555
+ readonly configuration: import("@yielded/auth/OAuth").OAuthConnectedConfiguration;
556
+ }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthSignInAccessClaim, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
557
+ readonly inspectSignIn: (input: {
558
+ readonly reservation: import("@yielded/auth/OAuth").OAuthSignInAccessClaim;
559
+ readonly credential: import("@yielded/auth/OAuth").OAuthCredentialSnapshot;
560
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
561
+ }) => import("effect/Effect").Effect<import("@yielded/auth/OAuth").OAuthSignInAccessInspection, import("@yielded/auth/OAuth").OAuthUnavailable>;
562
+ readonly settleSignIn: <A>(input: {
563
+ readonly reservation: import("@yielded/auth/OAuth").OAuthSignInAccessClaim;
564
+ readonly outcome: import("@yielded/auth/OAuth").OAuthSignInAccessOutcome;
565
+ }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
566
+ readonly _tag: "Cancelled";
567
+ } | {
568
+ readonly _tag: "Rejected";
569
+ } | {
570
+ readonly _tag: "Ambiguous";
571
+ } | {
572
+ readonly _tag: "Conflict";
573
+ } | {
574
+ readonly _tag: "Connected";
575
+ readonly grant: {
576
+ readonly context: {
577
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
578
+ readonly exchangeOrder: string;
579
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
580
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
581
+ readonly identity: {
582
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
583
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
584
+ readonly subject: string;
585
+ };
586
+ readonly configuration: {
587
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
588
+ readonly protocol: "oauth" | "oidc";
589
+ readonly configurationGeneration: number;
590
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
591
+ readonly responseIssuerMode: "required" | "unsupported";
592
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
593
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
594
+ readonly profile: {
595
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
596
+ readonly generation: number;
597
+ readonly issuance: "active" | "retired";
598
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
599
+ readonly clientRegistrationId: string;
600
+ readonly scopes: readonly string[];
601
+ readonly resources: readonly string[];
602
+ readonly retention: "access-and-refresh" | "access-only";
603
+ readonly maximumAccessLifetimeMillis: number;
604
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
605
+ readonly refreshAheadMillis: number;
606
+ readonly refresh: "confidential" | "rotating" | "unsupported";
607
+ readonly revocation: "cohort" | "unsupported";
608
+ };
609
+ };
610
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
611
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
612
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
613
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
614
+ readonly metadata: {
615
+ readonly scopes: readonly string[];
616
+ readonly resources: readonly string[];
617
+ readonly accessExpiresAtMillis?: number | undefined;
618
+ readonly refreshExpiresAtMillis?: number | undefined;
619
+ readonly useUntilMillis: number;
620
+ readonly refreshUseUntilMillis?: number | undefined;
621
+ readonly obtainedAtMillis: number;
622
+ readonly profile?: {
623
+ readonly displayName?: string | undefined;
624
+ readonly handle?: string | undefined;
625
+ readonly avatarUrl?: string | undefined;
626
+ readonly profileUrl?: string | undefined;
627
+ readonly email?: string | undefined;
628
+ readonly emailVerified?: boolean | undefined;
629
+ readonly providerData?: {
630
+ readonly [x: string]: import("effect/Schema").Json;
631
+ } | undefined;
632
+ } | undefined;
633
+ };
634
+ };
635
+ readonly sealed: {
636
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
637
+ readonly keyId: string;
638
+ readonly nonce: string;
639
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
640
+ };
641
+ };
642
+ } | {
643
+ readonly _tag: "Busy";
644
+ }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
542
645
  readonly capture: (input: {
543
646
  readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
544
647
  readonly subjectId: import("@yielded/auth/Schema").SubjectId;
@@ -567,6 +670,21 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
567
670
  readonly generation: number;
568
671
  readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
569
672
  readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
673
+ readonly access?: {
674
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
675
+ readonly generation: number;
676
+ readonly issuance: "active" | "retired";
677
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
678
+ readonly clientRegistrationId: string;
679
+ readonly scopes: readonly string[];
680
+ readonly resources: readonly string[];
681
+ readonly retention: "access-and-refresh" | "access-only";
682
+ readonly maximumAccessLifetimeMillis: number;
683
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
684
+ readonly refreshAheadMillis: number;
685
+ readonly refresh: "confidential" | "rotating" | "unsupported";
686
+ readonly revocation: "cohort" | "unsupported";
687
+ } | undefined;
570
688
  readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
571
689
  readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
572
690
  readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
@@ -669,6 +787,21 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
669
787
  readonly generation: number;
670
788
  readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
671
789
  readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
790
+ readonly access?: {
791
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
792
+ readonly generation: number;
793
+ readonly issuance: "active" | "retired";
794
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
795
+ readonly clientRegistrationId: string;
796
+ readonly scopes: readonly string[];
797
+ readonly resources: readonly string[];
798
+ readonly retention: "access-and-refresh" | "access-only";
799
+ readonly maximumAccessLifetimeMillis: number;
800
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
801
+ readonly refreshAheadMillis: number;
802
+ readonly refresh: "confidential" | "rotating" | "unsupported";
803
+ readonly revocation: "cohort" | "unsupported";
804
+ } | undefined;
672
805
  readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
673
806
  readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
674
807
  readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
@@ -761,14 +894,14 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
761
894
  };
762
895
  }) => import("effect/Effect").Effect<{
763
896
  readonly _tag: "Rejected";
897
+ } | {
898
+ readonly _tag: "Conflict";
764
899
  } | {
765
900
  readonly _tag: "Target";
766
901
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
767
902
  } | {
768
903
  readonly _tag: "Quarantine";
769
904
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
770
- } | {
771
- readonly _tag: "Conflict";
772
905
  }, import("@yielded/auth/OAuth").OAuthUnavailable>;
773
906
  readonly settle: <A>(input: {
774
907
  readonly claim: import("@yielded/auth/OAuth").OAuthConnectedClaim;
@@ -776,18 +909,19 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
776
909
  readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedActionAuthorization;
777
910
  readonly nowMillis: number;
778
911
  }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
779
- readonly _tag: "Rejected";
780
- } | {
781
- readonly _tag: "Conflict";
782
- } | {
783
912
  readonly _tag: "Cancelled";
913
+ } | {
914
+ readonly _tag: "Rejected";
784
915
  } | {
785
916
  readonly _tag: "Ambiguous";
917
+ } | {
918
+ readonly _tag: "Conflict";
786
919
  } | {
787
920
  readonly _tag: "Connected";
788
921
  readonly grant: {
789
922
  readonly context: {
790
923
  readonly namespace: "effect-auth/oauth-connected-token-context/v1";
924
+ readonly exchangeOrder: string;
791
925
  readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
792
926
  readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
793
927
  readonly identity: {
@@ -898,6 +1032,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
898
1032
  readonly grant: {
899
1033
  readonly context: {
900
1034
  readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1035
+ readonly exchangeOrder: string;
901
1036
  readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
902
1037
  readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
903
1038
  readonly identity: {
@@ -1003,6 +1138,8 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
1003
1138
  readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1004
1139
  }) => import("effect/Effect").Effect<{
1005
1140
  readonly _tag: "Rejected";
1141
+ } | {
1142
+ readonly _tag: "ReauthorizationRequired";
1006
1143
  } | {
1007
1144
  readonly _tag: "Busy";
1008
1145
  } | {
@@ -1010,6 +1147,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
1010
1147
  readonly grant: {
1011
1148
  readonly context: {
1012
1149
  readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1150
+ readonly exchangeOrder: string;
1013
1151
  readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1014
1152
  readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1015
1153
  readonly identity: {
@@ -1073,8 +1211,6 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
1073
1211
  readonly ciphertext: import("effect/Redacted").Redacted<string>;
1074
1212
  };
1075
1213
  };
1076
- } | {
1077
- readonly _tag: "ReauthorizationRequired";
1078
1214
  }, import("@yielded/auth/OAuth").OAuthUnavailable>;
1079
1215
  readonly claimRefresh: <A>(input: {
1080
1216
  readonly grant: import("@yielded/auth/OAuth").OAuthConnectedStoredGrant;
@@ -1084,16 +1220,17 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
1084
1220
  readonly lifetimeMillis: number;
1085
1221
  }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1086
1222
  readonly _tag: "Rejected";
1087
- } | {
1088
- readonly _tag: "Busy";
1089
1223
  } | {
1090
1224
  readonly _tag: "ReauthorizationRequired";
1225
+ } | {
1226
+ readonly _tag: "Busy";
1091
1227
  } | {
1092
1228
  readonly _tag: "Claimed";
1093
1229
  readonly claim: {
1094
1230
  readonly grant: {
1095
1231
  readonly context: {
1096
1232
  readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1233
+ readonly exchangeOrder: string;
1097
1234
  readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1098
1235
  readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1099
1236
  readonly identity: {
@@ -1157,6 +1294,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
1157
1294
  readonly ciphertext: import("effect/Redacted").Redacted<string>;
1158
1295
  };
1159
1296
  };
1297
+ readonly order: string;
1160
1298
  readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1161
1299
  readonly claimedAtMillis: number;
1162
1300
  readonly claimExpiresAtMillis: number;
@@ -1176,6 +1314,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
1176
1314
  readonly grant: {
1177
1315
  readonly context: {
1178
1316
  readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1317
+ readonly exchangeOrder: string;
1179
1318
  readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1180
1319
  readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1181
1320
  readonly identity: {
@@ -1247,10 +1386,10 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
1247
1386
  readonly lifetimeMillis: number;
1248
1387
  }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1249
1388
  readonly _tag: "Rejected";
1250
- } | {
1251
- readonly _tag: "Busy";
1252
1389
  } | {
1253
1390
  readonly _tag: "ReauthorizationRequired";
1391
+ } | {
1392
+ readonly _tag: "Busy";
1254
1393
  } | {
1255
1394
  readonly _tag: "Admitted";
1256
1395
  readonly admissionId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
@@ -1294,6 +1433,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
1294
1433
  readonly jobId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1295
1434
  readonly token: {
1296
1435
  readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1436
+ readonly exchangeOrder: string;
1297
1437
  readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1298
1438
  readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1299
1439
  readonly identity: {
@@ -1813,5 +1953,5 @@ export declare const makePhonePersistenceServices: <Database extends EffectMysql
1813
1953
  }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | PhoneCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/PhoneOtp").PhoneAdmission | import("@yielded/auth/PhoneOtp").PhonePersistence | import("@yielded/auth/PhoneOtp").PhoneSignInTargets>>;
1814
1954
  };
1815
1955
  //#endregion
1816
- export { coordinateMysqlAuthStoreTransaction as coordinateAuthStoreTransaction, coordinateMysqlAuthTransaction as coordinateAuthTransaction, coordinateMysqlAuthenticationAuthority as coordinateAuthenticationAuthority, coordinateMysqlEmailAddress as coordinateEmailAddress, coordinateMysqlEmailRegistration as coordinateEmailRegistration, coordinateMysqlOAuthStateTransaction as coordinateOAuthStateTransaction, coordinateMysqlPasswordPersistence as coordinatePasswordPersistence, coordinateMySqlPasswordPreparedPersistence as coordinatePasswordPreparedPersistence, coordinateMysqlPasswordRegistration as coordinatePasswordRegistration, coordinateMysqlPendingAuthentication as coordinatePendingAuthentication, coordinateMysqlProofPersistence as coordinateProofPersistence, coordinateMysqlSessionStepUp as coordinateSessionStepUp, coordinateMysqlSignedSessionValidity as coordinateSignedSessionValidity, coordinateMysqlStatefulSessions as coordinateStatefulSessions, makeMysqlAuthStoreServices as makeAuthStoreServices, makeMysqlAuthenticationAuthorityServices as makeAuthenticationAuthorityServices, makeMysqlEmailAddressServices as makeEmailAddressServices, makeMysqlEmailRegistrationServices as makeEmailRegistrationServices, makeMysqlEmailSignInServices as makeEmailSignInServices, makeMysqlExternalIdentityServices as makeExternalIdentityServices, makeMysqlOAuthStateServices as makeOAuthStateServices, makeMysqlPasswordPersistenceServices as makePasswordPersistenceServices, makeMySqlPasswordPreparedPersistenceServices as makePasswordPreparedPersistenceServices, makeMysqlPasswordRegistrationServices as makePasswordRegistrationServices, makeMysqlPendingAuthenticationServices as makePendingAuthenticationServices, makeMysqlProofPersistenceServices as makeProofPersistenceServices, makeMysqlSessionStepUpServices as makeSessionStepUpServices, makeMysqlSignedSessionValidityServices as makeSignedSessionValidityServices, makeMysqlStatefulSessionServices as makeStatefulSessionServices, makeMysqlSubjectProvisioningServices as makeSubjectProvisioningServices, passwordPreparedPersistenceLayer };
1956
+ export { coordinateMysqlAuthenticationAuthority as coordinateAuthenticationAuthority, coordinateMysqlEmailAddress as coordinateEmailAddress, coordinateMysqlEmailRegistration as coordinateEmailRegistration, coordinateMysqlPasswordPersistence as coordinatePasswordPersistence, coordinateMySqlPasswordPreparedPersistence as coordinatePasswordPreparedPersistence, coordinateMysqlPasswordRegistration as coordinatePasswordRegistration, coordinateMysqlPendingAuthentication as coordinatePendingAuthentication, coordinateMysqlProofPersistence as coordinateProofPersistence, coordinateMysqlSessionStepUp as coordinateSessionStepUp, coordinateMysqlSignedSessionValidity as coordinateSignedSessionValidity, coordinateMysqlStatefulSessions as coordinateStatefulSessions, makeMysqlAuthenticationAuthorityServices as makeAuthenticationAuthorityServices, makeMysqlEmailAddressServices as makeEmailAddressServices, makeMysqlEmailRegistrationServices as makeEmailRegistrationServices, makeMysqlEmailSignInServices as makeEmailSignInServices, makeMysqlExternalIdentityServices as makeExternalIdentityServices, makeMysqlPasswordPersistenceServices as makePasswordPersistenceServices, makeMySqlPasswordPreparedPersistenceServices as makePasswordPreparedPersistenceServices, makeMysqlPasswordRegistrationServices as makePasswordRegistrationServices, makeMysqlPendingAuthenticationServices as makePendingAuthenticationServices, makeMysqlProofPersistenceServices as makeProofPersistenceServices, makeMysqlSessionStepUpServices as makeSessionStepUpServices, makeMysqlSignedSessionValidityServices as makeSignedSessionValidityServices, makeMysqlStatefulSessionServices as makeStatefulSessionServices, makeMysqlSubjectProvisioningServices as makeSubjectProvisioningServices, passwordPreparedPersistenceLayer };
1817
1957
  //# sourceMappingURL=Mysql2.d.mts.map
package/dist/Mysql2.mjs CHANGED
@@ -7,7 +7,6 @@ import { makePasskeyTarget } from "./drizzle/passkey-drivers.mjs";
7
7
  import { unavailable as unavailable$1 } from "./drizzle/phone-state.mjs";
8
8
  import { makePhoneTarget, sqlClientPhoneStandaloneGuard } from "./drizzle/phone-target.mjs";
9
9
  import { makeOAuthTarget } from "./drizzle/oauth-drivers.mjs";
10
- import { coordinateMysqlAuthStoreTransaction, coordinateMysqlAuthTransaction, coordinateMysqlOAuthStateTransaction, makeMysqlAuthServices, makeMysqlAuthStoreServices, makeMysqlOAuthStateServices } from "./drizzle/mysql.mjs";
11
10
  import { makeMysqlExternalIdentityServices, makeMysqlIdentityServices, makeMysqlSubjectProvisioningServices } from "./drizzle/mysql-identity.mjs";
12
11
  import { coordinateMysqlAuthenticationAuthority, coordinateMysqlPendingAuthentication, coordinateMysqlSessionStepUp, coordinateMysqlSignedSessionValidity, coordinateMysqlStatefulSessions, makeMysqlAuthenticationAuthorityServices, makeMysqlPendingAuthenticationServices, makeMysqlSessionStepUpServices, makeMysqlSignedSessionValidityServices, makeMysqlStatefulSessionServices } from "./drizzle/mysql-sessions.mjs";
13
12
  import { coordinateMysqlProofPersistence, makeMysqlProofPersistenceServices } from "./drizzle/mysql-proofs.mjs";
@@ -19,7 +18,6 @@ import { mysqlOAuthTransaction } from "./drizzle/oauth-mysql.mjs";
19
18
  import { unavailable as unavailable$2 } from "./drizzle/passkey-state.mjs";
20
19
  //#region src/Mysql2.ts
21
20
  const commitMode = "interactive";
22
- const makeAuthServices = (database, mapping) => makeMysqlAuthServices(database, mapping);
23
21
  const makeIdentityServices = (database, mapping) => makeMysqlIdentityServices(database, mapping);
24
22
  const { makeOAuthAccountsServices, makeOAuthSignInServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, coordinateOAuthRegistration, coordinateOAuthSignIn, coordinateOAuthRegistrationIntents, coordinateOAuthAccounts, makeOAuthConnectedServices, makeOAuthConnectedRevocationServices, coordinateOAuthConnected, coordinateOAuthConnectedRevocations } = makeOAuthTarget({
25
23
  mode: "interactive",
@@ -50,6 +48,6 @@ const { makePhonePersistenceServices, coordinatePhonePersistence } = makePhoneTa
50
48
  transaction: (database, body) => mysqlTransaction(unavailable$1, database, body)
51
49
  });
52
50
  //#endregion
53
- export { commitMode, coordinateMysqlAuthStoreTransaction as coordinateAuthStoreTransaction, coordinateMysqlAuthTransaction as coordinateAuthTransaction, coordinateMysqlAuthenticationAuthority as coordinateAuthenticationAuthority, coordinateMysqlEmailAddress as coordinateEmailAddress, coordinateMysqlEmailRegistration as coordinateEmailRegistration, coordinateOAuthAccounts, coordinateOAuthConnected, coordinateOAuthConnectedRevocations, coordinateOAuthRegistration, coordinateOAuthRegistrationIntents, coordinateOAuthSignIn, coordinateMysqlOAuthStateTransaction as coordinateOAuthStateTransaction, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinateMysqlPasswordPersistence as coordinatePasswordPersistence, coordinateMySqlPasswordPreparedPersistence as coordinatePasswordPreparedPersistence, coordinateMysqlPasswordRegistration as coordinatePasswordRegistration, coordinateMysqlPendingAuthentication as coordinatePendingAuthentication, coordinatePhonePersistence, coordinateMysqlProofPersistence as coordinateProofPersistence, coordinateMysqlSessionStepUp as coordinateSessionStepUp, coordinateMysqlSignedSessionValidity as coordinateSignedSessionValidity, coordinateMysqlStatefulSessions as coordinateStatefulSessions, coordinateTotpPersistence, makeAuthServices, makeMysqlAuthStoreServices as makeAuthStoreServices, makeMysqlAuthenticationAuthorityServices as makeAuthenticationAuthorityServices, makeMysqlEmailAddressServices as makeEmailAddressServices, makeMysqlEmailRegistrationServices as makeEmailRegistrationServices, makeMysqlEmailSignInServices as makeEmailSignInServices, makeMysqlExternalIdentityServices as makeExternalIdentityServices, makeIdentityServices, makeOAuthAccountsServices, makeOAuthConnectedRevocationServices, makeOAuthConnectedServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, makeOAuthSignInServices, makeMysqlOAuthStateServices as makeOAuthStateServices, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices, makeMysqlPasswordPersistenceServices as makePasswordPersistenceServices, makeMySqlPasswordPreparedPersistenceServices as makePasswordPreparedPersistenceServices, makeMysqlPasswordRegistrationServices as makePasswordRegistrationServices, makeMysqlPendingAuthenticationServices as makePendingAuthenticationServices, makePhonePersistenceServices, makeMysqlProofPersistenceServices as makeProofPersistenceServices, makeMysqlSessionStepUpServices as makeSessionStepUpServices, makeMysqlSignedSessionValidityServices as makeSignedSessionValidityServices, makeMysqlStatefulSessionServices as makeStatefulSessionServices, makeMysqlSubjectProvisioningServices as makeSubjectProvisioningServices, makeTotpPersistenceServices, passwordPreparedPersistenceLayer };
51
+ export { commitMode, coordinateMysqlAuthenticationAuthority as coordinateAuthenticationAuthority, coordinateMysqlEmailAddress as coordinateEmailAddress, coordinateMysqlEmailRegistration as coordinateEmailRegistration, coordinateOAuthAccounts, coordinateOAuthConnected, coordinateOAuthConnectedRevocations, coordinateOAuthRegistration, coordinateOAuthRegistrationIntents, coordinateOAuthSignIn, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinateMysqlPasswordPersistence as coordinatePasswordPersistence, coordinateMySqlPasswordPreparedPersistence as coordinatePasswordPreparedPersistence, coordinateMysqlPasswordRegistration as coordinatePasswordRegistration, coordinateMysqlPendingAuthentication as coordinatePendingAuthentication, coordinatePhonePersistence, coordinateMysqlProofPersistence as coordinateProofPersistence, coordinateMysqlSessionStepUp as coordinateSessionStepUp, coordinateMysqlSignedSessionValidity as coordinateSignedSessionValidity, coordinateMysqlStatefulSessions as coordinateStatefulSessions, coordinateTotpPersistence, makeMysqlAuthenticationAuthorityServices as makeAuthenticationAuthorityServices, makeMysqlEmailAddressServices as makeEmailAddressServices, makeMysqlEmailRegistrationServices as makeEmailRegistrationServices, makeMysqlEmailSignInServices as makeEmailSignInServices, makeMysqlExternalIdentityServices as makeExternalIdentityServices, makeIdentityServices, makeOAuthAccountsServices, makeOAuthConnectedRevocationServices, makeOAuthConnectedServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, makeOAuthSignInServices, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices, makeMysqlPasswordPersistenceServices as makePasswordPersistenceServices, makeMySqlPasswordPreparedPersistenceServices as makePasswordPreparedPersistenceServices, makeMysqlPasswordRegistrationServices as makePasswordRegistrationServices, makeMysqlPendingAuthenticationServices as makePendingAuthenticationServices, makePhonePersistenceServices, makeMysqlProofPersistenceServices as makeProofPersistenceServices, makeMysqlSessionStepUpServices as makeSessionStepUpServices, makeMysqlSignedSessionValidityServices as makeSignedSessionValidityServices, makeMysqlStatefulSessionServices as makeStatefulSessionServices, makeMysqlSubjectProvisioningServices as makeSubjectProvisioningServices, makeTotpPersistenceServices, passwordPreparedPersistenceLayer };
54
52
 
55
53
  //# sourceMappingURL=Mysql2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Mysql2.mjs","names":["passkeyUnavailable","totpUnavailable","phoneUnavailable"],"sources":["../src/Mysql2.ts"],"sourcesContent":["import type { AnyRelations } from \"drizzle-orm\";\nimport type { EffectMysql2Database } from \"drizzle-orm/effect-mysql2\";\nimport type { AnyMySqlTable } from \"drizzle-orm/mysql-core\";\n\nimport type { AuthTables, IdentityTables } from \"./drizzle/model\";\nimport {\n coordinateMysqlAuthStoreTransaction,\n coordinateMysqlAuthTransaction,\n coordinateMysqlOAuthStateTransaction,\n makeMysqlAuthServices,\n makeMysqlAuthStoreServices,\n makeMysqlOAuthStateServices,\n} from \"./drizzle/mysql\";\nimport {\n makeMysqlExternalIdentityServices,\n makeMysqlIdentityServices,\n makeMysqlSubjectProvisioningServices,\n} from \"./drizzle/mysql-identity\";\n\nexport {\n coordinateMysqlAuthenticationAuthority as coordinateAuthenticationAuthority,\n coordinateMysqlPendingAuthentication as coordinatePendingAuthentication,\n coordinateMysqlSignedSessionValidity as coordinateSignedSessionValidity,\n coordinateMysqlStatefulSessions as coordinateStatefulSessions,\n makeMysqlAuthenticationAuthorityServices as makeAuthenticationAuthorityServices,\n makeMysqlPendingAuthenticationServices as makePendingAuthenticationServices,\n makeMysqlSignedSessionValidityServices as makeSignedSessionValidityServices,\n makeMysqlStatefulSessionServices as makeStatefulSessionServices,\n} from \"./drizzle/mysql-sessions\";\n\nexport {\n coordinateMysqlProofPersistence as coordinateProofPersistence,\n makeMysqlProofPersistenceServices as makeProofPersistenceServices,\n} from \"./drizzle/mysql-proofs\";\n\nexport {\n coordinateMysqlPasswordPersistence as coordinatePasswordPersistence,\n coordinateMysqlPasswordRegistration as coordinatePasswordRegistration,\n makeMysqlPasswordPersistenceServices as makePasswordPersistenceServices,\n makeMysqlPasswordRegistrationServices as makePasswordRegistrationServices,\n} from \"./drizzle/mysql-passwords\";\n\nexport {\n coordinateMysqlEmailAddress as coordinateEmailAddress,\n coordinateMysqlEmailRegistration as coordinateEmailRegistration,\n makeMysqlEmailAddressServices as makeEmailAddressServices,\n makeMysqlEmailRegistrationServices as makeEmailRegistrationServices,\n makeMysqlEmailSignInServices as makeEmailSignInServices,\n} from \"./drizzle/mysql-emails\";\n\nexport {\n coordinateMysqlAuthStoreTransaction as coordinateAuthStoreTransaction,\n coordinateMysqlAuthTransaction as coordinateAuthTransaction,\n coordinateMysqlOAuthStateTransaction as coordinateOAuthStateTransaction,\n makeMysqlAuthStoreServices as makeAuthStoreServices,\n makeMysqlExternalIdentityServices as makeExternalIdentityServices,\n makeMysqlOAuthStateServices as makeOAuthStateServices,\n makeMysqlSubjectProvisioningServices as makeSubjectProvisioningServices,\n};\n\nexport const commitMode = \"interactive\" as const;\n\nexport const makeAuthServices = <\n C extends AnyMySqlTable,\n R extends AnyMySqlTable,\n S extends AnyMySqlTable,\n>(\n database: EffectMysql2Database<AnyRelations>,\n mapping: AuthTables<C, R, S>,\n) => makeMysqlAuthServices(database, mapping);\n\nexport const makeIdentityServices = <\n Subject extends AnyMySqlTable,\n Identifier extends AnyMySqlTable,\n External extends AnyMySqlTable,\n Request extends AnyMySqlTable,\n NativeId,\n>(\n database: EffectMysql2Database<AnyRelations>,\n mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>,\n) => makeMysqlIdentityServices(database, mapping);\n\nexport {\n makeMysqlSessionStepUpServices as makeSessionStepUpServices,\n coordinateMysqlSessionStepUp as coordinateSessionStepUp,\n} from \"./drizzle/mysql-sessions\";\n\nexport {\n makeMySqlPasswordPreparedPersistenceServices as makePasswordPreparedPersistenceServices,\n coordinateMySqlPasswordPreparedPersistence as coordinatePasswordPreparedPersistence,\n} from \"./drizzle/mysql-password-prepared\";\n\nexport { passwordPreparedPersistenceLayer } from \"./drizzle/password-prepared-target\";\n\nimport { makeOAuthTarget } from \"./drizzle/oauth-drivers\";\nimport { mysqlOAuthTransaction } from \"./drizzle/oauth-mysql\";\nimport { sqlClientOAuthStandaloneGuard } from \"./drizzle/oauth-target\";\n\nconst oauthTarget = makeOAuthTarget<\n EffectMysql2Database<AnyRelations>,\n AnyMySqlTable<{ dialect: \"mysql\" }>\n>({\n mode: \"interactive\",\n dialect: \"mysql\",\n locking: true,\n transaction: mysqlOAuthTransaction,\n standaloneGuard: sqlClientOAuthStandaloneGuard,\n});\n\nexport const {\n makeOAuthAccountsServices,\n makeOAuthSignInServices,\n makeOAuthRegistrationIntentServices,\n makeOAuthRegistrationServices,\n coordinateOAuthRegistration,\n coordinateOAuthSignIn,\n coordinateOAuthRegistrationIntents,\n coordinateOAuthAccounts,\n makeOAuthConnectedServices,\n makeOAuthConnectedRevocationServices,\n coordinateOAuthConnected,\n coordinateOAuthConnectedRevocations,\n} = oauthTarget;\n\nimport { makePasskeyTarget } from \"./drizzle/passkey-drivers\";\nimport { unavailable as passkeyUnavailable } from \"./drizzle/passkey-state\";\nimport { sqlClientPasskeyStandaloneGuard } from \"./drizzle/passkey-target\";\nimport { mysqlTransaction } from \"./drizzle/transaction-mysql\";\n\nconst passkeyTarget = makePasskeyTarget<\n EffectMysql2Database<AnyRelations>,\n AnyMySqlTable<{ dialect: \"mysql\" }>\n>({\n mode: \"interactive\",\n dialect: \"mysql\",\n locking: true,\n standaloneGuard: sqlClientPasskeyStandaloneGuard,\n transaction: (database, body) => mysqlTransaction(passkeyUnavailable, database, body),\n});\n\nexport const {\n makePasskeyCredentialServices,\n makePasskeyPersistenceServices,\n makePasskeyEnrollmentContextServices,\n makePasskeyRegistrationCeremonyServices,\n coordinatePasskeyPersistence,\n coordinatePasskeyRegistrationCeremony,\n makePasskeyManagementServices,\n makePasskeyRegistrationServices,\n coordinatePasskeyManagement,\n coordinatePasskeyRegistration,\n} = passkeyTarget;\n\nimport { unavailable as totpUnavailable } from \"./drizzle/totp-state\";\nimport { makeTotpTarget, sqlClientTotpStandaloneGuard } from \"./drizzle/totp-target\";\n\nconst totpTarget = makeTotpTarget<\n EffectMysql2Database<AnyRelations>,\n AnyMySqlTable<{ dialect: \"mysql\" }>\n>({\n mode: \"interactive\",\n dialect: \"mysql\",\n locking: true,\n standaloneGuard: sqlClientTotpStandaloneGuard,\n transaction: (database, body) => mysqlTransaction(totpUnavailable, database, body),\n});\n\nexport const { makeTotpPersistenceServices, coordinateTotpPersistence } = totpTarget;\n\nimport { unavailable as phoneUnavailable } from \"./drizzle/phone-state\";\nimport { makePhoneTarget, sqlClientPhoneStandaloneGuard } from \"./drizzle/phone-target\";\n\nconst phoneTarget = makePhoneTarget<\n EffectMysql2Database<AnyRelations>,\n AnyMySqlTable<{ dialect: \"mysql\" }>\n>({\n mode: \"interactive\",\n dialect: \"mysql\",\n locking: true,\n standaloneGuard: sqlClientPhoneStandaloneGuard,\n transaction: (database, body) => mysqlTransaction(phoneUnavailable, database, body),\n});\n\nexport const { makePhonePersistenceServices, coordinatePhonePersistence } = phoneTarget;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4DA,MAAa,aAAa;AAE1B,MAAa,oBAKX,UACA,YACG,sBAAsB,UAAU,OAAO;AAE5C,MAAa,wBAOX,UACA,YACG,0BAA0B,UAAU,OAAO;AA6BhD,MAAa,EACX,2BACA,yBACA,qCACA,+BACA,6BACA,uBACA,oCACA,yBACA,4BACA,sCACA,0BACA,wCAvBkB,gBAGlB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,aAAa;CACb,iBAAiB;AACnB,CAeI;AAkBJ,MAAa,EACX,+BACA,gCACA,sCACA,yCACA,8BACA,uCACA,+BACA,iCACA,6BACA,kCArBoB,kBAGpB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;CACjB,cAAc,UAAU,SAAS,iBAAiBA,eAAoB,UAAU,IAAI;AACtF,CAaI;AAgBJ,MAAa,EAAE,6BAA6B,8BAXzB,eAGjB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;CACjB,cAAc,UAAU,SAAS,iBAAiBC,aAAiB,UAAU,IAAI;AACnF,CAE0E;AAgB1E,MAAa,EAAE,8BAA8B,+BAXzB,gBAGlB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;CACjB,cAAc,UAAU,SAAS,iBAAiBC,eAAkB,UAAU,IAAI;AACpF,CAE4E"}
1
+ {"version":3,"file":"Mysql2.mjs","names":["passkeyUnavailable","totpUnavailable","phoneUnavailable"],"sources":["../src/Mysql2.ts"],"sourcesContent":["import type { AnyRelations } from \"drizzle-orm\";\nimport type { EffectMysql2Database } from \"drizzle-orm/effect-mysql2\";\nimport type { AnyMySqlTable } from \"drizzle-orm/mysql-core\";\n\nimport type { IdentityTables } from \"./drizzle/model\";\nimport {\n makeMysqlExternalIdentityServices,\n makeMysqlIdentityServices,\n makeMysqlSubjectProvisioningServices,\n} from \"./drizzle/mysql-identity\";\n\nexport {\n coordinateMysqlAuthenticationAuthority as coordinateAuthenticationAuthority,\n coordinateMysqlPendingAuthentication as coordinatePendingAuthentication,\n coordinateMysqlSignedSessionValidity as coordinateSignedSessionValidity,\n coordinateMysqlStatefulSessions as coordinateStatefulSessions,\n makeMysqlAuthenticationAuthorityServices as makeAuthenticationAuthorityServices,\n makeMysqlPendingAuthenticationServices as makePendingAuthenticationServices,\n makeMysqlSignedSessionValidityServices as makeSignedSessionValidityServices,\n makeMysqlStatefulSessionServices as makeStatefulSessionServices,\n} from \"./drizzle/mysql-sessions\";\n\nexport {\n coordinateMysqlProofPersistence as coordinateProofPersistence,\n makeMysqlProofPersistenceServices as makeProofPersistenceServices,\n} from \"./drizzle/mysql-proofs\";\n\nexport {\n coordinateMysqlPasswordPersistence as coordinatePasswordPersistence,\n coordinateMysqlPasswordRegistration as coordinatePasswordRegistration,\n makeMysqlPasswordPersistenceServices as makePasswordPersistenceServices,\n makeMysqlPasswordRegistrationServices as makePasswordRegistrationServices,\n} from \"./drizzle/mysql-passwords\";\n\nexport {\n coordinateMysqlEmailAddress as coordinateEmailAddress,\n coordinateMysqlEmailRegistration as coordinateEmailRegistration,\n makeMysqlEmailAddressServices as makeEmailAddressServices,\n makeMysqlEmailRegistrationServices as makeEmailRegistrationServices,\n makeMysqlEmailSignInServices as makeEmailSignInServices,\n} from \"./drizzle/mysql-emails\";\n\nexport {\n makeMysqlExternalIdentityServices as makeExternalIdentityServices,\n makeMysqlSubjectProvisioningServices as makeSubjectProvisioningServices,\n};\n\nexport const commitMode = \"interactive\" as const;\n\nexport const makeIdentityServices = <\n Subject extends AnyMySqlTable,\n Identifier extends AnyMySqlTable,\n External extends AnyMySqlTable,\n Request extends AnyMySqlTable,\n NativeId,\n>(\n database: EffectMysql2Database<AnyRelations>,\n mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>,\n) => makeMysqlIdentityServices(database, mapping);\n\nexport {\n makeMysqlSessionStepUpServices as makeSessionStepUpServices,\n coordinateMysqlSessionStepUp as coordinateSessionStepUp,\n} from \"./drizzle/mysql-sessions\";\n\nexport {\n makeMySqlPasswordPreparedPersistenceServices as makePasswordPreparedPersistenceServices,\n coordinateMySqlPasswordPreparedPersistence as coordinatePasswordPreparedPersistence,\n} from \"./drizzle/mysql-password-prepared\";\n\nexport { passwordPreparedPersistenceLayer } from \"./drizzle/password-prepared-target\";\n\nimport { makeOAuthTarget } from \"./drizzle/oauth-drivers\";\nimport { mysqlOAuthTransaction } from \"./drizzle/oauth-mysql\";\nimport { sqlClientOAuthStandaloneGuard } from \"./drizzle/oauth-target\";\n\nconst oauthTarget = makeOAuthTarget<\n EffectMysql2Database<AnyRelations>,\n AnyMySqlTable<{ dialect: \"mysql\" }>\n>({\n mode: \"interactive\",\n dialect: \"mysql\",\n locking: true,\n transaction: mysqlOAuthTransaction,\n standaloneGuard: sqlClientOAuthStandaloneGuard,\n});\n\nexport const {\n makeOAuthAccountsServices,\n makeOAuthSignInServices,\n makeOAuthRegistrationIntentServices,\n makeOAuthRegistrationServices,\n coordinateOAuthRegistration,\n coordinateOAuthSignIn,\n coordinateOAuthRegistrationIntents,\n coordinateOAuthAccounts,\n makeOAuthConnectedServices,\n makeOAuthConnectedRevocationServices,\n coordinateOAuthConnected,\n coordinateOAuthConnectedRevocations,\n} = oauthTarget;\n\nimport { makePasskeyTarget } from \"./drizzle/passkey-drivers\";\nimport { unavailable as passkeyUnavailable } from \"./drizzle/passkey-state\";\nimport { sqlClientPasskeyStandaloneGuard } from \"./drizzle/passkey-target\";\nimport { mysqlTransaction } from \"./drizzle/transaction-mysql\";\n\nconst passkeyTarget = makePasskeyTarget<\n EffectMysql2Database<AnyRelations>,\n AnyMySqlTable<{ dialect: \"mysql\" }>\n>({\n mode: \"interactive\",\n dialect: \"mysql\",\n locking: true,\n standaloneGuard: sqlClientPasskeyStandaloneGuard,\n transaction: (database, body) => mysqlTransaction(passkeyUnavailable, database, body),\n});\n\nexport const {\n makePasskeyCredentialServices,\n makePasskeyPersistenceServices,\n makePasskeyEnrollmentContextServices,\n makePasskeyRegistrationCeremonyServices,\n coordinatePasskeyPersistence,\n coordinatePasskeyRegistrationCeremony,\n makePasskeyManagementServices,\n makePasskeyRegistrationServices,\n coordinatePasskeyManagement,\n coordinatePasskeyRegistration,\n} = passkeyTarget;\n\nimport { unavailable as totpUnavailable } from \"./drizzle/totp-state\";\nimport { makeTotpTarget, sqlClientTotpStandaloneGuard } from \"./drizzle/totp-target\";\n\nconst totpTarget = makeTotpTarget<\n EffectMysql2Database<AnyRelations>,\n AnyMySqlTable<{ dialect: \"mysql\" }>\n>({\n mode: \"interactive\",\n dialect: \"mysql\",\n locking: true,\n standaloneGuard: sqlClientTotpStandaloneGuard,\n transaction: (database, body) => mysqlTransaction(totpUnavailable, database, body),\n});\n\nexport const { makeTotpPersistenceServices, coordinateTotpPersistence } = totpTarget;\n\nimport { unavailable as phoneUnavailable } from \"./drizzle/phone-state\";\nimport { makePhoneTarget, sqlClientPhoneStandaloneGuard } from \"./drizzle/phone-target\";\n\nconst phoneTarget = makePhoneTarget<\n EffectMysql2Database<AnyRelations>,\n AnyMySqlTable<{ dialect: \"mysql\" }>\n>({\n mode: \"interactive\",\n dialect: \"mysql\",\n locking: true,\n standaloneGuard: sqlClientPhoneStandaloneGuard,\n transaction: (database, body) => mysqlTransaction(phoneUnavailable, database, body),\n});\n\nexport const { makePhonePersistenceServices, coordinatePhonePersistence } = phoneTarget;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA+CA,MAAa,aAAa;AAE1B,MAAa,wBAOX,UACA,YACG,0BAA0B,UAAU,OAAO;AA6BhD,MAAa,EACX,2BACA,yBACA,qCACA,+BACA,6BACA,uBACA,oCACA,yBACA,4BACA,sCACA,0BACA,wCAvBkB,gBAGlB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,aAAa;CACb,iBAAiB;AACnB,CAeI;AAkBJ,MAAa,EACX,+BACA,gCACA,sCACA,yCACA,8BACA,uCACA,+BACA,iCACA,6BACA,kCArBoB,kBAGpB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;CACjB,cAAc,UAAU,SAAS,iBAAiBA,eAAoB,UAAU,IAAI;AACtF,CAaI;AAgBJ,MAAa,EAAE,6BAA6B,8BAXzB,eAGjB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;CACjB,cAAc,UAAU,SAAS,iBAAiBC,aAAiB,UAAU,IAAI;AACnF,CAE0E;AAgB1E,MAAa,EAAE,8BAA8B,+BAXzB,gBAGlB;CACA,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;CACjB,cAAc,UAAU,SAAS,iBAAiBC,eAAkB,UAAU,IAAI;AACpF,CAE4E"}