@yielded/auth-persistence-drizzle 0.1.0-beta.14 → 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/Mysql2.d.mts
CHANGED
|
@@ -19,19 +19,19 @@ import { coordinateMysqlPasswordPersistence, coordinateMysqlPasswordRegistration
|
|
|
19
19
|
import { coordinateMysqlEmailAddress, coordinateMysqlEmailRegistration, makeMysqlEmailAddressServices, makeMysqlEmailRegistrationServices, makeMysqlEmailSignInServices } from "./drizzle/mysql-emails.mjs";
|
|
20
20
|
import { coordinateMySqlPasswordPreparedPersistence, makeMySqlPasswordPreparedPersistenceServices } from "./drizzle/mysql-password-prepared.mjs";
|
|
21
21
|
import { Layer } from "effect";
|
|
22
|
-
import { EffectMysql2Database } from "drizzle-orm/effect-mysql2";
|
|
23
22
|
import { AnyMySqlTable } from "drizzle-orm/mysql-core";
|
|
23
|
+
import { EffectMysql2Database } from "drizzle-orm/effect-mysql2";
|
|
24
24
|
//#region src/Mysql2.d.ts
|
|
25
25
|
export declare const makeSubjectProvisioningServices: <Subject extends AnyMySqlTable, Identifier extends AnyMySqlTable, Request extends AnyMySqlTable, NativeId>(mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => import("effect/Effect").Effect<{
|
|
26
26
|
readonly subjectProvisioner: {
|
|
27
27
|
readonly provision: (input: import("@yielded/auth/Identity").SubjectProvisioningInput) => import("effect/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 AnyMySqlTable, External extends AnyMySqlTable, NativeId>(mapping: ExternalIdentityTables<Subject, External, NativeId>) => import("effect/Effect").Effect<{
|
|
31
31
|
readonly externalIdentityMutation: {
|
|
32
32
|
readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => import("effect/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 AnyMySqlTable, Identifier extends AnyMySqlTable, External extends AnyMySqlTable, Request extends AnyMySqlTable, NativeId>(mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => import("effect/Effect").Effect<{
|
|
37
37
|
subjectProvisioner: {
|
|
@@ -40,7 +40,7 @@ export declare const makeIdentityServices: <Subject extends AnyMySqlTable, Ident
|
|
|
40
40
|
externalIdentityMutation: {
|
|
41
41
|
readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => import("effect/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 AnyMySqlTable<{
|
|
45
45
|
dialect: "mysql";
|
|
46
46
|
}>, O extends AnyMySqlTable<{
|
|
@@ -205,8 +205,6 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
|
|
|
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 AnyMySqlTable<{
|
|
|
228
226
|
};
|
|
229
227
|
};
|
|
230
228
|
readonly changed: boolean;
|
|
229
|
+
} | {
|
|
230
|
+
readonly _tag: "Conflict";
|
|
231
231
|
}, A>) => import("effect/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 AnyMySqlTable<{
|
|
|
305
305
|
readonly hasMore: boolean;
|
|
306
306
|
}, A>) => import("effect/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 AnyMySqlTable<{
|
|
309
309
|
dialect: "mysql";
|
|
310
310
|
}>, O extends AnyMySqlTable<{
|
|
311
311
|
dialect: "mysql";
|
|
@@ -347,7 +347,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
|
|
|
347
347
|
readonly hasMore: boolean;
|
|
348
348
|
}, A>) => import("effect/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 AnyMySqlTable<{
|
|
351
351
|
dialect: "mysql";
|
|
352
352
|
}>, O extends AnyMySqlTable<{
|
|
353
353
|
dialect: "mysql";
|
|
@@ -370,7 +370,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
|
|
|
370
370
|
readonly nowMillis: number;
|
|
371
371
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthRegistrationSettlement, A>) => import("effect/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 AnyMySqlTable<{
|
|
374
374
|
dialect: "mysql";
|
|
375
375
|
}>, O extends AnyMySqlTable<{
|
|
376
376
|
dialect: "mysql";
|
|
@@ -386,7 +386,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
|
|
|
386
386
|
dialect: "mysql";
|
|
387
387
|
}>, N>(mapping: OAuthRegistrationMapping<Registration, S, O, C, AC, TA, I, R, N>) => import("effect/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 EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnyMySqlTable<{
|
|
391
391
|
dialect: "mysql";
|
|
392
392
|
}>, O extends AnyMySqlTable<{
|
|
@@ -578,6 +578,8 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
|
|
|
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 AnyMySqlTable<{
|
|
|
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>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
@@ -773,6 +773,120 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
|
|
|
773
773
|
readonly retentionUntilMillis: number;
|
|
774
774
|
};
|
|
775
775
|
}, A>) => import("effect/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>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
889
|
+
readonly inspectPrepared: (input: import("@yielded/auth/OAuth").OAuthConnectedPreparedAccess) => import("effect/Effect").Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
776
890
|
readonly preflight: (input: import("@yielded/auth/OAuth").OAuthConnectedAccess) => import("effect/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 AnyMySqlTable<{
|
|
|
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 AnyMySqlTable<{
|
|
|
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>) => import("effect/Effect").Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
@@ -1414,7 +1528,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
|
|
|
1414
1528
|
readonly hasMore: boolean;
|
|
1415
1529
|
}, A>) => import("effect/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 AnyMySqlTable<{
|
|
1418
1532
|
dialect: "mysql";
|
|
1419
1533
|
}>, O extends AnyMySqlTable<{
|
|
1420
1534
|
dialect: "mysql";
|
|
@@ -1522,7 +1636,7 @@ export declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
|
|
|
1522
1636
|
readonly settled: boolean;
|
|
1523
1637
|
}, A>) => import("effect/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 EffectMysql2Database<import("drizzle-orm").TablesRelationalConfig>, S extends AnyMySqlTable<{
|
|
1527
1641
|
dialect: "mysql";
|
|
1528
1642
|
}>, AC extends AnyMySqlTable<{
|
package/dist/Pglite.d.mts
CHANGED
|
@@ -19,19 +19,19 @@ import { coordinatePgPasswordPersistence, coordinatePgPasswordRegistration, make
|
|
|
19
19
|
import { coordinatePgEmailAddress, coordinatePgEmailRegistration, makePgEmailAddressServices, makePgEmailRegistrationServices, makePgEmailSignInServices } from "./drizzle/pg-emails.mjs";
|
|
20
20
|
import { coordinatePgPasswordPreparedPersistence, makePgPasswordPreparedPersistenceServices } from "./drizzle/pg-password-prepared.mjs";
|
|
21
21
|
import { Effect, Layer } from "effect";
|
|
22
|
-
import { EffectPgDatabase } from "drizzle-orm/effect-pglite";
|
|
23
22
|
import { AnyPgTable } from "drizzle-orm/pg-core";
|
|
23
|
+
import { EffectPgDatabase } from "drizzle-orm/effect-pglite";
|
|
24
24
|
//#region src/Pglite.d.ts
|
|
25
25
|
export declare const makeSubjectProvisioningServices: <Subject extends AnyPgTable, Identifier extends AnyPgTable, Request extends AnyPgTable, NativeId>(mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => Effect.Effect<{
|
|
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<{
|
|
@@ -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<{
|