@yielded/auth-persistence-drizzle 0.1.0-beta.14 → 0.1.0-beta.16
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 +141 -27
- package/dist/Mysql2.d.mts +124 -10
- package/dist/Pglite.d.mts +124 -10
- package/dist/Postgres.d.mts +129 -15
- package/dist/SqliteBun.d.mts +135 -21
- package/dist/SqliteDo.d.mts +135 -21
- package/dist/SqliteNode.d.mts +135 -21
- package/dist/SqliteWasm.d.mts +135 -21
- 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 +6 -6
- 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/D1.d.mts
CHANGED
|
@@ -25,12 +25,12 @@ export declare const makeSubjectProvisioningServices: <Subject extends AnySQLite
|
|
|
25
25
|
readonly subjectProvisioner: {
|
|
26
26
|
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>;
|
|
27
27
|
};
|
|
28
|
-
},
|
|
28
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
29
29
|
export declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(mapping: D1ExternalIdentityMapping<Subject, External, NativeId>) => Effect.Effect<{
|
|
30
30
|
readonly externalIdentityMutation: {
|
|
31
31
|
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>;
|
|
32
32
|
};
|
|
33
|
-
},
|
|
33
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
34
34
|
export declare const commitMode: "batch";
|
|
35
35
|
export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(mapping: D1GeneratedIdentityMapping<Subject, Identifier, External, Request, NativeId>) => Effect.Effect<{
|
|
36
36
|
subjectProvisioner: {
|
|
@@ -39,7 +39,7 @@ export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Iden
|
|
|
39
39
|
externalIdentityMutation: {
|
|
40
40
|
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>;
|
|
41
41
|
};
|
|
42
|
-
},
|
|
42
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
43
43
|
export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
44
44
|
dialect: "sqlite";
|
|
45
45
|
}>, AC extends AnySQLiteTable<{
|
|
@@ -78,10 +78,10 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
78
78
|
readonly outcome: import("@yielded/auth/OAuth").OAuthSignInAccessOutcome;
|
|
79
79
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
80
80
|
readonly _tag: "Rejected";
|
|
81
|
-
} | {
|
|
82
|
-
readonly _tag: "Cancelled";
|
|
83
81
|
} | {
|
|
84
82
|
readonly _tag: "Ambiguous";
|
|
83
|
+
} | {
|
|
84
|
+
readonly _tag: "Cancelled";
|
|
85
85
|
} | {
|
|
86
86
|
readonly _tag: "Connected";
|
|
87
87
|
readonly grant: {
|
|
@@ -277,6 +277,120 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
277
277
|
readonly retentionUntilMillis: number;
|
|
278
278
|
};
|
|
279
279
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
280
|
+
readonly prepare: <A>(input: {
|
|
281
|
+
readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
|
|
282
|
+
readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
|
|
283
|
+
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
284
|
+
readonly _tag: "Rejected";
|
|
285
|
+
} | {
|
|
286
|
+
readonly _tag: "Issued";
|
|
287
|
+
readonly flow: {
|
|
288
|
+
readonly context: {
|
|
289
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
290
|
+
readonly protocol: "oauth" | "oidc";
|
|
291
|
+
readonly configurationGeneration: number;
|
|
292
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
293
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
294
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
295
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
296
|
+
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
297
|
+
readonly generation: number;
|
|
298
|
+
readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
|
|
299
|
+
readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
|
|
300
|
+
readonly access?: {
|
|
301
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
302
|
+
readonly generation: number;
|
|
303
|
+
readonly issuance: "active" | "retired";
|
|
304
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
305
|
+
readonly clientRegistrationId: string;
|
|
306
|
+
readonly scopes: readonly string[];
|
|
307
|
+
readonly resources: readonly string[];
|
|
308
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
309
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
310
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
311
|
+
readonly refreshAheadMillis: number;
|
|
312
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
313
|
+
readonly revocation: "cohort" | "unsupported";
|
|
314
|
+
} | undefined;
|
|
315
|
+
readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
|
|
316
|
+
readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
317
|
+
readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
318
|
+
readonly requestBindingExpiresAtMillis: number;
|
|
319
|
+
readonly issuedAtMillis: number;
|
|
320
|
+
readonly expiresAtMillis: number;
|
|
321
|
+
readonly claimLifetimeMillis: number;
|
|
322
|
+
readonly namespace: "effect-auth/oauth-connected-context/v1";
|
|
323
|
+
readonly revision: {
|
|
324
|
+
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
325
|
+
readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
326
|
+
readonly credentials: readonly {
|
|
327
|
+
readonly credentialId: string;
|
|
328
|
+
readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
329
|
+
}[];
|
|
330
|
+
};
|
|
331
|
+
readonly profile: {
|
|
332
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
333
|
+
readonly generation: number;
|
|
334
|
+
readonly issuance: "active" | "retired";
|
|
335
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
336
|
+
readonly clientRegistrationId: string;
|
|
337
|
+
readonly scopes: readonly string[];
|
|
338
|
+
readonly resources: readonly string[];
|
|
339
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
340
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
341
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
342
|
+
readonly refreshAheadMillis: number;
|
|
343
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
344
|
+
readonly revocation: "cohort" | "unsupported";
|
|
345
|
+
};
|
|
346
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
347
|
+
readonly reconnect?: {
|
|
348
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
349
|
+
readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
350
|
+
readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
351
|
+
readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
352
|
+
readonly identity: {
|
|
353
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
354
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
355
|
+
readonly subject: string;
|
|
356
|
+
};
|
|
357
|
+
readonly configuration: {
|
|
358
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
359
|
+
readonly protocol: "oauth" | "oidc";
|
|
360
|
+
readonly configurationGeneration: number;
|
|
361
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
362
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
363
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
364
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
365
|
+
readonly profile: {
|
|
366
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
367
|
+
readonly generation: number;
|
|
368
|
+
readonly issuance: "active" | "retired";
|
|
369
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
370
|
+
readonly clientRegistrationId: string;
|
|
371
|
+
readonly scopes: readonly string[];
|
|
372
|
+
readonly resources: readonly string[];
|
|
373
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
374
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
375
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
376
|
+
readonly refreshAheadMillis: number;
|
|
377
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
378
|
+
readonly revocation: "cohort" | "unsupported";
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
} | undefined;
|
|
382
|
+
readonly maximumEvidenceAgeMillis: number;
|
|
383
|
+
};
|
|
384
|
+
readonly sealed: {
|
|
385
|
+
readonly format: "oauth-xchacha20poly1305-v1";
|
|
386
|
+
readonly keyId: string;
|
|
387
|
+
readonly nonce: string;
|
|
388
|
+
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
389
|
+
};
|
|
390
|
+
readonly retentionUntilMillis: number;
|
|
391
|
+
};
|
|
392
|
+
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
393
|
+
readonly inspectPrepared: (input: import("@yielded/auth/OAuth").OAuthConnectedPreparedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
280
394
|
readonly preflight: (input: import("@yielded/auth/OAuth").OAuthConnectedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
281
395
|
readonly claim: <A>(input: {
|
|
282
396
|
readonly access: import("@yielded/auth/OAuth").OAuthConnectedAccess;
|
|
@@ -424,10 +538,10 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
424
538
|
readonly nowMillis: number;
|
|
425
539
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
426
540
|
readonly _tag: "Rejected";
|
|
427
|
-
} | {
|
|
428
|
-
readonly _tag: "Cancelled";
|
|
429
541
|
} | {
|
|
430
542
|
readonly _tag: "Ambiguous";
|
|
543
|
+
} | {
|
|
544
|
+
readonly _tag: "Cancelled";
|
|
431
545
|
} | {
|
|
432
546
|
readonly _tag: "Connected";
|
|
433
547
|
readonly grant: {
|
|
@@ -918,7 +1032,7 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
918
1032
|
readonly hasMore: boolean;
|
|
919
1033
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
920
1034
|
};
|
|
921
|
-
},
|
|
1035
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnySQLiteTable<{
|
|
922
1036
|
dialect: "sqlite";
|
|
923
1037
|
}>, O extends AnySQLiteTable<{
|
|
924
1038
|
dialect: "sqlite";
|
|
@@ -1026,7 +1140,7 @@ export declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
|
|
|
1026
1140
|
readonly settled: boolean;
|
|
1027
1141
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1028
1142
|
};
|
|
1029
|
-
},
|
|
1143
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: <S extends AnySQLiteTable<{
|
|
1030
1144
|
dialect: "sqlite";
|
|
1031
1145
|
}>, AC extends AnySQLiteTable<{
|
|
1032
1146
|
dialect: "sqlite";
|
package/dist/Libsql.d.mts
CHANGED
|
@@ -77,16 +77,16 @@ export declare const coordinateEmailAddress: {
|
|
|
77
77
|
readonly hasMore: boolean;
|
|
78
78
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, EmailUnavailable>;
|
|
79
79
|
};
|
|
80
|
-
},
|
|
80
|
+
}, EmailUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(mapping: EmailRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>, proofMapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, any, import("drizzle-orm").SQL<unknown>>) => Effect.Effect<{
|
|
81
81
|
registrationAuthority: EmailRegistrationAuthority<Registration>;
|
|
82
|
-
},
|
|
82
|
+
}, EmailUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailSignInServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, NativeId>(mapping: EmailSignInMapping<S, I, C, NativeId>) => Effect.Effect<{
|
|
83
83
|
emailSignInTargets: {
|
|
84
84
|
readonly lookup: (input: {
|
|
85
85
|
readonly moduleId: string;
|
|
86
86
|
readonly identifier: import("@yielded/auth/Identity").LoginIdentifier;
|
|
87
87
|
}) => Effect.Effect<import("effect/Option").Option<import("@yielded/auth/Email").EmailCredentialSnapshot>, EmailUnavailable>;
|
|
88
88
|
};
|
|
89
|
-
},
|
|
89
|
+
}, EmailUnavailable, Database>;
|
|
90
90
|
export declare const coordinatePasswordPersistence: {
|
|
91
91
|
<Database extends EffectLibsqlDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId, PM extends ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any> | undefined, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
92
92
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasswordPersistenceMapping<DrizzleTableModel<S>, DrizzleTableModel<I>, DrizzleTableModel<C>, DrizzleTableModel<AC>, DrizzleTableModel<A>, DrizzleTableModel<RS>, DrizzleTableModel<CE>, DrizzleTableModel<M>, NativeId, import("drizzle-orm").SQL<unknown>>;
|
|
@@ -151,9 +151,9 @@ export declare const coordinatePasswordPersistence: {
|
|
|
151
151
|
readonly hasMore: boolean;
|
|
152
152
|
}, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, PasswordUnavailable>;
|
|
153
153
|
};
|
|
154
|
-
},
|
|
154
|
+
}, PasswordUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makePasswordRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(mapping: PasswordRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>) => Effect.Effect<{
|
|
155
155
|
registrationAuthority: import("@yielded/auth-persistence/Adapter").PasswordRegistrationAuthority<Registration>;
|
|
156
|
-
},
|
|
156
|
+
}, PasswordUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
157
157
|
export declare const coordinateProofPersistence: {
|
|
158
158
|
<Database extends EffectLibsqlDatabase<import("drizzle-orm").TablesRelationalConfig>, Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, Aev extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
159
159
|
readonly mapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<Rq>, DrizzleTableModel<S>, DrizzleTableModel<G>, DrizzleTableModel<Cn>, DrizzleTableModel<Rs>, DrizzleTableModel<Aev>, DrizzleTableModel<F>, DrizzleTableModel<C>, DrizzleTableModel<Sub>, DrizzleTableModel<I>, DrizzleTableModel<Cr>, NativeId, import("drizzle-orm").SQL<unknown>>;
|
|
@@ -213,7 +213,7 @@ export declare const coordinateProofPersistence: {
|
|
|
213
213
|
readonly limit: number;
|
|
214
214
|
}, prepare: import("@yielded/auth/Proofs").PrepareProofCommit<import("@yielded/auth/Proofs").ProofCleanupResult, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, ProofUnavailable>;
|
|
215
215
|
};
|
|
216
|
-
},
|
|
216
|
+
}, ProofUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
217
217
|
export declare const coordinateAuthenticationAuthority: {
|
|
218
218
|
<Database extends EffectLibsqlDatabase<import("drizzle-orm").TablesRelationalConfig>, Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
219
219
|
readonly mapping: AuthenticationAuthorityMapping<Claims, S, C, F, P, NativeId>;
|
|
@@ -270,11 +270,11 @@ export declare const coordinateAuthenticationAuthority: {
|
|
|
270
270
|
readonly pending?: import("@yielded/auth/Sessions").PendingConsumption;
|
|
271
271
|
}, prepare: import("@yielded/auth/Sessions").PrepareSessionCommit<void, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Sessions").StaleAuthentication | import("@yielded/auth/Sessions").PendingAuthenticationInvalid | SessionUnavailable>;
|
|
272
272
|
};
|
|
273
|
-
},
|
|
273
|
+
}, SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makePendingAuthenticationServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, P extends AnySQLiteTable, F extends AnySQLiteTable, NativeId>(mapping: PendingAuthenticationMapping<Claims, S, C, P, F, NativeId>) => Effect.Effect<{
|
|
274
274
|
pendingAuthentication: import("@yielded/auth/Sessions").PendingAuthentication<Claims>;
|
|
275
|
-
},
|
|
275
|
+
}, SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeSessionStepUpServices: <Claims, Id, S extends AnySQLiteTable, C extends AnySQLiteTable, I extends AnySQLiteTable, Session extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>, target: Context.Service<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>) => Effect.Effect<{
|
|
276
276
|
sessionStepUpPersistence: import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>;
|
|
277
|
-
},
|
|
277
|
+
}, SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateSessionStepUp: {
|
|
278
278
|
<Database extends EffectLibsqlDatabase<import("drizzle-orm").TablesRelationalConfig>, Claims, Id, S extends AnySQLiteTable, C extends AnySQLiteTable, I extends AnySQLiteTable, Session extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
279
279
|
readonly mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>;
|
|
280
280
|
readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>;
|
|
@@ -287,10 +287,10 @@ export declare const coordinateAuthenticationAuthority: {
|
|
|
287
287
|
}, body: Effect.Effect<A, E, R>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<R, Id | TxId>>;
|
|
288
288
|
}, makeSignedSessionValidityServices: <S extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: SignedSessionValidityMapping<S, T, NativeId, NativeSessionId>) => Effect.Effect<{
|
|
289
289
|
signedSessionValidity: import("@yielded/auth/Sessions").SignedSessionValidity;
|
|
290
|
-
},
|
|
290
|
+
}, SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeStatefulSessionServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, Session extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: StatefulSessionMapping<Claims, S, C, Session, F, P, NativeId, NativeSessionId>) => Effect.Effect<{
|
|
291
291
|
readonly statefulSessionPersistence: import("@yielded/auth/Sessions").StatefulSessionPersistence<Claims>;
|
|
292
292
|
readonly sessionRepository: import("@yielded/auth/Sessions").SessionRepository;
|
|
293
|
-
},
|
|
293
|
+
}, SessionUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
294
294
|
export declare const commitMode: "interactive";
|
|
295
295
|
export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => Effect.Effect<{
|
|
296
296
|
subjectProvisioner: {
|
|
@@ -299,20 +299,20 @@ export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Iden
|
|
|
299
299
|
externalIdentityMutation: {
|
|
300
300
|
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>;
|
|
301
301
|
};
|
|
302
|
-
},
|
|
302
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
303
303
|
export declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => Effect.Effect<{
|
|
304
304
|
readonly subjectProvisioner: {
|
|
305
305
|
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>;
|
|
306
306
|
};
|
|
307
|
-
},
|
|
307
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
308
308
|
export declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(mapping: ExternalIdentityTables<Subject, External, NativeId>) => Effect.Effect<{
|
|
309
309
|
readonly externalIdentityMutation: {
|
|
310
310
|
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>;
|
|
311
311
|
};
|
|
312
|
-
},
|
|
312
|
+
}, import("@yielded/auth/Identity").IdentityUnavailable, Database>;
|
|
313
313
|
export declare const makePasswordPreparedPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable = AnySQLiteTable, PC extends AnySQLiteTable = AnySQLiteTable, PM extends AnySQLiteTable = AnySQLiteTable, PSub extends AnySQLiteTable = AnySQLiteTable, PI extends AnySQLiteTable = AnySQLiteTable, PCr extends AnySQLiteTable = AnySQLiteTable, PNativeId = unknown>(mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>, proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined) => Effect.Effect<{
|
|
314
314
|
passwordPreparedPersistence: import("@yielded/auth/Password").PasswordPreparedPersistence;
|
|
315
|
-
},
|
|
315
|
+
}, PasswordUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinatePasswordPreparedPersistence: {
|
|
316
316
|
<Database extends EffectLibsqlDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable, PC extends AnySQLiteTable, PM extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
317
317
|
readonly mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>;
|
|
318
318
|
readonly proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined;
|
|
@@ -486,10 +486,10 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
486
486
|
readonly nowMillis: number;
|
|
487
487
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
488
488
|
readonly _tag: "Rejected";
|
|
489
|
-
} | {
|
|
490
|
-
readonly _tag: "Cancelled";
|
|
491
489
|
} | {
|
|
492
490
|
readonly _tag: "Ambiguous";
|
|
491
|
+
} | {
|
|
492
|
+
readonly _tag: "Cancelled";
|
|
493
493
|
} | {
|
|
494
494
|
readonly _tag: "Conflict";
|
|
495
495
|
} | {
|
|
@@ -590,7 +590,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
590
590
|
readonly hasMore: boolean;
|
|
591
591
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
592
592
|
};
|
|
593
|
-
},
|
|
593
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthSignInServices: <S extends AnySQLiteTable<{
|
|
594
594
|
dialect: "sqlite";
|
|
595
595
|
}>, O extends AnySQLiteTable<{
|
|
596
596
|
dialect: "sqlite";
|
|
@@ -632,7 +632,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
632
632
|
readonly hasMore: boolean;
|
|
633
633
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
634
634
|
};
|
|
635
|
-
},
|
|
635
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationIntentServices: <S extends AnySQLiteTable<{
|
|
636
636
|
dialect: "sqlite";
|
|
637
637
|
}>, O extends AnySQLiteTable<{
|
|
638
638
|
dialect: "sqlite";
|
|
@@ -655,7 +655,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
655
655
|
readonly nowMillis: number;
|
|
656
656
|
}, 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>;
|
|
657
657
|
};
|
|
658
|
-
},
|
|
658
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationServices: <Registration, S extends AnySQLiteTable<{
|
|
659
659
|
dialect: "sqlite";
|
|
660
660
|
}>, O extends AnySQLiteTable<{
|
|
661
661
|
dialect: "sqlite";
|
|
@@ -671,7 +671,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
671
671
|
dialect: "sqlite";
|
|
672
672
|
}>, N>(mapping: OAuthRegistrationMapping<Registration, S, O, C, AC, TA, I, R, N>) => Effect.Effect<{
|
|
673
673
|
registrationAuthority: OAuthRegistrationAuthority<Registration>;
|
|
674
|
-
},
|
|
674
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthRegistration: {
|
|
675
675
|
<Database extends EffectLibsqlDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnySQLiteTable<{
|
|
676
676
|
dialect: "sqlite";
|
|
677
677
|
}>, O extends AnySQLiteTable<{
|
|
@@ -859,10 +859,10 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
859
859
|
readonly outcome: import("@yielded/auth/OAuth").OAuthSignInAccessOutcome;
|
|
860
860
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
861
861
|
readonly _tag: "Rejected";
|
|
862
|
-
} | {
|
|
863
|
-
readonly _tag: "Cancelled";
|
|
864
862
|
} | {
|
|
865
863
|
readonly _tag: "Ambiguous";
|
|
864
|
+
} | {
|
|
865
|
+
readonly _tag: "Cancelled";
|
|
866
866
|
} | {
|
|
867
867
|
readonly _tag: "Connected";
|
|
868
868
|
readonly grant: {
|
|
@@ -1058,6 +1058,120 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1058
1058
|
readonly retentionUntilMillis: number;
|
|
1059
1059
|
};
|
|
1060
1060
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1061
|
+
readonly prepare: <A>(input: {
|
|
1062
|
+
readonly flow: import("@yielded/auth/OAuth").OAuthConnectedPendingFlow;
|
|
1063
|
+
readonly authorization: import("@yielded/auth/OAuth").OAuthConnectedUseAuthorization;
|
|
1064
|
+
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1065
|
+
readonly _tag: "Rejected";
|
|
1066
|
+
} | {
|
|
1067
|
+
readonly _tag: "Issued";
|
|
1068
|
+
readonly flow: {
|
|
1069
|
+
readonly context: {
|
|
1070
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1071
|
+
readonly protocol: "oauth" | "oidc";
|
|
1072
|
+
readonly configurationGeneration: number;
|
|
1073
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
1074
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
1075
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
1076
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
1077
|
+
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
1078
|
+
readonly generation: number;
|
|
1079
|
+
readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
|
|
1080
|
+
readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
|
|
1081
|
+
readonly access?: {
|
|
1082
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
1083
|
+
readonly generation: number;
|
|
1084
|
+
readonly issuance: "active" | "retired";
|
|
1085
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1086
|
+
readonly clientRegistrationId: string;
|
|
1087
|
+
readonly scopes: readonly string[];
|
|
1088
|
+
readonly resources: readonly string[];
|
|
1089
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
1090
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
1091
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
1092
|
+
readonly refreshAheadMillis: number;
|
|
1093
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
1094
|
+
readonly revocation: "cohort" | "unsupported";
|
|
1095
|
+
} | undefined;
|
|
1096
|
+
readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
|
|
1097
|
+
readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
1098
|
+
readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
|
|
1099
|
+
readonly requestBindingExpiresAtMillis: number;
|
|
1100
|
+
readonly issuedAtMillis: number;
|
|
1101
|
+
readonly expiresAtMillis: number;
|
|
1102
|
+
readonly claimLifetimeMillis: number;
|
|
1103
|
+
readonly namespace: "effect-auth/oauth-connected-context/v1";
|
|
1104
|
+
readonly revision: {
|
|
1105
|
+
readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
|
|
1106
|
+
readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1107
|
+
readonly credentials: readonly {
|
|
1108
|
+
readonly credentialId: string;
|
|
1109
|
+
readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1110
|
+
}[];
|
|
1111
|
+
};
|
|
1112
|
+
readonly profile: {
|
|
1113
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
1114
|
+
readonly generation: number;
|
|
1115
|
+
readonly issuance: "active" | "retired";
|
|
1116
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1117
|
+
readonly clientRegistrationId: string;
|
|
1118
|
+
readonly scopes: readonly string[];
|
|
1119
|
+
readonly resources: readonly string[];
|
|
1120
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
1121
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
1122
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
1123
|
+
readonly refreshAheadMillis: number;
|
|
1124
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
1125
|
+
readonly revocation: "cohort" | "unsupported";
|
|
1126
|
+
};
|
|
1127
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
1128
|
+
readonly reconnect?: {
|
|
1129
|
+
readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
|
|
1130
|
+
readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1131
|
+
readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1132
|
+
readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
|
|
1133
|
+
readonly identity: {
|
|
1134
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1135
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
1136
|
+
readonly subject: string;
|
|
1137
|
+
};
|
|
1138
|
+
readonly configuration: {
|
|
1139
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1140
|
+
readonly protocol: "oauth" | "oidc";
|
|
1141
|
+
readonly configurationGeneration: number;
|
|
1142
|
+
readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
|
|
1143
|
+
readonly responseIssuerMode: "required" | "unsupported";
|
|
1144
|
+
readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
|
|
1145
|
+
readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
|
|
1146
|
+
readonly profile: {
|
|
1147
|
+
readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
|
|
1148
|
+
readonly generation: number;
|
|
1149
|
+
readonly issuance: "active" | "retired";
|
|
1150
|
+
readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
|
|
1151
|
+
readonly clientRegistrationId: string;
|
|
1152
|
+
readonly scopes: readonly string[];
|
|
1153
|
+
readonly resources: readonly string[];
|
|
1154
|
+
readonly retention: "access-and-refresh" | "access-only";
|
|
1155
|
+
readonly maximumAccessLifetimeMillis: number;
|
|
1156
|
+
readonly maximumRefreshLifetimeMillis?: number | undefined;
|
|
1157
|
+
readonly refreshAheadMillis: number;
|
|
1158
|
+
readonly refresh: "confidential" | "rotating" | "unsupported";
|
|
1159
|
+
readonly revocation: "cohort" | "unsupported";
|
|
1160
|
+
};
|
|
1161
|
+
};
|
|
1162
|
+
} | undefined;
|
|
1163
|
+
readonly maximumEvidenceAgeMillis: number;
|
|
1164
|
+
};
|
|
1165
|
+
readonly sealed: {
|
|
1166
|
+
readonly format: "oauth-xchacha20poly1305-v1";
|
|
1167
|
+
readonly keyId: string;
|
|
1168
|
+
readonly nonce: string;
|
|
1169
|
+
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
1170
|
+
};
|
|
1171
|
+
readonly retentionUntilMillis: number;
|
|
1172
|
+
};
|
|
1173
|
+
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1174
|
+
readonly inspectPrepared: (input: import("@yielded/auth/OAuth").OAuthConnectedPreparedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1061
1175
|
readonly preflight: (input: import("@yielded/auth/OAuth").OAuthConnectedAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthConnectedPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1062
1176
|
readonly claim: <A>(input: {
|
|
1063
1177
|
readonly access: import("@yielded/auth/OAuth").OAuthConnectedAccess;
|
|
@@ -1205,10 +1319,10 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1205
1319
|
readonly nowMillis: number;
|
|
1206
1320
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
1207
1321
|
readonly _tag: "Rejected";
|
|
1208
|
-
} | {
|
|
1209
|
-
readonly _tag: "Cancelled";
|
|
1210
1322
|
} | {
|
|
1211
1323
|
readonly _tag: "Ambiguous";
|
|
1324
|
+
} | {
|
|
1325
|
+
readonly _tag: "Cancelled";
|
|
1212
1326
|
} | {
|
|
1213
1327
|
readonly _tag: "Connected";
|
|
1214
1328
|
readonly grant: {
|
|
@@ -1699,7 +1813,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1699
1813
|
readonly hasMore: boolean;
|
|
1700
1814
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1701
1815
|
};
|
|
1702
|
-
},
|
|
1816
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnySQLiteTable<{
|
|
1703
1817
|
dialect: "sqlite";
|
|
1704
1818
|
}>, O extends AnySQLiteTable<{
|
|
1705
1819
|
dialect: "sqlite";
|
|
@@ -1807,7 +1921,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1807
1921
|
readonly settled: boolean;
|
|
1808
1922
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1809
1923
|
};
|
|
1810
|
-
},
|
|
1924
|
+
}, import("@yielded/auth/OAuth").OAuthUnavailable, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
|
|
1811
1925
|
<D extends EffectLibsqlDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1812
1926
|
dialect: "sqlite";
|
|
1813
1927
|
}>, AC extends AnySQLiteTable<{
|