@yielded/auth-persistence-drizzle 0.1.0-beta.18 → 0.1.0-beta.20
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 +8 -1
- package/dist/D1.d.mts +8 -8
- package/dist/Libsql.d.mts +38 -38
- package/dist/Mysql2.d.mts +51 -51
- package/dist/Pglite.d.mts +51 -51
- package/dist/Postgres.d.mts +38 -38
- package/dist/SqliteBun.d.mts +51 -51
- package/dist/SqliteDo.d.mts +112 -134
- package/dist/SqliteDo.mjs +30 -45
- package/dist/SqliteDo.mjs.map +1 -1
- package/dist/SqliteNode.d.mts +44 -44
- package/dist/SqliteWasm.d.mts +38 -38
- package/dist/drizzle/crypto.mjs +11 -0
- package/dist/drizzle/crypto.mjs.map +1 -0
- package/dist/drizzle/d1-identity.mjs +2 -2
- package/dist/drizzle/d1-identity.mjs.map +1 -1
- package/dist/drizzle/d1-oauth.d.mts +11 -11
- package/dist/drizzle/d1-oauth.mjs.map +1 -1
- package/dist/drizzle/d1-passkey.d.mts +6 -6
- package/dist/drizzle/d1-passkey.mjs.map +1 -1
- package/dist/drizzle/d1-passwords.d.mts +1 -1
- package/dist/drizzle/d1-phone.d.mts +3 -3
- package/dist/drizzle/d1-phone.mjs.map +1 -1
- package/dist/drizzle/d1-proofs.d.mts +1 -1
- package/dist/drizzle/d1-sessions.d.mts +1 -1
- package/dist/drizzle/d1-totp.d.mts +3 -3
- package/dist/drizzle/d1-totp.mjs.map +1 -1
- package/dist/drizzle/mysql-identity.mjs +2 -2
- package/dist/drizzle/mysql-identity.mjs.map +1 -1
- package/dist/drizzle/oauth-accounts.mjs +9 -8
- package/dist/drizzle/oauth-accounts.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-collection.mjs +1 -1
- package/dist/drizzle/oauth-connected-collection.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-custody.mjs +5 -4
- package/dist/drizzle/oauth-connected-custody.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-drivers.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-flow.mjs +8 -7
- package/dist/drizzle/oauth-connected-flow.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-management.mjs +3 -2
- package/dist/drizzle/oauth-connected-management.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-reference.mjs +8 -4
- package/dist/drizzle/oauth-connected-reference.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-settlement.mjs +4 -4
- package/dist/drizzle/oauth-connected-settlement.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-sign-in.mjs +11 -10
- package/dist/drizzle/oauth-connected-sign-in.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-state.d.mts +13 -13
- package/dist/drizzle/oauth-connected-state.mjs +23 -20
- package/dist/drizzle/oauth-connected-state.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-target.d.mts +9 -9
- package/dist/drizzle/oauth-connected-target.mjs.map +1 -1
- package/dist/drizzle/oauth-drivers.mjs.map +1 -1
- package/dist/drizzle/oauth-flow.mjs +1 -1
- package/dist/drizzle/oauth-flow.mjs.map +1 -1
- package/dist/drizzle/oauth-model.d.mts +4 -4
- package/dist/drizzle/oauth-model.mjs.map +1 -1
- package/dist/drizzle/oauth-registration.mjs +2 -2
- package/dist/drizzle/oauth-registration.mjs.map +1 -1
- package/dist/drizzle/oauth-state.mjs +11 -12
- package/dist/drizzle/oauth-state.mjs.map +1 -1
- package/dist/drizzle/oauth-target.d.mts +4 -4
- package/dist/drizzle/oauth-target.mjs.map +1 -1
- package/dist/drizzle/passkey-drivers.mjs.map +1 -1
- 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-state.mjs +1 -1
- package/dist/drizzle/pg-identity.mjs +2 -2
- package/dist/drizzle/pg-identity.mjs.map +1 -1
- package/dist/drizzle/phone-model.d.mts +2 -2
- package/dist/drizzle/phone-model.mjs +3 -3
- package/dist/drizzle/phone-model.mjs.map +1 -1
- package/dist/drizzle/phone-target.d.mts +1 -1
- package/dist/drizzle/phone-target.mjs +2 -2
- package/dist/drizzle/phone-target.mjs.map +1 -1
- package/dist/drizzle/sqlite-do-database.d.mts +29 -0
- package/dist/drizzle/sqlite-do-database.mjs +45 -0
- package/dist/drizzle/sqlite-do-database.mjs.map +1 -0
- package/dist/drizzle/sqlite-emails.mjs.map +1 -1
- package/dist/drizzle/sqlite-identity.mjs +2 -2
- package/dist/drizzle/sqlite-identity.mjs.map +1 -1
- package/dist/drizzle/sqlite-passwords.mjs.map +1 -1
- package/dist/drizzle/sqlite-proofs.mjs.map +1 -1
- package/dist/drizzle/sqlite-sessions.mjs.map +1 -1
- package/dist/drizzle/storage-validation.mjs +17 -9
- package/dist/drizzle/storage-validation.mjs.map +1 -1
- package/dist/drizzle/totp-state.mjs +8 -8
- package/dist/drizzle/totp-state.mjs.map +1 -1
- package/dist/drizzle/totp-target.d.mts +1 -1
- package/dist/drizzle/totp-target.mjs +2 -2
- package/dist/drizzle/totp-target.mjs.map +1 -1
- package/package.json +1 -1
- package/src/SqliteDo.ts +63 -70
- package/src/drizzle/crypto.ts +14 -0
- package/src/drizzle/d1-identity.ts +2 -2
- package/src/drizzle/d1-oauth.ts +14 -5
- package/src/drizzle/d1-passkey.ts +5 -1
- package/src/drizzle/d1-phone.ts +2 -1
- package/src/drizzle/d1-totp.ts +6 -2
- package/src/drizzle/mysql-identity.ts +2 -2
- package/src/drizzle/oauth-accounts.ts +14 -13
- package/src/drizzle/oauth-connected-collection.ts +1 -1
- package/src/drizzle/oauth-connected-custody.ts +8 -6
- package/src/drizzle/oauth-connected-drivers.ts +9 -3
- package/src/drizzle/oauth-connected-flow.ts +6 -6
- package/src/drizzle/oauth-connected-management.ts +1 -1
- package/src/drizzle/oauth-connected-reference.ts +14 -9
- package/src/drizzle/oauth-connected-settlement.ts +4 -4
- package/src/drizzle/oauth-connected-sign-in.ts +11 -10
- package/src/drizzle/oauth-connected-state.ts +40 -25
- package/src/drizzle/oauth-connected-target.ts +9 -5
- package/src/drizzle/oauth-drivers.ts +13 -5
- package/src/drizzle/oauth-flow.ts +1 -1
- package/src/drizzle/oauth-model.ts +4 -4
- package/src/drizzle/oauth-registration.ts +2 -2
- package/src/drizzle/oauth-state.ts +17 -15
- package/src/drizzle/oauth-target.ts +11 -3
- package/src/drizzle/passkey-drivers.ts +7 -3
- package/src/drizzle/passkey-write-drivers.ts +11 -2
- package/src/drizzle/pg-identity.ts +2 -2
- package/src/drizzle/phone-model.ts +3 -3
- package/src/drizzle/phone-target.ts +11 -4
- package/src/drizzle/sqlite-do-database.ts +87 -0
- package/src/drizzle/sqlite-emails.ts +1 -1
- package/src/drizzle/sqlite-identity.ts +2 -2
- package/src/drizzle/sqlite-passwords.ts +1 -1
- package/src/drizzle/sqlite-proofs.ts +2 -2
- package/src/drizzle/sqlite-sessions.ts +2 -2
- package/src/drizzle/storage-validation.ts +15 -6
- package/src/drizzle/totp-state.ts +8 -8
- package/src/drizzle/totp-target.ts +11 -5
package/dist/SqliteDo.mjs
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { sqlClientSessionStandaloneGuard } from "./drizzle/session-target.mjs";
|
|
2
|
+
import { sqlClientEmailStandaloneGuard } from "./drizzle/email-target.mjs";
|
|
3
|
+
import { sqlClientOAuthStandaloneGuard } from "./drizzle/oauth-target.mjs";
|
|
4
|
+
import { sqlClientPasswordStandaloneGuard } from "./drizzle/password-target.mjs";
|
|
1
5
|
import { passwordPreparedPersistenceLayer } from "./drizzle/password-prepared-target.mjs";
|
|
6
|
+
import { sqlClientProofStandaloneGuard } from "./drizzle/proof-target.mjs";
|
|
2
7
|
import { nativeDatabase } from "./drizzle/native-database.mjs";
|
|
3
|
-
import { makeTotpTarget } from "./drizzle/totp-target.mjs";
|
|
8
|
+
import { makeTotpTarget, sqlClientTotpStandaloneGuard } from "./drizzle/totp-target.mjs";
|
|
9
|
+
import { sqlClientPasskeyStandaloneGuard } from "./drizzle/passkey-target.mjs";
|
|
4
10
|
import { makePasskeyTarget } from "./drizzle/passkey-drivers.mjs";
|
|
5
|
-
import { makePhoneTarget } from "./drizzle/phone-target.mjs";
|
|
11
|
+
import { makePhoneTarget, sqlClientPhoneStandaloneGuard } from "./drizzle/phone-target.mjs";
|
|
6
12
|
import { makeSqliteEmailTarget, sqliteEmailConfiguration } from "./drizzle/sqlite-emails.mjs";
|
|
7
13
|
import { makeSqliteExternalIdentityServices, makeSqliteIdentityServices, makeSqliteSubjectProvisioningServices } from "./drizzle/sqlite-identity.mjs";
|
|
8
14
|
import { makeSqlitePasswordTarget, sqlitePasswordConfiguration } from "./drizzle/sqlite-passwords.mjs";
|
|
@@ -10,78 +16,57 @@ import { makeSqliteProofTarget, sqliteProofConfiguration } from "./drizzle/sqlit
|
|
|
10
16
|
import { makeSqliteSessionTarget, sqliteSessionConfiguration } from "./drizzle/sqlite-sessions.mjs";
|
|
11
17
|
import { makeSqlitePasswordPreparedTarget } from "./drizzle/sqlite-password-prepared.mjs";
|
|
12
18
|
import { makeOAuthTarget } from "./drizzle/oauth-drivers.mjs";
|
|
19
|
+
import { makeDatabase } from "./drizzle/sqlite-do-database.mjs";
|
|
13
20
|
import { NativeDatabase, PersistenceConfigurationError } from "@yielded/auth-persistence/Adapter";
|
|
14
21
|
import { Context, Effect, Layer } from "effect";
|
|
15
22
|
import { SqliteClient } from "@effect/sql-sqlite-do/SqliteClient";
|
|
16
23
|
import { makeWithDefaults } from "drizzle-orm/effect-sqlite-do";
|
|
17
24
|
//#region src/SqliteDo.ts
|
|
18
|
-
/** The application-owned Drizzle
|
|
25
|
+
/** The application-owned Drizzle queries with Effect SQL transaction ownership. */
|
|
19
26
|
var Database = class extends Context.Service()("effect-auth/persistence-drizzle/SqliteDo/Database") {};
|
|
20
|
-
/**
|
|
27
|
+
/** Construct Drizzle with asynchronous transactions owned by Effect SQL. */
|
|
21
28
|
const databaseLayer = Layer.effect(Database, Effect.gen(function* () {
|
|
22
29
|
const storage = (yield* SqliteClient).config.storage;
|
|
23
|
-
if (storage === void 0) return yield* PersistenceConfigurationError.make({ reason: "SqliteDo requires a SQL client configured with
|
|
24
|
-
return yield* makeWithDefaults({ storage });
|
|
30
|
+
if (storage === void 0) return yield* PersistenceConfigurationError.make({ reason: "SqliteDo requires a SQL client configured with Durable Object storage" });
|
|
31
|
+
return yield* makeDatabase(yield* makeWithDefaults({ storage }));
|
|
25
32
|
}));
|
|
26
|
-
const sessionTarget = makeSqliteSessionTarget(Database, sqliteSessionConfiguration("
|
|
27
|
-
const proofTarget = makeSqliteProofTarget(Database, sqliteProofConfiguration("
|
|
28
|
-
const passwordTarget = makeSqlitePasswordTarget(Database, sqlitePasswordConfiguration("
|
|
29
|
-
|
|
30
|
-
* Email mutations must own their outer transactionSync. Arbitrary raw Drizzle
|
|
31
|
-
* nesting is not detectable; owner bodies and mapping allocators stay runSync-compatible.
|
|
32
|
-
*/
|
|
33
|
-
const { coordinateEmailAddress, coordinateEmailRegistration, makeEmailAddressServices, makeEmailRegistrationServices, makeEmailSignInServices } = makeSqliteEmailTarget(Database, sqliteEmailConfiguration("synchronous", Effect.void, Effect.void));
|
|
34
|
-
/**
|
|
35
|
-
* Password mutations and registration must own their outer transactionSync.
|
|
36
|
-
* Arbitrary raw Drizzle nesting is not detectable; owner bodies must remain
|
|
37
|
-
* runSync-compatible. Detectable Effect commit scopes are rejected pre-write.
|
|
38
|
-
*/
|
|
33
|
+
const sessionTarget = makeSqliteSessionTarget(Database, (service) => sqliteSessionConfiguration("interactive", sqlClientSessionStandaloneGuard(service)));
|
|
34
|
+
const proofTarget = makeSqliteProofTarget(Database, (service) => sqliteProofConfiguration("interactive", sqlClientProofStandaloneGuard(service)));
|
|
35
|
+
const passwordTarget = makeSqlitePasswordTarget(Database, (service) => sqlitePasswordConfiguration("interactive", sqlClientPasswordStandaloneGuard(service), sqlClientProofStandaloneGuard(service)));
|
|
36
|
+
const { coordinateEmailAddress, coordinateEmailRegistration, makeEmailAddressServices, makeEmailRegistrationServices, makeEmailSignInServices } = makeSqliteEmailTarget(Database, (service) => sqliteEmailConfiguration("interactive", sqlClientEmailStandaloneGuard(service), sqlClientProofStandaloneGuard(service)));
|
|
39
37
|
const { coordinatePasswordPersistence, coordinatePasswordRegistration, makePasswordPersistenceServices, makePasswordRegistrationServices } = passwordTarget;
|
|
40
|
-
/**
|
|
41
|
-
* Proof mutations and coordinateProofPersistence must own their outermost
|
|
42
|
-
* transactionSync call. The installed driver cannot detect an arbitrary raw
|
|
43
|
-
* Drizzle outer transaction; calling either boundary from one is unsupported.
|
|
44
|
-
* The owner body must remain runSync-compatible.
|
|
45
|
-
*/
|
|
46
38
|
const { coordinateProofPersistence, makeProofPersistenceServices } = proofTarget;
|
|
47
|
-
/**
|
|
48
|
-
* Session mutation methods and coordinate* functions must own their outermost
|
|
49
|
-
* transactionSync call. The installed Drizzle driver exposes no context marker
|
|
50
|
-
* for an arbitrary raw outer database.transaction call, so invoking either
|
|
51
|
-
* boundary from one is unsupported and cannot be detected. Detectable Effect
|
|
52
|
-
* commit scopes are rejected before writes.
|
|
53
|
-
*/
|
|
54
39
|
const { coordinateAuthenticationAuthority, coordinatePendingAuthentication, coordinateSignedSessionValidity, coordinateStatefulSessions, makeAuthenticationAuthorityServices, makePendingAuthenticationServices, makeSessionStepUpServices, coordinateSessionStepUp, makeSignedSessionValidityServices, makeStatefulSessionServices } = sessionTarget;
|
|
55
|
-
const commitMode = "
|
|
56
|
-
const makeIdentityServices = (mapping) => makeSqliteIdentityServices(mapping, "
|
|
57
|
-
const makeSubjectProvisioningServices = (mapping) => makeSqliteSubjectProvisioningServices(mapping, "
|
|
40
|
+
const commitMode = "interactive";
|
|
41
|
+
const makeIdentityServices = (mapping) => makeSqliteIdentityServices(mapping, "interactive").pipe(Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)));
|
|
42
|
+
const makeSubjectProvisioningServices = (mapping) => makeSqliteSubjectProvisioningServices(mapping, "interactive").pipe(Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)));
|
|
58
43
|
const makeExternalIdentityServices = (mapping) => makeSqliteExternalIdentityServices(mapping).pipe(Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)));
|
|
59
|
-
const { makePasswordPreparedPersistenceServices, coordinatePasswordPreparedPersistence } = makeSqlitePasswordPreparedTarget(Database, sqlitePasswordConfiguration("
|
|
44
|
+
const { makePasswordPreparedPersistenceServices, coordinatePasswordPreparedPersistence } = makeSqlitePasswordPreparedTarget(Database, (service) => sqlitePasswordConfiguration("interactive", sqlClientPasswordStandaloneGuard(service), sqlClientProofStandaloneGuard(service)));
|
|
60
45
|
const { makeOAuthAccountsServices, makeOAuthSignInServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, coordinateOAuthRegistration, coordinateOAuthSignIn, coordinateOAuthRegistrationIntents, coordinateOAuthAccounts, makeOAuthConnectedServices, makeOAuthConnectedRevocationServices, coordinateOAuthConnected, coordinateOAuthConnectedRevocations } = makeOAuthTarget(Database, {
|
|
61
|
-
mode: "
|
|
46
|
+
mode: "interactive",
|
|
62
47
|
dialect: "sqlite",
|
|
63
48
|
locking: false,
|
|
64
|
-
standaloneGuard:
|
|
49
|
+
standaloneGuard: sqlClientOAuthStandaloneGuard
|
|
65
50
|
});
|
|
66
51
|
const { makePasskeyCredentialServices, makePasskeyPersistenceServices, makePasskeyEnrollmentContextServices, makePasskeyRegistrationCeremonyServices, coordinatePasskeyPersistence, coordinatePasskeyRegistrationCeremony, makePasskeyManagementServices, makePasskeyRegistrationServices, coordinatePasskeyManagement, coordinatePasskeyRegistration } = makePasskeyTarget(Database, {
|
|
67
|
-
mode: "
|
|
52
|
+
mode: "interactive",
|
|
68
53
|
dialect: "sqlite",
|
|
69
54
|
locking: false,
|
|
70
|
-
standaloneGuard:
|
|
55
|
+
standaloneGuard: sqlClientPasskeyStandaloneGuard
|
|
71
56
|
});
|
|
72
57
|
const { makeTotpPersistenceServices, coordinateTotpPersistence } = makeTotpTarget(Database, {
|
|
73
|
-
mode: "
|
|
58
|
+
mode: "interactive",
|
|
74
59
|
dialect: "sqlite",
|
|
75
60
|
locking: false,
|
|
76
|
-
standaloneGuard:
|
|
61
|
+
standaloneGuard: sqlClientTotpStandaloneGuard
|
|
77
62
|
});
|
|
78
63
|
const { makePhonePersistenceServices, coordinatePhonePersistence } = makePhoneTarget(Database, {
|
|
79
|
-
mode: "
|
|
64
|
+
mode: "interactive",
|
|
80
65
|
dialect: "sqlite",
|
|
81
66
|
locking: false,
|
|
82
|
-
standaloneGuard:
|
|
67
|
+
standaloneGuard: sqlClientPhoneStandaloneGuard
|
|
83
68
|
});
|
|
84
69
|
//#endregion
|
|
85
|
-
export { Database, commitMode, coordinateAuthenticationAuthority, coordinateEmailAddress, coordinateEmailRegistration, coordinateOAuthAccounts, coordinateOAuthConnected, coordinateOAuthConnectedRevocations, coordinateOAuthRegistration, coordinateOAuthRegistrationIntents, coordinateOAuthSignIn, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinatePasswordPersistence, coordinatePasswordPreparedPersistence, coordinatePasswordRegistration, coordinatePendingAuthentication, coordinatePhonePersistence, coordinateProofPersistence, coordinateSessionStepUp, coordinateSignedSessionValidity, coordinateStatefulSessions, coordinateTotpPersistence, databaseLayer, makeAuthenticationAuthorityServices, makeEmailAddressServices, makeEmailRegistrationServices, makeEmailSignInServices, makeExternalIdentityServices, makeIdentityServices, makeOAuthAccountsServices, makeOAuthConnectedRevocationServices, makeOAuthConnectedServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, makeOAuthSignInServices, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices, makePasswordPersistenceServices, makePasswordPreparedPersistenceServices, makePasswordRegistrationServices, makePendingAuthenticationServices, makePhonePersistenceServices, makeProofPersistenceServices, makeSessionStepUpServices, makeSignedSessionValidityServices, makeStatefulSessionServices, makeSubjectProvisioningServices, makeTotpPersistenceServices, passwordPreparedPersistenceLayer };
|
|
70
|
+
export { Database, commitMode, coordinateAuthenticationAuthority, coordinateEmailAddress, coordinateEmailRegistration, coordinateOAuthAccounts, coordinateOAuthConnected, coordinateOAuthConnectedRevocations, coordinateOAuthRegistration, coordinateOAuthRegistrationIntents, coordinateOAuthSignIn, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinatePasswordPersistence, coordinatePasswordPreparedPersistence, coordinatePasswordRegistration, coordinatePendingAuthentication, coordinatePhonePersistence, coordinateProofPersistence, coordinateSessionStepUp, coordinateSignedSessionValidity, coordinateStatefulSessions, coordinateTotpPersistence, databaseLayer, makeAuthenticationAuthorityServices, makeDatabase, makeEmailAddressServices, makeEmailRegistrationServices, makeEmailSignInServices, makeExternalIdentityServices, makeIdentityServices, makeOAuthAccountsServices, makeOAuthConnectedRevocationServices, makeOAuthConnectedServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, makeOAuthSignInServices, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices, makePasswordPersistenceServices, makePasswordPreparedPersistenceServices, makePasswordRegistrationServices, makePendingAuthenticationServices, makePhonePersistenceServices, makeProofPersistenceServices, makeSessionStepUpServices, makeSignedSessionValidityServices, makeStatefulSessionServices, makeSubjectProvisioningServices, makeTotpPersistenceServices, passwordPreparedPersistenceLayer };
|
|
86
71
|
|
|
87
72
|
//# sourceMappingURL=SqliteDo.mjs.map
|
package/dist/SqliteDo.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteDo.mjs","names":[],"sources":["../src/SqliteDo.ts"],"sourcesContent":["import { SqliteClient } from \"@effect/sql-sqlite-do/SqliteClient\";\nimport { NativeDatabase, PersistenceConfigurationError } from \"@yielded/auth-persistence/Adapter\";\nimport type { AnyRelations } from \"drizzle-orm\";\nimport { type EffectSQLiteDoDatabase, makeWithDefaults } from \"drizzle-orm/effect-sqlite-do\";\nimport type { AnySQLiteTable } from \"drizzle-orm/sqlite-core\";\nimport { Context, Effect, Layer } from \"effect\";\n\nimport { nativeDatabase } from \"./drizzle/native-database\";\n\n/** The application-owned Drizzle database used to construct persistence services. */\nexport class Database extends Context.Service<Database, EffectSQLiteDoDatabase<AnyRelations>>()(\n \"effect-auth/persistence-drizzle/SqliteDo/Database\",\n) {}\n\n/** The SQL-client Layer must configure storage so Drizzle owns transactionSync. */\nexport const databaseLayer = Layer.effect(\n Database,\n Effect.gen(function* () {\n const client = yield* SqliteClient;\n const storage = client.config.storage;\n\n if (storage === undefined)\n return yield* PersistenceConfigurationError.make({\n reason:\n \"SqliteDo requires a SQL client configured with storage for synchronous transactions\",\n });\n\n return yield* makeWithDefaults({ storage });\n }),\n);\n\nimport type {\n ExternalIdentityTables,\n IdentityTables,\n SubjectProvisioningTables,\n} from \"./drizzle/model\";\nimport { makeSqliteEmailTarget, sqliteEmailConfiguration } from \"./drizzle/sqlite-emails\";\nimport {\n makeSqliteExternalIdentityServices,\n makeSqliteIdentityServices,\n makeSqliteSubjectProvisioningServices,\n} from \"./drizzle/sqlite-identity\";\nimport { makeSqlitePasswordTarget, sqlitePasswordConfiguration } from \"./drizzle/sqlite-passwords\";\nimport { makeSqliteProofTarget, sqliteProofConfiguration } from \"./drizzle/sqlite-proofs\";\nimport { makeSqliteSessionTarget, sqliteSessionConfiguration } from \"./drizzle/sqlite-sessions\";\n\nconst sessionTarget = makeSqliteSessionTarget<Database, EffectSQLiteDoDatabase<AnyRelations>, true>(\n Database,\n sqliteSessionConfiguration(\"synchronous\", Effect.void),\n);\n\nconst proofTarget = makeSqliteProofTarget<Database, EffectSQLiteDoDatabase<AnyRelations>, true>(\n Database,\n sqliteProofConfiguration(\"synchronous\", Effect.void),\n);\n\nconst passwordTarget = makeSqlitePasswordTarget<\n Database,\n EffectSQLiteDoDatabase<AnyRelations>,\n true\n>(Database, sqlitePasswordConfiguration(\"synchronous\", Effect.void, Effect.void));\n\nconst emailTarget = makeSqliteEmailTarget<Database, EffectSQLiteDoDatabase<AnyRelations>, true>(\n Database,\n sqliteEmailConfiguration(\"synchronous\", Effect.void, Effect.void),\n);\n\n/**\n * Email mutations must own their outer transactionSync. Arbitrary raw Drizzle\n * nesting is not detectable; owner bodies and mapping allocators stay runSync-compatible.\n */\nexport const {\n coordinateEmailAddress,\n coordinateEmailRegistration,\n makeEmailAddressServices,\n makeEmailRegistrationServices,\n makeEmailSignInServices,\n} = emailTarget;\n\n/**\n * Password mutations and registration must own their outer transactionSync.\n * Arbitrary raw Drizzle nesting is not detectable; owner bodies must remain\n * runSync-compatible. Detectable Effect commit scopes are rejected pre-write.\n */\nexport const {\n coordinatePasswordPersistence,\n coordinatePasswordRegistration,\n makePasswordPersistenceServices,\n makePasswordRegistrationServices,\n} = passwordTarget;\n\n/**\n * Proof mutations and coordinateProofPersistence must own their outermost\n * transactionSync call. The installed driver cannot detect an arbitrary raw\n * Drizzle outer transaction; calling either boundary from one is unsupported.\n * The owner body must remain runSync-compatible.\n */\nexport const { coordinateProofPersistence, makeProofPersistenceServices } = proofTarget;\n\n/**\n * Session mutation methods and coordinate* functions must own their outermost\n * transactionSync call. The installed Drizzle driver exposes no context marker\n * for an arbitrary raw outer database.transaction call, so invoking either\n * boundary from one is unsupported and cannot be detected. Detectable Effect\n * commit scopes are rejected before writes.\n */\nexport const {\n coordinateAuthenticationAuthority,\n coordinatePendingAuthentication,\n coordinateSignedSessionValidity,\n coordinateStatefulSessions,\n makeAuthenticationAuthorityServices,\n makePendingAuthenticationServices,\n makeSessionStepUpServices,\n coordinateSessionStepUp,\n makeSignedSessionValidityServices,\n makeStatefulSessionServices,\n} = sessionTarget;\n\nexport const commitMode = \"synchronous\" as const;\n\nexport const makeIdentityServices = <\n Subject extends AnySQLiteTable,\n Identifier extends AnySQLiteTable,\n External extends AnySQLiteTable,\n Request extends AnySQLiteTable,\n NativeId,\n>(\n mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>,\n) =>\n makeSqliteIdentityServices(mapping, \"synchronous\").pipe(\n Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)),\n );\n\nexport const makeSubjectProvisioningServices = <\n Subject extends AnySQLiteTable,\n Identifier extends AnySQLiteTable,\n Request extends AnySQLiteTable,\n NativeId,\n>(\n mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>,\n) =>\n makeSqliteSubjectProvisioningServices(mapping, \"synchronous\").pipe(\n Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)),\n );\n\nexport const makeExternalIdentityServices = <\n Subject extends AnySQLiteTable,\n External extends AnySQLiteTable,\n NativeId,\n>(\n mapping: ExternalIdentityTables<Subject, External, NativeId>,\n) =>\n makeSqliteExternalIdentityServices(mapping).pipe(\n Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)),\n );\n\nimport { makeSqlitePasswordPreparedTarget } from \"./drizzle/sqlite-password-prepared\";\n\nconst passwordPreparedTarget = makeSqlitePasswordPreparedTarget<\n Database,\n EffectSQLiteDoDatabase<AnyRelations>,\n true\n>(Database, sqlitePasswordConfiguration(\"synchronous\", Effect.void, Effect.void));\n\nexport const { makePasswordPreparedPersistenceServices, coordinatePasswordPreparedPersistence } =\n passwordPreparedTarget;\n\nexport { passwordPreparedPersistenceLayer } from \"./drizzle/password-prepared-target\";\n\nimport { makeOAuthTarget } from \"./drizzle/oauth-drivers\";\n\nconst oauthTarget = makeOAuthTarget<\n Database,\n EffectSQLiteDoDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>,\n true\n>(Database, {\n mode: \"synchronous\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: () => Effect.void,\n});\n\nexport const {\n makeOAuthAccountsServices,\n makeOAuthSignInServices,\n makeOAuthRegistrationIntentServices,\n makeOAuthRegistrationServices,\n coordinateOAuthRegistration,\n coordinateOAuthSignIn,\n coordinateOAuthRegistrationIntents,\n coordinateOAuthAccounts,\n makeOAuthConnectedServices,\n makeOAuthConnectedRevocationServices,\n coordinateOAuthConnected,\n coordinateOAuthConnectedRevocations,\n} = oauthTarget;\n\nimport { makePasskeyTarget } from \"./drizzle/passkey-drivers\";\n\nconst passkeyTarget = makePasskeyTarget<\n Database,\n EffectSQLiteDoDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>,\n unknown,\n true\n>(Database, {\n mode: \"synchronous\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: () => Effect.void,\n});\n\nexport const {\n makePasskeyCredentialServices,\n makePasskeyPersistenceServices,\n makePasskeyEnrollmentContextServices,\n makePasskeyRegistrationCeremonyServices,\n coordinatePasskeyPersistence,\n coordinatePasskeyRegistrationCeremony,\n makePasskeyManagementServices,\n makePasskeyRegistrationServices,\n coordinatePasskeyManagement,\n coordinatePasskeyRegistration,\n} = passkeyTarget;\n\nimport { makeTotpTarget } from \"./drizzle/totp-target\";\n\nconst totpTarget = makeTotpTarget<\n Database,\n EffectSQLiteDoDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>,\n unknown,\n true\n>(Database, {\n mode: \"synchronous\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: () => Effect.void,\n});\n\nexport const { makeTotpPersistenceServices, coordinateTotpPersistence } = totpTarget;\n\nimport { makePhoneTarget } from \"./drizzle/phone-target\";\n\nconst phoneTarget = makePhoneTarget<\n Database,\n EffectSQLiteDoDatabase<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>,\n unknown,\n true\n>(Database, {\n mode: \"synchronous\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: () => Effect.void,\n});\n\nexport const { makePhonePersistenceServices, coordinatePhonePersistence } = phoneTarget;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAUA,IAAa,WAAb,cAA8B,QAAQ,QAAwD,CAAC,CAC7F,mDACF,CAAC,CAAC,CAAC;;AAGH,MAAa,gBAAgB,MAAM,OACjC,UACA,OAAO,IAAI,aAAa;CAEtB,MAAM,WAAU,OADM,aAAA,CACC,OAAO;CAE9B,IAAI,YAAY,KAAA,GACd,OAAO,OAAO,8BAA8B,KAAK,EAC/C,QACE,sFACJ,CAAC;CAEH,OAAO,OAAO,iBAAiB,EAAE,QAAQ,CAAC;AAC5C,CAAC,CACH;AAiBA,MAAM,gBAAgB,wBACpB,UACA,2BAA2B,eAAe,OAAO,IAAI,CACvD;AAEA,MAAM,cAAc,sBAClB,UACA,yBAAyB,eAAe,OAAO,IAAI,CACrD;AAEA,MAAM,iBAAiB,yBAIrB,UAAU,4BAA4B,eAAe,OAAO,MAAM,OAAO,IAAI,CAAC;;;;;AAWhF,MAAa,EACX,wBACA,6BACA,0BACA,+BACA,4BAdkB,sBAClB,UACA,yBAAyB,eAAe,OAAO,MAAM,OAAO,IAAI,CAa9D;;;;;;AAOJ,MAAa,EACX,+BACA,gCACA,iCACA,qCACE;;;;;;;AAQJ,MAAa,EAAE,4BAA4B,iCAAiC;;;;;;;;AAS5E,MAAa,EACX,mCACA,iCACA,iCACA,4BACA,qCACA,mCACA,2BACA,yBACA,mCACA,gCACE;AAEJ,MAAa,aAAa;AAE1B,MAAa,wBAOX,YAEA,2BAA2B,SAAS,aAAa,CAAC,CAAC,KACjD,OAAO,qBAAqB,gBAAgB,eAAe,QAAQ,CAAC,CACtE;AAEF,MAAa,mCAMX,YAEA,sCAAsC,SAAS,aAAa,CAAC,CAAC,KAC5D,OAAO,qBAAqB,gBAAgB,eAAe,QAAQ,CAAC,CACtE;AAEF,MAAa,gCAKX,YAEA,mCAAmC,OAAO,CAAC,CAAC,KAC1C,OAAO,qBAAqB,gBAAgB,eAAe,QAAQ,CAAC,CACtE;AAUF,MAAa,EAAE,yCAAyC,0CANzB,iCAI7B,UAAU,4BAA4B,eAAe,OAAO,MAAM,OAAO,IAAI,CAG7E;AAkBF,MAAa,EACX,2BACA,yBACA,qCACA,+BACA,6BACA,uBACA,oCACA,yBACA,4BACA,sCACA,0BACA,wCAxBkB,gBAKlB,UAAU;CACV,MAAM;CACN,SAAS;CACT,SAAS;CACT,uBAAuB,OAAO;AAChC,CAeI;AAiBJ,MAAa,EACX,+BACA,gCACA,sCACA,yCACA,8BACA,uCACA,+BACA,iCACA,6BACA,kCAvBoB,kBAMpB,UAAU;CACV,MAAM;CACN,SAAS;CACT,SAAS;CACT,uBAAuB,OAAO;AAChC,CAaI;AAiBJ,MAAa,EAAE,6BAA6B,8BAbzB,eAMjB,UAAU;CACV,MAAM;CACN,SAAS;CACT,SAAS;CACT,uBAAuB,OAAO;AAChC,CAE0E;AAiB1E,MAAa,EAAE,8BAA8B,+BAbzB,gBAMlB,UAAU;CACV,MAAM;CACN,SAAS;CACT,SAAS;CACT,uBAAuB,OAAO;AAChC,CAE4E"}
|
|
1
|
+
{"version":3,"file":"SqliteDo.mjs","names":[],"sources":["../src/SqliteDo.ts"],"sourcesContent":["import { SqliteClient } from \"@effect/sql-sqlite-do/SqliteClient\";\nimport { NativeDatabase, PersistenceConfigurationError } from \"@yielded/auth-persistence/Adapter\";\nimport type { AnyRelations } from \"drizzle-orm\";\nimport { makeWithDefaults } from \"drizzle-orm/effect-sqlite-do\";\n\nimport { type DatabaseValue, makeDatabase } from \"./drizzle/sqlite-do-database\";\nexport { type DatabaseValue, type Transaction, makeDatabase } from \"./drizzle/sqlite-do-database\";\nimport type { AnySQLiteTable } from \"drizzle-orm/sqlite-core\";\nimport { Context, Effect, Layer } from \"effect\";\n\nimport { nativeDatabase } from \"./drizzle/native-database\";\n\n/** The application-owned Drizzle queries with Effect SQL transaction ownership. */\nexport class Database extends Context.Service<Database, DatabaseValue<AnyRelations>>()(\n \"effect-auth/persistence-drizzle/SqliteDo/Database\",\n) {}\n\n/** Construct Drizzle with asynchronous transactions owned by Effect SQL. */\nexport const databaseLayer = Layer.effect(\n Database,\n Effect.gen(function* () {\n const client = yield* SqliteClient;\n const storage = client.config.storage;\n\n if (storage === undefined)\n return yield* PersistenceConfigurationError.make({\n reason: \"SqliteDo requires a SQL client configured with Durable Object storage\",\n });\n\n return yield* makeDatabase(yield* makeWithDefaults({ storage }));\n }),\n);\n\nimport { sqlClientEmailStandaloneGuard } from \"./drizzle/email-target\";\nimport type {\n ExternalIdentityTables,\n IdentityTables,\n SubjectProvisioningTables,\n} from \"./drizzle/model\";\nimport { sqlClientPasswordStandaloneGuard } from \"./drizzle/password-target\";\nimport { sqlClientProofStandaloneGuard } from \"./drizzle/proof-target\";\nimport { sqlClientSessionStandaloneGuard } from \"./drizzle/session-target\";\nimport { makeSqliteEmailTarget, sqliteEmailConfiguration } from \"./drizzle/sqlite-emails\";\nimport {\n makeSqliteExternalIdentityServices,\n makeSqliteIdentityServices,\n makeSqliteSubjectProvisioningServices,\n} from \"./drizzle/sqlite-identity\";\nimport { makeSqlitePasswordTarget, sqlitePasswordConfiguration } from \"./drizzle/sqlite-passwords\";\nimport { makeSqliteProofTarget, sqliteProofConfiguration } from \"./drizzle/sqlite-proofs\";\nimport { makeSqliteSessionTarget, sqliteSessionConfiguration } from \"./drizzle/sqlite-sessions\";\n\nconst sessionTarget = makeSqliteSessionTarget<Database, DatabaseValue<AnyRelations>>(\n Database,\n (service) => sqliteSessionConfiguration(\"interactive\", sqlClientSessionStandaloneGuard(service)),\n);\n\nconst proofTarget = makeSqliteProofTarget<Database, DatabaseValue<AnyRelations>>(\n Database,\n (service) => sqliteProofConfiguration(\"interactive\", sqlClientProofStandaloneGuard(service)),\n);\n\nconst passwordTarget = makeSqlitePasswordTarget<Database, DatabaseValue<AnyRelations>>(\n Database,\n (service) =>\n sqlitePasswordConfiguration(\n \"interactive\",\n sqlClientPasswordStandaloneGuard(service),\n sqlClientProofStandaloneGuard(service),\n ),\n);\n\nconst emailTarget = makeSqliteEmailTarget<Database, DatabaseValue<AnyRelations>>(\n Database,\n (service) =>\n sqliteEmailConfiguration(\n \"interactive\",\n sqlClientEmailStandaloneGuard(service),\n sqlClientProofStandaloneGuard(service),\n ),\n);\n\nexport const {\n coordinateEmailAddress,\n coordinateEmailRegistration,\n makeEmailAddressServices,\n makeEmailRegistrationServices,\n makeEmailSignInServices,\n} = emailTarget;\n\nexport const {\n coordinatePasswordPersistence,\n coordinatePasswordRegistration,\n makePasswordPersistenceServices,\n makePasswordRegistrationServices,\n} = passwordTarget;\n\nexport const { coordinateProofPersistence, makeProofPersistenceServices } = proofTarget;\n\nexport const {\n coordinateAuthenticationAuthority,\n coordinatePendingAuthentication,\n coordinateSignedSessionValidity,\n coordinateStatefulSessions,\n makeAuthenticationAuthorityServices,\n makePendingAuthenticationServices,\n makeSessionStepUpServices,\n coordinateSessionStepUp,\n makeSignedSessionValidityServices,\n makeStatefulSessionServices,\n} = sessionTarget;\n\nexport const commitMode = \"interactive\" as const;\n\nexport const makeIdentityServices = <\n Subject extends AnySQLiteTable,\n Identifier extends AnySQLiteTable,\n External extends AnySQLiteTable,\n Request extends AnySQLiteTable,\n NativeId,\n>(\n mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>,\n) =>\n makeSqliteIdentityServices(mapping, \"interactive\").pipe(\n Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)),\n );\n\nexport const makeSubjectProvisioningServices = <\n Subject extends AnySQLiteTable,\n Identifier extends AnySQLiteTable,\n Request extends AnySQLiteTable,\n NativeId,\n>(\n mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>,\n) =>\n makeSqliteSubjectProvisioningServices(mapping, \"interactive\").pipe(\n Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)),\n );\n\nexport const makeExternalIdentityServices = <\n Subject extends AnySQLiteTable,\n External extends AnySQLiteTable,\n NativeId,\n>(\n mapping: ExternalIdentityTables<Subject, External, NativeId>,\n) =>\n makeSqliteExternalIdentityServices(mapping).pipe(\n Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)),\n );\n\nimport { makeSqlitePasswordPreparedTarget } from \"./drizzle/sqlite-password-prepared\";\n\nconst passwordPreparedTarget = makeSqlitePasswordPreparedTarget<\n Database,\n DatabaseValue<AnyRelations>\n>(Database, (service) =>\n sqlitePasswordConfiguration(\n \"interactive\",\n sqlClientPasswordStandaloneGuard(service),\n sqlClientProofStandaloneGuard(service),\n ),\n);\n\nexport const { makePasswordPreparedPersistenceServices, coordinatePasswordPreparedPersistence } =\n passwordPreparedTarget;\n\nexport { passwordPreparedPersistenceLayer } from \"./drizzle/password-prepared-target\";\n\nimport { makeOAuthTarget } from \"./drizzle/oauth-drivers\";\nimport { sqlClientOAuthStandaloneGuard } from \"./drizzle/oauth-target\";\n\nconst oauthTarget = makeOAuthTarget<\n Database,\n DatabaseValue<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>(Database, {\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientOAuthStandaloneGuard,\n});\n\nexport const {\n makeOAuthAccountsServices,\n makeOAuthSignInServices,\n makeOAuthRegistrationIntentServices,\n makeOAuthRegistrationServices,\n coordinateOAuthRegistration,\n coordinateOAuthSignIn,\n coordinateOAuthRegistrationIntents,\n coordinateOAuthAccounts,\n makeOAuthConnectedServices,\n makeOAuthConnectedRevocationServices,\n coordinateOAuthConnected,\n coordinateOAuthConnectedRevocations,\n} = oauthTarget;\n\nimport { makePasskeyTarget } from \"./drizzle/passkey-drivers\";\nimport { sqlClientPasskeyStandaloneGuard } from \"./drizzle/passkey-target\";\n\nconst passkeyTarget = makePasskeyTarget<\n Database,\n DatabaseValue<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>(Database, {\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientPasskeyStandaloneGuard,\n});\n\nexport const {\n makePasskeyCredentialServices,\n makePasskeyPersistenceServices,\n makePasskeyEnrollmentContextServices,\n makePasskeyRegistrationCeremonyServices,\n coordinatePasskeyPersistence,\n coordinatePasskeyRegistrationCeremony,\n makePasskeyManagementServices,\n makePasskeyRegistrationServices,\n coordinatePasskeyManagement,\n coordinatePasskeyRegistration,\n} = passkeyTarget;\n\nimport { makeTotpTarget, sqlClientTotpStandaloneGuard } from \"./drizzle/totp-target\";\n\nconst totpTarget = makeTotpTarget<\n Database,\n DatabaseValue<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>(Database, {\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientTotpStandaloneGuard,\n});\n\nexport const { makeTotpPersistenceServices, coordinateTotpPersistence } = totpTarget;\n\nimport { makePhoneTarget, sqlClientPhoneStandaloneGuard } from \"./drizzle/phone-target\";\n\nconst phoneTarget = makePhoneTarget<\n Database,\n DatabaseValue<AnyRelations>,\n AnySQLiteTable<{ dialect: \"sqlite\" }>\n>(Database, {\n mode: \"interactive\",\n dialect: \"sqlite\",\n locking: false,\n standaloneGuard: sqlClientPhoneStandaloneGuard,\n});\n\nexport const { makePhonePersistenceServices, coordinatePhonePersistence } = phoneTarget;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAa,WAAb,cAA8B,QAAQ,QAA+C,CAAC,CACpF,mDACF,CAAC,CAAC,CAAC;;AAGH,MAAa,gBAAgB,MAAM,OACjC,UACA,OAAO,IAAI,aAAa;CAEtB,MAAM,WAAU,OADM,aAAA,CACC,OAAO;CAE9B,IAAI,YAAY,KAAA,GACd,OAAO,OAAO,8BAA8B,KAAK,EAC/C,QAAQ,wEACV,CAAC;CAEH,OAAO,OAAO,aAAa,OAAO,iBAAiB,EAAE,QAAQ,CAAC,CAAC;AACjE,CAAC,CACH;AAqBA,MAAM,gBAAgB,wBACpB,WACC,YAAY,2BAA2B,eAAe,gCAAgC,OAAO,CAAC,CACjG;AAEA,MAAM,cAAc,sBAClB,WACC,YAAY,yBAAyB,eAAe,8BAA8B,OAAO,CAAC,CAC7F;AAEA,MAAM,iBAAiB,yBACrB,WACC,YACC,4BACE,eACA,iCAAiC,OAAO,GACxC,8BAA8B,OAAO,CACvC,CACJ;AAYA,MAAa,EACX,wBACA,6BACA,0BACA,+BACA,4BAfkB,sBAClB,WACC,YACC,yBACE,eACA,8BAA8B,OAAO,GACrC,8BAA8B,OAAO,CACvC,CASA;AAEJ,MAAa,EACX,+BACA,gCACA,iCACA,qCACE;AAEJ,MAAa,EAAE,4BAA4B,iCAAiC;AAE5E,MAAa,EACX,mCACA,iCACA,iCACA,4BACA,qCACA,mCACA,2BACA,yBACA,mCACA,gCACE;AAEJ,MAAa,aAAa;AAE1B,MAAa,wBAOX,YAEA,2BAA2B,SAAS,aAAa,CAAC,CAAC,KACjD,OAAO,qBAAqB,gBAAgB,eAAe,QAAQ,CAAC,CACtE;AAEF,MAAa,mCAMX,YAEA,sCAAsC,SAAS,aAAa,CAAC,CAAC,KAC5D,OAAO,qBAAqB,gBAAgB,eAAe,QAAQ,CAAC,CACtE;AAEF,MAAa,gCAKX,YAEA,mCAAmC,OAAO,CAAC,CAAC,KAC1C,OAAO,qBAAqB,gBAAgB,eAAe,QAAQ,CAAC,CACtE;AAeF,MAAa,EAAE,yCAAyC,0CAXzB,iCAG7B,WAAW,YACX,4BACE,eACA,iCAAiC,OAAO,GACxC,8BAA8B,OAAO,CACvC,CAIA;AAkBF,MAAa,EACX,2BACA,yBACA,qCACA,+BACA,6BACA,uBACA,oCACA,yBACA,4BACA,sCACA,0BACA,wCAvBkB,gBAIlB,UAAU;CACV,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAeI;AAgBJ,MAAa,EACX,+BACA,gCACA,sCACA,yCACA,8BACA,uCACA,+BACA,iCACA,6BACA,kCArBoB,kBAIpB,UAAU;CACV,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAaI;AAeJ,MAAa,EAAE,6BAA6B,8BAXzB,eAIjB,UAAU;CACV,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAE0E;AAe1E,MAAa,EAAE,8BAA8B,+BAXzB,gBAIlB,UAAU;CACV,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB;AACnB,CAE4E"}
|
package/dist/SqliteNode.d.mts
CHANGED
|
@@ -482,10 +482,10 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
482
482
|
readonly nowMillis: number;
|
|
483
483
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
484
484
|
readonly _tag: "Rejected";
|
|
485
|
-
} | {
|
|
486
|
-
readonly _tag: "Ambiguous";
|
|
487
485
|
} | {
|
|
488
486
|
readonly _tag: "Cancelled";
|
|
487
|
+
} | {
|
|
488
|
+
readonly _tag: "Ambiguous";
|
|
489
489
|
} | {
|
|
490
490
|
readonly _tag: "Conflict";
|
|
491
491
|
} | {
|
|
@@ -586,7 +586,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
586
586
|
readonly hasMore: boolean;
|
|
587
587
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
588
588
|
};
|
|
589
|
-
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthSignInServices: <S extends AnySQLiteTable<{
|
|
589
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthSignInServices: <S extends AnySQLiteTable<{
|
|
590
590
|
dialect: "sqlite";
|
|
591
591
|
}>, O extends AnySQLiteTable<{
|
|
592
592
|
dialect: "sqlite";
|
|
@@ -628,7 +628,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
628
628
|
readonly hasMore: boolean;
|
|
629
629
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
630
630
|
};
|
|
631
|
-
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationIntentServices: <S extends AnySQLiteTable<{
|
|
631
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationIntentServices: <S extends AnySQLiteTable<{
|
|
632
632
|
dialect: "sqlite";
|
|
633
633
|
}>, O extends AnySQLiteTable<{
|
|
634
634
|
dialect: "sqlite";
|
|
@@ -651,7 +651,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
651
651
|
readonly nowMillis: number;
|
|
652
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>;
|
|
653
653
|
};
|
|
654
|
-
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationServices: <Registration, S extends AnySQLiteTable<{
|
|
654
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationServices: <Registration, S extends AnySQLiteTable<{
|
|
655
655
|
dialect: "sqlite";
|
|
656
656
|
}>, O extends AnySQLiteTable<{
|
|
657
657
|
dialect: "sqlite";
|
|
@@ -667,7 +667,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
667
667
|
dialect: "sqlite";
|
|
668
668
|
}>, N>(mapping: OAuthRegistrationMapping<Registration, S, O, C, AC, TA, I, R, N>) => Effect.Effect<{
|
|
669
669
|
registrationAuthority: OAuthRegistrationAuthority<Registration>;
|
|
670
|
-
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthRegistration: {
|
|
670
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthRegistration: {
|
|
671
671
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnySQLiteTable<{
|
|
672
672
|
dialect: "sqlite";
|
|
673
673
|
}>, O extends AnySQLiteTable<{
|
|
@@ -686,7 +686,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
686
686
|
readonly mapping: OAuthRegistrationMapping<NoInfer<Registration>, S, O, C, AC, TA, I, Rq, N>;
|
|
687
687
|
readonly target: SuppliedService<TargetId, OAuthRegistrationAuthority<Registration>>;
|
|
688
688
|
readonly transaction?: never;
|
|
689
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId>>;
|
|
689
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId>>;
|
|
690
690
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnySQLiteTable<{
|
|
691
691
|
dialect: "sqlite";
|
|
692
692
|
}>, O extends AnySQLiteTable<{
|
|
@@ -707,7 +707,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
707
707
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
708
708
|
readonly transaction: (...args: any[]) => any;
|
|
709
709
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
710
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
|
|
710
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
|
|
711
711
|
}, coordinateOAuthSignIn: {
|
|
712
712
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
713
713
|
dialect: "sqlite";
|
|
@@ -722,7 +722,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
722
722
|
}>, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
723
723
|
readonly mapping: OAuthSignInMapping<S, O, C, AC, F, N>;
|
|
724
724
|
readonly transaction?: never;
|
|
725
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthSignInPersistence>>;
|
|
725
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthSignInPersistence>>;
|
|
726
726
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
727
727
|
dialect: "sqlite";
|
|
728
728
|
}>, O extends AnySQLiteTable<{
|
|
@@ -738,7 +738,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
738
738
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
739
739
|
readonly transaction: (...args: any[]) => any;
|
|
740
740
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
741
|
-
}, 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").OAuthSignInPersistence>>;
|
|
741
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthSignInPersistence>>;
|
|
742
742
|
}, coordinateOAuthRegistrationIntents: {
|
|
743
743
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
744
744
|
dialect: "sqlite";
|
|
@@ -757,7 +757,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
757
757
|
}>, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
758
758
|
readonly mapping: OAuthRegistrationIntentMapping<S, O, C, AC, F, TA, I, N>;
|
|
759
759
|
readonly transaction?: never;
|
|
760
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthRegistrationIntents>>;
|
|
760
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthRegistrationIntents>>;
|
|
761
761
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
762
762
|
dialect: "sqlite";
|
|
763
763
|
}>, O extends AnySQLiteTable<{
|
|
@@ -777,7 +777,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
777
777
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
778
778
|
readonly transaction: (...args: any[]) => any;
|
|
779
779
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
780
|
-
}, 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").OAuthRegistrationIntents>>;
|
|
780
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthRegistrationIntents>>;
|
|
781
781
|
}, coordinateOAuthAccounts: {
|
|
782
782
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
783
783
|
dialect: "sqlite";
|
|
@@ -796,7 +796,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
796
796
|
}>, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
797
797
|
readonly mapping: OAuthAccountsMapping<S, O, C, AC, F, TA, U, N>;
|
|
798
798
|
readonly transaction?: never;
|
|
799
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthAccountsPersistence>>;
|
|
799
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthAccountsPersistence>>;
|
|
800
800
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
801
801
|
dialect: "sqlite";
|
|
802
802
|
}>, O extends AnySQLiteTable<{
|
|
@@ -816,7 +816,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
816
816
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
817
817
|
readonly transaction: (...args: any[]) => any;
|
|
818
818
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
819
|
-
}, 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").OAuthAccountsPersistence>>;
|
|
819
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthAccountsPersistence>>;
|
|
820
820
|
}, makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
821
821
|
dialect: "sqlite";
|
|
822
822
|
}>, AC extends AnySQLiteTable<{
|
|
@@ -855,10 +855,10 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
855
855
|
readonly outcome: import("@yielded/auth/OAuth").OAuthSignInAccessOutcome;
|
|
856
856
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
857
857
|
readonly _tag: "Rejected";
|
|
858
|
-
} | {
|
|
859
|
-
readonly _tag: "Ambiguous";
|
|
860
858
|
} | {
|
|
861
859
|
readonly _tag: "Cancelled";
|
|
860
|
+
} | {
|
|
861
|
+
readonly _tag: "Ambiguous";
|
|
862
862
|
} | {
|
|
863
863
|
readonly _tag: "Connected";
|
|
864
864
|
readonly grant: {
|
|
@@ -1315,10 +1315,10 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1315
1315
|
readonly nowMillis: number;
|
|
1316
1316
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1317
1317
|
readonly _tag: "Rejected";
|
|
1318
|
-
} | {
|
|
1319
|
-
readonly _tag: "Ambiguous";
|
|
1320
1318
|
} | {
|
|
1321
1319
|
readonly _tag: "Cancelled";
|
|
1320
|
+
} | {
|
|
1321
|
+
readonly _tag: "Ambiguous";
|
|
1322
1322
|
} | {
|
|
1323
1323
|
readonly _tag: "Connected";
|
|
1324
1324
|
readonly grant: {
|
|
@@ -1809,7 +1809,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1809
1809
|
readonly hasMore: boolean;
|
|
1810
1810
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1811
1811
|
};
|
|
1812
|
-
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnySQLiteTable<{
|
|
1812
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnySQLiteTable<{
|
|
1813
1813
|
dialect: "sqlite";
|
|
1814
1814
|
}>, O extends AnySQLiteTable<{
|
|
1815
1815
|
dialect: "sqlite";
|
|
@@ -1917,7 +1917,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1917
1917
|
readonly settled: boolean;
|
|
1918
1918
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1919
1919
|
};
|
|
1920
|
-
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
|
|
1920
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
|
|
1921
1921
|
<D extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1922
1922
|
dialect: "sqlite";
|
|
1923
1923
|
}>, AC extends AnySQLiteTable<{
|
|
@@ -1943,7 +1943,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1943
1943
|
}>, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
1944
1944
|
readonly mapping: OAuthConnectedMapping<S, AC, T, O, F, G, C, H, UA, DC, N, J>;
|
|
1945
1945
|
readonly transaction?: never;
|
|
1946
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthConnectedPersistence>>;
|
|
1946
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthConnectedPersistence>>;
|
|
1947
1947
|
<D extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1948
1948
|
dialect: "sqlite";
|
|
1949
1949
|
}>, AC extends AnySQLiteTable<{
|
|
@@ -1971,7 +1971,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1971
1971
|
readonly transaction: SuppliedService<TxId, NoInfer<D extends {
|
|
1972
1972
|
readonly transaction: (...args: any[]) => any;
|
|
1973
1973
|
} ? Parameters<Parameters<D["transaction"]>[0]>[0] : never>, TxShape>;
|
|
1974
|
-
}, 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").OAuthConnectedPersistence>>;
|
|
1974
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthConnectedPersistence>>;
|
|
1975
1975
|
}, coordinateOAuthConnectedRevocations: {
|
|
1976
1976
|
<D extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, T extends AnySQLiteTable<{
|
|
1977
1977
|
dialect: "sqlite";
|
|
@@ -1990,7 +1990,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1990
1990
|
}>, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
1991
1991
|
readonly mapping: OAuthConnectedRevocationMapping<T, O, F, G, C, H, J, N>;
|
|
1992
1992
|
readonly transaction?: never;
|
|
1993
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthConnectedRevocations>>;
|
|
1993
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/OAuth").OAuthConnectedRevocations>>;
|
|
1994
1994
|
<D extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, T extends AnySQLiteTable<{
|
|
1995
1995
|
dialect: "sqlite";
|
|
1996
1996
|
}>, O extends AnySQLiteTable<{
|
|
@@ -2010,7 +2010,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
2010
2010
|
readonly transaction: SuppliedService<TxId, NoInfer<D extends {
|
|
2011
2011
|
readonly transaction: (...args: any[]) => any;
|
|
2012
2012
|
} ? Parameters<Parameters<D["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2013
|
-
}, 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>>;
|
|
2013
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthConnectedRevocations>>;
|
|
2014
2014
|
};
|
|
2015
2015
|
export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
2016
2016
|
dialect: "sqlite";
|
|
@@ -2022,7 +2022,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2022
2022
|
dialect: "sqlite";
|
|
2023
2023
|
}>, H extends AnySQLiteTable<{
|
|
2024
2024
|
dialect: "sqlite";
|
|
2025
|
-
}>, 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<{
|
|
2025
|
+
}>, 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, import("effect/Crypto").Crypto | Database | Exclude<RSetup, NativeDatabase>>, makePasskeyPersistenceServices: <S extends AnySQLiteTable<{
|
|
2026
2026
|
dialect: "sqlite";
|
|
2027
2027
|
}>, C extends AnySQLiteTable<{
|
|
2028
2028
|
dialect: "sqlite";
|
|
@@ -2040,7 +2040,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2040
2040
|
dialect: "sqlite";
|
|
2041
2041
|
}>, Charge extends AnySQLiteTable<{
|
|
2042
2042
|
dialect: "sqlite";
|
|
2043
|
-
}>, 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<{
|
|
2043
|
+
}>, 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, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, makePasskeyEnrollmentContextServices: <S extends AnySQLiteTable<{
|
|
2044
2044
|
dialect: "sqlite";
|
|
2045
2045
|
}>, C extends AnySQLiteTable<{
|
|
2046
2046
|
dialect: "sqlite";
|
|
@@ -2052,7 +2052,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2052
2052
|
dialect: "sqlite";
|
|
2053
2053
|
}>, M extends AnySQLiteTable<{
|
|
2054
2054
|
dialect: "sqlite";
|
|
2055
|
-
}>, 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<{
|
|
2055
|
+
}>, 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, import("effect/Crypto").Crypto | Database | Exclude<RSetup, NativeDatabase>>, makePasskeyRegistrationCeremonyServices: <M extends AnySQLiteTable<{
|
|
2056
2056
|
dialect: "sqlite";
|
|
2057
2057
|
}>, Flow extends AnySQLiteTable<{
|
|
2058
2058
|
dialect: "sqlite";
|
|
@@ -2064,7 +2064,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2064
2064
|
dialect: "sqlite";
|
|
2065
2065
|
}>, H extends AnySQLiteTable<{
|
|
2066
2066
|
dialect: "sqlite";
|
|
2067
|
-
}>, 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: {
|
|
2067
|
+
}>, 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, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinatePasskeyPersistence: {
|
|
2068
2068
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2069
2069
|
dialect: "sqlite";
|
|
2070
2070
|
}>, C extends AnySQLiteTable<{
|
|
@@ -2086,7 +2086,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2086
2086
|
}>, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
2087
2087
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyPersistenceMapping<PasskeyCredentialMapping<S, C, F, O, H, N>, M, Flow, Admission, Charge, N>, RSetup>;
|
|
2088
2088
|
readonly transaction?: never;
|
|
2089
|
-
}, 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, import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2089
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2090
2090
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2091
2091
|
dialect: "sqlite";
|
|
2092
2092
|
}>, C extends AnySQLiteTable<{
|
|
@@ -2110,7 +2110,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2110
2110
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
2111
2111
|
readonly transaction: (...args: any[]) => any;
|
|
2112
2112
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2113
|
-
}, 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>>;
|
|
2113
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2114
2114
|
}, coordinatePasskeyRegistrationCeremony: {
|
|
2115
2115
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, M extends AnySQLiteTable<{
|
|
2116
2116
|
dialect: "sqlite";
|
|
@@ -2127,7 +2127,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2127
2127
|
}>, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
2128
2128
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationCeremonyMapping<M, Flow, Admission, Charge, Intent, H>, RSetup>;
|
|
2129
2129
|
readonly transaction?: never;
|
|
2130
|
-
}, 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, import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2130
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2131
2131
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, M extends AnySQLiteTable<{
|
|
2132
2132
|
dialect: "sqlite";
|
|
2133
2133
|
}>, Flow extends AnySQLiteTable<{
|
|
@@ -2145,7 +2145,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2145
2145
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
2146
2146
|
readonly transaction: (...args: any[]) => any;
|
|
2147
2147
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2148
|
-
}, 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>>;
|
|
2148
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2149
2149
|
}, makePasskeyManagementServices: <S extends AnySQLiteTable<{
|
|
2150
2150
|
dialect: "sqlite";
|
|
2151
2151
|
}>, C extends AnySQLiteTable<{
|
|
@@ -2166,7 +2166,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2166
2166
|
dialect: "sqlite";
|
|
2167
2167
|
}>, Command extends AnySQLiteTable<{
|
|
2168
2168
|
dialect: "sqlite";
|
|
2169
|
-
}>, 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<{
|
|
2169
|
+
}>, 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, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, makePasskeyRegistrationServices: <S extends AnySQLiteTable<{
|
|
2170
2170
|
dialect: "sqlite";
|
|
2171
2171
|
}>, C extends AnySQLiteTable<{
|
|
2172
2172
|
dialect: "sqlite";
|
|
@@ -2186,7 +2186,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2186
2186
|
dialect: "sqlite";
|
|
2187
2187
|
}>, Intent extends AnySQLiteTable<{
|
|
2188
2188
|
dialect: "sqlite";
|
|
2189
|
-
}>, 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: {
|
|
2189
|
+
}>, 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, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinatePasskeyManagement: {
|
|
2190
2190
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2191
2191
|
dialect: "sqlite";
|
|
2192
2192
|
}>, C extends AnySQLiteTable<{
|
|
@@ -2210,7 +2210,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2210
2210
|
}>, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
2211
2211
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyManagementMapping<S, C, F, O, H, M, Flow, Admission, Charge, Command, N>, RSetup>;
|
|
2212
2212
|
readonly transaction?: never;
|
|
2213
|
-
}, 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, import("@yielded/auth/Passkey").PasskeyManagementPersistence | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2213
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Passkey").PasskeyManagementPersistence | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2214
2214
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2215
2215
|
dialect: "sqlite";
|
|
2216
2216
|
}>, C extends AnySQLiteTable<{
|
|
@@ -2236,7 +2236,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2236
2236
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
2237
2237
|
readonly transaction: (...args: any[]) => any;
|
|
2238
2238
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2239
|
-
}, 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").PasskeyManagementPersistence | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2239
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Passkey").PasskeyManagementPersistence | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2240
2240
|
}, coordinatePasskeyRegistration: {
|
|
2241
2241
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2242
2242
|
dialect: "sqlite";
|
|
@@ -2262,7 +2262,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2262
2262
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value>, RSetup>;
|
|
2263
2263
|
readonly authority: Context.Key<AuthorityId, import("@yielded/auth-persistence/Adapter").PasskeyRegistrationWriter<Value>>;
|
|
2264
2264
|
readonly transaction?: never;
|
|
2265
|
-
}, 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>>;
|
|
2265
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, AuthorityId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2266
2266
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2267
2267
|
dialect: "sqlite";
|
|
2268
2268
|
}>, C extends AnySQLiteTable<{
|
|
@@ -2289,7 +2289,7 @@ export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
|
2289
2289
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
2290
2290
|
readonly transaction: (...args: any[]) => any;
|
|
2291
2291
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2292
|
-
}, 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>>;
|
|
2292
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, AuthorityId | TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2293
2293
|
};
|
|
2294
2294
|
export declare const makeTotpPersistenceServices: <S extends AnySQLiteTable<{
|
|
2295
2295
|
dialect: "sqlite";
|
|
@@ -2297,7 +2297,7 @@ export declare const makeTotpPersistenceServices: <S extends AnySQLiteTable<{
|
|
|
2297
2297
|
dialect: "sqlite";
|
|
2298
2298
|
}>, C extends AnySQLiteTable<{
|
|
2299
2299
|
dialect: "sqlite";
|
|
2300
|
-
}>, 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: {
|
|
2300
|
+
}>, 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, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinateTotpPersistence: {
|
|
2301
2301
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2302
2302
|
dialect: "sqlite";
|
|
2303
2303
|
}>, F extends AnySQLiteTable<{
|
|
@@ -2307,7 +2307,7 @@ export declare const makeTotpPersistenceServices: <S extends AnySQLiteTable<{
|
|
|
2307
2307
|
}>, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
2308
2308
|
readonly mapping: TotpMappingSource<TotpMapping<S, F, C, N>, RSetup>;
|
|
2309
2309
|
readonly transaction?: never;
|
|
2310
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | TotpCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Totp").TotpPersistence>>;
|
|
2310
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | TotpCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/Totp").TotpPersistence>>;
|
|
2311
2311
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2312
2312
|
dialect: "sqlite";
|
|
2313
2313
|
}>, F extends AnySQLiteTable<{
|
|
@@ -2319,7 +2319,7 @@ export declare const makeTotpPersistenceServices: <S extends AnySQLiteTable<{
|
|
|
2319
2319
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
2320
2320
|
readonly transaction: (...args: any[]) => any;
|
|
2321
2321
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2322
|
-
}, 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>>;
|
|
2322
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | TotpCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Totp").TotpPersistence>>;
|
|
2323
2323
|
};
|
|
2324
2324
|
export declare const makePhonePersistenceServices: <S extends AnySQLiteTable<{
|
|
2325
2325
|
dialect: "sqlite";
|
|
@@ -2329,7 +2329,7 @@ export declare const makePhonePersistenceServices: <S extends AnySQLiteTable<{
|
|
|
2329
2329
|
dialect: "sqlite";
|
|
2330
2330
|
}>, C extends AnySQLiteTable<{
|
|
2331
2331
|
dialect: "sqlite";
|
|
2332
|
-
}>, 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: {
|
|
2332
|
+
}>, 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, import("effect/Crypto").Crypto | Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinatePhonePersistence: {
|
|
2333
2333
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2334
2334
|
dialect: "sqlite";
|
|
2335
2335
|
}>, I extends AnySQLiteTable<{
|
|
@@ -2341,7 +2341,7 @@ export declare const makePhonePersistenceServices: <S extends AnySQLiteTable<{
|
|
|
2341
2341
|
}>, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
2342
2342
|
readonly mapping: PhoneMappingSource<PhoneMapping<S, I, C, F, N>, RSetup>;
|
|
2343
2343
|
readonly transaction?: never;
|
|
2344
|
-
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | PhoneCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/PhoneOtp").PhoneAdmission | import("@yielded/auth/PhoneOtp").PhonePersistence | import("@yielded/auth/PhoneOtp").PhoneSignInTargets>>;
|
|
2344
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | PhoneCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, import("@yielded/auth/PhoneOtp").PhoneAdmission | import("@yielded/auth/PhoneOtp").PhonePersistence | import("@yielded/auth/PhoneOtp").PhoneSignInTargets>>;
|
|
2345
2345
|
<Database extends EffectSQLiteNodeDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2346
2346
|
dialect: "sqlite";
|
|
2347
2347
|
}>, I extends AnySQLiteTable<{
|
|
@@ -2355,7 +2355,7 @@ export declare const makePhonePersistenceServices: <S extends AnySQLiteTable<{
|
|
|
2355
2355
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
2356
2356
|
readonly transaction: (...args: any[]) => any;
|
|
2357
2357
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2358
|
-
}, 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>>;
|
|
2358
|
+
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | PhoneCoordinatorError<E>, DatabaseRequirements | RSetup | import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/PhoneOtp").PhoneAdmission | import("@yielded/auth/PhoneOtp").PhonePersistence | import("@yielded/auth/PhoneOtp").PhoneSignInTargets>>;
|
|
2359
2359
|
};
|
|
2360
2360
|
export declare const AuthPersistence: {
|
|
2361
2361
|
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-node/SqliteClient").SqliteClient, C, Id, A>;
|