@yielded/auth-persistence 0.1.0-beta.8 → 0.1.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +4 -0
  2. package/dist/DrizzleD1.d.mts +7 -7
  3. package/dist/DrizzleLibsql.d.mts +31 -31
  4. package/dist/DrizzleLibsql.mjs +7 -22
  5. package/dist/DrizzleLibsql.mjs.map +1 -1
  6. package/dist/DrizzleMysql2.d.mts +8 -8
  7. package/dist/DrizzlePglite.d.mts +15 -15
  8. package/dist/DrizzlePostgres.d.mts +13 -13
  9. package/dist/DrizzleSqliteBun.d.mts +24 -24
  10. package/dist/DrizzleSqliteDo.d.mts +29 -29
  11. package/dist/DrizzleSqliteNode.d.mts +22 -22
  12. package/dist/DrizzleSqliteWasm.d.mts +24 -24
  13. package/dist/_virtual/_rolldown/runtime.mjs +13 -0
  14. package/dist/drizzle/D1BatchStatements.d.mts +1 -2
  15. package/dist/drizzle/SuppliedService.d.mts +1 -2
  16. package/dist/drizzle/d1-emails.d.mts +5 -6
  17. package/dist/drizzle/d1-identity.d.mts +2 -3
  18. package/dist/drizzle/d1-oauth.d.mts +10 -11
  19. package/dist/drizzle/d1-passkey.d.mts +5 -6
  20. package/dist/drizzle/d1-password-prepared.d.mts +2 -3
  21. package/dist/drizzle/d1-passwords.d.mts +4 -5
  22. package/dist/drizzle/d1-phone.d.mts +2 -3
  23. package/dist/drizzle/d1-planning.d.mts +1 -2
  24. package/dist/drizzle/d1-proofs.d.mts +2 -3
  25. package/dist/drizzle/d1-sessions.d.mts +10 -11
  26. package/dist/drizzle/d1-totp.d.mts +2 -3
  27. package/dist/drizzle/email-model.d.mts +30 -31
  28. package/dist/drizzle/email-registration.d.mts +1 -2
  29. package/dist/drizzle/email-target.d.mts +3 -4
  30. package/dist/drizzle/model.d.mts +41 -41
  31. package/dist/drizzle/model.mjs +3 -5
  32. package/dist/drizzle/model.mjs.map +1 -1
  33. package/dist/drizzle/mysql-emails.d.mts +7 -8
  34. package/dist/drizzle/mysql-identity.d.mts +2 -3
  35. package/dist/drizzle/mysql-password-prepared.d.mts +3 -4
  36. package/dist/drizzle/mysql-passwords.d.mts +6 -7
  37. package/dist/drizzle/mysql-proofs.d.mts +3 -4
  38. package/dist/drizzle/mysql-sessions.d.mts +15 -16
  39. package/dist/drizzle/mysql.d.mts +8 -9
  40. package/dist/drizzle/oauth-connected-model.d.mts +21 -22
  41. package/dist/drizzle/oauth-connected-reference.d.mts +1 -2
  42. package/dist/drizzle/oauth-connected-state.d.mts +1950 -7
  43. package/dist/drizzle/oauth-connected-target.d.mts +7 -8
  44. package/dist/drizzle/oauth-flow.d.mts +22 -2
  45. package/dist/drizzle/oauth-model.d.mts +45 -46
  46. package/dist/drizzle/oauth-owner.d.mts +10 -2
  47. package/dist/drizzle/oauth-target.d.mts +9 -10
  48. package/dist/drizzle/passkey-model.d.mts +34 -35
  49. package/dist/drizzle/passkey-registration-ceremony-model.d.mts +5 -6
  50. package/dist/drizzle/passkey-write-model.d.mts +13 -14
  51. package/dist/drizzle/password-model.d.mts +29 -30
  52. package/dist/drizzle/password-prepared-model.d.mts +10 -11
  53. package/dist/drizzle/password-prepared-target.d.mts +1 -2
  54. package/dist/drizzle/password-registration.d.mts +1 -2
  55. package/dist/drizzle/password-target.d.mts +2 -3
  56. package/dist/drizzle/pg-emails.d.mts +7 -8
  57. package/dist/drizzle/pg-password-prepared.d.mts +3 -4
  58. package/dist/drizzle/pg-passwords.d.mts +6 -7
  59. package/dist/drizzle/pg-proofs.d.mts +3 -4
  60. package/dist/drizzle/pg-sessions.d.mts +15 -16
  61. package/dist/drizzle/pg.d.mts +10 -11
  62. package/dist/drizzle/phone-model.d.mts +9 -10
  63. package/dist/drizzle/phone-target.d.mts +1 -2
  64. package/dist/drizzle/proof-model.d.mts +25 -26
  65. package/dist/drizzle/proof-target.d.mts +1 -2
  66. package/dist/drizzle/session-model.d.mts +25 -26
  67. package/dist/drizzle/session-target.d.mts +4 -5
  68. package/dist/drizzle/sqlite.d.mts +8 -9
  69. package/dist/drizzle/standalone-guard.mjs +3 -5
  70. package/dist/drizzle/standalone-guard.mjs.map +1 -1
  71. package/dist/drizzle/step-up-model.d.mts +6 -7
  72. package/dist/drizzle/totp-model.d.mts +7 -8
  73. package/dist/drizzle/totp-state.d.mts +2 -3
  74. package/dist/drizzle/totp-target.d.mts +1 -2
  75. package/dist/drizzle/transaction-mysql.mjs +1 -0
  76. package/dist/drizzle/transaction-mysql.mjs.map +1 -1
  77. package/dist/drizzle/transaction-owner.d.mts +3 -2
  78. package/dist/index.d.mts +2 -1
  79. package/dist/index.mjs +2 -1
  80. package/dist/internal/configuration.d.mts +19 -19
  81. package/dist/internal/mapping-error.d.mts +2 -3
  82. package/dist/internal/oauth-app.d.mts +1 -2
  83. package/dist/internal/oauth-app.mjs +3 -4
  84. package/dist/internal/oauth-app.mjs.map +1 -1
  85. package/dist/internal/oauth-server.d.mts +10 -0
  86. package/dist/internal/oauth-server.mjs +66 -0
  87. package/dist/internal/oauth-server.mjs.map +1 -0
  88. package/dist/internal/passkey/target.d.mts +2 -3
  89. package/dist/internal/passkeys.mjs +2 -1
  90. package/dist/internal/passkeys.mjs.map +1 -1
  91. package/dist/internal/persistence.mjs +3 -2
  92. package/dist/internal/persistence.mjs.map +1 -1
  93. package/dist/internal/sql-persistence.d.mts +1 -2
  94. package/dist/internal/sql-table.d.mts +6 -7
  95. package/dist/internal/sql-table.mjs +12 -2
  96. package/dist/internal/sql-table.mjs.map +1 -1
  97. package/dist/internal/standalone.mjs +13 -0
  98. package/dist/internal/standalone.mjs.map +1 -0
  99. package/dist/internal/storage-tables.d.mts +5 -6
  100. package/dist/internal/transaction-execution-kernel.d.mts +2 -3
  101. package/dist/internal/transaction-execution-kernel.mjs +3 -5
  102. package/dist/internal/transaction-execution-kernel.mjs.map +1 -1
  103. package/dist/internal/transaction-kernel.d.mts +49 -2
  104. package/package.json +1 -1
  105. package/src/DrizzleLibsql.ts +10 -54
  106. package/src/drizzle/model.ts +8 -10
  107. package/src/drizzle/standalone-guard.ts +4 -9
  108. package/src/drizzle/transaction-mysql.ts +2 -0
  109. package/src/index.ts +1 -0
  110. package/src/internal/oauth-app.ts +4 -5
  111. package/src/internal/oauth-server.ts +89 -0
  112. package/src/internal/passkeys.ts +2 -6
  113. package/src/internal/persistence.ts +3 -5
  114. package/src/internal/sql-table.ts +17 -2
  115. package/src/internal/standalone.ts +30 -0
  116. package/src/internal/transaction-execution-kernel.ts +3 -7
@@ -7,10 +7,10 @@ import { PasswordPreparedReady, PasswordPreparedReservation, PasswordPreparedVer
7
7
  import { InferInsertModel, InferSelectModel, SQL, Table } from "drizzle-orm";
8
8
  //#region src/drizzle/password-prepared-model.d.ts
9
9
  type ColumnKey<T extends Table> = Extract<keyof T["_"]["columns"], string>;
10
- type PasswordPreparedState = "Preparing" | "Ready" | "Consumed" | "Cancelled" | "Expired";
10
+ export type PasswordPreparedState = "Preparing" | "Ready" | "Consumed" | "Cancelled" | "Expired";
11
11
  /** The retained intent is also its nonrefundable admission charge. Scalar identity,
12
12
  * scope and timing columns survive sensitive snapshot/digest erasure. */
13
- interface PasswordPreparedIntentTable<Intent extends Table, NativeSubjectId> {
13
+ export interface PasswordPreparedIntentTable<Intent extends Table, NativeSubjectId> {
14
14
  readonly table: Intent;
15
15
  readonly moduleId: ColumnKey<Intent>;
16
16
  readonly intentId: ColumnKey<Intent>;
@@ -49,7 +49,7 @@ interface PasswordPreparedIntentTable<Intent extends Table, NativeSubjectId> {
49
49
  /** One permanent row per configured module; never one row per attacker input.
50
50
  * Native owners lock this before subject → identifier → sorted credentials → intent.
51
51
  * It serializes admission and maintenance without process-local locks. */
52
- interface PasswordPreparedAdmissionTable<Admission extends Table> {
52
+ export interface PasswordPreparedAdmissionTable<Admission extends Table> {
53
53
  readonly table: Admission;
54
54
  readonly moduleId: ColumnKey<Admission>;
55
55
  readonly intentId: ColumnKey<Admission>;
@@ -57,14 +57,14 @@ interface PasswordPreparedAdmissionTable<Admission extends Table> {
57
57
  readonly admissionRetainUntil: ColumnKey<Admission>;
58
58
  readonly encodeInsert: (moduleId: string) => InferInsertModel<Admission>;
59
59
  }
60
- declare const requiredPasswordPreparedConstraints: {
60
+ export declare const requiredPasswordPreparedConstraints: {
61
61
  readonly admission: "unique(admission.moduleId)";
62
62
  readonly intent: "unique(intent.moduleId,intent.intentId)";
63
63
  readonly command: "unique(intent.moduleId,intent.commandId)";
64
64
  readonly digest: "unique(intent.digest)";
65
65
  };
66
- type RequiredPasswordPreparedConstraints = typeof requiredPasswordPreparedConstraints;
67
- interface PasswordPreparedPersistenceMapping<Subject extends Table, Identifier extends Table, Credential extends Table, AuthorityCredential extends Table, Attempt extends Table, RateScope extends Table, Charge extends Table, Command extends Table, Intent extends Table, Admission extends Table, NativeSubjectId> {
66
+ export type RequiredPasswordPreparedConstraints = typeof requiredPasswordPreparedConstraints;
67
+ export interface PasswordPreparedPersistenceMapping<Subject extends Table, Identifier extends Table, Credential extends Table, AuthorityCredential extends Table, Attempt extends Table, RateScope extends Table, Charge extends Table, Command extends Table, Intent extends Table, Admission extends Table, NativeSubjectId> {
68
68
  readonly password: PasswordPersistenceMapping<Subject, Identifier, Credential, AuthorityCredential, Attempt, RateScope, Charge, Command, NativeSubjectId>;
69
69
  readonly intent: PasswordPreparedIntentTable<Intent, NativeSubjectId>;
70
70
  readonly admission: PasswordPreparedAdmissionTable<Admission>;
@@ -73,7 +73,7 @@ interface PasswordPreparedPersistenceMapping<Subject extends Table, Identifier e
73
73
  /** Required by synchronous owners, invoked inside their actual transactionSync. */
74
74
  readonly allocateVersionSync?: () => PasswordPreparedVersion;
75
75
  }
76
- type D1PasswordPreparedPersistenceMapping<Subject extends Table, Identifier extends Table, Credential extends Table, AuthorityCredential extends Table, Attempt extends Table, RateScope extends Table, Charge extends Table, Command extends Table, Intent extends Table, Admission extends Table, NativeSubjectId> = PasswordPreparedPersistenceMapping<Subject, Identifier, Credential, AuthorityCredential, Attempt, RateScope, Charge, Command, Intent, Admission, NativeSubjectId> & {
76
+ export type D1PasswordPreparedPersistenceMapping<Subject extends Table, Identifier extends Table, Credential extends Table, AuthorityCredential extends Table, Attempt extends Table, RateScope extends Table, Charge extends Table, Command extends Table, Intent extends Table, Admission extends Table, NativeSubjectId> = PasswordPreparedPersistenceMapping<Subject, Identifier, Credential, AuthorityCredential, Attempt, RateScope, Charge, Command, Intent, Admission, NativeSubjectId> & {
77
77
  /** Convert a stored native instant to epoch milliseconds in the same SQL engine. */
78
78
  readonly admissionClock: {
79
79
  readonly toMillis: (instant: SQL) => SQL;
@@ -82,13 +82,12 @@ type D1PasswordPreparedPersistenceMapping<Subject extends Table, Identifier exte
82
82
  };
83
83
  /** Optional real proof completion authority. Request/delivery/abuse capabilities
84
84
  * are not required to complete the original continuation. */
85
- type PasswordPreparedProofMapping<Series extends Table, Continuation extends Table, Command extends Table, Subject extends Table, Identifier extends Table, Credential extends Table, NativeSubjectId> = Pick<ProofPersistenceMapping<Table, Series, Table, Continuation, Table, Table, Table, Command, Subject, Identifier, Credential, NativeSubjectId>, "series" | "continuation" | "command" | "authority" | "scopeKeys" | "encodeInstant" | "decodeInstant" | "allocateVersion" | "allocateVersionSync" | "isSeriesConflict" | "isCommandConflict" | "d1"> & {
85
+ export type PasswordPreparedProofMapping<Series extends Table, Continuation extends Table, Command extends Table, Subject extends Table, Identifier extends Table, Credential extends Table, NativeSubjectId> = Pick<ProofPersistenceMapping<Table, Series, Table, Continuation, Table, Table, Table, Command, Subject, Identifier, Credential, NativeSubjectId>, "series" | "continuation" | "command" | "authority" | "scopeKeys" | "encodeInstant" | "decodeInstant" | "allocateVersion" | "allocateVersionSync" | "isSeriesConflict" | "isCommandConflict" | "d1"> & {
86
86
  readonly constraints: Pick<RequiredProofConstraints, "series" | "continuationId" | "continuationDigest" | "command">;
87
87
  };
88
- type D1PasswordPreparedProofMapping<Series extends Table, Continuation extends Table, Command extends Table, Subject extends Table, Identifier extends Table, Credential extends Table, NativeSubjectId> = Pick<D1ProofPersistenceMapping<Table, Series, Table, Continuation, Table, Table, Table, Command, Subject, Identifier, Credential, NativeSubjectId>, Exclude<keyof PasswordPreparedProofMapping<Series, Continuation, Command, Subject, Identifier, Credential, NativeSubjectId>, "constraints">> & {
88
+ export type D1PasswordPreparedProofMapping<Series extends Table, Continuation extends Table, Command extends Table, Subject extends Table, Identifier extends Table, Credential extends Table, NativeSubjectId> = Pick<D1ProofPersistenceMapping<Table, Series, Table, Continuation, Table, Table, Table, Command, Subject, Identifier, Credential, NativeSubjectId>, Exclude<keyof PasswordPreparedProofMapping<Series, Continuation, Command, Subject, Identifier, Credential, NativeSubjectId>, "constraints">> & {
89
89
  readonly constraints: PasswordPreparedProofMapping<Series, Continuation, Command, Subject, Identifier, Credential, NativeSubjectId>["constraints"];
90
90
  };
91
- type AnyPasswordPreparedPersistenceMapping = PasswordPreparedPersistenceMapping<Table, Table, Table, Table, Table, Table, Table, Table, Table, Table, unknown>;
91
+ export type AnyPasswordPreparedPersistenceMapping = PasswordPreparedPersistenceMapping<Table, Table, Table, Table, Table, Table, Table, Table, Table, Table, unknown>;
92
92
  //#endregion
93
- export { AnyPasswordPreparedPersistenceMapping, D1PasswordPreparedPersistenceMapping, D1PasswordPreparedProofMapping, PasswordPreparedAdmissionTable, PasswordPreparedIntentTable, PasswordPreparedPersistenceMapping, PasswordPreparedProofMapping, PasswordPreparedState, RequiredPasswordPreparedConstraints, requiredPasswordPreparedConstraints };
94
93
  //# sourceMappingURL=password-prepared-model.d.mts.map
@@ -4,9 +4,8 @@ import { LifecycleHooks } from "@yielded/auth/Hooks";
4
4
  import { PasswordPreparedPersistence } from "@yielded/auth/Password";
5
5
  import "effect/unstable/sql/SqlError";
6
6
  //#region src/drizzle/password-prepared-target.d.ts
7
- declare const passwordPreparedPersistenceLayer: <Id>(tag: Context.Key<Id, PasswordPreparedPersistence>, services: Effect.Effect<{
7
+ export declare const passwordPreparedPersistenceLayer: <Id>(tag: Context.Key<Id, PasswordPreparedPersistence>, services: Effect.Effect<{
8
8
  readonly passwordPreparedPersistence: PasswordPreparedPersistence;
9
9
  }, never, LifecycleHooks>) => Layer.Layer<Id, never, LifecycleHooks>;
10
10
  //#endregion
11
- export { passwordPreparedPersistenceLayer };
12
11
  //# sourceMappingURL=password-prepared-target.d.mts.map
@@ -5,7 +5,7 @@ import { LifecycleHooks, PreparedCommit } from "@yielded/auth/Hooks";
5
5
  import { PasswordRegistrationDecision, PasswordReplacement, PasswordUnavailable, PreparePasswordCommit } from "@yielded/auth/Password";
6
6
  import { LoginIdentifier } from "@yielded/auth/Identity";
7
7
  //#region src/drizzle/password-registration.d.ts
8
- interface PasswordRegistrationAuthority<Registration> {
8
+ export interface PasswordRegistrationAuthority<Registration> {
9
9
  readonly register: <A>(input: {
10
10
  readonly moduleId: string;
11
11
  readonly requestId: string;
@@ -15,5 +15,4 @@ interface PasswordRegistrationAuthority<Registration> {
15
15
  }, prepare: PreparePasswordCommit<PasswordRegistrationDecision, A>) => Effect.Effect<PreparedCommit<A>, PasswordUnavailable>;
16
16
  }
17
17
  //#endregion
18
- export { PasswordRegistrationAuthority };
19
18
  //# sourceMappingURL=password-registration.d.mts.map
@@ -6,12 +6,11 @@ import { HookConfigurationError, LifecycleHooks } from "@yielded/auth/Hooks";
6
6
  import { PasswordPersistence, PasswordUnavailable } from "@yielded/auth/Password";
7
7
  import "effect/unstable/sql/SqlError";
8
8
  //#region src/drizzle/password-target.d.ts
9
- declare const passwordPersistenceLayer: (services: Effect.Effect<{
9
+ export declare const passwordPersistenceLayer: (services: Effect.Effect<{
10
10
  readonly passwordPersistence: PasswordPersistence["Service"];
11
11
  }, never, LifecycleHooks>) => Layer.Layer<PasswordPersistence, never, LifecycleHooks>;
12
- declare const passwordRegistrationLayer: <Id, Registration>(tag: Context.Key<Id, PasswordRegistrationAuthority<Registration>>, services: Effect.Effect<{
12
+ export declare const passwordRegistrationLayer: <Id, Registration>(tag: Context.Key<Id, PasswordRegistrationAuthority<Registration>>, services: Effect.Effect<{
13
13
  readonly registrationAuthority: PasswordRegistrationAuthority<Registration>;
14
14
  }, never, LifecycleHooks>) => Layer.Layer<Id, never, LifecycleHooks>;
15
15
  //#endregion
16
- export { passwordPersistenceLayer, passwordRegistrationLayer };
17
16
  //# sourceMappingURL=password-target.d.mts.map
@@ -14,7 +14,7 @@ import { SqlError } from "effect/unstable/sql/SqlError";
14
14
  type Database = EffectPgDatabase$1<AnyRelations> | EffectPgDatabase<AnyRelations>;
15
15
  type TransactionOf<D extends Database> = Parameters<Parameters<D["transaction"]>[0]>[0];
16
16
  type ProofMapping = ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any>;
17
- declare const makePgEmailSignInServices: <S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, NativeId>(database: Database, mapping: EmailSignInMapping<S, I, C, NativeId>) => Effect.Effect<{
17
+ export declare const makePgEmailSignInServices: <S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, NativeId>(database: Database, mapping: EmailSignInMapping<S, I, C, NativeId>) => Effect.Effect<{
18
18
  emailSignInTargets: {
19
19
  readonly lookup: (input: {
20
20
  readonly moduleId: string;
@@ -22,7 +22,7 @@ declare const makePgEmailSignInServices: <S extends AnyPgTable, I extends AnyPgT
22
22
  }) => Effect.Effect<import("effect/Option").Option<import("@yielded/auth/Email").EmailCredentialSnapshot>, EmailUnavailable>;
23
23
  };
24
24
  }, never, never>;
25
- declare const makePgEmailAddressServices: <S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, M extends AnyPgTable, NativeId>(database: Database, mapping: EmailAddressMapping<S, I, C, AC, M, NativeId>, proofMapping: ProofMapping) => Effect.Effect<{
25
+ export declare const makePgEmailAddressServices: <S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, M extends AnyPgTable, NativeId>(database: Database, mapping: EmailAddressMapping<S, I, C, AC, M, NativeId>, proofMapping: ProofMapping) => Effect.Effect<{
26
26
  emailAddressPersistence: {
27
27
  readonly target: (input: {
28
28
  readonly moduleId: string;
@@ -42,31 +42,30 @@ declare const makePgEmailAddressServices: <S extends AnyPgTable, I extends AnyPg
42
42
  }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, EmailUnavailable>;
43
43
  };
44
44
  }, never, LifecycleHooks>;
45
- declare function coordinatePgEmailAddress<D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, M extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
45
+ export declare function coordinatePgEmailAddress<D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, M extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
46
46
  readonly mapping: EmailAddressMapping<S, I, C, AC, M, NativeId>;
47
47
  readonly proofMapping: ProofMapping;
48
48
  readonly transaction?: never;
49
49
  }, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, E | EmailUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, EmailAddressPersistence> | LifecycleHooks | DatabaseRequirements>;
50
- declare function coordinatePgEmailAddress<D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, M extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
50
+ export declare function coordinatePgEmailAddress<D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, M extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
51
51
  readonly mapping: EmailAddressMapping<S, I, C, AC, M, NativeId>;
52
52
  readonly proofMapping: ProofMapping;
53
53
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
54
54
  }, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, E | EmailUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, EmailAddressPersistence | TxId> | LifecycleHooks | DatabaseRequirements>;
55
- declare const makePgEmailRegistrationServices: <Registration, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId>(database: Database, mapping: EmailRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>, proofMapping: ProofMapping) => Effect.Effect<{
55
+ export declare const makePgEmailRegistrationServices: <Registration, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId>(database: Database, mapping: EmailRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>, proofMapping: ProofMapping) => Effect.Effect<{
56
56
  registrationAuthority: EmailRegistrationAuthority<Registration>;
57
57
  }, never, LifecycleHooks>;
58
- declare function coordinatePgEmailRegistration<TargetId, Registration, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
58
+ export declare function coordinatePgEmailRegistration<TargetId, Registration, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
59
59
  readonly mapping: EmailRegistrationMapping<NoInfer<Registration>, S, I, C, AC, Rq, NativeId>;
60
60
  readonly proofMapping: ProofMapping;
61
61
  readonly target: SuppliedService<TargetId, EmailRegistrationAuthority<Registration>>;
62
62
  readonly transaction?: never;
63
63
  }, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, E | EmailUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, TargetId> | LifecycleHooks | DatabaseRequirements>;
64
- declare function coordinatePgEmailRegistration<TargetId, Registration, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
64
+ export declare function coordinatePgEmailRegistration<TargetId, Registration, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
65
65
  readonly mapping: EmailRegistrationMapping<NoInfer<Registration>, S, I, C, AC, Rq, NativeId>;
66
66
  readonly proofMapping: ProofMapping;
67
67
  readonly target: SuppliedService<TargetId, EmailRegistrationAuthority<Registration>>;
68
68
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
69
69
  }, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, E | EmailUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, TargetId | TxId> | LifecycleHooks | DatabaseRequirements>;
70
70
  //#endregion
71
- export { coordinatePgEmailAddress, coordinatePgEmailRegistration, makePgEmailAddressServices, makePgEmailRegistrationServices, makePgEmailSignInServices };
72
71
  //# sourceMappingURL=pg-emails.d.mts.map
@@ -11,21 +11,20 @@ import { SqlError } from "effect/unstable/sql/SqlError";
11
11
  //#region src/drizzle/pg-password-prepared.d.ts
12
12
  type Database = EffectPgDatabase$1<AnyRelations> | EffectPgDatabase<AnyRelations>;
13
13
  type TransactionOf<D extends Database> = Parameters<Parameters<D["transaction"]>[0]>[0];
14
- declare const makePgPasswordPreparedPersistenceServices: <S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, T extends AnyPgTable, B extends AnyPgTable, NativeId, PS extends AnyPgTable = AnyPgTable, PC extends AnyPgTable = AnyPgTable, PM extends AnyPgTable = AnyPgTable, PSub extends AnyPgTable = AnyPgTable, PI extends AnyPgTable = AnyPgTable, PCr extends AnyPgTable = AnyPgTable, PNativeId = unknown>(database: Database, mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>, proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId>) => Effect.Effect<{
14
+ export declare const makePgPasswordPreparedPersistenceServices: <S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, T extends AnyPgTable, B extends AnyPgTable, NativeId, PS extends AnyPgTable = AnyPgTable, PC extends AnyPgTable = AnyPgTable, PM extends AnyPgTable = AnyPgTable, PSub extends AnyPgTable = AnyPgTable, PI extends AnyPgTable = AnyPgTable, PCr extends AnyPgTable = AnyPgTable, PNativeId = unknown>(database: Database, mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>, proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId>) => Effect.Effect<{
15
15
  passwordPreparedPersistence: PasswordPreparedPersistence;
16
16
  }, never, LifecycleHooks>;
17
- declare function coordinatePgPasswordPreparedPersistence<TargetId, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, T extends AnyPgTable, B extends AnyPgTable, NativeId, PS extends AnyPgTable, PC extends AnyPgTable, PM extends AnyPgTable, PSub extends AnyPgTable, PI extends AnyPgTable, PCr extends AnyPgTable, PNativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
17
+ export declare function coordinatePgPasswordPreparedPersistence<TargetId, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, T extends AnyPgTable, B extends AnyPgTable, NativeId, PS extends AnyPgTable, PC extends AnyPgTable, PM extends AnyPgTable, PSub extends AnyPgTable, PI extends AnyPgTable, PCr extends AnyPgTable, PNativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
18
18
  readonly mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>;
19
19
  readonly proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined;
20
20
  readonly target: SuppliedService<TargetId, PasswordPreparedPersistence>;
21
21
  readonly transaction?: never;
22
22
  }, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, E | PasswordUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, TargetId> | LifecycleHooks | DatabaseRequirements>;
23
- declare function coordinatePgPasswordPreparedPersistence<TargetId, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, T extends AnyPgTable, B extends AnyPgTable, NativeId, PS extends AnyPgTable, PC extends AnyPgTable, PM extends AnyPgTable, PSub extends AnyPgTable, PI extends AnyPgTable, PCr extends AnyPgTable, PNativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
23
+ export declare function coordinatePgPasswordPreparedPersistence<TargetId, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, T extends AnyPgTable, B extends AnyPgTable, NativeId, PS extends AnyPgTable, PC extends AnyPgTable, PM extends AnyPgTable, PSub extends AnyPgTable, PI extends AnyPgTable, PCr extends AnyPgTable, PNativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
24
24
  readonly mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>;
25
25
  readonly proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined;
26
26
  readonly target: SuppliedService<TargetId, PasswordPreparedPersistence>;
27
27
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
28
28
  }, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, E | PasswordUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, TargetId | TxId> | LifecycleHooks | DatabaseRequirements>;
29
29
  //#endregion
30
- export { coordinatePgPasswordPreparedPersistence, makePgPasswordPreparedPersistenceServices };
31
30
  //# sourceMappingURL=pg-password-prepared.d.mts.map
@@ -16,7 +16,7 @@ import { SqlError } from "effect/unstable/sql/SqlError";
16
16
  type Database = EffectPgDatabase$1<AnyRelations> | EffectPgDatabase<AnyRelations>;
17
17
  type TransactionOf<D extends Database> = Parameters<Parameters<D["transaction"]>[0]>[0];
18
18
  type PasswordMapping<S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, NativeId> = PasswordPersistenceMapping<S, I, C, AC, A, RS, CE, M, NativeId>;
19
- declare const makePgPasswordPersistenceServices: <S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, NativeId>(database: Database, mapping: PasswordMapping<S, I, C, AC, A, RS, CE, M, NativeId>, proofMapping?: ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any>) => Effect.Effect<{
19
+ export declare const makePgPasswordPersistenceServices: <S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, NativeId>(database: Database, mapping: PasswordMapping<S, I, C, AC, A, RS, CE, M, NativeId>, proofMapping?: ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any>) => Effect.Effect<{
20
20
  passwordPersistence: {
21
21
  readonly admitAttempt: <A_1>(input: {
22
22
  readonly moduleId: string;
@@ -59,29 +59,28 @@ declare const makePgPasswordPersistenceServices: <S extends AnyPgTable, I extend
59
59
  }, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, PasswordUnavailable>;
60
60
  };
61
61
  }, never, LifecycleHooks>;
62
- declare function coordinatePgPasswordPersistence<D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, 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<D, DatabaseError, DatabaseRequirements>, options: {
62
+ export declare function coordinatePgPasswordPersistence<D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, 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<D, DatabaseError, DatabaseRequirements>, options: {
63
63
  readonly mapping: PasswordMapping<S, I, C, AC, A, RS, CE, M, NativeId>;
64
64
  readonly proofMapping?: PM;
65
65
  readonly transaction?: never;
66
66
  }, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, E | PasswordUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, PasswordPersistence> | LifecycleHooks | DatabaseRequirements>;
67
- declare function coordinatePgPasswordPersistence<D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, NativeId, PM extends ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any> | undefined, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
67
+ export declare function coordinatePgPasswordPersistence<D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, A extends AnyPgTable, RS extends AnyPgTable, CE extends AnyPgTable, M extends AnyPgTable, NativeId, PM extends ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any> | undefined, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
68
68
  readonly mapping: PasswordMapping<S, I, C, AC, A, RS, CE, M, NativeId>;
69
69
  readonly proofMapping?: PM;
70
70
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
71
71
  }, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, E | PasswordUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, PasswordPersistence | TxId> | LifecycleHooks | DatabaseRequirements>;
72
- declare const makePgPasswordRegistrationServices: <Registration, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId>(database: Database, mapping: PasswordRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>) => Effect.Effect<{
72
+ export declare const makePgPasswordRegistrationServices: <Registration, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId>(database: Database, mapping: PasswordRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>) => Effect.Effect<{
73
73
  registrationAuthority: PasswordRegistrationAuthority<Registration>;
74
74
  }, never, LifecycleHooks>;
75
- declare function coordinatePgPasswordRegistration<TargetId, Registration, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
75
+ export declare function coordinatePgPasswordRegistration<TargetId, Registration, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
76
76
  readonly mapping: PasswordRegistrationMapping<NoInfer<Registration>, S, I, C, AC, Rq, NativeId>;
77
77
  readonly target: SuppliedService<TargetId, PasswordRegistrationAuthority<Registration>>;
78
78
  readonly transaction?: never;
79
79
  }, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, E | PasswordUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, TargetId> | LifecycleHooks | DatabaseRequirements>;
80
- declare function coordinatePgPasswordRegistration<TargetId, Registration, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
80
+ export declare function coordinatePgPasswordRegistration<TargetId, Registration, D extends Database, S extends AnyPgTable, I extends AnyPgTable, C extends AnyPgTable, AC extends AnyPgTable, Rq extends AnyPgTable, NativeId, Out, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
81
81
  readonly mapping: PasswordRegistrationMapping<NoInfer<Registration>, S, I, C, AC, Rq, NativeId>;
82
82
  readonly target: SuppliedService<TargetId, PasswordRegistrationAuthority<Registration>>;
83
83
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
84
84
  }, body: Effect.Effect<Out, E, R>): Effect.Effect<Out, E | PasswordUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, TargetId | TxId> | LifecycleHooks | DatabaseRequirements>;
85
85
  //#endregion
86
- export { coordinatePgPasswordPersistence, coordinatePgPasswordRegistration, makePgPasswordPersistenceServices, makePgPasswordRegistrationServices };
87
86
  //# sourceMappingURL=pg-passwords.d.mts.map
@@ -12,7 +12,7 @@ import { SqlError } from "effect/unstable/sql/SqlError";
12
12
  type Database = EffectPgDatabase$1<AnyRelations> | EffectPgDatabase<AnyRelations>;
13
13
  type TransactionOf<D extends Database> = Parameters<Parameters<D["transaction"]>[0]>[0];
14
14
  type Mapping<Request extends AnyPgTable, Series extends AnyPgTable, Generation extends AnyPgTable, Continuation extends AnyPgTable, RateScope extends AnyPgTable, AbuseEvent extends AnyPgTable, FailureEvent extends AnyPgTable, Command extends AnyPgTable, Subject extends AnyPgTable, Identifier extends AnyPgTable, Credential extends AnyPgTable, NativeSubjectId> = ProofPersistenceMapping<Request, Series, Generation, Continuation, RateScope, AbuseEvent, FailureEvent, Command, Subject, Identifier, Credential, NativeSubjectId>;
15
- declare const makePgProofPersistenceServices: <Rq extends AnyPgTable, S extends AnyPgTable, G extends AnyPgTable, Cn extends AnyPgTable, Rs extends AnyPgTable, A extends AnyPgTable, F extends AnyPgTable, C extends AnyPgTable, Sub extends AnyPgTable, I extends AnyPgTable, Cr extends AnyPgTable, NativeId>(database: Database, mapping: Mapping<Rq, S, G, Cn, Rs, A, F, C, Sub, I, Cr, NativeId>) => Effect.Effect<{
15
+ export declare const makePgProofPersistenceServices: <Rq extends AnyPgTable, S extends AnyPgTable, G extends AnyPgTable, Cn extends AnyPgTable, Rs extends AnyPgTable, A extends AnyPgTable, F extends AnyPgTable, C extends AnyPgTable, Sub extends AnyPgTable, I extends AnyPgTable, Cr extends AnyPgTable, NativeId>(database: Database, mapping: Mapping<Rq, S, G, Cn, Rs, A, F, C, Sub, I, Cr, NativeId>) => Effect.Effect<{
16
16
  proofPersistence: {
17
17
  readonly issue: <A_1>(input: {
18
18
  readonly record: import("@yielded/auth/Proofs").ProofRecord;
@@ -63,14 +63,13 @@ declare const makePgProofPersistenceServices: <Rq extends AnyPgTable, S extends
63
63
  }, prepare: import("@yielded/auth/Proofs").PrepareProofCommit<import("@yielded/auth/Proofs").ProofCleanupResult, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, ProofUnavailable>;
64
64
  };
65
65
  }, never, LifecycleHooks>;
66
- declare function coordinatePgProofPersistence<D extends Database, Rq extends AnyPgTable, S extends AnyPgTable, G extends AnyPgTable, Cn extends AnyPgTable, Rs extends AnyPgTable, Aev extends AnyPgTable, F extends AnyPgTable, C extends AnyPgTable, Sub extends AnyPgTable, I extends AnyPgTable, Cr extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
66
+ export declare function coordinatePgProofPersistence<D extends Database, Rq extends AnyPgTable, S extends AnyPgTable, G extends AnyPgTable, Cn extends AnyPgTable, Rs extends AnyPgTable, Aev extends AnyPgTable, F extends AnyPgTable, C extends AnyPgTable, Sub extends AnyPgTable, I extends AnyPgTable, Cr extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
67
67
  readonly mapping: Mapping<Rq, S, G, Cn, Rs, Aev, F, C, Sub, I, Cr, NativeId>;
68
68
  readonly transaction?: never;
69
69
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | ProofUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, ProofPersistence> | LifecycleHooks | DatabaseRequirements>;
70
- declare function coordinatePgProofPersistence<D extends Database, Rq extends AnyPgTable, S extends AnyPgTable, G extends AnyPgTable, Cn extends AnyPgTable, Rs extends AnyPgTable, Aev extends AnyPgTable, F extends AnyPgTable, C extends AnyPgTable, Sub extends AnyPgTable, I extends AnyPgTable, Cr extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
70
+ export declare function coordinatePgProofPersistence<D extends Database, Rq extends AnyPgTable, S extends AnyPgTable, G extends AnyPgTable, Cn extends AnyPgTable, Rs extends AnyPgTable, Aev extends AnyPgTable, F extends AnyPgTable, C extends AnyPgTable, Sub extends AnyPgTable, I extends AnyPgTable, Cr extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
71
71
  readonly mapping: Mapping<Rq, S, G, Cn, Rs, Aev, F, C, Sub, I, Cr, NativeId>;
72
72
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
73
73
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | ProofUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, ProofPersistence | TxId> | LifecycleHooks | DatabaseRequirements>;
74
74
  //#endregion
75
- export { coordinatePgProofPersistence, makePgProofPersistenceServices };
76
75
  //# sourceMappingURL=pg-proofs.d.mts.map
@@ -12,7 +12,7 @@ import { SqlError } from "effect/unstable/sql/SqlError";
12
12
  //#region src/drizzle/pg-sessions.d.ts
13
13
  type Database = EffectPgDatabase$1<AnyRelations> | EffectPgDatabase<AnyRelations>;
14
14
  type TransactionOf<D extends Database> = Parameters<Parameters<D["transaction"]>[0]>[0];
15
- declare const makePgAuthenticationAuthorityServices: <Claims, Subject extends AnyPgTable, Credential extends AnyPgTable, Flow extends AnyPgTable, Pending extends AnyPgTable, NativeSubjectId>(database: Database, mapping: AuthenticationAuthorityMapping<Claims, Subject, Credential, Flow, Pending, NativeSubjectId>) => Effect.Effect<{
15
+ export declare const makePgAuthenticationAuthorityServices: <Claims, Subject extends AnyPgTable, Credential extends AnyPgTable, Flow extends AnyPgTable, Pending extends AnyPgTable, NativeSubjectId>(database: Database, mapping: AuthenticationAuthorityMapping<Claims, Subject, Credential, Flow, Pending, NativeSubjectId>) => Effect.Effect<{
16
16
  authenticationAuthority: {
17
17
  capture: (subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">, credentialIds: readonly string[]) => Effect.Effect<{
18
18
  subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
@@ -71,7 +71,7 @@ declare const makePgAuthenticationAuthorityServices: <Claims, Subject extends An
71
71
  }, prepare: import("@yielded/auth/Sessions").PrepareSessionCommit<void, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Sessions").PendingAuthenticationInvalid | SessionUnavailable | import("@yielded/auth/Sessions").StaleAuthentication, never>;
72
72
  };
73
73
  }, never, LifecycleHooks>;
74
- declare const makePgPendingAuthenticationServices: <Claims, Subject extends AnyPgTable, Credential extends AnyPgTable, Pending extends AnyPgTable, Flow extends AnyPgTable, NativeSubjectId>(database: Database, mapping: PendingAuthenticationMapping<Claims, Subject, Credential, Pending, Flow, NativeSubjectId>) => Effect.Effect<{
74
+ export declare const makePgPendingAuthenticationServices: <Claims, Subject extends AnyPgTable, Credential extends AnyPgTable, Pending extends AnyPgTable, Flow extends AnyPgTable, NativeSubjectId>(database: Database, mapping: PendingAuthenticationMapping<Claims, Subject, Credential, Pending, Flow, NativeSubjectId>) => Effect.Effect<{
75
75
  pendingAuthentication: {
76
76
  create: <A>(input: Omit<import("@yielded/auth/Sessions").PendingAuthenticationRecord<Claims>, "version">, now: import("effect/DateTime").Utc, prepare: import("@yielded/auth/Sessions").PrepareSessionCommit<import("@yielded/auth/Sessions").PendingAuthenticationRecord<Claims>, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Sessions").SessionConflict | SessionUnavailable | import("@yielded/auth/Sessions").StaleAuthentication, never>;
77
77
  context: (input: {
@@ -104,7 +104,7 @@ declare const makePgPendingAuthenticationServices: <Claims, Subject extends AnyP
104
104
  }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, SessionUnavailable, never>;
105
105
  };
106
106
  }, never, LifecycleHooks>;
107
- declare const makePgStatefulSessionServices: <Claims, Subject extends AnyPgTable, Credential extends AnyPgTable, Session extends AnyPgTable, Flow extends AnyPgTable, Pending extends AnyPgTable, NativeSubjectId, NativeSessionId>(database: Database, mapping: StatefulSessionMapping<Claims, Subject, Credential, Session, Flow, Pending, NativeSubjectId, NativeSessionId>) => Effect.Effect<{
107
+ export declare const makePgStatefulSessionServices: <Claims, Subject extends AnyPgTable, Credential extends AnyPgTable, Session extends AnyPgTable, Flow extends AnyPgTable, Pending extends AnyPgTable, NativeSubjectId, NativeSessionId>(database: Database, mapping: StatefulSessionMapping<Claims, Subject, Credential, Session, Flow, Pending, NativeSubjectId, NativeSessionId>) => Effect.Effect<{
108
108
  statefulSessionPersistence: {
109
109
  establish: <A>(input: {
110
110
  readonly session: Omit<import("@yielded/auth/Sessions").StatefulSessionRecord<Claims>, "sessionId" | "version">;
@@ -157,7 +157,7 @@ declare const makePgStatefulSessionServices: <Claims, Subject extends AnyPgTable
157
157
  }, SessionUnavailable, never>;
158
158
  };
159
159
  }, never, LifecycleHooks>;
160
- declare const makePgSignedSessionValidityServices: <Subject extends AnyPgTable, Tombstone extends AnyPgTable, NativeSubjectId, NativeSessionId>(database: Database, mapping: SignedSessionValidityMapping<Subject, Tombstone, NativeSubjectId, NativeSessionId>) => Effect.Effect<{
160
+ export declare const makePgSignedSessionValidityServices: <Subject extends AnyPgTable, Tombstone extends AnyPgTable, NativeSubjectId, NativeSessionId>(database: Database, mapping: SignedSessionValidityMapping<Subject, Tombstone, NativeSubjectId, NativeSessionId>) => Effect.Effect<{
161
161
  signedSessionValidity: {
162
162
  verify: (session: {
163
163
  readonly sessionId: string & import("effect/Brand").Brand<"effect-auth/SessionId">;
@@ -180,59 +180,58 @@ declare const makePgSignedSessionValidityServices: <Subject extends AnyPgTable,
180
180
  }, prepare: import("@yielded/auth/Sessions").PrepareSessionCommit<void, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, SessionUnavailable | import("@yielded/auth/Sessions").StaleAuthentication, never>;
181
181
  };
182
182
  }, never, LifecycleHooks>;
183
- declare function coordinatePgAuthenticationAuthority<Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, F extends AnyPgTable, P extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
183
+ export declare function coordinatePgAuthenticationAuthority<Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, F extends AnyPgTable, P extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
184
184
  readonly mapping: AuthenticationAuthorityMapping<Claims, S, C, F, P, NativeId>;
185
185
  readonly transaction?: never;
186
186
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | SessionUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, AuthenticationAuthority> | LifecycleHooks | DatabaseRequirements>;
187
- declare function coordinatePgAuthenticationAuthority<Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, F extends AnyPgTable, P extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
187
+ export declare function coordinatePgAuthenticationAuthority<Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, F extends AnyPgTable, P extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
188
188
  readonly mapping: AuthenticationAuthorityMapping<Claims, S, C, F, P, NativeId>;
189
189
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
190
190
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | SessionUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, AuthenticationAuthority | TxId> | LifecycleHooks | DatabaseRequirements>;
191
- declare function coordinatePgPendingAuthentication<TargetId, Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, P extends AnyPgTable, F extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
191
+ export declare function coordinatePgPendingAuthentication<TargetId, Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, P extends AnyPgTable, F extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
192
192
  readonly mapping: PendingAuthenticationMapping<NoInfer<Claims>, S, C, P, F, NativeId>;
193
193
  readonly target: SuppliedService<TargetId, PendingAuthentication<Claims>>;
194
194
  readonly transaction?: never;
195
195
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | SessionUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, TargetId> | LifecycleHooks | DatabaseRequirements>;
196
- declare function coordinatePgPendingAuthentication<TargetId, Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, P extends AnyPgTable, F extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
196
+ export declare function coordinatePgPendingAuthentication<TargetId, Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, P extends AnyPgTable, F extends AnyPgTable, NativeId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
197
197
  readonly mapping: PendingAuthenticationMapping<NoInfer<Claims>, S, C, P, F, NativeId>;
198
198
  readonly target: SuppliedService<TargetId, PendingAuthentication<Claims>>;
199
199
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
200
200
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | SessionUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, TargetId | TxId> | LifecycleHooks | DatabaseRequirements>;
201
- declare function coordinatePgStatefulSessions<PersistenceId, RepositoryId, Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, Session extends AnyPgTable, F extends AnyPgTable, P extends AnyPgTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
201
+ export declare function coordinatePgStatefulSessions<PersistenceId, RepositoryId, Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, Session extends AnyPgTable, F extends AnyPgTable, P extends AnyPgTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
202
202
  readonly mapping: StatefulSessionMapping<NoInfer<Claims>, S, C, Session, F, P, NativeId, NativeSessionId>;
203
203
  readonly persistence: SuppliedService<PersistenceId, StatefulSessionPersistence<Claims>>;
204
204
  readonly repository: SuppliedService<RepositoryId, SessionRepository>;
205
205
  readonly transaction?: never;
206
206
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | SessionUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, PersistenceId | RepositoryId> | LifecycleHooks | DatabaseRequirements>;
207
- declare function coordinatePgStatefulSessions<PersistenceId, RepositoryId, Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, Session extends AnyPgTable, F extends AnyPgTable, P extends AnyPgTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
207
+ export declare function coordinatePgStatefulSessions<PersistenceId, RepositoryId, Claims, D extends Database, S extends AnyPgTable, C extends AnyPgTable, Session extends AnyPgTable, F extends AnyPgTable, P extends AnyPgTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
208
208
  readonly mapping: StatefulSessionMapping<NoInfer<Claims>, S, C, Session, F, P, NativeId, NativeSessionId>;
209
209
  readonly persistence: SuppliedService<PersistenceId, StatefulSessionPersistence<Claims>>;
210
210
  readonly repository: SuppliedService<RepositoryId, SessionRepository>;
211
211
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
212
212
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | SessionUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, PersistenceId | RepositoryId | TxId> | LifecycleHooks | DatabaseRequirements>;
213
- declare function coordinatePgSignedSessionValidity<TargetId, D extends Database, S extends AnyPgTable, T extends AnyPgTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
213
+ export declare function coordinatePgSignedSessionValidity<TargetId, D extends Database, S extends AnyPgTable, T extends AnyPgTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
214
214
  readonly mapping: SignedSessionValidityMapping<S, T, NativeId, NativeSessionId>;
215
215
  readonly target: SuppliedService<TargetId, SignedSessionValidity>;
216
216
  readonly transaction?: never;
217
217
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | SessionUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, TargetId> | LifecycleHooks | DatabaseRequirements>;
218
- declare function coordinatePgSignedSessionValidity<TargetId, D extends Database, S extends AnyPgTable, T extends AnyPgTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
218
+ export declare function coordinatePgSignedSessionValidity<TargetId, D extends Database, S extends AnyPgTable, T extends AnyPgTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
219
219
  readonly mapping: SignedSessionValidityMapping<S, T, NativeId, NativeSessionId>;
220
220
  readonly target: SuppliedService<TargetId, SignedSessionValidity>;
221
221
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
222
222
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | SessionUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, TargetId | TxId> | LifecycleHooks | DatabaseRequirements>;
223
- declare const makePgSessionStepUpServices: <Claims, Id, S extends AnyPgTable, C extends AnyPgTable, I extends AnyPgTable, Session extends AnyPgTable, T extends AnyPgTable, NativeId, NativeSessionId>(database: Database, mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>, target: Context.Service<Id, SessionStepUpPersistence<Claims>>) => Effect.Effect<{
223
+ export declare const makePgSessionStepUpServices: <Claims, Id, S extends AnyPgTable, C extends AnyPgTable, I extends AnyPgTable, Session extends AnyPgTable, T extends AnyPgTable, NativeId, NativeSessionId>(database: Database, mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>, target: Context.Service<Id, SessionStepUpPersistence<Claims>>) => Effect.Effect<{
224
224
  sessionStepUpPersistence: SessionStepUpPersistence<Claims>;
225
225
  }, never, LifecycleHooks>;
226
- declare function coordinatePgSessionStepUp<Claims, Id, S extends AnyPgTable, C extends AnyPgTable, I extends AnyPgTable, Session extends AnyPgTable, T extends AnyPgTable, NativeId, NativeSessionId, D extends Database, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
226
+ export declare function coordinatePgSessionStepUp<Claims, Id, S extends AnyPgTable, C extends AnyPgTable, I extends AnyPgTable, Session extends AnyPgTable, T extends AnyPgTable, NativeId, NativeSessionId, D extends Database, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
227
227
  readonly mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>;
228
228
  readonly target: SuppliedService<Id, SessionStepUpPersistence<Claims>>;
229
229
  readonly transaction?: never;
230
230
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | SessionUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, Id> | LifecycleHooks | DatabaseRequirements>;
231
- declare function coordinatePgSessionStepUp<Claims, Id, S extends AnyPgTable, C extends AnyPgTable, I extends AnyPgTable, Session extends AnyPgTable, T extends AnyPgTable, NativeId, NativeSessionId, D extends Database, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
231
+ export declare function coordinatePgSessionStepUp<Claims, Id, S extends AnyPgTable, C extends AnyPgTable, I extends AnyPgTable, Session extends AnyPgTable, T extends AnyPgTable, NativeId, NativeSessionId, D extends Database, A, E, R, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
232
232
  readonly mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>;
233
233
  readonly target: SuppliedService<Id, SessionStepUpPersistence<Claims>>;
234
234
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
235
235
  }, body: Effect.Effect<A, E, R>): Effect.Effect<A, E | SessionUnavailable | HookConfigurationError | SqlError | DatabaseError, Exclude<R, Id | TxId> | LifecycleHooks | DatabaseRequirements>;
236
236
  //#endregion
237
- export { coordinatePgAuthenticationAuthority, coordinatePgPendingAuthentication, coordinatePgSessionStepUp, coordinatePgSignedSessionValidity, coordinatePgStatefulSessions, makePgAuthenticationAuthorityServices, makePgPendingAuthenticationServices, makePgSessionStepUpServices, makePgSignedSessionValidityServices, makePgStatefulSessionServices };
238
237
  //# sourceMappingURL=pg-sessions.d.mts.map
@@ -15,7 +15,7 @@ import { SqlError } from "effect/unstable/sql/SqlError";
15
15
  //#region src/drizzle/pg.d.ts
16
16
  type Database = EffectPgDatabase$1<AnyRelations> | EffectPgDatabase<AnyRelations>;
17
17
  type TransactionOf<D extends Database> = Parameters<Parameters<D["transaction"]>[0]>[0];
18
- declare const makePgAuthStoreServices: <C extends AnyPgTable, R extends AnyPgTable>(database: Database, mapping: AuthStoreTables<C, R>) => {
18
+ export declare const makePgAuthStoreServices: <C extends AnyPgTable, R extends AnyPgTable>(database: Database, mapping: AuthStoreTables<C, R>) => {
19
19
  readonly authStore: {
20
20
  readonly issueChallenge: (input: NewChallenge) => Effect.Effect<void, import("@yielded/auth/AuthStore").IssueChallengeError>;
21
21
  readonly consumeChallenge: (input: ConsumeChallenge) => Effect.Effect<VerifiedEmail, EmailOtpRejected | AuthStoreError>;
@@ -28,7 +28,7 @@ declare const makePgAuthStoreServices: <C extends AnyPgTable, R extends AnyPgTab
28
28
  readonly consumeRegistration: (input: ConsumeRegistration) => Effect.Effect<ConsumeDecision<void>, AuthStoreError, never>;
29
29
  };
30
30
  };
31
- declare const makePgOAuthStateServices: <S extends AnyPgTable>(database: Database, mapping: OAuthStateTables<S>) => {
31
+ export declare const makePgOAuthStateServices: <S extends AnyPgTable>(database: Database, mapping: OAuthStateTables<S>) => {
32
32
  readonly oauthStateStore: {
33
33
  readonly issue: (state: OAuthState) => Effect.Effect<void, AuthStoreError>;
34
34
  readonly consume: (stateDigest: TokenDigest) => Effect.Effect<OAuthState, InvalidOAuthState | AuthStoreError>;
@@ -42,40 +42,39 @@ declare const makePgOAuthStateServices: <S extends AnyPgTable>(database: Databas
42
42
  * owner; interruption before commit rolls back. Retry an unknown commit outcome
43
43
  * only with the same stable request identity.
44
44
  */
45
- declare function coordinatePgAuthStoreTransaction<D extends Database, C extends AnyPgTable, R extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
45
+ export declare function coordinatePgAuthStoreTransaction<D extends Database, C extends AnyPgTable, R extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
46
46
  readonly mapping: AuthStoreTables<C, R>;
47
47
  readonly transaction?: never;
48
48
  }, body: Effect.Effect<A, E, Requirements>): Effect.Effect<A, E | DatabaseError | SqlError, Exclude<Requirements, AuthStoreDecisions> | DatabaseRequirements>;
49
- declare function coordinatePgAuthStoreTransaction<D extends Database, C extends AnyPgTable, R extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
49
+ export declare function coordinatePgAuthStoreTransaction<D extends Database, C extends AnyPgTable, R extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
50
50
  readonly mapping: AuthStoreTables<C, R>;
51
51
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
52
52
  }, body: Effect.Effect<A, E, Requirements>): Effect.Effect<A, E | DatabaseError | SqlError, Exclude<Requirements, AuthStoreDecisions | TxId> | DatabaseRequirements>;
53
- declare function coordinatePgOAuthStateTransaction<D extends Database, S extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
53
+ export declare function coordinatePgOAuthStateTransaction<D extends Database, S extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
54
54
  readonly mapping: OAuthStateTables<S>;
55
55
  readonly transaction?: never;
56
56
  }, body: Effect.Effect<A, E, Requirements>): Effect.Effect<A, E | DatabaseError | SqlError, Exclude<Requirements, OAuthStateDecisions> | DatabaseRequirements>;
57
- declare function coordinatePgOAuthStateTransaction<D extends Database, S extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
57
+ export declare function coordinatePgOAuthStateTransaction<D extends Database, S extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
58
58
  readonly mapping: OAuthStateTables<S>;
59
59
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
60
60
  }, body: Effect.Effect<A, E, Requirements>): Effect.Effect<A, E | DatabaseError | SqlError, Exclude<Requirements, OAuthStateDecisions | TxId> | DatabaseRequirements>;
61
- declare function coordinatePgAuthTransaction<D extends Database, C extends AnyPgTable, R extends AnyPgTable, S extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
61
+ export declare function coordinatePgAuthTransaction<D extends Database, C extends AnyPgTable, R extends AnyPgTable, S extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
62
62
  readonly mapping: AuthTables<C, R, S>;
63
63
  readonly transaction?: never;
64
64
  }, body: Effect.Effect<A, E, Requirements>): Effect.Effect<A, E | DatabaseError | SqlError, Exclude<Requirements, AuthStoreDecisions | OAuthStateDecisions> | DatabaseRequirements>;
65
- declare function coordinatePgAuthTransaction<D extends Database, C extends AnyPgTable, R extends AnyPgTable, S extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
65
+ export declare function coordinatePgAuthTransaction<D extends Database, C extends AnyPgTable, R extends AnyPgTable, S extends AnyPgTable, A, E, Requirements, DatabaseError, DatabaseRequirements, TxId, TxShape>(acquire: Effect.Effect<D, DatabaseError, DatabaseRequirements>, options: {
66
66
  readonly mapping: AuthTables<C, R, S>;
67
67
  readonly transaction: SuppliedService<TxId, NoInfer<TransactionOf<D>>, TxShape>;
68
68
  }, body: Effect.Effect<A, E, Requirements>): Effect.Effect<A, E | DatabaseError | SqlError, Exclude<Requirements, AuthStoreDecisions | OAuthStateDecisions | TxId> | DatabaseRequirements>;
69
- declare const makePgSubjectProvisioningServices: <Subject extends AnyPgTable, Identifier extends AnyPgTable, Request extends AnyPgTable, NativeId>(database: Database, mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => {
69
+ export declare const makePgSubjectProvisioningServices: <Subject extends AnyPgTable, Identifier extends AnyPgTable, Request extends AnyPgTable, NativeId>(database: Database, mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => {
70
70
  readonly subjectProvisioner: {
71
71
  readonly provision: (input: SubjectProvisioningInput) => Effect.Effect<import("@yielded/auth/Identity").ProvisioningResult, IdentityConflict | IdentityUnavailable>;
72
72
  };
73
73
  };
74
- declare const makePgExternalIdentityServices: <Subject extends AnyPgTable, External extends AnyPgTable, NativeId>(database: Database, mapping: ExternalIdentityTables<Subject, External, NativeId>) => {
74
+ export declare const makePgExternalIdentityServices: <Subject extends AnyPgTable, External extends AnyPgTable, NativeId>(database: Database, mapping: ExternalIdentityTables<Subject, External, NativeId>) => {
75
75
  readonly externalIdentityMutation: {
76
76
  readonly bind: (subjectId: SubjectId, identity: ExternalIdentity) => Effect.Effect<void, IdentityConflict | IdentityUnavailable>;
77
77
  };
78
78
  };
79
79
  //#endregion
80
- export { coordinatePgAuthStoreTransaction, coordinatePgAuthTransaction, coordinatePgOAuthStateTransaction, makePgAuthStoreServices, makePgExternalIdentityServices, makePgOAuthStateServices, makePgSubjectProvisioningServices };
81
80
  //# sourceMappingURL=pg.d.mts.map
@@ -9,13 +9,13 @@ import { InferInsertModel, InferSelectModel, SQL, Table } from "drizzle-orm";
9
9
  //#region src/drizzle/phone-model.d.ts
10
10
  declare const proofMapping: unique symbol;
11
11
  /** Opaque same-owner proof mapping. The builder preserves the consumer's table codecs. */
12
- interface PhoneProofCompletionMapping {
12
+ export interface PhoneProofCompletionMapping {
13
13
  readonly [proofMapping]: AnyProofPersistenceMapping;
14
14
  }
15
- declare const phoneProofCompletionMapping: <Rq extends Table, S extends Table, G extends Table, Cn extends Table, Rs extends Table, A extends Table, F extends Table, C extends Table, Sub extends Table, I extends Table, Cr extends Table, N>(mapping: ProofPersistenceMapping<Rq, S, G, Cn, Rs, A, F, C, Sub, I, Cr, N>) => PhoneProofCompletionMapping;
16
- type PhoneColumn<T extends Table> = Extract<keyof T["_"]["columns"], string>;
17
- type PhoneMappingSource<M, R = never> = M | Effect.Effect<M, PersistenceMappingError, R>;
18
- declare const requiredPhoneConstraints: {
15
+ export declare const phoneProofCompletionMapping: <Rq extends Table, S extends Table, G extends Table, Cn extends Table, Rs extends Table, A extends Table, F extends Table, C extends Table, Sub extends Table, I extends Table, Cr extends Table, N>(mapping: ProofPersistenceMapping<Rq, S, G, Cn, Rs, A, F, C, Sub, I, Cr, N>) => PhoneProofCompletionMapping;
16
+ export type PhoneColumn<T extends Table> = Extract<keyof T["_"]["columns"], string>;
17
+ export type PhoneMappingSource<M, R = never> = M | Effect.Effect<M, PersistenceMappingError, R>;
18
+ export declare const requiredPhoneConstraints: {
19
19
  readonly subject: "unique(id)";
20
20
  readonly identifier: "unique(namespace,value)";
21
21
  readonly credential: "unique(credentialId)";
@@ -26,7 +26,7 @@ declare const requiredPhoneConstraints: {
26
26
  * counters. Never delete custody rows to make a recycled number eligible. A consumer's
27
27
  * explicit recovery workflow may resolve custody only after independent authentication.
28
28
  * Subject defaults own account provisioning; no email/profile schema is prescribed. */
29
- interface PhoneMapping<S extends Table, I extends Table, C extends Table, T extends Table, N> {
29
+ export interface PhoneMapping<S extends Table, I extends Table, C extends Table, T extends Table, N> {
30
30
  readonly moduleId: string;
31
31
  readonly policy: PhoneLifecyclePolicy;
32
32
  readonly admission: PhoneAdmissionPolicy;
@@ -98,18 +98,17 @@ interface PhoneMapping<S extends Table, I extends Table, C extends Table, T exte
98
98
  readonly encodeInstant: (millis: number) => unknown;
99
99
  readonly engineNowMillis: SQL;
100
100
  }
101
- interface D1PhoneMapping {
101
+ export interface D1PhoneMapping {
102
102
  readonly d1: {
103
103
  readonly primary: true;
104
104
  };
105
105
  }
106
- interface PhonePersistenceServices {
106
+ export interface PhonePersistenceServices {
107
107
  readonly phonePersistence: PhonePersistence["Service"];
108
108
  readonly phoneAdmission: PhoneAdmission["Service"];
109
109
  readonly phoneSignInTargets: PhoneSignInTargets["Service"];
110
110
  }
111
111
  /** Bundle phone storage, admission, and lookup with overridable crypto and hook defaults. */
112
- declare const phonePersistenceLayer: <E, R>(services: Effect.Effect<PhonePersistenceServices, E, R>) => Layer.Layer<PhoneAdmission | PhonePersistence | PhoneSignInTargets, E, Exclude<Exclude<R, import("effect/Scope").Scope>, import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | import("@yielded/auth/WebCrypto").SubtleCrypto>>;
112
+ export declare const phonePersistenceLayer: <E, R>(services: Effect.Effect<PhonePersistenceServices, E, R>) => Layer.Layer<PhoneAdmission | PhonePersistence | PhoneSignInTargets, E, Exclude<Exclude<R, import("effect/Scope").Scope>, import("effect/Crypto").Crypto | import("@yielded/auth/Hooks").LifecycleHooks | import("@yielded/auth/WebCrypto").SubtleCrypto>>;
113
113
  //#endregion
114
- export { D1PhoneMapping, PhoneColumn, PhoneMapping, PhoneMappingSource, PhonePersistenceServices, PhoneProofCompletionMapping, phonePersistenceLayer, phoneProofCompletionMapping, requiredPhoneConstraints };
115
114
  //# sourceMappingURL=phone-model.d.mts.map
@@ -11,7 +11,6 @@ import { PhoneAdmission, PhoneConfigurationError, PhoneOtpUnavailable, PhonePers
11
11
  import { Table } from "drizzle-orm";
12
12
  import { Statement } from "effect/unstable/sql/Statement";
13
13
  //#region src/drizzle/phone-target.d.ts
14
- type PhoneCoordinatorError<E> = TransactionCoordinatorError<E, PhoneOtpUnavailable> | PhoneConfigurationError | PersistenceMappingError;
14
+ export type PhoneCoordinatorError<E> = TransactionCoordinatorError<E, PhoneOtpUnavailable> | PhoneConfigurationError | PersistenceMappingError;
15
15
  //#endregion
16
- export { PhoneCoordinatorError };
17
16
  //# sourceMappingURL=phone-target.d.mts.map