@yielded/auth-persistence-drizzle 0.1.0-beta.22 → 0.1.0-beta.24

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 (200) hide show
  1. package/README.md +3 -0
  2. package/dist/D1.d.mts +11 -11
  3. package/dist/D1.mjs +2 -1
  4. package/dist/D1.mjs.map +1 -1
  5. package/dist/Libsql.d.mts +40 -56
  6. package/dist/Libsql.mjs +2 -1
  7. package/dist/Libsql.mjs.map +1 -1
  8. package/dist/Mysql2.d.mts +16 -17
  9. package/dist/Pglite.d.mts +18 -18
  10. package/dist/Pglite.mjs +2 -1
  11. package/dist/Pglite.mjs.map +1 -1
  12. package/dist/Postgres.d.mts +24 -24
  13. package/dist/Postgres.mjs +2 -1
  14. package/dist/Postgres.mjs.map +1 -1
  15. package/dist/SqliteBun.d.mts +39 -55
  16. package/dist/SqliteBun.mjs +2 -1
  17. package/dist/SqliteBun.mjs.map +1 -1
  18. package/dist/SqliteDo.d.mts +48 -64
  19. package/dist/SqliteDo.mjs +2 -1
  20. package/dist/SqliteDo.mjs.map +1 -1
  21. package/dist/SqliteNode.d.mts +45 -61
  22. package/dist/SqliteNode.mjs +2 -1
  23. package/dist/SqliteNode.mjs.map +1 -1
  24. package/dist/SqliteWasm.d.mts +48 -64
  25. package/dist/SqliteWasm.mjs +2 -1
  26. package/dist/SqliteWasm.mjs.map +1 -1
  27. package/dist/drizzle/crypto.mjs +1 -1
  28. package/dist/drizzle/d1-emails.d.mts +1 -1
  29. package/dist/drizzle/d1-oauth.d.mts +14 -14
  30. package/dist/drizzle/d1-passkey.d.mts +1 -1
  31. package/dist/drizzle/d1-password-prepared.d.mts +4 -4
  32. package/dist/drizzle/d1-password-prepared.mjs.map +1 -1
  33. package/dist/drizzle/d1-passwords.d.mts +18 -35
  34. package/dist/drizzle/d1-passwords.mjs +78 -290
  35. package/dist/drizzle/d1-passwords.mjs.map +1 -1
  36. package/dist/drizzle/d1-phone.d.mts +1 -1
  37. package/dist/drizzle/d1-proofs.d.mts +2 -2
  38. package/dist/drizzle/d1-sessions.d.mts +3 -3
  39. package/dist/drizzle/d1-sessions.mjs +11 -6
  40. package/dist/drizzle/d1-sessions.mjs.map +1 -1
  41. package/dist/drizzle/d1-totp.d.mts +1 -1
  42. package/dist/drizzle/mysql-password-prepared.d.mts +5 -5
  43. package/dist/drizzle/mysql-password-prepared.mjs.map +1 -1
  44. package/dist/drizzle/mysql-passwords.d.mts +16 -32
  45. package/dist/drizzle/mysql-passwords.mjs.map +1 -1
  46. package/dist/drizzle/mysql-sessions.d.mts +1 -1
  47. package/dist/drizzle/native-sql-table.mjs +135 -0
  48. package/dist/drizzle/native-sql-table.mjs.map +1 -0
  49. package/dist/drizzle/oauth-connected-model.d.mts +20 -281
  50. package/dist/drizzle/oauth-connected-model.mjs +3 -17
  51. package/dist/drizzle/oauth-connected-model.mjs.map +1 -1
  52. package/dist/drizzle/oauth-connected-reference.d.mts +1 -3
  53. package/dist/drizzle/oauth-connected-reference.mjs +4 -53
  54. package/dist/drizzle/oauth-connected-reference.mjs.map +1 -1
  55. package/dist/drizzle/oauth-connected-target.d.mts +3 -990
  56. package/dist/drizzle/oauth-connected-target.mjs +8 -92
  57. package/dist/drizzle/oauth-connected-target.mjs.map +1 -1
  58. package/dist/drizzle/oauth-kernel.mjs +11 -0
  59. package/dist/drizzle/oauth-kernel.mjs.map +1 -0
  60. package/dist/drizzle/oauth-model.d.mts +35 -438
  61. package/dist/drizzle/oauth-model.mjs +6 -44
  62. package/dist/drizzle/oauth-model.mjs.map +1 -1
  63. package/dist/drizzle/oauth-mysql.mjs +2 -2
  64. package/dist/drizzle/oauth-mysql.mjs.map +1 -1
  65. package/dist/drizzle/oauth-proxy.d.mts +10 -0
  66. package/dist/drizzle/oauth-proxy.mjs +54 -0
  67. package/dist/drizzle/oauth-proxy.mjs.map +1 -0
  68. package/dist/drizzle/oauth-target.d.mts +6 -107
  69. package/dist/drizzle/oauth-target.mjs +15 -245
  70. package/dist/drizzle/oauth-target.mjs.map +1 -1
  71. package/dist/drizzle/password-model.d.mts +5 -8
  72. package/dist/drizzle/password-prepared-model.d.mts +5 -5
  73. package/dist/drizzle/password-prepared-model.mjs.map +1 -1
  74. package/dist/drizzle/password-prepared-state.mjs +1 -1
  75. package/dist/drizzle/password-sql.mjs +2 -1
  76. package/dist/drizzle/password-sql.mjs.map +1 -1
  77. package/dist/drizzle/password-target.mjs +13 -2
  78. package/dist/drizzle/password-target.mjs.map +1 -1
  79. package/dist/drizzle/pg-password-prepared.d.mts +5 -5
  80. package/dist/drizzle/pg-password-prepared.mjs.map +1 -1
  81. package/dist/drizzle/pg-passwords.d.mts +16 -32
  82. package/dist/drizzle/pg-passwords.mjs.map +1 -1
  83. package/dist/drizzle/pg-sessions.d.mts +1 -1
  84. package/dist/drizzle/phone-target.d.mts +2 -2
  85. package/dist/drizzle/phone-target.mjs +1 -1
  86. package/dist/drizzle/query-operations.mjs +3 -1
  87. package/dist/drizzle/query-operations.mjs.map +1 -1
  88. package/dist/drizzle/session-sql.mjs +2 -1
  89. package/dist/drizzle/session-sql.mjs.map +1 -1
  90. package/dist/drizzle/sqlite-password-prepared.mjs.map +1 -1
  91. package/dist/drizzle/sqlite-passwords.mjs.map +1 -1
  92. package/dist/drizzle/storage-validation.mjs +10 -198
  93. package/dist/drizzle/storage-validation.mjs.map +1 -1
  94. package/dist/drizzle/totp-target.d.mts +3 -3
  95. package/dist/drizzle/totp-target.mjs +2 -2
  96. package/dist/drizzle/transaction-execution.d.mts +2 -2
  97. package/dist/drizzle/transaction-owner.d.mts +1 -2
  98. package/dist/index.d.mts +3 -2
  99. package/dist/internal/drizzle-postgres-oauth-proxy.d.mts +138 -0
  100. package/dist/internal/drizzle-postgres-oauth-proxy.mjs +29 -0
  101. package/dist/internal/drizzle-postgres-oauth-proxy.mjs.map +1 -0
  102. package/dist/internal/drizzle-postgres.mjs +2 -0
  103. package/dist/internal/drizzle-postgres.mjs.map +1 -1
  104. package/dist/internal/drizzle-sqlite-oauth-proxy.d.mts +146 -0
  105. package/dist/internal/drizzle-sqlite-oauth-proxy.mjs +29 -0
  106. package/dist/internal/drizzle-sqlite-oauth-proxy.mjs.map +1 -0
  107. package/dist/internal/drizzle-sqlite.mjs +2 -0
  108. package/dist/internal/drizzle-sqlite.mjs.map +1 -1
  109. package/package.json +1 -1
  110. package/src/D1.ts +2 -0
  111. package/src/Libsql.ts +2 -0
  112. package/src/Pglite.ts +2 -0
  113. package/src/Postgres.ts +2 -0
  114. package/src/SqliteBun.ts +2 -0
  115. package/src/SqliteDo.ts +2 -0
  116. package/src/SqliteNode.ts +2 -0
  117. package/src/SqliteWasm.ts +2 -0
  118. package/src/drizzle/d1-password-prepared.ts +2 -23
  119. package/src/drizzle/d1-passwords.ts +158 -780
  120. package/src/drizzle/d1-sessions.ts +21 -6
  121. package/src/drizzle/mysql-password-prepared.ts +4 -16
  122. package/src/drizzle/mysql-passwords.ts +5 -20
  123. package/src/drizzle/native-sql-table.ts +259 -0
  124. package/src/drizzle/oauth-connected-model.ts +97 -315
  125. package/src/drizzle/oauth-connected-reference.ts +13 -93
  126. package/src/drizzle/oauth-connected-target.ts +14 -271
  127. package/src/drizzle/oauth-kernel.ts +10 -0
  128. package/src/drizzle/oauth-model.ts +188 -541
  129. package/src/drizzle/oauth-mysql.ts +2 -2
  130. package/src/drizzle/oauth-proxy.ts +101 -0
  131. package/src/drizzle/oauth-target.ts +33 -737
  132. package/src/drizzle/password-model.ts +0 -33
  133. package/src/drizzle/password-prepared-model.ts +0 -18
  134. package/src/drizzle/password-sql.ts +3 -0
  135. package/src/drizzle/password-target.ts +41 -4
  136. package/src/drizzle/pg-password-prepared.ts +4 -16
  137. package/src/drizzle/pg-passwords.ts +5 -20
  138. package/src/drizzle/query-operations.ts +4 -0
  139. package/src/drizzle/session-sql.ts +2 -1
  140. package/src/drizzle/sqlite-password-prepared.ts +4 -52
  141. package/src/drizzle/sqlite-passwords.ts +7 -28
  142. package/src/drizzle/storage-validation.ts +13 -222
  143. package/src/index.ts +2 -8
  144. package/src/internal/drizzle-postgres-oauth-proxy.ts +37 -0
  145. package/src/internal/drizzle-postgres.ts +2 -0
  146. package/src/internal/drizzle-sqlite-oauth-proxy.ts +44 -0
  147. package/src/internal/drizzle-sqlite.ts +2 -0
  148. package/dist/_virtual/_rolldown/runtime.mjs +0 -13
  149. package/dist/drizzle/oauth-accounts.mjs +0 -359
  150. package/dist/drizzle/oauth-accounts.mjs.map +0 -1
  151. package/dist/drizzle/oauth-connected-access.mjs +0 -212
  152. package/dist/drizzle/oauth-connected-access.mjs.map +0 -1
  153. package/dist/drizzle/oauth-connected-collection.mjs +0 -202
  154. package/dist/drizzle/oauth-connected-collection.mjs.map +0 -1
  155. package/dist/drizzle/oauth-connected-custody.mjs +0 -147
  156. package/dist/drizzle/oauth-connected-custody.mjs.map +0 -1
  157. package/dist/drizzle/oauth-connected-flow.mjs +0 -297
  158. package/dist/drizzle/oauth-connected-flow.mjs.map +0 -1
  159. package/dist/drizzle/oauth-connected-input.mjs +0 -122
  160. package/dist/drizzle/oauth-connected-input.mjs.map +0 -1
  161. package/dist/drizzle/oauth-connected-maintenance.mjs +0 -214
  162. package/dist/drizzle/oauth-connected-maintenance.mjs.map +0 -1
  163. package/dist/drizzle/oauth-connected-management.mjs +0 -229
  164. package/dist/drizzle/oauth-connected-management.mjs.map +0 -1
  165. package/dist/drizzle/oauth-connected-settlement.mjs +0 -128
  166. package/dist/drizzle/oauth-connected-settlement.mjs.map +0 -1
  167. package/dist/drizzle/oauth-connected-sign-in.mjs +0 -265
  168. package/dist/drizzle/oauth-connected-sign-in.mjs.map +0 -1
  169. package/dist/drizzle/oauth-connected-state.d.mts +0 -2062
  170. package/dist/drizzle/oauth-connected-state.mjs +0 -430
  171. package/dist/drizzle/oauth-connected-state.mjs.map +0 -1
  172. package/dist/drizzle/oauth-flow.d.mts +0 -22
  173. package/dist/drizzle/oauth-flow.mjs +0 -253
  174. package/dist/drizzle/oauth-flow.mjs.map +0 -1
  175. package/dist/drizzle/oauth-input.mjs +0 -127
  176. package/dist/drizzle/oauth-input.mjs.map +0 -1
  177. package/dist/drizzle/oauth-owner.d.mts +0 -10
  178. package/dist/drizzle/oauth-owner.mjs +0 -10
  179. package/dist/drizzle/oauth-owner.mjs.map +0 -1
  180. package/dist/drizzle/oauth-registration.d.mts +0 -5
  181. package/dist/drizzle/oauth-registration.mjs +0 -374
  182. package/dist/drizzle/oauth-registration.mjs.map +0 -1
  183. package/dist/drizzle/oauth-state.mjs +0 -107
  184. package/dist/drizzle/oauth-state.mjs.map +0 -1
  185. package/src/drizzle/oauth-accounts.ts +0 -805
  186. package/src/drizzle/oauth-connected-access.ts +0 -361
  187. package/src/drizzle/oauth-connected-collection.ts +0 -324
  188. package/src/drizzle/oauth-connected-custody.ts +0 -279
  189. package/src/drizzle/oauth-connected-flow.ts +0 -529
  190. package/src/drizzle/oauth-connected-input.ts +0 -147
  191. package/src/drizzle/oauth-connected-maintenance.ts +0 -346
  192. package/src/drizzle/oauth-connected-management.ts +0 -365
  193. package/src/drizzle/oauth-connected-settlement.ts +0 -251
  194. package/src/drizzle/oauth-connected-sign-in.ts +0 -443
  195. package/src/drizzle/oauth-connected-state.ts +0 -872
  196. package/src/drizzle/oauth-flow.ts +0 -462
  197. package/src/drizzle/oauth-input.ts +0 -201
  198. package/src/drizzle/oauth-owner.ts +0 -29
  199. package/src/drizzle/oauth-registration.ts +0 -640
  200. package/src/drizzle/oauth-state.ts +0 -218
@@ -1,331 +1,140 @@
1
- import type {
2
- OAuthActionAuthorization,
3
- OAuthAccountRevision,
4
- OAuthRegistrationIntent,
5
- OAuthCredentialSnapshot,
6
- OAuthExternalIdentity,
7
- } from "@yielded/auth/OAuth";
8
- import type { AuthenticationFactor } from "@yielded/auth/Operations";
9
- import type { AuthenticationRequirement, SecurityRevision } from "@yielded/auth/Sessions";
10
- import type { InferInsertModel, InferSelectModel, SQL, Table } from "drizzle-orm";
11
- import type { Crypto, Effect, PlatformError } from "effect";
12
-
13
- import type { PersistenceMappingError, SubjectIdCodec } from "./model";
14
-
15
- type Column<T extends Table> = Extract<keyof T["_"]["columns"], string>;
16
-
17
- export type OAuthFlowState =
18
- | "Pending"
19
- | "Claimed"
20
- | "Verified"
21
- | "RegistrationIssued"
22
- | "Linked"
23
- | "Cancelled"
24
- | "Rejected"
25
- | "Ambiguous"
26
- | "Conflict";
27
-
28
- export type OAuthTupleState = "Unowned" | "Reserved" | "Owned";
29
- export type OAuthRegistrationState = "Unbound" | "Registered" | "ProvisioningPending" | "Rejected";
30
- export type OAuthAction = OAuthActionAuthorization["challenge"]["action"];
1
+ import * as Shared from "@yielded/auth-persistence/Adapter";
2
+ import type { SQL, Table } from "drizzle-orm";
3
+
4
+ import type { DrizzleTableModel } from "./table-model";
5
+
6
+ export {
7
+ type OAuthFlowState,
8
+ type OAuthTupleState,
9
+ type OAuthRegistrationState,
10
+ type OAuthAction,
11
+ type OAuthEligibilityFact,
12
+ type OAuthD1Mapping,
13
+ requiredOAuthSignInConstraints,
14
+ requiredOAuthTupleConstraints,
15
+ requiredOAuthRegistrationConstraints,
16
+ requiredOAuthAccountsConstraints,
17
+ type OAuthRegistrationAuthority,
18
+ } from "@yielded/auth-persistence/Adapter";
31
19
 
32
20
  /** The engine writes every critical column explicitly after applying the pure
33
21
  * consumer encoder. Native instant values must roundtrip without precision loss. */
34
- export interface OAuthClock {
35
- readonly encodeInstant: (millis: number) => unknown;
36
- readonly decodeInstant: (value: unknown) => number;
37
- /** Actual engine wall clock sampled after locks, not transaction-start time.
38
- * PostgreSQL uses clock_timestamp(), never now()/CURRENT_TIMESTAMP. D1 repeats
39
- * its primary-engine sample bounds in final guards. Return integer milliseconds. */
40
- readonly engineNowMillis: SQL;
41
- }
42
-
43
- export interface OAuthSubjectReadTable<S extends Table> {
44
- readonly table: S;
45
- readonly id: Column<S>;
46
- readonly status: Column<S>;
47
- readonly securityRevision: Column<S>;
48
- readonly isActiveStatus: (value: unknown) => boolean;
49
- readonly activeCondition: SQL;
50
- }
51
-
52
- export interface OAuthSubjectTable<S extends Table> extends OAuthSubjectReadTable<S> {
53
- readonly decodeActionRequirement: (
54
- row: InferSelectModel<S>,
55
- action: OAuthAction,
56
- ) => AuthenticationRequirement;
57
- readonly decodeAuthenticationRequirement: (row: InferSelectModel<S>) => AuthenticationRequirement;
58
- readonly nextSecurityRevision: (current: SecurityRevision) => SecurityRevision;
59
- }
60
-
61
- export interface OAuthOwnershipReadTable<O extends Table, N> {
62
- readonly table: O;
63
- readonly identityKey: Column<O>;
64
- readonly provider: Column<O>;
65
- readonly issuer: Column<O>;
66
- readonly externalSubject: Column<O>;
67
- readonly subjectId: Column<O>;
68
- /** Includes Owned state when authority and ownership share a physical table. */
69
- readonly ownedCondition: SQL;
70
- readonly decodeSubjectId: (row: InferSelectModel<O>) => N;
71
- }
72
-
73
- export interface OAuthOwnershipTable<O extends Table, N> extends OAuthOwnershipReadTable<O, N> {
74
- readonly encodeInsert: (input: {
75
- readonly identity: typeof OAuthExternalIdentity.Type;
76
- readonly identityKey: string;
77
- readonly subjectId: N;
78
- }) => InferInsertModel<O>;
79
- }
80
-
81
- export interface OAuthCredentialReadTable<C extends Table> {
82
- readonly table: C;
83
- readonly moduleId: Column<C>;
84
- readonly credentialId: Column<C>;
85
- readonly subjectId: Column<C>;
86
- readonly identityKey: Column<C>;
87
- readonly credentialRevision: Column<C>;
88
- readonly status: Column<C>;
89
- readonly isActiveStatus: (value: unknown) => boolean;
90
- readonly activeCondition: SQL;
91
- }
92
-
93
- export interface OAuthCredentialTable<C extends Table, N> extends OAuthCredentialReadTable<C> {
94
- readonly encodeInsert: (input: {
95
- readonly moduleId: string;
96
- readonly subjectId: N;
97
- readonly identityKey: string;
98
- readonly credentialId: string;
99
- readonly credentialRevision: SecurityRevision;
100
- }) => InferInsertModel<C>;
101
- /** This slice removes login rows. Historical records belong in separate audit storage. */
102
- readonly removal: "delete";
103
- }
104
-
105
- export interface OAuthAuthorityReadTable<C extends Table> {
106
- readonly table: C;
107
- readonly subjectId: Column<C>;
108
- readonly credentialId: Column<C>;
109
- readonly revision: Column<C>;
110
- readonly status: Column<C>;
111
- readonly isActiveStatus: (value: unknown) => boolean;
112
- readonly activeCondition: SQL;
113
- }
114
-
115
- export interface OAuthAuthorityTable<C extends Table, N> extends OAuthAuthorityReadTable<C> {
116
- readonly encodeInsert: (input: {
117
- readonly subjectId: N;
118
- readonly credentialId: string;
119
- readonly revision: SecurityRevision;
120
- }) => InferInsertModel<C>;
121
- }
22
+ export type OAuthClock = Shared.OAuthClock<SQL>;
23
+
24
+ export type OAuthSubjectReadTable<S extends Table> = Shared.OAuthSubjectReadTable<
25
+ DrizzleTableModel<S>,
26
+ SQL
27
+ >;
28
+
29
+ export type OAuthSubjectTable<S extends Table> = Shared.OAuthSubjectTable<
30
+ DrizzleTableModel<S>,
31
+ SQL
32
+ >;
33
+
34
+ export type OAuthOwnershipReadTable<O extends Table, N> = Shared.OAuthOwnershipReadTable<
35
+ DrizzleTableModel<O>,
36
+ N,
37
+ SQL
38
+ >;
39
+
40
+ export type OAuthOwnershipTable<O extends Table, N> = Shared.OAuthOwnershipTable<
41
+ DrizzleTableModel<O>,
42
+ N,
43
+ SQL
44
+ >;
45
+
46
+ export type OAuthCredentialReadTable<C extends Table> = Shared.OAuthCredentialReadTable<
47
+ DrizzleTableModel<C>,
48
+ SQL
49
+ >;
50
+
51
+ export type OAuthCredentialTable<C extends Table, N> = Shared.OAuthCredentialTable<
52
+ DrizzleTableModel<C>,
53
+ N,
54
+ SQL
55
+ >;
56
+
57
+ export type OAuthAuthorityReadTable<C extends Table> = Shared.OAuthAuthorityReadTable<
58
+ DrizzleTableModel<C>,
59
+ SQL
60
+ >;
61
+
62
+ export type OAuthAuthorityTable<C extends Table, N> = Shared.OAuthAuthorityTable<
63
+ DrizzleTableModel<C>,
64
+ N,
65
+ SQL
66
+ >;
122
67
 
123
68
  /** Both purposes may use the same physical table. Shared tables share module/flow
124
69
  * and module/command uniqueness. The snapshot has the exact purpose-specific core
125
70
  * codec; terminal writes erase it, while identity, claim and retention columns remain. */
126
- export interface OAuthFlowTable<F extends Table> {
127
- readonly table: F;
128
- readonly moduleId: Column<F>;
129
- readonly flowId: Column<F>;
130
- readonly commandId: Column<F>;
131
- readonly purpose: Column<F>;
132
- readonly generation: Column<F>;
133
- readonly state: Column<F>;
134
- readonly version: Column<F>;
135
- readonly stateDigest: Column<F>;
136
- readonly binderVerifier: Column<F>;
137
- readonly binderExpiresAt: Column<F>;
138
- readonly snapshot: Column<F>;
139
- readonly issuedAt: Column<F>;
140
- readonly expiresAt: Column<F>;
141
- readonly claimId: Column<F>;
142
- readonly claimedAt: Column<F>;
143
- readonly claimExpiresAt: Column<F>;
144
- readonly retentionUntil: Column<F>;
145
- readonly encodeInsert: (input: {
146
- readonly moduleId: string;
147
- readonly flowId: string;
148
- readonly purpose: "sign-in" | "link";
149
- }) => InferInsertModel<F>;
150
- }
151
-
152
- export interface OAuthTupleAuthorityTable<T extends Table, N> {
153
- readonly table: T;
154
- readonly identityKey: Column<T>;
155
- readonly provider: Column<T>;
156
- readonly issuer: Column<T>;
157
- readonly externalSubject: Column<T>;
158
- readonly state: Column<T>;
159
- readonly version: Column<T>;
160
- readonly subjectId: Column<T>;
161
- /** Exact reservation identity; no application payload or bearer. */
162
- readonly reservation: Column<T>;
163
- readonly encodeInsert: (input: {
164
- readonly identityKey: string;
165
- readonly identity: typeof OAuthExternalIdentity.Type;
166
- readonly subjectId?: N;
167
- }) => InferInsertModel<T>;
168
- }
169
-
170
- export interface OAuthRegistrationIntentTable<I extends Table> {
171
- readonly table: I;
172
- readonly moduleId: Column<I>;
173
- readonly reference: Column<I>;
174
- readonly flowId: Column<I>;
175
- readonly claimId: Column<I>;
176
- readonly identityKey: Column<I>;
177
- readonly version: Column<I>;
178
- readonly state: Column<I>;
179
- readonly snapshot: Column<I>;
180
- readonly commandId: Column<I>;
181
- readonly fingerprint: Column<I>;
182
- readonly pendingReference: Column<I>;
183
- readonly expiresAt: Column<I>;
184
- readonly retentionUntil: Column<I>;
185
- readonly encodeInsert: (intent: OAuthRegistrationIntent) => InferInsertModel<I>;
186
- }
187
-
188
- export interface OAuthRegistrationCommandTable<R extends Table, Registration> {
189
- readonly table: R;
190
- readonly moduleId: Column<R>;
191
- readonly commandId: Column<R>;
192
- readonly reference: Column<R>;
193
- readonly identityKey: Column<R>;
194
- readonly fingerprint: Column<R>;
195
- readonly intentSnapshot: Column<R>;
196
- readonly applicationSnapshot: Column<R>;
197
- readonly provisioningIdentity: Column<R>;
198
- readonly decision: Column<R>;
199
- readonly retentionUntil: Column<R>;
200
- /** Persists exact detached Type before protected pending work can start. */
201
- readonly encodeInsert: (input: {
202
- readonly intent: OAuthRegistrationIntent;
203
- readonly commandId: string;
204
- readonly fingerprint: string;
205
- readonly registration: Registration;
206
- readonly provisioningIdentity: string;
207
- }) => InferInsertModel<R>;
208
- }
209
-
210
- export interface OAuthUnlinkCommandTable<U extends Table> {
211
- readonly table: U;
212
- readonly moduleId: Column<U>;
213
- readonly commandId: Column<U>;
214
- readonly subjectId: Column<U>;
215
- readonly credentialId: Column<U>;
216
- readonly intentSnapshot: Column<U>;
217
- readonly decision: Column<U>;
218
- readonly retentionUntil: Column<U>;
219
- readonly encodeInsert: (input: {
220
- readonly moduleId: string;
221
- readonly commandId: string;
222
- readonly credential: OAuthCredentialSnapshot;
223
- }) => InferInsertModel<U>;
224
- }
225
-
226
- export interface OAuthEligibilityFact {
227
- readonly credentialId: string;
228
- readonly revision: SecurityRevision;
229
- readonly usablePrimary: boolean;
230
- readonly factors: ReadonlyArray<AuthenticationFactor>;
231
- readonly userVerified: boolean;
232
- readonly phishingResistant: boolean;
233
- }
71
+ export type OAuthFlowTable<F extends Table> = Shared.OAuthFlowTable<DrizzleTableModel<F>>;
72
+
73
+ export type OAuthTupleAuthorityTable<T extends Table, N> = Shared.OAuthTupleAuthorityTable<
74
+ DrizzleTableModel<T>,
75
+ N
76
+ >;
77
+
78
+ export type OAuthRegistrationIntentTable<I extends Table> = Shared.OAuthRegistrationIntentTable<
79
+ DrizzleTableModel<I>
80
+ >;
81
+
82
+ export type OAuthRegistrationCommandTable<
83
+ R extends Table,
84
+ Registration,
85
+ > = Shared.OAuthRegistrationCommandTable<DrizzleTableModel<R>, Registration>;
86
+
87
+ export type OAuthUnlinkCommandTable<U extends Table> = Shared.OAuthUnlinkCommandTable<
88
+ DrizzleTableModel<U>
89
+ >;
234
90
 
235
91
  /** Each descriptor reads only its own subject-scoped method rows. The native row
236
92
  * projector and SQL condition must express the same installed method eligibility.
237
93
  * All source/identifier/policy mutations advance subject securityRevision. D1 also
238
94
  * guards exact selected IDs/versions and absence/count assumptions, never just a
239
95
  * stale boolean. An over-limit graph fails closed rather than truncating. */
240
- export interface OAuthEligibilityTable<T extends Table, N> {
241
- readonly table: T;
242
- readonly subjectId: Column<T>;
243
- readonly credentialId: Column<T>;
244
- readonly revision: Column<T>;
245
- readonly scope: string;
246
- readonly condition: (subjectId: N) => SQL;
247
- readonly decode: (row: InferSelectModel<T>) => OAuthEligibilityFact | undefined;
248
- }
96
+ export type OAuthEligibilityTable<T extends Table, N> = Shared.OAuthEligibilityTable<
97
+ DrizzleTableModel<T>,
98
+ N,
99
+ SQL
100
+ >;
249
101
 
250
102
  /** Authenticated command replay uses current subject status and this additional
251
103
  * nonconsuming SQL policy. It never consumes a fresh action factor. */
252
- export interface OAuthMetadataPolicy<N> {
253
- readonly condition: (subjectId: N) => SQL;
254
- }
255
-
256
- export interface OAuthCleanupTable<T extends Table, N> {
257
- readonly table: T;
258
- readonly subjectId: Column<T>;
259
- /** Bound to this subject's old revision; no opaque independently committing service. */
260
- readonly condition: (input: {
261
- readonly subjectId: N;
262
- readonly revision: OAuthAccountRevision;
263
- readonly removedCredentialId?: string;
264
- }) => SQL;
265
- readonly disposition: "delete";
266
- }
267
-
268
- export interface OAuthRegistrationEligibility<N> {
269
- /** Pure SQL guards for mutable app policy; evaluated again after app writes. */
270
- readonly condition: (input: {
271
- readonly intent: OAuthRegistrationIntent;
272
- readonly nativeSubjectId?: N;
273
- }) => SQL;
274
- }
275
-
276
- export interface OAuthD1Mapping {
277
- readonly d1: { readonly primary: true };
278
- }
279
-
280
- export const requiredOAuthSignInConstraints = {
281
- flow: "unique(flow.moduleId,flow.flowId)",
282
- command: "unique(flow.moduleId,flow.commandId)",
283
- stateDigest: "unique(flow.stateDigest)",
284
- ownership: "unique(ownership.identityKey)",
285
- credentialId: "unique(credential.credentialId)",
286
- credentialIdentity: "unique(credential.identityKey)",
287
- authorityCredential: "unique(authority.subjectId,authority.credentialId)",
288
- } as const;
289
-
290
- export const requiredOAuthTupleConstraints = { identityKey: "unique(tuple.identityKey)" } as const;
291
-
292
- export const requiredOAuthRegistrationConstraints = {
293
- intentReference: "unique(intent.moduleId,intent.reference)",
294
- intentFlow: "unique(intent.moduleId,intent.flowId)",
295
- command: "unique(registrationCommand.moduleId,registrationCommand.commandId)",
296
- } as const;
297
-
298
- export const requiredOAuthAccountsConstraints = {
299
- unlinkCommand: "unique(unlinkCommand.moduleId,unlinkCommand.commandId)",
300
- } as const;
301
-
302
- export interface OAuthSignInMapping<
104
+ export type OAuthMetadataPolicy<N> = Shared.OAuthMetadataPolicy<N, SQL>;
105
+
106
+ export type OAuthCleanupTable<T extends Table, N> = Shared.OAuthCleanupTable<
107
+ DrizzleTableModel<T>,
108
+ N,
109
+ SQL
110
+ >;
111
+
112
+ export type OAuthRegistrationEligibility<N> = Shared.OAuthRegistrationEligibility<N, SQL>;
113
+
114
+ export type OAuthSignInMapping<
303
115
  S extends Table,
304
116
  O extends Table,
305
117
  C extends Table,
306
118
  AC extends Table,
307
119
  F extends Table,
308
120
  N,
309
- > {
310
- readonly subject: OAuthSubjectReadTable<S>;
311
- readonly ownership: OAuthOwnershipReadTable<O, N>;
312
- readonly credential: OAuthCredentialReadTable<C>;
313
- readonly authority: OAuthAuthorityReadTable<AC>;
314
- readonly flow: OAuthFlowTable<F>;
315
- readonly subjectId: SubjectIdCodec<N>;
316
- readonly clock: OAuthClock;
317
- readonly constraints: typeof requiredOAuthSignInConstraints;
318
- }
319
-
320
- export type OAuthOwnershipMutation<T extends Table, O extends Table, N> =
321
- | { readonly mode: "integrated"; readonly tuple: OAuthTupleAuthorityTable<T, N> }
322
- | {
323
- readonly mode: "separate";
324
- readonly tuple: OAuthTupleAuthorityTable<T, N>;
325
- readonly external: OAuthOwnershipTable<O, N>;
326
- };
327
-
328
- export interface OAuthRegistrationIntentMapping<
121
+ > = Shared.OAuthSignInMapping<
122
+ DrizzleTableModel<S>,
123
+ DrizzleTableModel<O>,
124
+ DrizzleTableModel<C>,
125
+ DrizzleTableModel<AC>,
126
+ DrizzleTableModel<F>,
127
+ N,
128
+ SQL
129
+ >;
130
+
131
+ export type OAuthOwnershipMutation<
132
+ T extends Table,
133
+ O extends Table,
134
+ N,
135
+ > = Shared.OAuthOwnershipMutation<DrizzleTableModel<T>, DrizzleTableModel<O>, N, SQL>;
136
+
137
+ export type OAuthRegistrationIntentMapping<
329
138
  S extends Table,
330
139
  O extends Table,
331
140
  C extends Table,
@@ -334,104 +143,49 @@ export interface OAuthRegistrationIntentMapping<
334
143
  T extends Table,
335
144
  I extends Table,
336
145
  N,
337
- > {
338
- readonly signIn: OAuthSignInMapping<S, O, C, AC, F, N>;
339
- readonly ownership: OAuthOwnershipMutation<T, O, N>;
340
- readonly intent: OAuthRegistrationIntentTable<I>;
341
- readonly tupleConstraints: typeof requiredOAuthTupleConstraints;
342
- readonly registrationConstraints: Pick<
343
- typeof requiredOAuthRegistrationConstraints,
344
- "intentReference" | "intentFlow"
345
- >;
346
- readonly eligibility: OAuthRegistrationEligibility<N>;
347
- }
348
-
349
- export interface OAuthRegistrationBase<
146
+ > = Shared.OAuthRegistrationIntentMapping<
147
+ DrizzleTableModel<S>,
148
+ DrizzleTableModel<O>,
149
+ DrizzleTableModel<C>,
150
+ DrizzleTableModel<AC>,
151
+ DrizzleTableModel<F>,
152
+ DrizzleTableModel<T>,
153
+ DrizzleTableModel<I>,
154
+ N,
155
+ SQL
156
+ >;
157
+
158
+ export type OAuthRegistrationBase<
350
159
  Registration,
351
160
  T extends Table,
352
161
  O extends Table,
353
162
  I extends Table,
354
163
  R extends Table,
355
164
  N,
356
- > {
357
- readonly ownership: OAuthOwnershipMutation<T, O, N>;
358
- readonly intent: OAuthRegistrationIntentTable<I>;
359
- readonly command: OAuthRegistrationCommandTable<R, Registration>;
360
- readonly clock: OAuthClock;
361
- readonly tupleConstraints: typeof requiredOAuthTupleConstraints;
362
- readonly constraints: typeof requiredOAuthRegistrationConstraints;
363
- readonly inspect: (input: {
364
- readonly intent: OAuthRegistrationIntent;
365
- readonly registration: Registration;
366
- }) => Effect.Effect<
367
- { readonly fingerprint: string; readonly eligible: boolean },
368
- PersistenceMappingError
369
- >;
370
- /** Required for an explicitly bound native/DO command: no asynchronous callback
371
- * is evaluated inside the physical owner. Standalone inspection is pre-owner. */
372
- readonly inspectSync?: (input: {
373
- readonly intent: OAuthRegistrationIntent;
374
- readonly registration: Registration;
375
- }) => { readonly fingerprint: string; readonly eligible: boolean };
376
- /** Type projection, never the original wire transformation. */
377
- readonly snapshot: (
378
- registration: Registration,
379
- ) => Effect.Effect<Registration, PersistenceMappingError>;
380
- readonly snapshotSync?: (registration: Registration) => Registration;
381
- /** Canonical bounded storage of Registration.Type. These are Type codecs, not
382
- * the original wire decoder/encoder; decode(encode(value)) must encode identically.
383
- * The engine writes and roundtrip-checks this exact string (maximum 1 MiB). */
384
- readonly application: {
385
- readonly encode: (registration: Registration) => string;
386
- readonly decode: (stored: string) => Registration;
387
- };
388
- readonly eligibility: {
389
- /** Stable application authority anchors, in one configured global order.
390
- * Omit only for immutable/tuple-local policy or an equivalent explicit outer
391
- * owner lock. Each scope must match 1..64 rows, never an absent quota row.
392
- * Locks precede tuple/intent/command locks; postcondition owns changed state. */
393
- readonly guards?: ReadonlyArray<OAuthRegistrationGuardDescriptor<Registration, N>>;
394
- readonly admission: (input: {
395
- readonly intent: OAuthRegistrationIntent;
396
- readonly registration: Registration;
397
- readonly nativeSubjectId?: N;
398
- }) => SQL;
399
- /** Evaluated after subject/application writes, including appended coordinator
400
- * writes. May assert consumption of the admission invitation/quota. */
401
- readonly postcondition: (input: {
402
- readonly intent: OAuthRegistrationIntent;
403
- readonly registration: Registration;
404
- readonly nativeSubjectId?: N;
405
- }) => SQL;
406
- };
407
- readonly allocateProvisioningIdentity: Effect.Effect<string, PersistenceMappingError>;
408
- readonly retentionMillis: number;
409
- }
410
-
411
- export interface OAuthRegistrationGuardTable<T extends Table, Registration, N> {
412
- readonly table: T;
413
- readonly orderBy: Column<T>;
414
- readonly condition: (input: {
415
- readonly intent: OAuthRegistrationIntent;
416
- readonly registration: Registration;
417
- readonly nativeSubjectId?: N;
418
- }) => SQL;
419
- }
420
-
421
- export interface OAuthRegistrationGuardDescriptor<Registration, N> {
422
- readonly table: Table;
423
- readonly orderBy: string;
424
- readonly condition: OAuthRegistrationGuardTable<Table, Registration, N>["condition"];
425
- }
165
+ > = Shared.OAuthRegistrationBase<
166
+ Registration,
167
+ DrizzleTableModel<T>,
168
+ DrizzleTableModel<O>,
169
+ DrizzleTableModel<I>,
170
+ DrizzleTableModel<R>,
171
+ N,
172
+ SQL,
173
+ Table
174
+ >;
175
+
176
+ export type OAuthRegistrationGuardTable<
177
+ T extends Table,
178
+ Registration,
179
+ N,
180
+ > = Shared.OAuthRegistrationGuardTable<DrizzleTableModel<T>, Registration, N, SQL>;
181
+
182
+ export type OAuthRegistrationGuardDescriptor<Registration, N> =
183
+ Shared.OAuthRegistrationGuardDescriptor<Registration, N, SQL, Table>;
426
184
 
427
185
  export const oauthRegistrationGuardTable = <T extends Table, Registration, N>(
428
186
  input: OAuthRegistrationGuardTable<T, Registration, N>,
429
187
  ): OAuthRegistrationGuardDescriptor<Registration, N> =>
430
- Object.freeze({
431
- table: input.table,
432
- orderBy: input.orderBy,
433
- condition: input.condition,
434
- });
188
+ Shared.oauthRegistrationGuardTable<DrizzleTableModel<T>, Registration, N, SQL>(input);
435
189
 
436
190
  export type OAuthRegistrationMapping<
437
191
  Registration,
@@ -443,97 +197,51 @@ export type OAuthRegistrationMapping<
443
197
  I extends Table,
444
198
  R extends Table,
445
199
  N,
446
- > = OAuthRegistrationBase<Registration, T, O, I, R, N> &
447
- (
448
- | {
449
- readonly mode: "pending";
450
- readonly allocatePendingReference: Effect.Effect<string, PersistenceMappingError>;
451
- }
452
- | {
453
- readonly mode: "atomic";
454
- readonly subjectId: SubjectIdCodec<N>;
455
- readonly subject: OAuthSubjectReadTable<S>;
456
- readonly credential: OAuthCredentialTable<C, N>;
457
- readonly authority: OAuthAuthorityTable<AC, N>;
458
- readonly allocateSubjectId: Effect.Effect<N, PersistenceMappingError>;
459
- readonly allocateCredentialId: Effect.Effect<string, PersistenceMappingError>;
460
- readonly allocateRevision: Effect.Effect<SecurityRevision, PersistenceMappingError>;
461
- readonly encodeSubjectInsert: (
462
- input: { readonly intent: OAuthRegistrationIntent; readonly registration: Registration },
463
- ids: { readonly subjectId: N; readonly securityRevision: SecurityRevision },
464
- ) => InferInsertModel<S>;
465
- }
466
- );
200
+ > = Shared.OAuthRegistrationMapping<
201
+ Registration,
202
+ DrizzleTableModel<S>,
203
+ DrizzleTableModel<O>,
204
+ DrizzleTableModel<C>,
205
+ DrizzleTableModel<AC>,
206
+ DrizzleTableModel<T>,
207
+ DrizzleTableModel<I>,
208
+ DrizzleTableModel<R>,
209
+ N,
210
+ SQL,
211
+ Table
212
+ >;
467
213
 
468
214
  /** Heterogeneous descriptors are made by typed factories and projected privately. */
469
- export interface OAuthEligibilityDescriptor<N> {
470
- readonly _tag: "OAuthEligibilityDescriptor";
471
- readonly scope: string;
472
- readonly table: Table;
473
- readonly subjectId: string;
474
- readonly credentialId: string;
475
- readonly revision: string;
476
- readonly condition: (subjectId: N) => SQL;
477
- readonly decode: (row: unknown) => OAuthEligibilityFact | undefined;
478
- }
215
+ export type OAuthEligibilityDescriptor<N> = Shared.OAuthEligibilityDescriptor<N, SQL, Table>;
479
216
 
480
217
  export const oauthEligibilityTable = <T extends Table, N>(
481
218
  input: OAuthEligibilityTable<T, N>,
482
- ): OAuthEligibilityDescriptor<N> => {
483
- const { table, subjectId, credentialId, revision, scope, condition, decode } = input;
484
-
485
- return Object.freeze({
486
- _tag: "OAuthEligibilityDescriptor",
487
- table,
488
- subjectId,
489
- credentialId,
490
- revision,
491
- scope,
492
- condition,
493
- decode: (row: unknown) => decode(row as InferSelectModel<T>),
494
- });
495
- };
496
-
497
- export interface OAuthCleanupDescriptor<N> {
498
- readonly table: Table;
499
- readonly subjectId: string;
500
- readonly condition: OAuthCleanupTable<Table, N>["condition"];
501
- }
219
+ ): OAuthEligibilityDescriptor<N> =>
220
+ Shared.oauthEligibilityTable<DrizzleTableModel<T>, N, SQL>(input);
221
+
222
+ export type OAuthCleanupDescriptor<N> = Shared.OAuthCleanupDescriptor<N, SQL, Table>;
502
223
 
503
224
  export const oauthCleanupTable = <T extends Table, N>(
504
225
  input: OAuthCleanupTable<T, N>,
505
- ): OAuthCleanupDescriptor<N> =>
506
- Object.freeze({ table: input.table, subjectId: input.subjectId, condition: input.condition });
226
+ ): OAuthCleanupDescriptor<N> => Shared.oauthCleanupTable<DrizzleTableModel<T>, N, SQL>(input);
507
227
 
508
228
  /** A stable application/reference lock acquired before an ownership target.
509
229
  * Missing rows retain ownership. Conditions use detached native IDs; every
510
230
  * writer of the guarded reference follows the same order. */
511
- export interface OAuthReferenceGuardTable<T extends Table, N> {
512
- readonly table: T;
513
- readonly orderBy: Column<T>;
514
- readonly condition: (input: {
515
- readonly identity: typeof OAuthExternalIdentity.Type;
516
- readonly identityKey: string;
517
- readonly subjectId: N;
518
- }) => SQL | Effect.Effect<SQL, PlatformError.PlatformError, Crypto.Crypto>;
519
- }
520
-
521
- export interface OAuthReferenceGuardDescriptor<N> {
522
- readonly table: Table;
523
- readonly orderBy: string;
524
- readonly condition: OAuthReferenceGuardTable<Table, N>["condition"];
525
- }
231
+ export type OAuthReferenceGuardTable<T extends Table, N> = Shared.OAuthReferenceGuardTable<
232
+ DrizzleTableModel<T>,
233
+ N,
234
+ SQL
235
+ >;
236
+
237
+ export type OAuthReferenceGuardDescriptor<N> = Shared.OAuthReferenceGuardDescriptor<N, SQL, Table>;
526
238
 
527
239
  export const oauthReferenceGuardTable = <T extends Table, N>(
528
240
  input: OAuthReferenceGuardTable<T, N>,
529
241
  ): OAuthReferenceGuardDescriptor<N> =>
530
- Object.freeze({
531
- table: input.table,
532
- orderBy: input.orderBy,
533
- condition: input.condition,
534
- });
242
+ Shared.oauthReferenceGuardTable<DrizzleTableModel<T>, N, SQL>(input);
535
243
 
536
- export interface OAuthAccountsMapping<
244
+ export type OAuthAccountsMapping<
537
245
  S extends Table,
538
246
  O extends Table,
539
247
  C extends Table,
@@ -542,76 +250,15 @@ export interface OAuthAccountsMapping<
542
250
  T extends Table,
543
251
  U extends Table,
544
252
  N,
545
- > {
546
- readonly subject: OAuthSubjectTable<S>;
547
- readonly ownership: OAuthOwnershipMutation<T, O, N>;
548
- readonly credential: OAuthCredentialTable<C, N>;
549
- readonly authority: OAuthAuthorityTable<AC, N>;
550
- readonly flow: OAuthFlowTable<F>;
551
- readonly command: OAuthUnlinkCommandTable<U>;
552
- readonly subjectId: SubjectIdCodec<N>;
553
- readonly clock: OAuthClock;
554
- readonly constraints: typeof requiredOAuthSignInConstraints &
555
- typeof requiredOAuthAccountsConstraints;
556
- readonly tupleConstraints: typeof requiredOAuthTupleConstraints;
557
- readonly eligibility: ReadonlyArray<OAuthEligibilityDescriptor<N>>;
558
- readonly cleanup: ReadonlyArray<OAuthCleanupDescriptor<N>>;
559
- readonly metadata: OAuthMetadataPolicy<N>;
560
- readonly sessionInvalidation: "same-authority-immediate" | "original-absolute-expiry";
561
- /** Omit only when connected access is absent. A predicate alone conservatively
562
- * retains ownership; release also needs all configured guard rows below. */
563
- readonly connectedReference?: (input: {
564
- readonly identityKey: string;
565
- readonly subjectId: N;
566
- }) => SQL;
567
- /** At most 32 descriptors, each locking 1..64 stable rows in supplied order.
568
- * Missing/empty guards retain Owned, even when the reference predicate is false. */
569
- readonly connectedReferenceGuards?: ReadonlyArray<OAuthReferenceGuardDescriptor<N>>;
570
- readonly allocateCredentialId: Effect.Effect<string, PersistenceMappingError>;
571
- readonly allocateRevision: Effect.Effect<SecurityRevision, PersistenceMappingError>;
572
- }
573
-
574
- export interface OAuthRegistrationAuthority<Registration> {
575
- readonly read: (
576
- access: import("@yielded/auth/OAuth").OAuthRegistrationAccess,
577
- ) => Effect.Effect<
578
- import("@yielded/auth/OAuth").OAuthRegistrationInspection | undefined,
579
- import("@yielded/auth/OAuth").OAuthUnavailable
580
- >;
581
- readonly inspect: (input: {
582
- readonly intent: OAuthRegistrationIntent;
583
- readonly registration: Registration;
584
- }) => Effect.Effect<
585
- {
586
- readonly fingerprint: import("@yielded/auth/Schema").TokenDigest;
587
- readonly eligible: boolean;
588
- },
589
- import("@yielded/auth/OAuth").OAuthUnavailable
590
- >;
591
- readonly register: <A>(
592
- input: {
593
- readonly access: import("@yielded/auth/OAuth").OAuthRegistrationAccess;
594
- readonly intent: OAuthRegistrationIntent;
595
- readonly commandId: typeof import("@yielded/auth/OAuth").OAuthCommandId.Type;
596
- readonly registration: Registration;
597
- readonly fingerprint: import("@yielded/auth/Schema").TokenDigest;
598
- },
599
- prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<
600
- import("@yielded/auth/OAuth").OAuthRegistrationDecision,
601
- A
602
- >,
603
- ) => Effect.Effect<
604
- import("@yielded/auth/Hooks").PreparedCommit<A>,
605
- import("@yielded/auth/OAuth").OAuthUnavailable
606
- >;
607
- readonly cleanup: <A>(
608
- input: import("@yielded/auth/OAuth").OAuthCleanupInput,
609
- prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<
610
- { readonly removed: number; readonly hasMore: boolean },
611
- A
612
- >,
613
- ) => Effect.Effect<
614
- import("@yielded/auth/Hooks").PreparedCommit<A>,
615
- import("@yielded/auth/OAuth").OAuthUnavailable
616
- >;
617
- }
253
+ > = Shared.OAuthAccountsMapping<
254
+ DrizzleTableModel<S>,
255
+ DrizzleTableModel<O>,
256
+ DrizzleTableModel<C>,
257
+ DrizzleTableModel<AC>,
258
+ DrizzleTableModel<F>,
259
+ DrizzleTableModel<T>,
260
+ DrizzleTableModel<U>,
261
+ N,
262
+ SQL,
263
+ Table
264
+ >;