@yielded/auth-persistence 0.1.0-beta.8 → 0.1.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/DrizzleD1.d.mts +7 -7
- package/dist/DrizzleLibsql.d.mts +31 -31
- package/dist/DrizzleLibsql.mjs +7 -22
- package/dist/DrizzleLibsql.mjs.map +1 -1
- package/dist/DrizzleMysql2.d.mts +8 -8
- package/dist/DrizzlePglite.d.mts +15 -15
- package/dist/DrizzlePostgres.d.mts +13 -13
- package/dist/DrizzleSqliteBun.d.mts +24 -24
- package/dist/DrizzleSqliteDo.d.mts +29 -29
- package/dist/DrizzleSqliteNode.d.mts +22 -22
- package/dist/DrizzleSqliteWasm.d.mts +24 -24
- package/dist/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/drizzle/D1BatchStatements.d.mts +1 -2
- package/dist/drizzle/SuppliedService.d.mts +1 -2
- package/dist/drizzle/d1-emails.d.mts +5 -6
- package/dist/drizzle/d1-identity.d.mts +2 -3
- package/dist/drizzle/d1-oauth.d.mts +10 -11
- package/dist/drizzle/d1-passkey.d.mts +5 -6
- package/dist/drizzle/d1-password-prepared.d.mts +2 -3
- package/dist/drizzle/d1-passwords.d.mts +4 -5
- package/dist/drizzle/d1-phone.d.mts +2 -3
- package/dist/drizzle/d1-planning.d.mts +1 -2
- package/dist/drizzle/d1-proofs.d.mts +2 -3
- package/dist/drizzle/d1-sessions.d.mts +10 -11
- package/dist/drizzle/d1-totp.d.mts +2 -3
- package/dist/drizzle/email-model.d.mts +30 -31
- package/dist/drizzle/email-registration.d.mts +1 -2
- package/dist/drizzle/email-target.d.mts +3 -4
- package/dist/drizzle/model.d.mts +41 -41
- package/dist/drizzle/model.mjs +3 -5
- package/dist/drizzle/model.mjs.map +1 -1
- package/dist/drizzle/mysql-emails.d.mts +7 -8
- package/dist/drizzle/mysql-identity.d.mts +2 -3
- package/dist/drizzle/mysql-password-prepared.d.mts +3 -4
- package/dist/drizzle/mysql-passwords.d.mts +6 -7
- package/dist/drizzle/mysql-proofs.d.mts +3 -4
- package/dist/drizzle/mysql-sessions.d.mts +15 -16
- package/dist/drizzle/mysql.d.mts +8 -9
- package/dist/drizzle/oauth-connected-model.d.mts +21 -22
- package/dist/drizzle/oauth-connected-reference.d.mts +1 -2
- package/dist/drizzle/oauth-connected-state.d.mts +1950 -7
- package/dist/drizzle/oauth-connected-target.d.mts +7 -8
- package/dist/drizzle/oauth-flow.d.mts +22 -2
- package/dist/drizzle/oauth-model.d.mts +45 -46
- package/dist/drizzle/oauth-owner.d.mts +10 -2
- package/dist/drizzle/oauth-target.d.mts +9 -10
- package/dist/drizzle/passkey-model.d.mts +34 -35
- package/dist/drizzle/passkey-registration-ceremony-model.d.mts +5 -6
- package/dist/drizzle/passkey-write-model.d.mts +13 -14
- package/dist/drizzle/password-model.d.mts +29 -30
- package/dist/drizzle/password-prepared-model.d.mts +10 -11
- package/dist/drizzle/password-prepared-target.d.mts +1 -2
- package/dist/drizzle/password-registration.d.mts +1 -2
- package/dist/drizzle/password-target.d.mts +2 -3
- package/dist/drizzle/pg-emails.d.mts +7 -8
- package/dist/drizzle/pg-password-prepared.d.mts +3 -4
- package/dist/drizzle/pg-passwords.d.mts +6 -7
- package/dist/drizzle/pg-proofs.d.mts +3 -4
- package/dist/drizzle/pg-sessions.d.mts +15 -16
- package/dist/drizzle/pg.d.mts +10 -11
- package/dist/drizzle/phone-model.d.mts +9 -10
- package/dist/drizzle/phone-target.d.mts +1 -2
- package/dist/drizzle/proof-model.d.mts +25 -26
- package/dist/drizzle/proof-target.d.mts +1 -2
- package/dist/drizzle/session-model.d.mts +25 -26
- package/dist/drizzle/session-target.d.mts +4 -5
- package/dist/drizzle/sqlite.d.mts +8 -9
- package/dist/drizzle/standalone-guard.mjs +3 -5
- package/dist/drizzle/standalone-guard.mjs.map +1 -1
- package/dist/drizzle/step-up-model.d.mts +6 -7
- package/dist/drizzle/totp-model.d.mts +7 -8
- package/dist/drizzle/totp-state.d.mts +2 -3
- package/dist/drizzle/totp-target.d.mts +1 -2
- package/dist/drizzle/transaction-mysql.mjs +1 -0
- package/dist/drizzle/transaction-mysql.mjs.map +1 -1
- package/dist/drizzle/transaction-owner.d.mts +3 -2
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +2 -1
- package/dist/internal/configuration.d.mts +19 -19
- package/dist/internal/mapping-error.d.mts +2 -3
- package/dist/internal/oauth-app.d.mts +1 -2
- package/dist/internal/oauth-app.mjs +3 -4
- package/dist/internal/oauth-app.mjs.map +1 -1
- package/dist/internal/oauth-server.d.mts +10 -0
- package/dist/internal/oauth-server.mjs +66 -0
- package/dist/internal/oauth-server.mjs.map +1 -0
- package/dist/internal/passkey/target.d.mts +2 -3
- package/dist/internal/passkeys.mjs +2 -1
- package/dist/internal/passkeys.mjs.map +1 -1
- package/dist/internal/persistence.mjs +3 -2
- package/dist/internal/persistence.mjs.map +1 -1
- package/dist/internal/sql-persistence.d.mts +1 -2
- package/dist/internal/sql-table.d.mts +6 -7
- package/dist/internal/sql-table.mjs +12 -2
- package/dist/internal/sql-table.mjs.map +1 -1
- package/dist/internal/standalone.mjs +13 -0
- package/dist/internal/standalone.mjs.map +1 -0
- package/dist/internal/storage-tables.d.mts +5 -6
- package/dist/internal/transaction-execution-kernel.d.mts +2 -3
- package/dist/internal/transaction-execution-kernel.mjs +3 -5
- package/dist/internal/transaction-execution-kernel.mjs.map +1 -1
- package/dist/internal/transaction-kernel.d.mts +49 -2
- package/package.json +1 -1
- package/src/DrizzleLibsql.ts +10 -54
- package/src/drizzle/model.ts +8 -10
- package/src/drizzle/standalone-guard.ts +4 -9
- package/src/drizzle/transaction-mysql.ts +2 -0
- package/src/index.ts +1 -0
- package/src/internal/oauth-app.ts +4 -5
- package/src/internal/oauth-server.ts +89 -0
- package/src/internal/passkeys.ts +2 -6
- package/src/internal/persistence.ts +3 -5
- package/src/internal/sql-table.ts +17 -2
- package/src/internal/standalone.ts +30 -0
- package/src/internal/transaction-execution-kernel.ts +3 -7
|
@@ -31,7 +31,7 @@ import { AnyRelations } from "drizzle-orm";
|
|
|
31
31
|
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
|
32
32
|
import { EffectSQLiteWasmDatabase } from "drizzle-orm/effect-sqlite-wasm";
|
|
33
33
|
//#region src/DrizzleSqliteWasm.d.ts
|
|
34
|
-
declare const coordinateEmailAddress: {
|
|
34
|
+
export declare const coordinateEmailAddress: {
|
|
35
35
|
<Database extends EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
36
36
|
readonly mapping: EmailAddressMapping<S, I, C, AC, M, NativeId>;
|
|
37
37
|
readonly proofMapping: ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any>;
|
|
@@ -84,7 +84,7 @@ declare const coordinateEmailAddress: {
|
|
|
84
84
|
}) => Effect.Effect<import("effect/Option").Option<import("@yielded/auth/Email").EmailCredentialSnapshot>, import("@yielded/auth/Email").EmailUnavailable>;
|
|
85
85
|
};
|
|
86
86
|
}, never, never>;
|
|
87
|
-
declare const coordinatePasswordPersistence: {
|
|
87
|
+
export declare const coordinatePasswordPersistence: {
|
|
88
88
|
<Database extends EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, PM extends ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any> | undefined, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
89
89
|
readonly mapping: PasswordPersistenceMapping<S, I, C, AC, A, RS, CE, M, NativeId>;
|
|
90
90
|
readonly proofMapping?: PM | undefined;
|
|
@@ -151,7 +151,7 @@ declare const coordinatePasswordPersistence: {
|
|
|
151
151
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makePasswordRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(database: EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, mapping: PasswordRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>) => Effect.Effect<{
|
|
152
152
|
registrationAuthority: PasswordRegistrationAuthority<Registration>;
|
|
153
153
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
154
|
-
declare const coordinateProofPersistence: {
|
|
154
|
+
export declare const coordinateProofPersistence: {
|
|
155
155
|
<Database extends EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, Aev extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
156
156
|
readonly mapping: ProofPersistenceMapping<Rq, S, G, Cn, Rs, Aev, F, C, Sub, I, Cr, NativeId>;
|
|
157
157
|
readonly transaction?: never;
|
|
@@ -211,7 +211,7 @@ declare const coordinateProofPersistence: {
|
|
|
211
211
|
}, prepare: import("@yielded/auth/Proofs").PrepareProofCommit<import("@yielded/auth/Proofs").ProofCleanupResult, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, import("@yielded/auth/Proofs").ProofUnavailable>;
|
|
212
212
|
};
|
|
213
213
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
214
|
-
declare const coordinateAuthenticationAuthority: {
|
|
214
|
+
export declare const coordinateAuthenticationAuthority: {
|
|
215
215
|
<Database extends EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
216
216
|
readonly mapping: AuthenticationAuthorityMapping<Claims, S, C, F, P, NativeId>;
|
|
217
217
|
readonly transaction?: never;
|
|
@@ -433,8 +433,8 @@ declare const coordinateAuthenticationAuthority: {
|
|
|
433
433
|
}, import("@yielded/auth/Sessions").SessionUnavailable, never>;
|
|
434
434
|
};
|
|
435
435
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
436
|
-
declare const commitMode: "interactive";
|
|
437
|
-
declare const makeAuthStoreServices: <C extends AnySQLiteTable, R extends AnySQLiteTable>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: AuthStoreTables<C, R>) => {
|
|
436
|
+
export declare const commitMode: "interactive";
|
|
437
|
+
export declare const makeAuthStoreServices: <C extends AnySQLiteTable, R extends AnySQLiteTable>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: AuthStoreTables<C, R>) => {
|
|
438
438
|
readonly authStore: {
|
|
439
439
|
readonly issueChallenge: (input: import("@yielded/auth/Schema").NewChallenge) => Effect.Effect<void, import("@yielded/auth/AuthStore").IssueChallengeError>;
|
|
440
440
|
readonly consumeChallenge: (input: import("@yielded/auth/Schema").ConsumeChallenge) => Effect.Effect<import("@yielded/auth/Schema").VerifiedEmail, import("@yielded/auth/AuthStore").EmailOtpRejected | import("@yielded/auth/Errors").AuthStoreError>;
|
|
@@ -447,7 +447,7 @@ declare const makeAuthStoreServices: <C extends AnySQLiteTable, R extends AnySQL
|
|
|
447
447
|
readonly consumeRegistration: (input: import("@yielded/auth/Schema").ConsumeRegistration) => Effect.Effect<import("@yielded/auth/AuthStore").ConsumeDecision<void>, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
448
448
|
};
|
|
449
449
|
};
|
|
450
|
-
declare const makeOAuthStateServices: <S extends AnySQLiteTable>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: OAuthStateTables<S>) => {
|
|
450
|
+
export declare const makeOAuthStateServices: <S extends AnySQLiteTable>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: OAuthStateTables<S>) => {
|
|
451
451
|
readonly oauthStateStore: {
|
|
452
452
|
readonly issue: (state: import("@yielded/auth/OAuth").OAuthState) => Effect.Effect<void, import("@yielded/auth/Errors").AuthStoreError>;
|
|
453
453
|
readonly consume: (stateDigest: import("@yielded/auth/Schema").TokenDigest) => Effect.Effect<import("@yielded/auth/OAuth").OAuthState, import("@yielded/auth/OAuth").InvalidOAuthState | import("@yielded/auth/Errors").AuthStoreError>;
|
|
@@ -456,7 +456,7 @@ declare const makeOAuthStateServices: <S extends AnySQLiteTable>(database: Effec
|
|
|
456
456
|
readonly consumeOAuthState: (digest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">) => Effect.Effect<import("@yielded/auth/AuthStore").ConsumeDecision<import("@yielded/auth/OAuth").OAuthState>, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
457
457
|
};
|
|
458
458
|
};
|
|
459
|
-
declare const makeAuthServices: <C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: AuthTables<C, R, S>) => {
|
|
459
|
+
export declare const makeAuthServices: <C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: AuthTables<C, R, S>) => {
|
|
460
460
|
readonly authStore: {
|
|
461
461
|
readonly issueChallenge: (input: import("@yielded/auth/Schema").NewChallenge) => Effect.Effect<void, import("@yielded/auth/AuthStore").IssueChallengeError>;
|
|
462
462
|
readonly consumeChallenge: (input: import("@yielded/auth/Schema").ConsumeChallenge) => Effect.Effect<import("@yielded/auth/Schema").VerifiedEmail, import("@yielded/auth/AuthStore").EmailOtpRejected | import("@yielded/auth/Errors").AuthStoreError>;
|
|
@@ -474,7 +474,7 @@ declare const makeAuthServices: <C extends AnySQLiteTable, R extends AnySQLiteTa
|
|
|
474
474
|
readonly consumeOAuthState: (digest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">) => Effect.Effect<import("@yielded/auth/AuthStore").ConsumeDecision<import("@yielded/auth/OAuth").OAuthState>, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
475
475
|
};
|
|
476
476
|
};
|
|
477
|
-
declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => {
|
|
477
|
+
export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => {
|
|
478
478
|
subjectProvisioner: {
|
|
479
479
|
readonly provision: (input: import("@yielded/auth/Identity").SubjectProvisioningInput) => Effect.Effect<import("@yielded/auth/Identity").ProvisioningResult, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
480
480
|
};
|
|
@@ -482,17 +482,17 @@ declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier
|
|
|
482
482
|
readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => Effect.Effect<void, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
483
483
|
};
|
|
484
484
|
};
|
|
485
|
-
declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => {
|
|
485
|
+
export declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => {
|
|
486
486
|
readonly subjectProvisioner: {
|
|
487
487
|
readonly provision: (input: import("@yielded/auth/Identity").SubjectProvisioningInput) => Effect.Effect<import("@yielded/auth/Identity").ProvisioningResult, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
488
488
|
};
|
|
489
489
|
};
|
|
490
|
-
declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: ExternalIdentityTables<Subject, External, NativeId>) => {
|
|
490
|
+
export declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(database: EffectSQLiteWasmDatabase<AnyRelations>, mapping: ExternalIdentityTables<Subject, External, NativeId>) => {
|
|
491
491
|
readonly externalIdentityMutation: {
|
|
492
492
|
readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => Effect.Effect<void, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
493
493
|
};
|
|
494
494
|
};
|
|
495
|
-
declare const makePasswordPreparedPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable = AnySQLiteTable, PC extends AnySQLiteTable = AnySQLiteTable, PM extends AnySQLiteTable = AnySQLiteTable, PSub extends AnySQLiteTable = AnySQLiteTable, PI extends AnySQLiteTable = AnySQLiteTable, PCr extends AnySQLiteTable = AnySQLiteTable, PNativeId = unknown>(database: EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>, proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined) => Effect.Effect<{
|
|
495
|
+
export declare const makePasswordPreparedPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable = AnySQLiteTable, PC extends AnySQLiteTable = AnySQLiteTable, PM extends AnySQLiteTable = AnySQLiteTable, PSub extends AnySQLiteTable = AnySQLiteTable, PI extends AnySQLiteTable = AnySQLiteTable, PCr extends AnySQLiteTable = AnySQLiteTable, PNativeId = unknown>(database: EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>, proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined) => Effect.Effect<{
|
|
496
496
|
passwordPreparedPersistence: import("@yielded/auth/Password").PasswordPreparedPersistence;
|
|
497
497
|
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, coordinatePasswordPreparedPersistence: {
|
|
498
498
|
<Database extends EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable, PC extends AnySQLiteTable, PM extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
@@ -508,7 +508,7 @@ declare const makePasswordPreparedPersistenceServices: <S extends AnySQLiteTable
|
|
|
508
508
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
509
509
|
}, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/unstable/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TargetId | TxId>>;
|
|
510
510
|
};
|
|
511
|
-
declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
511
|
+
export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
512
512
|
dialect: "sqlite";
|
|
513
513
|
}>, O extends AnySQLiteTable<{
|
|
514
514
|
dialect: "sqlite";
|
|
@@ -638,12 +638,12 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
638
638
|
readonly nowMillis: number;
|
|
639
639
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
640
640
|
readonly _tag: "Rejected";
|
|
641
|
+
} | {
|
|
642
|
+
readonly _tag: "Ambiguous";
|
|
641
643
|
} | {
|
|
642
644
|
readonly _tag: "Conflict";
|
|
643
645
|
} | {
|
|
644
646
|
readonly _tag: "Cancelled";
|
|
645
|
-
} | {
|
|
646
|
-
readonly _tag: "Ambiguous";
|
|
647
647
|
} | {
|
|
648
648
|
readonly _tag: "Linked";
|
|
649
649
|
readonly credential: {
|
|
@@ -1009,6 +1009,8 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1009
1009
|
readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
|
|
1010
1010
|
readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedActionAuthorization;
|
|
1011
1011
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1012
|
+
readonly _tag: "Rejected";
|
|
1013
|
+
} | {
|
|
1012
1014
|
readonly _tag: "Issued";
|
|
1013
1015
|
readonly flow: {
|
|
1014
1016
|
readonly context: {
|
|
@@ -1100,8 +1102,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1100
1102
|
};
|
|
1101
1103
|
readonly retentionUntilMillis: number;
|
|
1102
1104
|
};
|
|
1103
|
-
} | {
|
|
1104
|
-
readonly _tag: "Rejected";
|
|
1105
1105
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1106
1106
|
readonly preflight: (input: import("@yielded/auth/OAuth").OAuthConnectedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1107
1107
|
readonly claim: <A>(input: {
|
|
@@ -1235,12 +1235,12 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1235
1235
|
readonly nowMillis: number;
|
|
1236
1236
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1237
1237
|
readonly _tag: "Rejected";
|
|
1238
|
+
} | {
|
|
1239
|
+
readonly _tag: "Ambiguous";
|
|
1238
1240
|
} | {
|
|
1239
1241
|
readonly _tag: "Conflict";
|
|
1240
1242
|
} | {
|
|
1241
1243
|
readonly _tag: "Cancelled";
|
|
1242
|
-
} | {
|
|
1243
|
-
readonly _tag: "Ambiguous";
|
|
1244
1244
|
} | {
|
|
1245
1245
|
readonly _tag: "Connected";
|
|
1246
1246
|
readonly grant: {
|
|
@@ -1925,7 +1925,7 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1925
1925
|
} ? Parameters<Parameters<D["transaction"]>[0]>[0] : never>, TxShape>;
|
|
1926
1926
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/OAuth").OAuthConnectedRevocations>>;
|
|
1927
1927
|
};
|
|
1928
|
-
declare const makePasskeyCredentialServices: <Database extends EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1928
|
+
export declare const makePasskeyCredentialServices: <Database extends EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1929
1929
|
dialect: "sqlite";
|
|
1930
1930
|
}>, C extends AnySQLiteTable<{
|
|
1931
1931
|
dialect: "sqlite";
|
|
@@ -2204,7 +2204,7 @@ declare const makePasskeyCredentialServices: <Database extends EffectSQLiteWasmD
|
|
|
2204
2204
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2205
2205
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, AuthorityId | TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>;
|
|
2206
2206
|
};
|
|
2207
|
-
declare const makeTotpPersistenceServices: <Database extends EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2207
|
+
export declare const makeTotpPersistenceServices: <Database extends EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2208
2208
|
dialect: "sqlite";
|
|
2209
2209
|
}>, F extends AnySQLiteTable<{
|
|
2210
2210
|
dialect: "sqlite";
|
|
@@ -2234,7 +2234,7 @@ declare const makeTotpPersistenceServices: <Database extends EffectSQLiteWasmDat
|
|
|
2234
2234
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2235
2235
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | TotpCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/Totp").TotpPersistence>>;
|
|
2236
2236
|
};
|
|
2237
|
-
declare const makePhonePersistenceServices: <Database extends EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2237
|
+
export declare const makePhonePersistenceServices: <Database extends EffectSQLiteWasmDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2238
2238
|
dialect: "sqlite";
|
|
2239
2239
|
}>, I extends AnySQLiteTable<{
|
|
2240
2240
|
dialect: "sqlite";
|
|
@@ -2270,7 +2270,7 @@ declare const makePhonePersistenceServices: <Database extends EffectSQLiteWasmDa
|
|
|
2270
2270
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2271
2271
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | PhoneCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, TxId | import("@yielded/auth/PhoneOtp").PhoneAdmission | import("@yielded/auth/PhoneOtp").PhonePersistence | import("@yielded/auth/PhoneOtp").PhoneSignInTargets>>;
|
|
2272
2272
|
};
|
|
2273
|
-
declare const AuthPersistence: {
|
|
2273
|
+
export declare const AuthPersistence: {
|
|
2274
2274
|
make: <C extends ClaimsCodec, const Id extends string, const A extends Definition<C, Id>>(auth: A & Definition<C, Id>) => BoundPersistence<import("drizzle-orm/sqlite-core").SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig>, import("@effect/sql-sqlite-wasm/SqliteClient").SqliteClient, C, Id, A>;
|
|
2275
2275
|
migrationsLayer: (options: {
|
|
2276
2276
|
readonly migrations: Record<string, string>;
|
|
@@ -2278,5 +2278,5 @@ declare const AuthPersistence: {
|
|
|
2278
2278
|
}) => import("effect/Layer").Layer<never, import("drizzle-orm/effect-core").EffectDrizzleQueryError | import("drizzle-orm/effect-core").MigratorInitError | PersistenceConfigurationError | import("effect/unstable/sql/SqlError").SqlError, import("@effect/sql-sqlite-wasm/SqliteClient").SqliteClient>;
|
|
2279
2279
|
};
|
|
2280
2280
|
//#endregion
|
|
2281
|
-
export {
|
|
2281
|
+
export { coordinateSqliteAuthStoreTransaction as coordinateAuthStoreTransaction, coordinateSqliteAuthTransaction as coordinateAuthTransaction, coordinateSqliteOAuthStateTransaction as coordinateOAuthStateTransaction, passwordPreparedPersistenceLayer };
|
|
2282
2282
|
//# sourceMappingURL=DrizzleSqliteWasm.d.mts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll };
|
|
@@ -5,7 +5,6 @@ declare const D1BatchStatements_base: Context.ServiceClass<D1BatchStatements, "e
|
|
|
5
5
|
readonly append: (statement: Statement<unknown>) => Effect.Effect<void>;
|
|
6
6
|
}>;
|
|
7
7
|
/** Appends application statements to the current coordinator's single atomic batch. */
|
|
8
|
-
declare class D1BatchStatements extends D1BatchStatements_base {}
|
|
8
|
+
export declare class D1BatchStatements extends D1BatchStatements_base {}
|
|
9
9
|
//#endregion
|
|
10
|
-
export { D1BatchStatements };
|
|
11
10
|
//# sourceMappingURL=D1BatchStatements.d.mts.map
|
|
@@ -2,9 +2,8 @@ import { Context } from "effect";
|
|
|
2
2
|
//#region src/drizzle/SuppliedService.d.ts
|
|
3
3
|
/** The strict function property also checks class-style keys: the adapter's
|
|
4
4
|
* constructed value must satisfy the selected service, including native relations. */
|
|
5
|
-
type SuppliedService<Id, Constructed, Selected = Constructed> = Context.Service<Id, Selected> & {
|
|
5
|
+
export type SuppliedService<Id, Constructed, Selected = Constructed> = Context.Service<Id, Selected> & {
|
|
6
6
|
readonly of: (value: Constructed) => Selected;
|
|
7
7
|
};
|
|
8
8
|
//#endregion
|
|
9
|
-
export { SuppliedService };
|
|
10
9
|
//# sourceMappingURL=SuppliedService.d.mts.map
|
|
@@ -16,7 +16,7 @@ import { EffectSQLiteD1Database } from "drizzle-orm/effect-d1";
|
|
|
16
16
|
type Database = EffectSQLiteD1Database<AnyRelations> & {
|
|
17
17
|
readonly $client: D1Client;
|
|
18
18
|
};
|
|
19
|
-
declare const makeD1EmailSignInServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, NativeId>(database: Database, mapping: EmailSignInMapping<S, I, C, NativeId>) => Effect.Effect<{
|
|
19
|
+
export declare const makeD1EmailSignInServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, NativeId>(database: Database, mapping: EmailSignInMapping<S, I, C, NativeId>) => Effect.Effect<{
|
|
20
20
|
emailSignInTargets: {
|
|
21
21
|
readonly lookup: (input: {
|
|
22
22
|
readonly moduleId: string;
|
|
@@ -24,7 +24,7 @@ declare const makeD1EmailSignInServices: <S extends AnySQLiteTable, I extends An
|
|
|
24
24
|
}) => Effect.Effect<Option.Option<import("@yielded/auth/Email").EmailCredentialSnapshot>, EmailUnavailable>;
|
|
25
25
|
};
|
|
26
26
|
}, never, never>;
|
|
27
|
-
declare const makeD1EmailAddressServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, PRq extends AnySQLiteTable, PS extends AnySQLiteTable, PG extends AnySQLiteTable, PCn extends AnySQLiteTable, PRs extends AnySQLiteTable, PAev extends AnySQLiteTable, PF extends AnySQLiteTable, PC extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId>(database: Database, mapping: D1EmailAddressMapping<S, I, C, AC, M, NativeId>, proofMapping: D1ProofPersistenceMapping<PRq, PS, PG, PCn, PRs, PAev, PF, PC, PSub, PI, PCr, PNativeId>) => Effect.Effect<{
|
|
27
|
+
export declare const makeD1EmailAddressServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, PRq extends AnySQLiteTable, PS extends AnySQLiteTable, PG extends AnySQLiteTable, PCn extends AnySQLiteTable, PRs extends AnySQLiteTable, PAev extends AnySQLiteTable, PF extends AnySQLiteTable, PC extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId>(database: Database, mapping: D1EmailAddressMapping<S, I, C, AC, M, NativeId>, proofMapping: D1ProofPersistenceMapping<PRq, PS, PG, PCn, PRs, PAev, PF, PC, PSub, PI, PCr, PNativeId>) => Effect.Effect<{
|
|
28
28
|
emailAddressPersistence: {
|
|
29
29
|
readonly target: (input: {
|
|
30
30
|
readonly moduleId: string;
|
|
@@ -44,19 +44,18 @@ declare const makeD1EmailAddressServices: <S extends AnySQLiteTable, I extends A
|
|
|
44
44
|
}, A>) => Effect.Effect<PreparedCommit<A>, EmailUnavailable>;
|
|
45
45
|
};
|
|
46
46
|
}, never, LifecycleHooks>;
|
|
47
|
-
declare const makeD1EmailRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId, PRq extends AnySQLiteTable, PS extends AnySQLiteTable, PG extends AnySQLiteTable, PCn extends AnySQLiteTable, PRs extends AnySQLiteTable, PAev extends AnySQLiteTable, PF extends AnySQLiteTable, PC extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId>(database: Database, mapping: D1EmailRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>, proofMapping: D1ProofPersistenceMapping<PRq, PS, PG, PCn, PRs, PAev, PF, PC, PSub, PI, PCr, PNativeId>) => Effect.Effect<{
|
|
47
|
+
export declare const makeD1EmailRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId, PRq extends AnySQLiteTable, PS extends AnySQLiteTable, PG extends AnySQLiteTable, PCn extends AnySQLiteTable, PRs extends AnySQLiteTable, PAev extends AnySQLiteTable, PF extends AnySQLiteTable, PC extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId>(database: Database, mapping: D1EmailRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>, proofMapping: D1ProofPersistenceMapping<PRq, PS, PG, PCn, PRs, PAev, PF, PC, PSub, PI, PCr, PNativeId>) => Effect.Effect<{
|
|
48
48
|
registrationAuthority: EmailRegistrationAuthority<Registration>;
|
|
49
49
|
}, never, LifecycleHooks>;
|
|
50
50
|
type CoordinatorError<E> = E | EmailUnavailable | HookConfigurationError;
|
|
51
|
-
declare function coordinateD1EmailAddress<S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, PRq extends AnySQLiteTable, PS extends AnySQLiteTable, PG extends AnySQLiteTable, PCn extends AnySQLiteTable, PRs extends AnySQLiteTable, PAev extends AnySQLiteTable, PF extends AnySQLiteTable, PC extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
51
|
+
export declare function coordinateD1EmailAddress<S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, PRq extends AnySQLiteTable, PS extends AnySQLiteTable, PG extends AnySQLiteTable, PCn extends AnySQLiteTable, PRs extends AnySQLiteTable, PAev extends AnySQLiteTable, PF extends AnySQLiteTable, PC extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
52
52
|
readonly mapping: D1EmailAddressMapping<S, I, C, AC, M, NativeId>;
|
|
53
53
|
readonly proofMapping: D1ProofPersistenceMapping<PRq, PS, PG, PCn, PRs, PAev, PF, PC, PSub, PI, PCr, PNativeId>;
|
|
54
54
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, CoordinatorError<E> | DatabaseError, Exclude<R, EmailAddressPersistence | D1BatchStatements> | LifecycleHooks | DatabaseRequirements>;
|
|
55
|
-
declare function coordinateD1EmailRegistration<TargetId, Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId, PRq extends AnySQLiteTable, PS extends AnySQLiteTable, PG extends AnySQLiteTable, PCn extends AnySQLiteTable, PRs extends AnySQLiteTable, PAev extends AnySQLiteTable, PF extends AnySQLiteTable, PC extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
55
|
+
export declare function coordinateD1EmailRegistration<TargetId, Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId, PRq extends AnySQLiteTable, PS extends AnySQLiteTable, PG extends AnySQLiteTable, PCn extends AnySQLiteTable, PRs extends AnySQLiteTable, PAev extends AnySQLiteTable, PF extends AnySQLiteTable, PC extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
56
56
|
readonly mapping: D1EmailRegistrationMapping<NoInfer<Registration>, S, I, C, AC, Rq, NativeId>;
|
|
57
57
|
readonly proofMapping: D1ProofPersistenceMapping<PRq, PS, PG, PCn, PRs, PAev, PF, PC, PSub, PI, PCr, PNativeId>;
|
|
58
58
|
readonly target: SuppliedService<TargetId, EmailRegistrationAuthority<Registration>>;
|
|
59
59
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, CoordinatorError<E> | DatabaseError, Exclude<R, TargetId | D1BatchStatements> | LifecycleHooks | DatabaseRequirements>;
|
|
60
60
|
//#endregion
|
|
61
|
-
export { coordinateD1EmailAddress, coordinateD1EmailRegistration, makeD1EmailAddressServices, makeD1EmailRegistrationServices, makeD1EmailSignInServices };
|
|
62
61
|
//# sourceMappingURL=d1-emails.d.mts.map
|
|
@@ -12,14 +12,14 @@ import { EffectSQLiteD1Database } from "drizzle-orm/effect-d1";
|
|
|
12
12
|
* database-generated subject id from the first insert via last_insert_rowid;
|
|
13
13
|
* the optional identifier then reads that stable id from the receipt.
|
|
14
14
|
*/
|
|
15
|
-
declare const makeD1SubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteD1Database<AnyRelations> & {
|
|
15
|
+
export declare const makeD1SubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteD1Database<AnyRelations> & {
|
|
16
16
|
readonly $client: D1Client;
|
|
17
17
|
}, mapping: D1SubjectProvisioningMapping<Subject, Identifier, Request, NativeId>) => {
|
|
18
18
|
readonly subjectProvisioner: {
|
|
19
19
|
readonly provision: (input: SubjectProvisioningInput) => Effect.Effect<import("@yielded/auth/Identity").ProvisioningResult, IdentityConflict | IdentityUnavailable>;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
declare const makeD1ExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(database: EffectSQLiteD1Database<AnyRelations> & {
|
|
22
|
+
export declare const makeD1ExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(database: EffectSQLiteD1Database<AnyRelations> & {
|
|
23
23
|
readonly $client: D1Client;
|
|
24
24
|
}, mapping: D1ExternalIdentityMapping<Subject, External, NativeId>) => {
|
|
25
25
|
readonly externalIdentityMutation: {
|
|
@@ -27,5 +27,4 @@ declare const makeD1ExternalIdentityServices: <Subject extends AnySQLiteTable, E
|
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
//#endregion
|
|
30
|
-
export { makeD1ExternalIdentityServices, makeD1SubjectProvisioningServices };
|
|
31
30
|
//# sourceMappingURL=d1-identity.d.mts.map
|
|
@@ -16,7 +16,7 @@ type SQLiteTable = AnySQLiteTable<{
|
|
|
16
16
|
type Database = EffectSQLiteD1Database<AnyRelations> & {
|
|
17
17
|
readonly $client: D1Client;
|
|
18
18
|
};
|
|
19
|
-
declare const makeD1OAuthAccountsServices: <S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, T extends SQLiteTable, U extends SQLiteTable, N>(database: Database, mapping: OAuthAccountsMapping<S, O, C, AC, F, T, U, N> & OAuthD1Mapping) => Effect.Effect<{
|
|
19
|
+
export declare const makeD1OAuthAccountsServices: <S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, T extends SQLiteTable, U extends SQLiteTable, N>(database: Database, mapping: OAuthAccountsMapping<S, O, C, AC, F, T, U, N> & OAuthD1Mapping) => Effect.Effect<{
|
|
20
20
|
oauthAccountsPersistence: {
|
|
21
21
|
readonly capture: (input: {
|
|
22
22
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
@@ -132,10 +132,10 @@ declare const makeD1OAuthAccountsServices: <S extends SQLiteTable, O extends SQL
|
|
|
132
132
|
readonly nowMillis: number;
|
|
133
133
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
134
134
|
readonly _tag: "Rejected";
|
|
135
|
-
} | {
|
|
136
|
-
readonly _tag: "Ambiguous";
|
|
137
135
|
} | {
|
|
138
136
|
readonly _tag: "Cancelled";
|
|
137
|
+
} | {
|
|
138
|
+
readonly _tag: "Ambiguous";
|
|
139
139
|
} | {
|
|
140
140
|
readonly _tag: "Linked";
|
|
141
141
|
readonly credential: {
|
|
@@ -237,7 +237,7 @@ declare const makeD1OAuthAccountsServices: <S extends SQLiteTable, O extends SQL
|
|
|
237
237
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, OAuthUnavailable>;
|
|
238
238
|
};
|
|
239
239
|
}, never, LifecycleHooks>;
|
|
240
|
-
declare const makeD1OAuthSignInServices: <S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, N>(database: Database, mapping: OAuthSignInMapping<S, O, C, AC, F, N> & OAuthD1Mapping) => Effect.Effect<{
|
|
240
|
+
export declare const makeD1OAuthSignInServices: <S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, N>(database: Database, mapping: OAuthSignInMapping<S, O, C, AC, F, N> & OAuthD1Mapping) => Effect.Effect<{
|
|
241
241
|
oauthSignInPersistence: {
|
|
242
242
|
readonly issue: <A>(input: import("@yielded/auth/OAuth").OAuthPendingFlow, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthIssueDecision, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, OAuthUnavailable>;
|
|
243
243
|
readonly claim: <A>(input: {
|
|
@@ -270,7 +270,7 @@ declare const makeD1OAuthSignInServices: <S extends SQLiteTable, O extends SQLit
|
|
|
270
270
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, OAuthUnavailable>;
|
|
271
271
|
};
|
|
272
272
|
}, never, LifecycleHooks>;
|
|
273
|
-
declare const makeD1OAuthRegistrationIntentServices: <S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, T extends SQLiteTable, I extends SQLiteTable, N>(database: Database, mapping: OAuthRegistrationIntentMapping<S, O, C, AC, F, T, I, N> & OAuthD1Mapping) => Effect.Effect<{
|
|
273
|
+
export declare const makeD1OAuthRegistrationIntentServices: <S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, T extends SQLiteTable, I extends SQLiteTable, N>(database: Database, mapping: OAuthRegistrationIntentMapping<S, O, C, AC, F, T, I, N> & OAuthD1Mapping) => Effect.Effect<{
|
|
274
274
|
oauthRegistrationIntents: {
|
|
275
275
|
readonly settle: <A>(input: {
|
|
276
276
|
readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
|
|
@@ -280,22 +280,21 @@ declare const makeD1OAuthRegistrationIntentServices: <S extends SQLiteTable, O e
|
|
|
280
280
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthRegistrationSettlement, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, OAuthUnavailable>;
|
|
281
281
|
};
|
|
282
282
|
}, never, LifecycleHooks>;
|
|
283
|
-
declare const makeD1OAuthRegistrationServices: <Registration, S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, T extends SQLiteTable, I extends SQLiteTable, R extends SQLiteTable, N>(database: Database, mapping: OAuthRegistrationMapping<Registration, S, O, C, AC, T, I, R, N> & OAuthD1Mapping) => Effect.Effect<{
|
|
283
|
+
export declare const makeD1OAuthRegistrationServices: <Registration, S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, T extends SQLiteTable, I extends SQLiteTable, R extends SQLiteTable, N>(database: Database, mapping: OAuthRegistrationMapping<Registration, S, O, C, AC, T, I, R, N> & OAuthD1Mapping) => Effect.Effect<{
|
|
284
284
|
registrationAuthority: OAuthRegistrationAuthority<Registration>;
|
|
285
285
|
}, never, LifecycleHooks>;
|
|
286
|
-
declare function coordinateD1OAuthSignIn<S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
286
|
+
export declare function coordinateD1OAuthSignIn<S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
287
287
|
readonly mapping: OAuthSignInMapping<S, O, C, AC, F, N> & OAuthD1Mapping;
|
|
288
288
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, OAuthCoordinatorError<E> | DatabaseError, Exclude<R, OAuthSignInPersistence | D1BatchStatements> | LifecycleHooks | DatabaseRequirements>;
|
|
289
|
-
declare function coordinateD1OAuthRegistrationIntents<S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, T extends SQLiteTable, I extends SQLiteTable, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
289
|
+
export declare function coordinateD1OAuthRegistrationIntents<S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, T extends SQLiteTable, I extends SQLiteTable, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
290
290
|
readonly mapping: OAuthRegistrationIntentMapping<S, O, C, AC, F, T, I, N> & OAuthD1Mapping;
|
|
291
291
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, OAuthCoordinatorError<E> | DatabaseError, Exclude<R, OAuthRegistrationIntents | D1BatchStatements> | LifecycleHooks | DatabaseRequirements>;
|
|
292
|
-
declare function coordinateD1OAuthAccounts<S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, T extends SQLiteTable, U extends SQLiteTable, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
292
|
+
export declare function coordinateD1OAuthAccounts<S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, F extends SQLiteTable, T extends SQLiteTable, U extends SQLiteTable, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
293
293
|
readonly mapping: OAuthAccountsMapping<S, O, C, AC, F, T, U, N> & OAuthD1Mapping;
|
|
294
294
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, OAuthCoordinatorError<E> | DatabaseError, Exclude<R, OAuthAccountsPersistence | D1BatchStatements> | LifecycleHooks | DatabaseRequirements>;
|
|
295
|
-
declare function coordinateD1OAuthRegistration<TargetId, Registration, S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, T extends SQLiteTable, I extends SQLiteTable, Rq extends SQLiteTable, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
295
|
+
export declare function coordinateD1OAuthRegistration<TargetId, Registration, S extends SQLiteTable, O extends SQLiteTable, C extends SQLiteTable, AC extends SQLiteTable, T extends SQLiteTable, I extends SQLiteTable, Rq extends SQLiteTable, N, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
296
296
|
readonly mapping: OAuthRegistrationMapping<NoInfer<Registration>, S, O, C, AC, T, I, Rq, N> & OAuthD1Mapping;
|
|
297
297
|
readonly target: SuppliedService<TargetId, OAuthRegistrationAuthority<Registration>>;
|
|
298
298
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, OAuthCoordinatorError<E> | DatabaseError, Exclude<R, TargetId | D1BatchStatements> | LifecycleHooks | DatabaseRequirements>;
|
|
299
299
|
//#endregion
|
|
300
|
-
export { coordinateD1OAuthAccounts, coordinateD1OAuthRegistration, coordinateD1OAuthRegistrationIntents, coordinateD1OAuthSignIn, makeD1OAuthAccountsServices, makeD1OAuthRegistrationIntentServices, makeD1OAuthRegistrationServices, makeD1OAuthSignInServices };
|
|
301
300
|
//# sourceMappingURL=d1-oauth.d.mts.map
|
|
@@ -20,7 +20,7 @@ type Table$1 = AnySQLiteTable<{
|
|
|
20
20
|
type Database = EffectSQLiteD1Database<AnyRelations> & {
|
|
21
21
|
readonly $client: D1Client;
|
|
22
22
|
};
|
|
23
|
-
declare const makePasskeyCredentialServices: <Database extends EffectSQLiteD1Database<import("drizzle-orm").TablesRelationalConfig> & {
|
|
23
|
+
export declare const makePasskeyCredentialServices: <Database extends EffectSQLiteD1Database<import("drizzle-orm").TablesRelationalConfig> & {
|
|
24
24
|
readonly $client: D1Client;
|
|
25
25
|
}, S extends Table$1, C extends Table$1, F extends Table$1, O extends Table$1, H extends Table$1, N, RSetup = never>(database: Database, mapping: PasskeyMappingSource<PasskeyCredentialMapping<S, C, F, O, H, N> & D1PasskeyMapping, RSetup>) => Effect.Effect<PasskeyCredentialServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | PersistenceMappingError, RSetup>, makePasskeyEnrollmentContextServices: <Database extends EffectSQLiteD1Database<import("drizzle-orm").TablesRelationalConfig> & {
|
|
26
26
|
readonly $client: D1Client;
|
|
@@ -33,19 +33,18 @@ declare const makePasskeyCredentialServices: <Database extends EffectSQLiteD1Dat
|
|
|
33
33
|
}, S extends Table$1, C extends Table$1, F extends Table$1, O extends Table$1, H extends Table$1, M extends Table$1, Flow extends Table$1, Admission extends Table$1, Charge extends Table$1, Command extends Table$1, N, RSetup = never>(database: Database, mapping: PasskeyMappingSource<PasskeyManagementMapping<S, C, F, O, H, M, Flow, Admission, Charge, Command, N> & D1PasskeyMapping, RSetup>) => Effect.Effect<PasskeyManagementServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | PersistenceMappingError, RSetup | LifecycleHooks>, makePasskeyRegistrationServices: <Database extends EffectSQLiteD1Database<import("drizzle-orm").TablesRelationalConfig> & {
|
|
34
34
|
readonly $client: D1Client;
|
|
35
35
|
}, S extends Table$1, C extends Table$1, F extends Table$1, O extends Table$1, H extends Table$1, M extends Table$1, Flow extends Table$1, Admission extends Table$1, Charge extends Table$1, Intent extends Table$1, N, Value, RSetup = never>(database: Database, mapping: PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value> & D1PasskeyMapping, RSetup>) => Effect.Effect<PasskeyRegistrationServices<Value>, import("@yielded/auth/Passkey").PasskeyConfigurationError | PersistenceMappingError, RSetup | LifecycleHooks>;
|
|
36
|
-
declare function coordinatePasskeyPersistence<D extends Database, S extends Table$1, C extends Table$1, F extends Table$1, O extends Table$1, H extends Table$1, M extends Table$1, Flow extends Table$1, Admission extends Table$1, Charge extends Table$1, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
36
|
+
export declare function coordinatePasskeyPersistence<D extends Database, S extends Table$1, C extends Table$1, F extends Table$1, O extends Table$1, H extends Table$1, M extends Table$1, Flow extends Table$1, Admission extends Table$1, Charge extends Table$1, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
37
37
|
readonly mapping: PasskeyMappingSource<PasskeyPersistenceMapping<PasskeyCredentialMapping<S, C, F, O, H, N>, M, Flow, Admission, Charge, N> & D1PasskeyMapping, RSetup>;
|
|
38
38
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, PasskeyCoordinatorError<E> | DatabaseError, Exclude<R, PasskeyPersistence | D1BatchStatements> | LifecycleHooks | DatabaseRequirements | RSetup>;
|
|
39
|
-
declare function coordinatePasskeyRegistrationCeremony<D extends Database, M extends Table$1, Flow extends Table$1, Admission extends Table$1, Charge extends Table$1, Intent extends Table$1, H extends Table$1, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
39
|
+
export declare function coordinatePasskeyRegistrationCeremony<D extends Database, M extends Table$1, Flow extends Table$1, Admission extends Table$1, Charge extends Table$1, Intent extends Table$1, H extends Table$1, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
40
40
|
readonly mapping: PasskeyMappingSource<PasskeyRegistrationCeremonyMapping<M, Flow, Admission, Charge, Intent, H> & D1PasskeyMapping, RSetup>;
|
|
41
41
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, PasskeyCoordinatorError<E> | DatabaseError, Exclude<R, PasskeyPersistence | D1BatchStatements> | LifecycleHooks | DatabaseRequirements | RSetup>;
|
|
42
|
-
declare function coordinatePasskeyManagement<D extends Database, S extends Table$1, C extends Table$1, F extends Table$1, O extends Table$1, H extends Table$1, M extends Table$1, Flow extends Table$1, Admission extends Table$1, Charge extends Table$1, Command extends Table$1, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
42
|
+
export declare function coordinatePasskeyManagement<D extends Database, S extends Table$1, C extends Table$1, F extends Table$1, O extends Table$1, H extends Table$1, M extends Table$1, Flow extends Table$1, Admission extends Table$1, Charge extends Table$1, Command extends Table$1, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
43
43
|
readonly mapping: PasskeyMappingSource<PasskeyManagementMapping<S, C, F, O, H, M, Flow, Admission, Charge, Command, N> & D1PasskeyMapping, RSetup>;
|
|
44
44
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, PasskeyCoordinatorError<E> | DatabaseError, Exclude<R, PasskeyPersistence | PasskeyManagementPersistence | D1BatchStatements> | LifecycleHooks | DatabaseRequirements | RSetup>;
|
|
45
|
-
declare function coordinatePasskeyRegistration<D extends Database, S extends Table$1, C extends Table$1, F extends Table$1, O extends Table$1, H extends Table$1, M extends Table$1, Flow extends Table$1, Admission extends Table$1, Charge extends Table$1, Intent extends Table$1, N, Value, AuthorityId, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
45
|
+
export declare function coordinatePasskeyRegistration<D extends Database, S extends Table$1, C extends Table$1, F extends Table$1, O extends Table$1, H extends Table$1, M extends Table$1, Flow extends Table$1, Admission extends Table$1, Charge extends Table$1, Intent extends Table$1, N, Value, AuthorityId, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
46
46
|
readonly mapping: PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value> & D1PasskeyMapping, RSetup>;
|
|
47
47
|
readonly authority: Context.Key<AuthorityId, PasskeyRegistrationWriter<Value>>;
|
|
48
48
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, PasskeyCoordinatorError<E> | DatabaseError, Exclude<R, PasskeyPersistence | AuthorityId | D1BatchStatements> | LifecycleHooks | DatabaseRequirements | RSetup>;
|
|
49
49
|
//#endregion
|
|
50
|
-
export { coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices };
|
|
51
50
|
//# sourceMappingURL=d1-passkey.d.mts.map
|
|
@@ -12,14 +12,13 @@ import { EffectSQLiteD1Database } from "drizzle-orm/effect-d1";
|
|
|
12
12
|
type Database = EffectSQLiteD1Database<AnyRelations> & {
|
|
13
13
|
readonly $client: D1Client;
|
|
14
14
|
};
|
|
15
|
-
declare const makeD1PasswordPreparedPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, At extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable = AnySQLiteTable, PC extends AnySQLiteTable = AnySQLiteTable, PM extends AnySQLiteTable = AnySQLiteTable, PSub extends AnySQLiteTable = AnySQLiteTable, PI extends AnySQLiteTable = AnySQLiteTable, PCr extends AnySQLiteTable = AnySQLiteTable, PNativeId = unknown>(database: Database, mapping: D1PasswordPreparedPersistenceMapping<S, I, C, AC, At, RS, CE, M, T, B, NativeId>, proofMapping?: D1PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId>) => Effect.Effect<{
|
|
15
|
+
export declare const makeD1PasswordPreparedPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, At extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable = AnySQLiteTable, PC extends AnySQLiteTable = AnySQLiteTable, PM extends AnySQLiteTable = AnySQLiteTable, PSub extends AnySQLiteTable = AnySQLiteTable, PI extends AnySQLiteTable = AnySQLiteTable, PCr extends AnySQLiteTable = AnySQLiteTable, PNativeId = unknown>(database: Database, mapping: D1PasswordPreparedPersistenceMapping<S, I, C, AC, At, RS, CE, M, T, B, NativeId>, proofMapping?: D1PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId>) => Effect.Effect<{
|
|
16
16
|
passwordPreparedPersistence: PasswordPreparedPersistence;
|
|
17
17
|
}, never, LifecycleHooks>;
|
|
18
|
-
declare function coordinateD1PasswordPreparedPersistence<TargetId, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, At 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, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
18
|
+
export declare function coordinateD1PasswordPreparedPersistence<TargetId, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, At 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, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
19
19
|
readonly mapping: D1PasswordPreparedPersistenceMapping<S, I, C, AC, At, RS, CE, M, T, B, NativeId>;
|
|
20
20
|
readonly proofMapping?: D1PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined;
|
|
21
21
|
readonly target: SuppliedService<TargetId, PasswordPreparedPersistence>;
|
|
22
22
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | PasswordUnavailable | HookConfigurationError | DatabaseError, Exclude<R, TargetId | D1BatchStatements> | LifecycleHooks | DatabaseRequirements>;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { coordinateD1PasswordPreparedPersistence, makeD1PasswordPreparedPersistenceServices };
|
|
25
24
|
//# sourceMappingURL=d1-password-prepared.d.mts.map
|
|
@@ -22,7 +22,7 @@ import { EffectSQLiteD1Database } from "drizzle-orm/effect-d1";
|
|
|
22
22
|
type Database = EffectSQLiteD1Database<AnyRelations> & {
|
|
23
23
|
readonly $client: D1Client;
|
|
24
24
|
};
|
|
25
|
-
declare const makeD1PasswordPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId>(database: Database, mapping: D1PasswordPersistenceMapping<S, I, C, AC, A, RS, CE, M, NativeId>, proofMapping?: D1ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any>) => Effect.Effect<{
|
|
25
|
+
export declare const makeD1PasswordPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId>(database: Database, mapping: D1PasswordPersistenceMapping<S, I, C, AC, A, RS, CE, M, NativeId>, proofMapping?: D1ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any>) => Effect.Effect<{
|
|
26
26
|
passwordPersistence: {
|
|
27
27
|
readonly admitAttempt: <A_1>(input: {
|
|
28
28
|
readonly moduleId: string;
|
|
@@ -71,17 +71,16 @@ type CoordinatorError<E> = E | PasswordUnavailable | HookConfigurationError;
|
|
|
71
71
|
* The owner Effect is invoked once and is never replayed after an ambiguous or
|
|
72
72
|
* guarded batch failure. Standalone adapter-owned commands may replan boundedly.
|
|
73
73
|
*/
|
|
74
|
-
declare function coordinateD1PasswordPersistence<S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, At extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
74
|
+
export declare function coordinateD1PasswordPersistence<S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, At extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
75
75
|
readonly mapping: D1PasswordPersistenceMapping<S, I, C, AC, At, RS, CE, M, NativeId>;
|
|
76
76
|
readonly proofMapping?: D1ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any> | undefined;
|
|
77
77
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, CoordinatorError<E> | DatabaseError, Exclude<R, PasswordPersistence | D1BatchStatements> | LifecycleHooks | DatabaseRequirements>;
|
|
78
|
-
declare const makeD1PasswordRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(database: Database, mapping: PasswordRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>) => Effect.Effect<{
|
|
78
|
+
export declare const makeD1PasswordRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(database: Database, mapping: PasswordRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>) => Effect.Effect<{
|
|
79
79
|
registrationAuthority: PasswordRegistrationAuthority<Registration>;
|
|
80
80
|
}, never, LifecycleHooks>;
|
|
81
|
-
declare function coordinateD1PasswordRegistration<TargetId, Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
81
|
+
export declare function coordinateD1PasswordRegistration<TargetId, Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
82
82
|
readonly mapping: PasswordRegistrationMapping<NoInfer<Registration>, S, I, C, AC, Rq, NativeId>;
|
|
83
83
|
readonly target: SuppliedService<TargetId, PasswordRegistrationAuthority<Registration>>;
|
|
84
84
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, CoordinatorError<E> | DatabaseError, Exclude<R, TargetId | D1BatchStatements> | LifecycleHooks | DatabaseRequirements>;
|
|
85
85
|
//#endregion
|
|
86
|
-
export { coordinateD1PasswordPersistence, coordinateD1PasswordRegistration, makeD1PasswordPersistenceServices, makeD1PasswordRegistrationServices };
|
|
87
86
|
//# sourceMappingURL=d1-passwords.d.mts.map
|
|
@@ -15,12 +15,11 @@ type Database = EffectSQLiteD1Database<AnyRelations> & {
|
|
|
15
15
|
readonly $client: D1Client;
|
|
16
16
|
};
|
|
17
17
|
type Table$1 = AnySQLiteTable;
|
|
18
|
-
declare const makePhonePersistenceServices: <Database extends EffectSQLiteD1Database<import("drizzle-orm").TablesRelationalConfig> & {
|
|
18
|
+
export declare const makePhonePersistenceServices: <Database extends EffectSQLiteD1Database<import("drizzle-orm").TablesRelationalConfig> & {
|
|
19
19
|
readonly $client: D1Client;
|
|
20
20
|
}, S extends Table$1, I extends Table$1, F extends Table$1, C extends Table$1, N, RSetup = never>(database: Database, mapping: PhoneMappingSource<PhoneMapping<S, I, C, F, N> & D1PhoneMapping, RSetup>) => Effect.Effect<PhonePersistenceServices, PersistenceMappingError | import("@yielded/auth/PhoneOtp").PhoneConfigurationError, RSetup | LifecycleHooks>;
|
|
21
|
-
declare const coordinatePhonePersistence: <D extends Database, S extends Table$1, I extends Table$1, F extends Table$1, C extends Table$1, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
21
|
+
export declare const coordinatePhonePersistence: <D extends Database, S extends Table$1, I extends Table$1, F extends Table$1, C extends Table$1, N, A, E, R, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
|
|
22
22
|
readonly mapping: PhoneMappingSource<PhoneMapping<S, I, C, F, N> & D1PhoneMapping, RSetup>;
|
|
23
23
|
}, body: Effect.Effect<A, E, R>) => Effect.Effect<A, PhoneCoordinatorError<E> | DatabaseError, Exclude<R, PhonePersistence | PhoneAdmission | PhoneSignInTargets | D1BatchStatements> | LifecycleHooks | RSetup | DatabaseRequirements>;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { coordinatePhonePersistence, makePhonePersistenceServices };
|
|
26
25
|
//# sourceMappingURL=d1-phone.d.mts.map
|
|
@@ -4,9 +4,8 @@ import { AnyRelations } from "drizzle-orm";
|
|
|
4
4
|
import { D1Client } from "@effect/sql-d1/D1Client";
|
|
5
5
|
import { EffectSQLiteD1Database } from "drizzle-orm/effect-d1";
|
|
6
6
|
//#region src/drizzle/d1-planning.d.ts
|
|
7
|
-
type D1PlanningDatabase = EffectSQLiteD1Database<AnyRelations> & {
|
|
7
|
+
export type D1PlanningDatabase = EffectSQLiteD1Database<AnyRelations> & {
|
|
8
8
|
readonly $client: D1Client;
|
|
9
9
|
};
|
|
10
10
|
//#endregion
|
|
11
|
-
export { D1PlanningDatabase };
|
|
12
11
|
//# sourceMappingURL=d1-planning.d.mts.map
|
|
@@ -15,7 +15,7 @@ import { EffectSQLiteD1Database } from "drizzle-orm/effect-d1";
|
|
|
15
15
|
type Database = EffectSQLiteD1Database<AnyRelations> & {
|
|
16
16
|
readonly $client: D1Client;
|
|
17
17
|
};
|
|
18
|
-
declare const makeD1ProofPersistenceServices: <Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, A extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId>(database: Database, mapping: D1ProofPersistenceMapping<Rq, S, G, Cn, Rs, A, F, C, Sub, I, Cr, NativeId>) => Effect.Effect<{
|
|
18
|
+
export declare const makeD1ProofPersistenceServices: <Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, A extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId>(database: Database, mapping: D1ProofPersistenceMapping<Rq, S, G, Cn, Rs, A, F, C, Sub, I, Cr, NativeId>) => Effect.Effect<{
|
|
19
19
|
proofPersistence: {
|
|
20
20
|
readonly issue: <A_1>(input: {
|
|
21
21
|
readonly record: import("@yielded/auth/Proofs").ProofRecord;
|
|
@@ -72,9 +72,8 @@ type CoordinatorError<E> = E | ProofUnavailable | HookConfigurationError;
|
|
|
72
72
|
* never replays the owner effect. A reserved guard or named race becomes
|
|
73
73
|
* ProofUnavailable so the caller can retry the entire command with fresh secrets.
|
|
74
74
|
*/
|
|
75
|
-
declare function coordinateD1ProofPersistence<Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, Aev extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
75
|
+
export declare function coordinateD1ProofPersistence<Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, Aev extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
76
76
|
readonly mapping: D1ProofPersistenceMapping<Rq, S, G, Cn, Rs, Aev, F, C, Sub, I, Cr, NativeId>;
|
|
77
77
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, CoordinatorError<E> | DatabaseError, Exclude<R, ProofPersistence | D1BatchStatements> | LifecycleHooks | DatabaseRequirements>;
|
|
78
78
|
//#endregion
|
|
79
|
-
export { coordinateD1ProofPersistence, makeD1ProofPersistenceServices };
|
|
80
79
|
//# sourceMappingURL=d1-proofs.d.mts.map
|