@yielded/auth-persistence 0.1.0-beta.25 → 0.1.0-beta.26

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 (481) hide show
  1. package/README.md +6 -8
  2. package/dist/Adapter.d.mts +47 -33
  3. package/dist/Adapter.mjs +36 -23
  4. package/dist/OAuthPersistence.d.mts +35 -51
  5. package/dist/OAuthPersistence.mjs +60 -68
  6. package/dist/OAuthPersistence.mjs.map +1 -1
  7. package/dist/index.d.mts +2 -2
  8. package/dist/index.mjs +2 -2
  9. package/dist/internal/browser-login.d.mts +1 -1
  10. package/dist/internal/browser-login.mjs +29 -9
  11. package/dist/internal/browser-login.mjs.map +1 -1
  12. package/dist/internal/configuration.d.mts +13 -8
  13. package/dist/internal/configuration.mjs.map +1 -1
  14. package/dist/internal/crypto.d.mts +1 -0
  15. package/dist/internal/crypto.mjs +1 -1
  16. package/dist/internal/d1-planning.mjs +8 -0
  17. package/dist/internal/d1-planning.mjs.map +1 -0
  18. package/dist/internal/email-native-state.mjs +135 -0
  19. package/dist/internal/email-native-state.mjs.map +1 -0
  20. package/dist/internal/email-native.d.mts +17 -0
  21. package/dist/internal/email-native.mjs +245 -0
  22. package/dist/internal/email-native.mjs.map +1 -0
  23. package/dist/internal/email-policy.mjs +92 -0
  24. package/dist/internal/email-policy.mjs.map +1 -0
  25. package/dist/internal/email-registration-native.d.mts +38 -0
  26. package/dist/internal/email-registration-native.mjs +171 -0
  27. package/dist/internal/email-registration-native.mjs.map +1 -0
  28. package/dist/internal/models/email-model.d.mts +40 -104
  29. package/dist/internal/models/email-model.mjs +3 -5
  30. package/dist/internal/models/email-model.mjs.map +1 -1
  31. package/dist/internal/models/oauth-connected-model.d.mts +44 -213
  32. package/dist/internal/models/oauth-connected-model.mjs +6 -14
  33. package/dist/internal/models/oauth-connected-model.mjs.map +1 -1
  34. package/dist/internal/models/oauth-model.d.mts +95 -244
  35. package/dist/internal/models/oauth-model.mjs +28 -22
  36. package/dist/internal/models/oauth-model.mjs.map +1 -1
  37. package/dist/internal/models/passkey-model.d.mts +11 -147
  38. package/dist/internal/models/passkey-model.mjs +5 -24
  39. package/dist/internal/models/passkey-model.mjs.map +1 -1
  40. package/dist/internal/models/passkey-registration-ceremony-model.d.mts +5 -39
  41. package/dist/internal/models/passkey-write-model.d.mts +17 -75
  42. package/dist/internal/models/passkey-write-model.mjs +1 -7
  43. package/dist/internal/models/passkey-write-model.mjs.map +1 -1
  44. package/dist/internal/models/password-model.d.mts +14 -81
  45. package/dist/internal/models/password-model.mjs +1 -4
  46. package/dist/internal/models/password-model.mjs.map +1 -1
  47. package/dist/internal/models/phone-model.d.mts +86 -0
  48. package/dist/internal/models/phone-model.mjs +10 -0
  49. package/dist/internal/models/phone-model.mjs.map +1 -0
  50. package/dist/internal/models/proof-model.d.mts +43 -272
  51. package/dist/internal/models/proof-model.mjs +2 -10
  52. package/dist/internal/models/proof-model.mjs.map +1 -1
  53. package/dist/internal/models/session-model.d.mts +74 -93
  54. package/dist/internal/models/session-model.mjs +3 -11
  55. package/dist/internal/models/session-model.mjs.map +1 -1
  56. package/dist/internal/models/step-up-model.d.mts +12 -50
  57. package/dist/internal/models/step-up-model.mjs +2 -4
  58. package/dist/internal/models/step-up-model.mjs.map +1 -1
  59. package/dist/internal/models/totp-model.d.mts +76 -0
  60. package/dist/internal/models/totp-model.mjs +10 -0
  61. package/dist/internal/models/totp-model.mjs.map +1 -0
  62. package/dist/internal/native-sql-table.d.mts +21 -4
  63. package/dist/internal/native-sql-table.mjs +9 -5
  64. package/dist/internal/native-sql-table.mjs.map +1 -1
  65. package/dist/internal/oauth/native-accounts.d.mts +17 -0
  66. package/dist/internal/oauth/native-accounts.mjs +290 -0
  67. package/dist/internal/oauth/native-accounts.mjs.map +1 -0
  68. package/dist/internal/oauth/native-connected-state.d.mts +11 -0
  69. package/dist/internal/oauth/native-connected-state.mjs +146 -0
  70. package/dist/internal/oauth/native-connected-state.mjs.map +1 -0
  71. package/dist/internal/oauth/native-connected.d.mts +15 -0
  72. package/dist/internal/oauth/native-connected.mjs +462 -0
  73. package/dist/internal/oauth/native-connected.mjs.map +1 -0
  74. package/dist/internal/oauth/native-flow.mjs +138 -0
  75. package/dist/internal/oauth/native-flow.mjs.map +1 -0
  76. package/dist/internal/oauth/native-layers.d.mts +24 -0
  77. package/dist/internal/oauth/native-layers.mjs +13 -0
  78. package/dist/internal/oauth/native-layers.mjs.map +1 -0
  79. package/dist/internal/oauth/native-mutation.mjs +122 -0
  80. package/dist/internal/oauth/native-mutation.mjs.map +1 -0
  81. package/dist/internal/oauth/native-registration.d.mts +24 -0
  82. package/dist/internal/oauth/native-registration.mjs +328 -0
  83. package/dist/internal/oauth/native-registration.mjs.map +1 -0
  84. package/dist/internal/oauth/native-revocations.d.mts +17 -0
  85. package/dist/internal/oauth/native-revocations.mjs +106 -0
  86. package/dist/internal/oauth/native-revocations.mjs.map +1 -0
  87. package/dist/internal/oauth/native-sign-in.d.mts +17 -0
  88. package/dist/internal/oauth/native-sign-in.mjs +50 -0
  89. package/dist/internal/oauth/native-sign-in.mjs.map +1 -0
  90. package/dist/internal/oauth/native-state.d.mts +10 -0
  91. package/dist/internal/oauth/native-state.mjs +214 -0
  92. package/dist/internal/oauth/native-state.mjs.map +1 -0
  93. package/dist/internal/oauth/state.d.mts +10 -0
  94. package/dist/internal/oauth/state.mjs +3 -27
  95. package/dist/internal/oauth/state.mjs.map +1 -1
  96. package/dist/internal/passkey-actions.mjs +55 -0
  97. package/dist/internal/passkey-actions.mjs.map +1 -0
  98. package/dist/internal/passkey-inputs.mjs +73 -0
  99. package/dist/internal/passkey-inputs.mjs.map +1 -0
  100. package/dist/internal/passkey-managed.mjs +224 -0
  101. package/dist/internal/passkey-managed.mjs.map +1 -0
  102. package/dist/internal/passkey-native-ceremony.d.mts +35 -0
  103. package/dist/internal/passkey-native-ceremony.mjs +38 -0
  104. package/dist/internal/passkey-native-ceremony.mjs.map +1 -0
  105. package/dist/internal/passkey-native-flow.mjs +91 -0
  106. package/dist/internal/passkey-native-flow.mjs.map +1 -0
  107. package/dist/internal/passkey-native-registration.d.mts +10 -0
  108. package/dist/internal/passkey-native-registration.mjs +114 -0
  109. package/dist/internal/passkey-native-registration.mjs.map +1 -0
  110. package/dist/internal/passkey-native-state.d.mts +15 -0
  111. package/dist/internal/passkey-native-state.mjs +186 -0
  112. package/dist/internal/passkey-native-state.mjs.map +1 -0
  113. package/dist/internal/passkey-native-write.d.mts +82 -0
  114. package/dist/internal/passkey-native-write.mjs +330 -0
  115. package/dist/internal/passkey-native-write.mjs.map +1 -0
  116. package/dist/internal/passkey-native.d.mts +835 -0
  117. package/dist/internal/passkey-native.mjs +175 -0
  118. package/dist/internal/passkey-native.mjs.map +1 -0
  119. package/dist/internal/passkey-policy.mjs +115 -0
  120. package/dist/internal/passkey-policy.mjs.map +1 -0
  121. package/dist/internal/password-credentials.mjs +38 -9
  122. package/dist/internal/password-credentials.mjs.map +1 -1
  123. package/dist/internal/password-native.d.mts +14 -0
  124. package/dist/internal/password-native.mjs +292 -0
  125. package/dist/internal/password-native.mjs.map +1 -0
  126. package/dist/internal/password-policy.mjs +93 -0
  127. package/dist/internal/password-policy.mjs.map +1 -0
  128. package/dist/internal/password-registration-native.d.mts +22 -0
  129. package/dist/internal/password-registration-native.mjs +142 -0
  130. package/dist/internal/password-registration-native.mjs.map +1 -0
  131. package/dist/internal/persistence.d.mts +6 -19
  132. package/dist/internal/persistence.mjs +199 -166
  133. package/dist/internal/persistence.mjs.map +1 -1
  134. package/dist/internal/phone-composed.mjs +79 -0
  135. package/dist/internal/phone-composed.mjs.map +1 -0
  136. package/dist/internal/phone-native.d.mts +15 -0
  137. package/dist/internal/phone-native.mjs +354 -0
  138. package/dist/internal/phone-native.mjs.map +1 -0
  139. package/dist/internal/proof-native.d.mts +15 -0
  140. package/dist/internal/proof-native.mjs +289 -0
  141. package/dist/internal/proof-native.mjs.map +1 -0
  142. package/dist/internal/registration.mjs +50 -60
  143. package/dist/internal/registration.mjs.map +1 -1
  144. package/dist/internal/session-native-authority.d.mts +15 -0
  145. package/dist/internal/session-native-authority.mjs +91 -0
  146. package/dist/internal/session-native-authority.mjs.map +1 -0
  147. package/dist/internal/session-native-cleanup.d.mts +14 -0
  148. package/dist/internal/session-native-cleanup.mjs +48 -0
  149. package/dist/internal/session-native-cleanup.mjs.map +1 -0
  150. package/dist/internal/session-native-login.d.mts +15 -0
  151. package/dist/internal/session-native-login.mjs +87 -0
  152. package/dist/internal/session-native-login.mjs.map +1 -0
  153. package/dist/internal/session-native-pending-read.mjs +42 -0
  154. package/dist/internal/session-native-pending-read.mjs.map +1 -0
  155. package/dist/internal/session-native-pending.mjs +134 -0
  156. package/dist/internal/session-native-pending.mjs.map +1 -0
  157. package/dist/internal/session-native-record.mjs +79 -0
  158. package/dist/internal/session-native-record.mjs.map +1 -0
  159. package/dist/internal/session-native-state.mjs +130 -0
  160. package/dist/internal/session-native-state.mjs.map +1 -0
  161. package/dist/internal/session-native-stateful.d.mts +16 -0
  162. package/dist/internal/session-native-stateful.mjs +225 -0
  163. package/dist/internal/session-native-stateful.mjs.map +1 -0
  164. package/dist/internal/session-native-step-up.d.mts +15 -0
  165. package/dist/internal/session-native-step-up.mjs +212 -0
  166. package/dist/internal/session-native-step-up.mjs.map +1 -0
  167. package/dist/internal/session-native-validity.d.mts +15 -0
  168. package/dist/internal/session-native-validity.mjs +97 -0
  169. package/dist/internal/session-native-validity.mjs.map +1 -0
  170. package/dist/internal/session-policy.mjs +29 -0
  171. package/dist/internal/session-policy.mjs.map +1 -0
  172. package/dist/internal/sql-authority.d.mts +16 -0
  173. package/dist/internal/sql-authority.mjs +32 -0
  174. package/dist/internal/sql-authority.mjs.map +1 -0
  175. package/dist/internal/sql-change.mjs +21 -0
  176. package/dist/internal/sql-change.mjs.map +1 -0
  177. package/dist/internal/sql-cleanup.mjs +35 -0
  178. package/dist/internal/sql-cleanup.mjs.map +1 -0
  179. package/dist/internal/sql-commit.d.mts +72 -0
  180. package/dist/internal/sql-commit.mjs +176 -0
  181. package/dist/internal/sql-commit.mjs.map +1 -0
  182. package/dist/internal/sql-expression.d.mts +17 -0
  183. package/dist/internal/sql-expression.mjs +49 -0
  184. package/dist/internal/sql-expression.mjs.map +1 -0
  185. package/dist/internal/sql-oauth-connected-model.d.mts +7 -23
  186. package/dist/internal/sql-oauth-model.d.mts +27 -52
  187. package/dist/internal/sql-oauth-model.mjs +3 -4
  188. package/dist/internal/sql-oauth-model.mjs.map +1 -1
  189. package/dist/internal/sql-persistence.mjs +5 -9
  190. package/dist/internal/sql-persistence.mjs.map +1 -1
  191. package/dist/internal/sql-storage-validation.mjs +1 -2
  192. package/dist/internal/sql-storage-validation.mjs.map +1 -1
  193. package/dist/internal/sql-table.d.mts +3 -16
  194. package/dist/internal/sql-table.mjs +21 -42
  195. package/dist/internal/sql-table.mjs.map +1 -1
  196. package/dist/internal/standalone.mjs +2 -3
  197. package/dist/internal/standalone.mjs.map +1 -1
  198. package/dist/internal/step-up-state.mjs +5 -8
  199. package/dist/internal/step-up-state.mjs.map +1 -1
  200. package/dist/internal/storage-clock.mjs +44 -0
  201. package/dist/internal/storage-clock.mjs.map +1 -0
  202. package/dist/internal/storage-mapping.d.mts +11 -8
  203. package/dist/internal/storage-mapping.mjs +88 -302
  204. package/dist/internal/storage-mapping.mjs.map +1 -1
  205. package/dist/internal/storage-plans.mjs +15 -73
  206. package/dist/internal/storage-plans.mjs.map +1 -1
  207. package/dist/internal/storage-tables.d.mts +37 -520
  208. package/dist/internal/storage-tables.mjs +31 -211
  209. package/dist/internal/storage-tables.mjs.map +1 -1
  210. package/dist/internal/storage-validation.d.mts +1 -6
  211. package/dist/internal/storage-validation.mjs +1 -42
  212. package/dist/internal/storage-validation.mjs.map +1 -1
  213. package/dist/internal/table-model.d.mts +21 -0
  214. package/dist/internal/totp-native.d.mts +15 -0
  215. package/dist/internal/totp-native.mjs +401 -0
  216. package/dist/internal/totp-native.mjs.map +1 -0
  217. package/package.json +1 -1
  218. package/src/Adapter.ts +143 -199
  219. package/src/OAuthPersistence.ts +128 -271
  220. package/src/index.ts +1 -1
  221. package/src/internal/browser-login.ts +54 -24
  222. package/src/internal/configuration.ts +16 -31
  223. package/src/internal/d1-planning.ts +7 -0
  224. package/src/internal/email-native-state.ts +247 -0
  225. package/src/internal/email-native.ts +514 -0
  226. package/src/internal/email-policy.ts +235 -0
  227. package/src/internal/email-registration-native.ts +386 -0
  228. package/src/internal/models/email-model.ts +76 -214
  229. package/src/internal/models/oauth-connected-model.ts +50 -288
  230. package/src/internal/models/oauth-model.ts +147 -368
  231. package/src/internal/models/passkey-model.ts +11 -208
  232. package/src/internal/models/passkey-registration-ceremony-model.ts +6 -60
  233. package/src/internal/models/passkey-write-model.ts +14 -95
  234. package/src/internal/models/password-model.ts +26 -147
  235. package/src/internal/models/phone-model.ts +110 -0
  236. package/src/internal/models/proof-model.ts +48 -404
  237. package/src/internal/models/session-model.ts +102 -200
  238. package/src/internal/models/step-up-model.ts +17 -96
  239. package/src/internal/models/totp-model.ts +82 -0
  240. package/src/internal/native-sql-table.ts +32 -11
  241. package/src/internal/oauth/native-accounts.ts +576 -0
  242. package/src/internal/oauth/native-connected-state.ts +288 -0
  243. package/src/internal/oauth/native-connected.ts +888 -0
  244. package/src/internal/oauth/native-flow.ts +253 -0
  245. package/src/internal/oauth/native-layers.ts +83 -0
  246. package/src/internal/oauth/native-mutation.ts +222 -0
  247. package/src/internal/oauth/native-registration.ts +545 -0
  248. package/src/internal/oauth/native-revocations.ts +190 -0
  249. package/src/internal/oauth/native-sign-in.ts +111 -0
  250. package/src/internal/oauth/native-state.ts +346 -0
  251. package/src/internal/oauth/state.ts +2 -70
  252. package/src/internal/passkey-actions.ts +70 -0
  253. package/src/internal/passkey-inputs.ts +56 -0
  254. package/src/internal/passkey-managed.ts +360 -0
  255. package/src/internal/passkey-native-ceremony.ts +66 -0
  256. package/src/internal/passkey-native-flow.ts +140 -0
  257. package/src/internal/passkey-native-registration.ts +221 -0
  258. package/src/internal/passkey-native-state.ts +335 -0
  259. package/src/internal/passkey-native-write.ts +611 -0
  260. package/src/internal/passkey-native.ts +372 -0
  261. package/src/internal/passkey-policy.ts +246 -0
  262. package/src/internal/password-credentials.ts +52 -10
  263. package/src/internal/password-native.ts +571 -0
  264. package/src/internal/password-policy.ts +307 -0
  265. package/src/internal/password-registration-native.ts +322 -0
  266. package/src/internal/persistence.ts +336 -290
  267. package/src/internal/phone-composed.ts +86 -0
  268. package/src/internal/phone-native.ts +659 -0
  269. package/src/internal/proof-native.ts +448 -0
  270. package/src/internal/registration.ts +96 -143
  271. package/src/internal/session-native-authority.ts +247 -0
  272. package/src/internal/session-native-cleanup.ts +65 -0
  273. package/src/internal/session-native-login.ts +205 -0
  274. package/src/internal/session-native-pending-read.ts +68 -0
  275. package/src/internal/session-native-pending.ts +223 -0
  276. package/src/internal/session-native-record.ts +141 -0
  277. package/src/internal/session-native-state.ts +259 -0
  278. package/src/internal/session-native-stateful.ts +512 -0
  279. package/src/internal/session-native-step-up.ts +450 -0
  280. package/src/internal/session-native-validity.ts +208 -0
  281. package/src/internal/session-policy.ts +59 -0
  282. package/src/internal/sql-authority.ts +56 -0
  283. package/src/internal/sql-change.ts +38 -0
  284. package/src/internal/sql-cleanup.ts +56 -0
  285. package/src/internal/sql-commit.ts +435 -0
  286. package/src/internal/sql-expression.ts +94 -0
  287. package/src/internal/sql-metadata.ts +100 -0
  288. package/src/internal/sql-oauth-connected-model.ts +6 -95
  289. package/src/internal/sql-oauth-model.ts +31 -134
  290. package/src/internal/sql-persistence.ts +2 -6
  291. package/src/internal/sql-storage-validation.ts +1 -2
  292. package/src/internal/sql-table.ts +19 -52
  293. package/src/internal/standalone.ts +2 -11
  294. package/src/internal/step-up-state.ts +4 -17
  295. package/src/internal/storage-clock.ts +58 -0
  296. package/src/internal/storage-mapping.ts +125 -340
  297. package/src/internal/storage-plans.ts +14 -80
  298. package/src/internal/storage-tables.ts +28 -212
  299. package/src/internal/storage-validation.ts +0 -58
  300. package/src/internal/table-model.ts +24 -0
  301. package/src/internal/totp-native.ts +701 -0
  302. package/dist/internal/PasswordPreparedPostconditions.d.mts +0 -22
  303. package/dist/internal/PasswordPreparedPostconditions.mjs +0 -12
  304. package/dist/internal/PasswordPreparedPostconditions.mjs.map +0 -1
  305. package/dist/internal/authority-snapshot.mjs +0 -53
  306. package/dist/internal/authority-snapshot.mjs.map +0 -1
  307. package/dist/internal/email-kernel.d.mts +0 -276
  308. package/dist/internal/email-kernel.mjs +0 -497
  309. package/dist/internal/email-kernel.mjs.map +0 -1
  310. package/dist/internal/models/passkey-registration-ceremony-model.mjs +0 -18
  311. package/dist/internal/models/passkey-registration-ceremony-model.mjs.map +0 -1
  312. package/dist/internal/oauth/accounts.d.mts +0 -8
  313. package/dist/internal/oauth/accounts.mjs +0 -379
  314. package/dist/internal/oauth/accounts.mjs.map +0 -1
  315. package/dist/internal/oauth/connected-access.d.mts +0 -9
  316. package/dist/internal/oauth/connected-access.mjs +0 -229
  317. package/dist/internal/oauth/connected-access.mjs.map +0 -1
  318. package/dist/internal/oauth/connected-collection.d.mts +0 -7
  319. package/dist/internal/oauth/connected-collection.mjs +0 -214
  320. package/dist/internal/oauth/connected-collection.mjs.map +0 -1
  321. package/dist/internal/oauth/connected-custody.d.mts +0 -6
  322. package/dist/internal/oauth/connected-custody.mjs +0 -165
  323. package/dist/internal/oauth/connected-custody.mjs.map +0 -1
  324. package/dist/internal/oauth/connected-flow.d.mts +0 -7
  325. package/dist/internal/oauth/connected-flow.mjs +0 -324
  326. package/dist/internal/oauth/connected-flow.mjs.map +0 -1
  327. package/dist/internal/oauth/connected-input.mjs +0 -122
  328. package/dist/internal/oauth/connected-input.mjs.map +0 -1
  329. package/dist/internal/oauth/connected-keys.d.mts +0 -2
  330. package/dist/internal/oauth/connected-keys.mjs +0 -22
  331. package/dist/internal/oauth/connected-keys.mjs.map +0 -1
  332. package/dist/internal/oauth/connected-maintenance.d.mts +0 -9
  333. package/dist/internal/oauth/connected-maintenance.mjs +0 -226
  334. package/dist/internal/oauth/connected-maintenance.mjs.map +0 -1
  335. package/dist/internal/oauth/connected-management.d.mts +0 -9
  336. package/dist/internal/oauth/connected-management.mjs +0 -243
  337. package/dist/internal/oauth/connected-management.mjs.map +0 -1
  338. package/dist/internal/oauth/connected-reference.mjs +0 -63
  339. package/dist/internal/oauth/connected-reference.mjs.map +0 -1
  340. package/dist/internal/oauth/connected-settlement.d.mts +0 -8
  341. package/dist/internal/oauth/connected-settlement.mjs +0 -141
  342. package/dist/internal/oauth/connected-settlement.mjs.map +0 -1
  343. package/dist/internal/oauth/connected-sign-in.d.mts +0 -10
  344. package/dist/internal/oauth/connected-sign-in.mjs +0 -281
  345. package/dist/internal/oauth/connected-sign-in.mjs.map +0 -1
  346. package/dist/internal/oauth/connected-state.d.mts +0 -14
  347. package/dist/internal/oauth/connected-state.mjs +0 -469
  348. package/dist/internal/oauth/connected-state.mjs.map +0 -1
  349. package/dist/internal/oauth/connected-target.d.mts +0 -21
  350. package/dist/internal/oauth/connected-target.mjs +0 -117
  351. package/dist/internal/oauth/connected-target.mjs.map +0 -1
  352. package/dist/internal/oauth/flow.d.mts +0 -5
  353. package/dist/internal/oauth/flow.mjs +0 -279
  354. package/dist/internal/oauth/flow.mjs.map +0 -1
  355. package/dist/internal/oauth/input.mjs +0 -127
  356. package/dist/internal/oauth/input.mjs.map +0 -1
  357. package/dist/internal/oauth/owner.d.mts +0 -10
  358. package/dist/internal/oauth/owner.mjs +0 -10
  359. package/dist/internal/oauth/owner.mjs.map +0 -1
  360. package/dist/internal/oauth/query-compiler.d.mts +0 -7
  361. package/dist/internal/oauth/query-compiler.mjs +0 -9
  362. package/dist/internal/oauth/query-compiler.mjs.map +0 -1
  363. package/dist/internal/oauth/registration.d.mts +0 -7
  364. package/dist/internal/oauth/registration.mjs +0 -393
  365. package/dist/internal/oauth/registration.mjs.map +0 -1
  366. package/dist/internal/oauth/target.d.mts +0 -31
  367. package/dist/internal/oauth/target.mjs +0 -273
  368. package/dist/internal/oauth/target.mjs.map +0 -1
  369. package/dist/internal/oauth-kernel.d.mts +0 -1423
  370. package/dist/internal/oauth-kernel.mjs +0 -187
  371. package/dist/internal/oauth-kernel.mjs.map +0 -1
  372. package/dist/internal/passkey/admission.d.mts +0 -6
  373. package/dist/internal/passkey/admission.mjs +0 -220
  374. package/dist/internal/passkey/admission.mjs.map +0 -1
  375. package/dist/internal/passkey/credentials.d.mts +0 -14
  376. package/dist/internal/passkey/credentials.mjs +0 -249
  377. package/dist/internal/passkey/credentials.mjs.map +0 -1
  378. package/dist/internal/passkey/enrollment.mjs +0 -138
  379. package/dist/internal/passkey/enrollment.mjs.map +0 -1
  380. package/dist/internal/passkey/flow.d.mts +0 -21
  381. package/dist/internal/passkey/flow.mjs +0 -452
  382. package/dist/internal/passkey/flow.mjs.map +0 -1
  383. package/dist/internal/passkey/management.mjs +0 -231
  384. package/dist/internal/passkey/management.mjs.map +0 -1
  385. package/dist/internal/passkey/registration-ceremony.d.mts +0 -9
  386. package/dist/internal/passkey/registration-ceremony.mjs +0 -129
  387. package/dist/internal/passkey/registration-ceremony.mjs.map +0 -1
  388. package/dist/internal/passkey/registration-custody.d.mts +0 -2
  389. package/dist/internal/passkey/registration-custody.mjs +0 -52
  390. package/dist/internal/passkey/registration-custody.mjs.map +0 -1
  391. package/dist/internal/passkey/registration-write.mjs +0 -211
  392. package/dist/internal/passkey/registration-write.mjs.map +0 -1
  393. package/dist/internal/passkey/state.d.mts +0 -10
  394. package/dist/internal/passkey/state.mjs +0 -234
  395. package/dist/internal/passkey/state.mjs.map +0 -1
  396. package/dist/internal/passkey/target.d.mts +0 -20
  397. package/dist/internal/passkey/target.mjs +0 -200
  398. package/dist/internal/passkey/target.mjs.map +0 -1
  399. package/dist/internal/passkey/write-state.d.mts +0 -17
  400. package/dist/internal/passkey/write-state.mjs +0 -354
  401. package/dist/internal/passkey/write-state.mjs.map +0 -1
  402. package/dist/internal/passkey/write-target.mjs +0 -192
  403. package/dist/internal/passkey/write-target.mjs.map +0 -1
  404. package/dist/internal/passkey-kernel.d.mts +0 -6045
  405. package/dist/internal/passkey-kernel.mjs +0 -49
  406. package/dist/internal/passkey-kernel.mjs.map +0 -1
  407. package/dist/internal/passkeys.d.mts +0 -7
  408. package/dist/internal/passkeys.mjs +0 -387
  409. package/dist/internal/passkeys.mjs.map +0 -1
  410. package/dist/internal/password-credentials.d.mts +0 -11
  411. package/dist/internal/password-kernel.d.mts +0 -278
  412. package/dist/internal/password-kernel.mjs +0 -508
  413. package/dist/internal/password-kernel.mjs.map +0 -1
  414. package/dist/internal/phone-kernel.d.mts +0 -162
  415. package/dist/internal/phone-kernel.mjs +0 -437
  416. package/dist/internal/phone-kernel.mjs.map +0 -1
  417. package/dist/internal/proof-kernel.d.mts +0 -94
  418. package/dist/internal/proof-kernel.mjs +0 -624
  419. package/dist/internal/proof-kernel.mjs.map +0 -1
  420. package/dist/internal/query-operations.d.mts +0 -68
  421. package/dist/internal/session-kernel.d.mts +0 -62
  422. package/dist/internal/session-kernel.mjs +0 -820
  423. package/dist/internal/session-kernel.mjs.map +0 -1
  424. package/dist/internal/sql-oauth-connected-model.mjs +0 -7
  425. package/dist/internal/sql-oauth-connected-model.mjs.map +0 -1
  426. package/dist/internal/sql-query.d.mts +0 -12
  427. package/dist/internal/sql-query.mjs +0 -206
  428. package/dist/internal/sql-query.mjs.map +0 -1
  429. package/dist/internal/step-up-state.d.mts +0 -49
  430. package/dist/internal/transaction-execution-kernel.d.mts +0 -37
  431. package/dist/internal/transaction-execution-kernel.mjs +0 -120
  432. package/dist/internal/transaction-execution-kernel.mjs.map +0 -1
  433. package/dist/internal/transaction-kernel.d.mts +0 -81
  434. package/dist/internal/transaction-kernel.mjs +0 -264
  435. package/dist/internal/transaction-kernel.mjs.map +0 -1
  436. package/src/internal/PasswordPreparedPostconditions.ts +0 -30
  437. package/src/internal/authority-snapshot.ts +0 -91
  438. package/src/internal/email-kernel.ts +0 -1556
  439. package/src/internal/oauth/accounts.ts +0 -839
  440. package/src/internal/oauth/connected-access.ts +0 -388
  441. package/src/internal/oauth/connected-collection.ts +0 -345
  442. package/src/internal/oauth/connected-custody.ts +0 -308
  443. package/src/internal/oauth/connected-flow.ts +0 -562
  444. package/src/internal/oauth/connected-input.ts +0 -147
  445. package/src/internal/oauth/connected-keys.ts +0 -31
  446. package/src/internal/oauth/connected-maintenance.ts +0 -379
  447. package/src/internal/oauth/connected-management.ts +0 -391
  448. package/src/internal/oauth/connected-reference.ts +0 -135
  449. package/src/internal/oauth/connected-settlement.ts +0 -278
  450. package/src/internal/oauth/connected-sign-in.ts +0 -472
  451. package/src/internal/oauth/connected-state.ts +0 -924
  452. package/src/internal/oauth/connected-target.ts +0 -307
  453. package/src/internal/oauth/flow.ts +0 -505
  454. package/src/internal/oauth/input.ts +0 -201
  455. package/src/internal/oauth/owner.ts +0 -22
  456. package/src/internal/oauth/query-compiler.ts +0 -15
  457. package/src/internal/oauth/registration.ts +0 -676
  458. package/src/internal/oauth/target.ts +0 -803
  459. package/src/internal/oauth-kernel.ts +0 -294
  460. package/src/internal/passkey/admission.ts +0 -368
  461. package/src/internal/passkey/credentials.ts +0 -511
  462. package/src/internal/passkey/enrollment.ts +0 -326
  463. package/src/internal/passkey/flow.ts +0 -1062
  464. package/src/internal/passkey/management.ts +0 -426
  465. package/src/internal/passkey/registration-ceremony.ts +0 -283
  466. package/src/internal/passkey/registration-custody.ts +0 -91
  467. package/src/internal/passkey/registration-write.ts +0 -426
  468. package/src/internal/passkey/state.ts +0 -351
  469. package/src/internal/passkey/target.ts +0 -598
  470. package/src/internal/passkey/write-state.ts +0 -692
  471. package/src/internal/passkey/write-target.ts +0 -450
  472. package/src/internal/passkey-kernel.ts +0 -112
  473. package/src/internal/passkeys.ts +0 -652
  474. package/src/internal/password-kernel.ts +0 -1523
  475. package/src/internal/phone-kernel.ts +0 -872
  476. package/src/internal/proof-kernel.ts +0 -1992
  477. package/src/internal/query-operations.ts +0 -91
  478. package/src/internal/session-kernel.ts +0 -2406
  479. package/src/internal/sql-query.ts +0 -304
  480. package/src/internal/transaction-execution-kernel.ts +0 -335
  481. package/src/internal/transaction-kernel.ts +0 -603
@@ -1,1423 +0,0 @@
1
- import { NativeDatabase } from "./transaction-kernel.mjs";
2
- import { QueryOperations, SqlExpression, SqlFragment, TableModel } from "./query-operations.mjs";
3
- import { OAuthReferenceGuardDescriptor, OAuthRegistrationAuthority } from "./models/oauth-model.mjs";
4
- import { OAuthConnectedMapping } from "./models/oauth-connected-model.mjs";
5
- import { Mapping, Revocations } from "./oauth/connected-state.mjs";
6
- import { OAuthCoordinatorError, OAuthTargetConfiguration, oauthAccountsPersistenceLayer, oauthRegistrationAuthorityLayer, oauthRegistrationIntentsLayer, oauthSignInPersistenceLayer } from "./oauth/target.mjs";
7
- import "./sql-oauth-model.mjs";
8
- import { oauthConnectedPersistenceLayer, oauthConnectedRevocationsLayer } from "./oauth/connected-target.mjs";
9
- import { Effect } from "effect";
10
- import { SqlClient } from "effect/sql/SqlClient";
11
- //#region src/internal/oauth-kernel.d.ts
12
- export type OAuthKernel = ReturnType<typeof makeOAuthKernel>;
13
- /** Adapter composition root. Shared operation Layers acquire their dependencies;
14
- * database and transaction services are still resolved by each operation. */
15
- export declare const makeOAuthKernel: (operations: QueryOperations, dialect: (table: object) => "pg" | "sqlite" | "mysql") => {
16
- target: {
17
- makeTargetOAuthSignInServices: (mapping: any, configuration: OAuthTargetConfiguration) => Effect.Effect<{
18
- oauthSignInPersistence: {
19
- readonly issue: <A>(input: import("@yielded/auth/OAuth").OAuthPendingFlow, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthIssueDecision, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
20
- readonly claim: <A>(input: {
21
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
22
- readonly generation: number;
23
- readonly flowId: import("@yielded/auth/Operations").RequestBindingFlowId;
24
- readonly provider: import("@yielded/auth/OAuth").OAuthProviderKey;
25
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
26
- readonly stateDigest: import("@yielded/auth/Schema").TokenDigest;
27
- readonly requestBindingVerifier: import("@yielded/auth/Schema").TokenDigest;
28
- readonly requestBindingExpiresAtMillis: number;
29
- readonly responseIssuer?: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
30
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
31
- readonly nowMillis: number;
32
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthClaimDecision, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
33
- readonly settle: <A>(input: {
34
- readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
35
- readonly outcome: {
36
- readonly _tag: "Verified";
37
- readonly identity: import("@yielded/auth/OAuth").OAuthVerifiedExternalIdentity;
38
- } | {
39
- readonly _tag: "Cancelled" | "Rejected" | "Ambiguous";
40
- };
41
- readonly nowMillis: number;
42
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthSettlementDecision, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
43
- readonly cleanup: <A>(input: import("@yielded/auth/OAuth").OAuthCleanupInput, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
44
- readonly terminalized: number;
45
- readonly removed: number;
46
- readonly hasMore: boolean;
47
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
48
- };
49
- }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
50
- makeTargetOAuthRegistrationIntentServices: (mapping: any, configuration: OAuthTargetConfiguration) => Effect.Effect<{
51
- oauthRegistrationIntents: {
52
- readonly settle: <A>(input: {
53
- readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
54
- readonly identity: import("@yielded/auth/OAuth").OAuthVerifiedExternalIdentity;
55
- readonly intent?: import("@yielded/auth/OAuth").OAuthRegistrationIntent;
56
- readonly nowMillis: number;
57
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthRegistrationSettlement, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
58
- };
59
- }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
60
- makeTargetOAuthRegistrationServices: <Registration>(mapping: any, configuration: OAuthTargetConfiguration) => Effect.Effect<{
61
- registrationAuthority: OAuthRegistrationAuthority<Registration>;
62
- }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
63
- makeTargetOAuthAccountsServices: (mapping: any, configuration: OAuthTargetConfiguration) => Effect.Effect<{
64
- oauthAccountsPersistence: {
65
- readonly capture: (input: {
66
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
67
- readonly subjectId: import("@yielded/auth/Schema").SubjectId;
68
- }) => Effect.Effect<import("@yielded/auth/OAuth").OAuthAccountRevision | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
69
- readonly issue: <A>(input: {
70
- readonly flow: import("@yielded/auth/OAuth").OAuthLinkPendingFlow;
71
- readonly authorization: import("@yielded/auth/OAuth").OAuthActionAuthorization;
72
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
73
- readonly _tag: "Rejected";
74
- } | {
75
- readonly _tag: "Issued";
76
- readonly flow: {
77
- readonly context: {
78
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
79
- readonly protocol: "oauth" | "oidc";
80
- readonly configurationGeneration: number;
81
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
82
- readonly responseIssuerMode: "required" | "unsupported";
83
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
84
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
85
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
86
- readonly generation: number;
87
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
88
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
89
- readonly access?: {
90
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
91
- readonly generation: number;
92
- readonly issuance: "active" | "retired";
93
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
94
- readonly clientRegistrationId: string;
95
- readonly scopes: readonly string[];
96
- readonly resources: readonly string[];
97
- readonly retention: "access-and-refresh" | "access-only";
98
- readonly maximumAccessLifetimeMillis: number;
99
- readonly maximumRefreshLifetimeMillis?: number;
100
- readonly refreshAheadMillis: number;
101
- readonly refresh: "confidential" | "rotating" | "unsupported";
102
- readonly revocation: "cohort" | "unsupported";
103
- };
104
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
105
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
106
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
107
- readonly requestBindingExpiresAtMillis: number;
108
- readonly issuedAtMillis: number;
109
- readonly expiresAtMillis: number;
110
- readonly claimLifetimeMillis: number;
111
- readonly namespace: "effect-auth/oauth-link-context/v1";
112
- readonly revision: {
113
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
114
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
115
- readonly credentials: readonly {
116
- readonly credentialId: string;
117
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
118
- }[];
119
- };
120
- readonly maximumEvidenceAgeMillis: number;
121
- };
122
- readonly sealed: {
123
- readonly format: "oauth-xchacha20poly1305-v1";
124
- readonly keyId: string;
125
- readonly nonce: string;
126
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
127
- };
128
- readonly retentionUntilMillis: number;
129
- };
130
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
131
- readonly preflight: (input: import("@yielded/auth/OAuth").OAuthLinkAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthLinkPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
132
- readonly claim: <A>(input: {
133
- readonly access: import("@yielded/auth/OAuth").OAuthLinkAccess;
134
- readonly flow: import("@yielded/auth/OAuth").OAuthLinkPendingFlow;
135
- readonly claimId: import("@yielded/auth/OAuth").OAuthLinkClaim["claimId"];
136
- readonly authorization: import("@yielded/auth/OAuth").OAuthActionAuthorization;
137
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
138
- readonly _tag: "Rejected";
139
- } | {
140
- readonly _tag: "Claimed";
141
- readonly claim: {
142
- readonly flow: {
143
- readonly context: {
144
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
145
- readonly protocol: "oauth" | "oidc";
146
- readonly configurationGeneration: number;
147
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
148
- readonly responseIssuerMode: "required" | "unsupported";
149
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
150
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
151
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
152
- readonly generation: number;
153
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
154
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
155
- readonly access?: {
156
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
157
- readonly generation: number;
158
- readonly issuance: "active" | "retired";
159
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
160
- readonly clientRegistrationId: string;
161
- readonly scopes: readonly string[];
162
- readonly resources: readonly string[];
163
- readonly retention: "access-and-refresh" | "access-only";
164
- readonly maximumAccessLifetimeMillis: number;
165
- readonly maximumRefreshLifetimeMillis?: number;
166
- readonly refreshAheadMillis: number;
167
- readonly refresh: "confidential" | "rotating" | "unsupported";
168
- readonly revocation: "cohort" | "unsupported";
169
- };
170
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
171
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
172
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
173
- readonly requestBindingExpiresAtMillis: number;
174
- readonly issuedAtMillis: number;
175
- readonly expiresAtMillis: number;
176
- readonly claimLifetimeMillis: number;
177
- readonly namespace: "effect-auth/oauth-link-context/v1";
178
- readonly revision: {
179
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
180
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
181
- readonly credentials: readonly {
182
- readonly credentialId: string;
183
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
184
- }[];
185
- };
186
- readonly maximumEvidenceAgeMillis: number;
187
- };
188
- readonly sealed: {
189
- readonly format: "oauth-xchacha20poly1305-v1";
190
- readonly keyId: string;
191
- readonly nonce: string;
192
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
193
- };
194
- readonly retentionUntilMillis: number;
195
- };
196
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
197
- readonly claimedAtMillis: number;
198
- readonly claimExpiresAtMillis: number;
199
- };
200
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
201
- readonly settle: <A>(input: {
202
- readonly claim: import("@yielded/auth/OAuth").OAuthLinkClaim;
203
- readonly outcome: import("@yielded/auth/OAuth").OAuthLinkOutcome;
204
- readonly authorization: import("@yielded/auth/OAuth").OAuthActionAuthorization;
205
- readonly invalidation: import("@yielded/auth/Sessions").SessionInvalidationWindow;
206
- readonly nowMillis: number;
207
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
208
- readonly _tag: "Rejected";
209
- } | {
210
- readonly _tag: "Cancelled";
211
- } | {
212
- readonly _tag: "Ambiguous";
213
- } | {
214
- readonly _tag: "Conflict";
215
- } | {
216
- readonly _tag: "Linked";
217
- readonly credential: {
218
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
219
- readonly identity: {
220
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
221
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
222
- readonly subject: string;
223
- };
224
- readonly credentialId: string;
225
- readonly credentialRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
226
- readonly revision: {
227
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
228
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
229
- readonly credentials: readonly {
230
- readonly credentialId: string;
231
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
232
- }[];
233
- };
234
- };
235
- readonly changed: boolean;
236
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
237
- readonly inspectUnlink: (input: {
238
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
239
- readonly subjectId: import("@yielded/auth/Schema").SubjectId;
240
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
241
- readonly credentialId: string;
242
- }) => Effect.Effect<{
243
- readonly _tag: "Rejected";
244
- } | {
245
- readonly _tag: "Conflict";
246
- } | {
247
- readonly _tag: "Target";
248
- readonly credential: {
249
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
250
- readonly identity: {
251
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
252
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
253
- readonly subject: string;
254
- };
255
- readonly credentialId: string;
256
- readonly credentialRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
257
- readonly revision: {
258
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
259
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
260
- readonly credentials: readonly {
261
- readonly credentialId: string;
262
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
263
- }[];
264
- };
265
- };
266
- } | {
267
- readonly _tag: "Replay";
268
- readonly result: {
269
- readonly _tag: "Unlinked";
270
- readonly credentialId: string;
271
- readonly invalidation: {
272
- readonly trigger: "all-session-revocation" | "credential-change" | "factor-reset" | "identifier-change" | "password-reset" | "subject-delete" | "subject-disable";
273
- readonly existingSessions: "cache-expiry" | "immediate" | "original-absolute-expiry";
274
- readonly maximumExposureMillis: number;
275
- readonly oldAuthenticationEvidence: "rejected";
276
- };
277
- };
278
- }, import("@yielded/auth/OAuth").OAuthUnavailable>;
279
- readonly unlink: <A>(input: {
280
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
281
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
282
- readonly credential: import("@yielded/auth/OAuth").OAuthCredentialSnapshot;
283
- readonly authorization: import("@yielded/auth/OAuth").OAuthActionAuthorization;
284
- readonly invalidation: import("@yielded/auth/Sessions").SessionInvalidationWindow;
285
- readonly nowMillis: number;
286
- readonly retentionUntilMillis: number;
287
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
288
- readonly _tag: "Rejected";
289
- } | {
290
- readonly _tag: "Conflict";
291
- } | {
292
- readonly _tag: "Unlinked";
293
- readonly result: {
294
- readonly _tag: "Unlinked";
295
- readonly credentialId: string;
296
- readonly invalidation: {
297
- readonly trigger: "all-session-revocation" | "credential-change" | "factor-reset" | "identifier-change" | "password-reset" | "subject-delete" | "subject-disable";
298
- readonly existingSessions: "cache-expiry" | "immediate" | "original-absolute-expiry";
299
- readonly maximumExposureMillis: number;
300
- readonly oldAuthenticationEvidence: "rejected";
301
- };
302
- };
303
- readonly replayed: boolean;
304
- } | {
305
- readonly _tag: "LastSignInMethod";
306
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
307
- readonly cleanup: <A>(input: import("@yielded/auth/OAuth").OAuthCleanupInput, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
308
- readonly terminalized: number;
309
- readonly removed: number;
310
- readonly hasMore: boolean;
311
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
312
- };
313
- }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
314
- coordinateTargetOAuthRegistration: <Registration, Transaction, A, E, R>(database: any, mapping: any, configuration: OAuthTargetConfiguration, owner: (transaction: Transaction, services: {
315
- readonly registrationAuthority: OAuthRegistrationAuthority<Registration>;
316
- }, append: (statement: import("effect/sql/Statement").Statement<any>) => void) => Effect.Effect<A, E, R>) => Effect.Effect<A, OAuthCoordinatorError<E>, R | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
317
- coordinateTargetOAuthSignIn: <Transaction, A, E, R>(database: any, mapping: any, configuration: OAuthTargetConfiguration, owner: (transaction: Transaction, services: {
318
- readonly oauthSignInPersistence: import("@yielded/auth/OAuth").OAuthSignInPersistence["Service"];
319
- }, append: (statement: import("effect/sql/Statement").Statement<any>) => void) => Effect.Effect<A, E, R>) => Effect.Effect<A, OAuthCoordinatorError<E>, R | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
320
- coordinateTargetOAuthRegistrationIntents: <Transaction, A, E, R>(database: any, mapping: any, configuration: OAuthTargetConfiguration, owner: (transaction: Transaction, services: {
321
- readonly oauthRegistrationIntents: import("@yielded/auth/OAuth").OAuthRegistrationIntents["Service"];
322
- }, append: (statement: import("effect/sql/Statement").Statement<any>) => void) => Effect.Effect<A, E, R>) => Effect.Effect<A, OAuthCoordinatorError<E>, R | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
323
- coordinateTargetOAuthAccounts: <Transaction, A, E, R>(database: any, mapping: any, configuration: OAuthTargetConfiguration, owner: (transaction: Transaction, services: {
324
- readonly oauthAccountsPersistence: import("@yielded/auth/OAuth").OAuthAccountsPersistence["Service"];
325
- }, append: (statement: import("effect/sql/Statement").Statement<any>) => void) => Effect.Effect<A, E, R>) => Effect.Effect<A, OAuthCoordinatorError<E>, R | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
326
- sqlClientOAuthStandaloneGuard: (service: SqlClient["transactionService"] | undefined) => Effect.Effect<void, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
327
- oauthAccountsPersistenceLayer: typeof oauthAccountsPersistenceLayer;
328
- oauthSignInPersistenceLayer: typeof oauthSignInPersistenceLayer;
329
- oauthRegistrationIntentsLayer: typeof oauthRegistrationIntentsLayer;
330
- oauthRegistrationAuthorityLayer: typeof oauthRegistrationAuthorityLayer;
331
- };
332
- connectedTarget: {
333
- makeTargetOAuthConnectedServices: (mapping: Mapping, configuration: OAuthTargetConfiguration) => Effect.Effect<{
334
- oauthConnectedPersistence: {
335
- readonly claimSignIn: <A>(input: {
336
- readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
337
- readonly configuration: import("@yielded/auth/OAuth").OAuthConnectedConfiguration;
338
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthSignInAccessClaim, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
339
- readonly inspectSignIn: (input: {
340
- readonly reservation: import("@yielded/auth/OAuth").OAuthSignInAccessClaim;
341
- readonly credential: import("@yielded/auth/OAuth").OAuthCredentialSnapshot;
342
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
343
- }) => Effect.Effect<import("@yielded/auth/OAuth").OAuthSignInAccessInspection, import("@yielded/auth/OAuth").OAuthUnavailable>;
344
- readonly settleSignIn: <A>(input: {
345
- readonly reservation: import("@yielded/auth/OAuth").OAuthSignInAccessClaim;
346
- readonly outcome: import("@yielded/auth/OAuth").OAuthSignInAccessOutcome;
347
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
348
- readonly _tag: "Rejected";
349
- } | {
350
- readonly _tag: "Cancelled";
351
- } | {
352
- readonly _tag: "Ambiguous";
353
- } | {
354
- readonly _tag: "Connected";
355
- readonly grant: {
356
- readonly context: {
357
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
358
- readonly exchangeOrder: string;
359
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
360
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
361
- readonly identity: {
362
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
363
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
364
- readonly subject: string;
365
- };
366
- readonly configuration: {
367
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
368
- readonly protocol: "oauth" | "oidc";
369
- readonly configurationGeneration: number;
370
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
371
- readonly responseIssuerMode: "required" | "unsupported";
372
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
373
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
374
- readonly profile: {
375
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
376
- readonly generation: number;
377
- readonly issuance: "active" | "retired";
378
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
379
- readonly clientRegistrationId: string;
380
- readonly scopes: readonly string[];
381
- readonly resources: readonly string[];
382
- readonly retention: "access-and-refresh" | "access-only";
383
- readonly maximumAccessLifetimeMillis: number;
384
- readonly maximumRefreshLifetimeMillis?: number;
385
- readonly refreshAheadMillis: number;
386
- readonly refresh: "confidential" | "rotating" | "unsupported";
387
- readonly revocation: "cohort" | "unsupported";
388
- };
389
- };
390
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
391
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
392
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
393
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
394
- readonly metadata: {
395
- readonly scopes: readonly string[];
396
- readonly resources: readonly string[];
397
- readonly accessExpiresAtMillis?: number;
398
- readonly refreshExpiresAtMillis?: number;
399
- readonly useUntilMillis: number;
400
- readonly refreshUseUntilMillis?: number;
401
- readonly obtainedAtMillis: number;
402
- readonly profile?: {
403
- readonly displayName?: string;
404
- readonly handle?: string;
405
- readonly avatarUrl?: string;
406
- readonly profileUrl?: string;
407
- readonly email?: string;
408
- readonly emailVerified?: boolean;
409
- readonly providerData?: {
410
- readonly [x: string]: import("effect/Schema").Json;
411
- };
412
- };
413
- };
414
- };
415
- readonly sealed: {
416
- readonly format: "oauth-connected-xchacha20poly1305-v1";
417
- readonly keyId: string;
418
- readonly nonce: string;
419
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
420
- };
421
- };
422
- } | {
423
- readonly _tag: "Conflict";
424
- } | {
425
- readonly _tag: "Busy";
426
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
427
- readonly capture: (input: {
428
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
429
- readonly subjectId: import("@yielded/auth/Schema").SubjectId;
430
- readonly grantId?: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
431
- }) => Effect.Effect<{
432
- readonly revision: import("@yielded/auth/OAuth").OAuthAccountRevision;
433
- readonly target?: import("@yielded/auth/OAuth").OAuthConnectedTarget;
434
- } | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
435
- readonly issue: <A>(input: {
436
- readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
437
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedActionAuthorization;
438
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
439
- readonly _tag: "Rejected";
440
- } | {
441
- readonly _tag: "Issued";
442
- readonly flow: {
443
- readonly context: {
444
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
445
- readonly protocol: "oauth" | "oidc";
446
- readonly configurationGeneration: number;
447
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
448
- readonly responseIssuerMode: "required" | "unsupported";
449
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
450
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
451
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
452
- readonly generation: number;
453
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
454
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
455
- readonly access?: {
456
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
457
- readonly generation: number;
458
- readonly issuance: "active" | "retired";
459
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
460
- readonly clientRegistrationId: string;
461
- readonly scopes: readonly string[];
462
- readonly resources: readonly string[];
463
- readonly retention: "access-and-refresh" | "access-only";
464
- readonly maximumAccessLifetimeMillis: number;
465
- readonly maximumRefreshLifetimeMillis?: number;
466
- readonly refreshAheadMillis: number;
467
- readonly refresh: "confidential" | "rotating" | "unsupported";
468
- readonly revocation: "cohort" | "unsupported";
469
- };
470
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
471
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
472
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
473
- readonly requestBindingExpiresAtMillis: number;
474
- readonly issuedAtMillis: number;
475
- readonly expiresAtMillis: number;
476
- readonly claimLifetimeMillis: number;
477
- readonly namespace: "effect-auth/oauth-connected-context/v1";
478
- readonly revision: {
479
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
480
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
481
- readonly credentials: readonly {
482
- readonly credentialId: string;
483
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
484
- }[];
485
- };
486
- readonly profile: {
487
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
488
- readonly generation: number;
489
- readonly issuance: "active" | "retired";
490
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
491
- readonly clientRegistrationId: string;
492
- readonly scopes: readonly string[];
493
- readonly resources: readonly string[];
494
- readonly retention: "access-and-refresh" | "access-only";
495
- readonly maximumAccessLifetimeMillis: number;
496
- readonly maximumRefreshLifetimeMillis?: number;
497
- readonly refreshAheadMillis: number;
498
- readonly refresh: "confidential" | "rotating" | "unsupported";
499
- readonly revocation: "cohort" | "unsupported";
500
- };
501
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
502
- readonly reconnect?: {
503
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
504
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
505
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
506
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
507
- readonly identity: {
508
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
509
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
510
- readonly subject: string;
511
- };
512
- readonly configuration: {
513
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
514
- readonly protocol: "oauth" | "oidc";
515
- readonly configurationGeneration: number;
516
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
517
- readonly responseIssuerMode: "required" | "unsupported";
518
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
519
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
520
- readonly profile: {
521
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
522
- readonly generation: number;
523
- readonly issuance: "active" | "retired";
524
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
525
- readonly clientRegistrationId: string;
526
- readonly scopes: readonly string[];
527
- readonly resources: readonly string[];
528
- readonly retention: "access-and-refresh" | "access-only";
529
- readonly maximumAccessLifetimeMillis: number;
530
- readonly maximumRefreshLifetimeMillis?: number;
531
- readonly refreshAheadMillis: number;
532
- readonly refresh: "confidential" | "rotating" | "unsupported";
533
- readonly revocation: "cohort" | "unsupported";
534
- };
535
- };
536
- };
537
- readonly maximumEvidenceAgeMillis: number;
538
- };
539
- readonly sealed: {
540
- readonly format: "oauth-xchacha20poly1305-v1";
541
- readonly keyId: string;
542
- readonly nonce: string;
543
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
544
- };
545
- readonly retentionUntilMillis: number;
546
- };
547
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
548
- readonly prepare: <A>(input: {
549
- readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
550
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
551
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
552
- readonly _tag: "Rejected";
553
- } | {
554
- readonly _tag: "Issued";
555
- readonly flow: {
556
- readonly context: {
557
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
558
- readonly protocol: "oauth" | "oidc";
559
- readonly configurationGeneration: number;
560
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
561
- readonly responseIssuerMode: "required" | "unsupported";
562
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
563
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
564
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
565
- readonly generation: number;
566
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
567
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
568
- readonly access?: {
569
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
570
- readonly generation: number;
571
- readonly issuance: "active" | "retired";
572
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
573
- readonly clientRegistrationId: string;
574
- readonly scopes: readonly string[];
575
- readonly resources: readonly string[];
576
- readonly retention: "access-and-refresh" | "access-only";
577
- readonly maximumAccessLifetimeMillis: number;
578
- readonly maximumRefreshLifetimeMillis?: number;
579
- readonly refreshAheadMillis: number;
580
- readonly refresh: "confidential" | "rotating" | "unsupported";
581
- readonly revocation: "cohort" | "unsupported";
582
- };
583
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
584
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
585
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
586
- readonly requestBindingExpiresAtMillis: number;
587
- readonly issuedAtMillis: number;
588
- readonly expiresAtMillis: number;
589
- readonly claimLifetimeMillis: number;
590
- readonly namespace: "effect-auth/oauth-connected-context/v1";
591
- readonly revision: {
592
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
593
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
594
- readonly credentials: readonly {
595
- readonly credentialId: string;
596
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
597
- }[];
598
- };
599
- readonly profile: {
600
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
601
- readonly generation: number;
602
- readonly issuance: "active" | "retired";
603
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
604
- readonly clientRegistrationId: string;
605
- readonly scopes: readonly string[];
606
- readonly resources: readonly string[];
607
- readonly retention: "access-and-refresh" | "access-only";
608
- readonly maximumAccessLifetimeMillis: number;
609
- readonly maximumRefreshLifetimeMillis?: number;
610
- readonly refreshAheadMillis: number;
611
- readonly refresh: "confidential" | "rotating" | "unsupported";
612
- readonly revocation: "cohort" | "unsupported";
613
- };
614
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
615
- readonly reconnect?: {
616
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
617
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
618
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
619
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
620
- readonly identity: {
621
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
622
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
623
- readonly subject: string;
624
- };
625
- readonly configuration: {
626
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
627
- readonly protocol: "oauth" | "oidc";
628
- readonly configurationGeneration: number;
629
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
630
- readonly responseIssuerMode: "required" | "unsupported";
631
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
632
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
633
- readonly profile: {
634
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
635
- readonly generation: number;
636
- readonly issuance: "active" | "retired";
637
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
638
- readonly clientRegistrationId: string;
639
- readonly scopes: readonly string[];
640
- readonly resources: readonly string[];
641
- readonly retention: "access-and-refresh" | "access-only";
642
- readonly maximumAccessLifetimeMillis: number;
643
- readonly maximumRefreshLifetimeMillis?: number;
644
- readonly refreshAheadMillis: number;
645
- readonly refresh: "confidential" | "rotating" | "unsupported";
646
- readonly revocation: "cohort" | "unsupported";
647
- };
648
- };
649
- };
650
- readonly maximumEvidenceAgeMillis: number;
651
- };
652
- readonly sealed: {
653
- readonly format: "oauth-xchacha20poly1305-v1";
654
- readonly keyId: string;
655
- readonly nonce: string;
656
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
657
- };
658
- readonly retentionUntilMillis: number;
659
- };
660
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
661
- readonly inspectPrepared: (input: import("@yielded/auth/OAuth").OAuthConnectedPreparedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
662
- readonly preflight: (input: import("@yielded/auth/OAuth").OAuthConnectedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
663
- readonly claim: <A>(input: {
664
- readonly access: import("@yielded/auth/OAuth").OAuthConnectedAccess;
665
- readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
666
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
667
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedActionAuthorization;
668
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
669
- readonly _tag: "Rejected";
670
- } | {
671
- readonly _tag: "Claimed";
672
- readonly claim: {
673
- readonly flow: {
674
- readonly context: {
675
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
676
- readonly protocol: "oauth" | "oidc";
677
- readonly configurationGeneration: number;
678
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
679
- readonly responseIssuerMode: "required" | "unsupported";
680
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
681
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
682
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
683
- readonly generation: number;
684
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
685
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
686
- readonly access?: {
687
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
688
- readonly generation: number;
689
- readonly issuance: "active" | "retired";
690
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
691
- readonly clientRegistrationId: string;
692
- readonly scopes: readonly string[];
693
- readonly resources: readonly string[];
694
- readonly retention: "access-and-refresh" | "access-only";
695
- readonly maximumAccessLifetimeMillis: number;
696
- readonly maximumRefreshLifetimeMillis?: number;
697
- readonly refreshAheadMillis: number;
698
- readonly refresh: "confidential" | "rotating" | "unsupported";
699
- readonly revocation: "cohort" | "unsupported";
700
- };
701
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
702
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
703
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
704
- readonly requestBindingExpiresAtMillis: number;
705
- readonly issuedAtMillis: number;
706
- readonly expiresAtMillis: number;
707
- readonly claimLifetimeMillis: number;
708
- readonly namespace: "effect-auth/oauth-connected-context/v1";
709
- readonly revision: {
710
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
711
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
712
- readonly credentials: readonly {
713
- readonly credentialId: string;
714
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
715
- }[];
716
- };
717
- readonly profile: {
718
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
719
- readonly generation: number;
720
- readonly issuance: "active" | "retired";
721
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
722
- readonly clientRegistrationId: string;
723
- readonly scopes: readonly string[];
724
- readonly resources: readonly string[];
725
- readonly retention: "access-and-refresh" | "access-only";
726
- readonly maximumAccessLifetimeMillis: number;
727
- readonly maximumRefreshLifetimeMillis?: number;
728
- readonly refreshAheadMillis: number;
729
- readonly refresh: "confidential" | "rotating" | "unsupported";
730
- readonly revocation: "cohort" | "unsupported";
731
- };
732
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
733
- readonly reconnect?: {
734
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
735
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
736
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
737
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
738
- readonly identity: {
739
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
740
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
741
- readonly subject: string;
742
- };
743
- readonly configuration: {
744
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
745
- readonly protocol: "oauth" | "oidc";
746
- readonly configurationGeneration: number;
747
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
748
- readonly responseIssuerMode: "required" | "unsupported";
749
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
750
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
751
- readonly profile: {
752
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
753
- readonly generation: number;
754
- readonly issuance: "active" | "retired";
755
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
756
- readonly clientRegistrationId: string;
757
- readonly scopes: readonly string[];
758
- readonly resources: readonly string[];
759
- readonly retention: "access-and-refresh" | "access-only";
760
- readonly maximumAccessLifetimeMillis: number;
761
- readonly maximumRefreshLifetimeMillis?: number;
762
- readonly refreshAheadMillis: number;
763
- readonly refresh: "confidential" | "rotating" | "unsupported";
764
- readonly revocation: "cohort" | "unsupported";
765
- };
766
- };
767
- };
768
- readonly maximumEvidenceAgeMillis: number;
769
- };
770
- readonly sealed: {
771
- readonly format: "oauth-xchacha20poly1305-v1";
772
- readonly keyId: string;
773
- readonly nonce: string;
774
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
775
- };
776
- readonly retentionUntilMillis: number;
777
- };
778
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
779
- readonly claimedAtMillis: number;
780
- readonly claimExpiresAtMillis: number;
781
- readonly order: string;
782
- };
783
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
784
- readonly inspectGrant: (input: {
785
- readonly claim: import("@yielded/auth/OAuth").OAuthConnectedClaim;
786
- readonly identity: {
787
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
788
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
789
- readonly subject: string;
790
- };
791
- }) => Effect.Effect<{
792
- readonly _tag: "Rejected";
793
- } | {
794
- readonly _tag: "Conflict";
795
- } | {
796
- readonly _tag: "Target";
797
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
798
- } | {
799
- readonly _tag: "Quarantine";
800
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
801
- }, import("@yielded/auth/OAuth").OAuthUnavailable>;
802
- readonly settle: <A>(input: {
803
- readonly claim: import("@yielded/auth/OAuth").OAuthConnectedClaim;
804
- readonly outcome: import("@yielded/auth/OAuth").OAuthConnectedOutcome;
805
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedActionAuthorization;
806
- readonly nowMillis: number;
807
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
808
- readonly _tag: "Rejected";
809
- } | {
810
- readonly _tag: "Cancelled";
811
- } | {
812
- readonly _tag: "Ambiguous";
813
- } | {
814
- readonly _tag: "Connected";
815
- readonly grant: {
816
- readonly context: {
817
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
818
- readonly exchangeOrder: string;
819
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
820
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
821
- readonly identity: {
822
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
823
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
824
- readonly subject: string;
825
- };
826
- readonly configuration: {
827
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
828
- readonly protocol: "oauth" | "oidc";
829
- readonly configurationGeneration: number;
830
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
831
- readonly responseIssuerMode: "required" | "unsupported";
832
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
833
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
834
- readonly profile: {
835
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
836
- readonly generation: number;
837
- readonly issuance: "active" | "retired";
838
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
839
- readonly clientRegistrationId: string;
840
- readonly scopes: readonly string[];
841
- readonly resources: readonly string[];
842
- readonly retention: "access-and-refresh" | "access-only";
843
- readonly maximumAccessLifetimeMillis: number;
844
- readonly maximumRefreshLifetimeMillis?: number;
845
- readonly refreshAheadMillis: number;
846
- readonly refresh: "confidential" | "rotating" | "unsupported";
847
- readonly revocation: "cohort" | "unsupported";
848
- };
849
- };
850
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
851
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
852
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
853
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
854
- readonly metadata: {
855
- readonly scopes: readonly string[];
856
- readonly resources: readonly string[];
857
- readonly accessExpiresAtMillis?: number;
858
- readonly refreshExpiresAtMillis?: number;
859
- readonly useUntilMillis: number;
860
- readonly refreshUseUntilMillis?: number;
861
- readonly obtainedAtMillis: number;
862
- readonly profile?: {
863
- readonly displayName?: string;
864
- readonly handle?: string;
865
- readonly avatarUrl?: string;
866
- readonly profileUrl?: string;
867
- readonly email?: string;
868
- readonly emailVerified?: boolean;
869
- readonly providerData?: {
870
- readonly [x: string]: import("effect/Schema").Json;
871
- };
872
- };
873
- };
874
- };
875
- readonly sealed: {
876
- readonly format: "oauth-connected-xchacha20poly1305-v1";
877
- readonly keyId: string;
878
- readonly nonce: string;
879
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
880
- };
881
- };
882
- } | {
883
- readonly _tag: "Conflict";
884
- } | {
885
- readonly _tag: "Busy";
886
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
887
- readonly list: (input: {
888
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
889
- readonly limit: number;
890
- readonly cursor?: string;
891
- }) => Effect.Effect<{
892
- readonly items: readonly {
893
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
894
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
895
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
896
- readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
897
- readonly status: "Active" | "Disconnected" | "ReauthorizationRequired" | "Refreshing";
898
- readonly scopes: readonly string[];
899
- readonly accessExpiresAtMillis?: number;
900
- readonly useUntilMillis: number;
901
- readonly profile?: {
902
- readonly displayName?: string;
903
- readonly handle?: string;
904
- readonly avatarUrl?: string;
905
- readonly profileUrl?: string;
906
- readonly email?: string;
907
- readonly emailVerified?: boolean;
908
- readonly providerData?: {
909
- readonly [x: string]: import("effect/Schema").Json;
910
- };
911
- };
912
- readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
913
- }[];
914
- readonly cursor?: string;
915
- }, import("@yielded/auth/OAuth").OAuthUnavailable>;
916
- readonly inspectDisconnect: (input: {
917
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
918
- readonly subjectId: import("@yielded/auth/Schema").SubjectId;
919
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
920
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
921
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
922
- }) => Effect.Effect<{
923
- readonly _tag: "Rejected";
924
- } | {
925
- readonly _tag: "Conflict";
926
- } | {
927
- readonly _tag: "Target";
928
- readonly grant: {
929
- readonly context: {
930
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
931
- readonly exchangeOrder: string;
932
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
933
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
934
- readonly identity: {
935
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
936
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
937
- readonly subject: string;
938
- };
939
- readonly configuration: {
940
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
941
- readonly protocol: "oauth" | "oidc";
942
- readonly configurationGeneration: number;
943
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
944
- readonly responseIssuerMode: "required" | "unsupported";
945
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
946
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
947
- readonly profile: {
948
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
949
- readonly generation: number;
950
- readonly issuance: "active" | "retired";
951
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
952
- readonly clientRegistrationId: string;
953
- readonly scopes: readonly string[];
954
- readonly resources: readonly string[];
955
- readonly retention: "access-and-refresh" | "access-only";
956
- readonly maximumAccessLifetimeMillis: number;
957
- readonly maximumRefreshLifetimeMillis?: number;
958
- readonly refreshAheadMillis: number;
959
- readonly refresh: "confidential" | "rotating" | "unsupported";
960
- readonly revocation: "cohort" | "unsupported";
961
- };
962
- };
963
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
964
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
965
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
966
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
967
- readonly metadata: {
968
- readonly scopes: readonly string[];
969
- readonly resources: readonly string[];
970
- readonly accessExpiresAtMillis?: number;
971
- readonly refreshExpiresAtMillis?: number;
972
- readonly useUntilMillis: number;
973
- readonly refreshUseUntilMillis?: number;
974
- readonly obtainedAtMillis: number;
975
- readonly profile?: {
976
- readonly displayName?: string;
977
- readonly handle?: string;
978
- readonly avatarUrl?: string;
979
- readonly profileUrl?: string;
980
- readonly email?: string;
981
- readonly emailVerified?: boolean;
982
- readonly providerData?: {
983
- readonly [x: string]: import("effect/Schema").Json;
984
- };
985
- };
986
- };
987
- };
988
- readonly sealed?: {
989
- readonly format: "oauth-connected-xchacha20poly1305-v1";
990
- readonly keyId: string;
991
- readonly nonce: string;
992
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
993
- };
994
- };
995
- readonly revision: {
996
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
997
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
998
- readonly credentials: readonly {
999
- readonly credentialId: string;
1000
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1001
- }[];
1002
- };
1003
- } | {
1004
- readonly _tag: "Replay";
1005
- readonly result: {
1006
- readonly _tag: "Disconnected";
1007
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1008
- readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1009
- readonly affectedGrantCount: number;
1010
- readonly replayed: boolean;
1011
- };
1012
- }, import("@yielded/auth/OAuth").OAuthUnavailable>;
1013
- readonly disconnect: <A>(input: {
1014
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1015
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
1016
- readonly grant: import("@yielded/auth/OAuth").OAuthConnectedDisconnectGrant;
1017
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedActionAuthorization;
1018
- readonly revocation?: import("@yielded/auth/OAuth").OAuthConnectedRevocationJob;
1019
- readonly retentionUntilMillis: number;
1020
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1021
- readonly _tag: "Disconnected";
1022
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1023
- readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1024
- readonly affectedGrantCount: number;
1025
- readonly replayed: boolean;
1026
- } | {
1027
- readonly _tag: "Rejected";
1028
- } | {
1029
- readonly _tag: "Conflict";
1030
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1031
- readonly inspectAccess: (input: {
1032
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
1033
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1034
- readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1035
- }) => Effect.Effect<{
1036
- readonly _tag: "Rejected";
1037
- } | {
1038
- readonly _tag: "Busy";
1039
- } | {
1040
- readonly _tag: "Target";
1041
- readonly grant: {
1042
- readonly context: {
1043
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1044
- readonly exchangeOrder: string;
1045
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1046
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1047
- readonly identity: {
1048
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1049
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1050
- readonly subject: string;
1051
- };
1052
- readonly configuration: {
1053
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1054
- readonly protocol: "oauth" | "oidc";
1055
- readonly configurationGeneration: number;
1056
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1057
- readonly responseIssuerMode: "required" | "unsupported";
1058
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1059
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1060
- readonly profile: {
1061
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1062
- readonly generation: number;
1063
- readonly issuance: "active" | "retired";
1064
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1065
- readonly clientRegistrationId: string;
1066
- readonly scopes: readonly string[];
1067
- readonly resources: readonly string[];
1068
- readonly retention: "access-and-refresh" | "access-only";
1069
- readonly maximumAccessLifetimeMillis: number;
1070
- readonly maximumRefreshLifetimeMillis?: number;
1071
- readonly refreshAheadMillis: number;
1072
- readonly refresh: "confidential" | "rotating" | "unsupported";
1073
- readonly revocation: "cohort" | "unsupported";
1074
- };
1075
- };
1076
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1077
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1078
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1079
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1080
- readonly metadata: {
1081
- readonly scopes: readonly string[];
1082
- readonly resources: readonly string[];
1083
- readonly accessExpiresAtMillis?: number;
1084
- readonly refreshExpiresAtMillis?: number;
1085
- readonly useUntilMillis: number;
1086
- readonly refreshUseUntilMillis?: number;
1087
- readonly obtainedAtMillis: number;
1088
- readonly profile?: {
1089
- readonly displayName?: string;
1090
- readonly handle?: string;
1091
- readonly avatarUrl?: string;
1092
- readonly profileUrl?: string;
1093
- readonly email?: string;
1094
- readonly emailVerified?: boolean;
1095
- readonly providerData?: {
1096
- readonly [x: string]: import("effect/Schema").Json;
1097
- };
1098
- };
1099
- };
1100
- };
1101
- readonly sealed: {
1102
- readonly format: "oauth-connected-xchacha20poly1305-v1";
1103
- readonly keyId: string;
1104
- readonly nonce: string;
1105
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
1106
- };
1107
- };
1108
- } | {
1109
- readonly _tag: "ReauthorizationRequired";
1110
- }, import("@yielded/auth/OAuth").OAuthUnavailable>;
1111
- readonly claimRefresh: <A>(input: {
1112
- readonly grant: import("@yielded/auth/OAuth").OAuthConnectedStoredGrant;
1113
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
1114
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1115
- readonly nextTokenVersion: import("@yielded/auth/OAuth").OAuthConnectedRefreshClaim["nextTokenVersion"];
1116
- readonly lifetimeMillis: number;
1117
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1118
- readonly _tag: "Rejected";
1119
- } | {
1120
- readonly _tag: "Busy";
1121
- } | {
1122
- readonly _tag: "ReauthorizationRequired";
1123
- } | {
1124
- readonly _tag: "Claimed";
1125
- readonly claim: {
1126
- readonly grant: {
1127
- readonly context: {
1128
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1129
- readonly exchangeOrder: string;
1130
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1131
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1132
- readonly identity: {
1133
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1134
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1135
- readonly subject: string;
1136
- };
1137
- readonly configuration: {
1138
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1139
- readonly protocol: "oauth" | "oidc";
1140
- readonly configurationGeneration: number;
1141
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1142
- readonly responseIssuerMode: "required" | "unsupported";
1143
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1144
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1145
- readonly profile: {
1146
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1147
- readonly generation: number;
1148
- readonly issuance: "active" | "retired";
1149
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1150
- readonly clientRegistrationId: string;
1151
- readonly scopes: readonly string[];
1152
- readonly resources: readonly string[];
1153
- readonly retention: "access-and-refresh" | "access-only";
1154
- readonly maximumAccessLifetimeMillis: number;
1155
- readonly maximumRefreshLifetimeMillis?: number;
1156
- readonly refreshAheadMillis: number;
1157
- readonly refresh: "confidential" | "rotating" | "unsupported";
1158
- readonly revocation: "cohort" | "unsupported";
1159
- };
1160
- };
1161
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1162
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1163
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1164
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1165
- readonly metadata: {
1166
- readonly scopes: readonly string[];
1167
- readonly resources: readonly string[];
1168
- readonly accessExpiresAtMillis?: number;
1169
- readonly refreshExpiresAtMillis?: number;
1170
- readonly useUntilMillis: number;
1171
- readonly refreshUseUntilMillis?: number;
1172
- readonly obtainedAtMillis: number;
1173
- readonly profile?: {
1174
- readonly displayName?: string;
1175
- readonly handle?: string;
1176
- readonly avatarUrl?: string;
1177
- readonly profileUrl?: string;
1178
- readonly email?: string;
1179
- readonly emailVerified?: boolean;
1180
- readonly providerData?: {
1181
- readonly [x: string]: import("effect/Schema").Json;
1182
- };
1183
- };
1184
- };
1185
- };
1186
- readonly sealed: {
1187
- readonly format: "oauth-connected-xchacha20poly1305-v1";
1188
- readonly keyId: string;
1189
- readonly nonce: string;
1190
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
1191
- };
1192
- };
1193
- readonly order: string;
1194
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1195
- readonly claimedAtMillis: number;
1196
- readonly claimExpiresAtMillis: number;
1197
- readonly nextTokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1198
- };
1199
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1200
- readonly settleRefresh: <A>(input: {
1201
- readonly claim: import("@yielded/auth/OAuth").OAuthConnectedRefreshClaim;
1202
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
1203
- readonly outcome: import("@yielded/auth/OAuth").OAuthConnectedRefreshOutcome;
1204
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1205
- readonly _tag: "Rejected";
1206
- } | {
1207
- readonly _tag: "ReauthorizationRequired";
1208
- } | {
1209
- readonly _tag: "Refreshed";
1210
- readonly grant: {
1211
- readonly context: {
1212
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1213
- readonly exchangeOrder: string;
1214
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1215
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1216
- readonly identity: {
1217
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1218
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1219
- readonly subject: string;
1220
- };
1221
- readonly configuration: {
1222
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1223
- readonly protocol: "oauth" | "oidc";
1224
- readonly configurationGeneration: number;
1225
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1226
- readonly responseIssuerMode: "required" | "unsupported";
1227
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1228
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1229
- readonly profile: {
1230
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1231
- readonly generation: number;
1232
- readonly issuance: "active" | "retired";
1233
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1234
- readonly clientRegistrationId: string;
1235
- readonly scopes: readonly string[];
1236
- readonly resources: readonly string[];
1237
- readonly retention: "access-and-refresh" | "access-only";
1238
- readonly maximumAccessLifetimeMillis: number;
1239
- readonly maximumRefreshLifetimeMillis?: number;
1240
- readonly refreshAheadMillis: number;
1241
- readonly refresh: "confidential" | "rotating" | "unsupported";
1242
- readonly revocation: "cohort" | "unsupported";
1243
- };
1244
- };
1245
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1246
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1247
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1248
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1249
- readonly metadata: {
1250
- readonly scopes: readonly string[];
1251
- readonly resources: readonly string[];
1252
- readonly accessExpiresAtMillis?: number;
1253
- readonly refreshExpiresAtMillis?: number;
1254
- readonly useUntilMillis: number;
1255
- readonly refreshUseUntilMillis?: number;
1256
- readonly obtainedAtMillis: number;
1257
- readonly profile?: {
1258
- readonly displayName?: string;
1259
- readonly handle?: string;
1260
- readonly avatarUrl?: string;
1261
- readonly profileUrl?: string;
1262
- readonly email?: string;
1263
- readonly emailVerified?: boolean;
1264
- readonly providerData?: {
1265
- readonly [x: string]: import("effect/Schema").Json;
1266
- };
1267
- };
1268
- };
1269
- };
1270
- readonly sealed: {
1271
- readonly format: "oauth-connected-xchacha20poly1305-v1";
1272
- readonly keyId: string;
1273
- readonly nonce: string;
1274
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
1275
- };
1276
- };
1277
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1278
- readonly admitUse: <A>(input: {
1279
- readonly grant: import("@yielded/auth/OAuth").OAuthConnectedStoredGrant;
1280
- readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
1281
- readonly admissionId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1282
- readonly lifetimeMillis: number;
1283
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1284
- readonly _tag: "Rejected";
1285
- } | {
1286
- readonly _tag: "Busy";
1287
- } | {
1288
- readonly _tag: "ReauthorizationRequired";
1289
- } | {
1290
- readonly _tag: "Admitted";
1291
- readonly admissionId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1292
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1293
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1294
- readonly admittedAtMillis: number;
1295
- readonly expiresAtMillis: number;
1296
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1297
- readonly cleanup: <A>(input: import("@yielded/auth/OAuth").OAuthCleanupInput, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1298
- readonly terminalized: number;
1299
- readonly removed: number;
1300
- readonly hasMore: boolean;
1301
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
1302
- };
1303
- }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
1304
- makeTargetOAuthConnectedRevocationServices: (mapping: Revocations, configuration: OAuthTargetConfiguration) => Effect.Effect<{
1305
- oauthConnectedRevocations: {
1306
- readonly claim: <A>(input: {
1307
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1308
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1309
- readonly lifetimeMillis: number;
1310
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1311
- readonly _tag: "Claimed";
1312
- readonly claim: {
1313
- readonly job: {
1314
- readonly context: {
1315
- readonly namespace: "effect-auth/oauth-connected-revocation-context/v1";
1316
- readonly jobId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1317
- readonly token: {
1318
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1319
- readonly exchangeOrder: string;
1320
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1321
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1322
- readonly identity: {
1323
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1324
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1325
- readonly subject: string;
1326
- };
1327
- readonly configuration: {
1328
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1329
- readonly protocol: "oauth" | "oidc";
1330
- readonly configurationGeneration: number;
1331
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1332
- readonly responseIssuerMode: "required" | "unsupported";
1333
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1334
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1335
- readonly profile: {
1336
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1337
- readonly generation: number;
1338
- readonly issuance: "active" | "retired";
1339
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1340
- readonly clientRegistrationId: string;
1341
- readonly scopes: readonly string[];
1342
- readonly resources: readonly string[];
1343
- readonly retention: "access-and-refresh" | "access-only";
1344
- readonly maximumAccessLifetimeMillis: number;
1345
- readonly maximumRefreshLifetimeMillis?: number;
1346
- readonly refreshAheadMillis: number;
1347
- readonly refresh: "confidential" | "rotating" | "unsupported";
1348
- readonly revocation: "cohort" | "unsupported";
1349
- };
1350
- };
1351
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1352
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1353
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1354
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1355
- readonly metadata: {
1356
- readonly scopes: readonly string[];
1357
- readonly resources: readonly string[];
1358
- readonly accessExpiresAtMillis?: number;
1359
- readonly refreshExpiresAtMillis?: number;
1360
- readonly useUntilMillis: number;
1361
- readonly refreshUseUntilMillis?: number;
1362
- readonly obtainedAtMillis: number;
1363
- readonly profile?: {
1364
- readonly displayName?: string;
1365
- readonly handle?: string;
1366
- readonly avatarUrl?: string;
1367
- readonly profileUrl?: string;
1368
- readonly email?: string;
1369
- readonly emailVerified?: boolean;
1370
- readonly providerData?: {
1371
- readonly [x: string]: import("effect/Schema").Json;
1372
- };
1373
- };
1374
- };
1375
- };
1376
- };
1377
- readonly sealed: {
1378
- readonly format: "oauth-connected-xchacha20poly1305-v1";
1379
- readonly keyId: string;
1380
- readonly nonce: string;
1381
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
1382
- };
1383
- };
1384
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1385
- readonly claimedAtMillis: number;
1386
- readonly claimExpiresAtMillis: number;
1387
- };
1388
- } | {
1389
- readonly _tag: "Empty";
1390
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
1391
- readonly settle: <A>(input: {
1392
- readonly claim: import("@yielded/auth/OAuth").OAuthConnectedRevocationClaim;
1393
- readonly outcome: "Confirmed" | "Unknown";
1394
- }, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
1395
- readonly settled: boolean;
1396
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
1397
- };
1398
- }, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
1399
- coordinateTargetOAuthConnected: <Transaction, A, E, R>(database: any, mapping: Mapping, configuration: OAuthTargetConfiguration, owner: (transaction: Transaction, services: {
1400
- readonly oauthConnectedPersistence: import("@yielded/auth/OAuth").OAuthConnectedPersistence["Service"];
1401
- }, append: (statement: import("effect/sql/Statement").Statement<any>) => void) => Effect.Effect<A, E, R>) => Effect.Effect<A, OAuthCoordinatorError<E>, R | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
1402
- coordinateTargetOAuthConnectedRevocations: <Transaction, A, E, R>(database: any, mapping: Revocations, configuration: OAuthTargetConfiguration, owner: (transaction: Transaction, services: {
1403
- readonly oauthConnectedRevocations: import("@yielded/auth/OAuth").OAuthConnectedRevocations["Service"];
1404
- }, append: (statement: import("effect/sql/Statement").Statement<any>) => void) => Effect.Effect<A, E, R>) => Effect.Effect<A, OAuthCoordinatorError<E>, R | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | NativeDatabase>;
1405
- oauthConnectedPersistenceLayer: typeof oauthConnectedPersistenceLayer;
1406
- oauthConnectedRevocationsLayer: typeof oauthConnectedRevocationsLayer;
1407
- };
1408
- connectedReference: {
1409
- oauthConnectedOwnershipReferences: <S extends TableModel, AC extends TableModel, T extends TableModel, O extends TableModel, F extends TableModel, G extends TableModel, C extends TableModel, H extends TableModel, A extends TableModel, D extends TableModel, N, J extends TableModel>(original: OAuthConnectedMapping<S, AC, T, O, F, G, C, H, A, D, N, J, any>) => {
1410
- readonly connectedReferenceGuards: ReadonlyArray<OAuthReferenceGuardDescriptor<N>>;
1411
- readonly connectedReference: (input: {
1412
- readonly identityKey: string;
1413
- readonly subjectId: N;
1414
- }) => SqlExpression;
1415
- };
1416
- connectedReferenceCondition: (mapping: Mapping, identityKey: string | SqlExpression, knownIdentity?: {
1417
- readonly provider: string | SqlExpression;
1418
- readonly issuer: string | SqlExpression;
1419
- }) => SqlFragment;
1420
- };
1421
- };
1422
- //#endregion
1423
- //# sourceMappingURL=oauth-kernel.d.mts.map