@yielded/auth-persistence-drizzle 0.1.0-beta.0 → 0.1.0-beta.12
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.
- package/README.md +6 -1
- package/dist/D1.d.mts +155 -40
- package/dist/D1.mjs +10 -6
- package/dist/D1.mjs.map +1 -1
- package/dist/Libsql.d.mts +251 -129
- package/dist/Libsql.mjs +20 -21
- package/dist/Libsql.mjs.map +1 -1
- package/dist/Mysql2.d.mts +208 -56
- package/dist/Mysql2.mjs +13 -8
- package/dist/Mysql2.mjs.map +1 -1
- package/dist/Pglite.d.mts +209 -57
- package/dist/Pglite.mjs +13 -9
- package/dist/Pglite.mjs.map +1 -1
- package/dist/Postgres.d.mts +207 -55
- package/dist/Postgres.mjs +13 -9
- package/dist/Postgres.mjs.map +1 -1
- package/dist/SqliteBun.d.mts +249 -126
- package/dist/SqliteBun.mjs +20 -18
- package/dist/SqliteBun.mjs.map +1 -1
- package/dist/SqliteDo.d.mts +248 -158
- package/dist/SqliteDo.mjs +26 -44
- package/dist/SqliteDo.mjs.map +1 -1
- package/dist/SqliteNode.d.mts +247 -124
- package/dist/SqliteNode.mjs +20 -18
- package/dist/SqliteNode.mjs.map +1 -1
- package/dist/SqliteWasm.d.mts +251 -128
- package/dist/SqliteWasm.mjs +20 -18
- package/dist/SqliteWasm.mjs.map +1 -1
- package/dist/drizzle/D1BatchStatements.d.mts +1 -1
- package/dist/drizzle/D1BatchStatements.mjs.map +1 -1
- package/dist/drizzle/d1-database.d.mts +11 -0
- package/dist/drizzle/d1-database.mjs +8 -0
- package/dist/drizzle/d1-database.mjs.map +1 -0
- package/dist/drizzle/d1-emails.d.mts +8 -7
- package/dist/drizzle/d1-emails.mjs +7 -4
- package/dist/drizzle/d1-emails.mjs.map +1 -1
- package/dist/drizzle/d1-generated-statement.mjs.map +1 -1
- package/dist/drizzle/d1-identity.mjs +12 -9
- package/dist/drizzle/d1-identity.mjs.map +1 -1
- package/dist/drizzle/d1-oauth.d.mts +41 -10
- package/dist/drizzle/d1-oauth.mjs +8 -5
- package/dist/drizzle/d1-oauth.mjs.map +1 -1
- package/dist/drizzle/d1-passkey.d.mts +3 -14
- package/dist/drizzle/d1-passkey.mjs +2 -1
- package/dist/drizzle/d1-passkey.mjs.map +1 -1
- package/dist/drizzle/d1-password-prepared.d.mts +4 -3
- package/dist/drizzle/d1-password-prepared.mjs +3 -1
- package/dist/drizzle/d1-password-prepared.mjs.map +1 -1
- package/dist/drizzle/d1-passwords.d.mts +7 -6
- package/dist/drizzle/d1-passwords.mjs +5 -2
- package/dist/drizzle/d1-passwords.mjs.map +1 -1
- package/dist/drizzle/d1-phone.d.mts +3 -4
- package/dist/drizzle/d1-phone.mjs +2 -1
- package/dist/drizzle/d1-phone.mjs.map +1 -1
- package/dist/drizzle/d1-planning.d.mts +1 -1
- package/dist/drizzle/d1-proofs.d.mts +5 -4
- package/dist/drizzle/d1-proofs.mjs +3 -1
- package/dist/drizzle/d1-proofs.mjs.map +1 -1
- package/dist/drizzle/d1-sessions.d.mts +14 -13
- package/dist/drizzle/d1-sessions.mjs +15 -9
- package/dist/drizzle/d1-sessions.mjs.map +1 -1
- package/dist/drizzle/d1-totp.d.mts +3 -4
- package/dist/drizzle/d1-totp.mjs +2 -1
- package/dist/drizzle/d1-totp.mjs.map +1 -1
- package/dist/drizzle/email-registration.d.mts +1 -1
- package/dist/drizzle/email-registration.mjs +2 -1
- package/dist/drizzle/email-registration.mjs.map +1 -1
- package/dist/drizzle/email-target.d.mts +8 -7
- package/dist/drizzle/email-target.mjs +10 -10
- package/dist/drizzle/email-target.mjs.map +1 -1
- package/dist/drizzle/model.d.mts +2 -126
- package/dist/drizzle/model.mjs +2 -21
- package/dist/drizzle/model.mjs.map +1 -1
- package/dist/drizzle/mysql-database.d.mts +8 -0
- package/dist/drizzle/mysql-database.mjs +8 -0
- package/dist/drizzle/mysql-database.mjs.map +1 -0
- package/dist/drizzle/mysql-emails.d.mts +8 -7
- package/dist/drizzle/mysql-emails.mjs +12 -8
- package/dist/drizzle/mysql-emails.mjs.map +1 -1
- package/dist/drizzle/mysql-identity.mjs +12 -9
- package/dist/drizzle/mysql-identity.mjs.map +1 -1
- package/dist/drizzle/mysql-password-prepared.d.mts +4 -3
- package/dist/drizzle/mysql-password-prepared.mjs +6 -2
- package/dist/drizzle/mysql-password-prepared.mjs.map +1 -1
- package/dist/drizzle/mysql-passwords.d.mts +7 -5
- package/dist/drizzle/mysql-passwords.mjs +11 -7
- package/dist/drizzle/mysql-passwords.mjs.map +1 -1
- package/dist/drizzle/mysql-proofs.d.mts +4 -3
- package/dist/drizzle/mysql-proofs.mjs +8 -4
- package/dist/drizzle/mysql-proofs.mjs.map +1 -1
- package/dist/drizzle/mysql-sessions.d.mts +12 -11
- package/dist/drizzle/mysql-sessions.mjs +16 -12
- package/dist/drizzle/mysql-sessions.mjs.map +1 -1
- package/dist/drizzle/native-database.mjs +10 -0
- package/dist/drizzle/native-database.mjs.map +1 -0
- package/dist/drizzle/oauth-accounts.mjs +1 -1
- package/dist/drizzle/oauth-connected-access.mjs +14 -12
- package/dist/drizzle/oauth-connected-access.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-custody.mjs +2 -2
- package/dist/drizzle/oauth-connected-drivers.mjs +11 -6
- package/dist/drizzle/oauth-connected-drivers.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-flow.mjs +2 -2
- package/dist/drizzle/oauth-connected-input.mjs +14 -1
- package/dist/drizzle/oauth-connected-input.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-maintenance.mjs +1 -1
- package/dist/drizzle/oauth-connected-management.mjs +2 -2
- package/dist/drizzle/oauth-connected-model.d.mts +17 -3
- package/dist/drizzle/oauth-connected-model.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-settlement.mjs +51 -41
- package/dist/drizzle/oauth-connected-settlement.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-sign-in.mjs +263 -0
- package/dist/drizzle/oauth-connected-sign-in.mjs.map +1 -0
- package/dist/drizzle/oauth-connected-state.d.mts +110 -2
- package/dist/drizzle/oauth-connected-state.mjs +9 -4
- package/dist/drizzle/oauth-connected-state.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-target.d.mts +142 -15
- package/dist/drizzle/oauth-connected-target.mjs +9 -6
- package/dist/drizzle/oauth-connected-target.mjs.map +1 -1
- package/dist/drizzle/oauth-drivers.mjs +9 -7
- package/dist/drizzle/oauth-drivers.mjs.map +1 -1
- package/dist/drizzle/oauth-flow.d.mts +1 -1
- package/dist/drizzle/oauth-flow.mjs +1 -1
- package/dist/drizzle/oauth-input.mjs +1 -1
- package/dist/drizzle/oauth-model.d.mts +1 -1
- package/dist/drizzle/oauth-owner.d.mts +1 -1
- package/dist/drizzle/oauth-registration.d.mts +2 -2
- package/dist/drizzle/oauth-registration.mjs +1 -1
- package/dist/drizzle/oauth-state.mjs +5 -4
- package/dist/drizzle/oauth-state.mjs.map +1 -1
- package/dist/drizzle/oauth-target.d.mts +14 -13
- package/dist/drizzle/oauth-target.mjs +14 -13
- package/dist/drizzle/oauth-target.mjs.map +1 -1
- package/dist/drizzle/passkey-drivers.mjs +8 -6
- package/dist/drizzle/passkey-drivers.mjs.map +1 -1
- package/dist/drizzle/passkey-write-drivers.mjs +5 -3
- package/dist/drizzle/passkey-write-drivers.mjs.map +1 -1
- package/dist/drizzle/passkey-write-target.d.mts +1 -1
- package/dist/drizzle/password-prepared-sql.mjs +2 -1
- package/dist/drizzle/password-prepared-sql.mjs.map +1 -1
- package/dist/drizzle/password-prepared-state.mjs +1 -1
- package/dist/drizzle/password-prepared-target.d.mts +4 -3
- package/dist/drizzle/password-prepared-target.mjs +4 -3
- package/dist/drizzle/password-prepared-target.mjs.map +1 -1
- package/dist/drizzle/password-registration.mjs +2 -1
- package/dist/drizzle/password-registration.mjs.map +1 -1
- package/dist/drizzle/password-target.d.mts +6 -5
- package/dist/drizzle/password-target.mjs +8 -8
- package/dist/drizzle/password-target.mjs.map +1 -1
- package/dist/drizzle/pg-database.d.mts +9 -0
- package/dist/drizzle/pg-database.mjs +8 -0
- package/dist/drizzle/pg-database.mjs.map +1 -0
- package/dist/drizzle/pg-emails.d.mts +8 -7
- package/dist/drizzle/pg-emails.mjs +12 -8
- package/dist/drizzle/pg-emails.mjs.map +1 -1
- package/dist/drizzle/pg-identity.mjs +92 -0
- package/dist/drizzle/pg-identity.mjs.map +1 -0
- package/dist/drizzle/pg-password-prepared.d.mts +4 -3
- package/dist/drizzle/pg-password-prepared.mjs +6 -2
- package/dist/drizzle/pg-password-prepared.mjs.map +1 -1
- package/dist/drizzle/pg-passwords.d.mts +7 -5
- package/dist/drizzle/pg-passwords.mjs +11 -7
- package/dist/drizzle/pg-passwords.mjs.map +1 -1
- package/dist/drizzle/pg-proofs.d.mts +4 -3
- package/dist/drizzle/pg-proofs.mjs +8 -4
- package/dist/drizzle/pg-proofs.mjs.map +1 -1
- package/dist/drizzle/pg-sessions.d.mts +12 -11
- package/dist/drizzle/pg-sessions.mjs +16 -12
- package/dist/drizzle/pg-sessions.mjs.map +1 -1
- package/dist/drizzle/phone-model.d.mts +1 -1
- package/dist/drizzle/phone-target.d.mts +5 -4
- package/dist/drizzle/phone-target.mjs +12 -11
- package/dist/drizzle/phone-target.mjs.map +1 -1
- package/dist/drizzle/proof-target.d.mts +4 -3
- package/dist/drizzle/proof-target.mjs +5 -5
- package/dist/drizzle/proof-target.mjs.map +1 -1
- package/dist/drizzle/session-sql.d.mts +1 -0
- package/dist/drizzle/session-target.d.mts +11 -9
- package/dist/drizzle/session-target.mjs +11 -11
- package/dist/drizzle/session-target.mjs.map +1 -1
- package/dist/drizzle/sqlite-emails.mjs +9 -5
- package/dist/drizzle/sqlite-emails.mjs.map +1 -1
- package/dist/drizzle/sqlite-identity.mjs +14 -11
- package/dist/drizzle/sqlite-identity.mjs.map +1 -1
- package/dist/drizzle/sqlite-password-prepared.mjs +7 -3
- package/dist/drizzle/sqlite-password-prepared.mjs.map +1 -1
- package/dist/drizzle/sqlite-passwords.mjs +10 -6
- package/dist/drizzle/sqlite-passwords.mjs.map +1 -1
- package/dist/drizzle/sqlite-proofs.mjs +7 -3
- package/dist/drizzle/sqlite-proofs.mjs.map +1 -1
- package/dist/drizzle/sqlite-sessions.mjs +16 -12
- package/dist/drizzle/sqlite-sessions.mjs.map +1 -1
- package/dist/drizzle/standalone-guard.d.mts +2 -0
- package/dist/drizzle/standalone-guard.mjs +8 -4
- package/dist/drizzle/standalone-guard.mjs.map +1 -1
- package/dist/drizzle/totp-model.d.mts +1 -1
- package/dist/drizzle/totp-target.d.mts +5 -4
- package/dist/drizzle/totp-target.mjs +31 -28
- package/dist/drizzle/totp-target.mjs.map +1 -1
- package/dist/drizzle/transaction-mysql.mjs +1 -1
- package/dist/drizzle/transaction-mysql.mjs.map +1 -1
- package/dist/index.d.mts +2 -4
- package/dist/index.mjs +2 -4
- package/dist/internal/drizzle-postgres.mjs.map +1 -1
- package/dist/internal/drizzle-sqlite.mjs.map +1 -1
- package/package.json +1 -1
- package/src/D1.ts +37 -26
- package/src/Libsql.ts +45 -61
- package/src/Mysql2.ts +39 -35
- package/src/Pglite.ts +48 -30
- package/src/Postgres.ts +48 -30
- package/src/SqliteBun.ts +59 -68
- package/src/SqliteDo.ts +61 -274
- package/src/SqliteNode.ts +56 -66
- package/src/SqliteWasm.ts +56 -66
- package/src/drizzle/D1BatchStatements.ts +1 -1
- package/src/drizzle/d1-database.ts +10 -0
- package/src/drizzle/d1-emails.ts +86 -88
- package/src/drizzle/d1-generated-statement.ts +1 -1
- package/src/drizzle/d1-identity.ts +17 -20
- package/src/drizzle/d1-oauth.ts +19 -8
- package/src/drizzle/d1-passkey.ts +5 -1
- package/src/drizzle/d1-password-prepared.ts +40 -42
- package/src/drizzle/d1-passwords.ts +76 -80
- package/src/drizzle/d1-phone.ts +5 -1
- package/src/drizzle/d1-proofs.ts +31 -34
- package/src/drizzle/d1-sessions.ts +53 -40
- package/src/drizzle/d1-totp.ts +5 -1
- package/src/drizzle/email-registration.ts +6 -2
- package/src/drizzle/email-target.ts +18 -20
- package/src/drizzle/model.ts +1 -208
- package/src/drizzle/mysql-database.ts +8 -0
- package/src/drizzle/mysql-emails.ts +29 -17
- package/src/drizzle/mysql-identity.ts +18 -21
- package/src/drizzle/mysql-password-prepared.ts +11 -9
- package/src/drizzle/mysql-passwords.ts +22 -10
- package/src/drizzle/mysql-proofs.ts +17 -6
- package/src/drizzle/mysql-sessions.ts +41 -18
- package/src/drizzle/native-database.ts +22 -0
- package/src/drizzle/oauth-connected-access.ts +8 -1
- package/src/drizzle/oauth-connected-drivers.ts +21 -6
- package/src/drizzle/oauth-connected-input.ts +13 -0
- package/src/drizzle/oauth-connected-model.ts +17 -0
- package/src/drizzle/oauth-connected-settlement.ts +65 -42
- package/src/drizzle/oauth-connected-sign-in.ts +438 -0
- package/src/drizzle/oauth-connected-state.ts +19 -7
- package/src/drizzle/oauth-connected-target.ts +26 -18
- package/src/drizzle/oauth-drivers.ts +26 -10
- package/src/drizzle/oauth-state.ts +5 -4
- package/src/drizzle/oauth-target.ts +31 -43
- package/src/drizzle/passkey-drivers.ts +21 -13
- package/src/drizzle/passkey-write-drivers.ts +11 -6
- package/src/drizzle/password-prepared-sql.ts +2 -4
- package/src/drizzle/password-prepared-target.ts +10 -7
- package/src/drizzle/password-registration.ts +7 -8
- package/src/drizzle/password-target.ts +20 -19
- package/src/drizzle/pg-database.ts +10 -0
- package/src/drizzle/pg-emails.ts +29 -17
- package/src/drizzle/pg-identity.ts +297 -0
- package/src/drizzle/pg-password-prepared.ts +11 -9
- package/src/drizzle/pg-passwords.ts +22 -10
- package/src/drizzle/pg-proofs.ts +17 -6
- package/src/drizzle/pg-sessions.ts +41 -18
- package/src/drizzle/phone-target.ts +23 -18
- package/src/drizzle/proof-target.ts +10 -13
- package/src/drizzle/session-target.ts +33 -51
- package/src/drizzle/sqlite-emails.ts +31 -14
- package/src/drizzle/sqlite-identity.ts +22 -42
- package/src/drizzle/sqlite-password-prepared.ts +24 -10
- package/src/drizzle/sqlite-passwords.ts +30 -16
- package/src/drizzle/sqlite-proofs.ts +29 -6
- package/src/drizzle/sqlite-sessions.ts +50 -24
- package/src/drizzle/standalone-guard.ts +19 -7
- package/src/drizzle/totp-target.ts +62 -61
- package/src/drizzle/transaction-mysql.ts +1 -1
- package/src/index.ts +0 -24
- package/src/internal/drizzle-postgres.ts +1 -1
- package/src/internal/drizzle-sqlite.ts +1 -1
- package/dist/drizzle/d1-identity.d.mts +0 -30
- package/dist/drizzle/mysql-identity.d.mts +0 -21
- package/dist/drizzle/mysql.d.mts +0 -69
- package/dist/drizzle/mysql.mjs +0 -218
- package/dist/drizzle/mysql.mjs.map +0 -1
- package/dist/drizzle/pg.d.mts +0 -80
- package/dist/drizzle/pg.mjs +0 -289
- package/dist/drizzle/pg.mjs.map +0 -1
- package/dist/drizzle/sqlite.d.mts +0 -77
- package/dist/drizzle/sqlite.mjs +0 -217
- package/dist/drizzle/sqlite.mjs.map +0 -1
- package/src/drizzle/mysql.ts +0 -687
- package/src/drizzle/pg.ts +0 -984
- package/src/drizzle/sqlite.ts +0 -705
package/dist/SqliteBun.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DrizzleTableModel } from "./drizzle/table-model.mjs";
|
|
2
2
|
import { EmailAddressMapping, EmailRegistrationMapping, EmailSignInMapping } from "./drizzle/email-model.mjs";
|
|
3
3
|
import { PasswordRegistrationMapping } from "./drizzle/password-model.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { ExternalIdentityTables, IdentityTables, SubjectProvisioningTables } from "./drizzle/model.mjs";
|
|
5
5
|
import { ProofPersistenceMapping } from "./drizzle/proof-model.mjs";
|
|
6
6
|
import { PasswordPreparedPersistenceMapping, PasswordPreparedProofMapping } from "./drizzle/password-prepared-model.mjs";
|
|
7
7
|
import { AuthenticationAuthorityMapping, PendingAuthenticationMapping, SignedSessionValidityMapping, StatefulSessionMapping } from "./drizzle/session-model.mjs";
|
|
@@ -19,38 +19,42 @@ import { PhoneMapping, PhoneMappingSource, PhonePersistenceServices } from "./dr
|
|
|
19
19
|
import "./index.mjs";
|
|
20
20
|
import { SuppliedService } from "./drizzle/SuppliedService.mjs";
|
|
21
21
|
import { TotpCoordinatorError } from "./drizzle/totp-target.mjs";
|
|
22
|
-
import { coordinateSqliteAuthStoreTransaction, coordinateSqliteAuthTransaction, coordinateSqliteOAuthStateTransaction } from "./drizzle/sqlite.mjs";
|
|
23
22
|
import { PhoneCoordinatorError } from "./drizzle/phone-target.mjs";
|
|
24
|
-
import {
|
|
25
|
-
import { Effect } from "effect";
|
|
23
|
+
import { NativeDatabase } from "@yielded/auth-persistence/Adapter";
|
|
24
|
+
import { Context, Effect, Layer } from "effect";
|
|
26
25
|
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
|
27
26
|
import { EffectSQLiteBunDatabase } from "drizzle-orm/effect-sqlite-bun";
|
|
28
27
|
//#region src/SqliteBun.d.ts
|
|
28
|
+
declare const Database_base: Context.ServiceClass<Database, "effect-auth/persistence-drizzle/SqliteBun/Database", EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>>;
|
|
29
|
+
/** The application-owned Drizzle database used to construct persistence services. */
|
|
30
|
+
export declare class Database extends Database_base {}
|
|
31
|
+
/** Construct Drizzle from the driver's SQL-client Layer. */
|
|
32
|
+
export declare const databaseLayer: Layer.Layer<Database, never, import("@effect/sql-sqlite-bun/SqliteClient").SqliteClient>;
|
|
29
33
|
export declare const coordinateEmailAddress: {
|
|
30
34
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
31
35
|
readonly mapping: EmailAddressMapping<S, I, C, AC, M, NativeId>;
|
|
32
36
|
readonly proofMapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, any, import("drizzle-orm").SQL<unknown>>;
|
|
33
37
|
readonly transaction?: never;
|
|
34
|
-
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Email").EmailUnavailable | import("@yielded/auth/Hooks").HookConfigurationError | import("effect/
|
|
38
|
+
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Email").EmailUnavailable | import("@yielded/auth/Hooks").HookConfigurationError | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Email").EmailAddressPersistence>>;
|
|
35
39
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
36
40
|
readonly mapping: EmailAddressMapping<S, I, C, AC, M, NativeId>;
|
|
37
41
|
readonly proofMapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, any, import("drizzle-orm").SQL<unknown>>;
|
|
38
42
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
39
|
-
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Email").EmailUnavailable | import("@yielded/auth/Hooks").HookConfigurationError | import("effect/
|
|
43
|
+
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Email").EmailUnavailable | import("@yielded/auth/Hooks").HookConfigurationError | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Email").EmailAddressPersistence>>;
|
|
40
44
|
}, coordinateEmailRegistration: {
|
|
41
45
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
42
46
|
readonly mapping: EmailRegistrationMapping<NoInfer<Registration>, S, I, C, AC, Rq, NativeId>;
|
|
43
47
|
readonly proofMapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, any, import("drizzle-orm").SQL<unknown>>;
|
|
44
48
|
readonly target: SuppliedService<TargetId, EmailRegistrationAuthority<Registration>>;
|
|
45
49
|
readonly transaction?: never;
|
|
46
|
-
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Email").EmailUnavailable | import("@yielded/auth/Hooks").HookConfigurationError | import("effect/
|
|
50
|
+
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Email").EmailUnavailable | import("@yielded/auth/Hooks").HookConfigurationError | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId>>;
|
|
47
51
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
48
52
|
readonly mapping: EmailRegistrationMapping<NoInfer<Registration>, S, I, C, AC, Rq, NativeId>;
|
|
49
53
|
readonly proofMapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, any, import("drizzle-orm").SQL<unknown>>;
|
|
50
54
|
readonly target: SuppliedService<TargetId, EmailRegistrationAuthority<Registration>>;
|
|
51
55
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
52
|
-
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Email").EmailUnavailable | import("@yielded/auth/Hooks").HookConfigurationError | import("effect/
|
|
53
|
-
}, makeEmailAddressServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, M extends AnySQLiteTable, NativeId>(
|
|
56
|
+
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Email").EmailUnavailable | import("@yielded/auth/Hooks").HookConfigurationError | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
|
|
57
|
+
}, makeEmailAddressServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, M extends AnySQLiteTable, NativeId>(mapping: EmailAddressMapping<S, I, C, AC, M, NativeId>, proofMapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, any, import("drizzle-orm").SQL<unknown>>) => Effect.Effect<{
|
|
54
58
|
emailAddressPersistence: {
|
|
55
59
|
readonly target: (input: {
|
|
56
60
|
readonly moduleId: string;
|
|
@@ -69,39 +73,39 @@ export declare const coordinateEmailAddress: {
|
|
|
69
73
|
readonly hasMore: boolean;
|
|
70
74
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Email").EmailUnavailable>;
|
|
71
75
|
};
|
|
72
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(
|
|
76
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(mapping: EmailRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>, proofMapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, any, import("drizzle-orm").SQL<unknown>>) => Effect.Effect<{
|
|
73
77
|
registrationAuthority: EmailRegistrationAuthority<Registration>;
|
|
74
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailSignInServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, NativeId>(
|
|
78
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailSignInServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, NativeId>(mapping: EmailSignInMapping<S, I, C, NativeId>) => Effect.Effect<{
|
|
75
79
|
emailSignInTargets: {
|
|
76
80
|
readonly lookup: (input: {
|
|
77
81
|
readonly moduleId: string;
|
|
78
82
|
readonly identifier: import("@yielded/auth/Identity").LoginIdentifier;
|
|
79
83
|
}) => Effect.Effect<import("effect/Option").Option<import("@yielded/auth/Email").EmailCredentialSnapshot>, import("@yielded/auth/Email").EmailUnavailable>;
|
|
80
84
|
};
|
|
81
|
-
}, never,
|
|
85
|
+
}, never, Database>;
|
|
82
86
|
export declare const coordinatePasswordPersistence: {
|
|
83
87
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, PM extends ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any> | undefined, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
84
88
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasswordPersistenceMapping<DrizzleTableModel<S>, DrizzleTableModel<I>, DrizzleTableModel<C>, DrizzleTableModel<AC>, DrizzleTableModel<A>, DrizzleTableModel<RS>, DrizzleTableModel<CE>, DrizzleTableModel<M>, NativeId, import("drizzle-orm").SQL<unknown>>;
|
|
85
89
|
readonly proofMapping?: PM | undefined;
|
|
86
90
|
readonly transaction?: never;
|
|
87
|
-
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/
|
|
91
|
+
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Password").PasswordPersistence>>;
|
|
88
92
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, PM extends ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any> | undefined, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
89
93
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasswordPersistenceMapping<DrizzleTableModel<S>, DrizzleTableModel<I>, DrizzleTableModel<C>, DrizzleTableModel<AC>, DrizzleTableModel<A>, DrizzleTableModel<RS>, DrizzleTableModel<CE>, DrizzleTableModel<M>, NativeId, import("drizzle-orm").SQL<unknown>>;
|
|
90
94
|
readonly proofMapping?: PM | undefined;
|
|
91
95
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
92
|
-
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/
|
|
96
|
+
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Password").PasswordPersistence>>;
|
|
93
97
|
}, coordinatePasswordRegistration: {
|
|
94
98
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
95
99
|
readonly mapping: PasswordRegistrationMapping<NoInfer<Registration>, S, I, C, AC, Rq, NativeId>;
|
|
96
100
|
readonly target: SuppliedService<TargetId, import("@yielded/auth-persistence/Adapter").PasswordRegistrationAuthority<Registration>>;
|
|
97
101
|
readonly transaction?: never;
|
|
98
|
-
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/
|
|
102
|
+
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId>>;
|
|
99
103
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
100
104
|
readonly mapping: PasswordRegistrationMapping<NoInfer<Registration>, S, I, C, AC, Rq, NativeId>;
|
|
101
105
|
readonly target: SuppliedService<TargetId, import("@yielded/auth-persistence/Adapter").PasswordRegistrationAuthority<Registration>>;
|
|
102
106
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
103
|
-
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/
|
|
104
|
-
}, makePasswordPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId>(
|
|
107
|
+
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
|
|
108
|
+
}, makePasswordPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId>(mapping: import("@yielded/auth-persistence/Adapter").PasswordPersistenceMapping<DrizzleTableModel<S>, DrizzleTableModel<I>, DrizzleTableModel<C>, DrizzleTableModel<AC>, DrizzleTableModel<A>, DrizzleTableModel<RS>, DrizzleTableModel<CE>, DrizzleTableModel<M>, NativeId, import("drizzle-orm").SQL<unknown>>, proofMapping?: ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any>) => Effect.Effect<{
|
|
105
109
|
passwordPersistence: {
|
|
106
110
|
readonly admitAttempt: <A_1>(input: {
|
|
107
111
|
readonly moduleId: string;
|
|
@@ -143,19 +147,19 @@ export declare const coordinatePasswordPersistence: {
|
|
|
143
147
|
readonly hasMore: boolean;
|
|
144
148
|
}, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, import("@yielded/auth/Password").PasswordUnavailable>;
|
|
145
149
|
};
|
|
146
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makePasswordRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(
|
|
150
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makePasswordRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(mapping: PasswordRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>) => Effect.Effect<{
|
|
147
151
|
registrationAuthority: import("@yielded/auth-persistence/Adapter").PasswordRegistrationAuthority<Registration>;
|
|
148
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
152
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
149
153
|
export declare const coordinateProofPersistence: {
|
|
150
154
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, Aev extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
151
155
|
readonly mapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<Rq>, DrizzleTableModel<S>, DrizzleTableModel<G>, DrizzleTableModel<Cn>, DrizzleTableModel<Rs>, DrizzleTableModel<Aev>, DrizzleTableModel<F>, DrizzleTableModel<C>, DrizzleTableModel<Sub>, DrizzleTableModel<I>, DrizzleTableModel<Cr>, NativeId, import("drizzle-orm").SQL<unknown>>;
|
|
152
156
|
readonly transaction?: never;
|
|
153
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Proofs").ProofUnavailable | import("effect/
|
|
157
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Proofs").ProofUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Proofs").ProofPersistence>>;
|
|
154
158
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, Aev extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
155
159
|
readonly mapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<Rq>, DrizzleTableModel<S>, DrizzleTableModel<G>, DrizzleTableModel<Cn>, DrizzleTableModel<Rs>, DrizzleTableModel<Aev>, DrizzleTableModel<F>, DrizzleTableModel<C>, DrizzleTableModel<Sub>, DrizzleTableModel<I>, DrizzleTableModel<Cr>, NativeId, import("drizzle-orm").SQL<unknown>>;
|
|
156
160
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
157
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Proofs").ProofUnavailable | import("effect/
|
|
158
|
-
}, makeProofPersistenceServices: <Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, A extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId>(
|
|
161
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Proofs").ProofUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Proofs").ProofPersistence>>;
|
|
162
|
+
}, makeProofPersistenceServices: <Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, A extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId>(mapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<Rq>, DrizzleTableModel<S>, DrizzleTableModel<G>, DrizzleTableModel<Cn>, DrizzleTableModel<Rs>, DrizzleTableModel<A>, DrizzleTableModel<F>, DrizzleTableModel<C>, DrizzleTableModel<Sub>, DrizzleTableModel<I>, DrizzleTableModel<Cr>, NativeId, import("drizzle-orm").SQL<unknown>>) => Effect.Effect<{
|
|
159
163
|
proofPersistence: {
|
|
160
164
|
readonly issue: <A_1>(input: {
|
|
161
165
|
readonly record: import("@yielded/auth/Proofs").ProofRecord;
|
|
@@ -205,52 +209,52 @@ export declare const coordinateProofPersistence: {
|
|
|
205
209
|
readonly limit: number;
|
|
206
210
|
}, prepare: import("@yielded/auth/Proofs").PrepareProofCommit<import("@yielded/auth/Proofs").ProofCleanupResult, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, import("@yielded/auth/Proofs").ProofUnavailable>;
|
|
207
211
|
};
|
|
208
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
212
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
209
213
|
export declare const coordinateAuthenticationAuthority: {
|
|
210
214
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
211
215
|
readonly mapping: AuthenticationAuthorityMapping<Claims, S, C, F, P, NativeId>;
|
|
212
216
|
readonly transaction?: never;
|
|
213
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/
|
|
217
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Sessions").AuthenticationAuthority>>;
|
|
214
218
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
215
219
|
readonly mapping: AuthenticationAuthorityMapping<Claims, S, C, F, P, NativeId>;
|
|
216
220
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
217
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/
|
|
221
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Sessions").AuthenticationAuthority>>;
|
|
218
222
|
}, coordinatePendingAuthentication: {
|
|
219
223
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, P extends AnySQLiteTable, F extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
220
224
|
readonly mapping: PendingAuthenticationMapping<NoInfer<Claims>, S, C, P, F, NativeId>;
|
|
221
225
|
readonly target: SuppliedService<TargetId, import("@yielded/auth/Sessions").PendingAuthentication<Claims>>;
|
|
222
226
|
readonly transaction?: never;
|
|
223
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/
|
|
227
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId>>;
|
|
224
228
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, P extends AnySQLiteTable, F extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
225
229
|
readonly mapping: PendingAuthenticationMapping<NoInfer<Claims>, S, C, P, F, NativeId>;
|
|
226
230
|
readonly target: SuppliedService<TargetId, import("@yielded/auth/Sessions").PendingAuthentication<Claims>>;
|
|
227
231
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
228
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/
|
|
232
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
|
|
229
233
|
}, coordinateSignedSessionValidity: {
|
|
230
234
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, S extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
231
235
|
readonly mapping: SignedSessionValidityMapping<S, T, NativeId, NativeSessionId>;
|
|
232
236
|
readonly target: SuppliedService<TargetId, import("@yielded/auth/Sessions").SignedSessionValidity>;
|
|
233
237
|
readonly transaction?: never;
|
|
234
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/
|
|
238
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId>>;
|
|
235
239
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, S extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
236
240
|
readonly mapping: SignedSessionValidityMapping<S, T, NativeId, NativeSessionId>;
|
|
237
241
|
readonly target: SuppliedService<TargetId, import("@yielded/auth/Sessions").SignedSessionValidity>;
|
|
238
242
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
239
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/
|
|
243
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
|
|
240
244
|
}, coordinateStatefulSessions: {
|
|
241
245
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, PersistenceId, RepositoryId, Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, Session extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
242
246
|
readonly mapping: StatefulSessionMapping<NoInfer<Claims>, S, C, Session, F, P, NativeId, NativeSessionId>;
|
|
243
247
|
readonly persistence: SuppliedService<PersistenceId, import("@yielded/auth/Sessions").StatefulSessionPersistence<Claims>>;
|
|
244
248
|
readonly repository: SuppliedService<RepositoryId, import("@yielded/auth/Sessions").SessionRepository>;
|
|
245
249
|
readonly transaction?: never;
|
|
246
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/
|
|
250
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, PersistenceId | RepositoryId>>;
|
|
247
251
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, PersistenceId, RepositoryId, Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, Session extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
248
252
|
readonly mapping: StatefulSessionMapping<NoInfer<Claims>, S, C, Session, F, P, NativeId, NativeSessionId>;
|
|
249
253
|
readonly persistence: SuppliedService<PersistenceId, import("@yielded/auth/Sessions").StatefulSessionPersistence<Claims>>;
|
|
250
254
|
readonly repository: SuppliedService<RepositoryId, import("@yielded/auth/Sessions").SessionRepository>;
|
|
251
255
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
252
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/
|
|
253
|
-
}, makeAuthenticationAuthorityServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId>(
|
|
256
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, PersistenceId | RepositoryId | TxId>>;
|
|
257
|
+
}, makeAuthenticationAuthorityServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId>(mapping: AuthenticationAuthorityMapping<Claims, S, C, F, P, NativeId>) => Effect.Effect<{
|
|
254
258
|
authenticationAuthority: {
|
|
255
259
|
readonly capture: (subjectId: import("@yielded/auth/Schema").SubjectId, credentialIds: ReadonlyArray<string>) => Effect.Effect<import("@yielded/auth/Sessions").AuthenticationRevision, import("@yielded/auth/Sessions").StaleAuthentication | import("@yielded/auth/Sessions").SessionUnavailable>;
|
|
256
260
|
readonly requirements: (evidence: import("@yielded/auth/Sessions").AuthenticationEvidence) => Effect.Effect<import("@yielded/auth/Sessions").AuthenticationRequirement, import("@yielded/auth/Sessions").StaleAuthentication | import("@yielded/auth/Sessions").SessionUnavailable>;
|
|
@@ -262,101 +266,61 @@ export declare const coordinateAuthenticationAuthority: {
|
|
|
262
266
|
readonly pending?: import("@yielded/auth/Sessions").PendingConsumption;
|
|
263
267
|
}, prepare: import("@yielded/auth/Sessions").PrepareSessionCommit<void, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Sessions").StaleAuthentication | import("@yielded/auth/Sessions").PendingAuthenticationInvalid | import("@yielded/auth/Sessions").SessionUnavailable>;
|
|
264
268
|
};
|
|
265
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makePendingAuthenticationServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, P extends AnySQLiteTable, F extends AnySQLiteTable, NativeId>(
|
|
269
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makePendingAuthenticationServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, P extends AnySQLiteTable, F extends AnySQLiteTable, NativeId>(mapping: PendingAuthenticationMapping<Claims, S, C, P, F, NativeId>) => Effect.Effect<{
|
|
266
270
|
pendingAuthentication: import("@yielded/auth/Sessions").PendingAuthentication<Claims>;
|
|
267
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeSessionStepUpServices: <Claims, Id, S extends AnySQLiteTable, C extends AnySQLiteTable, I extends AnySQLiteTable, Session extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(
|
|
271
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeSessionStepUpServices: <Claims, Id, S extends AnySQLiteTable, C extends AnySQLiteTable, I extends AnySQLiteTable, Session extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>, target: Context.Service<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>) => Effect.Effect<{
|
|
268
272
|
sessionStepUpPersistence: import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>;
|
|
269
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, coordinateSessionStepUp: {
|
|
273
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateSessionStepUp: {
|
|
270
274
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, Claims, Id, S extends AnySQLiteTable, C extends AnySQLiteTable, I extends AnySQLiteTable, Session extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
271
275
|
readonly mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>;
|
|
272
276
|
readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>;
|
|
273
277
|
readonly transaction?: never;
|
|
274
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/
|
|
278
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id>>;
|
|
275
279
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, Claims, Id, S extends AnySQLiteTable, C extends AnySQLiteTable, I extends AnySQLiteTable, Session extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
276
280
|
readonly mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>;
|
|
277
281
|
readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>;
|
|
278
282
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
279
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/
|
|
280
|
-
}, makeSignedSessionValidityServices: <S extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(
|
|
283
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id | TxId>>;
|
|
284
|
+
}, makeSignedSessionValidityServices: <S extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: SignedSessionValidityMapping<S, T, NativeId, NativeSessionId>) => Effect.Effect<{
|
|
281
285
|
signedSessionValidity: import("@yielded/auth/Sessions").SignedSessionValidity;
|
|
282
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeStatefulSessionServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, Session extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, NativeSessionId>(
|
|
286
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeStatefulSessionServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, Session extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: StatefulSessionMapping<Claims, S, C, Session, F, P, NativeId, NativeSessionId>) => Effect.Effect<{
|
|
283
287
|
readonly statefulSessionPersistence: import("@yielded/auth/Sessions").StatefulSessionPersistence<Claims>;
|
|
284
288
|
readonly sessionRepository: import("@yielded/auth/Sessions").SessionRepository;
|
|
285
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
289
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
286
290
|
export declare const commitMode: "interactive";
|
|
287
|
-
export declare const
|
|
288
|
-
readonly authStore: {
|
|
289
|
-
readonly issueChallenge: (input: import("@yielded/auth/Schema").NewChallenge) => Effect.Effect<void, import("@yielded/auth/AuthStore").IssueChallengeError>;
|
|
290
|
-
readonly consumeChallenge: (input: import("@yielded/auth/Schema").ConsumeChallenge) => Effect.Effect<import("@yielded/auth/Schema").VerifiedEmail, import("@yielded/auth/AuthStore").EmailOtpRejected | import("@yielded/auth/Errors").AuthStoreError>;
|
|
291
|
-
readonly issueRegistration: (input: import("@yielded/auth/Schema").NewRegistration) => Effect.Effect<void, import("@yielded/auth/Errors").AuthStoreError>;
|
|
292
|
-
readonly inspectRegistration: (tokenDigest: import("@yielded/auth/Schema").TokenDigest) => Effect.Effect<import("@yielded/auth/Schema").PendingRegistration, import("@yielded/auth/Errors").InvalidRegistration | import("@yielded/auth/Errors").AuthStoreError>;
|
|
293
|
-
readonly consumeRegistration: (input: import("@yielded/auth/Schema").ConsumeRegistration) => Effect.Effect<void, import("@yielded/auth/Errors").InvalidRegistration | import("@yielded/auth/Errors").AuthStoreError>;
|
|
294
|
-
};
|
|
295
|
-
readonly decisions: {
|
|
296
|
-
readonly consumeChallenge: (input: import("@yielded/auth/Schema").ConsumeChallenge) => Effect.Effect<import("@yielded/auth/AuthStore").ChallengeConsumeDecision, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
297
|
-
readonly consumeRegistration: (input: import("@yielded/auth/Schema").ConsumeRegistration) => Effect.Effect<import("@yielded/auth/AuthStore").ConsumeDecision<void>, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
298
|
-
};
|
|
299
|
-
};
|
|
300
|
-
export declare const makeOAuthStateServices: <S extends AnySQLiteTable>(database: EffectSQLiteBunDatabase<AnyRelations>, mapping: OAuthStateTables<S>) => {
|
|
301
|
-
readonly oauthStateStore: {
|
|
302
|
-
readonly issue: (state: import("@yielded/auth/OAuth").OAuthState) => Effect.Effect<void, import("@yielded/auth/Errors").AuthStoreError>;
|
|
303
|
-
readonly consume: (stateDigest: import("@yielded/auth/Schema").TokenDigest) => Effect.Effect<import("@yielded/auth/OAuth").OAuthState, import("@yielded/auth/OAuth").InvalidOAuthState | import("@yielded/auth/Errors").AuthStoreError>;
|
|
304
|
-
};
|
|
305
|
-
readonly decisions: {
|
|
306
|
-
readonly consumeOAuthState: (digest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">) => Effect.Effect<import("@yielded/auth/AuthStore").ConsumeDecision<import("@yielded/auth/OAuth").OAuthState>, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
307
|
-
};
|
|
308
|
-
};
|
|
309
|
-
export declare const makeAuthServices: <C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable>(database: EffectSQLiteBunDatabase<AnyRelations>, mapping: AuthTables<C, R, S>) => {
|
|
310
|
-
readonly authStore: {
|
|
311
|
-
readonly issueChallenge: (input: import("@yielded/auth/Schema").NewChallenge) => Effect.Effect<void, import("@yielded/auth/AuthStore").IssueChallengeError>;
|
|
312
|
-
readonly consumeChallenge: (input: import("@yielded/auth/Schema").ConsumeChallenge) => Effect.Effect<import("@yielded/auth/Schema").VerifiedEmail, import("@yielded/auth/AuthStore").EmailOtpRejected | import("@yielded/auth/Errors").AuthStoreError>;
|
|
313
|
-
readonly issueRegistration: (input: import("@yielded/auth/Schema").NewRegistration) => Effect.Effect<void, import("@yielded/auth/Errors").AuthStoreError>;
|
|
314
|
-
readonly inspectRegistration: (tokenDigest: import("@yielded/auth/Schema").TokenDigest) => Effect.Effect<import("@yielded/auth/Schema").PendingRegistration, import("@yielded/auth/Errors").InvalidRegistration | import("@yielded/auth/Errors").AuthStoreError>;
|
|
315
|
-
readonly consumeRegistration: (input: import("@yielded/auth/Schema").ConsumeRegistration) => Effect.Effect<void, import("@yielded/auth/Errors").InvalidRegistration | import("@yielded/auth/Errors").AuthStoreError>;
|
|
316
|
-
};
|
|
317
|
-
readonly oauthStateStore: {
|
|
318
|
-
readonly issue: (state: import("@yielded/auth/OAuth").OAuthState) => Effect.Effect<void, import("@yielded/auth/Errors").AuthStoreError>;
|
|
319
|
-
readonly consume: (stateDigest: import("@yielded/auth/Schema").TokenDigest) => Effect.Effect<import("@yielded/auth/OAuth").OAuthState, import("@yielded/auth/OAuth").InvalidOAuthState | import("@yielded/auth/Errors").AuthStoreError>;
|
|
320
|
-
};
|
|
321
|
-
readonly decisions: {
|
|
322
|
-
readonly consumeChallenge: (input: import("@yielded/auth/Schema").ConsumeChallenge) => Effect.Effect<import("@yielded/auth/AuthStore").ChallengeConsumeDecision, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
323
|
-
readonly consumeRegistration: (input: import("@yielded/auth/Schema").ConsumeRegistration) => Effect.Effect<import("@yielded/auth/AuthStore").ConsumeDecision<void>, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
324
|
-
readonly consumeOAuthState: (digest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">) => Effect.Effect<import("@yielded/auth/AuthStore").ConsumeDecision<import("@yielded/auth/OAuth").OAuthState>, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
325
|
-
};
|
|
326
|
-
};
|
|
327
|
-
export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteBunDatabase<AnyRelations>, mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => {
|
|
291
|
+
export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => Effect.Effect<{
|
|
328
292
|
subjectProvisioner: {
|
|
329
293
|
readonly provision: (input: import("@yielded/auth/Identity").SubjectProvisioningInput) => Effect.Effect<import("@yielded/auth/Identity").ProvisioningResult, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
330
294
|
};
|
|
331
295
|
externalIdentityMutation: {
|
|
332
296
|
readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => Effect.Effect<void, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
333
297
|
};
|
|
334
|
-
}
|
|
335
|
-
export declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(
|
|
298
|
+
}, never, Database>;
|
|
299
|
+
export declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => Effect.Effect<{
|
|
336
300
|
readonly subjectProvisioner: {
|
|
337
301
|
readonly provision: (input: import("@yielded/auth/Identity").SubjectProvisioningInput) => Effect.Effect<import("@yielded/auth/Identity").ProvisioningResult, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
338
302
|
};
|
|
339
|
-
}
|
|
340
|
-
export declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(
|
|
303
|
+
}, never, Database>;
|
|
304
|
+
export declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(mapping: ExternalIdentityTables<Subject, External, NativeId>) => Effect.Effect<{
|
|
341
305
|
readonly externalIdentityMutation: {
|
|
342
306
|
readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => Effect.Effect<void, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
343
307
|
};
|
|
344
|
-
}
|
|
345
|
-
export declare const makePasswordPreparedPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable = AnySQLiteTable, PC extends AnySQLiteTable = AnySQLiteTable, PM extends AnySQLiteTable = AnySQLiteTable, PSub extends AnySQLiteTable = AnySQLiteTable, PI extends AnySQLiteTable = AnySQLiteTable, PCr extends AnySQLiteTable = AnySQLiteTable, PNativeId = unknown>(
|
|
308
|
+
}, never, Database>;
|
|
309
|
+
export declare const makePasswordPreparedPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable = AnySQLiteTable, PC extends AnySQLiteTable = AnySQLiteTable, PM extends AnySQLiteTable = AnySQLiteTable, PSub extends AnySQLiteTable = AnySQLiteTable, PI extends AnySQLiteTable = AnySQLiteTable, PCr extends AnySQLiteTable = AnySQLiteTable, PNativeId = unknown>(mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>, proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined) => Effect.Effect<{
|
|
346
310
|
passwordPreparedPersistence: import("@yielded/auth/Password").PasswordPreparedPersistence;
|
|
347
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, coordinatePasswordPreparedPersistence: {
|
|
311
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinatePasswordPreparedPersistence: {
|
|
348
312
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable, PC extends AnySQLiteTable, PM extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
349
313
|
readonly mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>;
|
|
350
314
|
readonly proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined;
|
|
351
315
|
readonly target: SuppliedService<TargetId, import("@yielded/auth/Password").PasswordPreparedPersistence>;
|
|
352
316
|
readonly transaction?: never;
|
|
353
|
-
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/
|
|
317
|
+
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId>>;
|
|
354
318
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable, PC extends AnySQLiteTable, PM extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
355
319
|
readonly mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>;
|
|
356
320
|
readonly proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined;
|
|
357
321
|
readonly target: SuppliedService<TargetId, import("@yielded/auth/Password").PasswordPreparedPersistence>;
|
|
358
322
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
359
|
-
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/
|
|
323
|
+
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
|
|
360
324
|
};
|
|
361
325
|
export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
362
326
|
dialect: "sqlite";
|
|
@@ -372,7 +336,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
372
336
|
dialect: "sqlite";
|
|
373
337
|
}>, U extends AnySQLiteTable<{
|
|
374
338
|
dialect: "sqlite";
|
|
375
|
-
}>, N>(
|
|
339
|
+
}>, N>(mapping: OAuthAccountsMapping<S, O, C, AC, F, TA, U, N>) => Effect.Effect<{
|
|
376
340
|
oauthAccountsPersistence: {
|
|
377
341
|
readonly capture: (input: {
|
|
378
342
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
@@ -398,6 +362,21 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
398
362
|
readonly generation: number;
|
|
399
363
|
readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
|
|
400
364
|
readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
|
|
365
|
+
readonly access?: {
|
|
366
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
367
|
+
readonly generation: number;
|
|
368
|
+
readonly issuance: "active" | "retired";
|
|
369
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
370
|
+
readonly clientRegistrationId: string;
|
|
371
|
+
readonly scopes: readonly string[];
|
|
372
|
+
readonly resources: readonly string[];
|
|
373
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
374
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
375
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
376
|
+
readonly refreshAheadMillis: number;
|
|
377
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
378
|
+
readonly revocation: "cohort" | "unsupported";
|
|
379
|
+
} | undefined;
|
|
401
380
|
readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
|
|
402
381
|
readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
403
382
|
readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
@@ -449,6 +428,21 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
449
428
|
readonly generation: number;
|
|
450
429
|
readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
|
|
451
430
|
readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
|
|
431
|
+
readonly access?: {
|
|
432
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
433
|
+
readonly generation: number;
|
|
434
|
+
readonly issuance: "active" | "retired";
|
|
435
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
436
|
+
readonly clientRegistrationId: string;
|
|
437
|
+
readonly scopes: readonly string[];
|
|
438
|
+
readonly resources: readonly string[];
|
|
439
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
440
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
441
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
442
|
+
readonly refreshAheadMillis: number;
|
|
443
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
444
|
+
readonly revocation: "cohort" | "unsupported";
|
|
445
|
+
} | undefined;
|
|
452
446
|
readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
|
|
453
447
|
readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
454
448
|
readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
@@ -488,12 +482,12 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
488
482
|
readonly nowMillis: number;
|
|
489
483
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
490
484
|
readonly _tag: "Rejected";
|
|
485
|
+
} | {
|
|
486
|
+
readonly _tag: "Cancelled";
|
|
491
487
|
} | {
|
|
492
488
|
readonly _tag: "Ambiguous";
|
|
493
489
|
} | {
|
|
494
490
|
readonly _tag: "Conflict";
|
|
495
|
-
} | {
|
|
496
|
-
readonly _tag: "Cancelled";
|
|
497
491
|
} | {
|
|
498
492
|
readonly _tag: "Linked";
|
|
499
493
|
readonly credential: {
|
|
@@ -592,7 +586,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
592
586
|
readonly hasMore: boolean;
|
|
593
587
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
594
588
|
};
|
|
595
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthSignInServices: <S extends AnySQLiteTable<{
|
|
589
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthSignInServices: <S extends AnySQLiteTable<{
|
|
596
590
|
dialect: "sqlite";
|
|
597
591
|
}>, O extends AnySQLiteTable<{
|
|
598
592
|
dialect: "sqlite";
|
|
@@ -602,7 +596,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
602
596
|
dialect: "sqlite";
|
|
603
597
|
}>, F extends AnySQLiteTable<{
|
|
604
598
|
dialect: "sqlite";
|
|
605
|
-
}>, N>(
|
|
599
|
+
}>, N>(mapping: OAuthSignInMapping<S, O, C, AC, F, N>) => Effect.Effect<{
|
|
606
600
|
oauthSignInPersistence: {
|
|
607
601
|
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>;
|
|
608
602
|
readonly claim: <A>(input: {
|
|
@@ -634,7 +628,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
634
628
|
readonly hasMore: boolean;
|
|
635
629
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
636
630
|
};
|
|
637
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationIntentServices: <S extends AnySQLiteTable<{
|
|
631
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationIntentServices: <S extends AnySQLiteTable<{
|
|
638
632
|
dialect: "sqlite";
|
|
639
633
|
}>, O extends AnySQLiteTable<{
|
|
640
634
|
dialect: "sqlite";
|
|
@@ -648,7 +642,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
648
642
|
dialect: "sqlite";
|
|
649
643
|
}>, I extends AnySQLiteTable<{
|
|
650
644
|
dialect: "sqlite";
|
|
651
|
-
}>, N>(
|
|
645
|
+
}>, N>(mapping: OAuthRegistrationIntentMapping<S, O, C, AC, F, TA, I, N>) => Effect.Effect<{
|
|
652
646
|
oauthRegistrationIntents: {
|
|
653
647
|
readonly settle: <A>(input: {
|
|
654
648
|
readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
|
|
@@ -657,7 +651,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
657
651
|
readonly nowMillis: number;
|
|
658
652
|
}, 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>;
|
|
659
653
|
};
|
|
660
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationServices: <Registration, S extends AnySQLiteTable<{
|
|
654
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationServices: <Registration, S extends AnySQLiteTable<{
|
|
661
655
|
dialect: "sqlite";
|
|
662
656
|
}>, O extends AnySQLiteTable<{
|
|
663
657
|
dialect: "sqlite";
|
|
@@ -671,9 +665,9 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
671
665
|
dialect: "sqlite";
|
|
672
666
|
}>, R extends AnySQLiteTable<{
|
|
673
667
|
dialect: "sqlite";
|
|
674
|
-
}>, N>(
|
|
668
|
+
}>, N>(mapping: OAuthRegistrationMapping<Registration, S, O, C, AC, TA, I, R, N>) => Effect.Effect<{
|
|
675
669
|
registrationAuthority: OAuthRegistrationAuthority<Registration>;
|
|
676
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthRegistration: {
|
|
670
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthRegistration: {
|
|
677
671
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnySQLiteTable<{
|
|
678
672
|
dialect: "sqlite";
|
|
679
673
|
}>, O extends AnySQLiteTable<{
|
|
@@ -845,8 +839,100 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
845
839
|
dialect: "sqlite";
|
|
846
840
|
}>, N, J extends AnySQLiteTable<{
|
|
847
841
|
dialect: "sqlite";
|
|
848
|
-
}> = never>(
|
|
842
|
+
}> = never>(mapping: OAuthConnectedMapping<S, AC, T, O, F, G, C, H, UA, DC, N, J>) => Effect.Effect<{
|
|
849
843
|
oauthConnectedPersistence: {
|
|
844
|
+
readonly claimSignIn: <A>(input: {
|
|
845
|
+
readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
|
|
846
|
+
readonly configuration: import("@yielded/auth/OAuth").OAuthConnectedConfiguration;
|
|
847
|
+
}, 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>;
|
|
848
|
+
readonly inspectSignIn: (input: {
|
|
849
|
+
readonly reservation: import("@yielded/auth/OAuth").OAuthSignInAccessClaim;
|
|
850
|
+
readonly credential: import("@yielded/auth/OAuth").OAuthCredentialSnapshot;
|
|
851
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
852
|
+
}) => Effect.Effect<import("@yielded/auth/OAuth").OAuthSignInAccessInspection, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
853
|
+
readonly settleSignIn: <A>(input: {
|
|
854
|
+
readonly reservation: import("@yielded/auth/OAuth").OAuthSignInAccessClaim;
|
|
855
|
+
readonly outcome: import("@yielded/auth/OAuth").OAuthSignInAccessOutcome;
|
|
856
|
+
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
857
|
+
readonly _tag: "Rejected";
|
|
858
|
+
} | {
|
|
859
|
+
readonly _tag: "Cancelled";
|
|
860
|
+
} | {
|
|
861
|
+
readonly _tag: "Ambiguous";
|
|
862
|
+
} | {
|
|
863
|
+
readonly _tag: "Connected";
|
|
864
|
+
readonly grant: {
|
|
865
|
+
readonly context: {
|
|
866
|
+
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
867
|
+
readonly exchangeOrder: string;
|
|
868
|
+
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
869
|
+
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
870
|
+
readonly identity: {
|
|
871
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
872
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
873
|
+
readonly subject: string;
|
|
874
|
+
};
|
|
875
|
+
readonly configuration: {
|
|
876
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
877
|
+
readonly protocol: "oauth" | "oidc";
|
|
878
|
+
readonly configurationGeneration: number;
|
|
879
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
880
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
881
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
882
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
883
|
+
readonly profile: {
|
|
884
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
885
|
+
readonly generation: number;
|
|
886
|
+
readonly issuance: "active" | "retired";
|
|
887
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
888
|
+
readonly clientRegistrationId: string;
|
|
889
|
+
readonly scopes: readonly string[];
|
|
890
|
+
readonly resources: readonly string[];
|
|
891
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
892
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
893
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
894
|
+
readonly refreshAheadMillis: number;
|
|
895
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
896
|
+
readonly revocation: "cohort" | "unsupported";
|
|
897
|
+
};
|
|
898
|
+
};
|
|
899
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
900
|
+
readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
901
|
+
readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
902
|
+
readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
903
|
+
readonly metadata: {
|
|
904
|
+
readonly scopes: readonly string[];
|
|
905
|
+
readonly resources: readonly string[];
|
|
906
|
+
readonly accessExpiresAtMillis?: number | undefined;
|
|
907
|
+
readonly refreshExpiresAtMillis?: number | undefined;
|
|
908
|
+
readonly useUntilMillis: number;
|
|
909
|
+
readonly refreshUseUntilMillis?: number | undefined;
|
|
910
|
+
readonly obtainedAtMillis: number;
|
|
911
|
+
readonly profile?: {
|
|
912
|
+
readonly displayName?: string | undefined;
|
|
913
|
+
readonly handle?: string | undefined;
|
|
914
|
+
readonly avatarUrl?: string | undefined;
|
|
915
|
+
readonly profileUrl?: string | undefined;
|
|
916
|
+
readonly email?: string | undefined;
|
|
917
|
+
readonly emailVerified?: boolean | undefined;
|
|
918
|
+
readonly providerData?: {
|
|
919
|
+
readonly [x: string]: import("effect/Schema").Json;
|
|
920
|
+
} | undefined;
|
|
921
|
+
} | undefined;
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
readonly sealed: {
|
|
925
|
+
readonly format: "oauth-connected-xchacha20poly1305-v1";
|
|
926
|
+
readonly keyId: string;
|
|
927
|
+
readonly nonce: string;
|
|
928
|
+
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
} | {
|
|
932
|
+
readonly _tag: "Conflict";
|
|
933
|
+
} | {
|
|
934
|
+
readonly _tag: "Busy";
|
|
935
|
+
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
850
936
|
readonly capture: (input: {
|
|
851
937
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
852
938
|
readonly subjectId: import("@yielded/auth/Schema").SubjectId;
|
|
@@ -875,6 +961,21 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
875
961
|
readonly generation: number;
|
|
876
962
|
readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
|
|
877
963
|
readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
|
|
964
|
+
readonly access?: {
|
|
965
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
966
|
+
readonly generation: number;
|
|
967
|
+
readonly issuance: "active" | "retired";
|
|
968
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
969
|
+
readonly clientRegistrationId: string;
|
|
970
|
+
readonly scopes: readonly string[];
|
|
971
|
+
readonly resources: readonly string[];
|
|
972
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
973
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
974
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
975
|
+
readonly refreshAheadMillis: number;
|
|
976
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
977
|
+
readonly revocation: "cohort" | "unsupported";
|
|
978
|
+
} | undefined;
|
|
878
979
|
readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
|
|
879
980
|
readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
880
981
|
readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
@@ -977,6 +1078,21 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
977
1078
|
readonly generation: number;
|
|
978
1079
|
readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
|
|
979
1080
|
readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
|
|
1081
|
+
readonly access?: {
|
|
1082
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
1083
|
+
readonly generation: number;
|
|
1084
|
+
readonly issuance: "active" | "retired";
|
|
1085
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1086
|
+
readonly clientRegistrationId: string;
|
|
1087
|
+
readonly scopes: readonly string[];
|
|
1088
|
+
readonly resources: readonly string[];
|
|
1089
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
1090
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
1091
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
1092
|
+
readonly refreshAheadMillis: number;
|
|
1093
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
1094
|
+
readonly revocation: "cohort" | "unsupported";
|
|
1095
|
+
} | undefined;
|
|
980
1096
|
readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
|
|
981
1097
|
readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
982
1098
|
readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
@@ -1069,14 +1185,14 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1069
1185
|
};
|
|
1070
1186
|
}) => Effect.Effect<{
|
|
1071
1187
|
readonly _tag: "Rejected";
|
|
1188
|
+
} | {
|
|
1189
|
+
readonly _tag: "Conflict";
|
|
1072
1190
|
} | {
|
|
1073
1191
|
readonly _tag: "Target";
|
|
1074
1192
|
readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1075
1193
|
} | {
|
|
1076
1194
|
readonly _tag: "Quarantine";
|
|
1077
1195
|
readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1078
|
-
} | {
|
|
1079
|
-
readonly _tag: "Conflict";
|
|
1080
1196
|
}, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1081
1197
|
readonly settle: <A>(input: {
|
|
1082
1198
|
readonly claim: import("@yielded/auth/OAuth").OAuthConnectedClaim;
|
|
@@ -1085,17 +1201,16 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1085
1201
|
readonly nowMillis: number;
|
|
1086
1202
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1087
1203
|
readonly _tag: "Rejected";
|
|
1088
|
-
} | {
|
|
1089
|
-
readonly _tag: "Ambiguous";
|
|
1090
|
-
} | {
|
|
1091
|
-
readonly _tag: "Conflict";
|
|
1092
1204
|
} | {
|
|
1093
1205
|
readonly _tag: "Cancelled";
|
|
1206
|
+
} | {
|
|
1207
|
+
readonly _tag: "Ambiguous";
|
|
1094
1208
|
} | {
|
|
1095
1209
|
readonly _tag: "Connected";
|
|
1096
1210
|
readonly grant: {
|
|
1097
1211
|
readonly context: {
|
|
1098
1212
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
1213
|
+
readonly exchangeOrder: string;
|
|
1099
1214
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
1100
1215
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
1101
1216
|
readonly identity: {
|
|
@@ -1159,6 +1274,8 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1159
1274
|
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
1160
1275
|
};
|
|
1161
1276
|
};
|
|
1277
|
+
} | {
|
|
1278
|
+
readonly _tag: "Conflict";
|
|
1162
1279
|
} | {
|
|
1163
1280
|
readonly _tag: "Busy";
|
|
1164
1281
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
@@ -1206,6 +1323,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1206
1323
|
readonly grant: {
|
|
1207
1324
|
readonly context: {
|
|
1208
1325
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
1326
|
+
readonly exchangeOrder: string;
|
|
1209
1327
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
1210
1328
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
1211
1329
|
readonly identity: {
|
|
@@ -1318,6 +1436,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1318
1436
|
readonly grant: {
|
|
1319
1437
|
readonly context: {
|
|
1320
1438
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
1439
|
+
readonly exchangeOrder: string;
|
|
1321
1440
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
1322
1441
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
1323
1442
|
readonly identity: {
|
|
@@ -1402,6 +1521,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1402
1521
|
readonly grant: {
|
|
1403
1522
|
readonly context: {
|
|
1404
1523
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
1524
|
+
readonly exchangeOrder: string;
|
|
1405
1525
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
1406
1526
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
1407
1527
|
readonly identity: {
|
|
@@ -1465,6 +1585,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1465
1585
|
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
1466
1586
|
};
|
|
1467
1587
|
};
|
|
1588
|
+
readonly order: string;
|
|
1468
1589
|
readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
|
|
1469
1590
|
readonly claimedAtMillis: number;
|
|
1470
1591
|
readonly claimExpiresAtMillis: number;
|
|
@@ -1484,6 +1605,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1484
1605
|
readonly grant: {
|
|
1485
1606
|
readonly context: {
|
|
1486
1607
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
1608
|
+
readonly exchangeOrder: string;
|
|
1487
1609
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
1488
1610
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
1489
1611
|
readonly identity: {
|
|
@@ -1573,7 +1695,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1573
1695
|
readonly hasMore: boolean;
|
|
1574
1696
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1575
1697
|
};
|
|
1576
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnySQLiteTable<{
|
|
1698
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnySQLiteTable<{
|
|
1577
1699
|
dialect: "sqlite";
|
|
1578
1700
|
}>, O extends AnySQLiteTable<{
|
|
1579
1701
|
dialect: "sqlite";
|
|
@@ -1587,7 +1709,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1587
1709
|
dialect: "sqlite";
|
|
1588
1710
|
}>, J extends AnySQLiteTable<{
|
|
1589
1711
|
dialect: "sqlite";
|
|
1590
|
-
}>, N>(
|
|
1712
|
+
}>, N>(mapping: OAuthConnectedRevocationMapping<T, O, F, G, C, H, J, N>) => Effect.Effect<{
|
|
1591
1713
|
oauthConnectedRevocations: {
|
|
1592
1714
|
readonly claim: <A>(input: {
|
|
1593
1715
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
@@ -1602,6 +1724,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1602
1724
|
readonly jobId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
|
|
1603
1725
|
readonly token: {
|
|
1604
1726
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
1727
|
+
readonly exchangeOrder: string;
|
|
1605
1728
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
1606
1729
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
1607
1730
|
readonly identity: {
|
|
@@ -1680,7 +1803,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1680
1803
|
readonly settled: boolean;
|
|
1681
1804
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1682
1805
|
};
|
|
1683
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
|
|
1806
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
|
|
1684
1807
|
<D extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1685
1808
|
dialect: "sqlite";
|
|
1686
1809
|
}>, AC extends AnySQLiteTable<{
|
|
@@ -1775,7 +1898,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1775
1898
|
} ? Parameters<Parameters<D["transaction"]>[0]>[0] : never>, TxShape>;
|
|
1776
1899
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthConnectedRevocations>>;
|
|
1777
1900
|
};
|
|
1778
|
-
export declare const makePasskeyCredentialServices: <
|
|
1901
|
+
export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
1779
1902
|
dialect: "sqlite";
|
|
1780
1903
|
}>, C extends AnySQLiteTable<{
|
|
1781
1904
|
dialect: "sqlite";
|
|
@@ -1785,7 +1908,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
1785
1908
|
dialect: "sqlite";
|
|
1786
1909
|
}>, H extends AnySQLiteTable<{
|
|
1787
1910
|
dialect: "sqlite";
|
|
1788
|
-
}>, N, RSetup = never>(
|
|
1911
|
+
}>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyCredentialMapping<S, C, F, O, H, N>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyCredentialServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | Exclude<RSetup, NativeDatabase>>, makePasskeyPersistenceServices: <S extends AnySQLiteTable<{
|
|
1789
1912
|
dialect: "sqlite";
|
|
1790
1913
|
}>, C extends AnySQLiteTable<{
|
|
1791
1914
|
dialect: "sqlite";
|
|
@@ -1803,7 +1926,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
1803
1926
|
dialect: "sqlite";
|
|
1804
1927
|
}>, Charge extends AnySQLiteTable<{
|
|
1805
1928
|
dialect: "sqlite";
|
|
1806
|
-
}>, N, RSetup = never>(
|
|
1929
|
+
}>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyPersistenceMapping<PasskeyCredentialMapping<S, C, F, O, H, N>, M, Flow, Admission, Charge, N>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyPersistenceServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, makePasskeyEnrollmentContextServices: <S extends AnySQLiteTable<{
|
|
1807
1930
|
dialect: "sqlite";
|
|
1808
1931
|
}>, C extends AnySQLiteTable<{
|
|
1809
1932
|
dialect: "sqlite";
|
|
@@ -1815,7 +1938,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
1815
1938
|
dialect: "sqlite";
|
|
1816
1939
|
}>, M extends AnySQLiteTable<{
|
|
1817
1940
|
dialect: "sqlite";
|
|
1818
|
-
}>, N, RSetup = never>(
|
|
1941
|
+
}>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyEnrollmentContextMapping<PasskeyCredentialMapping<S, C, F, O, H, N>, M, N>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyEnrollmentContextServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | Exclude<RSetup, NativeDatabase>>, makePasskeyRegistrationCeremonyServices: <M extends AnySQLiteTable<{
|
|
1819
1942
|
dialect: "sqlite";
|
|
1820
1943
|
}>, Flow extends AnySQLiteTable<{
|
|
1821
1944
|
dialect: "sqlite";
|
|
@@ -1827,7 +1950,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
1827
1950
|
dialect: "sqlite";
|
|
1828
1951
|
}>, H extends AnySQLiteTable<{
|
|
1829
1952
|
dialect: "sqlite";
|
|
1830
|
-
}>, RSetup = never>(
|
|
1953
|
+
}>, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationCeremonyMapping<M, Flow, Admission, Charge, Intent, H>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyRegistrationCeremonyServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinatePasskeyPersistence: {
|
|
1831
1954
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1832
1955
|
dialect: "sqlite";
|
|
1833
1956
|
}>, C extends AnySQLiteTable<{
|
|
@@ -1909,7 +2032,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
1909
2032
|
readonly transaction: (...args: any[]) => any;
|
|
1910
2033
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
1911
2034
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
1912
|
-
}, makePasskeyManagementServices: <
|
|
2035
|
+
}, makePasskeyManagementServices: <S extends AnySQLiteTable<{
|
|
1913
2036
|
dialect: "sqlite";
|
|
1914
2037
|
}>, C extends AnySQLiteTable<{
|
|
1915
2038
|
dialect: "sqlite";
|
|
@@ -1929,7 +2052,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
1929
2052
|
dialect: "sqlite";
|
|
1930
2053
|
}>, Command extends AnySQLiteTable<{
|
|
1931
2054
|
dialect: "sqlite";
|
|
1932
|
-
}>, N, RSetup = never>(
|
|
2055
|
+
}>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyManagementMapping<S, C, F, O, H, M, Flow, Admission, Charge, Command, N>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyManagementServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, makePasskeyRegistrationServices: <S extends AnySQLiteTable<{
|
|
1933
2056
|
dialect: "sqlite";
|
|
1934
2057
|
}>, C extends AnySQLiteTable<{
|
|
1935
2058
|
dialect: "sqlite";
|
|
@@ -1949,7 +2072,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
1949
2072
|
dialect: "sqlite";
|
|
1950
2073
|
}>, Intent extends AnySQLiteTable<{
|
|
1951
2074
|
dialect: "sqlite";
|
|
1952
|
-
}>, N, Value, RSetup = never>(
|
|
2075
|
+
}>, N, Value, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyRegistrationServices<Value>, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinatePasskeyManagement: {
|
|
1953
2076
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1954
2077
|
dialect: "sqlite";
|
|
1955
2078
|
}>, C extends AnySQLiteTable<{
|
|
@@ -2023,7 +2146,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
2023
2146
|
dialect: "sqlite";
|
|
2024
2147
|
}>, N, Value, A, E, R, AuthorityId, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
2025
2148
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value>, RSetup>;
|
|
2026
|
-
readonly authority:
|
|
2149
|
+
readonly authority: Context.Key<AuthorityId, import("@yielded/auth-persistence/Adapter").PasskeyRegistrationWriter<Value>>;
|
|
2027
2150
|
readonly transaction?: never;
|
|
2028
2151
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, AuthorityId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2029
2152
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
@@ -2048,19 +2171,19 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
2048
2171
|
dialect: "sqlite";
|
|
2049
2172
|
}>, N, Value, A, E, R, AuthorityId, TxId, TxShape, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
2050
2173
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value>, RSetup>;
|
|
2051
|
-
readonly authority:
|
|
2174
|
+
readonly authority: Context.Key<AuthorityId, import("@yielded/auth-persistence/Adapter").PasskeyRegistrationWriter<Value>>;
|
|
2052
2175
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
2053
2176
|
readonly transaction: (...args: any[]) => any;
|
|
2054
2177
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2055
2178
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, AuthorityId | TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2056
2179
|
};
|
|
2057
|
-
export declare const makeTotpPersistenceServices: <
|
|
2180
|
+
export declare const makeTotpPersistenceServices: <S extends AnySQLiteTable<{
|
|
2058
2181
|
dialect: "sqlite";
|
|
2059
2182
|
}>, F extends AnySQLiteTable<{
|
|
2060
2183
|
dialect: "sqlite";
|
|
2061
2184
|
}>, C extends AnySQLiteTable<{
|
|
2062
2185
|
dialect: "sqlite";
|
|
2063
|
-
}>, N, RSetup = never>(
|
|
2186
|
+
}>, N, RSetup = never>(mapping: TotpMappingSource<TotpMapping<S, F, C, N>, RSetup>) => Effect.Effect<TotpPersistenceServices, import("@yielded/auth-persistence/Adapter").PersistenceMappingError | import("@yielded/auth/Totp").TotpConfigurationError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinateTotpPersistence: {
|
|
2064
2187
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2065
2188
|
dialect: "sqlite";
|
|
2066
2189
|
}>, F extends AnySQLiteTable<{
|
|
@@ -2084,7 +2207,7 @@ export declare const makeTotpPersistenceServices: <Database extends EffectSQLite
|
|
|
2084
2207
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2085
2208
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | TotpCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Totp").TotpPersistence>>;
|
|
2086
2209
|
};
|
|
2087
|
-
export declare const makePhonePersistenceServices: <
|
|
2210
|
+
export declare const makePhonePersistenceServices: <S extends AnySQLiteTable<{
|
|
2088
2211
|
dialect: "sqlite";
|
|
2089
2212
|
}>, I extends AnySQLiteTable<{
|
|
2090
2213
|
dialect: "sqlite";
|
|
@@ -2092,7 +2215,7 @@ export declare const makePhonePersistenceServices: <Database extends EffectSQLit
|
|
|
2092
2215
|
dialect: "sqlite";
|
|
2093
2216
|
}>, C extends AnySQLiteTable<{
|
|
2094
2217
|
dialect: "sqlite";
|
|
2095
|
-
}>, N, RSetup = never>(
|
|
2218
|
+
}>, N, RSetup = never>(mapping: PhoneMappingSource<PhoneMapping<S, I, C, F, N>, RSetup>) => Effect.Effect<PhonePersistenceServices, import("@yielded/auth-persistence/Adapter").PersistenceMappingError | import("@yielded/auth/PhoneOtp").PhoneConfigurationError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinatePhonePersistence: {
|
|
2096
2219
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2097
2220
|
dialect: "sqlite";
|
|
2098
2221
|
}>, I extends AnySQLiteTable<{
|
|
@@ -2122,8 +2245,8 @@ export declare const makePhonePersistenceServices: <Database extends EffectSQLit
|
|
|
2122
2245
|
};
|
|
2123
2246
|
export declare const AuthPersistence: {
|
|
2124
2247
|
make: <C extends import("@yielded/auth-persistence/Adapter").ClaimsCodec, const Id extends string, const A extends import("@yielded/auth-persistence/Adapter").Definition<C, Id>>(auth: A & import("@yielded/auth-persistence/Adapter").Definition<C, Id>) => import("@yielded/auth-persistence/Adapter").BoundPersistence<import("drizzle-orm/sqlite-core").SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig>, import("@effect/sql-sqlite-bun/SqliteClient").SqliteClient, C, Id, A>;
|
|
2125
|
-
migrationsLayer: (options: import("drizzle-orm/migrator").MigrationConfig) =>
|
|
2248
|
+
migrationsLayer: (options: import("drizzle-orm/migrator").MigrationConfig) => Layer.Layer<never, import("drizzle-orm/effect-core").EffectDrizzleQueryError | import("drizzle-orm/effect-core").MigratorInitError | import("@yielded/auth-persistence/Adapter").PersistenceConfigurationError | import("effect/sql/SqlError").SqlError, import("@effect/sql-sqlite-bun/SqliteClient").SqliteClient>;
|
|
2126
2249
|
};
|
|
2127
2250
|
//#endregion
|
|
2128
|
-
export {
|
|
2251
|
+
export { passwordPreparedPersistenceLayer };
|
|
2129
2252
|
//# sourceMappingURL=SqliteBun.d.mts.map
|