@yielded/auth-persistence-drizzle 0.1.0-beta.23 → 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 (185) hide show
  1. package/README.md +3 -0
  2. package/dist/D1.d.mts +9 -9
  3. package/dist/D1.mjs +2 -1
  4. package/dist/D1.mjs.map +1 -1
  5. package/dist/Libsql.d.mts +46 -62
  6. package/dist/Libsql.mjs +2 -1
  7. package/dist/Libsql.mjs.map +1 -1
  8. package/dist/Mysql2.d.mts +24 -25
  9. package/dist/Pglite.d.mts +26 -26
  10. package/dist/Pglite.mjs +2 -1
  11. package/dist/Pglite.mjs.map +1 -1
  12. package/dist/Postgres.d.mts +27 -27
  13. package/dist/Postgres.mjs +2 -1
  14. package/dist/Postgres.mjs.map +1 -1
  15. package/dist/SqliteBun.d.mts +47 -63
  16. package/dist/SqliteBun.mjs +2 -1
  17. package/dist/SqliteBun.mjs.map +1 -1
  18. package/dist/SqliteDo.d.mts +45 -61
  19. package/dist/SqliteDo.mjs +2 -1
  20. package/dist/SqliteDo.mjs.map +1 -1
  21. package/dist/SqliteNode.d.mts +49 -65
  22. package/dist/SqliteNode.mjs +2 -1
  23. package/dist/SqliteNode.mjs.map +1 -1
  24. package/dist/SqliteWasm.d.mts +45 -61
  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 +13 -13
  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 +17 -33
  34. package/dist/drizzle/d1-passwords.mjs +56 -198
  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 +1 -1
  38. package/dist/drizzle/d1-sessions.d.mts +2 -2
  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 +26 -1
  48. package/dist/drizzle/native-sql-table.mjs.map +1 -1
  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 -6
  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/pg-password-prepared.d.mts +5 -5
  76. package/dist/drizzle/pg-password-prepared.mjs.map +1 -1
  77. package/dist/drizzle/pg-passwords.d.mts +16 -32
  78. package/dist/drizzle/pg-passwords.mjs.map +1 -1
  79. package/dist/drizzle/pg-sessions.d.mts +1 -1
  80. package/dist/drizzle/phone-target.d.mts +1 -1
  81. package/dist/drizzle/phone-target.mjs +1 -1
  82. package/dist/drizzle/query-operations.mjs +3 -1
  83. package/dist/drizzle/query-operations.mjs.map +1 -1
  84. package/dist/drizzle/sqlite-password-prepared.mjs.map +1 -1
  85. package/dist/drizzle/sqlite-passwords.mjs.map +1 -1
  86. package/dist/drizzle/storage-validation.mjs +10 -185
  87. package/dist/drizzle/storage-validation.mjs.map +1 -1
  88. package/dist/drizzle/totp-target.d.mts +2 -2
  89. package/dist/drizzle/totp-target.mjs +2 -2
  90. package/dist/drizzle/transaction-execution.d.mts +2 -2
  91. package/dist/drizzle/transaction-owner.d.mts +1 -2
  92. package/dist/index.d.mts +3 -2
  93. package/dist/internal/drizzle-postgres-oauth-proxy.d.mts +138 -0
  94. package/dist/internal/drizzle-postgres-oauth-proxy.mjs +29 -0
  95. package/dist/internal/drizzle-postgres-oauth-proxy.mjs.map +1 -0
  96. package/dist/internal/drizzle-sqlite-oauth-proxy.d.mts +146 -0
  97. package/dist/internal/drizzle-sqlite-oauth-proxy.mjs +29 -0
  98. package/dist/internal/drizzle-sqlite-oauth-proxy.mjs.map +1 -0
  99. package/package.json +1 -1
  100. package/src/D1.ts +2 -0
  101. package/src/Libsql.ts +2 -0
  102. package/src/Pglite.ts +2 -0
  103. package/src/Postgres.ts +2 -0
  104. package/src/SqliteBun.ts +2 -0
  105. package/src/SqliteDo.ts +2 -0
  106. package/src/SqliteNode.ts +2 -0
  107. package/src/SqliteWasm.ts +2 -0
  108. package/src/drizzle/d1-password-prepared.ts +2 -5
  109. package/src/drizzle/d1-passwords.ts +123 -458
  110. package/src/drizzle/d1-sessions.ts +21 -6
  111. package/src/drizzle/mysql-password-prepared.ts +4 -8
  112. package/src/drizzle/mysql-passwords.ts +5 -10
  113. package/src/drizzle/native-sql-table.ts +30 -0
  114. package/src/drizzle/oauth-connected-model.ts +97 -315
  115. package/src/drizzle/oauth-connected-reference.ts +13 -93
  116. package/src/drizzle/oauth-connected-target.ts +14 -271
  117. package/src/drizzle/oauth-kernel.ts +10 -0
  118. package/src/drizzle/oauth-model.ts +188 -541
  119. package/src/drizzle/oauth-mysql.ts +2 -2
  120. package/src/drizzle/oauth-proxy.ts +101 -0
  121. package/src/drizzle/oauth-target.ts +33 -737
  122. package/src/drizzle/password-model.ts +0 -13
  123. package/src/drizzle/password-prepared-model.ts +0 -6
  124. package/src/drizzle/pg-password-prepared.ts +4 -8
  125. package/src/drizzle/pg-passwords.ts +5 -10
  126. package/src/drizzle/query-operations.ts +4 -0
  127. package/src/drizzle/sqlite-password-prepared.ts +4 -8
  128. package/src/drizzle/sqlite-passwords.ts +7 -14
  129. package/src/drizzle/storage-validation.ts +13 -214
  130. package/src/index.ts +2 -4
  131. package/src/internal/drizzle-postgres-oauth-proxy.ts +37 -0
  132. package/src/internal/drizzle-sqlite-oauth-proxy.ts +44 -0
  133. package/dist/_virtual/_rolldown/runtime.mjs +0 -13
  134. package/dist/drizzle/oauth-accounts.mjs +0 -359
  135. package/dist/drizzle/oauth-accounts.mjs.map +0 -1
  136. package/dist/drizzle/oauth-connected-access.mjs +0 -212
  137. package/dist/drizzle/oauth-connected-access.mjs.map +0 -1
  138. package/dist/drizzle/oauth-connected-collection.mjs +0 -202
  139. package/dist/drizzle/oauth-connected-collection.mjs.map +0 -1
  140. package/dist/drizzle/oauth-connected-custody.mjs +0 -147
  141. package/dist/drizzle/oauth-connected-custody.mjs.map +0 -1
  142. package/dist/drizzle/oauth-connected-flow.mjs +0 -297
  143. package/dist/drizzle/oauth-connected-flow.mjs.map +0 -1
  144. package/dist/drizzle/oauth-connected-input.mjs +0 -122
  145. package/dist/drizzle/oauth-connected-input.mjs.map +0 -1
  146. package/dist/drizzle/oauth-connected-maintenance.mjs +0 -214
  147. package/dist/drizzle/oauth-connected-maintenance.mjs.map +0 -1
  148. package/dist/drizzle/oauth-connected-management.mjs +0 -229
  149. package/dist/drizzle/oauth-connected-management.mjs.map +0 -1
  150. package/dist/drizzle/oauth-connected-settlement.mjs +0 -128
  151. package/dist/drizzle/oauth-connected-settlement.mjs.map +0 -1
  152. package/dist/drizzle/oauth-connected-sign-in.mjs +0 -265
  153. package/dist/drizzle/oauth-connected-sign-in.mjs.map +0 -1
  154. package/dist/drizzle/oauth-connected-state.d.mts +0 -2062
  155. package/dist/drizzle/oauth-connected-state.mjs +0 -430
  156. package/dist/drizzle/oauth-connected-state.mjs.map +0 -1
  157. package/dist/drizzle/oauth-flow.d.mts +0 -22
  158. package/dist/drizzle/oauth-flow.mjs +0 -253
  159. package/dist/drizzle/oauth-flow.mjs.map +0 -1
  160. package/dist/drizzle/oauth-input.mjs +0 -127
  161. package/dist/drizzle/oauth-input.mjs.map +0 -1
  162. package/dist/drizzle/oauth-owner.d.mts +0 -10
  163. package/dist/drizzle/oauth-owner.mjs +0 -10
  164. package/dist/drizzle/oauth-owner.mjs.map +0 -1
  165. package/dist/drizzle/oauth-registration.d.mts +0 -5
  166. package/dist/drizzle/oauth-registration.mjs +0 -374
  167. package/dist/drizzle/oauth-registration.mjs.map +0 -1
  168. package/dist/drizzle/oauth-state.mjs +0 -107
  169. package/dist/drizzle/oauth-state.mjs.map +0 -1
  170. package/src/drizzle/oauth-accounts.ts +0 -805
  171. package/src/drizzle/oauth-connected-access.ts +0 -361
  172. package/src/drizzle/oauth-connected-collection.ts +0 -324
  173. package/src/drizzle/oauth-connected-custody.ts +0 -279
  174. package/src/drizzle/oauth-connected-flow.ts +0 -529
  175. package/src/drizzle/oauth-connected-input.ts +0 -147
  176. package/src/drizzle/oauth-connected-maintenance.ts +0 -346
  177. package/src/drizzle/oauth-connected-management.ts +0 -365
  178. package/src/drizzle/oauth-connected-settlement.ts +0 -251
  179. package/src/drizzle/oauth-connected-sign-in.ts +0 -443
  180. package/src/drizzle/oauth-connected-state.ts +0 -872
  181. package/src/drizzle/oauth-flow.ts +0 -462
  182. package/src/drizzle/oauth-input.ts +0 -201
  183. package/src/drizzle/oauth-owner.ts +0 -29
  184. package/src/drizzle/oauth-registration.ts +0 -640
  185. package/src/drizzle/oauth-state.ts +0 -218
@@ -1,993 +1,6 @@
1
- import { OAuthTargetConfiguration } from "./oauth-target.mjs";
2
- import { Mapping, Revocations, oauth_connected_state_d_exports } from "./oauth-connected-state.mjs";
3
- import { Crypto, Effect, Layer, Schema } from "effect";
4
- import { Statement } from "effect/sql/Statement";
5
- import * as M from "@yielded/auth/OAuth";
6
- import { OAuthConnectedPersistence, OAuthConnectedRevocationDecision, OAuthConnectedRevocations, OAuthExternalIdentity, PrepareOAuthCommit } from "@yielded/auth/OAuth";
1
+ import { OAuthKernel } from "@yielded/auth-persistence/Adapter";
7
2
  //#region src/drizzle/oauth-connected-target.d.ts
8
- export declare const makeTargetOAuthConnectedServices: (mapping: Mapping, configuration: OAuthTargetConfiguration) => Effect.Effect<{
9
- oauthConnectedPersistence: {
10
- readonly claimSignIn: <A>(input: {
11
- readonly claim: M.OAuthClaim;
12
- readonly configuration: M.OAuthConnectedConfiguration;
13
- }, prepare: PrepareOAuthCommit<M.OAuthSignInAccessClaim, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable, never>;
14
- readonly inspectSignIn: (input: {
15
- readonly reservation: M.OAuthSignInAccessClaim;
16
- readonly credential: M.OAuthCredentialSnapshot;
17
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
18
- }) => Effect.Effect<M.OAuthSignInAccessInspection, M.OAuthUnavailable>;
19
- readonly settleSignIn: <A>(input: {
20
- readonly reservation: M.OAuthSignInAccessClaim;
21
- readonly outcome: M.OAuthSignInAccessOutcome;
22
- }, prepare: PrepareOAuthCommit<{
23
- readonly _tag: "Rejected";
24
- } | {
25
- readonly _tag: "Ambiguous";
26
- } | {
27
- readonly _tag: "Cancelled";
28
- } | {
29
- readonly _tag: "Connected";
30
- readonly grant: {
31
- readonly context: {
32
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
33
- readonly exchangeOrder: string;
34
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
35
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
36
- readonly identity: {
37
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
38
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
39
- readonly subject: string;
40
- };
41
- readonly configuration: {
42
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
43
- readonly protocol: "oauth" | "oidc";
44
- readonly configurationGeneration: number;
45
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
46
- readonly responseIssuerMode: "required" | "unsupported";
47
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
48
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
49
- readonly profile: {
50
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
51
- readonly generation: number;
52
- readonly issuance: "active" | "retired";
53
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
54
- readonly clientRegistrationId: string;
55
- readonly scopes: readonly string[];
56
- readonly resources: readonly string[];
57
- readonly retention: "access-and-refresh" | "access-only";
58
- readonly maximumAccessLifetimeMillis: number;
59
- readonly maximumRefreshLifetimeMillis?: number;
60
- readonly refreshAheadMillis: number;
61
- readonly refresh: "confidential" | "rotating" | "unsupported";
62
- readonly revocation: "cohort" | "unsupported";
63
- };
64
- };
65
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
66
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
67
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
68
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
69
- readonly metadata: {
70
- readonly scopes: readonly string[];
71
- readonly resources: readonly string[];
72
- readonly accessExpiresAtMillis?: number;
73
- readonly refreshExpiresAtMillis?: number;
74
- readonly useUntilMillis: number;
75
- readonly refreshUseUntilMillis?: number;
76
- readonly obtainedAtMillis: number;
77
- readonly profile?: {
78
- readonly displayName?: string;
79
- readonly handle?: string;
80
- readonly avatarUrl?: string;
81
- readonly profileUrl?: string;
82
- readonly email?: string;
83
- readonly emailVerified?: boolean;
84
- readonly providerData?: {
85
- readonly [x: string]: Schema.Json;
86
- };
87
- };
88
- };
89
- };
90
- readonly sealed: {
91
- readonly format: "oauth-connected-xchacha20poly1305-v1";
92
- readonly keyId: string;
93
- readonly nonce: string;
94
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
95
- };
96
- };
97
- } | {
98
- readonly _tag: "Conflict";
99
- } | {
100
- readonly _tag: "Busy";
101
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable, never>;
102
- readonly capture: (input: {
103
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
104
- readonly subjectId: import("@yielded/auth/Schema").SubjectId;
105
- readonly grantId?: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
106
- }) => Effect.Effect<{
107
- readonly revision: M.OAuthAccountRevision;
108
- readonly target?: M.OAuthConnectedTarget;
109
- } | undefined, M.OAuthUnavailable>;
110
- readonly issue: <A>(input: {
111
- readonly flow: M.OAuthConnectedPendingFlow;
112
- readonly authorization: M.OAuthConnectedActionAuthorization;
113
- }, prepare: PrepareOAuthCommit<{
114
- readonly _tag: "Rejected";
115
- } | {
116
- readonly _tag: "Issued";
117
- readonly flow: {
118
- readonly context: {
119
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
120
- readonly protocol: "oauth" | "oidc";
121
- readonly configurationGeneration: number;
122
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
123
- readonly responseIssuerMode: "required" | "unsupported";
124
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
125
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
126
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
127
- readonly generation: number;
128
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
129
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
130
- readonly access?: {
131
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
132
- readonly generation: number;
133
- readonly issuance: "active" | "retired";
134
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
135
- readonly clientRegistrationId: string;
136
- readonly scopes: readonly string[];
137
- readonly resources: readonly string[];
138
- readonly retention: "access-and-refresh" | "access-only";
139
- readonly maximumAccessLifetimeMillis: number;
140
- readonly maximumRefreshLifetimeMillis?: number;
141
- readonly refreshAheadMillis: number;
142
- readonly refresh: "confidential" | "rotating" | "unsupported";
143
- readonly revocation: "cohort" | "unsupported";
144
- };
145
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
146
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
147
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
148
- readonly requestBindingExpiresAtMillis: number;
149
- readonly issuedAtMillis: number;
150
- readonly expiresAtMillis: number;
151
- readonly claimLifetimeMillis: number;
152
- readonly namespace: "effect-auth/oauth-connected-context/v1";
153
- readonly revision: {
154
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
155
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
156
- readonly credentials: readonly {
157
- readonly credentialId: string;
158
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
159
- }[];
160
- };
161
- readonly profile: {
162
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
163
- readonly generation: number;
164
- readonly issuance: "active" | "retired";
165
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
166
- readonly clientRegistrationId: string;
167
- readonly scopes: readonly string[];
168
- readonly resources: readonly string[];
169
- readonly retention: "access-and-refresh" | "access-only";
170
- readonly maximumAccessLifetimeMillis: number;
171
- readonly maximumRefreshLifetimeMillis?: number;
172
- readonly refreshAheadMillis: number;
173
- readonly refresh: "confidential" | "rotating" | "unsupported";
174
- readonly revocation: "cohort" | "unsupported";
175
- };
176
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
177
- readonly reconnect?: {
178
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
179
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
180
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
181
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
182
- readonly identity: {
183
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
184
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
185
- readonly subject: string;
186
- };
187
- readonly configuration: {
188
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
189
- readonly protocol: "oauth" | "oidc";
190
- readonly configurationGeneration: number;
191
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
192
- readonly responseIssuerMode: "required" | "unsupported";
193
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
194
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
195
- readonly profile: {
196
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
197
- readonly generation: number;
198
- readonly issuance: "active" | "retired";
199
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
200
- readonly clientRegistrationId: string;
201
- readonly scopes: readonly string[];
202
- readonly resources: readonly string[];
203
- readonly retention: "access-and-refresh" | "access-only";
204
- readonly maximumAccessLifetimeMillis: number;
205
- readonly maximumRefreshLifetimeMillis?: number;
206
- readonly refreshAheadMillis: number;
207
- readonly refresh: "confidential" | "rotating" | "unsupported";
208
- readonly revocation: "cohort" | "unsupported";
209
- };
210
- };
211
- };
212
- readonly maximumEvidenceAgeMillis: number;
213
- };
214
- readonly sealed: {
215
- readonly format: "oauth-xchacha20poly1305-v1";
216
- readonly keyId: string;
217
- readonly nonce: string;
218
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
219
- };
220
- readonly retentionUntilMillis: number;
221
- };
222
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable, never>;
223
- readonly prepare: <A>(input: {
224
- readonly flow: M.OAuthConnectedPendingFlow;
225
- readonly authorization: M.OAuthConnectedUseAuthorization;
226
- }, prepare: PrepareOAuthCommit<{
227
- readonly _tag: "Rejected";
228
- } | {
229
- readonly _tag: "Issued";
230
- readonly flow: {
231
- readonly context: {
232
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
233
- readonly protocol: "oauth" | "oidc";
234
- readonly configurationGeneration: number;
235
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
236
- readonly responseIssuerMode: "required" | "unsupported";
237
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
238
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
239
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
240
- readonly generation: number;
241
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
242
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
243
- readonly access?: {
244
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
245
- readonly generation: number;
246
- readonly issuance: "active" | "retired";
247
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
248
- readonly clientRegistrationId: string;
249
- readonly scopes: readonly string[];
250
- readonly resources: readonly string[];
251
- readonly retention: "access-and-refresh" | "access-only";
252
- readonly maximumAccessLifetimeMillis: number;
253
- readonly maximumRefreshLifetimeMillis?: number;
254
- readonly refreshAheadMillis: number;
255
- readonly refresh: "confidential" | "rotating" | "unsupported";
256
- readonly revocation: "cohort" | "unsupported";
257
- };
258
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
259
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
260
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
261
- readonly requestBindingExpiresAtMillis: number;
262
- readonly issuedAtMillis: number;
263
- readonly expiresAtMillis: number;
264
- readonly claimLifetimeMillis: number;
265
- readonly namespace: "effect-auth/oauth-connected-context/v1";
266
- readonly revision: {
267
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
268
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
269
- readonly credentials: readonly {
270
- readonly credentialId: string;
271
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
272
- }[];
273
- };
274
- readonly profile: {
275
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
276
- readonly generation: number;
277
- readonly issuance: "active" | "retired";
278
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
279
- readonly clientRegistrationId: string;
280
- readonly scopes: readonly string[];
281
- readonly resources: readonly string[];
282
- readonly retention: "access-and-refresh" | "access-only";
283
- readonly maximumAccessLifetimeMillis: number;
284
- readonly maximumRefreshLifetimeMillis?: number;
285
- readonly refreshAheadMillis: number;
286
- readonly refresh: "confidential" | "rotating" | "unsupported";
287
- readonly revocation: "cohort" | "unsupported";
288
- };
289
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
290
- readonly reconnect?: {
291
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
292
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
293
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
294
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
295
- readonly identity: {
296
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
297
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
298
- readonly subject: string;
299
- };
300
- readonly configuration: {
301
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
302
- readonly protocol: "oauth" | "oidc";
303
- readonly configurationGeneration: number;
304
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
305
- readonly responseIssuerMode: "required" | "unsupported";
306
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
307
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
308
- readonly profile: {
309
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
310
- readonly generation: number;
311
- readonly issuance: "active" | "retired";
312
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
313
- readonly clientRegistrationId: string;
314
- readonly scopes: readonly string[];
315
- readonly resources: readonly string[];
316
- readonly retention: "access-and-refresh" | "access-only";
317
- readonly maximumAccessLifetimeMillis: number;
318
- readonly maximumRefreshLifetimeMillis?: number;
319
- readonly refreshAheadMillis: number;
320
- readonly refresh: "confidential" | "rotating" | "unsupported";
321
- readonly revocation: "cohort" | "unsupported";
322
- };
323
- };
324
- };
325
- readonly maximumEvidenceAgeMillis: number;
326
- };
327
- readonly sealed: {
328
- readonly format: "oauth-xchacha20poly1305-v1";
329
- readonly keyId: string;
330
- readonly nonce: string;
331
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
332
- };
333
- readonly retentionUntilMillis: number;
334
- };
335
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable, never>;
336
- readonly inspectPrepared: (input: M.OAuthConnectedPreparedAccess) => Effect.Effect<M.OAuthConnectedPendingFlow | undefined, M.OAuthUnavailable>;
337
- readonly preflight: (input: M.OAuthConnectedAccess) => Effect.Effect<M.OAuthConnectedPendingFlow | undefined, M.OAuthUnavailable>;
338
- readonly claim: <A>(input: {
339
- readonly access: M.OAuthConnectedAccess;
340
- readonly flow: M.OAuthConnectedPendingFlow;
341
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
342
- readonly authorization: M.OAuthConnectedActionAuthorization;
343
- }, prepare: PrepareOAuthCommit<{
344
- readonly _tag: "Rejected";
345
- } | {
346
- readonly _tag: "Claimed";
347
- readonly claim: {
348
- readonly flow: {
349
- readonly context: {
350
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
351
- readonly protocol: "oauth" | "oidc";
352
- readonly configurationGeneration: number;
353
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
354
- readonly responseIssuerMode: "required" | "unsupported";
355
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
356
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
357
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
358
- readonly generation: number;
359
- readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
360
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
361
- readonly access?: {
362
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
363
- readonly generation: number;
364
- readonly issuance: "active" | "retired";
365
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
366
- readonly clientRegistrationId: string;
367
- readonly scopes: readonly string[];
368
- readonly resources: readonly string[];
369
- readonly retention: "access-and-refresh" | "access-only";
370
- readonly maximumAccessLifetimeMillis: number;
371
- readonly maximumRefreshLifetimeMillis?: number;
372
- readonly refreshAheadMillis: number;
373
- readonly refresh: "confidential" | "rotating" | "unsupported";
374
- readonly revocation: "cohort" | "unsupported";
375
- };
376
- readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
377
- readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
378
- readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
379
- readonly requestBindingExpiresAtMillis: number;
380
- readonly issuedAtMillis: number;
381
- readonly expiresAtMillis: number;
382
- readonly claimLifetimeMillis: number;
383
- readonly namespace: "effect-auth/oauth-connected-context/v1";
384
- readonly revision: {
385
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
386
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
387
- readonly credentials: readonly {
388
- readonly credentialId: string;
389
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
390
- }[];
391
- };
392
- readonly profile: {
393
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
394
- readonly generation: number;
395
- readonly issuance: "active" | "retired";
396
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
397
- readonly clientRegistrationId: string;
398
- readonly scopes: readonly string[];
399
- readonly resources: readonly string[];
400
- readonly retention: "access-and-refresh" | "access-only";
401
- readonly maximumAccessLifetimeMillis: number;
402
- readonly maximumRefreshLifetimeMillis?: number;
403
- readonly refreshAheadMillis: number;
404
- readonly refresh: "confidential" | "rotating" | "unsupported";
405
- readonly revocation: "cohort" | "unsupported";
406
- };
407
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
408
- readonly reconnect?: {
409
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
410
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
411
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
412
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
413
- readonly identity: {
414
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
415
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
416
- readonly subject: string;
417
- };
418
- readonly configuration: {
419
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
420
- readonly protocol: "oauth" | "oidc";
421
- readonly configurationGeneration: number;
422
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
423
- readonly responseIssuerMode: "required" | "unsupported";
424
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
425
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
426
- readonly profile: {
427
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
428
- readonly generation: number;
429
- readonly issuance: "active" | "retired";
430
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
431
- readonly clientRegistrationId: string;
432
- readonly scopes: readonly string[];
433
- readonly resources: readonly string[];
434
- readonly retention: "access-and-refresh" | "access-only";
435
- readonly maximumAccessLifetimeMillis: number;
436
- readonly maximumRefreshLifetimeMillis?: number;
437
- readonly refreshAheadMillis: number;
438
- readonly refresh: "confidential" | "rotating" | "unsupported";
439
- readonly revocation: "cohort" | "unsupported";
440
- };
441
- };
442
- };
443
- readonly maximumEvidenceAgeMillis: number;
444
- };
445
- readonly sealed: {
446
- readonly format: "oauth-xchacha20poly1305-v1";
447
- readonly keyId: string;
448
- readonly nonce: string;
449
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
450
- };
451
- readonly retentionUntilMillis: number;
452
- };
453
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
454
- readonly claimedAtMillis: number;
455
- readonly claimExpiresAtMillis: number;
456
- readonly order: string;
457
- };
458
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable, never>;
459
- readonly inspectGrant: (input: {
460
- readonly claim: M.OAuthConnectedClaim;
461
- readonly identity: typeof OAuthExternalIdentity.Type;
462
- }) => Effect.Effect<{
463
- readonly _tag: "Rejected";
464
- } | {
465
- readonly _tag: "Conflict";
466
- } | {
467
- readonly _tag: "Target";
468
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
469
- } | {
470
- readonly _tag: "Quarantine";
471
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
472
- }, M.OAuthUnavailable>;
473
- readonly settle: <A>(input: {
474
- readonly claim: M.OAuthConnectedClaim;
475
- readonly outcome: M.OAuthConnectedOutcome;
476
- readonly authorization: M.OAuthConnectedActionAuthorization;
477
- readonly nowMillis: number;
478
- }, prepare: PrepareOAuthCommit<{
479
- readonly _tag: "Rejected";
480
- } | {
481
- readonly _tag: "Ambiguous";
482
- } | {
483
- readonly _tag: "Cancelled";
484
- } | {
485
- readonly _tag: "Connected";
486
- readonly grant: {
487
- readonly context: {
488
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
489
- readonly exchangeOrder: string;
490
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
491
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
492
- readonly identity: {
493
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
494
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
495
- readonly subject: string;
496
- };
497
- readonly configuration: {
498
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
499
- readonly protocol: "oauth" | "oidc";
500
- readonly configurationGeneration: number;
501
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
502
- readonly responseIssuerMode: "required" | "unsupported";
503
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
504
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
505
- readonly profile: {
506
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
507
- readonly generation: number;
508
- readonly issuance: "active" | "retired";
509
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
510
- readonly clientRegistrationId: string;
511
- readonly scopes: readonly string[];
512
- readonly resources: readonly string[];
513
- readonly retention: "access-and-refresh" | "access-only";
514
- readonly maximumAccessLifetimeMillis: number;
515
- readonly maximumRefreshLifetimeMillis?: number;
516
- readonly refreshAheadMillis: number;
517
- readonly refresh: "confidential" | "rotating" | "unsupported";
518
- readonly revocation: "cohort" | "unsupported";
519
- };
520
- };
521
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
522
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
523
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
524
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
525
- readonly metadata: {
526
- readonly scopes: readonly string[];
527
- readonly resources: readonly string[];
528
- readonly accessExpiresAtMillis?: number;
529
- readonly refreshExpiresAtMillis?: number;
530
- readonly useUntilMillis: number;
531
- readonly refreshUseUntilMillis?: number;
532
- readonly obtainedAtMillis: number;
533
- readonly profile?: {
534
- readonly displayName?: string;
535
- readonly handle?: string;
536
- readonly avatarUrl?: string;
537
- readonly profileUrl?: string;
538
- readonly email?: string;
539
- readonly emailVerified?: boolean;
540
- readonly providerData?: {
541
- readonly [x: string]: Schema.Json;
542
- };
543
- };
544
- };
545
- };
546
- readonly sealed: {
547
- readonly format: "oauth-connected-xchacha20poly1305-v1";
548
- readonly keyId: string;
549
- readonly nonce: string;
550
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
551
- };
552
- };
553
- } | {
554
- readonly _tag: "Conflict";
555
- } | {
556
- readonly _tag: "Busy";
557
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable, never>;
558
- readonly list: (input: {
559
- readonly authorization: M.OAuthConnectedUseAuthorization;
560
- readonly limit: number;
561
- readonly cursor?: string;
562
- }) => Effect.Effect<{
563
- readonly items: readonly {
564
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
565
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
566
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
567
- readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
568
- readonly status: "Active" | "Disconnected" | "ReauthorizationRequired" | "Refreshing";
569
- readonly scopes: readonly string[];
570
- readonly accessExpiresAtMillis?: number;
571
- readonly useUntilMillis: number;
572
- readonly profile?: {
573
- readonly displayName?: string;
574
- readonly handle?: string;
575
- readonly avatarUrl?: string;
576
- readonly profileUrl?: string;
577
- readonly email?: string;
578
- readonly emailVerified?: boolean;
579
- readonly providerData?: {
580
- readonly [x: string]: Schema.Json;
581
- };
582
- };
583
- readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
584
- }[];
585
- readonly cursor?: string;
586
- }, M.OAuthUnavailable>;
587
- readonly inspectDisconnect: (input: {
588
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
589
- readonly subjectId: import("@yielded/auth/Schema").SubjectId;
590
- readonly authorization: M.OAuthConnectedUseAuthorization;
591
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
592
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
593
- }) => Effect.Effect<{
594
- readonly _tag: "Rejected";
595
- } | {
596
- readonly _tag: "Conflict";
597
- } | {
598
- readonly _tag: "Target";
599
- readonly grant: {
600
- readonly context: {
601
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
602
- readonly exchangeOrder: string;
603
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
604
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
605
- readonly identity: {
606
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
607
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
608
- readonly subject: string;
609
- };
610
- readonly configuration: {
611
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
612
- readonly protocol: "oauth" | "oidc";
613
- readonly configurationGeneration: number;
614
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
615
- readonly responseIssuerMode: "required" | "unsupported";
616
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
617
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
618
- readonly profile: {
619
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
620
- readonly generation: number;
621
- readonly issuance: "active" | "retired";
622
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
623
- readonly clientRegistrationId: string;
624
- readonly scopes: readonly string[];
625
- readonly resources: readonly string[];
626
- readonly retention: "access-and-refresh" | "access-only";
627
- readonly maximumAccessLifetimeMillis: number;
628
- readonly maximumRefreshLifetimeMillis?: number;
629
- readonly refreshAheadMillis: number;
630
- readonly refresh: "confidential" | "rotating" | "unsupported";
631
- readonly revocation: "cohort" | "unsupported";
632
- };
633
- };
634
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
635
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
636
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
637
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
638
- readonly metadata: {
639
- readonly scopes: readonly string[];
640
- readonly resources: readonly string[];
641
- readonly accessExpiresAtMillis?: number;
642
- readonly refreshExpiresAtMillis?: number;
643
- readonly useUntilMillis: number;
644
- readonly refreshUseUntilMillis?: number;
645
- readonly obtainedAtMillis: number;
646
- readonly profile?: {
647
- readonly displayName?: string;
648
- readonly handle?: string;
649
- readonly avatarUrl?: string;
650
- readonly profileUrl?: string;
651
- readonly email?: string;
652
- readonly emailVerified?: boolean;
653
- readonly providerData?: {
654
- readonly [x: string]: Schema.Json;
655
- };
656
- };
657
- };
658
- };
659
- readonly sealed?: {
660
- readonly format: "oauth-connected-xchacha20poly1305-v1";
661
- readonly keyId: string;
662
- readonly nonce: string;
663
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
664
- };
665
- };
666
- readonly revision: {
667
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
668
- readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
669
- readonly credentials: readonly {
670
- readonly credentialId: string;
671
- readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
672
- }[];
673
- };
674
- } | {
675
- readonly _tag: "Replay";
676
- readonly result: {
677
- readonly _tag: "Disconnected";
678
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
679
- readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
680
- readonly affectedGrantCount: number;
681
- readonly replayed: boolean;
682
- };
683
- }, M.OAuthUnavailable>;
684
- readonly disconnect: <A>(input: {
685
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
686
- readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
687
- readonly grant: M.OAuthConnectedDisconnectGrant;
688
- readonly authorization: M.OAuthConnectedActionAuthorization;
689
- readonly revocation?: M.OAuthConnectedRevocationJob;
690
- readonly retentionUntilMillis: number;
691
- }, prepare: PrepareOAuthCommit<{
692
- readonly _tag: "Rejected";
693
- } | {
694
- readonly _tag: "Conflict";
695
- } | {
696
- readonly _tag: "Disconnected";
697
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
698
- readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
699
- readonly affectedGrantCount: number;
700
- readonly replayed: boolean;
701
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable, never>;
702
- readonly inspectAccess: (input: {
703
- readonly authorization: M.OAuthConnectedUseAuthorization;
704
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
705
- readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
706
- }) => Effect.Effect<{
707
- readonly _tag: "Rejected";
708
- } | {
709
- readonly _tag: "Busy";
710
- } | {
711
- readonly _tag: "Target";
712
- readonly grant: {
713
- readonly context: {
714
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
715
- readonly exchangeOrder: string;
716
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
717
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
718
- readonly identity: {
719
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
720
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
721
- readonly subject: string;
722
- };
723
- readonly configuration: {
724
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
725
- readonly protocol: "oauth" | "oidc";
726
- readonly configurationGeneration: number;
727
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
728
- readonly responseIssuerMode: "required" | "unsupported";
729
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
730
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
731
- readonly profile: {
732
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
733
- readonly generation: number;
734
- readonly issuance: "active" | "retired";
735
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
736
- readonly clientRegistrationId: string;
737
- readonly scopes: readonly string[];
738
- readonly resources: readonly string[];
739
- readonly retention: "access-and-refresh" | "access-only";
740
- readonly maximumAccessLifetimeMillis: number;
741
- readonly maximumRefreshLifetimeMillis?: number;
742
- readonly refreshAheadMillis: number;
743
- readonly refresh: "confidential" | "rotating" | "unsupported";
744
- readonly revocation: "cohort" | "unsupported";
745
- };
746
- };
747
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
748
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
749
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
750
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
751
- readonly metadata: {
752
- readonly scopes: readonly string[];
753
- readonly resources: readonly string[];
754
- readonly accessExpiresAtMillis?: number;
755
- readonly refreshExpiresAtMillis?: number;
756
- readonly useUntilMillis: number;
757
- readonly refreshUseUntilMillis?: number;
758
- readonly obtainedAtMillis: number;
759
- readonly profile?: {
760
- readonly displayName?: string;
761
- readonly handle?: string;
762
- readonly avatarUrl?: string;
763
- readonly profileUrl?: string;
764
- readonly email?: string;
765
- readonly emailVerified?: boolean;
766
- readonly providerData?: {
767
- readonly [x: string]: Schema.Json;
768
- };
769
- };
770
- };
771
- };
772
- readonly sealed: {
773
- readonly format: "oauth-connected-xchacha20poly1305-v1";
774
- readonly keyId: string;
775
- readonly nonce: string;
776
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
777
- };
778
- };
779
- } | {
780
- readonly _tag: "ReauthorizationRequired";
781
- }, M.OAuthUnavailable>;
782
- readonly claimRefresh: <A>(input: {
783
- readonly grant: M.OAuthConnectedStoredGrant;
784
- readonly authorization: M.OAuthConnectedUseAuthorization;
785
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
786
- readonly nextTokenVersion: M.OAuthConnectedRefreshClaim["nextTokenVersion"];
787
- readonly lifetimeMillis: number;
788
- }, prepare: PrepareOAuthCommit<{
789
- readonly _tag: "Rejected";
790
- } | {
791
- readonly _tag: "Busy";
792
- } | {
793
- readonly _tag: "ReauthorizationRequired";
794
- } | {
795
- readonly _tag: "Claimed";
796
- readonly claim: {
797
- readonly grant: {
798
- readonly context: {
799
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
800
- readonly exchangeOrder: string;
801
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
802
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
803
- readonly identity: {
804
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
805
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
806
- readonly subject: string;
807
- };
808
- readonly configuration: {
809
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
810
- readonly protocol: "oauth" | "oidc";
811
- readonly configurationGeneration: number;
812
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
813
- readonly responseIssuerMode: "required" | "unsupported";
814
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
815
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
816
- readonly profile: {
817
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
818
- readonly generation: number;
819
- readonly issuance: "active" | "retired";
820
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
821
- readonly clientRegistrationId: string;
822
- readonly scopes: readonly string[];
823
- readonly resources: readonly string[];
824
- readonly retention: "access-and-refresh" | "access-only";
825
- readonly maximumAccessLifetimeMillis: number;
826
- readonly maximumRefreshLifetimeMillis?: number;
827
- readonly refreshAheadMillis: number;
828
- readonly refresh: "confidential" | "rotating" | "unsupported";
829
- readonly revocation: "cohort" | "unsupported";
830
- };
831
- };
832
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
833
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
834
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
835
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
836
- readonly metadata: {
837
- readonly scopes: readonly string[];
838
- readonly resources: readonly string[];
839
- readonly accessExpiresAtMillis?: number;
840
- readonly refreshExpiresAtMillis?: number;
841
- readonly useUntilMillis: number;
842
- readonly refreshUseUntilMillis?: number;
843
- readonly obtainedAtMillis: number;
844
- readonly profile?: {
845
- readonly displayName?: string;
846
- readonly handle?: string;
847
- readonly avatarUrl?: string;
848
- readonly profileUrl?: string;
849
- readonly email?: string;
850
- readonly emailVerified?: boolean;
851
- readonly providerData?: {
852
- readonly [x: string]: Schema.Json;
853
- };
854
- };
855
- };
856
- };
857
- readonly sealed: {
858
- readonly format: "oauth-connected-xchacha20poly1305-v1";
859
- readonly keyId: string;
860
- readonly nonce: string;
861
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
862
- };
863
- };
864
- readonly order: string;
865
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
866
- readonly claimedAtMillis: number;
867
- readonly claimExpiresAtMillis: number;
868
- readonly nextTokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
869
- };
870
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable, never>;
871
- readonly settleRefresh: <A>(input: {
872
- readonly claim: M.OAuthConnectedRefreshClaim;
873
- readonly authorization: M.OAuthConnectedUseAuthorization;
874
- readonly outcome: M.OAuthConnectedRefreshOutcome;
875
- }, prepare: PrepareOAuthCommit<{
876
- readonly _tag: "Rejected";
877
- } | {
878
- readonly _tag: "ReauthorizationRequired";
879
- } | {
880
- readonly _tag: "Refreshed";
881
- readonly grant: {
882
- readonly context: {
883
- readonly namespace: "effect-auth/oauth-connected-token-context/v1";
884
- readonly exchangeOrder: string;
885
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
886
- readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
887
- readonly identity: {
888
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
889
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
890
- readonly subject: string;
891
- };
892
- readonly configuration: {
893
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
894
- readonly protocol: "oauth" | "oidc";
895
- readonly configurationGeneration: number;
896
- readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
897
- readonly responseIssuerMode: "required" | "unsupported";
898
- readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
899
- readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
900
- readonly profile: {
901
- readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
902
- readonly generation: number;
903
- readonly issuance: "active" | "retired";
904
- readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
905
- readonly clientRegistrationId: string;
906
- readonly scopes: readonly string[];
907
- readonly resources: readonly string[];
908
- readonly retention: "access-and-refresh" | "access-only";
909
- readonly maximumAccessLifetimeMillis: number;
910
- readonly maximumRefreshLifetimeMillis?: number;
911
- readonly refreshAheadMillis: number;
912
- readonly refresh: "confidential" | "rotating" | "unsupported";
913
- readonly revocation: "cohort" | "unsupported";
914
- };
915
- };
916
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
917
- readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
918
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
919
- readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
920
- readonly metadata: {
921
- readonly scopes: readonly string[];
922
- readonly resources: readonly string[];
923
- readonly accessExpiresAtMillis?: number;
924
- readonly refreshExpiresAtMillis?: number;
925
- readonly useUntilMillis: number;
926
- readonly refreshUseUntilMillis?: number;
927
- readonly obtainedAtMillis: number;
928
- readonly profile?: {
929
- readonly displayName?: string;
930
- readonly handle?: string;
931
- readonly avatarUrl?: string;
932
- readonly profileUrl?: string;
933
- readonly email?: string;
934
- readonly emailVerified?: boolean;
935
- readonly providerData?: {
936
- readonly [x: string]: Schema.Json;
937
- };
938
- };
939
- };
940
- };
941
- readonly sealed: {
942
- readonly format: "oauth-connected-xchacha20poly1305-v1";
943
- readonly keyId: string;
944
- readonly nonce: string;
945
- readonly ciphertext: import("effect/Redacted").Redacted<string>;
946
- };
947
- };
948
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable, never>;
949
- readonly admitUse: <A>(input: {
950
- readonly grant: M.OAuthConnectedStoredGrant;
951
- readonly authorization: M.OAuthConnectedUseAuthorization;
952
- readonly admissionId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
953
- readonly lifetimeMillis: number;
954
- }, prepare: PrepareOAuthCommit<{
955
- readonly _tag: "Rejected";
956
- } | {
957
- readonly _tag: "Busy";
958
- } | {
959
- readonly _tag: "ReauthorizationRequired";
960
- } | {
961
- readonly _tag: "Admitted";
962
- readonly admissionId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
963
- readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
964
- readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
965
- readonly admittedAtMillis: number;
966
- readonly expiresAtMillis: number;
967
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable, never>;
968
- readonly cleanup: <A>(input: M.OAuthCleanupInput, prepare: PrepareOAuthCommit<{
969
- readonly terminalized: number;
970
- readonly removed: number;
971
- readonly hasMore: boolean;
972
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable, never>;
973
- };
974
- }, M.OAuthUnavailable, Crypto.Crypto | import("@yielded/auth/Hooks").LifecycleHooks | import("@yielded/auth-persistence/Adapter").NativeDatabase>;
975
- export declare const makeTargetOAuthConnectedRevocationServices: (mapping: Revocations, configuration: OAuthTargetConfiguration) => Effect.Effect<{
976
- oauthConnectedRevocations: {
977
- readonly claim: <A>(input: {
978
- readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
979
- readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
980
- readonly lifetimeMillis: number;
981
- }, prepare: PrepareOAuthCommit<typeof OAuthConnectedRevocationDecision.Type, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable>;
982
- readonly settle: <A>(input: {
983
- readonly claim: M.OAuthConnectedRevocationClaim;
984
- readonly outcome: "Confirmed" | "Unknown";
985
- }, prepare: PrepareOAuthCommit<{
986
- readonly settled: boolean;
987
- }, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, M.OAuthUnavailable>;
988
- };
989
- }, M.OAuthUnavailable, Crypto.Crypto | import("@yielded/auth/Hooks").LifecycleHooks | import("@yielded/auth-persistence/Adapter").NativeDatabase>;
990
- export declare const oauthConnectedPersistenceLayer: <E, R>(services: Effect.Effect<Effect.Success<ReturnType<typeof makeTargetOAuthConnectedServices>>, E, R>) => Layer.Layer<OAuthConnectedPersistence, E, Exclude<R, import("effect/Scope").Scope>>;
991
- export declare const oauthConnectedRevocationsLayer: <E, R>(services: Effect.Effect<Effect.Success<ReturnType<typeof makeTargetOAuthConnectedRevocationServices>>, E, R>) => Layer.Layer<OAuthConnectedRevocations, E, Exclude<R, import("effect/Scope").Scope>>;
3
+ export declare const oauthConnectedPersistenceLayer: OAuthKernel["connectedTarget"]["oauthConnectedPersistenceLayer"];
4
+ export declare const oauthConnectedRevocationsLayer: OAuthKernel["connectedTarget"]["oauthConnectedRevocationsLayer"];
992
5
  //#endregion
993
6
  //# sourceMappingURL=oauth-connected-target.d.mts.map