@yielded/auth-persistence-drizzle 0.1.0-beta.25 → 0.1.0-beta.27

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 (383) hide show
  1. package/README.md +4 -2
  2. package/dist/D1.d.mts +495 -1151
  3. package/dist/D1.mjs +41 -19
  4. package/dist/D1.mjs.map +1 -1
  5. package/dist/Libsql.d.mts +385 -1996
  6. package/dist/Libsql.mjs +43 -47
  7. package/dist/Libsql.mjs.map +1 -1
  8. package/dist/Mysql2.d.mts +397 -1743
  9. package/dist/Mysql2.mjs +35 -41
  10. package/dist/Mysql2.mjs.map +1 -1
  11. package/dist/Pglite.d.mts +397 -1743
  12. package/dist/Pglite.mjs +42 -31
  13. package/dist/Pglite.mjs.map +1 -1
  14. package/dist/Postgres.d.mts +397 -1743
  15. package/dist/Postgres.mjs +42 -31
  16. package/dist/Postgres.mjs.map +1 -1
  17. package/dist/SqliteBun.d.mts +385 -1992
  18. package/dist/SqliteBun.mjs +43 -43
  19. package/dist/SqliteBun.mjs.map +1 -1
  20. package/dist/SqliteDo.d.mts +385 -1991
  21. package/dist/SqliteDo.mjs +42 -41
  22. package/dist/SqliteDo.mjs.map +1 -1
  23. package/dist/SqliteNode.d.mts +385 -1992
  24. package/dist/SqliteNode.mjs +43 -43
  25. package/dist/SqliteNode.mjs.map +1 -1
  26. package/dist/SqliteWasm.d.mts +385 -1992
  27. package/dist/SqliteWasm.mjs +43 -43
  28. package/dist/SqliteWasm.mjs.map +1 -1
  29. package/dist/drizzle/d1-identity.mjs +2 -2
  30. package/dist/drizzle/d1-identity.mjs.map +1 -1
  31. package/dist/drizzle/driver-types.d.mts +15 -0
  32. package/dist/drizzle/email-drivers.mjs +32 -0
  33. package/dist/drizzle/email-drivers.mjs.map +1 -0
  34. package/dist/drizzle/email-model.d.mts +9 -13
  35. package/dist/drizzle/email-target.d.mts +10 -11
  36. package/dist/drizzle/email-target.mjs +33 -70
  37. package/dist/drizzle/email-target.mjs.map +1 -1
  38. package/dist/drizzle/model.d.mts +1 -10
  39. package/dist/drizzle/model.mjs +1 -2
  40. package/dist/drizzle/model.mjs.map +1 -1
  41. package/dist/drizzle/mysql-identity.mjs +3 -6
  42. package/dist/drizzle/mysql-identity.mjs.map +1 -1
  43. package/dist/drizzle/native-clock.d.mts +9 -0
  44. package/dist/drizzle/native-clock.mjs +18 -0
  45. package/dist/drizzle/native-clock.mjs.map +1 -0
  46. package/dist/drizzle/native-database.d.mts +46 -0
  47. package/dist/drizzle/native-database.mjs +6 -5
  48. package/dist/drizzle/native-database.mjs.map +1 -1
  49. package/dist/drizzle/native-sql-table.mjs +13 -5
  50. package/dist/drizzle/native-sql-table.mjs.map +1 -1
  51. package/dist/drizzle/native-target.d.mts +6 -0
  52. package/dist/drizzle/native-target.mjs +44 -0
  53. package/dist/drizzle/native-target.mjs.map +1 -0
  54. package/dist/drizzle/oauth-connected-drivers.mjs +4 -56
  55. package/dist/drizzle/oauth-connected-drivers.mjs.map +1 -1
  56. package/dist/drizzle/oauth-connected-model.d.mts +5 -22
  57. package/dist/drizzle/oauth-connected-model.mjs +1 -7
  58. package/dist/drizzle/oauth-connected-reference.d.mts +5 -7
  59. package/dist/drizzle/oauth-connected-reference.mjs +11 -3
  60. package/dist/drizzle/oauth-connected-reference.mjs.map +1 -1
  61. package/dist/drizzle/oauth-drivers.mjs +1 -2
  62. package/dist/drizzle/oauth-drivers.mjs.map +1 -1
  63. package/dist/drizzle/oauth-model.d.mts +11 -37
  64. package/dist/drizzle/oauth-model.mjs +3 -4
  65. package/dist/drizzle/oauth-model.mjs.map +1 -1
  66. package/dist/drizzle/oauth-proxy.d.mts +1 -1
  67. package/dist/drizzle/oauth-proxy.mjs +1 -1
  68. package/dist/drizzle/oauth-target.d.mts +9 -6
  69. package/dist/drizzle/oauth-target.mjs +47 -15
  70. package/dist/drizzle/oauth-target.mjs.map +1 -1
  71. package/dist/drizzle/passkey/target.d.mts +14 -0
  72. package/dist/drizzle/passkey/target.mjs +52 -0
  73. package/dist/drizzle/passkey/target.mjs.map +1 -0
  74. package/dist/drizzle/passkey/write-target.d.mts +11 -0
  75. package/dist/drizzle/passkey/write-target.mjs +28 -0
  76. package/dist/drizzle/passkey/write-target.mjs.map +1 -0
  77. package/dist/drizzle/passkey-drivers.mjs +2 -4
  78. package/dist/drizzle/passkey-drivers.mjs.map +1 -1
  79. package/dist/drizzle/passkey-model.d.mts +5 -26
  80. package/dist/drizzle/passkey-model.mjs +2 -8
  81. package/dist/drizzle/passkey-registration-ceremony-model.d.mts +3 -6
  82. package/dist/drizzle/passkey-write-drivers.mjs +2 -3
  83. package/dist/drizzle/passkey-write-drivers.mjs.map +1 -1
  84. package/dist/drizzle/passkey-write-model.d.mts +7 -9
  85. package/dist/drizzle/passkey-write-model.mjs +1 -3
  86. package/dist/drizzle/passkey-write-model.mjs.map +1 -1
  87. package/dist/drizzle/password-drivers.mjs +31 -0
  88. package/dist/drizzle/password-drivers.mjs.map +1 -0
  89. package/dist/drizzle/password-model.d.mts +7 -10
  90. package/dist/drizzle/password-target.d.mts +7 -8
  91. package/dist/drizzle/password-target.mjs +23 -68
  92. package/dist/drizzle/password-target.mjs.map +1 -1
  93. package/dist/drizzle/pg-identity.mjs +3 -6
  94. package/dist/drizzle/pg-identity.mjs.map +1 -1
  95. package/dist/drizzle/phone-drivers.mjs +24 -0
  96. package/dist/drizzle/phone-drivers.mjs.map +1 -0
  97. package/dist/drizzle/phone-model.d.mts +13 -104
  98. package/dist/drizzle/phone-model.mjs +5 -33
  99. package/dist/drizzle/phone-model.mjs.map +1 -1
  100. package/dist/drizzle/phone-target.mjs +22 -171
  101. package/dist/drizzle/phone-target.mjs.map +1 -1
  102. package/dist/drizzle/proof-drivers.mjs +24 -0
  103. package/dist/drizzle/proof-drivers.mjs.map +1 -0
  104. package/dist/drizzle/proof-model.d.mts +7 -15
  105. package/dist/drizzle/proof-target.d.mts +5 -5
  106. package/dist/drizzle/proof-target.mjs +14 -28
  107. package/dist/drizzle/proof-target.mjs.map +1 -1
  108. package/dist/drizzle/session-drivers.mjs +97 -0
  109. package/dist/drizzle/session-drivers.mjs.map +1 -0
  110. package/dist/drizzle/session-model.d.mts +11 -22
  111. package/dist/drizzle/sqlite-do-database.d.mts +3 -3
  112. package/dist/drizzle/sqlite-do-database.mjs +6 -1
  113. package/dist/drizzle/sqlite-do-database.mjs.map +1 -1
  114. package/dist/drizzle/sqlite-identity.mjs +3 -5
  115. package/dist/drizzle/sqlite-identity.mjs.map +1 -1
  116. package/dist/drizzle/step-up-model.d.mts +2 -5
  117. package/dist/drizzle/storage-validation.mjs +2 -1
  118. package/dist/drizzle/storage-validation.mjs.map +1 -1
  119. package/dist/drizzle/totp-model.d.mts +7 -74
  120. package/dist/drizzle/totp-model.mjs +1 -5
  121. package/dist/drizzle/totp-model.mjs.map +1 -1
  122. package/dist/drizzle/totp-target.mjs +39 -75
  123. package/dist/drizzle/totp-target.mjs.map +1 -1
  124. package/dist/drizzle/transaction-handle.mjs +13 -0
  125. package/dist/drizzle/transaction-handle.mjs.map +1 -0
  126. package/dist/drizzle/transaction-mysql.mjs +43 -12
  127. package/dist/drizzle/transaction-mysql.mjs.map +1 -1
  128. package/dist/index.d.mts +17 -22
  129. package/dist/index.mjs +10 -16
  130. package/dist/internal/drizzle-postgres.mjs +4 -6
  131. package/dist/internal/drizzle-postgres.mjs.map +1 -1
  132. package/dist/internal/drizzle-sqlite.mjs +4 -6
  133. package/dist/internal/drizzle-sqlite.mjs.map +1 -1
  134. package/package.json +1 -1
  135. package/src/D1.ts +77 -74
  136. package/src/Libsql.ts +65 -105
  137. package/src/Mysql2.ts +52 -87
  138. package/src/Pglite.ts +74 -81
  139. package/src/Postgres.ts +74 -81
  140. package/src/SqliteBun.ts +65 -113
  141. package/src/SqliteDo.ts +58 -106
  142. package/src/SqliteNode.ts +65 -113
  143. package/src/SqliteWasm.ts +65 -113
  144. package/src/drizzle/d1-identity.ts +2 -2
  145. package/src/drizzle/driver-types.ts +26 -0
  146. package/src/drizzle/email-drivers.ts +320 -0
  147. package/src/drizzle/email-model.ts +24 -78
  148. package/src/drizzle/email-target.ts +118 -211
  149. package/src/drizzle/model.ts +0 -2
  150. package/src/drizzle/mysql-identity.ts +4 -24
  151. package/src/drizzle/native-clock.ts +21 -0
  152. package/src/drizzle/native-database.ts +59 -18
  153. package/src/drizzle/native-sql-table.ts +104 -87
  154. package/src/drizzle/native-target.ts +120 -0
  155. package/src/drizzle/oauth-connected-drivers.ts +24 -233
  156. package/src/drizzle/oauth-connected-model.ts +3 -93
  157. package/src/drizzle/oauth-connected-reference.ts +16 -25
  158. package/src/drizzle/oauth-drivers.ts +58 -99
  159. package/src/drizzle/oauth-model.ts +27 -132
  160. package/src/drizzle/oauth-target.ts +250 -33
  161. package/src/drizzle/passkey/target.ts +205 -0
  162. package/src/drizzle/passkey/write-target.ts +91 -0
  163. package/src/drizzle/passkey-drivers.ts +35 -133
  164. package/src/drizzle/passkey-model.ts +3 -81
  165. package/src/drizzle/passkey-registration-ceremony-model.ts +5 -25
  166. package/src/drizzle/passkey-write-drivers.ts +32 -102
  167. package/src/drizzle/passkey-write-model.ts +10 -44
  168. package/src/drizzle/password-drivers.ts +286 -0
  169. package/src/drizzle/password-model.ts +10 -44
  170. package/src/drizzle/password-target.ts +85 -239
  171. package/src/drizzle/pg-identity.ts +4 -19
  172. package/src/drizzle/phone-drivers.ts +142 -0
  173. package/src/drizzle/phone-model.ts +22 -162
  174. package/src/drizzle/phone-target.ts +51 -493
  175. package/src/drizzle/proof-drivers.ts +123 -0
  176. package/src/drizzle/proof-model.ts +12 -123
  177. package/src/drizzle/proof-target.ts +38 -102
  178. package/src/drizzle/session-drivers.ts +696 -0
  179. package/src/drizzle/session-model.ts +54 -118
  180. package/src/drizzle/sqlite-do-database.ts +8 -0
  181. package/src/drizzle/sqlite-identity.ts +4 -22
  182. package/src/drizzle/step-up-model.ts +13 -37
  183. package/src/drizzle/storage-validation.ts +2 -1
  184. package/src/drizzle/totp-model.ts +20 -77
  185. package/src/drizzle/totp-target.ts +121 -261
  186. package/src/drizzle/transaction-handle.ts +41 -0
  187. package/src/drizzle/transaction-mysql.ts +91 -26
  188. package/src/index.ts +7 -122
  189. package/src/internal/drizzle-postgres.ts +4 -7
  190. package/src/internal/drizzle-sqlite.ts +4 -7
  191. package/dist/drizzle/crypto.mjs +0 -11
  192. package/dist/drizzle/crypto.mjs.map +0 -1
  193. package/dist/drizzle/d1-emails.d.mts +0 -62
  194. package/dist/drizzle/d1-emails.mjs +0 -626
  195. package/dist/drizzle/d1-emails.mjs.map +0 -1
  196. package/dist/drizzle/d1-generated-statement.mjs +0 -79
  197. package/dist/drizzle/d1-generated-statement.mjs.map +0 -1
  198. package/dist/drizzle/d1-oauth.d.mts +0 -331
  199. package/dist/drizzle/d1-oauth.mjs +0 -79
  200. package/dist/drizzle/d1-oauth.mjs.map +0 -1
  201. package/dist/drizzle/d1-passkey.d.mts +0 -37
  202. package/dist/drizzle/d1-passkey.mjs +0 -98
  203. package/dist/drizzle/d1-passkey.mjs.map +0 -1
  204. package/dist/drizzle/d1-password-prepared.d.mts +0 -25
  205. package/dist/drizzle/d1-password-prepared.mjs +0 -473
  206. package/dist/drizzle/d1-password-prepared.mjs.map +0 -1
  207. package/dist/drizzle/d1-passwords.d.mts +0 -70
  208. package/dist/drizzle/d1-passwords.mjs +0 -808
  209. package/dist/drizzle/d1-passwords.mjs.map +0 -1
  210. package/dist/drizzle/d1-phone.d.mts +0 -23
  211. package/dist/drizzle/d1-phone.mjs +0 -33
  212. package/dist/drizzle/d1-phone.mjs.map +0 -1
  213. package/dist/drizzle/d1-planning.d.mts +0 -11
  214. package/dist/drizzle/d1-planning.mjs +0 -43
  215. package/dist/drizzle/d1-planning.mjs.map +0 -1
  216. package/dist/drizzle/d1-proofs.d.mts +0 -80
  217. package/dist/drizzle/d1-proofs.mjs +0 -842
  218. package/dist/drizzle/d1-proofs.mjs.map +0 -1
  219. package/dist/drizzle/d1-sessions.d.mts +0 -68
  220. package/dist/drizzle/d1-sessions.mjs +0 -987
  221. package/dist/drizzle/d1-sessions.mjs.map +0 -1
  222. package/dist/drizzle/d1-totp.d.mts +0 -23
  223. package/dist/drizzle/d1-totp.mjs +0 -30
  224. package/dist/drizzle/d1-totp.mjs.map +0 -1
  225. package/dist/drizzle/email-registration.d.mts +0 -33
  226. package/dist/drizzle/email-registration.mjs +0 -281
  227. package/dist/drizzle/email-registration.mjs.map +0 -1
  228. package/dist/drizzle/email-sql.d.mts +0 -1
  229. package/dist/drizzle/email-sql.mjs +0 -9
  230. package/dist/drizzle/email-sql.mjs.map +0 -1
  231. package/dist/drizzle/mysql-emails.d.mts +0 -71
  232. package/dist/drizzle/mysql-emails.mjs +0 -43
  233. package/dist/drizzle/mysql-emails.mjs.map +0 -1
  234. package/dist/drizzle/mysql-password-prepared.d.mts +0 -30
  235. package/dist/drizzle/mysql-password-prepared.mjs +0 -21
  236. package/dist/drizzle/mysql-password-prepared.mjs.map +0 -1
  237. package/dist/drizzle/mysql-passwords.d.mts +0 -71
  238. package/dist/drizzle/mysql-passwords.mjs +0 -43
  239. package/dist/drizzle/mysql-passwords.mjs.map +0 -1
  240. package/dist/drizzle/mysql-proofs.d.mts +0 -75
  241. package/dist/drizzle/mysql-proofs.mjs +0 -28
  242. package/dist/drizzle/mysql-proofs.mjs.map +0 -1
  243. package/dist/drizzle/mysql-sessions.d.mts +0 -92
  244. package/dist/drizzle/mysql-sessions.mjs +0 -58
  245. package/dist/drizzle/mysql-sessions.mjs.map +0 -1
  246. package/dist/drizzle/oauth-connected-model.mjs.map +0 -1
  247. package/dist/drizzle/oauth-connected-target.d.mts +0 -6
  248. package/dist/drizzle/oauth-connected-target.mjs +0 -12
  249. package/dist/drizzle/oauth-connected-target.mjs.map +0 -1
  250. package/dist/drizzle/oauth-kernel.mjs +0 -11
  251. package/dist/drizzle/oauth-kernel.mjs.map +0 -1
  252. package/dist/drizzle/oauth-mysql.mjs +0 -8
  253. package/dist/drizzle/oauth-mysql.mjs.map +0 -1
  254. package/dist/drizzle/passkey-kernel.mjs +0 -8
  255. package/dist/drizzle/passkey-kernel.mjs.map +0 -1
  256. package/dist/drizzle/passkey-model.mjs.map +0 -1
  257. package/dist/drizzle/passkey-registration-ceremony-model.mjs +0 -2
  258. package/dist/drizzle/passkey-state.mjs +0 -7
  259. package/dist/drizzle/passkey-state.mjs.map +0 -1
  260. package/dist/drizzle/passkey-target.d.mts +0 -2
  261. package/dist/drizzle/passkey-target.mjs +0 -7
  262. package/dist/drizzle/passkey-target.mjs.map +0 -1
  263. package/dist/drizzle/passkey-write-target.d.mts +0 -5
  264. package/dist/drizzle/passkey-write-target.mjs +0 -7
  265. package/dist/drizzle/passkey-write-target.mjs.map +0 -1
  266. package/dist/drizzle/password-prepared-model.d.mts +0 -92
  267. package/dist/drizzle/password-prepared-model.mjs +0 -11
  268. package/dist/drizzle/password-prepared-model.mjs.map +0 -1
  269. package/dist/drizzle/password-prepared-sql.mjs +0 -395
  270. package/dist/drizzle/password-prepared-sql.mjs.map +0 -1
  271. package/dist/drizzle/password-prepared-state.mjs +0 -104
  272. package/dist/drizzle/password-prepared-state.mjs.map +0 -1
  273. package/dist/drizzle/password-prepared-target.d.mts +0 -13
  274. package/dist/drizzle/password-prepared-target.mjs +0 -62
  275. package/dist/drizzle/password-prepared-target.mjs.map +0 -1
  276. package/dist/drizzle/password-registration.d.mts +0 -7
  277. package/dist/drizzle/password-registration.mjs +0 -137
  278. package/dist/drizzle/password-registration.mjs.map +0 -1
  279. package/dist/drizzle/password-sql.d.mts +0 -1
  280. package/dist/drizzle/password-sql.mjs +0 -10
  281. package/dist/drizzle/password-sql.mjs.map +0 -1
  282. package/dist/drizzle/pg-emails.d.mts +0 -72
  283. package/dist/drizzle/pg-emails.mjs +0 -43
  284. package/dist/drizzle/pg-emails.mjs.map +0 -1
  285. package/dist/drizzle/pg-password-prepared.d.mts +0 -31
  286. package/dist/drizzle/pg-password-prepared.mjs +0 -21
  287. package/dist/drizzle/pg-password-prepared.mjs.map +0 -1
  288. package/dist/drizzle/pg-passwords.d.mts +0 -72
  289. package/dist/drizzle/pg-passwords.mjs +0 -43
  290. package/dist/drizzle/pg-passwords.mjs.map +0 -1
  291. package/dist/drizzle/pg-proofs.d.mts +0 -76
  292. package/dist/drizzle/pg-proofs.mjs +0 -27
  293. package/dist/drizzle/pg-proofs.mjs.map +0 -1
  294. package/dist/drizzle/pg-sessions.d.mts +0 -93
  295. package/dist/drizzle/pg-sessions.mjs +0 -58
  296. package/dist/drizzle/pg-sessions.mjs.map +0 -1
  297. package/dist/drizzle/phone-state.mjs +0 -14
  298. package/dist/drizzle/phone-state.mjs.map +0 -1
  299. package/dist/drizzle/phone-target.d.mts +0 -15
  300. package/dist/drizzle/proof-sql.d.mts +0 -1
  301. package/dist/drizzle/proof-sql.mjs +0 -8
  302. package/dist/drizzle/proof-sql.mjs.map +0 -1
  303. package/dist/drizzle/query-operations.mjs +0 -31
  304. package/dist/drizzle/query-operations.mjs.map +0 -1
  305. package/dist/drizzle/session-sql.d.mts +0 -1
  306. package/dist/drizzle/session-sql.mjs +0 -9
  307. package/dist/drizzle/session-sql.mjs.map +0 -1
  308. package/dist/drizzle/session-target.d.mts +0 -30
  309. package/dist/drizzle/session-target.mjs +0 -49
  310. package/dist/drizzle/session-target.mjs.map +0 -1
  311. package/dist/drizzle/sqlite-emails.mjs +0 -50
  312. package/dist/drizzle/sqlite-emails.mjs.map +0 -1
  313. package/dist/drizzle/sqlite-password-prepared.mjs +0 -26
  314. package/dist/drizzle/sqlite-password-prepared.mjs.map +0 -1
  315. package/dist/drizzle/sqlite-passwords.mjs +0 -54
  316. package/dist/drizzle/sqlite-passwords.mjs.map +0 -1
  317. package/dist/drizzle/sqlite-proofs.mjs +0 -34
  318. package/dist/drizzle/sqlite-proofs.mjs.map +0 -1
  319. package/dist/drizzle/sqlite-sessions.mjs +0 -79
  320. package/dist/drizzle/sqlite-sessions.mjs.map +0 -1
  321. package/dist/drizzle/standalone-guard.d.mts +0 -2
  322. package/dist/drizzle/standalone-guard.mjs +0 -21
  323. package/dist/drizzle/standalone-guard.mjs.map +0 -1
  324. package/dist/drizzle/totp-state.d.mts +0 -37
  325. package/dist/drizzle/totp-state.mjs +0 -287
  326. package/dist/drizzle/totp-state.mjs.map +0 -1
  327. package/dist/drizzle/totp-target.d.mts +0 -15
  328. package/dist/drizzle/transaction-execution.d.mts +0 -2
  329. package/dist/drizzle/transaction-execution.mjs +0 -11
  330. package/dist/drizzle/transaction-execution.mjs.map +0 -1
  331. package/dist/drizzle/transaction-owner.d.mts +0 -1
  332. package/dist/drizzle/transaction-owner.mjs +0 -8
  333. package/dist/drizzle/transaction-owner.mjs.map +0 -1
  334. package/src/drizzle/crypto.ts +0 -14
  335. package/src/drizzle/d1-emails.ts +0 -1945
  336. package/src/drizzle/d1-generated-statement.ts +0 -129
  337. package/src/drizzle/d1-oauth.ts +0 -360
  338. package/src/drizzle/d1-passkey.ts +0 -383
  339. package/src/drizzle/d1-password-prepared.ts +0 -1266
  340. package/src/drizzle/d1-passwords.ts +0 -2061
  341. package/src/drizzle/d1-phone.ts +0 -103
  342. package/src/drizzle/d1-planning.ts +0 -104
  343. package/src/drizzle/d1-proofs.ts +0 -2354
  344. package/src/drizzle/d1-sessions.ts +0 -2940
  345. package/src/drizzle/d1-totp.ts +0 -88
  346. package/src/drizzle/email-registration.ts +0 -850
  347. package/src/drizzle/email-sql.ts +0 -25
  348. package/src/drizzle/mysql-emails.ts +0 -343
  349. package/src/drizzle/mysql-password-prepared.ts +0 -198
  350. package/src/drizzle/mysql-passwords.ts +0 -343
  351. package/src/drizzle/mysql-proofs.ts +0 -196
  352. package/src/drizzle/mysql-sessions.ts +0 -780
  353. package/src/drizzle/oauth-connected-target.ts +0 -21
  354. package/src/drizzle/oauth-kernel.ts +0 -10
  355. package/src/drizzle/oauth-mysql.ts +0 -10
  356. package/src/drizzle/passkey-kernel.ts +0 -4
  357. package/src/drizzle/passkey-state.ts +0 -3
  358. package/src/drizzle/passkey-target.ts +0 -23
  359. package/src/drizzle/passkey-write-target.ts +0 -9
  360. package/src/drizzle/password-prepared-model.ts +0 -241
  361. package/src/drizzle/password-prepared-sql.ts +0 -1202
  362. package/src/drizzle/password-prepared-state.ts +0 -231
  363. package/src/drizzle/password-prepared-target.ts +0 -169
  364. package/src/drizzle/password-registration.ts +0 -369
  365. package/src/drizzle/password-sql.ts +0 -16
  366. package/src/drizzle/pg-emails.ts +0 -343
  367. package/src/drizzle/pg-password-prepared.ts +0 -199
  368. package/src/drizzle/pg-passwords.ts +0 -342
  369. package/src/drizzle/pg-proofs.ts +0 -206
  370. package/src/drizzle/pg-sessions.ts +0 -789
  371. package/src/drizzle/phone-state.ts +0 -21
  372. package/src/drizzle/proof-sql.ts +0 -10
  373. package/src/drizzle/query-operations.ts +0 -49
  374. package/src/drizzle/session-sql.ts +0 -15
  375. package/src/drizzle/session-target.ts +0 -337
  376. package/src/drizzle/sqlite-emails.ts +0 -393
  377. package/src/drizzle/sqlite-password-prepared.ts +0 -230
  378. package/src/drizzle/sqlite-passwords.ts +0 -497
  379. package/src/drizzle/sqlite-proofs.ts +0 -229
  380. package/src/drizzle/sqlite-sessions.ts +0 -1013
  381. package/src/drizzle/totp-state.ts +0 -525
  382. package/src/drizzle/transaction-execution.ts +0 -13
  383. package/src/drizzle/transaction-owner.ts +0 -11
package/dist/Mysql2.d.mts CHANGED
@@ -1,29 +1,106 @@
1
+ import { EmailAddressMapping, EmailRegistrationMapping, EmailSignInMapping } from "./drizzle/email-model.mjs";
2
+ import { PasswordPersistenceMapping, PasswordRegistrationMapping } from "./drizzle/password-model.mjs";
3
+ import { ProofPersistenceMapping } from "./drizzle/proof-model.mjs";
1
4
  import { ExternalIdentityTables, IdentityTables, SubjectProvisioningTables } from "./drizzle/model.mjs";
2
- import { PasskeyCredentialMapping, PasskeyEnrollmentContextMapping, PasskeyPersistenceMapping } from "./drizzle/passkey-model.mjs";
5
+ import { AuthenticationAuthorityMapping, PendingAuthenticationMapping, SessionCleanupMapping, SignedSessionValidityMapping, StatefulSessionMapping } from "./drizzle/session-model.mjs";
6
+ import { PasskeyCredentialMapping, PasskeyPersistenceMapping } from "./drizzle/passkey-model.mjs";
7
+ import { SessionStepUpMapping } from "./drizzle/step-up-model.mjs";
3
8
  import { OAuthAccountsMapping, OAuthRegistrationIntentMapping, OAuthRegistrationMapping, OAuthSignInMapping } from "./drizzle/oauth-model.mjs";
4
9
  import { OAuthConnectedMapping, OAuthConnectedRevocationMapping } from "./drizzle/oauth-connected-model.mjs";
5
10
  import { PasskeyRegistrationCeremonyMapping } from "./drizzle/passkey-registration-ceremony-model.mjs";
6
- import { passwordPreparedPersistenceLayer } from "./drizzle/password-prepared-target.mjs";
7
- import { TotpMapping, TotpMappingSource, TotpPersistenceServices } from "./drizzle/totp-model.mjs";
11
+ import { NativeDatabase } from "./drizzle/native-database.mjs";
12
+ import { D1BatchStatements } from "./drizzle/D1BatchStatements.mjs";
13
+ import { OAuthCoordinatorError } from "./drizzle/oauth-target.mjs";
14
+ import { TotpMapping } from "./drizzle/totp-model.mjs";
8
15
  import { PasskeyManagementMapping, PasskeyRegistrationMapping } from "./drizzle/passkey-write-model.mjs";
9
- import { PhoneMapping, PhoneMappingSource, PhonePersistenceServices } from "./drizzle/phone-model.mjs";
16
+ import { PasskeyCoordinatorError } from "./drizzle/passkey/target.mjs";
17
+ import { PhoneMapping } from "./drizzle/phone-model.mjs";
10
18
  import "./index.mjs";
19
+ import { NativeDriverTransaction } from "./drizzle/driver-types.mjs";
11
20
  import { SuppliedService } from "./drizzle/SuppliedService.mjs";
12
- import { TotpCoordinatorError } from "./drizzle/totp-target.mjs";
13
- import { PhoneCoordinatorError } from "./drizzle/phone-target.mjs";
21
+ import "./D1.mjs";
14
22
  import { Database } from "./drizzle/mysql-database.mjs";
15
- import { coordinateMysqlAuthenticationAuthority, coordinateMysqlPendingAuthentication, coordinateMysqlSessionStepUp, coordinateMysqlSignedSessionValidity, coordinateMysqlStatefulSessions, makeMysqlAuthenticationAuthorityServices, makeMysqlPendingAuthenticationServices, makeMysqlSessionStepUpServices, makeMysqlSignedSessionValidityServices, makeMysqlStatefulSessionServices } from "./drizzle/mysql-sessions.mjs";
16
- import { coordinateMysqlProofPersistence, makeMysqlProofPersistenceServices } from "./drizzle/mysql-proofs.mjs";
17
- import { coordinateMysqlPasswordPersistence, coordinateMysqlPasswordRegistration, makeMysqlPasswordPersistenceServices, makeMysqlPasswordRegistrationServices } from "./drizzle/mysql-passwords.mjs";
18
- import { coordinateMysqlEmailAddress, coordinateMysqlEmailRegistration, makeMysqlEmailAddressServices, makeMysqlEmailRegistrationServices, makeMysqlEmailSignInServices } from "./drizzle/mysql-emails.mjs";
19
- import { coordinateMySqlPasswordPreparedPersistence, makeMySqlPasswordPreparedPersistenceServices } from "./drizzle/mysql-password-prepared.mjs";
20
23
  import { Layer } from "effect";
21
24
  import { AnyMySqlTable } from "drizzle-orm/mysql-core";
22
25
  import { EffectMysql2Database } from "drizzle-orm/effect-mysql2";
23
26
  //#region src/Mysql2.d.ts
27
+ export declare const coordinateProofPersistence: {
28
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Proof extends import("drizzle-orm").Table, Subject extends import("drizzle-orm").Table, NativeId, A, E, R, DE, DR>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
29
+ readonly mapping: ProofPersistenceMapping<Proof, Subject, NativeId>;
30
+ readonly transaction?: never;
31
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Proofs").ProofUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Proofs").ProofPersistence>>;
32
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Proof extends import("drizzle-orm").Table, Subject extends import("drizzle-orm").Table, NativeId, A, E, R, DE, DR, TxId, TxShape>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
33
+ readonly mapping: ProofPersistenceMapping<Proof, Subject, NativeId>;
34
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<Database>>, TxShape>;
35
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Proofs").ProofUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Proofs").ProofPersistence>>;
36
+ }, makeProofPersistenceServices: <Proof extends import("drizzle-orm").Table, Subject extends import("drizzle-orm").Table, NativeId>(mapping: ProofPersistenceMapping<Proof, Subject, NativeId>) => import("effect/Effect").Effect<{
37
+ readonly proofPersistence: import("@yielded/auth/Proofs").ProofPersistence["Service"];
38
+ }, import("@yielded/auth/Proofs").ProofUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>;
39
+ export declare const coordinatePasswordPersistence: {
40
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N, Proof extends import("drizzle-orm").Table, PS extends import("drizzle-orm").Table, PN, A, E, R, DE, DR>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
41
+ readonly mapping: PasswordPersistenceMapping<S, I, C, AC, N>;
42
+ readonly transaction?: never;
43
+ } & {
44
+ readonly proofMapping?: ProofPersistenceMapping<Proof, PS, PN>;
45
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Password").PasswordUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Password").PasswordPersistence>>;
46
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N, Proof extends import("drizzle-orm").Table, PS extends import("drizzle-orm").Table, PN, A, E, R, DE, DR, TxId, TxShape>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
47
+ readonly mapping: PasswordPersistenceMapping<S, I, C, AC, N>;
48
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<Database>>, TxShape>;
49
+ } & {
50
+ readonly proofMapping?: ProofPersistenceMapping<Proof, PS, PN>;
51
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Password").PasswordUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Password").PasswordPersistence>>;
52
+ }, coordinatePasswordRegistration: {
53
+ <TargetId, Registration, Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N, A, E, R, DE, DR>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
54
+ readonly mapping: PasswordRegistrationMapping<NoInfer<Registration>, S, I, C, AC, N>;
55
+ readonly target: SuppliedService<TargetId, import("@yielded/auth-persistence/Adapter").PasswordRegistrationAuthority<Registration>>;
56
+ readonly transaction?: never;
57
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Password").PasswordUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId>>;
58
+ <TargetId, Registration, Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N, A, E, R, DE, DR, TxId, TxShape>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
59
+ readonly mapping: PasswordRegistrationMapping<NoInfer<Registration>, S, I, C, AC, N>;
60
+ readonly target: SuppliedService<TargetId, import("@yielded/auth-persistence/Adapter").PasswordRegistrationAuthority<Registration>>;
61
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<Database>>, TxShape>;
62
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Password").PasswordUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
63
+ }, makePasswordPersistenceServices: <S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N, Proof extends import("drizzle-orm").Table, PS extends import("drizzle-orm").Table, PN>(mapping: PasswordPersistenceMapping<S, I, C, AC, N>, proofMapping?: ProofPersistenceMapping<Proof, PS, PN> | undefined) => import("effect/Effect").Effect<{
64
+ readonly passwordPersistence: import("@yielded/auth/Password").PasswordPersistence["Service"];
65
+ }, import("@yielded/auth/Password").PasswordUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makePasswordRegistrationServices: <Registration, S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N>(mapping: PasswordRegistrationMapping<Registration, S, I, C, AC, N>) => import("effect/Effect").Effect<{
66
+ readonly registrationAuthority: import("@yielded/auth-persistence/Adapter").PasswordRegistrationAuthority<Registration>;
67
+ }, import("@yielded/auth/Password").PasswordUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>;
68
+ export declare const makeEmailSignInServices: <S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N>(mapping: EmailSignInMapping<S, I, C, AC, N>) => import("effect/Effect").Effect<{
69
+ readonly emailSignInTargets: import("@yielded/auth/Email").EmailSignInTargets["Service"];
70
+ }, import("@yielded/auth/Email").EmailUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailAddressServices: <S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N, Proof extends import("drizzle-orm").Table, PS extends import("drizzle-orm").Table, PN>(mapping: EmailAddressMapping<S, I, C, AC, N>, proofMapping?: ProofPersistenceMapping<Proof, PS, PN> | undefined) => import("effect/Effect").Effect<{
71
+ readonly emailAddressPersistence: import("@yielded/auth/Email").EmailAddressPersistence["Service"];
72
+ }, import("@yielded/auth/Email").EmailUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailRegistrationServices: <Registration, Proof extends import("drizzle-orm").Table, PS extends import("drizzle-orm").Table, PN, S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N>(mapping: EmailRegistrationMapping<Registration, S, I, C, AC, N>, proofs: ProofPersistenceMapping<Proof, PS, PN>) => import("effect/Effect").Effect<{
73
+ readonly registrationAuthority: import("@yielded/auth-persistence/Adapter").EmailRegistrationAuthority<Registration>;
74
+ }, import("@yielded/auth/Email").EmailUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateEmailAddress: {
75
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N, Proof extends import("drizzle-orm").Table, PS extends import("drizzle-orm").Table, PN, A, E, R, DE, DR>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
76
+ readonly mapping: EmailAddressMapping<S, I, C, AC, N>;
77
+ readonly transaction?: never;
78
+ } & {
79
+ readonly proofMapping?: ProofPersistenceMapping<Proof, PS, PN>;
80
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Email").EmailUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Email").EmailAddressPersistence>>;
81
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N, Proof extends import("drizzle-orm").Table, PS extends import("drizzle-orm").Table, PN, A, E, R, DE, DR, TxId, TxShape>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
82
+ readonly mapping: EmailAddressMapping<S, I, C, AC, N>;
83
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<Database>>, TxShape>;
84
+ } & {
85
+ readonly proofMapping?: ProofPersistenceMapping<Proof, PS, PN>;
86
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Email").EmailUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Email").EmailAddressPersistence>>;
87
+ }, coordinateEmailRegistration: {
88
+ <TargetId, Registration, Proof extends import("drizzle-orm").Table, PS extends import("drizzle-orm").Table, PN, Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N, A, E, R, DE, DR>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
89
+ readonly mapping: EmailRegistrationMapping<NoInfer<Registration>, S, I, C, AC, N>;
90
+ readonly proofMapping: ProofPersistenceMapping<Proof, PS, PN>;
91
+ readonly target: SuppliedService<TargetId, import("@yielded/auth-persistence/Adapter").EmailRegistrationAuthority<Registration>>;
92
+ readonly transaction?: never;
93
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Email").EmailUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId>>;
94
+ <TargetId, Registration, Proof extends import("drizzle-orm").Table, PS extends import("drizzle-orm").Table, PN, Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends import("drizzle-orm").Table, I extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, AC extends import("drizzle-orm").Table, N, A, E, R, DE, DR, TxId, TxShape>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
95
+ readonly mapping: EmailRegistrationMapping<NoInfer<Registration>, S, I, C, AC, N>;
96
+ readonly proofMapping: ProofPersistenceMapping<Proof, PS, PN>;
97
+ readonly target: SuppliedService<TargetId, import("@yielded/auth-persistence/Adapter").EmailRegistrationAuthority<Registration>>;
98
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<Database>>, TxShape>;
99
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Email").EmailUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
100
+ };
24
101
  export declare const makeSubjectProvisioningServices: <Subject extends AnyMySqlTable, Identifier extends AnyMySqlTable, Request extends AnyMySqlTable, NativeId>(mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => import("effect/Effect").Effect<{
25
102
  readonly subjectProvisioner: {
26
- 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>;
103
+ readonly provision: (input: import("@yielded/auth/Identity").SubjectProvisioningInput) => import("effect/Effect").Effect<import("@yielded/auth/Identity").SubjectProvisioned, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
27
104
  };
28
105
  }, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
29
106
  export declare const makeExternalIdentityServices: <Subject extends AnyMySqlTable, External extends AnyMySqlTable, NativeId>(mapping: ExternalIdentityTables<Subject, External, NativeId>) => import("effect/Effect").Effect<{
@@ -31,10 +108,9 @@ export declare const makeExternalIdentityServices: <Subject extends AnyMySqlTabl
31
108
  readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => import("effect/Effect").Effect<void, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
32
109
  };
33
110
  }, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
34
- export declare const commitMode: "interactive";
35
111
  export declare const makeIdentityServices: <Subject extends AnyMySqlTable, Identifier extends AnyMySqlTable, External extends AnyMySqlTable, Request extends AnyMySqlTable, NativeId>(mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => import("effect/Effect").Effect<{
36
112
  subjectProvisioner: {
37
- 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>;
113
+ readonly provision: (input: import("@yielded/auth/Identity").SubjectProvisioningInput) => import("effect/Effect").Effect<import("@yielded/auth/Identity").SubjectProvisioned, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
38
114
  };
39
115
  externalIdentityMutation: {
40
116
  readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => import("effect/Effect").Effect<void, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
@@ -50,260 +126,8 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
50
126
  dialect: "mysql";
51
127
  }>, F extends AnyMySqlTable<{
52
128
  dialect: "mysql";
53
- }>, TA extends AnyMySqlTable<{
54
- dialect: "mysql";
55
- }>, U extends AnyMySqlTable<{
56
- dialect: "mysql";
57
- }>, N>(mapping: OAuthAccountsMapping<S, O, C, AC, F, TA, U, N>) => import("effect/Effect").Effect<{
58
- oauthAccountsPersistence: {
59
- readonly capture: (input: {
60
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
61
- readonly subjectId: import("@yielded/auth/Schema").SubjectId;
62
- }) => import("effect/Effect").Effect<import("@yielded/auth/OAuth").OAuthAccountRevision | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
63
- readonly issue: <A>(input: {
64
- readonly flow: import("@yielded/auth/OAuth").OAuthLinkPendingFlow;
65
- readonly authorization: import("@yielded/auth/OAuth").OAuthActionAuthorization;
66
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
67
- readonly _tag: "Rejected";
68
- } | {
69
- readonly _tag: "Issued";
70
- readonly flow: {
71
- readonly context: {
72
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
73
- readonly protocol: "oauth" | "oidc";
74
- readonly configurationGeneration: number;
75
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
76
- readonly responseIssuerMode: "required" | "unsupported";
77
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
78
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
79
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
80
- readonly generation: number;
81
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
82
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
83
- readonly access?: {
84
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
85
- readonly generation: number;
86
- readonly issuance: "active" | "retired";
87
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
88
- readonly clientRegistrationId: string;
89
- readonly scopes: readonly string[];
90
- readonly resources: readonly string[];
91
- readonly retention: "access-and-refresh" | "access-only";
92
- readonly maximumAccessLifetimeMillis: number;
93
- readonly maximumRefreshLifetimeMillis?: number;
94
- readonly refreshAheadMillis: number;
95
- readonly refresh: "confidential" | "rotating" | "unsupported";
96
- readonly revocation: "cohort" | "unsupported";
97
- };
98
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
99
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
100
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
101
- readonly requestBindingExpiresAtMillis: number;
102
- readonly issuedAtMillis: number;
103
- readonly expiresAtMillis: number;
104
- readonly claimLifetimeMillis: number;
105
- readonly namespace: "effect-auth/oauth-link-context/v1";
106
- readonly revision: {
107
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
108
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
109
- readonly credentials: readonly {
110
- readonly credentialId: string;
111
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
112
- }[];
113
- };
114
- readonly maximumEvidenceAgeMillis: number;
115
- };
116
- readonly sealed: {
117
- readonly format: "oauth-xchacha20poly1305-v1";
118
- readonly keyId: string;
119
- readonly nonce: string;
120
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
121
- };
122
- readonly retentionUntilMillis: number;
123
- };
124
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
125
- readonly preflight: (input: import("@yielded/auth/OAuth").OAuthLinkAccess) => import("effect/Effect").Effect<import("@yielded/auth/OAuth").OAuthLinkPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
126
- readonly claim: <A>(input: {
127
- readonly access: import("@yielded/auth/OAuth").OAuthLinkAccess;
128
- readonly flow: import("@yielded/auth/OAuth").OAuthLinkPendingFlow;
129
- readonly claimId: import("@yielded/auth/OAuth").OAuthLinkClaim["claimId"];
130
- readonly authorization: import("@yielded/auth/OAuth").OAuthActionAuthorization;
131
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
132
- readonly _tag: "Rejected";
133
- } | {
134
- readonly _tag: "Claimed";
135
- readonly claim: {
136
- readonly flow: {
137
- readonly context: {
138
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
139
- readonly protocol: "oauth" | "oidc";
140
- readonly configurationGeneration: number;
141
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
142
- readonly responseIssuerMode: "required" | "unsupported";
143
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
144
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
145
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
146
- readonly generation: number;
147
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
148
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
149
- readonly access?: {
150
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
151
- readonly generation: number;
152
- readonly issuance: "active" | "retired";
153
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
154
- readonly clientRegistrationId: string;
155
- readonly scopes: readonly string[];
156
- readonly resources: readonly string[];
157
- readonly retention: "access-and-refresh" | "access-only";
158
- readonly maximumAccessLifetimeMillis: number;
159
- readonly maximumRefreshLifetimeMillis?: number;
160
- readonly refreshAheadMillis: number;
161
- readonly refresh: "confidential" | "rotating" | "unsupported";
162
- readonly revocation: "cohort" | "unsupported";
163
- };
164
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
165
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
166
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
167
- readonly requestBindingExpiresAtMillis: number;
168
- readonly issuedAtMillis: number;
169
- readonly expiresAtMillis: number;
170
- readonly claimLifetimeMillis: number;
171
- readonly namespace: "effect-auth/oauth-link-context/v1";
172
- readonly revision: {
173
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
174
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
175
- readonly credentials: readonly {
176
- readonly credentialId: string;
177
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
178
- }[];
179
- };
180
- readonly maximumEvidenceAgeMillis: number;
181
- };
182
- readonly sealed: {
183
- readonly format: "oauth-xchacha20poly1305-v1";
184
- readonly keyId: string;
185
- readonly nonce: string;
186
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
187
- };
188
- readonly retentionUntilMillis: number;
189
- };
190
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
191
- readonly claimedAtMillis: number;
192
- readonly claimExpiresAtMillis: number;
193
- };
194
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
195
- readonly settle: <A>(input: {
196
- readonly claim: import("@yielded/auth/OAuth").OAuthLinkClaim;
197
- readonly outcome: import("@yielded/auth/OAuth").OAuthLinkOutcome;
198
- readonly authorization: import("@yielded/auth/OAuth").OAuthActionAuthorization;
199
- readonly invalidation: import("@yielded/auth/Sessions").SessionInvalidationWindow;
200
- readonly nowMillis: number;
201
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
202
- readonly _tag: "Rejected";
203
- } | {
204
- readonly _tag: "Ambiguous";
205
- } | {
206
- readonly _tag: "Cancelled";
207
- } | {
208
- readonly _tag: "Linked";
209
- readonly credential: {
210
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
211
- readonly identity: {
212
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
213
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
214
- readonly subject: string;
215
- };
216
- readonly credentialId: string;
217
- readonly credentialRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
218
- readonly revision: {
219
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
220
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
221
- readonly credentials: readonly {
222
- readonly credentialId: string;
223
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
224
- }[];
225
- };
226
- };
227
- readonly changed: boolean;
228
- } | {
229
- readonly _tag: "Conflict";
230
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
231
- readonly inspectUnlink: (input: {
232
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
233
- readonly subjectId: import("@yielded/auth/Schema").SubjectId;
234
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
235
- readonly credentialId: string;
236
- }) => import("effect/Effect").Effect<{
237
- readonly _tag: "Rejected";
238
- } | {
239
- readonly _tag: "Conflict";
240
- } | {
241
- readonly _tag: "Target";
242
- readonly credential: {
243
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
244
- readonly identity: {
245
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
246
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
247
- readonly subject: string;
248
- };
249
- readonly credentialId: string;
250
- readonly credentialRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
251
- readonly revision: {
252
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
253
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
254
- readonly credentials: readonly {
255
- readonly credentialId: string;
256
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
257
- }[];
258
- };
259
- };
260
- } | {
261
- readonly _tag: "Replay";
262
- readonly result: {
263
- readonly _tag: "Unlinked";
264
- readonly credentialId: string;
265
- readonly invalidation: {
266
- readonly trigger: "all-session-revocation" | "credential-change" | "factor-reset" | "identifier-change" | "password-reset" | "subject-delete" | "subject-disable";
267
- readonly existingSessions: "cache-expiry" | "immediate" | "original-absolute-expiry";
268
- readonly maximumExposureMillis: number;
269
- readonly oldAuthenticationEvidence: "rejected";
270
- };
271
- };
272
- }, import("@yielded/auth/OAuth").OAuthUnavailable>;
273
- readonly unlink: <A>(input: {
274
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
275
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
276
- readonly credential: import("@yielded/auth/OAuth").OAuthCredentialSnapshot;
277
- readonly authorization: import("@yielded/auth/OAuth").OAuthActionAuthorization;
278
- readonly invalidation: import("@yielded/auth/Sessions").SessionInvalidationWindow;
279
- readonly nowMillis: number;
280
- readonly retentionUntilMillis: number;
281
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
282
- readonly _tag: "Rejected";
283
- } | {
284
- readonly _tag: "Conflict";
285
- } | {
286
- readonly _tag: "Unlinked";
287
- readonly result: {
288
- readonly _tag: "Unlinked";
289
- readonly credentialId: string;
290
- readonly invalidation: {
291
- readonly trigger: "all-session-revocation" | "credential-change" | "factor-reset" | "identifier-change" | "password-reset" | "subject-delete" | "subject-disable";
292
- readonly existingSessions: "cache-expiry" | "immediate" | "original-absolute-expiry";
293
- readonly maximumExposureMillis: number;
294
- readonly oldAuthenticationEvidence: "rejected";
295
- };
296
- };
297
- readonly replayed: boolean;
298
- } | {
299
- readonly _tag: "LastSignInMethod";
300
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
301
- readonly cleanup: <A>(input: import("@yielded/auth/OAuth").OAuthCleanupInput, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
302
- readonly terminalized: number;
303
- readonly removed: number;
304
- readonly hasMore: boolean;
305
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
306
- };
129
+ }>, N>(mapping: OAuthAccountsMapping<S, O, C, AC, F, N>) => import("effect/Effect").Effect<{
130
+ readonly oauthAccountsPersistence: import("@yielded/auth/OAuth").OAuthAccountsPersistence["Service"];
307
131
  }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthSignInServices: <S extends AnyMySqlTable<{
308
132
  dialect: "mysql";
309
133
  }>, O extends AnyMySqlTable<{
@@ -315,60 +139,13 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
315
139
  }>, F extends AnyMySqlTable<{
316
140
  dialect: "mysql";
317
141
  }>, N>(mapping: OAuthSignInMapping<S, O, C, AC, F, N>) => import("effect/Effect").Effect<{
318
- oauthSignInPersistence: {
319
- readonly issue: <A>(input: import("@yielded/auth/OAuth").OAuthPendingFlow, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthIssueDecision, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
320
- readonly claim: <A>(input: {
321
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
322
- readonly generation: number;
323
- readonly flowId: import("@yielded/auth/Operations").RequestBindingFlowId;
324
- readonly provider: import("@yielded/auth/OAuth").OAuthProviderKey;
325
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
326
- readonly stateDigest: import("@yielded/auth/Schema").TokenDigest;
327
- readonly requestBindingVerifier: import("@yielded/auth/Schema").TokenDigest;
328
- readonly requestBindingExpiresAtMillis: number;
329
- readonly responseIssuer?: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
330
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
331
- readonly nowMillis: number;
332
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthClaimDecision, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
333
- readonly settle: <A>(input: {
334
- readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
335
- readonly outcome: {
336
- readonly _tag: "Verified";
337
- readonly identity: import("@yielded/auth/OAuth").OAuthVerifiedExternalIdentity;
338
- } | {
339
- readonly _tag: "Cancelled" | "Rejected" | "Ambiguous";
340
- };
341
- readonly nowMillis: number;
342
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthSettlementDecision, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
343
- readonly cleanup: <A>(input: import("@yielded/auth/OAuth").OAuthCleanupInput, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
344
- readonly terminalized: number;
345
- readonly removed: number;
346
- readonly hasMore: boolean;
347
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
348
- };
349
- }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationIntentServices: <S extends AnyMySqlTable<{
350
- dialect: "mysql";
351
- }>, O extends AnyMySqlTable<{
352
- dialect: "mysql";
353
- }>, C extends AnyMySqlTable<{
354
- dialect: "mysql";
355
- }>, AC extends AnyMySqlTable<{
356
- dialect: "mysql";
357
- }>, F extends AnyMySqlTable<{
358
- dialect: "mysql";
359
- }>, TA extends AnyMySqlTable<{
142
+ readonly oauthSignInPersistence: import("@yielded/auth/OAuth").OAuthSignInPersistence["Service"];
143
+ }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationIntentServices: <O extends AnyMySqlTable<{
360
144
  dialect: "mysql";
361
145
  }>, I extends AnyMySqlTable<{
362
146
  dialect: "mysql";
363
- }>, N>(mapping: OAuthRegistrationIntentMapping<S, O, C, AC, F, TA, I, N>) => import("effect/Effect").Effect<{
364
- oauthRegistrationIntents: {
365
- readonly settle: <A>(input: {
366
- readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
367
- readonly identity: import("@yielded/auth/OAuth").OAuthVerifiedExternalIdentity;
368
- readonly intent?: import("@yielded/auth/OAuth").OAuthRegistrationIntent;
369
- readonly nowMillis: number;
370
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthRegistrationSettlement, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
371
- };
147
+ }>, N>(mapping: OAuthRegistrationIntentMapping<O, I, N>) => import("effect/Effect").Effect<{
148
+ readonly oauthRegistrationIntents: import("@yielded/auth/OAuth").OAuthRegistrationIntents["Service"];
372
149
  }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationServices: <Registration, S extends AnyMySqlTable<{
373
150
  dialect: "mysql";
374
151
  }>, O extends AnyMySqlTable<{
@@ -377,14 +154,10 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
377
154
  dialect: "mysql";
378
155
  }>, AC extends AnyMySqlTable<{
379
156
  dialect: "mysql";
380
- }>, TA extends AnyMySqlTable<{
381
- dialect: "mysql";
382
157
  }>, I extends AnyMySqlTable<{
383
158
  dialect: "mysql";
384
- }>, R extends AnyMySqlTable<{
385
- dialect: "mysql";
386
- }>, N>(mapping: OAuthRegistrationMapping<Registration, S, O, C, AC, TA, I, R, N>) => import("effect/Effect").Effect<{
387
- registrationAuthority: import("@yielded/auth-persistence/Adapter").OAuthRegistrationAuthority<Registration>;
159
+ }>, N>(mapping: OAuthRegistrationMapping<Registration, S, O, C, AC, I, N>) => import("effect/Effect").Effect<{
160
+ readonly registrationAuthority: import("@yielded/auth-persistence/Adapter").OAuthRegistrationAuthority<Registration>;
388
161
  }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthRegistration: {
389
162
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnyMySqlTable<{
390
163
  dialect: "mysql";
@@ -394,17 +167,13 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
394
167
  dialect: "mysql";
395
168
  }>, AC extends AnyMySqlTable<{
396
169
  dialect: "mysql";
397
- }>, TA extends AnyMySqlTable<{
398
- dialect: "mysql";
399
170
  }>, I extends AnyMySqlTable<{
400
171
  dialect: "mysql";
401
- }>, Rq extends AnyMySqlTable<{
402
- dialect: "mysql";
403
172
  }>, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
404
- readonly mapping: OAuthRegistrationMapping<NoInfer<Registration>, S, O, C, AC, TA, I, Rq, N>;
173
+ readonly mapping: OAuthRegistrationMapping<NoInfer<Registration>, S, O, C, AC, I, N>;
405
174
  readonly target: SuppliedService<TargetId, import("@yielded/auth-persistence/Adapter").OAuthRegistrationAuthority<Registration>>;
406
175
  readonly transaction?: never;
407
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId>>;
176
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId>>;
408
177
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnyMySqlTable<{
409
178
  dialect: "mysql";
410
179
  }>, O extends AnyMySqlTable<{
@@ -413,19 +182,15 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
413
182
  dialect: "mysql";
414
183
  }>, AC extends AnyMySqlTable<{
415
184
  dialect: "mysql";
416
- }>, TA extends AnyMySqlTable<{
417
- dialect: "mysql";
418
185
  }>, I extends AnyMySqlTable<{
419
186
  dialect: "mysql";
420
- }>, Rq extends AnyMySqlTable<{
421
- dialect: "mysql";
422
187
  }>, N, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
423
- readonly mapping: OAuthRegistrationMapping<NoInfer<Registration>, S, O, C, AC, TA, I, Rq, N>;
188
+ readonly mapping: OAuthRegistrationMapping<NoInfer<Registration>, S, O, C, AC, I, N>;
424
189
  readonly target: SuppliedService<TargetId, import("@yielded/auth-persistence/Adapter").OAuthRegistrationAuthority<Registration>>;
425
190
  readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
426
191
  readonly transaction: (...args: any[]) => any;
427
192
  } ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
428
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
193
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
429
194
  }, coordinateOAuthSignIn: {
430
195
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
431
196
  dialect: "mysql";
@@ -440,7 +205,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
440
205
  }>, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
441
206
  readonly mapping: OAuthSignInMapping<S, O, C, AC, F, N>;
442
207
  readonly transaction?: never;
443
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthSignInPersistence>>;
208
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthSignInPersistence>>;
444
209
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
445
210
  dialect: "mysql";
446
211
  }>, O extends AnyMySqlTable<{
@@ -456,46 +221,26 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
456
221
  readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
457
222
  readonly transaction: (...args: any[]) => any;
458
223
  } ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
459
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthSignInPersistence>>;
224
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthSignInPersistence>>;
460
225
  }, coordinateOAuthRegistrationIntents: {
461
- <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
462
- dialect: "mysql";
463
- }>, O extends AnyMySqlTable<{
464
- dialect: "mysql";
465
- }>, C extends AnyMySqlTable<{
466
- dialect: "mysql";
467
- }>, AC extends AnyMySqlTable<{
468
- dialect: "mysql";
469
- }>, F extends AnyMySqlTable<{
470
- dialect: "mysql";
471
- }>, TA extends AnyMySqlTable<{
226
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, O extends AnyMySqlTable<{
472
227
  dialect: "mysql";
473
228
  }>, I extends AnyMySqlTable<{
474
229
  dialect: "mysql";
475
230
  }>, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
476
- readonly mapping: OAuthRegistrationIntentMapping<S, O, C, AC, F, TA, I, N>;
231
+ readonly mapping: OAuthRegistrationIntentMapping<O, I, N>;
477
232
  readonly transaction?: never;
478
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthRegistrationIntents>>;
479
- <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
480
- dialect: "mysql";
481
- }>, O extends AnyMySqlTable<{
482
- dialect: "mysql";
483
- }>, C extends AnyMySqlTable<{
484
- dialect: "mysql";
485
- }>, AC extends AnyMySqlTable<{
486
- dialect: "mysql";
487
- }>, F extends AnyMySqlTable<{
488
- dialect: "mysql";
489
- }>, TA extends AnyMySqlTable<{
233
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthRegistrationIntents>>;
234
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, O extends AnyMySqlTable<{
490
235
  dialect: "mysql";
491
236
  }>, I extends AnyMySqlTable<{
492
237
  dialect: "mysql";
493
238
  }>, N, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
494
- readonly mapping: OAuthRegistrationIntentMapping<S, O, C, AC, F, TA, I, N>;
239
+ readonly mapping: OAuthRegistrationIntentMapping<O, I, N>;
495
240
  readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
496
241
  readonly transaction: (...args: any[]) => any;
497
242
  } ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
498
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthRegistrationIntents>>;
243
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthRegistrationIntents>>;
499
244
  }, coordinateOAuthAccounts: {
500
245
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
501
246
  dialect: "mysql";
@@ -507,14 +252,10 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
507
252
  dialect: "mysql";
508
253
  }>, F extends AnyMySqlTable<{
509
254
  dialect: "mysql";
510
- }>, TA extends AnyMySqlTable<{
511
- dialect: "mysql";
512
- }>, U extends AnyMySqlTable<{
513
- dialect: "mysql";
514
255
  }>, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
515
- readonly mapping: OAuthAccountsMapping<S, O, C, AC, F, TA, U, N>;
256
+ readonly mapping: OAuthAccountsMapping<S, O, C, AC, F, N>;
516
257
  readonly transaction?: never;
517
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthAccountsPersistence>>;
258
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthAccountsPersistence>>;
518
259
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
519
260
  dialect: "mysql";
520
261
  }>, O extends AnyMySqlTable<{
@@ -525,1210 +266,92 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
525
266
  dialect: "mysql";
526
267
  }>, F extends AnyMySqlTable<{
527
268
  dialect: "mysql";
528
- }>, TA extends AnyMySqlTable<{
529
- dialect: "mysql";
530
- }>, U extends AnyMySqlTable<{
531
- dialect: "mysql";
532
269
  }>, N, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
533
- readonly mapping: OAuthAccountsMapping<S, O, C, AC, F, TA, U, N>;
270
+ readonly mapping: OAuthAccountsMapping<S, O, C, AC, F, N>;
534
271
  readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
535
272
  readonly transaction: (...args: any[]) => any;
536
273
  } ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
537
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthAccountsPersistence>>;
274
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthAccountsPersistence>>;
538
275
  }, makeOAuthConnectedServices: <S extends AnyMySqlTable<{
539
276
  dialect: "mysql";
540
277
  }>, AC extends AnyMySqlTable<{
541
278
  dialect: "mysql";
542
- }>, T extends AnyMySqlTable<{
543
- dialect: "mysql";
544
279
  }>, O extends AnyMySqlTable<{
545
280
  dialect: "mysql";
546
281
  }>, F extends AnyMySqlTable<{
547
282
  dialect: "mysql";
548
283
  }>, G extends AnyMySqlTable<{
549
284
  dialect: "mysql";
550
- }>, C extends AnyMySqlTable<{
551
- dialect: "mysql";
552
- }>, H extends AnyMySqlTable<{
553
- dialect: "mysql";
554
- }>, UA extends AnyMySqlTable<{
555
- dialect: "mysql";
556
- }>, DC extends AnyMySqlTable<{
557
- dialect: "mysql";
558
285
  }>, N, J extends AnyMySqlTable<{
559
286
  dialect: "mysql";
560
- }> = never>(mapping: OAuthConnectedMapping<S, AC, T, O, F, G, C, H, UA, DC, N, J>) => import("effect/Effect").Effect<{
561
- oauthConnectedPersistence: {
562
- readonly claimSignIn: <A>(input: {
563
- readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
564
- readonly configuration: import("@yielded/auth/OAuth").OAuthConnectedConfiguration;
565
- }, 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>;
566
- readonly inspectSignIn: (input: {
567
- readonly reservation: import("@yielded/auth/OAuth").OAuthSignInAccessClaim;
568
- readonly credential: import("@yielded/auth/OAuth").OAuthCredentialSnapshot;
569
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
570
- }) => import("effect/Effect").Effect<import("@yielded/auth/OAuth").OAuthSignInAccessInspection, import("@yielded/auth/OAuth").OAuthUnavailable>;
571
- readonly settleSignIn: <A>(input: {
572
- readonly reservation: import("@yielded/auth/OAuth").OAuthSignInAccessClaim;
573
- readonly outcome: import("@yielded/auth/OAuth").OAuthSignInAccessOutcome;
574
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
575
- readonly _tag: "Rejected";
576
- } | {
577
- readonly _tag: "Ambiguous";
578
- } | {
579
- readonly _tag: "Cancelled";
580
- } | {
581
- readonly _tag: "Conflict";
582
- } | {
583
- readonly _tag: "Connected";
584
- readonly grant: {
585
- readonly context: {
586
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
587
- readonly exchangeOrder: string;
588
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
589
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
590
- readonly identity: {
591
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
592
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
593
- readonly subject: string;
594
- };
595
- readonly configuration: {
596
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
597
- readonly protocol: "oauth" | "oidc";
598
- readonly configurationGeneration: number;
599
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
600
- readonly responseIssuerMode: "required" | "unsupported";
601
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
602
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
603
- readonly profile: {
604
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
605
- readonly generation: number;
606
- readonly issuance: "active" | "retired";
607
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
608
- readonly clientRegistrationId: string;
609
- readonly scopes: readonly string[];
610
- readonly resources: readonly string[];
611
- readonly retention: "access-and-refresh" | "access-only";
612
- readonly maximumAccessLifetimeMillis: number;
613
- readonly maximumRefreshLifetimeMillis?: number;
614
- readonly refreshAheadMillis: number;
615
- readonly refresh: "confidential" | "rotating" | "unsupported";
616
- readonly revocation: "cohort" | "unsupported";
617
- };
618
- };
619
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
620
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
621
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
622
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
623
- readonly metadata: {
624
- readonly scopes: readonly string[];
625
- readonly resources: readonly string[];
626
- readonly accessExpiresAtMillis?: number;
627
- readonly refreshExpiresAtMillis?: number;
628
- readonly useUntilMillis: number;
629
- readonly refreshUseUntilMillis?: number;
630
- readonly obtainedAtMillis: number;
631
- readonly profile?: {
632
- readonly displayName?: string;
633
- readonly handle?: string;
634
- readonly avatarUrl?: string;
635
- readonly profileUrl?: string;
636
- readonly email?: string;
637
- readonly emailVerified?: boolean;
638
- readonly providerData?: {
639
- readonly [x: string]: import("effect/Schema").Json;
640
- };
641
- };
642
- };
643
- };
644
- readonly sealed: {
645
- readonly format: "oauth-connected-xchacha20poly1305-v1";
646
- readonly keyId: string;
647
- readonly nonce: string;
648
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
649
- };
650
- };
651
- } | {
652
- readonly _tag: "Busy";
653
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
654
- readonly capture: (input: {
655
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
656
- readonly subjectId: import("@yielded/auth/Schema").SubjectId;
657
- readonly grantId?: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
658
- }) => import("effect/Effect").Effect<{
659
- readonly revision: import("@yielded/auth/OAuth").OAuthAccountRevision;
660
- readonly target?: import("@yielded/auth/OAuth").OAuthConnectedTarget;
661
- } | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
662
- readonly issue: <A>(input: {
663
- readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
664
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedActionAuthorization;
665
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
666
- readonly _tag: "Rejected";
667
- } | {
668
- readonly _tag: "Issued";
669
- readonly flow: {
670
- readonly context: {
671
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
672
- readonly protocol: "oauth" | "oidc";
673
- readonly configurationGeneration: number;
674
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
675
- readonly responseIssuerMode: "required" | "unsupported";
676
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
677
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
678
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
679
- readonly generation: number;
680
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
681
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
682
- readonly access?: {
683
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
684
- readonly generation: number;
685
- readonly issuance: "active" | "retired";
686
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
687
- readonly clientRegistrationId: string;
688
- readonly scopes: readonly string[];
689
- readonly resources: readonly string[];
690
- readonly retention: "access-and-refresh" | "access-only";
691
- readonly maximumAccessLifetimeMillis: number;
692
- readonly maximumRefreshLifetimeMillis?: number;
693
- readonly refreshAheadMillis: number;
694
- readonly refresh: "confidential" | "rotating" | "unsupported";
695
- readonly revocation: "cohort" | "unsupported";
696
- };
697
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
698
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
699
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
700
- readonly requestBindingExpiresAtMillis: number;
701
- readonly issuedAtMillis: number;
702
- readonly expiresAtMillis: number;
703
- readonly claimLifetimeMillis: number;
704
- readonly namespace: "effect-auth/oauth-connected-context/v1";
705
- readonly revision: {
706
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
707
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
708
- readonly credentials: readonly {
709
- readonly credentialId: string;
710
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
711
- }[];
712
- };
713
- readonly profile: {
714
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
715
- readonly generation: number;
716
- readonly issuance: "active" | "retired";
717
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
718
- readonly clientRegistrationId: string;
719
- readonly scopes: readonly string[];
720
- readonly resources: readonly string[];
721
- readonly retention: "access-and-refresh" | "access-only";
722
- readonly maximumAccessLifetimeMillis: number;
723
- readonly maximumRefreshLifetimeMillis?: number;
724
- readonly refreshAheadMillis: number;
725
- readonly refresh: "confidential" | "rotating" | "unsupported";
726
- readonly revocation: "cohort" | "unsupported";
727
- };
728
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
729
- readonly reconnect?: {
730
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
731
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
732
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
733
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
734
- readonly identity: {
735
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
736
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
737
- readonly subject: string;
738
- };
739
- readonly configuration: {
740
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
741
- readonly protocol: "oauth" | "oidc";
742
- readonly configurationGeneration: number;
743
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
744
- readonly responseIssuerMode: "required" | "unsupported";
745
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
746
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
747
- readonly profile: {
748
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
749
- readonly generation: number;
750
- readonly issuance: "active" | "retired";
751
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
752
- readonly clientRegistrationId: string;
753
- readonly scopes: readonly string[];
754
- readonly resources: readonly string[];
755
- readonly retention: "access-and-refresh" | "access-only";
756
- readonly maximumAccessLifetimeMillis: number;
757
- readonly maximumRefreshLifetimeMillis?: number;
758
- readonly refreshAheadMillis: number;
759
- readonly refresh: "confidential" | "rotating" | "unsupported";
760
- readonly revocation: "cohort" | "unsupported";
761
- };
762
- };
763
- };
764
- readonly maximumEvidenceAgeMillis: number;
765
- };
766
- readonly sealed: {
767
- readonly format: "oauth-xchacha20poly1305-v1";
768
- readonly keyId: string;
769
- readonly nonce: string;
770
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
771
- };
772
- readonly retentionUntilMillis: number;
773
- };
774
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
775
- readonly prepare: <A>(input: {
776
- readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
777
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
778
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
779
- readonly _tag: "Rejected";
780
- } | {
781
- readonly _tag: "Issued";
782
- readonly flow: {
783
- readonly context: {
784
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
785
- readonly protocol: "oauth" | "oidc";
786
- readonly configurationGeneration: number;
787
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
788
- readonly responseIssuerMode: "required" | "unsupported";
789
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
790
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
791
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
792
- readonly generation: number;
793
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
794
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
795
- readonly access?: {
796
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
797
- readonly generation: number;
798
- readonly issuance: "active" | "retired";
799
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
800
- readonly clientRegistrationId: string;
801
- readonly scopes: readonly string[];
802
- readonly resources: readonly string[];
803
- readonly retention: "access-and-refresh" | "access-only";
804
- readonly maximumAccessLifetimeMillis: number;
805
- readonly maximumRefreshLifetimeMillis?: number;
806
- readonly refreshAheadMillis: number;
807
- readonly refresh: "confidential" | "rotating" | "unsupported";
808
- readonly revocation: "cohort" | "unsupported";
809
- };
810
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
811
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
812
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
813
- readonly requestBindingExpiresAtMillis: number;
814
- readonly issuedAtMillis: number;
815
- readonly expiresAtMillis: number;
816
- readonly claimLifetimeMillis: number;
817
- readonly namespace: "effect-auth/oauth-connected-context/v1";
818
- readonly revision: {
819
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
820
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
821
- readonly credentials: readonly {
822
- readonly credentialId: string;
823
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
824
- }[];
825
- };
826
- readonly profile: {
827
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
828
- readonly generation: number;
829
- readonly issuance: "active" | "retired";
830
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
831
- readonly clientRegistrationId: string;
832
- readonly scopes: readonly string[];
833
- readonly resources: readonly string[];
834
- readonly retention: "access-and-refresh" | "access-only";
835
- readonly maximumAccessLifetimeMillis: number;
836
- readonly maximumRefreshLifetimeMillis?: number;
837
- readonly refreshAheadMillis: number;
838
- readonly refresh: "confidential" | "rotating" | "unsupported";
839
- readonly revocation: "cohort" | "unsupported";
840
- };
841
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
842
- readonly reconnect?: {
843
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
844
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
845
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
846
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
847
- readonly identity: {
848
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
849
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
850
- readonly subject: string;
851
- };
852
- readonly configuration: {
853
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
854
- readonly protocol: "oauth" | "oidc";
855
- readonly configurationGeneration: number;
856
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
857
- readonly responseIssuerMode: "required" | "unsupported";
858
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
859
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
860
- readonly profile: {
861
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
862
- readonly generation: number;
863
- readonly issuance: "active" | "retired";
864
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
865
- readonly clientRegistrationId: string;
866
- readonly scopes: readonly string[];
867
- readonly resources: readonly string[];
868
- readonly retention: "access-and-refresh" | "access-only";
869
- readonly maximumAccessLifetimeMillis: number;
870
- readonly maximumRefreshLifetimeMillis?: number;
871
- readonly refreshAheadMillis: number;
872
- readonly refresh: "confidential" | "rotating" | "unsupported";
873
- readonly revocation: "cohort" | "unsupported";
874
- };
875
- };
876
- };
877
- readonly maximumEvidenceAgeMillis: number;
878
- };
879
- readonly sealed: {
880
- readonly format: "oauth-xchacha20poly1305-v1";
881
- readonly keyId: string;
882
- readonly nonce: string;
883
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
884
- };
885
- readonly retentionUntilMillis: number;
886
- };
887
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
888
- readonly inspectPrepared: (input: import("@yielded/auth/OAuth").OAuthConnectedPreparedAccess) => import("effect/Effect").Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
889
- readonly preflight: (input: import("@yielded/auth/OAuth").OAuthConnectedAccess) => import("effect/Effect").Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
890
- readonly claim: <A>(input: {
891
- readonly access: import("@yielded/auth/OAuth").OAuthConnectedAccess;
892
- readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
893
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
894
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedActionAuthorization;
895
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
896
- readonly _tag: "Rejected";
897
- } | {
898
- readonly _tag: "Claimed";
899
- readonly claim: {
900
- readonly flow: {
901
- readonly context: {
902
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
903
- readonly protocol: "oauth" | "oidc";
904
- readonly configurationGeneration: number;
905
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
906
- readonly responseIssuerMode: "required" | "unsupported";
907
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
908
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
909
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
910
- readonly generation: number;
911
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
912
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
913
- readonly access?: {
914
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
915
- readonly generation: number;
916
- readonly issuance: "active" | "retired";
917
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
918
- readonly clientRegistrationId: string;
919
- readonly scopes: readonly string[];
920
- readonly resources: readonly string[];
921
- readonly retention: "access-and-refresh" | "access-only";
922
- readonly maximumAccessLifetimeMillis: number;
923
- readonly maximumRefreshLifetimeMillis?: number;
924
- readonly refreshAheadMillis: number;
925
- readonly refresh: "confidential" | "rotating" | "unsupported";
926
- readonly revocation: "cohort" | "unsupported";
927
- };
928
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
929
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
930
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
931
- readonly requestBindingExpiresAtMillis: number;
932
- readonly issuedAtMillis: number;
933
- readonly expiresAtMillis: number;
934
- readonly claimLifetimeMillis: number;
935
- readonly namespace: "effect-auth/oauth-connected-context/v1";
936
- readonly revision: {
937
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
938
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
939
- readonly credentials: readonly {
940
- readonly credentialId: string;
941
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
942
- }[];
943
- };
944
- readonly profile: {
945
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
946
- readonly generation: number;
947
- readonly issuance: "active" | "retired";
948
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
949
- readonly clientRegistrationId: string;
950
- readonly scopes: readonly string[];
951
- readonly resources: readonly string[];
952
- readonly retention: "access-and-refresh" | "access-only";
953
- readonly maximumAccessLifetimeMillis: number;
954
- readonly maximumRefreshLifetimeMillis?: number;
955
- readonly refreshAheadMillis: number;
956
- readonly refresh: "confidential" | "rotating" | "unsupported";
957
- readonly revocation: "cohort" | "unsupported";
958
- };
959
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
960
- readonly reconnect?: {
961
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
962
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
963
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
964
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
965
- readonly identity: {
966
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
967
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
968
- readonly subject: string;
969
- };
970
- readonly configuration: {
971
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
972
- readonly protocol: "oauth" | "oidc";
973
- readonly configurationGeneration: number;
974
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
975
- readonly responseIssuerMode: "required" | "unsupported";
976
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
977
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
978
- readonly profile: {
979
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
980
- readonly generation: number;
981
- readonly issuance: "active" | "retired";
982
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
983
- readonly clientRegistrationId: string;
984
- readonly scopes: readonly string[];
985
- readonly resources: readonly string[];
986
- readonly retention: "access-and-refresh" | "access-only";
987
- readonly maximumAccessLifetimeMillis: number;
988
- readonly maximumRefreshLifetimeMillis?: number;
989
- readonly refreshAheadMillis: number;
990
- readonly refresh: "confidential" | "rotating" | "unsupported";
991
- readonly revocation: "cohort" | "unsupported";
992
- };
993
- };
994
- };
995
- readonly maximumEvidenceAgeMillis: number;
996
- };
997
- readonly sealed: {
998
- readonly format: "oauth-xchacha20poly1305-v1";
999
- readonly keyId: string;
1000
- readonly nonce: string;
1001
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
1002
- };
1003
- readonly retentionUntilMillis: number;
1004
- };
1005
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1006
- readonly claimedAtMillis: number;
1007
- readonly claimExpiresAtMillis: number;
1008
- readonly order: string;
1009
- };
1010
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1011
- readonly inspectGrant: (input: {
1012
- readonly claim: import("@yielded/auth/OAuth").OAuthConnectedClaim;
1013
- readonly identity: {
1014
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1015
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1016
- readonly subject: string;
1017
- };
1018
- }) => import("effect/Effect").Effect<{
1019
- readonly _tag: "Rejected";
1020
- } | {
1021
- readonly _tag: "Conflict";
1022
- } | {
1023
- readonly _tag: "Target";
1024
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1025
- } | {
1026
- readonly _tag: "Quarantine";
1027
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1028
- }, import("@yielded/auth/OAuth").OAuthUnavailable>;
1029
- readonly settle: <A>(input: {
1030
- readonly claim: import("@yielded/auth/OAuth").OAuthConnectedClaim;
1031
- readonly outcome: import("@yielded/auth/OAuth").OAuthConnectedOutcome;
1032
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedActionAuthorization;
1033
- readonly nowMillis: number;
1034
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1035
- readonly _tag: "Rejected";
1036
- } | {
1037
- readonly _tag: "Ambiguous";
1038
- } | {
1039
- readonly _tag: "Cancelled";
1040
- } | {
1041
- readonly _tag: "Conflict";
1042
- } | {
1043
- readonly _tag: "Connected";
1044
- readonly grant: {
1045
- readonly context: {
1046
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1047
- readonly exchangeOrder: string;
1048
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1049
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1050
- readonly identity: {
1051
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1052
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1053
- readonly subject: string;
1054
- };
1055
- readonly configuration: {
1056
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1057
- readonly protocol: "oauth" | "oidc";
1058
- readonly configurationGeneration: number;
1059
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1060
- readonly responseIssuerMode: "required" | "unsupported";
1061
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1062
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1063
- readonly profile: {
1064
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1065
- readonly generation: number;
1066
- readonly issuance: "active" | "retired";
1067
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1068
- readonly clientRegistrationId: string;
1069
- readonly scopes: readonly string[];
1070
- readonly resources: readonly string[];
1071
- readonly retention: "access-and-refresh" | "access-only";
1072
- readonly maximumAccessLifetimeMillis: number;
1073
- readonly maximumRefreshLifetimeMillis?: number;
1074
- readonly refreshAheadMillis: number;
1075
- readonly refresh: "confidential" | "rotating" | "unsupported";
1076
- readonly revocation: "cohort" | "unsupported";
1077
- };
1078
- };
1079
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1080
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1081
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1082
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1083
- readonly metadata: {
1084
- readonly scopes: readonly string[];
1085
- readonly resources: readonly string[];
1086
- readonly accessExpiresAtMillis?: number;
1087
- readonly refreshExpiresAtMillis?: number;
1088
- readonly useUntilMillis: number;
1089
- readonly refreshUseUntilMillis?: number;
1090
- readonly obtainedAtMillis: number;
1091
- readonly profile?: {
1092
- readonly displayName?: string;
1093
- readonly handle?: string;
1094
- readonly avatarUrl?: string;
1095
- readonly profileUrl?: string;
1096
- readonly email?: string;
1097
- readonly emailVerified?: boolean;
1098
- readonly providerData?: {
1099
- readonly [x: string]: import("effect/Schema").Json;
1100
- };
1101
- };
1102
- };
1103
- };
1104
- readonly sealed: {
1105
- readonly format: "oauth-connected-xchacha20poly1305-v1";
1106
- readonly keyId: string;
1107
- readonly nonce: string;
1108
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
1109
- };
1110
- };
1111
- } | {
1112
- readonly _tag: "Busy";
1113
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1114
- readonly list: (input: {
1115
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
1116
- readonly limit: number;
1117
- readonly cursor?: string;
1118
- }) => import("effect/Effect").Effect<{
1119
- readonly items: readonly {
1120
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1121
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1122
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1123
- readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1124
- readonly status: "Active" | "Disconnected" | "ReauthorizationRequired" | "Refreshing";
1125
- readonly scopes: readonly string[];
1126
- readonly accessExpiresAtMillis?: number;
1127
- readonly useUntilMillis: number;
1128
- readonly profile?: {
1129
- readonly displayName?: string;
1130
- readonly handle?: string;
1131
- readonly avatarUrl?: string;
1132
- readonly profileUrl?: string;
1133
- readonly email?: string;
1134
- readonly emailVerified?: boolean;
1135
- readonly providerData?: {
1136
- readonly [x: string]: import("effect/Schema").Json;
1137
- };
1138
- };
1139
- readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1140
- }[];
1141
- readonly cursor?: string;
1142
- }, import("@yielded/auth/OAuth").OAuthUnavailable>;
1143
- readonly inspectDisconnect: (input: {
1144
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1145
- readonly subjectId: import("@yielded/auth/Schema").SubjectId;
1146
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
1147
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
1148
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1149
- }) => import("effect/Effect").Effect<{
1150
- readonly _tag: "Rejected";
1151
- } | {
1152
- readonly _tag: "Conflict";
1153
- } | {
1154
- readonly _tag: "Target";
1155
- readonly grant: {
1156
- readonly context: {
1157
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1158
- readonly exchangeOrder: string;
1159
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1160
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1161
- readonly identity: {
1162
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1163
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1164
- readonly subject: string;
1165
- };
1166
- readonly configuration: {
1167
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1168
- readonly protocol: "oauth" | "oidc";
1169
- readonly configurationGeneration: number;
1170
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1171
- readonly responseIssuerMode: "required" | "unsupported";
1172
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1173
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1174
- readonly profile: {
1175
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1176
- readonly generation: number;
1177
- readonly issuance: "active" | "retired";
1178
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1179
- readonly clientRegistrationId: string;
1180
- readonly scopes: readonly string[];
1181
- readonly resources: readonly string[];
1182
- readonly retention: "access-and-refresh" | "access-only";
1183
- readonly maximumAccessLifetimeMillis: number;
1184
- readonly maximumRefreshLifetimeMillis?: number;
1185
- readonly refreshAheadMillis: number;
1186
- readonly refresh: "confidential" | "rotating" | "unsupported";
1187
- readonly revocation: "cohort" | "unsupported";
1188
- };
1189
- };
1190
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1191
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1192
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1193
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1194
- readonly metadata: {
1195
- readonly scopes: readonly string[];
1196
- readonly resources: readonly string[];
1197
- readonly accessExpiresAtMillis?: number;
1198
- readonly refreshExpiresAtMillis?: number;
1199
- readonly useUntilMillis: number;
1200
- readonly refreshUseUntilMillis?: number;
1201
- readonly obtainedAtMillis: number;
1202
- readonly profile?: {
1203
- readonly displayName?: string;
1204
- readonly handle?: string;
1205
- readonly avatarUrl?: string;
1206
- readonly profileUrl?: string;
1207
- readonly email?: string;
1208
- readonly emailVerified?: boolean;
1209
- readonly providerData?: {
1210
- readonly [x: string]: import("effect/Schema").Json;
1211
- };
1212
- };
1213
- };
1214
- };
1215
- readonly sealed?: {
1216
- readonly format: "oauth-connected-xchacha20poly1305-v1";
1217
- readonly keyId: string;
1218
- readonly nonce: string;
1219
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
1220
- };
1221
- };
1222
- readonly revision: {
1223
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1224
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1225
- readonly credentials: readonly {
1226
- readonly credentialId: string;
1227
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1228
- }[];
1229
- };
1230
- } | {
1231
- readonly _tag: "Replay";
1232
- readonly result: {
1233
- readonly _tag: "Disconnected";
1234
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1235
- readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1236
- readonly affectedGrantCount: number;
1237
- readonly replayed: boolean;
1238
- };
1239
- }, import("@yielded/auth/OAuth").OAuthUnavailable>;
1240
- readonly disconnect: <A>(input: {
1241
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1242
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
1243
- readonly grant: import("@yielded/auth/OAuth").OAuthConnectedDisconnectGrant;
1244
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedActionAuthorization;
1245
- readonly revocation?: import("@yielded/auth/OAuth").OAuthConnectedRevocationJob;
1246
- readonly retentionUntilMillis: number;
1247
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1248
- readonly _tag: "Rejected";
1249
- } | {
1250
- readonly _tag: "Conflict";
1251
- } | {
1252
- readonly _tag: "Disconnected";
1253
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1254
- readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1255
- readonly affectedGrantCount: number;
1256
- readonly replayed: boolean;
1257
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1258
- readonly inspectAccess: (input: {
1259
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
1260
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1261
- readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1262
- }) => import("effect/Effect").Effect<{
1263
- readonly _tag: "Rejected";
1264
- } | {
1265
- readonly _tag: "Busy";
1266
- } | {
1267
- readonly _tag: "Target";
1268
- readonly grant: {
1269
- readonly context: {
1270
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1271
- readonly exchangeOrder: string;
1272
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1273
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1274
- readonly identity: {
1275
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1276
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1277
- readonly subject: string;
1278
- };
1279
- readonly configuration: {
1280
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1281
- readonly protocol: "oauth" | "oidc";
1282
- readonly configurationGeneration: number;
1283
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1284
- readonly responseIssuerMode: "required" | "unsupported";
1285
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1286
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1287
- readonly profile: {
1288
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1289
- readonly generation: number;
1290
- readonly issuance: "active" | "retired";
1291
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1292
- readonly clientRegistrationId: string;
1293
- readonly scopes: readonly string[];
1294
- readonly resources: readonly string[];
1295
- readonly retention: "access-and-refresh" | "access-only";
1296
- readonly maximumAccessLifetimeMillis: number;
1297
- readonly maximumRefreshLifetimeMillis?: number;
1298
- readonly refreshAheadMillis: number;
1299
- readonly refresh: "confidential" | "rotating" | "unsupported";
1300
- readonly revocation: "cohort" | "unsupported";
1301
- };
1302
- };
1303
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1304
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1305
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1306
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1307
- readonly metadata: {
1308
- readonly scopes: readonly string[];
1309
- readonly resources: readonly string[];
1310
- readonly accessExpiresAtMillis?: number;
1311
- readonly refreshExpiresAtMillis?: number;
1312
- readonly useUntilMillis: number;
1313
- readonly refreshUseUntilMillis?: number;
1314
- readonly obtainedAtMillis: number;
1315
- readonly profile?: {
1316
- readonly displayName?: string;
1317
- readonly handle?: string;
1318
- readonly avatarUrl?: string;
1319
- readonly profileUrl?: string;
1320
- readonly email?: string;
1321
- readonly emailVerified?: boolean;
1322
- readonly providerData?: {
1323
- readonly [x: string]: import("effect/Schema").Json;
1324
- };
1325
- };
1326
- };
1327
- };
1328
- readonly sealed: {
1329
- readonly format: "oauth-connected-xchacha20poly1305-v1";
1330
- readonly keyId: string;
1331
- readonly nonce: string;
1332
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
1333
- };
1334
- };
1335
- } | {
1336
- readonly _tag: "ReauthorizationRequired";
1337
- }, import("@yielded/auth/OAuth").OAuthUnavailable>;
1338
- readonly claimRefresh: <A>(input: {
1339
- readonly grant: import("@yielded/auth/OAuth").OAuthConnectedStoredGrant;
1340
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
1341
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1342
- readonly nextTokenVersion: import("@yielded/auth/OAuth").OAuthConnectedRefreshClaim["nextTokenVersion"];
1343
- readonly lifetimeMillis: number;
1344
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1345
- readonly _tag: "Rejected";
1346
- } | {
1347
- readonly _tag: "Busy";
1348
- } | {
1349
- readonly _tag: "ReauthorizationRequired";
1350
- } | {
1351
- readonly _tag: "Claimed";
1352
- readonly claim: {
1353
- readonly grant: {
1354
- readonly context: {
1355
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1356
- readonly exchangeOrder: string;
1357
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1358
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1359
- readonly identity: {
1360
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1361
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1362
- readonly subject: string;
1363
- };
1364
- readonly configuration: {
1365
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1366
- readonly protocol: "oauth" | "oidc";
1367
- readonly configurationGeneration: number;
1368
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1369
- readonly responseIssuerMode: "required" | "unsupported";
1370
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1371
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1372
- readonly profile: {
1373
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1374
- readonly generation: number;
1375
- readonly issuance: "active" | "retired";
1376
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1377
- readonly clientRegistrationId: string;
1378
- readonly scopes: readonly string[];
1379
- readonly resources: readonly string[];
1380
- readonly retention: "access-and-refresh" | "access-only";
1381
- readonly maximumAccessLifetimeMillis: number;
1382
- readonly maximumRefreshLifetimeMillis?: number;
1383
- readonly refreshAheadMillis: number;
1384
- readonly refresh: "confidential" | "rotating" | "unsupported";
1385
- readonly revocation: "cohort" | "unsupported";
1386
- };
1387
- };
1388
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1389
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1390
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1391
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1392
- readonly metadata: {
1393
- readonly scopes: readonly string[];
1394
- readonly resources: readonly string[];
1395
- readonly accessExpiresAtMillis?: number;
1396
- readonly refreshExpiresAtMillis?: number;
1397
- readonly useUntilMillis: number;
1398
- readonly refreshUseUntilMillis?: number;
1399
- readonly obtainedAtMillis: number;
1400
- readonly profile?: {
1401
- readonly displayName?: string;
1402
- readonly handle?: string;
1403
- readonly avatarUrl?: string;
1404
- readonly profileUrl?: string;
1405
- readonly email?: string;
1406
- readonly emailVerified?: boolean;
1407
- readonly providerData?: {
1408
- readonly [x: string]: import("effect/Schema").Json;
1409
- };
1410
- };
1411
- };
1412
- };
1413
- readonly sealed: {
1414
- readonly format: "oauth-connected-xchacha20poly1305-v1";
1415
- readonly keyId: string;
1416
- readonly nonce: string;
1417
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
1418
- };
1419
- };
1420
- readonly order: string;
1421
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1422
- readonly claimedAtMillis: number;
1423
- readonly claimExpiresAtMillis: number;
1424
- readonly nextTokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1425
- };
1426
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1427
- readonly settleRefresh: <A>(input: {
1428
- readonly claim: import("@yielded/auth/OAuth").OAuthConnectedRefreshClaim;
1429
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
1430
- readonly outcome: import("@yielded/auth/OAuth").OAuthConnectedRefreshOutcome;
1431
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1432
- readonly _tag: "Rejected";
1433
- } | {
1434
- readonly _tag: "ReauthorizationRequired";
1435
- } | {
1436
- readonly _tag: "Refreshed";
1437
- readonly grant: {
1438
- readonly context: {
1439
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1440
- readonly exchangeOrder: string;
1441
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1442
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1443
- readonly identity: {
1444
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1445
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1446
- readonly subject: string;
1447
- };
1448
- readonly configuration: {
1449
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1450
- readonly protocol: "oauth" | "oidc";
1451
- readonly configurationGeneration: number;
1452
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1453
- readonly responseIssuerMode: "required" | "unsupported";
1454
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1455
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1456
- readonly profile: {
1457
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1458
- readonly generation: number;
1459
- readonly issuance: "active" | "retired";
1460
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1461
- readonly clientRegistrationId: string;
1462
- readonly scopes: readonly string[];
1463
- readonly resources: readonly string[];
1464
- readonly retention: "access-and-refresh" | "access-only";
1465
- readonly maximumAccessLifetimeMillis: number;
1466
- readonly maximumRefreshLifetimeMillis?: number;
1467
- readonly refreshAheadMillis: number;
1468
- readonly refresh: "confidential" | "rotating" | "unsupported";
1469
- readonly revocation: "cohort" | "unsupported";
1470
- };
1471
- };
1472
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1473
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1474
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1475
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1476
- readonly metadata: {
1477
- readonly scopes: readonly string[];
1478
- readonly resources: readonly string[];
1479
- readonly accessExpiresAtMillis?: number;
1480
- readonly refreshExpiresAtMillis?: number;
1481
- readonly useUntilMillis: number;
1482
- readonly refreshUseUntilMillis?: number;
1483
- readonly obtainedAtMillis: number;
1484
- readonly profile?: {
1485
- readonly displayName?: string;
1486
- readonly handle?: string;
1487
- readonly avatarUrl?: string;
1488
- readonly profileUrl?: string;
1489
- readonly email?: string;
1490
- readonly emailVerified?: boolean;
1491
- readonly providerData?: {
1492
- readonly [x: string]: import("effect/Schema").Json;
1493
- };
1494
- };
1495
- };
1496
- };
1497
- readonly sealed: {
1498
- readonly format: "oauth-connected-xchacha20poly1305-v1";
1499
- readonly keyId: string;
1500
- readonly nonce: string;
1501
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
1502
- };
1503
- };
1504
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1505
- readonly admitUse: <A>(input: {
1506
- readonly grant: import("@yielded/auth/OAuth").OAuthConnectedStoredGrant;
1507
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
1508
- readonly admissionId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1509
- readonly lifetimeMillis: number;
1510
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1511
- readonly _tag: "Rejected";
1512
- } | {
1513
- readonly _tag: "Busy";
1514
- } | {
1515
- readonly _tag: "ReauthorizationRequired";
1516
- } | {
1517
- readonly _tag: "Admitted";
1518
- readonly admissionId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1519
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1520
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1521
- readonly admittedAtMillis: number;
1522
- readonly expiresAtMillis: number;
1523
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1524
- readonly cleanup: <A>(input: import("@yielded/auth/OAuth").OAuthCleanupInput, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1525
- readonly terminalized: number;
1526
- readonly removed: number;
1527
- readonly hasMore: boolean;
1528
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1529
- };
1530
- }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnyMySqlTable<{
1531
- dialect: "mysql";
1532
- }>, O extends AnyMySqlTable<{
287
+ }> = never>(mapping: OAuthConnectedMapping<S, AC, O, F, G, N, J>) => import("effect/Effect").Effect<{
288
+ readonly oauthConnectedPersistence: import("@yielded/auth/OAuth").OAuthConnectedPersistence["Service"];
289
+ }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <O extends AnyMySqlTable<{
1533
290
  dialect: "mysql";
1534
291
  }>, F extends AnyMySqlTable<{
1535
292
  dialect: "mysql";
1536
- }>, G extends AnyMySqlTable<{
1537
- dialect: "mysql";
1538
- }>, C extends AnyMySqlTable<{
1539
- dialect: "mysql";
1540
- }>, H extends AnyMySqlTable<{
1541
- dialect: "mysql";
1542
293
  }>, J extends AnyMySqlTable<{
1543
294
  dialect: "mysql";
1544
- }>, N>(mapping: OAuthConnectedRevocationMapping<T, O, F, G, C, H, J, N>) => import("effect/Effect").Effect<{
1545
- oauthConnectedRevocations: {
1546
- readonly claim: <A>(input: {
1547
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1548
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1549
- readonly lifetimeMillis: number;
1550
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1551
- readonly _tag: "Claimed";
1552
- readonly claim: {
1553
- readonly job: {
1554
- readonly context: {
1555
- readonly namespace: "effect-auth/oauth-connected-revocation-context/v1";
1556
- readonly jobId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1557
- readonly token: {
1558
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1559
- readonly exchangeOrder: string;
1560
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1561
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1562
- readonly identity: {
1563
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1564
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1565
- readonly subject: string;
1566
- };
1567
- readonly configuration: {
1568
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1569
- readonly protocol: "oauth" | "oidc";
1570
- readonly configurationGeneration: number;
1571
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1572
- readonly responseIssuerMode: "required" | "unsupported";
1573
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1574
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1575
- readonly profile: {
1576
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1577
- readonly generation: number;
1578
- readonly issuance: "active" | "retired";
1579
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1580
- readonly clientRegistrationId: string;
1581
- readonly scopes: readonly string[];
1582
- readonly resources: readonly string[];
1583
- readonly retention: "access-and-refresh" | "access-only";
1584
- readonly maximumAccessLifetimeMillis: number;
1585
- readonly maximumRefreshLifetimeMillis?: number;
1586
- readonly refreshAheadMillis: number;
1587
- readonly refresh: "confidential" | "rotating" | "unsupported";
1588
- readonly revocation: "cohort" | "unsupported";
1589
- };
1590
- };
1591
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1592
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1593
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1594
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1595
- readonly metadata: {
1596
- readonly scopes: readonly string[];
1597
- readonly resources: readonly string[];
1598
- readonly accessExpiresAtMillis?: number;
1599
- readonly refreshExpiresAtMillis?: number;
1600
- readonly useUntilMillis: number;
1601
- readonly refreshUseUntilMillis?: number;
1602
- readonly obtainedAtMillis: number;
1603
- readonly profile?: {
1604
- readonly displayName?: string;
1605
- readonly handle?: string;
1606
- readonly avatarUrl?: string;
1607
- readonly profileUrl?: string;
1608
- readonly email?: string;
1609
- readonly emailVerified?: boolean;
1610
- readonly providerData?: {
1611
- readonly [x: string]: import("effect/Schema").Json;
1612
- };
1613
- };
1614
- };
1615
- };
1616
- };
1617
- readonly sealed: {
1618
- readonly format: "oauth-connected-xchacha20poly1305-v1";
1619
- readonly keyId: string;
1620
- readonly nonce: string;
1621
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
1622
- };
1623
- };
1624
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1625
- readonly claimedAtMillis: number;
1626
- readonly claimExpiresAtMillis: number;
1627
- };
1628
- } | {
1629
- readonly _tag: "Empty";
1630
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
1631
- readonly settle: <A>(input: {
1632
- readonly claim: import("@yielded/auth/OAuth").OAuthConnectedRevocationClaim;
1633
- readonly outcome: "Confirmed" | "Unknown";
1634
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1635
- readonly settled: boolean;
1636
- }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
1637
- };
1638
- }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
295
+ }>, N>(mapping: OAuthConnectedRevocationMapping<O, F, J, N>) => import("effect/Effect").Effect<{
296
+ readonly oauthConnectedRevocations: import("@yielded/auth/OAuth").OAuthConnectedRevocations["Service"];
297
+ }, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
1639
298
  <D extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
1640
299
  dialect: "mysql";
1641
300
  }>, AC extends AnyMySqlTable<{
1642
301
  dialect: "mysql";
1643
- }>, T extends AnyMySqlTable<{
1644
- dialect: "mysql";
1645
302
  }>, O extends AnyMySqlTable<{
1646
303
  dialect: "mysql";
1647
304
  }>, F extends AnyMySqlTable<{
1648
305
  dialect: "mysql";
1649
306
  }>, G extends AnyMySqlTable<{
1650
307
  dialect: "mysql";
1651
- }>, C extends AnyMySqlTable<{
1652
- dialect: "mysql";
1653
- }>, H extends AnyMySqlTable<{
1654
- dialect: "mysql";
1655
- }>, UA extends AnyMySqlTable<{
1656
- dialect: "mysql";
1657
- }>, DC extends AnyMySqlTable<{
1658
- dialect: "mysql";
1659
308
  }>, N, J extends AnyMySqlTable<{
1660
309
  dialect: "mysql";
1661
310
  }>, A, E, R, DatabaseError, DatabaseRequirements>(acquire: import("effect/Effect").Effect<D, DatabaseError, DatabaseRequirements>, options: {
1662
- readonly mapping: OAuthConnectedMapping<S, AC, T, O, F, G, C, H, UA, DC, N, J>;
311
+ readonly mapping: OAuthConnectedMapping<S, AC, O, F, G, N, J>;
1663
312
  readonly transaction?: never;
1664
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthConnectedPersistence>>;
313
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthConnectedPersistence>>;
1665
314
  <D extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
1666
315
  dialect: "mysql";
1667
316
  }>, AC extends AnyMySqlTable<{
1668
317
  dialect: "mysql";
1669
- }>, T extends AnyMySqlTable<{
1670
- dialect: "mysql";
1671
318
  }>, O extends AnyMySqlTable<{
1672
319
  dialect: "mysql";
1673
320
  }>, F extends AnyMySqlTable<{
1674
321
  dialect: "mysql";
1675
322
  }>, G extends AnyMySqlTable<{
1676
323
  dialect: "mysql";
1677
- }>, C extends AnyMySqlTable<{
1678
- dialect: "mysql";
1679
- }>, H extends AnyMySqlTable<{
1680
- dialect: "mysql";
1681
- }>, UA extends AnyMySqlTable<{
1682
- dialect: "mysql";
1683
- }>, DC extends AnyMySqlTable<{
1684
- dialect: "mysql";
1685
324
  }>, N, J extends AnyMySqlTable<{
1686
325
  dialect: "mysql";
1687
326
  }>, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: import("effect/Effect").Effect<D, DatabaseError, DatabaseRequirements>, options: {
1688
- readonly mapping: OAuthConnectedMapping<S, AC, T, O, F, G, C, H, UA, DC, N, J>;
327
+ readonly mapping: OAuthConnectedMapping<S, AC, O, F, G, N, J>;
1689
328
  readonly transaction: SuppliedService<TxId, NoInfer<D extends {
1690
329
  readonly transaction: (...args: any[]) => any;
1691
330
  } ? Parameters<Parameters<D["transaction"]>[0]>[0] : never>, TxShape>;
1692
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthConnectedPersistence>>;
331
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthConnectedPersistence>>;
1693
332
  }, coordinateOAuthConnectedRevocations: {
1694
- <D extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, T extends AnyMySqlTable<{
1695
- dialect: "mysql";
1696
- }>, O extends AnyMySqlTable<{
333
+ <D extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, O extends AnyMySqlTable<{
1697
334
  dialect: "mysql";
1698
335
  }>, F extends AnyMySqlTable<{
1699
336
  dialect: "mysql";
1700
- }>, G extends AnyMySqlTable<{
1701
- dialect: "mysql";
1702
- }>, C extends AnyMySqlTable<{
1703
- dialect: "mysql";
1704
- }>, H extends AnyMySqlTable<{
1705
- dialect: "mysql";
1706
337
  }>, J extends AnyMySqlTable<{
1707
338
  dialect: "mysql";
1708
339
  }>, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: import("effect/Effect").Effect<D, DatabaseError, DatabaseRequirements>, options: {
1709
- readonly mapping: OAuthConnectedRevocationMapping<T, O, F, G, C, H, J, N>;
340
+ readonly mapping: OAuthConnectedRevocationMapping<O, F, J, N>;
1710
341
  readonly transaction?: never;
1711
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthConnectedRevocations>>;
1712
- <D extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, T extends AnyMySqlTable<{
1713
- dialect: "mysql";
1714
- }>, O extends AnyMySqlTable<{
342
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthConnectedRevocations>>;
343
+ <D extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, O extends AnyMySqlTable<{
1715
344
  dialect: "mysql";
1716
345
  }>, F extends AnyMySqlTable<{
1717
346
  dialect: "mysql";
1718
- }>, G extends AnyMySqlTable<{
1719
- dialect: "mysql";
1720
- }>, C extends AnyMySqlTable<{
1721
- dialect: "mysql";
1722
- }>, H extends AnyMySqlTable<{
1723
- dialect: "mysql";
1724
347
  }>, J extends AnyMySqlTable<{
1725
348
  dialect: "mysql";
1726
349
  }>, N, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: import("effect/Effect").Effect<D, DatabaseError, DatabaseRequirements>, options: {
1727
- readonly mapping: OAuthConnectedRevocationMapping<T, O, F, G, C, H, J, N>;
350
+ readonly mapping: OAuthConnectedRevocationMapping<O, F, J, N>;
1728
351
  readonly transaction: SuppliedService<TxId, NoInfer<D extends {
1729
352
  readonly transaction: (...args: any[]) => any;
1730
353
  } ? Parameters<Parameters<D["transaction"]>[0]>[0] : never>, TxShape>;
1731
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthConnectedRevocations>>;
354
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthConnectedRevocations>>;
1732
355
  };
1733
356
  export declare const makePasskeyCredentialServices: <S extends AnyMySqlTable<{
1734
357
  dialect: "mysql";
@@ -1736,225 +359,252 @@ export declare const makePasskeyCredentialServices: <S extends AnyMySqlTable<{
1736
359
  dialect: "mysql";
1737
360
  }>, F extends AnyMySqlTable<{
1738
361
  dialect: "mysql";
1739
- }>, O extends AnyMySqlTable<{
1740
- dialect: "mysql";
1741
- }>, H extends AnyMySqlTable<{
1742
- dialect: "mysql";
1743
- }>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyCredentialMapping<S, C, F, O, H, N>, RSetup>) => import("effect/Effect").Effect<import("@yielded/auth-persistence/Adapter").PasskeyCredentialServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, import("effect/Crypto").Crypto | Database | Exclude<RSetup, import("@yielded/auth-persistence/Adapter").NativeDatabase>>, makePasskeyPersistenceServices: <S extends AnyMySqlTable<{
1744
- dialect: "mysql";
1745
- }>, C extends AnyMySqlTable<{
1746
- dialect: "mysql";
1747
- }>, F extends AnyMySqlTable<{
1748
- dialect: "mysql";
1749
- }>, O extends AnyMySqlTable<{
1750
- dialect: "mysql";
1751
- }>, H extends AnyMySqlTable<{
1752
- dialect: "mysql";
1753
- }>, M extends AnyMySqlTable<{
1754
- dialect: "mysql";
1755
- }>, Flow extends AnyMySqlTable<{
1756
- dialect: "mysql";
1757
- }>, Admission extends AnyMySqlTable<{
1758
- dialect: "mysql";
1759
- }>, Charge extends AnyMySqlTable<{
1760
- dialect: "mysql";
1761
- }>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyPersistenceMapping<PasskeyCredentialMapping<S, C, F, O, H, N>, M, Flow, Admission, Charge, N>, RSetup>) => import("effect/Effect").Effect<import("@yielded/auth-persistence/Adapter").PasskeyPersistenceServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, import("@yielded/auth-persistence/Adapter").NativeDatabase>>, makePasskeyEnrollmentContextServices: <S extends AnyMySqlTable<{
362
+ }>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyCredentialMapping<S, C, F, N>, RSetup>) => import("effect/Effect").Effect<{
363
+ passkeyCredentials: {
364
+ readonly listForSubject: (input: {
365
+ readonly moduleId: string;
366
+ readonly rpId: string;
367
+ readonly subjectId: import("@yielded/auth/Schema").SubjectId;
368
+ }) => import("effect/Effect").Effect<import("@yielded/auth/Passkey").PasskeyEnrollmentSnapshot | undefined, import("@yielded/auth/Passkey").PasskeyUnavailable>;
369
+ readonly lookup: (input: {
370
+ readonly rpId: string;
371
+ readonly protocolCredentialId: import("@yielded/auth/Passkey").PasskeyProtocolCredentialId;
372
+ }) => import("effect/Effect").Effect<import("@yielded/auth/Passkey").PasskeyCredential | undefined, import("@yielded/auth/Passkey").PasskeyUnavailable>;
373
+ };
374
+ }, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, import("effect/Crypto").Crypto | Database | Exclude<RSetup, NativeDatabase>>, makePasskeyPersistenceServices: <S extends AnyMySqlTable<{
1762
375
  dialect: "mysql";
1763
376
  }>, C extends AnyMySqlTable<{
1764
377
  dialect: "mysql";
1765
378
  }>, F extends AnyMySqlTable<{
1766
379
  dialect: "mysql";
1767
- }>, O extends AnyMySqlTable<{
1768
- dialect: "mysql";
1769
- }>, H extends AnyMySqlTable<{
1770
- dialect: "mysql";
1771
- }>, M extends AnyMySqlTable<{
1772
- dialect: "mysql";
1773
- }>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyEnrollmentContextMapping<PasskeyCredentialMapping<S, C, F, O, H, N>, M, N>, RSetup>) => import("effect/Effect").Effect<import("@yielded/auth-persistence/Adapter").PasskeyEnrollmentContextServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, import("effect/Crypto").Crypto | Database | Exclude<RSetup, import("@yielded/auth-persistence/Adapter").NativeDatabase>>, makePasskeyRegistrationCeremonyServices: <M extends AnyMySqlTable<{
1774
- dialect: "mysql";
1775
380
  }>, Flow extends AnyMySqlTable<{
1776
381
  dialect: "mysql";
1777
- }>, Admission extends AnyMySqlTable<{
1778
- dialect: "mysql";
1779
- }>, Charge extends AnyMySqlTable<{
1780
- dialect: "mysql";
1781
- }>, Intent extends AnyMySqlTable<{
1782
- dialect: "mysql";
1783
- }>, H extends AnyMySqlTable<{
382
+ }>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyPersistenceMapping<PasskeyCredentialMapping<S, C, F, N>, Flow, N>, RSetup>) => import("effect/Effect").Effect<{
383
+ passkeyPersistence: {
384
+ readonly issue: <A>(input: {
385
+ readonly ceremony: import("@yielded/auth/Passkey").PasskeyCeremony;
386
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Passkey").PasskeyIssueDecision, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
387
+ readonly context: (input: import("@yielded/auth/Passkey").PasskeyAccess) => import("effect/Effect").Effect<import("@yielded/auth/Passkey").PasskeyCeremony | undefined, import("@yielded/auth/Passkey").PasskeyUnavailable>;
388
+ readonly consume: <A>(input: {
389
+ readonly access: import("@yielded/auth/Passkey").PasskeyAccess;
390
+ readonly ceremony: import("@yielded/auth/Passkey").PasskeyCeremony;
391
+ readonly credential: import("@yielded/auth/Passkey").PasskeyCredential;
392
+ readonly assertion: import("@yielded/auth/Passkey").PasskeyAssertionVerified;
393
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Passkey").PasskeyConsumeDecision, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
394
+ readonly cleanup: <A>(input: {
395
+ readonly moduleId: string;
396
+ readonly limit: import("@yielded/auth/Persistence").CleanupLimit;
397
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Persistence").CleanupResult, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
398
+ };
399
+ }, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, makePasskeyRegistrationCeremonyServices: <Flow extends AnyMySqlTable<{
1784
400
  dialect: "mysql";
1785
- }>, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationCeremonyMapping<M, Flow, Admission, Charge, Intent, H>, RSetup>) => import("effect/Effect").Effect<import("@yielded/auth-persistence/Adapter").PasskeyRegistrationCeremonyServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, import("@yielded/auth-persistence/Adapter").NativeDatabase>>, coordinatePasskeyPersistence: {
401
+ }>, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationCeremonyMapping<Flow>, RSetup>) => import("effect/Effect").Effect<{
402
+ passkeyPersistence: {
403
+ readonly issue: <A>(input: {
404
+ readonly ceremony: import("@yielded/auth/Passkey").PasskeyCeremony;
405
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Passkey").PasskeyIssueDecision, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
406
+ readonly context: (input: import("@yielded/auth/Passkey").PasskeyAccess) => import("effect/Effect").Effect<import("@yielded/auth/Passkey").PasskeyCeremony | undefined, import("@yielded/auth/Passkey").PasskeyUnavailable>;
407
+ readonly consume: <A>(input: {
408
+ readonly access: import("@yielded/auth/Passkey").PasskeyAccess;
409
+ readonly ceremony: import("@yielded/auth/Passkey").PasskeyCeremony;
410
+ readonly credential: import("@yielded/auth/Passkey").PasskeyCredential;
411
+ readonly assertion: import("@yielded/auth/Passkey").PasskeyAssertionVerified;
412
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Passkey").PasskeyConsumeDecision, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
413
+ readonly cleanup: <A>(input: {
414
+ readonly moduleId: string;
415
+ readonly limit: import("@yielded/auth/Persistence").CleanupLimit;
416
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Persistence").CleanupResult, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
417
+ };
418
+ capabilities: {
419
+ purposes: readonly ["registration"];
420
+ issue: "registration-authority";
421
+ assertionConsumption: false;
422
+ };
423
+ }, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinatePasskeyPersistence: {
1786
424
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
1787
425
  dialect: "mysql";
1788
426
  }>, C extends AnyMySqlTable<{
1789
427
  dialect: "mysql";
1790
428
  }>, F extends AnyMySqlTable<{
1791
429
  dialect: "mysql";
1792
- }>, O extends AnyMySqlTable<{
1793
- dialect: "mysql";
1794
- }>, H extends AnyMySqlTable<{
1795
- dialect: "mysql";
1796
- }>, M extends AnyMySqlTable<{
1797
- dialect: "mysql";
1798
430
  }>, Flow extends AnyMySqlTable<{
1799
431
  dialect: "mysql";
1800
- }>, Admission extends AnyMySqlTable<{
1801
- dialect: "mysql";
1802
- }>, Charge extends AnyMySqlTable<{
1803
- dialect: "mysql";
1804
432
  }>, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
1805
- readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyPersistenceMapping<PasskeyCredentialMapping<S, C, F, O, H, N>, M, Flow, Admission, Charge, N>, RSetup>;
433
+ readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyPersistenceMapping<PasskeyCredentialMapping<S, C, F, N>, Flow, N>, RSetup>;
1806
434
  readonly transaction?: never;
1807
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Passkey").PasskeyPersistence>>;
435
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Passkey").PasskeyPersistence>>;
1808
436
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
1809
437
  dialect: "mysql";
1810
438
  }>, C extends AnyMySqlTable<{
1811
439
  dialect: "mysql";
1812
440
  }>, F extends AnyMySqlTable<{
1813
441
  dialect: "mysql";
1814
- }>, O extends AnyMySqlTable<{
1815
- dialect: "mysql";
1816
- }>, H extends AnyMySqlTable<{
1817
- dialect: "mysql";
1818
- }>, M extends AnyMySqlTable<{
1819
- dialect: "mysql";
1820
442
  }>, Flow extends AnyMySqlTable<{
1821
443
  dialect: "mysql";
1822
- }>, Admission extends AnyMySqlTable<{
1823
- dialect: "mysql";
1824
- }>, Charge extends AnyMySqlTable<{
1825
- dialect: "mysql";
1826
444
  }>, N, A, E, R, TxId, TxShape, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
1827
- readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyPersistenceMapping<PasskeyCredentialMapping<S, C, F, O, H, N>, M, Flow, Admission, Charge, N>, RSetup>;
445
+ readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyPersistenceMapping<PasskeyCredentialMapping<S, C, F, N>, Flow, N>, RSetup>;
1828
446
  readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
1829
447
  readonly transaction: (...args: any[]) => any;
1830
448
  } ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
1831
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
449
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
1832
450
  }, coordinatePasskeyRegistrationCeremony: {
1833
- <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, M extends AnyMySqlTable<{
1834
- dialect: "mysql";
1835
- }>, Flow extends AnyMySqlTable<{
1836
- dialect: "mysql";
1837
- }>, Admission extends AnyMySqlTable<{
1838
- dialect: "mysql";
1839
- }>, Charge extends AnyMySqlTable<{
1840
- dialect: "mysql";
1841
- }>, Intent extends AnyMySqlTable<{
1842
- dialect: "mysql";
1843
- }>, H extends AnyMySqlTable<{
451
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Flow extends AnyMySqlTable<{
1844
452
  dialect: "mysql";
1845
453
  }>, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
1846
- readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationCeremonyMapping<M, Flow, Admission, Charge, Intent, H>, RSetup>;
454
+ readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationCeremonyMapping<Flow>, RSetup>;
1847
455
  readonly transaction?: never;
1848
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Passkey").PasskeyPersistence>>;
1849
- <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, M extends AnyMySqlTable<{
1850
- dialect: "mysql";
1851
- }>, Flow extends AnyMySqlTable<{
1852
- dialect: "mysql";
1853
- }>, Admission extends AnyMySqlTable<{
1854
- dialect: "mysql";
1855
- }>, Charge extends AnyMySqlTable<{
1856
- dialect: "mysql";
1857
- }>, Intent extends AnyMySqlTable<{
1858
- dialect: "mysql";
1859
- }>, H extends AnyMySqlTable<{
456
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Passkey").PasskeyPersistence>>;
457
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Flow extends AnyMySqlTable<{
1860
458
  dialect: "mysql";
1861
459
  }>, A, E, R, TxId, TxShape, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
1862
- readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationCeremonyMapping<M, Flow, Admission, Charge, Intent, H>, RSetup>;
460
+ readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationCeremonyMapping<Flow>, RSetup>;
1863
461
  readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
1864
462
  readonly transaction: (...args: any[]) => any;
1865
463
  } ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
1866
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
464
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
1867
465
  }, makePasskeyManagementServices: <S extends AnyMySqlTable<{
1868
466
  dialect: "mysql";
1869
467
  }>, C extends AnyMySqlTable<{
1870
468
  dialect: "mysql";
1871
469
  }>, F extends AnyMySqlTable<{
1872
470
  dialect: "mysql";
1873
- }>, O extends AnyMySqlTable<{
1874
- dialect: "mysql";
1875
- }>, H extends AnyMySqlTable<{
1876
- dialect: "mysql";
1877
- }>, M extends AnyMySqlTable<{
1878
- dialect: "mysql";
1879
471
  }>, Flow extends AnyMySqlTable<{
1880
472
  dialect: "mysql";
1881
- }>, Admission extends AnyMySqlTable<{
1882
- dialect: "mysql";
1883
- }>, Charge extends AnyMySqlTable<{
1884
- dialect: "mysql";
1885
- }>, Command extends AnyMySqlTable<{
1886
- dialect: "mysql";
1887
- }>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyManagementMapping<S, C, F, O, H, M, Flow, Admission, Charge, Command, N>, RSetup>) => import("effect/Effect").Effect<import("@yielded/auth-persistence/Adapter").PasskeyManagementServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, import("@yielded/auth-persistence/Adapter").NativeDatabase>>, makePasskeyRegistrationServices: <S extends AnyMySqlTable<{
473
+ }>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyManagementMapping<S, C, F, Flow, N>, RSetup>) => import("effect/Effect").Effect<{
474
+ passkeyManagementPersistence: {
475
+ readonly list: (input: {
476
+ readonly moduleId: string;
477
+ readonly subjectId: import("@yielded/auth/Schema").SubjectId;
478
+ readonly cursor?: string;
479
+ readonly limit: number;
480
+ }) => import("effect/Effect").Effect<{
481
+ readonly credentials: ReadonlyArray<import("@yielded/auth/Passkey").PasskeyCredentialSummary>;
482
+ readonly cursor?: string;
483
+ }, import("@yielded/auth/Passkey").PasskeyUnavailable>;
484
+ readonly completeEnrollment: <A>(input: {
485
+ readonly access: import("@yielded/auth/Passkey").PasskeyAccess;
486
+ readonly ceremony: import("@yielded/auth/Passkey").PasskeyCeremony;
487
+ readonly verified: import("@yielded/auth/Passkey").PasskeyRegistrationVerified;
488
+ readonly management: import("@yielded/auth/Passkey").PasskeyManagementPolicy;
489
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<{
490
+ readonly _tag: "Enrolled";
491
+ readonly credential: import("@yielded/auth/Passkey").PasskeyCredentialSummary;
492
+ } | {
493
+ readonly _tag: "Rejected";
494
+ }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
495
+ readonly inspectRemove: (input: {
496
+ readonly moduleId: string;
497
+ readonly subjectId: import("@yielded/auth/Schema").SubjectId;
498
+ readonly credentialId: string;
499
+ }) => import("effect/Effect").Effect<{
500
+ readonly _tag: "Target";
501
+ readonly credential: import("@yielded/auth/Passkey").PasskeyCredential;
502
+ } | {
503
+ readonly _tag: "Rejected";
504
+ }, import("@yielded/auth/Passkey").PasskeyUnavailable>;
505
+ readonly remove: <A>(input: {
506
+ readonly moduleId: string;
507
+ readonly commandId: string;
508
+ readonly credential: import("@yielded/auth/Passkey").PasskeyCredential;
509
+ readonly authorization: import("@yielded/auth/Passkey").PasskeyActionAuthorization;
510
+ readonly management: import("@yielded/auth/Passkey").PasskeyManagementPolicy;
511
+ readonly invalidation: import("@yielded/auth/Sessions").SessionInvalidationWindow;
512
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<{
513
+ readonly _tag: "Removed";
514
+ readonly result: {
515
+ readonly credentialId: string;
516
+ readonly invalidation: {
517
+ readonly trigger: "all-session-revocation" | "credential-change" | "factor-reset" | "identifier-change" | "password-reset" | "subject-delete" | "subject-disable";
518
+ readonly existingSessions: "cache-expiry" | "immediate" | "original-absolute-expiry";
519
+ readonly maximumExposureMillis: number;
520
+ readonly oldAuthenticationEvidence: "rejected";
521
+ };
522
+ };
523
+ } | {
524
+ readonly _tag: "Rejected" | "LastSignInMethod";
525
+ }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
526
+ readonly rename: <A>(input: {
527
+ readonly moduleId: string;
528
+ readonly subjectId: import("@yielded/auth/Schema").SubjectId;
529
+ readonly commandId: string;
530
+ readonly credentialId: string;
531
+ readonly name: string;
532
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<{
533
+ readonly _tag: "Renamed";
534
+ readonly credential: import("@yielded/auth/Passkey").PasskeyCredentialSummary;
535
+ } | {
536
+ readonly _tag: "Rejected";
537
+ }, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
538
+ };
539
+ passkeyPersistence: {
540
+ readonly issue: <A>(input: {
541
+ readonly ceremony: import("@yielded/auth/Passkey").PasskeyCeremony;
542
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Passkey").PasskeyIssueDecision, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
543
+ readonly context: (input: import("@yielded/auth/Passkey").PasskeyAccess) => import("effect/Effect").Effect<import("@yielded/auth/Passkey").PasskeyCeremony | undefined, import("@yielded/auth/Passkey").PasskeyUnavailable>;
544
+ readonly consume: <A>(input: {
545
+ readonly access: import("@yielded/auth/Passkey").PasskeyAccess;
546
+ readonly ceremony: import("@yielded/auth/Passkey").PasskeyCeremony;
547
+ readonly credential: import("@yielded/auth/Passkey").PasskeyCredential;
548
+ readonly assertion: import("@yielded/auth/Passkey").PasskeyAssertionVerified;
549
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Passkey").PasskeyConsumeDecision, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
550
+ readonly cleanup: <A>(input: {
551
+ readonly moduleId: string;
552
+ readonly limit: import("@yielded/auth/Persistence").CleanupLimit;
553
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Persistence").CleanupResult, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
554
+ };
555
+ }, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, makePasskeyRegistrationServices: <S extends AnyMySqlTable<{
1888
556
  dialect: "mysql";
1889
557
  }>, C extends AnyMySqlTable<{
1890
558
  dialect: "mysql";
1891
559
  }>, F extends AnyMySqlTable<{
1892
560
  dialect: "mysql";
1893
- }>, O extends AnyMySqlTable<{
1894
- dialect: "mysql";
1895
- }>, H extends AnyMySqlTable<{
1896
- dialect: "mysql";
1897
- }>, M extends AnyMySqlTable<{
1898
- dialect: "mysql";
1899
561
  }>, Flow extends AnyMySqlTable<{
1900
562
  dialect: "mysql";
1901
- }>, Admission extends AnyMySqlTable<{
1902
- dialect: "mysql";
1903
- }>, Charge extends AnyMySqlTable<{
1904
- dialect: "mysql";
1905
- }>, Intent extends AnyMySqlTable<{
1906
- dialect: "mysql";
1907
- }>, N, Value, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value>, RSetup>) => import("effect/Effect").Effect<import("@yielded/auth-persistence/Adapter").PasskeyRegistrationServices<Value>, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, import("@yielded/auth-persistence/Adapter").NativeDatabase>>, coordinatePasskeyManagement: {
563
+ }>, N, Value, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, Flow, N, Value>, RSetup>) => import("effect/Effect").Effect<{
564
+ passkeyRegistrationAuthority: import("@yielded/auth-persistence/Adapter").PasskeyRegistrationWriter<Value>;
565
+ passkeyPersistence: {
566
+ readonly issue: <A>(input: {
567
+ readonly ceremony: import("@yielded/auth/Passkey").PasskeyCeremony;
568
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Passkey").PasskeyIssueDecision, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
569
+ readonly context: (input: import("@yielded/auth/Passkey").PasskeyAccess) => import("effect/Effect").Effect<import("@yielded/auth/Passkey").PasskeyCeremony | undefined, import("@yielded/auth/Passkey").PasskeyUnavailable>;
570
+ readonly consume: <A>(input: {
571
+ readonly access: import("@yielded/auth/Passkey").PasskeyAccess;
572
+ readonly ceremony: import("@yielded/auth/Passkey").PasskeyCeremony;
573
+ readonly credential: import("@yielded/auth/Passkey").PasskeyCredential;
574
+ readonly assertion: import("@yielded/auth/Passkey").PasskeyAssertionVerified;
575
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Passkey").PasskeyConsumeDecision, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
576
+ readonly cleanup: <A>(input: {
577
+ readonly moduleId: string;
578
+ readonly limit: import("@yielded/auth/Persistence").CleanupLimit;
579
+ }, prepare: import("@yielded/auth/Passkey").PreparePasskeyCommit<import("@yielded/auth/Persistence").CleanupResult, A>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Passkey").PasskeyUnavailable>;
580
+ };
581
+ }, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinatePasskeyManagement: {
1908
582
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
1909
583
  dialect: "mysql";
1910
584
  }>, C extends AnyMySqlTable<{
1911
585
  dialect: "mysql";
1912
586
  }>, F extends AnyMySqlTable<{
1913
587
  dialect: "mysql";
1914
- }>, O extends AnyMySqlTable<{
1915
- dialect: "mysql";
1916
- }>, H extends AnyMySqlTable<{
1917
- dialect: "mysql";
1918
- }>, M extends AnyMySqlTable<{
1919
- dialect: "mysql";
1920
588
  }>, Flow extends AnyMySqlTable<{
1921
589
  dialect: "mysql";
1922
- }>, Admission extends AnyMySqlTable<{
1923
- dialect: "mysql";
1924
- }>, Charge extends AnyMySqlTable<{
1925
- dialect: "mysql";
1926
- }>, Command extends AnyMySqlTable<{
1927
- dialect: "mysql";
1928
590
  }>, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
1929
- readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyManagementMapping<S, C, F, O, H, M, Flow, Admission, Charge, Command, N>, RSetup>;
591
+ readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyManagementMapping<S, C, F, Flow, N>, RSetup>;
1930
592
  readonly transaction?: never;
1931
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Passkey").PasskeyManagementPersistence | import("@yielded/auth/Passkey").PasskeyPersistence>>;
593
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Passkey").PasskeyManagementPersistence | import("@yielded/auth/Passkey").PasskeyPersistence>>;
1932
594
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
1933
595
  dialect: "mysql";
1934
596
  }>, C extends AnyMySqlTable<{
1935
597
  dialect: "mysql";
1936
598
  }>, F extends AnyMySqlTable<{
1937
599
  dialect: "mysql";
1938
- }>, O extends AnyMySqlTable<{
1939
- dialect: "mysql";
1940
- }>, H extends AnyMySqlTable<{
1941
- dialect: "mysql";
1942
- }>, M extends AnyMySqlTable<{
1943
- dialect: "mysql";
1944
600
  }>, Flow extends AnyMySqlTable<{
1945
601
  dialect: "mysql";
1946
- }>, Admission extends AnyMySqlTable<{
1947
- dialect: "mysql";
1948
- }>, Charge extends AnyMySqlTable<{
1949
- dialect: "mysql";
1950
- }>, Command extends AnyMySqlTable<{
1951
- dialect: "mysql";
1952
602
  }>, N, A, E, R, TxId, TxShape, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
1953
- readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyManagementMapping<S, C, F, O, H, M, Flow, Admission, Charge, Command, N>, RSetup>;
603
+ readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyManagementMapping<S, C, F, Flow, N>, RSetup>;
1954
604
  readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
1955
605
  readonly transaction: (...args: any[]) => any;
1956
606
  } ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
1957
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Passkey").PasskeyManagementPersistence | import("@yielded/auth/Passkey").PasskeyPersistence>>;
607
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Passkey").PasskeyManagementPersistence | import("@yielded/auth/Passkey").PasskeyPersistence>>;
1958
608
  }, coordinatePasskeyRegistration: {
1959
609
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
1960
610
  dialect: "mysql";
@@ -1962,121 +612,125 @@ export declare const makePasskeyCredentialServices: <S extends AnyMySqlTable<{
1962
612
  dialect: "mysql";
1963
613
  }>, F extends AnyMySqlTable<{
1964
614
  dialect: "mysql";
1965
- }>, O extends AnyMySqlTable<{
1966
- dialect: "mysql";
1967
- }>, H extends AnyMySqlTable<{
1968
- dialect: "mysql";
1969
- }>, M extends AnyMySqlTable<{
1970
- dialect: "mysql";
1971
615
  }>, Flow extends AnyMySqlTable<{
1972
616
  dialect: "mysql";
1973
- }>, Admission extends AnyMySqlTable<{
1974
- dialect: "mysql";
1975
- }>, Charge extends AnyMySqlTable<{
1976
- dialect: "mysql";
1977
- }>, Intent extends AnyMySqlTable<{
1978
- dialect: "mysql";
1979
617
  }>, N, Value, A, E, R, AuthorityId, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
1980
- readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value>, RSetup>;
618
+ readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, Flow, N, Value>, RSetup>;
1981
619
  readonly authority: import("effect/Context").Key<AuthorityId, import("@yielded/auth-persistence/Adapter").PasskeyRegistrationWriter<Value>>;
1982
620
  readonly transaction?: never;
1983
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, AuthorityId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
621
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, AuthorityId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
1984
622
  <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
1985
623
  dialect: "mysql";
1986
624
  }>, C extends AnyMySqlTable<{
1987
625
  dialect: "mysql";
1988
626
  }>, F extends AnyMySqlTable<{
1989
627
  dialect: "mysql";
1990
- }>, O extends AnyMySqlTable<{
1991
- dialect: "mysql";
1992
- }>, H extends AnyMySqlTable<{
1993
- dialect: "mysql";
1994
- }>, M extends AnyMySqlTable<{
1995
- dialect: "mysql";
1996
628
  }>, Flow extends AnyMySqlTable<{
1997
629
  dialect: "mysql";
1998
- }>, Admission extends AnyMySqlTable<{
1999
- dialect: "mysql";
2000
- }>, Charge extends AnyMySqlTable<{
2001
- dialect: "mysql";
2002
- }>, Intent extends AnyMySqlTable<{
2003
- dialect: "mysql";
2004
630
  }>, N, Value, A, E, R, AuthorityId, TxId, TxShape, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
2005
- readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value>, RSetup>;
631
+ readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, Flow, N, Value>, RSetup>;
2006
632
  readonly authority: import("effect/Context").Key<AuthorityId, import("@yielded/auth-persistence/Adapter").PasskeyRegistrationWriter<Value>>;
2007
633
  readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
2008
634
  readonly transaction: (...args: any[]) => any;
2009
635
  } ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
2010
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, AuthorityId | TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
636
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, AuthorityId | TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
2011
637
  };
2012
- export declare const makeTotpPersistenceServices: <S extends AnyMySqlTable<{
2013
- dialect: "mysql";
2014
- }>, F extends AnyMySqlTable<{
2015
- dialect: "mysql";
2016
- }>, C extends AnyMySqlTable<{
2017
- dialect: "mysql";
2018
- }>, N, RSetup = never>(mapping: TotpMappingSource<TotpMapping<S, F, C, N>, RSetup>) => import("effect/Effect").Effect<TotpPersistenceServices, import("@yielded/auth-persistence/Adapter").PersistenceMappingError | import("@yielded/auth/Totp").TotpConfigurationError, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, import("@yielded/auth-persistence/Adapter").NativeDatabase>>, coordinateTotpPersistence: {
2019
- <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
2020
- dialect: "mysql";
2021
- }>, F extends AnyMySqlTable<{
2022
- dialect: "mysql";
2023
- }>, C extends AnyMySqlTable<{
2024
- dialect: "mysql";
2025
- }>, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
2026
- readonly mapping: TotpMappingSource<TotpMapping<S, F, C, N>, RSetup>;
638
+ export declare const makePhonePersistenceServices: <Subject extends import("drizzle-orm").Table, Identifier extends import("drizzle-orm").Table, Credential extends import("drizzle-orm").Table, Proof extends import("drizzle-orm").Table, NativeId>(mapping: PhoneMapping<Subject, Identifier, Credential, Proof, NativeId>) => import("effect/Effect").Effect<{
639
+ readonly phonePersistence: import("@yielded/auth/PhoneOtp").PhonePersistence["Service"];
640
+ readonly phoneSignInTargets: import("@yielded/auth/PhoneOtp").PhoneSignInTargets["Service"];
641
+ }, import("@yielded/auth/PhoneOtp").PhoneConfigurationError | import("@yielded/auth/PhoneOtp").PhoneOtpUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinatePhonePersistence: {
642
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Subject extends import("drizzle-orm").Table, Identifier extends import("drizzle-orm").Table, Credential extends import("drizzle-orm").Table, Proof extends import("drizzle-orm").Table, NativeId, A, E, R, DE, DR>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
643
+ readonly mapping: PhoneMapping<Subject, Identifier, Credential, Proof, NativeId>;
2027
644
  readonly transaction?: never;
2028
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | TotpCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Totp").TotpPersistence>>;
2029
- <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
2030
- dialect: "mysql";
2031
- }>, F extends AnyMySqlTable<{
2032
- dialect: "mysql";
2033
- }>, C extends AnyMySqlTable<{
2034
- dialect: "mysql";
2035
- }>, N, A, E, R, TxId, TxShape, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
2036
- readonly mapping: TotpMappingSource<TotpMapping<S, F, C, N>, RSetup>;
2037
- readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
2038
- readonly transaction: (...args: any[]) => any;
2039
- } ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
2040
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | TotpCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Totp").TotpPersistence>>;
2041
- };
2042
- export declare const makePhonePersistenceServices: <S extends AnyMySqlTable<{
2043
- dialect: "mysql";
2044
- }>, I extends AnyMySqlTable<{
2045
- dialect: "mysql";
2046
- }>, F extends AnyMySqlTable<{
2047
- dialect: "mysql";
2048
- }>, C extends AnyMySqlTable<{
2049
- dialect: "mysql";
2050
- }>, N, RSetup = never>(mapping: PhoneMappingSource<PhoneMapping<S, I, C, F, N>, RSetup>) => import("effect/Effect").Effect<PhonePersistenceServices, import("@yielded/auth-persistence/Adapter").PersistenceMappingError | import("@yielded/auth/PhoneOtp").PhoneConfigurationError, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, import("@yielded/auth-persistence/Adapter").NativeDatabase>>, coordinatePhonePersistence: {
2051
- <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
2052
- dialect: "mysql";
2053
- }>, I extends AnyMySqlTable<{
2054
- dialect: "mysql";
2055
- }>, F extends AnyMySqlTable<{
2056
- dialect: "mysql";
2057
- }>, C extends AnyMySqlTable<{
2058
- dialect: "mysql";
2059
- }>, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
2060
- readonly mapping: PhoneMappingSource<PhoneMapping<S, I, C, F, N>, RSetup>;
2061
- readonly transaction?: never;
2062
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | PhoneCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/PhoneOtp").PhoneAdmission | import("@yielded/auth/PhoneOtp").PhonePersistence | import("@yielded/auth/PhoneOtp").PhoneSignInTargets>>;
2063
- <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
2064
- dialect: "mysql";
2065
- }>, I extends AnyMySqlTable<{
2066
- dialect: "mysql";
2067
- }>, F extends AnyMySqlTable<{
2068
- dialect: "mysql";
2069
- }>, C extends AnyMySqlTable<{
2070
- dialect: "mysql";
2071
- }>, N, A, E, R, TxId, TxShape, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: import("effect/Effect").Effect<Database, DatabaseError, DatabaseRequirements>, options: {
2072
- readonly mapping: PhoneMappingSource<PhoneMapping<S, I, C, F, N>, RSetup>;
2073
- readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
2074
- readonly transaction: (...args: any[]) => any;
2075
- } ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
2076
- }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DatabaseError | PhoneCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/PhoneOtp").PhoneAdmission | import("@yielded/auth/PhoneOtp").PhonePersistence | import("@yielded/auth/PhoneOtp").PhoneSignInTargets>>;
645
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/PhoneOtp").PhoneConfigurationError | import("@yielded/auth/PhoneOtp").PhoneOtpUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/PhoneOtp").PhonePersistence | import("@yielded/auth/PhoneOtp").PhoneSignInTargets>>;
646
+ <Database extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Subject extends import("drizzle-orm").Table, Identifier extends import("drizzle-orm").Table, Credential extends import("drizzle-orm").Table, Proof extends import("drizzle-orm").Table, NativeId, A, E, R, DE, DR, TxId, TxShape>(acquire: import("effect/Effect").Effect<Database, DE, DR>, options: {
647
+ readonly mapping: PhoneMapping<Subject, Identifier, Credential, Proof, NativeId>;
648
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<Database>>, TxShape>;
649
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/PhoneOtp").PhoneConfigurationError | import("@yielded/auth/PhoneOtp").PhoneOtpUnavailable, DR | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/PhoneOtp").PhonePersistence | import("@yielded/auth/PhoneOtp").PhoneSignInTargets>>;
2077
650
  };
2078
651
  /** Construct Drizzle from the driver's SQL-client Layer. */
2079
652
  export declare const databaseLayer: Layer.Layer<Database, never, import("@effect/sql-mysql2/MysqlClient").MysqlClient>;
653
+ export declare const coordinateAuthenticationAuthority: {
654
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, N, A, E, R, DE, DR>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
655
+ readonly mapping: AuthenticationAuthorityMapping<Claims, S, C, P, N>;
656
+ readonly transaction?: never;
657
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Sessions").SessionUnavailable, DR | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Sessions").AuthenticationAuthority>>;
658
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, N, A, E, R, DE, DR, TxId, TxShape>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
659
+ readonly mapping: AuthenticationAuthorityMapping<Claims, S, C, P, N>;
660
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<DB>>, TxShape>;
661
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Sessions").SessionUnavailable, DR | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Sessions").AuthenticationAuthority>>;
662
+ }, coordinatePendingAuthentication: {
663
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Id, Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, N, A, E, R, DE, DR>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
664
+ readonly mapping: PendingAuthenticationMapping<NoInfer<Claims>, S, C, P, N>;
665
+ readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").PendingAuthentication<Claims>>;
666
+ readonly transaction?: never;
667
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Sessions").SessionUnavailable, DR | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id>>;
668
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Id, Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, N, A, E, R, DE, DR, TxId, TxShape>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
669
+ readonly mapping: PendingAuthenticationMapping<NoInfer<Claims>, S, C, P, N>;
670
+ readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").PendingAuthentication<Claims>>;
671
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<DB>>, TxShape>;
672
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Sessions").SessionUnavailable, DR | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id | TxId>>;
673
+ }, coordinateSignedSessionValidity: {
674
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Id, S extends import("drizzle-orm").Table, T extends import("drizzle-orm").Table, N, NS, A, E, R, DE, DR>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
675
+ readonly mapping: SignedSessionValidityMapping<S, T, N, NS>;
676
+ readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").SignedSessionValidity>;
677
+ readonly transaction?: never;
678
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Sessions").SessionUnavailable, DR | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id>>;
679
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Id, S extends import("drizzle-orm").Table, T extends import("drizzle-orm").Table, N, NS, A, E, R, DE, DR, TxId, TxShape>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
680
+ readonly mapping: SignedSessionValidityMapping<S, T, N, NS>;
681
+ readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").SignedSessionValidity>;
682
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<DB>>, TxShape>;
683
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Sessions").SessionUnavailable, DR | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id | TxId>>;
684
+ }, coordinateStatefulSessions: {
685
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Id, RepositoryId, Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, Session extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, N, NS, A, E, R, DE, DR>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
686
+ readonly mapping: StatefulSessionMapping<NoInfer<Claims>, S, C, Session, P, N, NS>;
687
+ readonly persistence: SuppliedService<Id, import("@yielded/auth/Sessions").StatefulSessionPersistence<Claims>>;
688
+ readonly repository: SuppliedService<RepositoryId, import("@yielded/auth/Sessions").SessionRepository>;
689
+ readonly transaction?: never;
690
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Sessions").SessionUnavailable, DR | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id | RepositoryId>>;
691
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Id, RepositoryId, Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, Session extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, N, NS, A, E, R, DE, DR, TxId, TxShape>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
692
+ readonly mapping: StatefulSessionMapping<NoInfer<Claims>, S, C, Session, P, N, NS>;
693
+ readonly persistence: SuppliedService<Id, import("@yielded/auth/Sessions").StatefulSessionPersistence<Claims>>;
694
+ readonly repository: SuppliedService<RepositoryId, import("@yielded/auth/Sessions").SessionRepository>;
695
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<DB>>, TxShape>;
696
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Sessions").SessionUnavailable, DR | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id | RepositoryId | TxId>>;
697
+ }, makeAuthenticationAuthorityServices: <Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, N>(mapping: AuthenticationAuthorityMapping<Claims, S, C, P, N>) => import("effect/Effect").Effect<{
698
+ readonly authenticationAuthority: import("@yielded/auth/Sessions").AuthenticationAuthority["Service"];
699
+ }, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makePendingAuthenticationServices: <Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, N>(mapping: PendingAuthenticationMapping<Claims, S, C, P, N>) => import("effect/Effect").Effect<{
700
+ readonly pendingAuthentication: import("@yielded/auth/Sessions").PendingAuthentication<Claims>;
701
+ }, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeSignedSessionValidityServices: <S extends import("drizzle-orm").Table, T extends import("drizzle-orm").Table, N, NS>(mapping: SignedSessionValidityMapping<S, T, N, NS>) => import("effect/Effect").Effect<{
702
+ readonly signedSessionValidity: import("@yielded/auth/Sessions").SignedSessionValidity;
703
+ }, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeStatefulSessionServices: <Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, Session extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, N, NS>(mapping: StatefulSessionMapping<Claims, S, C, Session, P, N, NS>) => import("effect/Effect").Effect<{
704
+ readonly statefulSessionPersistence: import("@yielded/auth/Sessions").StatefulSessionPersistence<Claims>;
705
+ readonly sessionRepository: import("@yielded/auth/Sessions").SessionRepository;
706
+ }, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeSessionStepUpServices: <Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, Session extends import("drizzle-orm").Table, T extends import("drizzle-orm").Table, N, NS, Id>(mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, P, Session, T, N, NS>, target: import("effect/Context").Service<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>) => import("effect/Effect").Effect<{
707
+ sessionStepUpPersistence: import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>;
708
+ }, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateSessionStepUp: {
709
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Id, Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, Session extends import("drizzle-orm").Table, T extends import("drizzle-orm").Table, N, NS, A, E, R, DE, DR>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
710
+ readonly mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, P, Session, T, N, NS>;
711
+ readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>;
712
+ readonly transaction?: never;
713
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Sessions").SessionUnavailable, DR | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id>>;
714
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, Id, Claims, S extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, P extends import("drizzle-orm").Table, Session extends import("drizzle-orm").Table, T extends import("drizzle-orm").Table, N, NS, A, E, R, DE, DR, TxId, TxShape>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
715
+ readonly mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, P, Session, T, N, NS>;
716
+ readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>;
717
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<DB>>, TxShape>;
718
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth/Sessions").SessionUnavailable, DR | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id | TxId>>;
719
+ }, makeSessionCleanupServices: <P extends import("drizzle-orm").Table, T extends import("drizzle-orm").Table, N, NS>(mapping: SessionCleanupMapping<P, T, N, NS>) => import("effect/Effect").Effect<{
720
+ readonly sessionCleanup: import("@yielded/auth/Sessions").SessionCleanup;
721
+ }, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
722
+ export declare const makeTotpPersistenceServices: <S extends import("drizzle-orm").Table, F extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, N, P extends import("drizzle-orm").Table = import("drizzle-orm").Table<import("drizzle-orm").TableConfig<import("drizzle-orm").Columns>>, RS = never>(source: import("@yielded/auth-persistence/Adapter").TotpMappingSource<TotpMapping<S, F, C, N, P>, RS>) => import("effect/Effect").Effect<{
723
+ readonly totpPersistence: import("@yielded/auth/Totp").TotpPersistence["Service"];
724
+ }, import("@yielded/auth-persistence/Adapter").PersistenceMappingError | import("@yielded/auth/Totp").TotpConfigurationError, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RS, NativeDatabase>>, coordinateTotpPersistence: {
725
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends import("drizzle-orm").Table, F extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, N, P extends import("drizzle-orm").Table, A, E, R, DE, DR, RS = never>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
726
+ readonly mapping: import("@yielded/auth-persistence/Adapter").TotpMappingSource<TotpMapping<S, F, C, N, P>, RS>;
727
+ readonly transaction?: never;
728
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth-persistence/Adapter").PersistenceMappingError | import("@yielded/auth/Totp").TotpConfigurationError | import("@yielded/auth/Totp").TotpUnavailable, DR | RS | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, D1BatchStatements | import("@yielded/auth/Totp").TotpPersistence>>;
729
+ <DB extends EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends import("drizzle-orm").Table, F extends import("drizzle-orm").Table, C extends import("drizzle-orm").Table, N, P extends import("drizzle-orm").Table, A, E, R, DE, DR, TxId, TxShape, RS = never>(acquire: import("effect/Effect").Effect<DB, DE, DR>, options: {
730
+ readonly mapping: import("@yielded/auth-persistence/Adapter").TotpMappingSource<TotpMapping<S, F, C, N, P>, RS>;
731
+ readonly transaction: SuppliedService<TxId, NoInfer<NativeDriverTransaction<DB>>, TxShape>;
732
+ }, body: import("effect/Effect").Effect<A, E, R>): import("effect/Effect").Effect<A, DE | E | import("@yielded/auth-persistence/Adapter").PersistenceMappingError | import("@yielded/auth/Totp").TotpConfigurationError | import("@yielded/auth/Totp").TotpUnavailable, DR | RS | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | D1BatchStatements | import("@yielded/auth/Totp").TotpPersistence>>;
733
+ };
2080
734
  //#endregion
2081
- export { Database, 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, makeMysqlPasswordPersistenceServices as makePasswordPersistenceServices, makeMySqlPasswordPreparedPersistenceServices as makePasswordPreparedPersistenceServices, makeMysqlPasswordRegistrationServices as makePasswordRegistrationServices, makeMysqlPendingAuthenticationServices as makePendingAuthenticationServices, makeMysqlProofPersistenceServices as makeProofPersistenceServices, makeMysqlSessionStepUpServices as makeSessionStepUpServices, makeMysqlSignedSessionValidityServices as makeSignedSessionValidityServices, makeMysqlStatefulSessionServices as makeStatefulSessionServices, passwordPreparedPersistenceLayer };
735
+ export { Database };
2082
736
  //# sourceMappingURL=Mysql2.d.mts.map