@yielded/auth-persistence-drizzle 0.1.0-beta.13 → 0.1.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/D1.d.mts +123 -9
- package/dist/Libsql.d.mts +143 -29
- package/dist/Mysql2.d.mts +130 -16
- package/dist/Pglite.d.mts +130 -16
- package/dist/Postgres.d.mts +131 -17
- package/dist/SqliteBun.d.mts +141 -27
- package/dist/SqliteDo.d.mts +145 -31
- package/dist/SqliteNode.d.mts +135 -21
- package/dist/SqliteWasm.d.mts +145 -31
- package/dist/drizzle/d1-emails.d.mts +3 -3
- package/dist/drizzle/d1-emails.mjs +56 -11
- package/dist/drizzle/d1-emails.mjs.map +1 -1
- package/dist/drizzle/d1-identity.mjs +9 -2
- package/dist/drizzle/d1-identity.mjs.map +1 -1
- package/dist/drizzle/d1-oauth.d.mts +8 -8
- package/dist/drizzle/d1-oauth.mjs +8 -8
- package/dist/drizzle/d1-oauth.mjs.map +1 -1
- package/dist/drizzle/d1-passkey.d.mts +2 -1
- package/dist/drizzle/d1-passkey.mjs +10 -8
- package/dist/drizzle/d1-passkey.mjs.map +1 -1
- package/dist/drizzle/d1-password-prepared.d.mts +1 -1
- package/dist/drizzle/d1-password-prepared.mjs +16 -5
- package/dist/drizzle/d1-password-prepared.mjs.map +1 -1
- package/dist/drizzle/d1-passwords.d.mts +2 -2
- package/dist/drizzle/d1-passwords.mjs +19 -6
- package/dist/drizzle/d1-passwords.mjs.map +1 -1
- package/dist/drizzle/d1-phone.d.mts +2 -1
- package/dist/drizzle/d1-phone.mjs +4 -2
- package/dist/drizzle/d1-phone.mjs.map +1 -1
- package/dist/drizzle/d1-proofs.d.mts +1 -1
- package/dist/drizzle/d1-proofs.mjs +18 -7
- package/dist/drizzle/d1-proofs.mjs.map +1 -1
- package/dist/drizzle/d1-sessions.d.mts +6 -5
- package/dist/drizzle/d1-sessions.mjs +29 -19
- package/dist/drizzle/d1-sessions.mjs.map +1 -1
- package/dist/drizzle/d1-totp.d.mts +2 -1
- package/dist/drizzle/d1-totp.mjs +4 -2
- package/dist/drizzle/d1-totp.mjs.map +1 -1
- package/dist/drizzle/email-registration.d.mts +5 -1
- package/dist/drizzle/email-registration.mjs +48 -4
- package/dist/drizzle/email-registration.mjs.map +1 -1
- package/dist/drizzle/email-target.d.mts +1 -0
- package/dist/drizzle/email-target.mjs +9 -0
- package/dist/drizzle/email-target.mjs.map +1 -1
- package/dist/drizzle/mysql-emails.d.mts +4 -4
- package/dist/drizzle/mysql-emails.mjs +8 -7
- package/dist/drizzle/mysql-emails.mjs.map +1 -1
- package/dist/drizzle/mysql-identity.mjs +11 -4
- package/dist/drizzle/mysql-identity.mjs.map +1 -1
- package/dist/drizzle/mysql-password-prepared.d.mts +2 -2
- package/dist/drizzle/mysql-password-prepared.mjs +4 -3
- package/dist/drizzle/mysql-password-prepared.mjs.map +1 -1
- package/dist/drizzle/mysql-passwords.d.mts +3 -3
- package/dist/drizzle/mysql-passwords.mjs +7 -6
- package/dist/drizzle/mysql-passwords.mjs.map +1 -1
- package/dist/drizzle/mysql-proofs.d.mts +2 -2
- package/dist/drizzle/mysql-proofs.mjs +4 -3
- package/dist/drizzle/mysql-proofs.mjs.map +1 -1
- package/dist/drizzle/mysql-sessions.d.mts +6 -6
- package/dist/drizzle/mysql-sessions.mjs +16 -15
- package/dist/drizzle/mysql-sessions.mjs.map +1 -1
- package/dist/drizzle/native-database.mjs +1 -1
- package/dist/drizzle/native-database.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-drivers.mjs +10 -8
- package/dist/drizzle/oauth-connected-drivers.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-flow.mjs +62 -13
- package/dist/drizzle/oauth-connected-flow.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-input.mjs +6 -0
- package/dist/drizzle/oauth-connected-input.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-maintenance.mjs +3 -3
- package/dist/drizzle/oauth-connected-maintenance.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-target.d.mts +116 -2
- package/dist/drizzle/oauth-connected-target.mjs +5 -3
- package/dist/drizzle/oauth-connected-target.mjs.map +1 -1
- package/dist/drizzle/oauth-drivers.mjs +8 -8
- package/dist/drizzle/oauth-drivers.mjs.map +1 -1
- package/dist/drizzle/oauth-target.d.mts +3 -3
- package/dist/drizzle/oauth-target.mjs +8 -6
- package/dist/drizzle/oauth-target.mjs.map +1 -1
- package/dist/drizzle/passkey-drivers.mjs +4 -4
- package/dist/drizzle/passkey-drivers.mjs.map +1 -1
- package/dist/drizzle/passkey-write-drivers.mjs +4 -4
- package/dist/drizzle/passkey-write-drivers.mjs.map +1 -1
- package/dist/drizzle/passkey-write-target.d.mts +1 -1
- package/dist/drizzle/password-prepared-sql.mjs +5 -0
- package/dist/drizzle/password-prepared-sql.mjs.map +1 -1
- package/dist/drizzle/password-prepared-target.d.mts +2 -1
- package/dist/drizzle/password-prepared-target.mjs +5 -0
- package/dist/drizzle/password-prepared-target.mjs.map +1 -1
- package/dist/drizzle/password-registration.d.mts +1 -1
- package/dist/drizzle/password-registration.mjs +2 -0
- package/dist/drizzle/password-registration.mjs.map +1 -1
- package/dist/drizzle/password-target.d.mts +1 -0
- package/dist/drizzle/password-target.mjs +6 -0
- package/dist/drizzle/password-target.mjs.map +1 -1
- package/dist/drizzle/pg-emails.d.mts +4 -4
- package/dist/drizzle/pg-emails.mjs +8 -7
- package/dist/drizzle/pg-emails.mjs.map +1 -1
- package/dist/drizzle/pg-identity.mjs +12 -5
- package/dist/drizzle/pg-identity.mjs.map +1 -1
- package/dist/drizzle/pg-password-prepared.d.mts +2 -2
- package/dist/drizzle/pg-password-prepared.mjs +4 -3
- package/dist/drizzle/pg-password-prepared.mjs.map +1 -1
- package/dist/drizzle/pg-passwords.d.mts +3 -3
- package/dist/drizzle/pg-passwords.mjs +7 -6
- package/dist/drizzle/pg-passwords.mjs.map +1 -1
- package/dist/drizzle/pg-proofs.d.mts +2 -2
- package/dist/drizzle/pg-proofs.mjs +4 -3
- package/dist/drizzle/pg-proofs.mjs.map +1 -1
- package/dist/drizzle/pg-sessions.d.mts +6 -6
- package/dist/drizzle/pg-sessions.mjs +16 -15
- package/dist/drizzle/pg-sessions.mjs.map +1 -1
- package/dist/drizzle/phone-target.mjs +11 -2
- package/dist/drizzle/phone-target.mjs.map +1 -1
- package/dist/drizzle/proof-target.d.mts +1 -0
- package/dist/drizzle/proof-target.mjs +2 -0
- package/dist/drizzle/proof-target.mjs.map +1 -1
- package/dist/drizzle/query-operations.mjs +2 -0
- package/dist/drizzle/query-operations.mjs.map +1 -1
- package/dist/drizzle/session-target.d.mts +1 -0
- package/dist/drizzle/session-target.mjs +9 -6
- package/dist/drizzle/session-target.mjs.map +1 -1
- package/dist/drizzle/sqlite-emails.mjs +8 -7
- package/dist/drizzle/sqlite-emails.mjs.map +1 -1
- package/dist/drizzle/sqlite-identity.mjs +7 -2
- package/dist/drizzle/sqlite-identity.mjs.map +1 -1
- package/dist/drizzle/sqlite-password-prepared.mjs +4 -3
- package/dist/drizzle/sqlite-password-prepared.mjs.map +1 -1
- package/dist/drizzle/sqlite-passwords.mjs +7 -6
- package/dist/drizzle/sqlite-passwords.mjs.map +1 -1
- package/dist/drizzle/sqlite-proofs.mjs +4 -3
- package/dist/drizzle/sqlite-proofs.mjs.map +1 -1
- package/dist/drizzle/sqlite-sessions.mjs +16 -15
- package/dist/drizzle/sqlite-sessions.mjs.map +1 -1
- package/dist/drizzle/storage-validation.mjs +234 -0
- package/dist/drizzle/storage-validation.mjs.map +1 -0
- package/dist/drizzle/totp-target.mjs +5 -2
- package/dist/drizzle/totp-target.mjs.map +1 -1
- package/dist/drizzle/transaction-mysql.mjs +1 -1
- package/package.json +1 -1
- package/src/drizzle/d1-emails.ts +158 -40
- package/src/drizzle/d1-identity.ts +13 -0
- package/src/drizzle/d1-oauth.ts +8 -8
- package/src/drizzle/d1-passkey.ts +10 -8
- package/src/drizzle/d1-password-prepared.ts +14 -2
- package/src/drizzle/d1-passwords.ts +22 -4
- package/src/drizzle/d1-phone.ts +4 -2
- package/src/drizzle/d1-proofs.ts +55 -3
- package/src/drizzle/d1-sessions.ts +67 -18
- package/src/drizzle/d1-totp.ts +4 -2
- package/src/drizzle/email-registration.ts +160 -12
- package/src/drizzle/email-target.ts +22 -4
- package/src/drizzle/mysql-emails.ts +17 -7
- package/src/drizzle/mysql-identity.ts +13 -0
- package/src/drizzle/mysql-password-prepared.ts +7 -3
- package/src/drizzle/mysql-passwords.ts +13 -6
- package/src/drizzle/mysql-proofs.ts +7 -3
- package/src/drizzle/mysql-sessions.ts +31 -15
- package/src/drizzle/native-database.ts +5 -4
- package/src/drizzle/oauth-connected-drivers.ts +10 -8
- package/src/drizzle/oauth-connected-flow.ts +98 -10
- package/src/drizzle/oauth-connected-input.ts +7 -0
- package/src/drizzle/oauth-connected-maintenance.ts +3 -2
- package/src/drizzle/oauth-connected-target.ts +4 -2
- package/src/drizzle/oauth-drivers.ts +8 -8
- package/src/drizzle/oauth-target.ts +13 -7
- package/src/drizzle/passkey-drivers.ts +4 -4
- package/src/drizzle/passkey-write-drivers.ts +8 -5
- package/src/drizzle/password-prepared-sql.ts +13 -1
- package/src/drizzle/password-prepared-target.ts +7 -1
- package/src/drizzle/password-registration.ts +10 -3
- package/src/drizzle/password-target.ts +22 -4
- package/src/drizzle/pg-emails.ts +17 -7
- package/src/drizzle/pg-identity.ts +13 -0
- package/src/drizzle/pg-password-prepared.ts +7 -3
- package/src/drizzle/pg-passwords.ts +13 -6
- package/src/drizzle/pg-proofs.ts +7 -3
- package/src/drizzle/pg-sessions.ts +31 -15
- package/src/drizzle/phone-target.ts +30 -5
- package/src/drizzle/proof-target.ts +10 -2
- package/src/drizzle/query-operations.ts +2 -0
- package/src/drizzle/session-target.ts +20 -3
- package/src/drizzle/sqlite-emails.ts +17 -7
- package/src/drizzle/sqlite-identity.ts +5 -0
- package/src/drizzle/sqlite-password-prepared.ts +7 -3
- package/src/drizzle/sqlite-passwords.ts +13 -6
- package/src/drizzle/sqlite-proofs.ts +7 -3
- package/src/drizzle/sqlite-sessions.ts +31 -15
- package/src/drizzle/storage-validation.ts +285 -0
- package/src/drizzle/totp-target.ts +16 -4
package/dist/Postgres.d.mts
CHANGED
|
@@ -26,12 +26,12 @@ export declare const makeSubjectProvisioningServices: <Subject extends AnyPgTabl
|
|
|
26
26
|
readonly subjectProvisioner: {
|
|
27
27
|
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>;
|
|
28
28
|
};
|
|
29
|
-
},
|
|
29
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
30
30
|
export declare const makeExternalIdentityServices: <Subject extends AnyPgTable, External extends AnyPgTable, NativeId>(mapping: ExternalIdentityTables<Subject, External, NativeId>) => Effect.Effect<{
|
|
31
31
|
readonly externalIdentityMutation: {
|
|
32
32
|
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>;
|
|
33
33
|
};
|
|
34
|
-
},
|
|
34
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
35
35
|
export declare const commitMode: "interactive";
|
|
36
36
|
export declare const makeIdentityServices: <Subject extends AnyPgTable, Identifier extends AnyPgTable, External extends AnyPgTable, Request extends AnyPgTable, NativeId>(mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => Effect.Effect<{
|
|
37
37
|
subjectProvisioner: {
|
|
@@ -40,7 +40,7 @@ export declare const makeIdentityServices: <Subject extends AnyPgTable, Identifi
|
|
|
40
40
|
externalIdentityMutation: {
|
|
41
41
|
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>;
|
|
42
42
|
};
|
|
43
|
-
},
|
|
43
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
44
44
|
export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
45
45
|
dialect: "pg";
|
|
46
46
|
}>, O extends AnyPgTable<{
|
|
@@ -65,8 +65,6 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
65
65
|
readonly flow: import("@yielded/auth/OAuth").OAuthLinkPendingFlow;
|
|
66
66
|
readonly authorization: import("@yielded/auth/OAuth").OAuthActionAuthorization;
|
|
67
67
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
68
|
-
readonly _tag: "Rejected";
|
|
69
|
-
} | {
|
|
70
68
|
readonly _tag: "Issued";
|
|
71
69
|
readonly flow: {
|
|
72
70
|
readonly context: {
|
|
@@ -122,6 +120,8 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
122
120
|
};
|
|
123
121
|
readonly retentionUntilMillis: number;
|
|
124
122
|
};
|
|
123
|
+
} | {
|
|
124
|
+
readonly _tag: "Rejected";
|
|
125
125
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
126
126
|
readonly preflight: (input: import("@yielded/auth/OAuth").OAuthLinkAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthLinkPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
127
127
|
readonly claim: <A>(input: {
|
|
@@ -205,8 +205,6 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
205
205
|
readonly _tag: "Cancelled";
|
|
206
206
|
} | {
|
|
207
207
|
readonly _tag: "Ambiguous";
|
|
208
|
-
} | {
|
|
209
|
-
readonly _tag: "Conflict";
|
|
210
208
|
} | {
|
|
211
209
|
readonly _tag: "Linked";
|
|
212
210
|
readonly credential: {
|
|
@@ -228,6 +226,8 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
228
226
|
};
|
|
229
227
|
};
|
|
230
228
|
readonly changed: boolean;
|
|
229
|
+
} | {
|
|
230
|
+
readonly _tag: "Conflict";
|
|
231
231
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
232
232
|
readonly inspectUnlink: (input: {
|
|
233
233
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
@@ -305,7 +305,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
305
305
|
readonly hasMore: boolean;
|
|
306
306
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
307
307
|
};
|
|
308
|
-
},
|
|
308
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthSignInServices: <S extends AnyPgTable<{
|
|
309
309
|
dialect: "pg";
|
|
310
310
|
}>, O extends AnyPgTable<{
|
|
311
311
|
dialect: "pg";
|
|
@@ -347,7 +347,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
347
347
|
readonly hasMore: boolean;
|
|
348
348
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
349
349
|
};
|
|
350
|
-
},
|
|
350
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationIntentServices: <S extends AnyPgTable<{
|
|
351
351
|
dialect: "pg";
|
|
352
352
|
}>, O extends AnyPgTable<{
|
|
353
353
|
dialect: "pg";
|
|
@@ -370,7 +370,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
370
370
|
readonly nowMillis: number;
|
|
371
371
|
}, 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>;
|
|
372
372
|
};
|
|
373
|
-
},
|
|
373
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationServices: <Registration, S extends AnyPgTable<{
|
|
374
374
|
dialect: "pg";
|
|
375
375
|
}>, O extends AnyPgTable<{
|
|
376
376
|
dialect: "pg";
|
|
@@ -386,7 +386,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
386
386
|
dialect: "pg";
|
|
387
387
|
}>, N>(mapping: OAuthRegistrationMapping<Registration, S, O, C, AC, TA, I, R, N>) => Effect.Effect<{
|
|
388
388
|
registrationAuthority: OAuthRegistrationAuthority<Registration>;
|
|
389
|
-
},
|
|
389
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthRegistration: {
|
|
390
390
|
<Database extends EffectPgDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnyPgTable<{
|
|
391
391
|
dialect: "pg";
|
|
392
392
|
}>, O extends AnyPgTable<{
|
|
@@ -578,6 +578,8 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
578
578
|
readonly _tag: "Cancelled";
|
|
579
579
|
} | {
|
|
580
580
|
readonly _tag: "Ambiguous";
|
|
581
|
+
} | {
|
|
582
|
+
readonly _tag: "Conflict";
|
|
581
583
|
} | {
|
|
582
584
|
readonly _tag: "Connected";
|
|
583
585
|
readonly grant: {
|
|
@@ -647,8 +649,6 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
647
649
|
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
648
650
|
};
|
|
649
651
|
};
|
|
650
|
-
} | {
|
|
651
|
-
readonly _tag: "Conflict";
|
|
652
652
|
} | {
|
|
653
653
|
readonly _tag: "Busy";
|
|
654
654
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
@@ -773,6 +773,120 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
773
773
|
readonly retentionUntilMillis: number;
|
|
774
774
|
};
|
|
775
775
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
776
|
+
readonly prepare: <A>(input: {
|
|
777
|
+
readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
|
|
778
|
+
readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
|
|
779
|
+
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
780
|
+
readonly _tag: "Rejected";
|
|
781
|
+
} | {
|
|
782
|
+
readonly _tag: "Issued";
|
|
783
|
+
readonly flow: {
|
|
784
|
+
readonly context: {
|
|
785
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
786
|
+
readonly protocol: "oauth" | "oidc";
|
|
787
|
+
readonly configurationGeneration: number;
|
|
788
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
789
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
790
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
791
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
792
|
+
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
793
|
+
readonly generation: number;
|
|
794
|
+
readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
|
|
795
|
+
readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
|
|
796
|
+
readonly access?: {
|
|
797
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
798
|
+
readonly generation: number;
|
|
799
|
+
readonly issuance: "active" | "retired";
|
|
800
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
801
|
+
readonly clientRegistrationId: string;
|
|
802
|
+
readonly scopes: readonly string[];
|
|
803
|
+
readonly resources: readonly string[];
|
|
804
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
805
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
806
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
807
|
+
readonly refreshAheadMillis: number;
|
|
808
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
809
|
+
readonly revocation: "cohort" | "unsupported";
|
|
810
|
+
} | undefined;
|
|
811
|
+
readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
|
|
812
|
+
readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
813
|
+
readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
814
|
+
readonly requestBindingExpiresAtMillis: number;
|
|
815
|
+
readonly issuedAtMillis: number;
|
|
816
|
+
readonly expiresAtMillis: number;
|
|
817
|
+
readonly claimLifetimeMillis: number;
|
|
818
|
+
readonly namespace: "effect-auth/oauth-connected-context/v1";
|
|
819
|
+
readonly revision: {
|
|
820
|
+
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
821
|
+
readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
822
|
+
readonly credentials: readonly {
|
|
823
|
+
readonly credentialId: string;
|
|
824
|
+
readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
825
|
+
}[];
|
|
826
|
+
};
|
|
827
|
+
readonly profile: {
|
|
828
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
829
|
+
readonly generation: number;
|
|
830
|
+
readonly issuance: "active" | "retired";
|
|
831
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
832
|
+
readonly clientRegistrationId: string;
|
|
833
|
+
readonly scopes: readonly string[];
|
|
834
|
+
readonly resources: readonly string[];
|
|
835
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
836
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
837
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
838
|
+
readonly refreshAheadMillis: number;
|
|
839
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
840
|
+
readonly revocation: "cohort" | "unsupported";
|
|
841
|
+
};
|
|
842
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
843
|
+
readonly reconnect?: {
|
|
844
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
845
|
+
readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
846
|
+
readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
847
|
+
readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
848
|
+
readonly identity: {
|
|
849
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
850
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
851
|
+
readonly subject: string;
|
|
852
|
+
};
|
|
853
|
+
readonly configuration: {
|
|
854
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
855
|
+
readonly protocol: "oauth" | "oidc";
|
|
856
|
+
readonly configurationGeneration: number;
|
|
857
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
858
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
859
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
860
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
861
|
+
readonly profile: {
|
|
862
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
863
|
+
readonly generation: number;
|
|
864
|
+
readonly issuance: "active" | "retired";
|
|
865
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
866
|
+
readonly clientRegistrationId: string;
|
|
867
|
+
readonly scopes: readonly string[];
|
|
868
|
+
readonly resources: readonly string[];
|
|
869
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
870
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
871
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
872
|
+
readonly refreshAheadMillis: number;
|
|
873
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
874
|
+
readonly revocation: "cohort" | "unsupported";
|
|
875
|
+
};
|
|
876
|
+
};
|
|
877
|
+
} | undefined;
|
|
878
|
+
readonly maximumEvidenceAgeMillis: number;
|
|
879
|
+
};
|
|
880
|
+
readonly sealed: {
|
|
881
|
+
readonly format: "oauth-xchacha20poly1305-v1";
|
|
882
|
+
readonly keyId: string;
|
|
883
|
+
readonly nonce: string;
|
|
884
|
+
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
885
|
+
};
|
|
886
|
+
readonly retentionUntilMillis: number;
|
|
887
|
+
};
|
|
888
|
+
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
889
|
+
readonly inspectPrepared: (input: import("@yielded/auth/OAuth").OAuthConnectedPreparedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
776
890
|
readonly preflight: (input: import("@yielded/auth/OAuth").OAuthConnectedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
777
891
|
readonly claim: <A>(input: {
|
|
778
892
|
readonly access: import("@yielded/auth/OAuth").OAuthConnectedAccess;
|
|
@@ -924,6 +1038,8 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
924
1038
|
readonly _tag: "Cancelled";
|
|
925
1039
|
} | {
|
|
926
1040
|
readonly _tag: "Ambiguous";
|
|
1041
|
+
} | {
|
|
1042
|
+
readonly _tag: "Conflict";
|
|
927
1043
|
} | {
|
|
928
1044
|
readonly _tag: "Connected";
|
|
929
1045
|
readonly grant: {
|
|
@@ -993,8 +1109,6 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
993
1109
|
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
994
1110
|
};
|
|
995
1111
|
};
|
|
996
|
-
} | {
|
|
997
|
-
readonly _tag: "Conflict";
|
|
998
1112
|
} | {
|
|
999
1113
|
readonly _tag: "Busy";
|
|
1000
1114
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
@@ -1414,7 +1528,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
1414
1528
|
readonly hasMore: boolean;
|
|
1415
1529
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1416
1530
|
};
|
|
1417
|
-
},
|
|
1531
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnyPgTable<{
|
|
1418
1532
|
dialect: "pg";
|
|
1419
1533
|
}>, O extends AnyPgTable<{
|
|
1420
1534
|
dialect: "pg";
|
|
@@ -1522,7 +1636,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
|
|
|
1522
1636
|
readonly settled: boolean;
|
|
1523
1637
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1524
1638
|
};
|
|
1525
|
-
},
|
|
1639
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
|
|
1526
1640
|
<D extends EffectPgDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnyPgTable<{
|
|
1527
1641
|
dialect: "pg";
|
|
1528
1642
|
}>, AC extends AnyPgTable<{
|
package/dist/SqliteBun.d.mts
CHANGED
|
@@ -73,16 +73,16 @@ export declare const coordinateEmailAddress: {
|
|
|
73
73
|
readonly hasMore: boolean;
|
|
74
74
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Email").EmailUnavailable>;
|
|
75
75
|
};
|
|
76
|
-
},
|
|
76
|
+
}, import("@yielded/auth/Email").EmailUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(mapping: EmailRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>, proofMapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, any, import("drizzle-orm").SQL<unknown>>) => Effect.Effect<{
|
|
77
77
|
registrationAuthority: EmailRegistrationAuthority<Registration>;
|
|
78
|
-
},
|
|
78
|
+
}, import("@yielded/auth/Email").EmailUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailSignInServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, NativeId>(mapping: EmailSignInMapping<S, I, C, NativeId>) => Effect.Effect<{
|
|
79
79
|
emailSignInTargets: {
|
|
80
80
|
readonly lookup: (input: {
|
|
81
81
|
readonly moduleId: string;
|
|
82
82
|
readonly identifier: import("@yielded/auth/Identity").LoginIdentifier;
|
|
83
83
|
}) => Effect.Effect<import("effect/Option").Option<import("@yielded/auth/Email").EmailCredentialSnapshot>, import("@yielded/auth/Email").EmailUnavailable>;
|
|
84
84
|
};
|
|
85
|
-
},
|
|
85
|
+
}, import("@yielded/auth/Email").EmailUnavailable, Database>;
|
|
86
86
|
export declare const coordinatePasswordPersistence: {
|
|
87
87
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, PM extends ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any> | undefined, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
88
88
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasswordPersistenceMapping<DrizzleTableModel<S>, DrizzleTableModel<I>, DrizzleTableModel<C>, DrizzleTableModel<AC>, DrizzleTableModel<A>, DrizzleTableModel<RS>, DrizzleTableModel<CE>, DrizzleTableModel<M>, NativeId, import("drizzle-orm").SQL<unknown>>;
|
|
@@ -147,9 +147,9 @@ export declare const coordinatePasswordPersistence: {
|
|
|
147
147
|
readonly hasMore: boolean;
|
|
148
148
|
}, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, import("@yielded/auth/Password").PasswordUnavailable>;
|
|
149
149
|
};
|
|
150
|
-
},
|
|
150
|
+
}, import("@yielded/auth/Password").PasswordUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makePasswordRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(mapping: PasswordRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>) => Effect.Effect<{
|
|
151
151
|
registrationAuthority: import("@yielded/auth-persistence/Adapter").PasswordRegistrationAuthority<Registration>;
|
|
152
|
-
},
|
|
152
|
+
}, import("@yielded/auth/Password").PasswordUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
153
153
|
export declare const coordinateProofPersistence: {
|
|
154
154
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, Aev extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
155
155
|
readonly mapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<Rq>, DrizzleTableModel<S>, DrizzleTableModel<G>, DrizzleTableModel<Cn>, DrizzleTableModel<Rs>, DrizzleTableModel<Aev>, DrizzleTableModel<F>, DrizzleTableModel<C>, DrizzleTableModel<Sub>, DrizzleTableModel<I>, DrizzleTableModel<Cr>, NativeId, import("drizzle-orm").SQL<unknown>>;
|
|
@@ -209,7 +209,7 @@ export declare const coordinateProofPersistence: {
|
|
|
209
209
|
readonly limit: number;
|
|
210
210
|
}, prepare: import("@yielded/auth/Proofs").PrepareProofCommit<import("@yielded/auth/Proofs").ProofCleanupResult, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, import("@yielded/auth/Proofs").ProofUnavailable>;
|
|
211
211
|
};
|
|
212
|
-
},
|
|
212
|
+
}, import("@yielded/auth/Proofs").ProofUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
213
213
|
export declare const coordinateAuthenticationAuthority: {
|
|
214
214
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
215
215
|
readonly mapping: AuthenticationAuthorityMapping<Claims, S, C, F, P, NativeId>;
|
|
@@ -266,11 +266,11 @@ export declare const coordinateAuthenticationAuthority: {
|
|
|
266
266
|
readonly pending?: import("@yielded/auth/Sessions").PendingConsumption;
|
|
267
267
|
}, prepare: import("@yielded/auth/Sessions").PrepareSessionCommit<void, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Sessions").StaleAuthentication | import("@yielded/auth/Sessions").PendingAuthenticationInvalid | import("@yielded/auth/Sessions").SessionUnavailable>;
|
|
268
268
|
};
|
|
269
|
-
},
|
|
269
|
+
}, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makePendingAuthenticationServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, P extends AnySQLiteTable, F extends AnySQLiteTable, NativeId>(mapping: PendingAuthenticationMapping<Claims, S, C, P, F, NativeId>) => Effect.Effect<{
|
|
270
270
|
pendingAuthentication: import("@yielded/auth/Sessions").PendingAuthentication<Claims>;
|
|
271
|
-
},
|
|
271
|
+
}, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeSessionStepUpServices: <Claims, Id, S extends AnySQLiteTable, C extends AnySQLiteTable, I extends AnySQLiteTable, Session extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>, target: Context.Service<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>) => Effect.Effect<{
|
|
272
272
|
sessionStepUpPersistence: import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>;
|
|
273
|
-
},
|
|
273
|
+
}, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateSessionStepUp: {
|
|
274
274
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, Claims, Id, S extends AnySQLiteTable, C extends AnySQLiteTable, I extends AnySQLiteTable, Session extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
275
275
|
readonly mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>;
|
|
276
276
|
readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>;
|
|
@@ -283,10 +283,10 @@ export declare const coordinateAuthenticationAuthority: {
|
|
|
283
283
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id | TxId>>;
|
|
284
284
|
}, makeSignedSessionValidityServices: <S extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: SignedSessionValidityMapping<S, T, NativeId, NativeSessionId>) => Effect.Effect<{
|
|
285
285
|
signedSessionValidity: import("@yielded/auth/Sessions").SignedSessionValidity;
|
|
286
|
-
},
|
|
286
|
+
}, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeStatefulSessionServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, Session extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: StatefulSessionMapping<Claims, S, C, Session, F, P, NativeId, NativeSessionId>) => Effect.Effect<{
|
|
287
287
|
readonly statefulSessionPersistence: import("@yielded/auth/Sessions").StatefulSessionPersistence<Claims>;
|
|
288
288
|
readonly sessionRepository: import("@yielded/auth/Sessions").SessionRepository;
|
|
289
|
-
},
|
|
289
|
+
}, import("@yielded/auth/Sessions").SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
290
290
|
export declare const commitMode: "interactive";
|
|
291
291
|
export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => Effect.Effect<{
|
|
292
292
|
subjectProvisioner: {
|
|
@@ -295,20 +295,20 @@ export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Iden
|
|
|
295
295
|
externalIdentityMutation: {
|
|
296
296
|
readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => Effect.Effect<void, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
297
297
|
};
|
|
298
|
-
},
|
|
298
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
299
299
|
export declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => Effect.Effect<{
|
|
300
300
|
readonly subjectProvisioner: {
|
|
301
301
|
readonly provision: (input: import("@yielded/auth/Identity").SubjectProvisioningInput) => Effect.Effect<import("@yielded/auth/Identity").ProvisioningResult, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
302
302
|
};
|
|
303
|
-
},
|
|
303
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
304
304
|
export declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(mapping: ExternalIdentityTables<Subject, External, NativeId>) => Effect.Effect<{
|
|
305
305
|
readonly externalIdentityMutation: {
|
|
306
306
|
readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => Effect.Effect<void, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
307
307
|
};
|
|
308
|
-
},
|
|
308
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
309
309
|
export declare const makePasswordPreparedPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable = AnySQLiteTable, PC extends AnySQLiteTable = AnySQLiteTable, PM extends AnySQLiteTable = AnySQLiteTable, PSub extends AnySQLiteTable = AnySQLiteTable, PI extends AnySQLiteTable = AnySQLiteTable, PCr extends AnySQLiteTable = AnySQLiteTable, PNativeId = unknown>(mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>, proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined) => Effect.Effect<{
|
|
310
310
|
passwordPreparedPersistence: import("@yielded/auth/Password").PasswordPreparedPersistence;
|
|
311
|
-
},
|
|
311
|
+
}, import("@yielded/auth/Password").PasswordUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinatePasswordPreparedPersistence: {
|
|
312
312
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable, PC extends AnySQLiteTable, PM extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
313
313
|
readonly mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>;
|
|
314
314
|
readonly proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined;
|
|
@@ -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: "Linked";
|
|
491
491
|
readonly credential: {
|
|
@@ -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
|
-
},
|
|
589
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, 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
|
-
},
|
|
631
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, 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
|
-
},
|
|
654
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, 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
|
-
},
|
|
670
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthRegistration: {
|
|
671
671
|
<Database extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnySQLiteTable<{
|
|
672
672
|
dialect: "sqlite";
|
|
673
673
|
}>, O 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: "Conflict";
|
|
864
864
|
} | {
|
|
@@ -1054,6 +1054,120 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1054
1054
|
readonly retentionUntilMillis: number;
|
|
1055
1055
|
};
|
|
1056
1056
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1057
|
+
readonly prepare: <A>(input: {
|
|
1058
|
+
readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
|
|
1059
|
+
readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
|
|
1060
|
+
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1061
|
+
readonly _tag: "Rejected";
|
|
1062
|
+
} | {
|
|
1063
|
+
readonly _tag: "Issued";
|
|
1064
|
+
readonly flow: {
|
|
1065
|
+
readonly context: {
|
|
1066
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1067
|
+
readonly protocol: "oauth" | "oidc";
|
|
1068
|
+
readonly configurationGeneration: number;
|
|
1069
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
1070
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
1071
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
1072
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
1073
|
+
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
1074
|
+
readonly generation: number;
|
|
1075
|
+
readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
|
|
1076
|
+
readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
|
|
1077
|
+
readonly access?: {
|
|
1078
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
1079
|
+
readonly generation: number;
|
|
1080
|
+
readonly issuance: "active" | "retired";
|
|
1081
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1082
|
+
readonly clientRegistrationId: string;
|
|
1083
|
+
readonly scopes: readonly string[];
|
|
1084
|
+
readonly resources: readonly string[];
|
|
1085
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
1086
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
1087
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
1088
|
+
readonly refreshAheadMillis: number;
|
|
1089
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
1090
|
+
readonly revocation: "cohort" | "unsupported";
|
|
1091
|
+
} | undefined;
|
|
1092
|
+
readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
|
|
1093
|
+
readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
1094
|
+
readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
1095
|
+
readonly requestBindingExpiresAtMillis: number;
|
|
1096
|
+
readonly issuedAtMillis: number;
|
|
1097
|
+
readonly expiresAtMillis: number;
|
|
1098
|
+
readonly claimLifetimeMillis: number;
|
|
1099
|
+
readonly namespace: "effect-auth/oauth-connected-context/v1";
|
|
1100
|
+
readonly revision: {
|
|
1101
|
+
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
1102
|
+
readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1103
|
+
readonly credentials: readonly {
|
|
1104
|
+
readonly credentialId: string;
|
|
1105
|
+
readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1106
|
+
}[];
|
|
1107
|
+
};
|
|
1108
|
+
readonly profile: {
|
|
1109
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
1110
|
+
readonly generation: number;
|
|
1111
|
+
readonly issuance: "active" | "retired";
|
|
1112
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1113
|
+
readonly clientRegistrationId: string;
|
|
1114
|
+
readonly scopes: readonly string[];
|
|
1115
|
+
readonly resources: readonly string[];
|
|
1116
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
1117
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
1118
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
1119
|
+
readonly refreshAheadMillis: number;
|
|
1120
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
1121
|
+
readonly revocation: "cohort" | "unsupported";
|
|
1122
|
+
};
|
|
1123
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
1124
|
+
readonly reconnect?: {
|
|
1125
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
1126
|
+
readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1127
|
+
readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1128
|
+
readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1129
|
+
readonly identity: {
|
|
1130
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1131
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
1132
|
+
readonly subject: string;
|
|
1133
|
+
};
|
|
1134
|
+
readonly configuration: {
|
|
1135
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1136
|
+
readonly protocol: "oauth" | "oidc";
|
|
1137
|
+
readonly configurationGeneration: number;
|
|
1138
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
1139
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
1140
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
1141
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
1142
|
+
readonly profile: {
|
|
1143
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
1144
|
+
readonly generation: number;
|
|
1145
|
+
readonly issuance: "active" | "retired";
|
|
1146
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1147
|
+
readonly clientRegistrationId: string;
|
|
1148
|
+
readonly scopes: readonly string[];
|
|
1149
|
+
readonly resources: readonly string[];
|
|
1150
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
1151
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
1152
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
1153
|
+
readonly refreshAheadMillis: number;
|
|
1154
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
1155
|
+
readonly revocation: "cohort" | "unsupported";
|
|
1156
|
+
};
|
|
1157
|
+
};
|
|
1158
|
+
} | undefined;
|
|
1159
|
+
readonly maximumEvidenceAgeMillis: number;
|
|
1160
|
+
};
|
|
1161
|
+
readonly sealed: {
|
|
1162
|
+
readonly format: "oauth-xchacha20poly1305-v1";
|
|
1163
|
+
readonly keyId: string;
|
|
1164
|
+
readonly nonce: string;
|
|
1165
|
+
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
1166
|
+
};
|
|
1167
|
+
readonly retentionUntilMillis: number;
|
|
1168
|
+
};
|
|
1169
|
+
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1170
|
+
readonly inspectPrepared: (input: import("@yielded/auth/OAuth").OAuthConnectedPreparedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1057
1171
|
readonly preflight: (input: import("@yielded/auth/OAuth").OAuthConnectedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1058
1172
|
readonly claim: <A>(input: {
|
|
1059
1173
|
readonly access: import("@yielded/auth/OAuth").OAuthConnectedAccess;
|
|
@@ -1201,10 +1315,10 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1201
1315
|
readonly nowMillis: number;
|
|
1202
1316
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1203
1317
|
readonly _tag: "Rejected";
|
|
1204
|
-
} | {
|
|
1205
|
-
readonly _tag: "Ambiguous";
|
|
1206
1318
|
} | {
|
|
1207
1319
|
readonly _tag: "Cancelled";
|
|
1320
|
+
} | {
|
|
1321
|
+
readonly _tag: "Ambiguous";
|
|
1208
1322
|
} | {
|
|
1209
1323
|
readonly _tag: "Conflict";
|
|
1210
1324
|
} | {
|
|
@@ -1695,7 +1809,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1695
1809
|
readonly hasMore: boolean;
|
|
1696
1810
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1697
1811
|
};
|
|
1698
|
-
},
|
|
1812
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnySQLiteTable<{
|
|
1699
1813
|
dialect: "sqlite";
|
|
1700
1814
|
}>, O extends AnySQLiteTable<{
|
|
1701
1815
|
dialect: "sqlite";
|
|
@@ -1803,7 +1917,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1803
1917
|
readonly settled: boolean;
|
|
1804
1918
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1805
1919
|
};
|
|
1806
|
-
},
|
|
1920
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
|
|
1807
1921
|
<D extends EffectSQLiteBunDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1808
1922
|
dialect: "sqlite";
|
|
1809
1923
|
}>, AC extends AnySQLiteTable<{
|