@yielded/auth-persistence 0.1.0-beta.8 → 0.1.0-beta.9
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 +4 -0
- package/dist/DrizzleD1.d.mts +7 -7
- package/dist/DrizzleLibsql.d.mts +31 -31
- package/dist/DrizzleLibsql.mjs +7 -22
- package/dist/DrizzleLibsql.mjs.map +1 -1
- package/dist/DrizzleMysql2.d.mts +8 -8
- package/dist/DrizzlePglite.d.mts +15 -15
- package/dist/DrizzlePostgres.d.mts +13 -13
- package/dist/DrizzleSqliteBun.d.mts +24 -24
- package/dist/DrizzleSqliteDo.d.mts +29 -29
- package/dist/DrizzleSqliteNode.d.mts +22 -22
- package/dist/DrizzleSqliteWasm.d.mts +24 -24
- package/dist/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/drizzle/D1BatchStatements.d.mts +1 -2
- package/dist/drizzle/SuppliedService.d.mts +1 -2
- package/dist/drizzle/d1-emails.d.mts +5 -6
- package/dist/drizzle/d1-identity.d.mts +2 -3
- package/dist/drizzle/d1-oauth.d.mts +10 -11
- package/dist/drizzle/d1-passkey.d.mts +5 -6
- package/dist/drizzle/d1-password-prepared.d.mts +2 -3
- package/dist/drizzle/d1-passwords.d.mts +4 -5
- package/dist/drizzle/d1-phone.d.mts +2 -3
- package/dist/drizzle/d1-planning.d.mts +1 -2
- package/dist/drizzle/d1-proofs.d.mts +2 -3
- package/dist/drizzle/d1-sessions.d.mts +10 -11
- package/dist/drizzle/d1-totp.d.mts +2 -3
- package/dist/drizzle/email-model.d.mts +30 -31
- package/dist/drizzle/email-registration.d.mts +1 -2
- package/dist/drizzle/email-target.d.mts +3 -4
- package/dist/drizzle/model.d.mts +41 -41
- package/dist/drizzle/model.mjs +3 -5
- package/dist/drizzle/model.mjs.map +1 -1
- package/dist/drizzle/mysql-emails.d.mts +7 -8
- package/dist/drizzle/mysql-identity.d.mts +2 -3
- package/dist/drizzle/mysql-password-prepared.d.mts +3 -4
- package/dist/drizzle/mysql-passwords.d.mts +6 -7
- package/dist/drizzle/mysql-proofs.d.mts +3 -4
- package/dist/drizzle/mysql-sessions.d.mts +15 -16
- package/dist/drizzle/mysql.d.mts +8 -9
- package/dist/drizzle/oauth-connected-model.d.mts +21 -22
- package/dist/drizzle/oauth-connected-reference.d.mts +1 -2
- package/dist/drizzle/oauth-connected-state.d.mts +1950 -7
- package/dist/drizzle/oauth-connected-target.d.mts +7 -8
- package/dist/drizzle/oauth-flow.d.mts +22 -2
- package/dist/drizzle/oauth-model.d.mts +45 -46
- package/dist/drizzle/oauth-owner.d.mts +10 -2
- package/dist/drizzle/oauth-target.d.mts +9 -10
- package/dist/drizzle/passkey-model.d.mts +34 -35
- package/dist/drizzle/passkey-registration-ceremony-model.d.mts +5 -6
- package/dist/drizzle/passkey-write-model.d.mts +13 -14
- package/dist/drizzle/password-model.d.mts +29 -30
- package/dist/drizzle/password-prepared-model.d.mts +10 -11
- package/dist/drizzle/password-prepared-target.d.mts +1 -2
- package/dist/drizzle/password-registration.d.mts +1 -2
- package/dist/drizzle/password-target.d.mts +2 -3
- package/dist/drizzle/pg-emails.d.mts +7 -8
- package/dist/drizzle/pg-password-prepared.d.mts +3 -4
- package/dist/drizzle/pg-passwords.d.mts +6 -7
- package/dist/drizzle/pg-proofs.d.mts +3 -4
- package/dist/drizzle/pg-sessions.d.mts +15 -16
- package/dist/drizzle/pg.d.mts +10 -11
- package/dist/drizzle/phone-model.d.mts +9 -10
- package/dist/drizzle/phone-target.d.mts +1 -2
- package/dist/drizzle/proof-model.d.mts +25 -26
- package/dist/drizzle/proof-target.d.mts +1 -2
- package/dist/drizzle/session-model.d.mts +25 -26
- package/dist/drizzle/session-target.d.mts +4 -5
- package/dist/drizzle/sqlite.d.mts +8 -9
- package/dist/drizzle/standalone-guard.mjs +3 -5
- package/dist/drizzle/standalone-guard.mjs.map +1 -1
- package/dist/drizzle/step-up-model.d.mts +6 -7
- package/dist/drizzle/totp-model.d.mts +7 -8
- package/dist/drizzle/totp-state.d.mts +2 -3
- package/dist/drizzle/totp-target.d.mts +1 -2
- package/dist/drizzle/transaction-mysql.mjs +1 -0
- package/dist/drizzle/transaction-mysql.mjs.map +1 -1
- package/dist/drizzle/transaction-owner.d.mts +3 -2
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +2 -1
- package/dist/internal/configuration.d.mts +19 -19
- package/dist/internal/mapping-error.d.mts +2 -3
- package/dist/internal/oauth-app.d.mts +1 -2
- package/dist/internal/oauth-app.mjs +3 -4
- package/dist/internal/oauth-app.mjs.map +1 -1
- package/dist/internal/oauth-server.d.mts +10 -0
- package/dist/internal/oauth-server.mjs +66 -0
- package/dist/internal/oauth-server.mjs.map +1 -0
- package/dist/internal/passkey/target.d.mts +2 -3
- package/dist/internal/passkeys.mjs +2 -1
- package/dist/internal/passkeys.mjs.map +1 -1
- package/dist/internal/persistence.mjs +3 -2
- package/dist/internal/persistence.mjs.map +1 -1
- package/dist/internal/sql-persistence.d.mts +1 -2
- package/dist/internal/sql-table.d.mts +6 -7
- package/dist/internal/sql-table.mjs +12 -2
- package/dist/internal/sql-table.mjs.map +1 -1
- package/dist/internal/standalone.mjs +13 -0
- package/dist/internal/standalone.mjs.map +1 -0
- package/dist/internal/storage-tables.d.mts +5 -6
- package/dist/internal/transaction-execution-kernel.d.mts +2 -3
- package/dist/internal/transaction-execution-kernel.mjs +3 -5
- package/dist/internal/transaction-execution-kernel.mjs.map +1 -1
- package/dist/internal/transaction-kernel.d.mts +49 -2
- package/package.json +1 -1
- package/src/DrizzleLibsql.ts +10 -54
- package/src/drizzle/model.ts +8 -10
- package/src/drizzle/standalone-guard.ts +4 -9
- package/src/drizzle/transaction-mysql.ts +2 -0
- package/src/index.ts +1 -0
- package/src/internal/oauth-app.ts +4 -5
- package/src/internal/oauth-server.ts +89 -0
- package/src/internal/passkeys.ts +2 -6
- package/src/internal/persistence.ts +3 -5
- package/src/internal/sql-table.ts +17 -2
- package/src/internal/standalone.ts +30 -0
- package/src/internal/transaction-execution-kernel.ts +3 -7
|
@@ -35,7 +35,7 @@ import { EffectSQLiteDoDatabase } from "drizzle-orm/effect-sqlite-do";
|
|
|
35
35
|
* Email mutations must own their outer transactionSync. Arbitrary raw Drizzle
|
|
36
36
|
* nesting is not detectable; owner bodies and mapping allocators stay runSync-compatible.
|
|
37
37
|
*/
|
|
38
|
-
declare const coordinateEmailAddress: {
|
|
38
|
+
export declare const coordinateEmailAddress: {
|
|
39
39
|
<Database extends EffectSQLiteDoDatabase<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: {
|
|
40
40
|
readonly mapping: EmailAddressMapping<S, I, C, AC, M, NativeId>;
|
|
41
41
|
readonly proofMapping: ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any>;
|
|
@@ -93,7 +93,7 @@ declare const coordinateEmailAddress: {
|
|
|
93
93
|
* Arbitrary raw Drizzle nesting is not detectable; owner bodies must remain
|
|
94
94
|
* runSync-compatible. Detectable Effect commit scopes are rejected pre-write.
|
|
95
95
|
*/
|
|
96
|
-
declare const coordinatePasswordPersistence: {
|
|
96
|
+
export declare const coordinatePasswordPersistence: {
|
|
97
97
|
<Database extends EffectSQLiteDoDatabase<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: {
|
|
98
98
|
readonly mapping: PasswordPersistenceMapping<S, I, C, AC, A, RS, CE, M, NativeId>;
|
|
99
99
|
readonly proofMapping?: PM | undefined;
|
|
@@ -166,7 +166,7 @@ declare const coordinatePasswordPersistence: {
|
|
|
166
166
|
* Drizzle outer transaction; calling either boundary from one is unsupported.
|
|
167
167
|
* The owner body must remain runSync-compatible.
|
|
168
168
|
*/
|
|
169
|
-
declare const coordinateProofPersistence: {
|
|
169
|
+
export declare const coordinateProofPersistence: {
|
|
170
170
|
<Database extends EffectSQLiteDoDatabase<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: {
|
|
171
171
|
readonly mapping: ProofPersistenceMapping<Rq, S, G, Cn, Rs, Aev, F, C, Sub, I, Cr, NativeId>;
|
|
172
172
|
readonly transaction?: never;
|
|
@@ -233,7 +233,7 @@ declare const coordinateProofPersistence: {
|
|
|
233
233
|
* boundary from one is unsupported and cannot be detected. Detectable Effect
|
|
234
234
|
* commit scopes are rejected before writes.
|
|
235
235
|
*/
|
|
236
|
-
declare const coordinateAuthenticationAuthority: {
|
|
236
|
+
export declare const coordinateAuthenticationAuthority: {
|
|
237
237
|
<Database extends EffectSQLiteDoDatabase<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: {
|
|
238
238
|
readonly mapping: AuthenticationAuthorityMapping<Claims, S, C, F, P, NativeId>;
|
|
239
239
|
readonly transaction?: never;
|
|
@@ -455,8 +455,8 @@ declare const coordinateAuthenticationAuthority: {
|
|
|
455
455
|
}, import("@yielded/auth/Sessions").SessionUnavailable, never>;
|
|
456
456
|
};
|
|
457
457
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
458
|
-
declare const commitMode: "synchronous";
|
|
459
|
-
declare const makeAuthStoreServices: <C extends AnySQLiteTable, R extends AnySQLiteTable>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: AuthStoreTables<C, R>) => {
|
|
458
|
+
export declare const commitMode: "synchronous";
|
|
459
|
+
export declare const makeAuthStoreServices: <C extends AnySQLiteTable, R extends AnySQLiteTable>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: AuthStoreTables<C, R>) => {
|
|
460
460
|
readonly authStore: {
|
|
461
461
|
readonly issueChallenge: (input: import("@yielded/auth/Schema").NewChallenge) => Effect.Effect<void, import("@yielded/auth/AuthStore").IssueChallengeError>;
|
|
462
462
|
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>;
|
|
@@ -469,7 +469,7 @@ declare const makeAuthStoreServices: <C extends AnySQLiteTable, R extends AnySQL
|
|
|
469
469
|
readonly consumeRegistration: (input: import("@yielded/auth/Schema").ConsumeRegistration) => Effect.Effect<import("@yielded/auth/AuthStore").ConsumeDecision<void>, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
470
470
|
};
|
|
471
471
|
};
|
|
472
|
-
declare const makeOAuthStateServices: <S extends AnySQLiteTable>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: OAuthStateTables<S>) => {
|
|
472
|
+
export declare const makeOAuthStateServices: <S extends AnySQLiteTable>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: OAuthStateTables<S>) => {
|
|
473
473
|
readonly oauthStateStore: {
|
|
474
474
|
readonly issue: (state: import("@yielded/auth/OAuth").OAuthState) => Effect.Effect<void, import("@yielded/auth/Errors").AuthStoreError>;
|
|
475
475
|
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>;
|
|
@@ -478,7 +478,7 @@ declare const makeOAuthStateServices: <S extends AnySQLiteTable>(database: Effec
|
|
|
478
478
|
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>;
|
|
479
479
|
};
|
|
480
480
|
};
|
|
481
|
-
declare const makeAuthServices: <C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: AuthTables<C, R, S>) => {
|
|
481
|
+
export declare const makeAuthServices: <C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: AuthTables<C, R, S>) => {
|
|
482
482
|
readonly authStore: {
|
|
483
483
|
readonly issueChallenge: (input: import("@yielded/auth/Schema").NewChallenge) => Effect.Effect<void, import("@yielded/auth/AuthStore").IssueChallengeError>;
|
|
484
484
|
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>;
|
|
@@ -497,19 +497,19 @@ declare const makeAuthServices: <C extends AnySQLiteTable, R extends AnySQLiteTa
|
|
|
497
497
|
};
|
|
498
498
|
};
|
|
499
499
|
type TransactionOf<D extends EffectSQLiteDoDatabase<AnyRelations>> = Parameters<Parameters<D["transaction"]>[0]>[0];
|
|
500
|
-
declare function coordinateAuthStoreTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, C extends AnySQLiteTable, R extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
500
|
+
export declare function coordinateAuthStoreTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, C extends AnySQLiteTable, R extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
501
501
|
readonly mapping: AuthStoreTables<C, R>;
|
|
502
502
|
readonly transaction?: never;
|
|
503
503
|
}, body: Effect.Effect<A, E, NoInfer<AuthStoreDecisions>>): Effect.Effect<A, E | DatabaseError | SqlError, DatabaseRequirements>;
|
|
504
|
-
declare function coordinateAuthStoreTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, C extends AnySQLiteTable, R extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
504
|
+
export declare function coordinateAuthStoreTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, C extends AnySQLiteTable, R extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
505
505
|
readonly mapping: AuthStoreTables<C, R>;
|
|
506
506
|
readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
|
|
507
507
|
}, body: Effect.Effect<A, E, NoInfer<AuthStoreDecisions | TxId>>): Effect.Effect<A, E | DatabaseError | SqlError, DatabaseRequirements>;
|
|
508
|
-
declare function coordinateOAuthStateTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, S extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
508
|
+
export declare function coordinateOAuthStateTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, S extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
509
509
|
readonly mapping: OAuthStateTables<S>;
|
|
510
510
|
readonly transaction?: never;
|
|
511
511
|
}, body: Effect.Effect<A, E, NoInfer<OAuthStateDecisions>>): Effect.Effect<A, E | DatabaseError | SqlError, DatabaseRequirements>;
|
|
512
|
-
declare function coordinateOAuthStateTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, S extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
512
|
+
export declare function coordinateOAuthStateTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, S extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
513
513
|
readonly mapping: OAuthStateTables<S>;
|
|
514
514
|
readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
|
|
515
515
|
}, body: Effect.Effect<A, E, NoInfer<OAuthStateDecisions | TxId>>): Effect.Effect<A, E | DatabaseError | SqlError, DatabaseRequirements>;
|
|
@@ -520,15 +520,15 @@ declare function coordinateOAuthStateTransaction<D extends EffectSQLiteDoDatabas
|
|
|
520
520
|
* the installed driver rejects suspension and rolls back. Owner failure rolls
|
|
521
521
|
* back synchronously, so no retry is performed inside this boundary.
|
|
522
522
|
*/
|
|
523
|
-
declare function coordinateAuthTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
523
|
+
export declare function coordinateAuthTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
524
524
|
readonly mapping: AuthTables<C, R, S>;
|
|
525
525
|
readonly transaction?: never;
|
|
526
526
|
}, body: Effect.Effect<A, E, NoInfer<AuthStoreDecisions | OAuthStateDecisions>>): Effect.Effect<A, E | DatabaseError | SqlError, DatabaseRequirements>;
|
|
527
|
-
declare function coordinateAuthTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
527
|
+
export declare function coordinateAuthTransaction<D extends EffectSQLiteDoDatabase<AnyRelations>, C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable, A, E, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
528
528
|
readonly mapping: AuthTables<C, R, S>;
|
|
529
529
|
readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
|
|
530
530
|
}, body: Effect.Effect<A, E, NoInfer<AuthStoreDecisions | OAuthStateDecisions | TxId>>): Effect.Effect<A, E | DatabaseError | SqlError, DatabaseRequirements>;
|
|
531
|
-
declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => {
|
|
531
|
+
export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => {
|
|
532
532
|
subjectProvisioner: {
|
|
533
533
|
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>;
|
|
534
534
|
};
|
|
@@ -536,17 +536,17 @@ declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier
|
|
|
536
536
|
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>;
|
|
537
537
|
};
|
|
538
538
|
};
|
|
539
|
-
declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => {
|
|
539
|
+
export declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => {
|
|
540
540
|
readonly subjectProvisioner: {
|
|
541
541
|
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>;
|
|
542
542
|
};
|
|
543
543
|
};
|
|
544
|
-
declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: ExternalIdentityTables<Subject, External, NativeId>) => {
|
|
544
|
+
export declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(database: EffectSQLiteDoDatabase<AnyRelations>, mapping: ExternalIdentityTables<Subject, External, NativeId>) => {
|
|
545
545
|
readonly externalIdentityMutation: {
|
|
546
546
|
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>;
|
|
547
547
|
};
|
|
548
548
|
};
|
|
549
|
-
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>(database: EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, 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<{
|
|
549
|
+
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>(database: EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, 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<{
|
|
550
550
|
passwordPreparedPersistence: import("@yielded/auth/Password").PasswordPreparedPersistence;
|
|
551
551
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, coordinatePasswordPreparedPersistence: {
|
|
552
552
|
<Database extends EffectSQLiteDoDatabase<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: {
|
|
@@ -562,7 +562,7 @@ declare const makePasswordPreparedPersistenceServices: <S extends AnySQLiteTable
|
|
|
562
562
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
563
563
|
}, body: Effect.Effect<Out, E, NoInfer<TargetId | TxId>>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
564
564
|
};
|
|
565
|
-
declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
565
|
+
export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
566
566
|
dialect: "sqlite";
|
|
567
567
|
}>, O extends AnySQLiteTable<{
|
|
568
568
|
dialect: "sqlite";
|
|
@@ -692,12 +692,12 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
692
692
|
readonly nowMillis: number;
|
|
693
693
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
694
694
|
readonly _tag: "Rejected";
|
|
695
|
+
} | {
|
|
696
|
+
readonly _tag: "Ambiguous";
|
|
695
697
|
} | {
|
|
696
698
|
readonly _tag: "Conflict";
|
|
697
699
|
} | {
|
|
698
700
|
readonly _tag: "Cancelled";
|
|
699
|
-
} | {
|
|
700
|
-
readonly _tag: "Ambiguous";
|
|
701
701
|
} | {
|
|
702
702
|
readonly _tag: "Linked";
|
|
703
703
|
readonly credential: {
|
|
@@ -1063,6 +1063,8 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1063
1063
|
readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
|
|
1064
1064
|
readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedActionAuthorization;
|
|
1065
1065
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1066
|
+
readonly _tag: "Rejected";
|
|
1067
|
+
} | {
|
|
1066
1068
|
readonly _tag: "Issued";
|
|
1067
1069
|
readonly flow: {
|
|
1068
1070
|
readonly context: {
|
|
@@ -1154,8 +1156,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1154
1156
|
};
|
|
1155
1157
|
readonly retentionUntilMillis: number;
|
|
1156
1158
|
};
|
|
1157
|
-
} | {
|
|
1158
|
-
readonly _tag: "Rejected";
|
|
1159
1159
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1160
1160
|
readonly preflight: (input: import("@yielded/auth/OAuth").OAuthConnectedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1161
1161
|
readonly claim: <A>(input: {
|
|
@@ -1289,12 +1289,12 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1289
1289
|
readonly nowMillis: number;
|
|
1290
1290
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1291
1291
|
readonly _tag: "Rejected";
|
|
1292
|
+
} | {
|
|
1293
|
+
readonly _tag: "Ambiguous";
|
|
1292
1294
|
} | {
|
|
1293
1295
|
readonly _tag: "Conflict";
|
|
1294
1296
|
} | {
|
|
1295
1297
|
readonly _tag: "Cancelled";
|
|
1296
|
-
} | {
|
|
1297
|
-
readonly _tag: "Ambiguous";
|
|
1298
1298
|
} | {
|
|
1299
1299
|
readonly _tag: "Connected";
|
|
1300
1300
|
readonly grant: {
|
|
@@ -1979,7 +1979,7 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1979
1979
|
} ? Parameters<Parameters<D["transaction"]>[0]>[0] : never>, TxShape>;
|
|
1980
1980
|
}, body: Effect.Effect<A, E, NoInfer<TxId | import("@yielded/auth/OAuth").OAuthConnectedRevocations>>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
1981
1981
|
};
|
|
1982
|
-
declare const makePasskeyCredentialServices: <Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1982
|
+
export declare const makePasskeyCredentialServices: <Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1983
1983
|
dialect: "sqlite";
|
|
1984
1984
|
}>, C extends AnySQLiteTable<{
|
|
1985
1985
|
dialect: "sqlite";
|
|
@@ -2258,7 +2258,7 @@ declare const makePasskeyCredentialServices: <Database extends EffectSQLiteDoDat
|
|
|
2258
2258
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2259
2259
|
}, body: Effect.Effect<A, E, NoInfer<AuthorityId | TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>): Effect.Effect<A, DatabaseError | PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
2260
2260
|
};
|
|
2261
|
-
declare const makeTotpPersistenceServices: <Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2261
|
+
export declare const makeTotpPersistenceServices: <Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2262
2262
|
dialect: "sqlite";
|
|
2263
2263
|
}>, F extends AnySQLiteTable<{
|
|
2264
2264
|
dialect: "sqlite";
|
|
@@ -2288,7 +2288,7 @@ declare const makeTotpPersistenceServices: <Database extends EffectSQLiteDoDatab
|
|
|
2288
2288
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2289
2289
|
}, body: Effect.Effect<A, E, NoInfer<TxId | import("@yielded/auth/Totp").TotpPersistence>>): Effect.Effect<A, DatabaseError | TotpCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
2290
2290
|
};
|
|
2291
|
-
declare const makePhonePersistenceServices: <Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2291
|
+
export declare const makePhonePersistenceServices: <Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2292
2292
|
dialect: "sqlite";
|
|
2293
2293
|
}>, I extends AnySQLiteTable<{
|
|
2294
2294
|
dialect: "sqlite";
|
|
@@ -2325,5 +2325,5 @@ declare const makePhonePersistenceServices: <Database extends EffectSQLiteDoData
|
|
|
2325
2325
|
}, body: Effect.Effect<A, E, NoInfer<TxId | import("@yielded/auth/PhoneOtp").PhoneAdmission | import("@yielded/auth/PhoneOtp").PhonePersistence | import("@yielded/auth/PhoneOtp").PhoneSignInTargets>>): Effect.Effect<A, DatabaseError | PhoneCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
2326
2326
|
};
|
|
2327
2327
|
//#endregion
|
|
2328
|
-
export {
|
|
2328
|
+
export { passwordPreparedPersistenceLayer };
|
|
2329
2329
|
//# sourceMappingURL=DrizzleSqliteDo.d.mts.map
|
|
@@ -31,7 +31,7 @@ import { AnyRelations } from "drizzle-orm";
|
|
|
31
31
|
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
|
32
32
|
import { EffectSQLiteNodeDatabase } from "drizzle-orm/effect-sqlite-node";
|
|
33
33
|
//#region src/DrizzleSqliteNode.d.ts
|
|
34
|
-
declare const coordinateEmailAddress: {
|
|
34
|
+
export declare const coordinateEmailAddress: {
|
|
35
35
|
<Database extends EffectSQLiteNodeDatabase<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: {
|
|
36
36
|
readonly mapping: EmailAddressMapping<S, I, C, AC, M, NativeId>;
|
|
37
37
|
readonly proofMapping: ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any>;
|
|
@@ -84,7 +84,7 @@ declare const coordinateEmailAddress: {
|
|
|
84
84
|
}) => Effect.Effect<import("effect/Option").Option<import("@yielded/auth/Email").EmailCredentialSnapshot>, import("@yielded/auth/Email").EmailUnavailable>;
|
|
85
85
|
};
|
|
86
86
|
}, never, never>;
|
|
87
|
-
declare const coordinatePasswordPersistence: {
|
|
87
|
+
export declare const coordinatePasswordPersistence: {
|
|
88
88
|
<Database extends EffectSQLiteNodeDatabase<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: {
|
|
89
89
|
readonly mapping: PasswordPersistenceMapping<S, I, C, AC, A, RS, CE, M, NativeId>;
|
|
90
90
|
readonly proofMapping?: PM | undefined;
|
|
@@ -151,7 +151,7 @@ declare const coordinatePasswordPersistence: {
|
|
|
151
151
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makePasswordRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(database: EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, mapping: PasswordRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>) => Effect.Effect<{
|
|
152
152
|
registrationAuthority: PasswordRegistrationAuthority<Registration>;
|
|
153
153
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
154
|
-
declare const coordinateProofPersistence: {
|
|
154
|
+
export declare const coordinateProofPersistence: {
|
|
155
155
|
<Database extends EffectSQLiteNodeDatabase<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: {
|
|
156
156
|
readonly mapping: ProofPersistenceMapping<Rq, S, G, Cn, Rs, Aev, F, C, Sub, I, Cr, NativeId>;
|
|
157
157
|
readonly transaction?: never;
|
|
@@ -211,7 +211,7 @@ declare const coordinateProofPersistence: {
|
|
|
211
211
|
}, 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>;
|
|
212
212
|
};
|
|
213
213
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
214
|
-
declare const coordinateAuthenticationAuthority: {
|
|
214
|
+
export declare const coordinateAuthenticationAuthority: {
|
|
215
215
|
<Database extends EffectSQLiteNodeDatabase<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: {
|
|
216
216
|
readonly mapping: AuthenticationAuthorityMapping<Claims, S, C, F, P, NativeId>;
|
|
217
217
|
readonly transaction?: never;
|
|
@@ -433,8 +433,8 @@ declare const coordinateAuthenticationAuthority: {
|
|
|
433
433
|
}, import("@yielded/auth/Sessions").SessionUnavailable, never>;
|
|
434
434
|
};
|
|
435
435
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
436
|
-
declare const commitMode: "interactive";
|
|
437
|
-
declare const makeAuthStoreServices: <C extends AnySQLiteTable, R extends AnySQLiteTable>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: AuthStoreTables<C, R>) => {
|
|
436
|
+
export declare const commitMode: "interactive";
|
|
437
|
+
export declare const makeAuthStoreServices: <C extends AnySQLiteTable, R extends AnySQLiteTable>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: AuthStoreTables<C, R>) => {
|
|
438
438
|
readonly authStore: {
|
|
439
439
|
readonly issueChallenge: (input: import("@yielded/auth/Schema").NewChallenge) => Effect.Effect<void, import("@yielded/auth/AuthStore").IssueChallengeError>;
|
|
440
440
|
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>;
|
|
@@ -447,7 +447,7 @@ declare const makeAuthStoreServices: <C extends AnySQLiteTable, R extends AnySQL
|
|
|
447
447
|
readonly consumeRegistration: (input: import("@yielded/auth/Schema").ConsumeRegistration) => Effect.Effect<import("@yielded/auth/AuthStore").ConsumeDecision<void>, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
448
448
|
};
|
|
449
449
|
};
|
|
450
|
-
declare const makeOAuthStateServices: <S extends AnySQLiteTable>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: OAuthStateTables<S>) => {
|
|
450
|
+
export declare const makeOAuthStateServices: <S extends AnySQLiteTable>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: OAuthStateTables<S>) => {
|
|
451
451
|
readonly oauthStateStore: {
|
|
452
452
|
readonly issue: (state: import("@yielded/auth/OAuth").OAuthState) => Effect.Effect<void, import("@yielded/auth/Errors").AuthStoreError>;
|
|
453
453
|
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>;
|
|
@@ -456,7 +456,7 @@ declare const makeOAuthStateServices: <S extends AnySQLiteTable>(database: Effec
|
|
|
456
456
|
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>;
|
|
457
457
|
};
|
|
458
458
|
};
|
|
459
|
-
declare const makeAuthServices: <C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: AuthTables<C, R, S>) => {
|
|
459
|
+
export declare const makeAuthServices: <C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: AuthTables<C, R, S>) => {
|
|
460
460
|
readonly authStore: {
|
|
461
461
|
readonly issueChallenge: (input: import("@yielded/auth/Schema").NewChallenge) => Effect.Effect<void, import("@yielded/auth/AuthStore").IssueChallengeError>;
|
|
462
462
|
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>;
|
|
@@ -474,7 +474,7 @@ declare const makeAuthServices: <C extends AnySQLiteTable, R extends AnySQLiteTa
|
|
|
474
474
|
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>;
|
|
475
475
|
};
|
|
476
476
|
};
|
|
477
|
-
declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => {
|
|
477
|
+
export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => {
|
|
478
478
|
subjectProvisioner: {
|
|
479
479
|
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>;
|
|
480
480
|
};
|
|
@@ -482,17 +482,17 @@ declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier
|
|
|
482
482
|
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>;
|
|
483
483
|
};
|
|
484
484
|
};
|
|
485
|
-
declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => {
|
|
485
|
+
export declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => {
|
|
486
486
|
readonly subjectProvisioner: {
|
|
487
487
|
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>;
|
|
488
488
|
};
|
|
489
489
|
};
|
|
490
|
-
declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: ExternalIdentityTables<Subject, External, NativeId>) => {
|
|
490
|
+
export declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(database: EffectSQLiteNodeDatabase<AnyRelations>, mapping: ExternalIdentityTables<Subject, External, NativeId>) => {
|
|
491
491
|
readonly externalIdentityMutation: {
|
|
492
492
|
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>;
|
|
493
493
|
};
|
|
494
494
|
};
|
|
495
|
-
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>(database: EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, 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<{
|
|
495
|
+
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>(database: EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, 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<{
|
|
496
496
|
passwordPreparedPersistence: import("@yielded/auth/Password").PasswordPreparedPersistence;
|
|
497
497
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, coordinatePasswordPreparedPersistence: {
|
|
498
498
|
<Database extends EffectSQLiteNodeDatabase<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: {
|
|
@@ -508,7 +508,7 @@ declare const makePasswordPreparedPersistenceServices: <S extends AnySQLiteTable
|
|
|
508
508
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
509
509
|
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/unstable/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
|
|
510
510
|
};
|
|
511
|
-
declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
511
|
+
export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
512
512
|
dialect: "sqlite";
|
|
513
513
|
}>, O extends AnySQLiteTable<{
|
|
514
514
|
dialect: "sqlite";
|
|
@@ -638,10 +638,10 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
638
638
|
readonly nowMillis: number;
|
|
639
639
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
640
640
|
readonly _tag: "Rejected";
|
|
641
|
-
} | {
|
|
642
|
-
readonly _tag: "Cancelled";
|
|
643
641
|
} | {
|
|
644
642
|
readonly _tag: "Ambiguous";
|
|
643
|
+
} | {
|
|
644
|
+
readonly _tag: "Cancelled";
|
|
645
645
|
} | {
|
|
646
646
|
readonly _tag: "Linked";
|
|
647
647
|
readonly credential: {
|
|
@@ -1235,10 +1235,10 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1235
1235
|
readonly nowMillis: number;
|
|
1236
1236
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1237
1237
|
readonly _tag: "Rejected";
|
|
1238
|
-
} | {
|
|
1239
|
-
readonly _tag: "Cancelled";
|
|
1240
1238
|
} | {
|
|
1241
1239
|
readonly _tag: "Ambiguous";
|
|
1240
|
+
} | {
|
|
1241
|
+
readonly _tag: "Cancelled";
|
|
1242
1242
|
} | {
|
|
1243
1243
|
readonly _tag: "Conflict";
|
|
1244
1244
|
} | {
|
|
@@ -1925,7 +1925,7 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1925
1925
|
} ? Parameters<Parameters<D["transaction"]>[0]>[0] : never>, TxShape>;
|
|
1926
1926
|
}, 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>>;
|
|
1927
1927
|
};
|
|
1928
|
-
declare const makePasskeyCredentialServices: <Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1928
|
+
export declare const makePasskeyCredentialServices: <Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1929
1929
|
dialect: "sqlite";
|
|
1930
1930
|
}>, C extends AnySQLiteTable<{
|
|
1931
1931
|
dialect: "sqlite";
|
|
@@ -2204,7 +2204,7 @@ declare const makePasskeyCredentialServices: <Database extends EffectSQLiteNodeD
|
|
|
2204
2204
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2205
2205
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, AuthorityId | TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2206
2206
|
};
|
|
2207
|
-
declare const makeTotpPersistenceServices: <Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2207
|
+
export declare const makeTotpPersistenceServices: <Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2208
2208
|
dialect: "sqlite";
|
|
2209
2209
|
}>, F extends AnySQLiteTable<{
|
|
2210
2210
|
dialect: "sqlite";
|
|
@@ -2234,7 +2234,7 @@ declare const makeTotpPersistenceServices: <Database extends EffectSQLiteNodeDat
|
|
|
2234
2234
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2235
2235
|
}, 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>>;
|
|
2236
2236
|
};
|
|
2237
|
-
declare const makePhonePersistenceServices: <Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2237
|
+
export declare const makePhonePersistenceServices: <Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2238
2238
|
dialect: "sqlite";
|
|
2239
2239
|
}>, I extends AnySQLiteTable<{
|
|
2240
2240
|
dialect: "sqlite";
|
|
@@ -2270,10 +2270,10 @@ declare const makePhonePersistenceServices: <Database extends EffectSQLiteNodeDa
|
|
|
2270
2270
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2271
2271
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | PhoneCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/PhoneOtp").PhoneAdmission | import("@yielded/auth/PhoneOtp").PhonePersistence | import("@yielded/auth/PhoneOtp").PhoneSignInTargets>>;
|
|
2272
2272
|
};
|
|
2273
|
-
declare const AuthPersistence: {
|
|
2273
|
+
export declare const AuthPersistence: {
|
|
2274
2274
|
make: <C extends ClaimsCodec, const Id extends string, const A extends Definition<C, Id>>(auth: A & Definition<C, Id>) => BoundPersistence<import("drizzle-orm/sqlite-core").SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig>, import("@effect/sql-sqlite-node/SqliteClient").SqliteClient, C, Id, A>;
|
|
2275
2275
|
migrationsLayer: (options: import("drizzle-orm/migrator").MigrationConfig) => import("effect/Layer").Layer<never, import("drizzle-orm/effect-core").EffectDrizzleQueryError | import("drizzle-orm/effect-core").MigratorInitError | PersistenceConfigurationError | import("effect/unstable/sql/SqlError").SqlError, import("@effect/sql-sqlite-node/SqliteClient").SqliteClient>;
|
|
2276
2276
|
};
|
|
2277
2277
|
//#endregion
|
|
2278
|
-
export {
|
|
2278
|
+
export { coordinateSqliteAuthStoreTransaction as coordinateAuthStoreTransaction, coordinateSqliteAuthTransaction as coordinateAuthTransaction, coordinateSqliteOAuthStateTransaction as coordinateOAuthStateTransaction, passwordPreparedPersistenceLayer };
|
|
2279
2279
|
//# sourceMappingURL=DrizzleSqliteNode.d.mts.map
|