@yielded/auth-persistence-drizzle 0.1.0-beta.13 → 0.1.0-beta.15
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/dist/D1.d.mts +123 -9
- package/dist/Libsql.d.mts +143 -29
- package/dist/Mysql2.d.mts +130 -16
- package/dist/Pglite.d.mts +130 -16
- package/dist/Postgres.d.mts +131 -17
- package/dist/SqliteBun.d.mts +141 -27
- package/dist/SqliteDo.d.mts +145 -31
- package/dist/SqliteNode.d.mts +135 -21
- package/dist/SqliteWasm.d.mts +145 -31
- package/dist/drizzle/d1-emails.d.mts +3 -3
- package/dist/drizzle/d1-emails.mjs +56 -11
- package/dist/drizzle/d1-emails.mjs.map +1 -1
- package/dist/drizzle/d1-identity.mjs +9 -2
- package/dist/drizzle/d1-identity.mjs.map +1 -1
- package/dist/drizzle/d1-oauth.d.mts +8 -8
- package/dist/drizzle/d1-oauth.mjs +8 -8
- package/dist/drizzle/d1-oauth.mjs.map +1 -1
- package/dist/drizzle/d1-passkey.d.mts +2 -1
- package/dist/drizzle/d1-passkey.mjs +10 -8
- package/dist/drizzle/d1-passkey.mjs.map +1 -1
- package/dist/drizzle/d1-password-prepared.d.mts +1 -1
- package/dist/drizzle/d1-password-prepared.mjs +16 -5
- package/dist/drizzle/d1-password-prepared.mjs.map +1 -1
- package/dist/drizzle/d1-passwords.d.mts +2 -2
- package/dist/drizzle/d1-passwords.mjs +19 -6
- package/dist/drizzle/d1-passwords.mjs.map +1 -1
- package/dist/drizzle/d1-phone.d.mts +2 -1
- package/dist/drizzle/d1-phone.mjs +4 -2
- package/dist/drizzle/d1-phone.mjs.map +1 -1
- package/dist/drizzle/d1-proofs.d.mts +1 -1
- package/dist/drizzle/d1-proofs.mjs +18 -7
- package/dist/drizzle/d1-proofs.mjs.map +1 -1
- package/dist/drizzle/d1-sessions.d.mts +6 -5
- package/dist/drizzle/d1-sessions.mjs +29 -19
- package/dist/drizzle/d1-sessions.mjs.map +1 -1
- package/dist/drizzle/d1-totp.d.mts +2 -1
- package/dist/drizzle/d1-totp.mjs +4 -2
- package/dist/drizzle/d1-totp.mjs.map +1 -1
- package/dist/drizzle/email-registration.d.mts +5 -1
- package/dist/drizzle/email-registration.mjs +48 -4
- package/dist/drizzle/email-registration.mjs.map +1 -1
- package/dist/drizzle/email-target.d.mts +1 -0
- package/dist/drizzle/email-target.mjs +9 -0
- package/dist/drizzle/email-target.mjs.map +1 -1
- package/dist/drizzle/mysql-emails.d.mts +4 -4
- package/dist/drizzle/mysql-emails.mjs +8 -7
- package/dist/drizzle/mysql-emails.mjs.map +1 -1
- package/dist/drizzle/mysql-identity.mjs +11 -4
- package/dist/drizzle/mysql-identity.mjs.map +1 -1
- package/dist/drizzle/mysql-password-prepared.d.mts +2 -2
- package/dist/drizzle/mysql-password-prepared.mjs +4 -3
- package/dist/drizzle/mysql-password-prepared.mjs.map +1 -1
- package/dist/drizzle/mysql-passwords.d.mts +3 -3
- package/dist/drizzle/mysql-passwords.mjs +7 -6
- package/dist/drizzle/mysql-passwords.mjs.map +1 -1
- package/dist/drizzle/mysql-proofs.d.mts +2 -2
- package/dist/drizzle/mysql-proofs.mjs +4 -3
- package/dist/drizzle/mysql-proofs.mjs.map +1 -1
- package/dist/drizzle/mysql-sessions.d.mts +6 -6
- package/dist/drizzle/mysql-sessions.mjs +16 -15
- package/dist/drizzle/mysql-sessions.mjs.map +1 -1
- package/dist/drizzle/native-database.mjs +1 -1
- package/dist/drizzle/native-database.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-drivers.mjs +10 -8
- package/dist/drizzle/oauth-connected-drivers.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-flow.mjs +62 -13
- package/dist/drizzle/oauth-connected-flow.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-input.mjs +6 -0
- package/dist/drizzle/oauth-connected-input.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-maintenance.mjs +3 -3
- package/dist/drizzle/oauth-connected-maintenance.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-target.d.mts +116 -2
- package/dist/drizzle/oauth-connected-target.mjs +5 -3
- package/dist/drizzle/oauth-connected-target.mjs.map +1 -1
- package/dist/drizzle/oauth-drivers.mjs +8 -8
- package/dist/drizzle/oauth-drivers.mjs.map +1 -1
- package/dist/drizzle/oauth-target.d.mts +3 -3
- package/dist/drizzle/oauth-target.mjs +8 -6
- package/dist/drizzle/oauth-target.mjs.map +1 -1
- package/dist/drizzle/passkey-drivers.mjs +4 -4
- package/dist/drizzle/passkey-drivers.mjs.map +1 -1
- package/dist/drizzle/passkey-write-drivers.mjs +4 -4
- 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 +5 -0
- package/dist/drizzle/password-prepared-sql.mjs.map +1 -1
- package/dist/drizzle/password-prepared-target.d.mts +2 -1
- package/dist/drizzle/password-prepared-target.mjs +5 -0
- package/dist/drizzle/password-prepared-target.mjs.map +1 -1
- package/dist/drizzle/password-registration.d.mts +1 -1
- package/dist/drizzle/password-registration.mjs +2 -0
- package/dist/drizzle/password-registration.mjs.map +1 -1
- package/dist/drizzle/password-target.d.mts +1 -0
- package/dist/drizzle/password-target.mjs +6 -0
- package/dist/drizzle/password-target.mjs.map +1 -1
- package/dist/drizzle/pg-emails.d.mts +4 -4
- package/dist/drizzle/pg-emails.mjs +8 -7
- package/dist/drizzle/pg-emails.mjs.map +1 -1
- package/dist/drizzle/pg-identity.mjs +12 -5
- package/dist/drizzle/pg-identity.mjs.map +1 -1
- package/dist/drizzle/pg-password-prepared.d.mts +2 -2
- package/dist/drizzle/pg-password-prepared.mjs +4 -3
- package/dist/drizzle/pg-password-prepared.mjs.map +1 -1
- package/dist/drizzle/pg-passwords.d.mts +3 -3
- package/dist/drizzle/pg-passwords.mjs +7 -6
- package/dist/drizzle/pg-passwords.mjs.map +1 -1
- package/dist/drizzle/pg-proofs.d.mts +2 -2
- package/dist/drizzle/pg-proofs.mjs +4 -3
- package/dist/drizzle/pg-proofs.mjs.map +1 -1
- package/dist/drizzle/pg-sessions.d.mts +6 -6
- package/dist/drizzle/pg-sessions.mjs +16 -15
- package/dist/drizzle/pg-sessions.mjs.map +1 -1
- package/dist/drizzle/phone-target.mjs +11 -2
- package/dist/drizzle/phone-target.mjs.map +1 -1
- package/dist/drizzle/proof-target.d.mts +1 -0
- package/dist/drizzle/proof-target.mjs +2 -0
- package/dist/drizzle/proof-target.mjs.map +1 -1
- package/dist/drizzle/query-operations.mjs +2 -0
- package/dist/drizzle/query-operations.mjs.map +1 -1
- package/dist/drizzle/session-target.d.mts +1 -0
- package/dist/drizzle/session-target.mjs +9 -6
- package/dist/drizzle/session-target.mjs.map +1 -1
- package/dist/drizzle/sqlite-emails.mjs +8 -7
- package/dist/drizzle/sqlite-emails.mjs.map +1 -1
- package/dist/drizzle/sqlite-identity.mjs +7 -2
- package/dist/drizzle/sqlite-identity.mjs.map +1 -1
- package/dist/drizzle/sqlite-password-prepared.mjs +4 -3
- package/dist/drizzle/sqlite-password-prepared.mjs.map +1 -1
- package/dist/drizzle/sqlite-passwords.mjs +7 -6
- package/dist/drizzle/sqlite-passwords.mjs.map +1 -1
- package/dist/drizzle/sqlite-proofs.mjs +4 -3
- package/dist/drizzle/sqlite-proofs.mjs.map +1 -1
- package/dist/drizzle/sqlite-sessions.mjs +16 -15
- package/dist/drizzle/sqlite-sessions.mjs.map +1 -1
- package/dist/drizzle/storage-validation.mjs +234 -0
- package/dist/drizzle/storage-validation.mjs.map +1 -0
- package/dist/drizzle/totp-target.mjs +5 -2
- package/dist/drizzle/totp-target.mjs.map +1 -1
- package/dist/drizzle/transaction-mysql.mjs +1 -1
- package/package.json +1 -1
- package/src/drizzle/d1-emails.ts +158 -40
- package/src/drizzle/d1-identity.ts +13 -0
- package/src/drizzle/d1-oauth.ts +8 -8
- package/src/drizzle/d1-passkey.ts +10 -8
- package/src/drizzle/d1-password-prepared.ts +14 -2
- package/src/drizzle/d1-passwords.ts +22 -4
- package/src/drizzle/d1-phone.ts +4 -2
- package/src/drizzle/d1-proofs.ts +55 -3
- package/src/drizzle/d1-sessions.ts +67 -18
- package/src/drizzle/d1-totp.ts +4 -2
- package/src/drizzle/email-registration.ts +160 -12
- package/src/drizzle/email-target.ts +22 -4
- package/src/drizzle/mysql-emails.ts +17 -7
- package/src/drizzle/mysql-identity.ts +13 -0
- package/src/drizzle/mysql-password-prepared.ts +7 -3
- package/src/drizzle/mysql-passwords.ts +13 -6
- package/src/drizzle/mysql-proofs.ts +7 -3
- package/src/drizzle/mysql-sessions.ts +31 -15
- package/src/drizzle/native-database.ts +5 -4
- package/src/drizzle/oauth-connected-drivers.ts +10 -8
- package/src/drizzle/oauth-connected-flow.ts +98 -10
- package/src/drizzle/oauth-connected-input.ts +7 -0
- package/src/drizzle/oauth-connected-maintenance.ts +3 -2
- package/src/drizzle/oauth-connected-target.ts +4 -2
- package/src/drizzle/oauth-drivers.ts +8 -8
- package/src/drizzle/oauth-target.ts +13 -7
- package/src/drizzle/passkey-drivers.ts +4 -4
- package/src/drizzle/passkey-write-drivers.ts +8 -5
- package/src/drizzle/password-prepared-sql.ts +13 -1
- package/src/drizzle/password-prepared-target.ts +7 -1
- package/src/drizzle/password-registration.ts +10 -3
- package/src/drizzle/password-target.ts +22 -4
- package/src/drizzle/pg-emails.ts +17 -7
- package/src/drizzle/pg-identity.ts +13 -0
- package/src/drizzle/pg-password-prepared.ts +7 -3
- package/src/drizzle/pg-passwords.ts +13 -6
- package/src/drizzle/pg-proofs.ts +7 -3
- package/src/drizzle/pg-sessions.ts +31 -15
- package/src/drizzle/phone-target.ts +30 -5
- package/src/drizzle/proof-target.ts +10 -2
- package/src/drizzle/query-operations.ts +2 -0
- package/src/drizzle/session-target.ts +20 -3
- package/src/drizzle/sqlite-emails.ts +17 -7
- package/src/drizzle/sqlite-identity.ts +5 -0
- package/src/drizzle/sqlite-password-prepared.ts +7 -3
- package/src/drizzle/sqlite-passwords.ts +13 -6
- package/src/drizzle/sqlite-proofs.ts +7 -3
- package/src/drizzle/sqlite-sessions.ts +31 -15
- package/src/drizzle/storage-validation.ts +285 -0
- package/src/drizzle/totp-target.ts +16 -4
package/dist/SqliteDo.d.mts
CHANGED
|
@@ -78,16 +78,16 @@ export declare const coordinateEmailAddress: {
|
|
|
78
78
|
readonly hasMore: boolean;
|
|
79
79
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Email").EmailUnavailable>;
|
|
80
80
|
};
|
|
81
|
-
},
|
|
81
|
+
}, import("@yielded/auth/Email").EmailUnavailable, 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<{
|
|
82
82
|
registrationAuthority: EmailRegistrationAuthority<Registration>;
|
|
83
|
-
},
|
|
83
|
+
}, import("@yielded/auth/Email").EmailUnavailable, 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<{
|
|
84
84
|
emailSignInTargets: {
|
|
85
85
|
readonly lookup: (input: {
|
|
86
86
|
readonly moduleId: string;
|
|
87
87
|
readonly identifier: import("@yielded/auth/Identity").LoginIdentifier;
|
|
88
88
|
}) => Effect.Effect<import("effect/Option").Option<import("@yielded/auth/Email").EmailCredentialSnapshot>, import("@yielded/auth/Email").EmailUnavailable>;
|
|
89
89
|
};
|
|
90
|
-
},
|
|
90
|
+
}, import("@yielded/auth/Email").EmailUnavailable, Database>;
|
|
91
91
|
/**
|
|
92
92
|
* Password mutations and registration must own their outer transactionSync.
|
|
93
93
|
* Arbitrary raw Drizzle nesting is not detectable; owner bodies must remain
|
|
@@ -157,9 +157,9 @@ export declare const coordinatePasswordPersistence: {
|
|
|
157
157
|
readonly hasMore: boolean;
|
|
158
158
|
}, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, import("@yielded/auth/Password").PasswordUnavailable>;
|
|
159
159
|
};
|
|
160
|
-
},
|
|
160
|
+
}, import("@yielded/auth/Password").PasswordUnavailable, 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<{
|
|
161
161
|
registrationAuthority: import("@yielded/auth-persistence/Adapter").PasswordRegistrationAuthority<Registration>;
|
|
162
|
-
},
|
|
162
|
+
}, import("@yielded/auth/Password").PasswordUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
163
163
|
/**
|
|
164
164
|
* Proof mutations and coordinateProofPersistence must own their outermost
|
|
165
165
|
* transactionSync call. The installed driver cannot detect an arbitrary raw
|
|
@@ -225,7 +225,7 @@ export declare const coordinateProofPersistence: {
|
|
|
225
225
|
readonly limit: number;
|
|
226
226
|
}, 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>;
|
|
227
227
|
};
|
|
228
|
-
},
|
|
228
|
+
}, import("@yielded/auth/Proofs").ProofUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
229
229
|
/**
|
|
230
230
|
* Session mutation methods and coordinate* functions must own their outermost
|
|
231
231
|
* transactionSync call. The installed Drizzle driver exposes no context marker
|
|
@@ -289,11 +289,11 @@ export declare const coordinateAuthenticationAuthority: {
|
|
|
289
289
|
readonly pending?: import("@yielded/auth/Sessions").PendingConsumption;
|
|
290
290
|
}, 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>;
|
|
291
291
|
};
|
|
292
|
-
},
|
|
292
|
+
}, import("@yielded/auth/Sessions").SessionUnavailable, 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<{
|
|
293
293
|
pendingAuthentication: import("@yielded/auth/Sessions").PendingAuthentication<Claims>;
|
|
294
|
-
},
|
|
294
|
+
}, import("@yielded/auth/Sessions").SessionUnavailable, 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<{
|
|
295
295
|
sessionStepUpPersistence: import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>;
|
|
296
|
-
},
|
|
296
|
+
}, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateSessionStepUp: {
|
|
297
297
|
<Database extends EffectSQLiteDoDatabase<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: {
|
|
298
298
|
readonly mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>;
|
|
299
299
|
readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>;
|
|
@@ -306,10 +306,10 @@ export declare const coordinateAuthenticationAuthority: {
|
|
|
306
306
|
}, body: Effect.Effect<A, E, NoInfer<Id | TxId>>): 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>;
|
|
307
307
|
}, makeSignedSessionValidityServices: <S extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: SignedSessionValidityMapping<S, T, NativeId, NativeSessionId>) => Effect.Effect<{
|
|
308
308
|
signedSessionValidity: import("@yielded/auth/Sessions").SignedSessionValidity;
|
|
309
|
-
},
|
|
309
|
+
}, import("@yielded/auth/Sessions").SessionUnavailable, 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<{
|
|
310
310
|
readonly statefulSessionPersistence: import("@yielded/auth/Sessions").StatefulSessionPersistence<Claims>;
|
|
311
311
|
readonly sessionRepository: import("@yielded/auth/Sessions").SessionRepository;
|
|
312
|
-
},
|
|
312
|
+
}, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
313
313
|
export declare const commitMode: "synchronous";
|
|
314
314
|
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<{
|
|
315
315
|
subjectProvisioner: {
|
|
@@ -318,20 +318,20 @@ export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Iden
|
|
|
318
318
|
externalIdentityMutation: {
|
|
319
319
|
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>;
|
|
320
320
|
};
|
|
321
|
-
},
|
|
321
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
322
322
|
export declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => Effect.Effect<{
|
|
323
323
|
readonly subjectProvisioner: {
|
|
324
324
|
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>;
|
|
325
325
|
};
|
|
326
|
-
},
|
|
326
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
327
327
|
export declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(mapping: ExternalIdentityTables<Subject, External, NativeId>) => Effect.Effect<{
|
|
328
328
|
readonly externalIdentityMutation: {
|
|
329
329
|
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>;
|
|
330
330
|
};
|
|
331
|
-
},
|
|
331
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
332
332
|
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<{
|
|
333
333
|
passwordPreparedPersistence: import("@yielded/auth/Password").PasswordPreparedPersistence;
|
|
334
|
-
},
|
|
334
|
+
}, import("@yielded/auth/Password").PasswordUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinatePasswordPreparedPersistence: {
|
|
335
335
|
<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: {
|
|
336
336
|
readonly mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>;
|
|
337
337
|
readonly proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined;
|
|
@@ -609,7 +609,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
609
609
|
readonly hasMore: boolean;
|
|
610
610
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
611
611
|
};
|
|
612
|
-
},
|
|
612
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthSignInServices: <S extends AnySQLiteTable<{
|
|
613
613
|
dialect: "sqlite";
|
|
614
614
|
}>, O extends AnySQLiteTable<{
|
|
615
615
|
dialect: "sqlite";
|
|
@@ -651,7 +651,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
651
651
|
readonly hasMore: boolean;
|
|
652
652
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
653
653
|
};
|
|
654
|
-
},
|
|
654
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationIntentServices: <S extends AnySQLiteTable<{
|
|
655
655
|
dialect: "sqlite";
|
|
656
656
|
}>, O extends AnySQLiteTable<{
|
|
657
657
|
dialect: "sqlite";
|
|
@@ -674,7 +674,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
674
674
|
readonly nowMillis: number;
|
|
675
675
|
}, 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>;
|
|
676
676
|
};
|
|
677
|
-
},
|
|
677
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationServices: <Registration, S extends AnySQLiteTable<{
|
|
678
678
|
dialect: "sqlite";
|
|
679
679
|
}>, O extends AnySQLiteTable<{
|
|
680
680
|
dialect: "sqlite";
|
|
@@ -690,7 +690,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
690
690
|
dialect: "sqlite";
|
|
691
691
|
}>, N>(mapping: OAuthRegistrationMapping<Registration, S, O, C, AC, TA, I, R, N>) => Effect.Effect<{
|
|
692
692
|
registrationAuthority: OAuthRegistrationAuthority<Registration>;
|
|
693
|
-
},
|
|
693
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthRegistration: {
|
|
694
694
|
<Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnySQLiteTable<{
|
|
695
695
|
dialect: "sqlite";
|
|
696
696
|
}>, O extends AnySQLiteTable<{
|
|
@@ -882,6 +882,8 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
882
882
|
readonly _tag: "Cancelled";
|
|
883
883
|
} | {
|
|
884
884
|
readonly _tag: "Ambiguous";
|
|
885
|
+
} | {
|
|
886
|
+
readonly _tag: "Conflict";
|
|
885
887
|
} | {
|
|
886
888
|
readonly _tag: "Connected";
|
|
887
889
|
readonly grant: {
|
|
@@ -951,8 +953,6 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
951
953
|
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
952
954
|
};
|
|
953
955
|
};
|
|
954
|
-
} | {
|
|
955
|
-
readonly _tag: "Conflict";
|
|
956
956
|
} | {
|
|
957
957
|
readonly _tag: "Busy";
|
|
958
958
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
@@ -1077,6 +1077,120 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1077
1077
|
readonly retentionUntilMillis: number;
|
|
1078
1078
|
};
|
|
1079
1079
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1080
|
+
readonly prepare: <A>(input: {
|
|
1081
|
+
readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
|
|
1082
|
+
readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
|
|
1083
|
+
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1084
|
+
readonly _tag: "Rejected";
|
|
1085
|
+
} | {
|
|
1086
|
+
readonly _tag: "Issued";
|
|
1087
|
+
readonly flow: {
|
|
1088
|
+
readonly context: {
|
|
1089
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1090
|
+
readonly protocol: "oauth" | "oidc";
|
|
1091
|
+
readonly configurationGeneration: number;
|
|
1092
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
1093
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
1094
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
1095
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
1096
|
+
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
1097
|
+
readonly generation: number;
|
|
1098
|
+
readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
|
|
1099
|
+
readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
|
|
1100
|
+
readonly access?: {
|
|
1101
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
1102
|
+
readonly generation: number;
|
|
1103
|
+
readonly issuance: "active" | "retired";
|
|
1104
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1105
|
+
readonly clientRegistrationId: string;
|
|
1106
|
+
readonly scopes: readonly string[];
|
|
1107
|
+
readonly resources: readonly string[];
|
|
1108
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
1109
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
1110
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
1111
|
+
readonly refreshAheadMillis: number;
|
|
1112
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
1113
|
+
readonly revocation: "cohort" | "unsupported";
|
|
1114
|
+
} | undefined;
|
|
1115
|
+
readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
|
|
1116
|
+
readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
1117
|
+
readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
1118
|
+
readonly requestBindingExpiresAtMillis: number;
|
|
1119
|
+
readonly issuedAtMillis: number;
|
|
1120
|
+
readonly expiresAtMillis: number;
|
|
1121
|
+
readonly claimLifetimeMillis: number;
|
|
1122
|
+
readonly namespace: "effect-auth/oauth-connected-context/v1";
|
|
1123
|
+
readonly revision: {
|
|
1124
|
+
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
1125
|
+
readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1126
|
+
readonly credentials: readonly {
|
|
1127
|
+
readonly credentialId: string;
|
|
1128
|
+
readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1129
|
+
}[];
|
|
1130
|
+
};
|
|
1131
|
+
readonly profile: {
|
|
1132
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
1133
|
+
readonly generation: number;
|
|
1134
|
+
readonly issuance: "active" | "retired";
|
|
1135
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1136
|
+
readonly clientRegistrationId: string;
|
|
1137
|
+
readonly scopes: readonly string[];
|
|
1138
|
+
readonly resources: readonly string[];
|
|
1139
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
1140
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
1141
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
1142
|
+
readonly refreshAheadMillis: number;
|
|
1143
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
1144
|
+
readonly revocation: "cohort" | "unsupported";
|
|
1145
|
+
};
|
|
1146
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
1147
|
+
readonly reconnect?: {
|
|
1148
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
1149
|
+
readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1150
|
+
readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1151
|
+
readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1152
|
+
readonly identity: {
|
|
1153
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1154
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
1155
|
+
readonly subject: string;
|
|
1156
|
+
};
|
|
1157
|
+
readonly configuration: {
|
|
1158
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1159
|
+
readonly protocol: "oauth" | "oidc";
|
|
1160
|
+
readonly configurationGeneration: number;
|
|
1161
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
1162
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
1163
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
1164
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
1165
|
+
readonly profile: {
|
|
1166
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
1167
|
+
readonly generation: number;
|
|
1168
|
+
readonly issuance: "active" | "retired";
|
|
1169
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1170
|
+
readonly clientRegistrationId: string;
|
|
1171
|
+
readonly scopes: readonly string[];
|
|
1172
|
+
readonly resources: readonly string[];
|
|
1173
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
1174
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
1175
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
1176
|
+
readonly refreshAheadMillis: number;
|
|
1177
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
1178
|
+
readonly revocation: "cohort" | "unsupported";
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1181
|
+
} | undefined;
|
|
1182
|
+
readonly maximumEvidenceAgeMillis: number;
|
|
1183
|
+
};
|
|
1184
|
+
readonly sealed: {
|
|
1185
|
+
readonly format: "oauth-xchacha20poly1305-v1";
|
|
1186
|
+
readonly keyId: string;
|
|
1187
|
+
readonly nonce: string;
|
|
1188
|
+
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
1189
|
+
};
|
|
1190
|
+
readonly retentionUntilMillis: number;
|
|
1191
|
+
};
|
|
1192
|
+
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1193
|
+
readonly inspectPrepared: (input: import("@yielded/auth/OAuth").OAuthConnectedPreparedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1080
1194
|
readonly preflight: (input: import("@yielded/auth/OAuth").OAuthConnectedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1081
1195
|
readonly claim: <A>(input: {
|
|
1082
1196
|
readonly access: import("@yielded/auth/OAuth").OAuthConnectedAccess;
|
|
@@ -1228,6 +1342,8 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1228
1342
|
readonly _tag: "Cancelled";
|
|
1229
1343
|
} | {
|
|
1230
1344
|
readonly _tag: "Ambiguous";
|
|
1345
|
+
} | {
|
|
1346
|
+
readonly _tag: "Conflict";
|
|
1231
1347
|
} | {
|
|
1232
1348
|
readonly _tag: "Connected";
|
|
1233
1349
|
readonly grant: {
|
|
@@ -1297,8 +1413,6 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1297
1413
|
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
1298
1414
|
};
|
|
1299
1415
|
};
|
|
1300
|
-
} | {
|
|
1301
|
-
readonly _tag: "Conflict";
|
|
1302
1416
|
} | {
|
|
1303
1417
|
readonly _tag: "Busy";
|
|
1304
1418
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
@@ -1452,6 +1566,8 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1452
1566
|
readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
1453
1567
|
}) => Effect.Effect<{
|
|
1454
1568
|
readonly _tag: "Rejected";
|
|
1569
|
+
} | {
|
|
1570
|
+
readonly _tag: "ReauthorizationRequired";
|
|
1455
1571
|
} | {
|
|
1456
1572
|
readonly _tag: "Busy";
|
|
1457
1573
|
} | {
|
|
@@ -1523,8 +1639,6 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1523
1639
|
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
1524
1640
|
};
|
|
1525
1641
|
};
|
|
1526
|
-
} | {
|
|
1527
|
-
readonly _tag: "ReauthorizationRequired";
|
|
1528
1642
|
}, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1529
1643
|
readonly claimRefresh: <A>(input: {
|
|
1530
1644
|
readonly grant: import("@yielded/auth/OAuth").OAuthConnectedStoredGrant;
|
|
@@ -1534,10 +1648,10 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1534
1648
|
readonly lifetimeMillis: number;
|
|
1535
1649
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1536
1650
|
readonly _tag: "Rejected";
|
|
1537
|
-
} | {
|
|
1538
|
-
readonly _tag: "Busy";
|
|
1539
1651
|
} | {
|
|
1540
1652
|
readonly _tag: "ReauthorizationRequired";
|
|
1653
|
+
} | {
|
|
1654
|
+
readonly _tag: "Busy";
|
|
1541
1655
|
} | {
|
|
1542
1656
|
readonly _tag: "Claimed";
|
|
1543
1657
|
readonly claim: {
|
|
@@ -1700,10 +1814,10 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1700
1814
|
readonly lifetimeMillis: number;
|
|
1701
1815
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1702
1816
|
readonly _tag: "Rejected";
|
|
1703
|
-
} | {
|
|
1704
|
-
readonly _tag: "Busy";
|
|
1705
1817
|
} | {
|
|
1706
1818
|
readonly _tag: "ReauthorizationRequired";
|
|
1819
|
+
} | {
|
|
1820
|
+
readonly _tag: "Busy";
|
|
1707
1821
|
} | {
|
|
1708
1822
|
readonly _tag: "Admitted";
|
|
1709
1823
|
readonly admissionId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
|
|
@@ -1718,7 +1832,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1718
1832
|
readonly hasMore: boolean;
|
|
1719
1833
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1720
1834
|
};
|
|
1721
|
-
},
|
|
1835
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnySQLiteTable<{
|
|
1722
1836
|
dialect: "sqlite";
|
|
1723
1837
|
}>, O extends AnySQLiteTable<{
|
|
1724
1838
|
dialect: "sqlite";
|
|
@@ -1826,7 +1940,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1826
1940
|
readonly settled: boolean;
|
|
1827
1941
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1828
1942
|
};
|
|
1829
|
-
},
|
|
1943
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
|
|
1830
1944
|
<D extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1831
1945
|
dialect: "sqlite";
|
|
1832
1946
|
}>, AC extends AnySQLiteTable<{
|