@yielded/auth-persistence-drizzle 0.1.0-beta.0 → 0.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/D1.d.mts +135 -25
- package/dist/D1.mjs +1 -3
- package/dist/D1.mjs.map +1 -1
- package/dist/Libsql.d.mts +192 -75
- package/dist/Libsql.mjs +1 -7
- package/dist/Libsql.mjs.map +1 -1
- package/dist/Mysql2.d.mts +177 -37
- package/dist/Mysql2.mjs +1 -3
- package/dist/Mysql2.mjs.map +1 -1
- package/dist/Pglite.d.mts +171 -30
- package/dist/Pglite.mjs +2 -3
- package/dist/Pglite.mjs.map +1 -1
- package/dist/Postgres.d.mts +177 -36
- package/dist/Postgres.mjs +2 -3
- package/dist/Postgres.mjs.map +1 -1
- package/dist/SqliteBun.d.mts +192 -74
- package/dist/SqliteBun.mjs +1 -5
- package/dist/SqliteBun.mjs.map +1 -1
- package/dist/SqliteDo.d.mts +194 -110
- package/dist/SqliteDo.mjs +2 -32
- package/dist/SqliteDo.mjs.map +1 -1
- package/dist/SqliteNode.d.mts +190 -72
- package/dist/SqliteNode.mjs +1 -5
- package/dist/SqliteNode.mjs.map +1 -1
- package/dist/SqliteWasm.d.mts +192 -74
- package/dist/SqliteWasm.mjs +1 -5
- package/dist/SqliteWasm.mjs.map +1 -1
- package/dist/drizzle/D1BatchStatements.d.mts +1 -1
- package/dist/drizzle/D1BatchStatements.mjs.map +1 -1
- package/dist/drizzle/d1-emails.mjs.map +1 -1
- package/dist/drizzle/d1-generated-statement.mjs.map +1 -1
- package/dist/drizzle/d1-identity.d.mts +1 -1
- package/dist/drizzle/d1-oauth.d.mts +35 -5
- package/dist/drizzle/d1-oauth.mjs +1 -1
- package/dist/drizzle/d1-password-prepared.mjs.map +1 -1
- package/dist/drizzle/d1-passwords.d.mts +1 -1
- package/dist/drizzle/d1-passwords.mjs.map +1 -1
- package/dist/drizzle/d1-proofs.d.mts +1 -1
- package/dist/drizzle/d1-proofs.mjs.map +1 -1
- package/dist/drizzle/d1-sessions.d.mts +3 -3
- package/dist/drizzle/d1-sessions.mjs.map +1 -1
- package/dist/drizzle/email-registration.d.mts +1 -1
- package/dist/drizzle/email-target.d.mts +1 -1
- package/dist/drizzle/email-target.mjs.map +1 -1
- package/dist/drizzle/model.d.mts +2 -126
- package/dist/drizzle/model.mjs +2 -21
- package/dist/drizzle/model.mjs.map +1 -1
- package/dist/drizzle/mysql-emails.d.mts +1 -1
- package/dist/drizzle/mysql-emails.mjs.map +1 -1
- package/dist/drizzle/mysql-identity.d.mts +1 -1
- package/dist/drizzle/mysql-password-prepared.d.mts +1 -1
- package/dist/drizzle/mysql-password-prepared.mjs.map +1 -1
- package/dist/drizzle/mysql-passwords.d.mts +1 -1
- package/dist/drizzle/mysql-passwords.mjs.map +1 -1
- package/dist/drizzle/mysql-proofs.d.mts +1 -1
- package/dist/drizzle/mysql-proofs.mjs.map +1 -1
- package/dist/drizzle/mysql-sessions.d.mts +1 -1
- package/dist/drizzle/mysql-sessions.mjs.map +1 -1
- package/dist/drizzle/oauth-accounts.mjs +1 -1
- package/dist/drizzle/oauth-connected-access.mjs +14 -12
- package/dist/drizzle/oauth-connected-access.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-custody.mjs +2 -2
- package/dist/drizzle/oauth-connected-drivers.mjs +4 -1
- package/dist/drizzle/oauth-connected-drivers.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-flow.mjs +2 -2
- package/dist/drizzle/oauth-connected-input.mjs +14 -1
- package/dist/drizzle/oauth-connected-input.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-maintenance.mjs +1 -1
- package/dist/drizzle/oauth-connected-management.mjs +2 -2
- package/dist/drizzle/oauth-connected-model.d.mts +17 -3
- package/dist/drizzle/oauth-connected-model.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-settlement.mjs +51 -41
- package/dist/drizzle/oauth-connected-settlement.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-sign-in.mjs +263 -0
- package/dist/drizzle/oauth-connected-sign-in.mjs.map +1 -0
- package/dist/drizzle/oauth-connected-state.d.mts +110 -2
- package/dist/drizzle/oauth-connected-state.mjs +9 -4
- package/dist/drizzle/oauth-connected-state.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-target.d.mts +137 -9
- package/dist/drizzle/oauth-connected-target.mjs +6 -2
- package/dist/drizzle/oauth-connected-target.mjs.map +1 -1
- package/dist/drizzle/oauth-drivers.mjs +1 -1
- package/dist/drizzle/oauth-flow.d.mts +1 -1
- package/dist/drizzle/oauth-flow.mjs +1 -1
- package/dist/drizzle/oauth-input.mjs +1 -1
- package/dist/drizzle/oauth-model.d.mts +1 -1
- package/dist/drizzle/oauth-owner.d.mts +1 -1
- package/dist/drizzle/oauth-registration.d.mts +2 -2
- package/dist/drizzle/oauth-registration.mjs +1 -1
- package/dist/drizzle/oauth-state.mjs +5 -4
- package/dist/drizzle/oauth-state.mjs.map +1 -1
- package/dist/drizzle/oauth-target.d.mts +2 -2
- package/dist/drizzle/oauth-target.mjs +1 -1
- package/dist/drizzle/oauth-target.mjs.map +1 -1
- package/dist/drizzle/passkey-write-target.d.mts +1 -1
- package/dist/drizzle/password-prepared-state.mjs +1 -1
- package/dist/drizzle/password-prepared-target.d.mts +1 -1
- package/dist/drizzle/password-prepared-target.mjs.map +1 -1
- package/dist/drizzle/password-target.d.mts +1 -1
- package/dist/drizzle/password-target.mjs.map +1 -1
- package/dist/drizzle/pg-emails.d.mts +1 -1
- package/dist/drizzle/pg-emails.mjs.map +1 -1
- package/dist/drizzle/pg-identity.d.mts +22 -0
- package/dist/drizzle/pg-identity.mjs +89 -0
- package/dist/drizzle/pg-identity.mjs.map +1 -0
- package/dist/drizzle/pg-password-prepared.d.mts +1 -1
- package/dist/drizzle/pg-password-prepared.mjs.map +1 -1
- package/dist/drizzle/pg-passwords.d.mts +1 -1
- package/dist/drizzle/pg-passwords.mjs.map +1 -1
- package/dist/drizzle/pg-proofs.d.mts +1 -1
- package/dist/drizzle/pg-proofs.mjs.map +1 -1
- package/dist/drizzle/pg-sessions.d.mts +1 -1
- package/dist/drizzle/pg-sessions.mjs.map +1 -1
- package/dist/drizzle/phone-model.d.mts +1 -1
- package/dist/drizzle/phone-target.d.mts +1 -1
- package/dist/drizzle/phone-target.mjs.map +1 -1
- package/dist/drizzle/proof-target.d.mts +1 -1
- package/dist/drizzle/proof-target.mjs.map +1 -1
- package/dist/drizzle/session-target.d.mts +1 -1
- package/dist/drizzle/session-target.mjs.map +1 -1
- package/dist/drizzle/sqlite-emails.mjs.map +1 -1
- package/dist/drizzle/sqlite-password-prepared.mjs.map +1 -1
- package/dist/drizzle/sqlite-passwords.mjs.map +1 -1
- package/dist/drizzle/sqlite-proofs.mjs.map +1 -1
- package/dist/drizzle/sqlite-sessions.mjs.map +1 -1
- package/dist/drizzle/standalone-guard.mjs.map +1 -1
- package/dist/drizzle/totp-model.d.mts +1 -1
- package/dist/drizzle/totp-target.d.mts +1 -1
- package/dist/drizzle/totp-target.mjs.map +1 -1
- package/dist/drizzle/transaction-mysql.mjs +1 -1
- package/dist/drizzle/transaction-mysql.mjs.map +1 -1
- package/dist/index.d.mts +2 -4
- package/dist/index.mjs +2 -4
- package/dist/internal/drizzle-postgres.mjs.map +1 -1
- package/dist/internal/drizzle-sqlite.mjs.map +1 -1
- package/package.json +1 -1
- package/src/D1.ts +1 -17
- package/src/Libsql.ts +0 -44
- package/src/Mysql2.ts +1 -23
- package/src/Pglite.ts +2 -18
- package/src/Postgres.ts +2 -18
- package/src/SqliteBun.ts +1 -38
- package/src/SqliteDo.ts +1 -256
- package/src/SqliteNode.ts +1 -38
- package/src/SqliteWasm.ts +1 -38
- package/src/drizzle/D1BatchStatements.ts +1 -1
- package/src/drizzle/d1-emails.ts +2 -4
- package/src/drizzle/d1-generated-statement.ts +1 -1
- package/src/drizzle/d1-password-prepared.ts +2 -5
- package/src/drizzle/d1-passwords.ts +2 -4
- package/src/drizzle/d1-proofs.ts +2 -4
- package/src/drizzle/d1-sessions.ts +2 -2
- package/src/drizzle/email-target.ts +1 -1
- package/src/drizzle/model.ts +1 -208
- package/src/drizzle/mysql-emails.ts +1 -1
- package/src/drizzle/mysql-password-prepared.ts +1 -1
- package/src/drizzle/mysql-passwords.ts +1 -1
- package/src/drizzle/mysql-proofs.ts +1 -1
- package/src/drizzle/mysql-sessions.ts +1 -1
- package/src/drizzle/oauth-connected-access.ts +8 -1
- package/src/drizzle/oauth-connected-drivers.ts +3 -0
- package/src/drizzle/oauth-connected-input.ts +13 -0
- package/src/drizzle/oauth-connected-model.ts +17 -0
- package/src/drizzle/oauth-connected-settlement.ts +65 -42
- package/src/drizzle/oauth-connected-sign-in.ts +438 -0
- package/src/drizzle/oauth-connected-state.ts +19 -7
- package/src/drizzle/oauth-connected-target.ts +10 -1
- package/src/drizzle/oauth-state.ts +5 -4
- package/src/drizzle/oauth-target.ts +1 -1
- package/src/drizzle/password-prepared-target.ts +1 -1
- package/src/drizzle/password-target.ts +1 -1
- package/src/drizzle/pg-emails.ts +1 -1
- package/src/drizzle/pg-identity.ts +301 -0
- package/src/drizzle/pg-password-prepared.ts +1 -1
- package/src/drizzle/pg-passwords.ts +1 -1
- package/src/drizzle/pg-proofs.ts +1 -1
- package/src/drizzle/pg-sessions.ts +1 -1
- package/src/drizzle/phone-target.ts +1 -1
- package/src/drizzle/proof-target.ts +1 -1
- package/src/drizzle/session-target.ts +1 -1
- package/src/drizzle/sqlite-emails.ts +1 -1
- package/src/drizzle/sqlite-password-prepared.ts +1 -1
- package/src/drizzle/sqlite-passwords.ts +1 -1
- package/src/drizzle/sqlite-proofs.ts +1 -1
- package/src/drizzle/sqlite-sessions.ts +1 -1
- package/src/drizzle/standalone-guard.ts +1 -1
- package/src/drizzle/totp-target.ts +1 -1
- package/src/drizzle/transaction-mysql.ts +1 -1
- package/src/index.ts +0 -24
- package/src/internal/drizzle-postgres.ts +1 -1
- package/src/internal/drizzle-sqlite.ts +1 -1
- package/dist/drizzle/mysql.d.mts +0 -69
- package/dist/drizzle/mysql.mjs +0 -218
- package/dist/drizzle/mysql.mjs.map +0 -1
- package/dist/drizzle/pg.d.mts +0 -80
- package/dist/drizzle/pg.mjs +0 -289
- package/dist/drizzle/pg.mjs.map +0 -1
- package/dist/drizzle/sqlite.d.mts +0 -77
- package/dist/drizzle/sqlite.mjs +0 -217
- package/dist/drizzle/sqlite.mjs.map +0 -1
- package/src/drizzle/mysql.ts +0 -687
- package/src/drizzle/pg.ts +0 -984
- package/src/drizzle/sqlite.ts +0 -705
package/README.md
CHANGED
|
@@ -8,10 +8,15 @@ Import mapping helpers from the root and a driver from its explicit module, such
|
|
|
8
8
|
as `/Postgres` or `/SqliteBun`. Install `drizzle-orm` and the corresponding Effect
|
|
9
9
|
SQL driver. Each driver exposes `AuthPersistence` and the lower-level factories.
|
|
10
10
|
|
|
11
|
+
Drizzle RC4 does not yet support the current stable Effect APIs required by Yielded
|
|
12
|
+
Auth. Bun consumers need the temporary
|
|
13
|
+
[@yielded/drizzle-effect-v4-patch](../drizzle-effect-v4-patch/README.md) until they
|
|
14
|
+
upgrade to a compatible upstream Drizzle release.
|
|
15
|
+
|
|
11
16
|
Applications own subjects, policy, claims, delivery, and database connections.
|
|
12
17
|
Drizzle Kit generates migrations from managed or application-declared tables.
|
|
13
18
|
Provide `AuthPersistence.migrationsLayer({ migrationsFolder })` explicitly to
|
|
14
19
|
apply those files before starting auth.
|
|
15
20
|
|
|
16
|
-
See the [adapter guide](../../docs/reference/adapters.md) for transaction ownership,
|
|
21
|
+
See the [adapter guide](../../docs/src/content/docs/reference/adapters.md) for transaction ownership,
|
|
17
22
|
runtime constraints, and runnable examples.
|
package/dist/D1.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D1GeneratedIdentityMapping } from "./drizzle/model.mjs";
|
|
2
2
|
import { OAuthD1Mapping } from "./drizzle/oauth-model.mjs";
|
|
3
3
|
import { OAuthConnectedMapping, OAuthConnectedRevocationMapping } from "./drizzle/oauth-connected-model.mjs";
|
|
4
4
|
import { OAuthCoordinatorError } from "./drizzle/oauth-target.mjs";
|
|
@@ -12,7 +12,6 @@ import { coordinateD1AuthenticationAuthority, coordinateD1PendingAuthentication,
|
|
|
12
12
|
import { coordinateD1ProofPersistence, makeD1ProofPersistenceServices } from "./drizzle/d1-proofs.mjs";
|
|
13
13
|
import { coordinateD1PasswordPersistence, coordinateD1PasswordRegistration, makeD1PasswordPersistenceServices, makeD1PasswordRegistrationServices } from "./drizzle/d1-passwords.mjs";
|
|
14
14
|
import { coordinateD1EmailAddress, coordinateD1EmailRegistration, makeD1EmailAddressServices, makeD1EmailRegistrationServices, makeD1EmailSignInServices } from "./drizzle/d1-emails.mjs";
|
|
15
|
-
import { makeSqliteAuthStoreServices, makeSqliteOAuthStateServices } from "./drizzle/sqlite.mjs";
|
|
16
15
|
import { coordinateD1PasswordPreparedPersistence, makeD1PasswordPreparedPersistenceServices } from "./drizzle/d1-password-prepared.mjs";
|
|
17
16
|
import { coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices } from "./drizzle/d1-passkey.mjs";
|
|
18
17
|
import { coordinatePhonePersistence, makePhonePersistenceServices } from "./drizzle/d1-phone.mjs";
|
|
@@ -24,24 +23,6 @@ import { D1Client } from "@effect/sql-d1/D1Client";
|
|
|
24
23
|
import { EffectSQLiteD1Database } from "drizzle-orm/effect-d1";
|
|
25
24
|
//#region src/D1.d.ts
|
|
26
25
|
export declare const commitMode: "batch";
|
|
27
|
-
export declare const makeAuthServices: <C extends AnySQLiteTable, R extends AnySQLiteTable, S extends AnySQLiteTable>(database: EffectSQLiteD1Database<AnyRelations>, mapping: AuthTables<C, R, S>) => {
|
|
28
|
-
readonly authStore: {
|
|
29
|
-
readonly issueChallenge: (input: import("@yielded/auth/Schema").NewChallenge) => Effect.Effect<void, import("@yielded/auth/AuthStore").IssueChallengeError>;
|
|
30
|
-
readonly consumeChallenge: (input: import("@yielded/auth/Schema").ConsumeChallenge) => Effect.Effect<import("@yielded/auth/Schema").VerifiedEmail, import("@yielded/auth/AuthStore").EmailOtpRejected | import("@yielded/auth/Errors").AuthStoreError>;
|
|
31
|
-
readonly issueRegistration: (input: import("@yielded/auth/Schema").NewRegistration) => Effect.Effect<void, import("@yielded/auth/Errors").AuthStoreError>;
|
|
32
|
-
readonly inspectRegistration: (tokenDigest: import("@yielded/auth/Schema").TokenDigest) => Effect.Effect<import("@yielded/auth/Schema").PendingRegistration, import("@yielded/auth/Errors").InvalidRegistration | import("@yielded/auth/Errors").AuthStoreError>;
|
|
33
|
-
readonly consumeRegistration: (input: import("@yielded/auth/Schema").ConsumeRegistration) => Effect.Effect<void, import("@yielded/auth/Errors").InvalidRegistration | import("@yielded/auth/Errors").AuthStoreError>;
|
|
34
|
-
};
|
|
35
|
-
readonly oauthStateStore: {
|
|
36
|
-
readonly issue: (state: import("@yielded/auth/OAuth").OAuthState) => Effect.Effect<void, import("@yielded/auth/Errors").AuthStoreError>;
|
|
37
|
-
readonly consume: (stateDigest: import("@yielded/auth/Schema").TokenDigest) => Effect.Effect<import("@yielded/auth/OAuth").OAuthState, import("@yielded/auth/OAuth").InvalidOAuthState | import("@yielded/auth/Errors").AuthStoreError>;
|
|
38
|
-
};
|
|
39
|
-
readonly decisions: {
|
|
40
|
-
readonly consumeChallenge: (input: import("@yielded/auth/Schema").ConsumeChallenge) => Effect.Effect<import("@yielded/auth/AuthStore").ChallengeConsumeDecision, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
41
|
-
readonly consumeRegistration: (input: import("@yielded/auth/Schema").ConsumeRegistration) => Effect.Effect<import("@yielded/auth/AuthStore").ConsumeDecision<void>, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
42
|
-
readonly consumeOAuthState: (digest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">) => Effect.Effect<import("@yielded/auth/AuthStore").ConsumeDecision<import("@yielded/auth/OAuth").OAuthState>, import("@yielded/auth/Errors").AuthStoreError, never>;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
26
|
export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(database: EffectSQLiteD1Database<AnyRelations> & {
|
|
46
27
|
readonly $client: D1Client;
|
|
47
28
|
}, mapping: D1GeneratedIdentityMapping<Subject, Identifier, External, Request, NativeId>) => {
|
|
@@ -78,6 +59,98 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
78
59
|
readonly $client: D1Client;
|
|
79
60
|
}, mapping: OAuthConnectedMapping<S, AC, T, O, F, G, C, H, UA, DC, N, J> & OAuthD1Mapping) => Effect.Effect<{
|
|
80
61
|
oauthConnectedPersistence: {
|
|
62
|
+
readonly claimSignIn: <A>(input: {
|
|
63
|
+
readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
|
|
64
|
+
readonly configuration: import("@yielded/auth/OAuth").OAuthConnectedConfiguration;
|
|
65
|
+
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthSignInAccessClaim, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
66
|
+
readonly inspectSignIn: (input: {
|
|
67
|
+
readonly reservation: import("@yielded/auth/OAuth").OAuthSignInAccessClaim;
|
|
68
|
+
readonly credential: import("@yielded/auth/OAuth").OAuthCredentialSnapshot;
|
|
69
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
70
|
+
}) => Effect.Effect<import("@yielded/auth/OAuth").OAuthSignInAccessInspection, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
71
|
+
readonly settleSignIn: <A>(input: {
|
|
72
|
+
readonly reservation: import("@yielded/auth/OAuth").OAuthSignInAccessClaim;
|
|
73
|
+
readonly outcome: import("@yielded/auth/OAuth").OAuthSignInAccessOutcome;
|
|
74
|
+
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
75
|
+
readonly _tag: "Rejected";
|
|
76
|
+
} | {
|
|
77
|
+
readonly _tag: "Cancelled";
|
|
78
|
+
} | {
|
|
79
|
+
readonly _tag: "Ambiguous";
|
|
80
|
+
} | {
|
|
81
|
+
readonly _tag: "Connected";
|
|
82
|
+
readonly grant: {
|
|
83
|
+
readonly context: {
|
|
84
|
+
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
85
|
+
readonly exchangeOrder: string;
|
|
86
|
+
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
87
|
+
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
88
|
+
readonly identity: {
|
|
89
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
90
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
91
|
+
readonly subject: string;
|
|
92
|
+
};
|
|
93
|
+
readonly configuration: {
|
|
94
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
95
|
+
readonly protocol: "oauth" | "oidc";
|
|
96
|
+
readonly configurationGeneration: number;
|
|
97
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
98
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
99
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
100
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
101
|
+
readonly profile: {
|
|
102
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
103
|
+
readonly generation: number;
|
|
104
|
+
readonly issuance: "active" | "retired";
|
|
105
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
106
|
+
readonly clientRegistrationId: string;
|
|
107
|
+
readonly scopes: readonly string[];
|
|
108
|
+
readonly resources: readonly string[];
|
|
109
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
110
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
111
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
112
|
+
readonly refreshAheadMillis: number;
|
|
113
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
114
|
+
readonly revocation: "cohort" | "unsupported";
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
118
|
+
readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
119
|
+
readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
120
|
+
readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
121
|
+
readonly metadata: {
|
|
122
|
+
readonly scopes: readonly string[];
|
|
123
|
+
readonly resources: readonly string[];
|
|
124
|
+
readonly accessExpiresAtMillis?: number | undefined;
|
|
125
|
+
readonly refreshExpiresAtMillis?: number | undefined;
|
|
126
|
+
readonly useUntilMillis: number;
|
|
127
|
+
readonly refreshUseUntilMillis?: number | undefined;
|
|
128
|
+
readonly obtainedAtMillis: number;
|
|
129
|
+
readonly profile?: {
|
|
130
|
+
readonly displayName?: string | undefined;
|
|
131
|
+
readonly handle?: string | undefined;
|
|
132
|
+
readonly avatarUrl?: string | undefined;
|
|
133
|
+
readonly profileUrl?: string | undefined;
|
|
134
|
+
readonly email?: string | undefined;
|
|
135
|
+
readonly emailVerified?: boolean | undefined;
|
|
136
|
+
readonly providerData?: {
|
|
137
|
+
readonly [x: string]: import("effect/Schema").Json;
|
|
138
|
+
} | undefined;
|
|
139
|
+
} | undefined;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
readonly sealed: {
|
|
143
|
+
readonly format: "oauth-connected-xchacha20poly1305-v1";
|
|
144
|
+
readonly keyId: string;
|
|
145
|
+
readonly nonce: string;
|
|
146
|
+
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
} | {
|
|
150
|
+
readonly _tag: "Conflict";
|
|
151
|
+
} | {
|
|
152
|
+
readonly _tag: "Busy";
|
|
153
|
+
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
81
154
|
readonly capture: (input: {
|
|
82
155
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
83
156
|
readonly subjectId: import("@yielded/auth/Schema").SubjectId;
|
|
@@ -106,6 +179,21 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
106
179
|
readonly generation: number;
|
|
107
180
|
readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
|
|
108
181
|
readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
|
|
182
|
+
readonly access?: {
|
|
183
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
184
|
+
readonly generation: number;
|
|
185
|
+
readonly issuance: "active" | "retired";
|
|
186
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
187
|
+
readonly clientRegistrationId: string;
|
|
188
|
+
readonly scopes: readonly string[];
|
|
189
|
+
readonly resources: readonly string[];
|
|
190
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
191
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
192
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
193
|
+
readonly refreshAheadMillis: number;
|
|
194
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
195
|
+
readonly revocation: "cohort" | "unsupported";
|
|
196
|
+
} | undefined;
|
|
109
197
|
readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
|
|
110
198
|
readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
111
199
|
readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
@@ -208,6 +296,21 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
208
296
|
readonly generation: number;
|
|
209
297
|
readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
|
|
210
298
|
readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
|
|
299
|
+
readonly access?: {
|
|
300
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
301
|
+
readonly generation: number;
|
|
302
|
+
readonly issuance: "active" | "retired";
|
|
303
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
304
|
+
readonly clientRegistrationId: string;
|
|
305
|
+
readonly scopes: readonly string[];
|
|
306
|
+
readonly resources: readonly string[];
|
|
307
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
308
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
309
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
310
|
+
readonly refreshAheadMillis: number;
|
|
311
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
312
|
+
readonly revocation: "cohort" | "unsupported";
|
|
313
|
+
} | undefined;
|
|
211
314
|
readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
|
|
212
315
|
readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
213
316
|
readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
@@ -300,14 +403,14 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
300
403
|
};
|
|
301
404
|
}) => Effect.Effect<{
|
|
302
405
|
readonly _tag: "Rejected";
|
|
406
|
+
} | {
|
|
407
|
+
readonly _tag: "Conflict";
|
|
303
408
|
} | {
|
|
304
409
|
readonly _tag: "Target";
|
|
305
410
|
readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
306
411
|
} | {
|
|
307
412
|
readonly _tag: "Quarantine";
|
|
308
413
|
readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
309
|
-
} | {
|
|
310
|
-
readonly _tag: "Conflict";
|
|
311
414
|
}, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
312
415
|
readonly settle: <A>(input: {
|
|
313
416
|
readonly claim: import("@yielded/auth/OAuth").OAuthConnectedClaim;
|
|
@@ -316,8 +419,6 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
316
419
|
readonly nowMillis: number;
|
|
317
420
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
318
421
|
readonly _tag: "Rejected";
|
|
319
|
-
} | {
|
|
320
|
-
readonly _tag: "Conflict";
|
|
321
422
|
} | {
|
|
322
423
|
readonly _tag: "Cancelled";
|
|
323
424
|
} | {
|
|
@@ -327,6 +428,7 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
327
428
|
readonly grant: {
|
|
328
429
|
readonly context: {
|
|
329
430
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
431
|
+
readonly exchangeOrder: string;
|
|
330
432
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
331
433
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
332
434
|
readonly identity: {
|
|
@@ -390,6 +492,8 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
390
492
|
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
391
493
|
};
|
|
392
494
|
};
|
|
495
|
+
} | {
|
|
496
|
+
readonly _tag: "Conflict";
|
|
393
497
|
} | {
|
|
394
498
|
readonly _tag: "Busy";
|
|
395
499
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
@@ -437,6 +541,7 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
437
541
|
readonly grant: {
|
|
438
542
|
readonly context: {
|
|
439
543
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
544
|
+
readonly exchangeOrder: string;
|
|
440
545
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
441
546
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
442
547
|
readonly identity: {
|
|
@@ -549,6 +654,7 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
549
654
|
readonly grant: {
|
|
550
655
|
readonly context: {
|
|
551
656
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
657
|
+
readonly exchangeOrder: string;
|
|
552
658
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
553
659
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
554
660
|
readonly identity: {
|
|
@@ -633,6 +739,7 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
633
739
|
readonly grant: {
|
|
634
740
|
readonly context: {
|
|
635
741
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
742
|
+
readonly exchangeOrder: string;
|
|
636
743
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
637
744
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
638
745
|
readonly identity: {
|
|
@@ -696,6 +803,7 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
696
803
|
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
697
804
|
};
|
|
698
805
|
};
|
|
806
|
+
readonly order: string;
|
|
699
807
|
readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
|
|
700
808
|
readonly claimedAtMillis: number;
|
|
701
809
|
readonly claimExpiresAtMillis: number;
|
|
@@ -715,6 +823,7 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
715
823
|
readonly grant: {
|
|
716
824
|
readonly context: {
|
|
717
825
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
826
|
+
readonly exchangeOrder: string;
|
|
718
827
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
719
828
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
720
829
|
readonly identity: {
|
|
@@ -835,6 +944,7 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
835
944
|
readonly jobId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
|
|
836
945
|
readonly token: {
|
|
837
946
|
readonly namespace: "effect-auth/oauth-connected-token-context/v1";
|
|
947
|
+
readonly exchangeOrder: string;
|
|
838
948
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
839
949
|
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
840
950
|
readonly identity: {
|
|
@@ -959,5 +1069,5 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
959
1069
|
readonly mapping: OAuthConnectedRevocationMapping<T, O, F, G, C, H, J, N> & OAuthD1Mapping;
|
|
960
1070
|
}, body: Effect.Effect<A, E, R>) => Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, D1BatchStatements | import("@yielded/auth/OAuth").OAuthConnectedRevocations>>;
|
|
961
1071
|
//#endregion
|
|
962
|
-
export { D1BatchStatements, coordinateD1AuthenticationAuthority as coordinateAuthenticationAuthority, coordinateD1EmailAddress as coordinateEmailAddress, coordinateD1EmailRegistration as coordinateEmailRegistration, coordinateD1OAuthAccounts as coordinateOAuthAccounts, coordinateD1OAuthRegistration as coordinateOAuthRegistration, coordinateD1OAuthRegistrationIntents as coordinateOAuthRegistrationIntents, coordinateD1OAuthSignIn as coordinateOAuthSignIn, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinateD1PasswordPersistence as coordinatePasswordPersistence, coordinateD1PasswordPreparedPersistence as coordinatePasswordPreparedPersistence, coordinateD1PasswordRegistration as coordinatePasswordRegistration, coordinateD1PendingAuthentication as coordinatePendingAuthentication, coordinatePhonePersistence, coordinateD1ProofPersistence as coordinateProofPersistence, coordinateD1SessionStepUp as coordinateSessionStepUp, coordinateD1SignedSessionValidity as coordinateSignedSessionValidity, coordinateD1StatefulSessions as coordinateStatefulSessions, coordinateTotpPersistence,
|
|
1072
|
+
export { D1BatchStatements, coordinateD1AuthenticationAuthority as coordinateAuthenticationAuthority, coordinateD1EmailAddress as coordinateEmailAddress, coordinateD1EmailRegistration as coordinateEmailRegistration, coordinateD1OAuthAccounts as coordinateOAuthAccounts, coordinateD1OAuthRegistration as coordinateOAuthRegistration, coordinateD1OAuthRegistrationIntents as coordinateOAuthRegistrationIntents, coordinateD1OAuthSignIn as coordinateOAuthSignIn, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinateD1PasswordPersistence as coordinatePasswordPersistence, coordinateD1PasswordPreparedPersistence as coordinatePasswordPreparedPersistence, coordinateD1PasswordRegistration as coordinatePasswordRegistration, coordinateD1PendingAuthentication as coordinatePendingAuthentication, coordinatePhonePersistence, coordinateD1ProofPersistence as coordinateProofPersistence, coordinateD1SessionStepUp as coordinateSessionStepUp, coordinateD1SignedSessionValidity as coordinateSignedSessionValidity, coordinateD1StatefulSessions as coordinateStatefulSessions, coordinateTotpPersistence, makeD1AuthenticationAuthorityServices as makeAuthenticationAuthorityServices, makeD1EmailAddressServices as makeEmailAddressServices, makeD1EmailRegistrationServices as makeEmailRegistrationServices, makeD1EmailSignInServices as makeEmailSignInServices, makeD1ExternalIdentityServices as makeExternalIdentityServices, makeD1OAuthAccountsServices as makeOAuthAccountsServices, makeD1OAuthRegistrationIntentServices as makeOAuthRegistrationIntentServices, makeD1OAuthRegistrationServices as makeOAuthRegistrationServices, makeD1OAuthSignInServices as makeOAuthSignInServices, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices, makeD1PasswordPersistenceServices as makePasswordPersistenceServices, makeD1PasswordPreparedPersistenceServices as makePasswordPreparedPersistenceServices, makeD1PasswordRegistrationServices as makePasswordRegistrationServices, makeD1PendingAuthenticationServices as makePendingAuthenticationServices, makePhonePersistenceServices, makeD1ProofPersistenceServices as makeProofPersistenceServices, makeD1SessionStepUpServices as makeSessionStepUpServices, makeD1SignedSessionValidityServices as makeSignedSessionValidityServices, makeD1StatefulSessionServices as makeStatefulSessionServices, makeD1SubjectProvisioningServices as makeSubjectProvisioningServices, makeTotpPersistenceServices, passwordPreparedPersistenceLayer };
|
|
963
1073
|
//# sourceMappingURL=D1.d.mts.map
|
package/dist/D1.mjs
CHANGED
|
@@ -7,7 +7,6 @@ import { coordinateD1AuthenticationAuthority, coordinateD1PendingAuthentication,
|
|
|
7
7
|
import { coordinateD1ProofPersistence, makeD1ProofPersistenceServices } from "./drizzle/d1-proofs.mjs";
|
|
8
8
|
import { coordinateD1PasswordPersistence, coordinateD1PasswordRegistration, makeD1PasswordPersistenceServices, makeD1PasswordRegistrationServices } from "./drizzle/d1-passwords.mjs";
|
|
9
9
|
import { coordinateD1EmailAddress, coordinateD1EmailRegistration, makeD1EmailAddressServices, makeD1EmailRegistrationServices, makeD1EmailSignInServices } from "./drizzle/d1-emails.mjs";
|
|
10
|
-
import { makeSqliteAuthServices, makeSqliteAuthStoreServices, makeSqliteOAuthStateServices } from "./drizzle/sqlite.mjs";
|
|
11
10
|
import { coordinateD1PasswordPreparedPersistence, makeD1PasswordPreparedPersistenceServices } from "./drizzle/d1-password-prepared.mjs";
|
|
12
11
|
import { makeD1OAuthConnectedTarget } from "./drizzle/oauth-connected-drivers.mjs";
|
|
13
12
|
import { coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices } from "./drizzle/d1-passkey.mjs";
|
|
@@ -15,7 +14,6 @@ import { coordinatePhonePersistence, makePhonePersistenceServices } from "./driz
|
|
|
15
14
|
import { Effect } from "effect";
|
|
16
15
|
//#region src/D1.ts
|
|
17
16
|
const commitMode = "batch";
|
|
18
|
-
const makeAuthServices = (database, mapping) => makeSqliteAuthServices(database, mapping);
|
|
19
17
|
const makeIdentityServices = (database, mapping) => makeD1IdentityServices(database, mapping);
|
|
20
18
|
const { makeOAuthConnectedServices, makeOAuthConnectedRevocationServices, coordinateOAuthConnected, coordinateOAuthConnectedRevocations } = makeD1OAuthConnectedTarget({
|
|
21
19
|
mode: "batch",
|
|
@@ -24,6 +22,6 @@ const { makeOAuthConnectedServices, makeOAuthConnectedRevocationServices, coordi
|
|
|
24
22
|
standaloneGuard: () => Effect.void
|
|
25
23
|
});
|
|
26
24
|
//#endregion
|
|
27
|
-
export { D1BatchStatements, commitMode, coordinateD1AuthenticationAuthority as coordinateAuthenticationAuthority, coordinateD1EmailAddress as coordinateEmailAddress, coordinateD1EmailRegistration as coordinateEmailRegistration, coordinateD1OAuthAccounts as coordinateOAuthAccounts, coordinateOAuthConnected, coordinateOAuthConnectedRevocations, coordinateD1OAuthRegistration as coordinateOAuthRegistration, coordinateD1OAuthRegistrationIntents as coordinateOAuthRegistrationIntents, coordinateD1OAuthSignIn as coordinateOAuthSignIn, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinateD1PasswordPersistence as coordinatePasswordPersistence, coordinateD1PasswordPreparedPersistence as coordinatePasswordPreparedPersistence, coordinateD1PasswordRegistration as coordinatePasswordRegistration, coordinateD1PendingAuthentication as coordinatePendingAuthentication, coordinatePhonePersistence, coordinateD1ProofPersistence as coordinateProofPersistence, coordinateD1SessionStepUp as coordinateSessionStepUp, coordinateD1SignedSessionValidity as coordinateSignedSessionValidity, coordinateD1StatefulSessions as coordinateStatefulSessions, coordinateTotpPersistence,
|
|
25
|
+
export { D1BatchStatements, commitMode, coordinateD1AuthenticationAuthority as coordinateAuthenticationAuthority, coordinateD1EmailAddress as coordinateEmailAddress, coordinateD1EmailRegistration as coordinateEmailRegistration, coordinateD1OAuthAccounts as coordinateOAuthAccounts, coordinateOAuthConnected, coordinateOAuthConnectedRevocations, coordinateD1OAuthRegistration as coordinateOAuthRegistration, coordinateD1OAuthRegistrationIntents as coordinateOAuthRegistrationIntents, coordinateD1OAuthSignIn as coordinateOAuthSignIn, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinateD1PasswordPersistence as coordinatePasswordPersistence, coordinateD1PasswordPreparedPersistence as coordinatePasswordPreparedPersistence, coordinateD1PasswordRegistration as coordinatePasswordRegistration, coordinateD1PendingAuthentication as coordinatePendingAuthentication, coordinatePhonePersistence, coordinateD1ProofPersistence as coordinateProofPersistence, coordinateD1SessionStepUp as coordinateSessionStepUp, coordinateD1SignedSessionValidity as coordinateSignedSessionValidity, coordinateD1StatefulSessions as coordinateStatefulSessions, coordinateTotpPersistence, makeD1AuthenticationAuthorityServices as makeAuthenticationAuthorityServices, makeD1EmailAddressServices as makeEmailAddressServices, makeD1EmailRegistrationServices as makeEmailRegistrationServices, makeD1EmailSignInServices as makeEmailSignInServices, makeD1ExternalIdentityServices as makeExternalIdentityServices, makeIdentityServices, makeD1OAuthAccountsServices as makeOAuthAccountsServices, makeOAuthConnectedRevocationServices, makeOAuthConnectedServices, makeD1OAuthRegistrationIntentServices as makeOAuthRegistrationIntentServices, makeD1OAuthRegistrationServices as makeOAuthRegistrationServices, makeD1OAuthSignInServices as makeOAuthSignInServices, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices, makeD1PasswordPersistenceServices as makePasswordPersistenceServices, makeD1PasswordPreparedPersistenceServices as makePasswordPreparedPersistenceServices, makeD1PasswordRegistrationServices as makePasswordRegistrationServices, makeD1PendingAuthenticationServices as makePendingAuthenticationServices, makePhonePersistenceServices, makeD1ProofPersistenceServices as makeProofPersistenceServices, makeD1SessionStepUpServices as makeSessionStepUpServices, makeD1SignedSessionValidityServices as makeSignedSessionValidityServices, makeD1StatefulSessionServices as makeStatefulSessionServices, makeD1SubjectProvisioningServices as makeSubjectProvisioningServices, makeTotpPersistenceServices, passwordPreparedPersistenceLayer };
|
|
28
26
|
|
|
29
27
|
//# sourceMappingURL=D1.mjs.map
|
package/dist/D1.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"D1.mjs","names":[],"sources":["../src/D1.ts"],"sourcesContent":["import type { D1Client } from \"@effect/sql-d1/D1Client\";\nexport { makeTotpPersistenceServices, coordinateTotpPersistence } from \"./drizzle/d1-totp\";\nimport type { AnyRelations } from \"drizzle-orm\";\nimport type { EffectSQLiteD1Database } from \"drizzle-orm/effect-d1\";\nimport type { AnySQLiteTable } from \"drizzle-orm/sqlite-core\";\n\nexport {\n makeD1OAuthAccountsServices as makeOAuthAccountsServices,\n makeD1OAuthSignInServices as makeOAuthSignInServices,\n makeD1OAuthRegistrationIntentServices as makeOAuthRegistrationIntentServices,\n makeD1OAuthRegistrationServices as makeOAuthRegistrationServices,\n coordinateD1OAuthRegistration as coordinateOAuthRegistration,\n coordinateD1OAuthSignIn as coordinateOAuthSignIn,\n coordinateD1OAuthRegistrationIntents as coordinateOAuthRegistrationIntents,\n coordinateD1OAuthAccounts as coordinateOAuthAccounts,\n} from \"./drizzle/d1-oauth\";\n\nimport {\n makeD1ExternalIdentityServices,\n makeD1IdentityServices,\n makeD1SubjectProvisioningServices,\n} from \"./drizzle/d1-identity\";\n\nexport {\n coordinateD1AuthenticationAuthority as coordinateAuthenticationAuthority,\n coordinateD1PendingAuthentication as coordinatePendingAuthentication,\n coordinateD1SignedSessionValidity as coordinateSignedSessionValidity,\n coordinateD1StatefulSessions as coordinateStatefulSessions,\n makeD1AuthenticationAuthorityServices as makeAuthenticationAuthorityServices,\n makeD1PendingAuthenticationServices as makePendingAuthenticationServices,\n makeD1SignedSessionValidityServices as makeSignedSessionValidityServices,\n makeD1StatefulSessionServices as makeStatefulSessionServices,\n} from \"./drizzle/d1-sessions\";\n\nexport {\n coordinateD1ProofPersistence as coordinateProofPersistence,\n makeD1ProofPersistenceServices as makeProofPersistenceServices,\n} from \"./drizzle/d1-proofs\";\n\nexport {\n coordinateD1PasswordPersistence as coordinatePasswordPersistence,\n coordinateD1PasswordRegistration as coordinatePasswordRegistration,\n makeD1PasswordPersistenceServices as makePasswordPersistenceServices,\n makeD1PasswordRegistrationServices as makePasswordRegistrationServices,\n} from \"./drizzle/d1-passwords\";\n\nexport {\n coordinateD1EmailAddress as coordinateEmailAddress,\n coordinateD1EmailRegistration as coordinateEmailRegistration,\n makeD1EmailAddressServices as makeEmailAddressServices,\n makeD1EmailRegistrationServices as makeEmailRegistrationServices,\n makeD1EmailSignInServices as makeEmailSignInServices,\n} from \"./drizzle/d1-emails\";\n\nimport { type
|
|
1
|
+
{"version":3,"file":"D1.mjs","names":[],"sources":["../src/D1.ts"],"sourcesContent":["import type { D1Client } from \"@effect/sql-d1/D1Client\";\nexport { makeTotpPersistenceServices, coordinateTotpPersistence } from \"./drizzle/d1-totp\";\nimport type { AnyRelations } from \"drizzle-orm\";\nimport type { EffectSQLiteD1Database } from \"drizzle-orm/effect-d1\";\nimport type { AnySQLiteTable } from \"drizzle-orm/sqlite-core\";\n\nexport {\n makeD1OAuthAccountsServices as makeOAuthAccountsServices,\n makeD1OAuthSignInServices as makeOAuthSignInServices,\n makeD1OAuthRegistrationIntentServices as makeOAuthRegistrationIntentServices,\n makeD1OAuthRegistrationServices as makeOAuthRegistrationServices,\n coordinateD1OAuthRegistration as coordinateOAuthRegistration,\n coordinateD1OAuthSignIn as coordinateOAuthSignIn,\n coordinateD1OAuthRegistrationIntents as coordinateOAuthRegistrationIntents,\n coordinateD1OAuthAccounts as coordinateOAuthAccounts,\n} from \"./drizzle/d1-oauth\";\n\nimport {\n makeD1ExternalIdentityServices,\n makeD1IdentityServices,\n makeD1SubjectProvisioningServices,\n} from \"./drizzle/d1-identity\";\n\nexport {\n coordinateD1AuthenticationAuthority as coordinateAuthenticationAuthority,\n coordinateD1PendingAuthentication as coordinatePendingAuthentication,\n coordinateD1SignedSessionValidity as coordinateSignedSessionValidity,\n coordinateD1StatefulSessions as coordinateStatefulSessions,\n makeD1AuthenticationAuthorityServices as makeAuthenticationAuthorityServices,\n makeD1PendingAuthenticationServices as makePendingAuthenticationServices,\n makeD1SignedSessionValidityServices as makeSignedSessionValidityServices,\n makeD1StatefulSessionServices as makeStatefulSessionServices,\n} from \"./drizzle/d1-sessions\";\n\nexport {\n coordinateD1ProofPersistence as coordinateProofPersistence,\n makeD1ProofPersistenceServices as makeProofPersistenceServices,\n} from \"./drizzle/d1-proofs\";\n\nexport {\n coordinateD1PasswordPersistence as coordinatePasswordPersistence,\n coordinateD1PasswordRegistration as coordinatePasswordRegistration,\n makeD1PasswordPersistenceServices as makePasswordPersistenceServices,\n makeD1PasswordRegistrationServices as makePasswordRegistrationServices,\n} from \"./drizzle/d1-passwords\";\n\nexport {\n coordinateD1EmailAddress as coordinateEmailAddress,\n coordinateD1EmailRegistration as coordinateEmailRegistration,\n makeD1EmailAddressServices as makeEmailAddressServices,\n makeD1EmailRegistrationServices as makeEmailRegistrationServices,\n makeD1EmailSignInServices as makeEmailSignInServices,\n} from \"./drizzle/d1-emails\";\n\nimport { type D1GeneratedIdentityMapping } from \"./drizzle/model\";\n\nexport {\n makeD1ExternalIdentityServices as makeExternalIdentityServices,\n makeD1SubjectProvisioningServices as makeSubjectProvisioningServices,\n};\n\nexport const commitMode = \"batch\" as const;\n\nexport const makeIdentityServices = <\n Subject extends AnySQLiteTable,\n Identifier extends AnySQLiteTable,\n External extends AnySQLiteTable,\n Request extends AnySQLiteTable,\n NativeId,\n>(\n database: EffectSQLiteD1Database<AnyRelations> & { readonly $client: D1Client },\n mapping: D1GeneratedIdentityMapping<Subject, Identifier, External, Request, NativeId>,\n) => makeD1IdentityServices(database, mapping);\n\nexport {\n makeD1SessionStepUpServices as makeSessionStepUpServices,\n coordinateD1SessionStepUp as coordinateSessionStepUp,\n} from \"./drizzle/d1-sessions\";\n\nexport {\n makeD1PasswordPreparedPersistenceServices as makePasswordPreparedPersistenceServices,\n coordinateD1PasswordPreparedPersistence as coordinatePasswordPreparedPersistence,\n} from \"./drizzle/d1-password-prepared\";\n\nexport { passwordPreparedPersistenceLayer } from \"./drizzle/password-prepared-target\";\n\nimport { Effect } from \"effect\";\n\nimport { makeD1OAuthConnectedTarget } from \"./drizzle/oauth-connected-drivers\";\nimport type { OAuthD1Mapping } from \"./drizzle/oauth-model\";\n\nconst connectedTarget = makeD1OAuthConnectedTarget<\n EffectSQLiteD1Database<AnyRelations> & { readonly $client: D1Client },\n AnySQLiteTable<{ dialect: \"sqlite\" }>,\n OAuthD1Mapping\n>({ mode: \"batch\", dialect: \"sqlite\", locking: false, standaloneGuard: () => Effect.void });\n\nexport const {\n makeOAuthConnectedServices,\n makeOAuthConnectedRevocationServices,\n coordinateOAuthConnected,\n coordinateOAuthConnectedRevocations,\n} = connectedTarget;\n\nexport {\n makePasskeyCredentialServices,\n makePasskeyPersistenceServices,\n makePasskeyEnrollmentContextServices,\n makePasskeyRegistrationCeremonyServices,\n coordinatePasskeyPersistence,\n coordinatePasskeyRegistrationCeremony,\n makePasskeyManagementServices,\n makePasskeyRegistrationServices,\n coordinatePasskeyManagement,\n coordinatePasskeyRegistration,\n} from \"./drizzle/d1-passkey\";\n\nexport { D1BatchStatements } from \"./drizzle/D1BatchStatements\";\n\nexport { makePhonePersistenceServices, coordinatePhonePersistence } from \"./drizzle/d1-phone\";\n"],"mappings":";;;;;;;;;;;;;;;AA6DA,MAAa,aAAa;AAE1B,MAAa,wBAOX,UACA,YACG,uBAAuB,UAAU,OAAO;AAyB7C,MAAa,EACX,4BACA,sCACA,0BACA,wCAVsB,2BAItB;CAAE,MAAM;CAAS,SAAS;CAAU,SAAS;CAAO,uBAAuB,OAAO;AAAK,CAOrF"}
|