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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +4 -0
  2. package/dist/DrizzleD1.d.mts +7 -7
  3. package/dist/DrizzleLibsql.d.mts +31 -31
  4. package/dist/DrizzleLibsql.mjs +7 -22
  5. package/dist/DrizzleLibsql.mjs.map +1 -1
  6. package/dist/DrizzleMysql2.d.mts +8 -8
  7. package/dist/DrizzlePglite.d.mts +15 -15
  8. package/dist/DrizzlePostgres.d.mts +13 -13
  9. package/dist/DrizzleSqliteBun.d.mts +24 -24
  10. package/dist/DrizzleSqliteDo.d.mts +29 -29
  11. package/dist/DrizzleSqliteNode.d.mts +22 -22
  12. package/dist/DrizzleSqliteWasm.d.mts +24 -24
  13. package/dist/_virtual/_rolldown/runtime.mjs +13 -0
  14. package/dist/drizzle/D1BatchStatements.d.mts +1 -2
  15. package/dist/drizzle/SuppliedService.d.mts +1 -2
  16. package/dist/drizzle/d1-emails.d.mts +5 -6
  17. package/dist/drizzle/d1-identity.d.mts +2 -3
  18. package/dist/drizzle/d1-oauth.d.mts +10 -11
  19. package/dist/drizzle/d1-passkey.d.mts +5 -6
  20. package/dist/drizzle/d1-password-prepared.d.mts +2 -3
  21. package/dist/drizzle/d1-passwords.d.mts +4 -5
  22. package/dist/drizzle/d1-phone.d.mts +2 -3
  23. package/dist/drizzle/d1-planning.d.mts +1 -2
  24. package/dist/drizzle/d1-proofs.d.mts +2 -3
  25. package/dist/drizzle/d1-sessions.d.mts +10 -11
  26. package/dist/drizzle/d1-totp.d.mts +2 -3
  27. package/dist/drizzle/email-model.d.mts +30 -31
  28. package/dist/drizzle/email-registration.d.mts +1 -2
  29. package/dist/drizzle/email-target.d.mts +3 -4
  30. package/dist/drizzle/model.d.mts +41 -41
  31. package/dist/drizzle/model.mjs +3 -5
  32. package/dist/drizzle/model.mjs.map +1 -1
  33. package/dist/drizzle/mysql-emails.d.mts +7 -8
  34. package/dist/drizzle/mysql-identity.d.mts +2 -3
  35. package/dist/drizzle/mysql-password-prepared.d.mts +3 -4
  36. package/dist/drizzle/mysql-passwords.d.mts +6 -7
  37. package/dist/drizzle/mysql-proofs.d.mts +3 -4
  38. package/dist/drizzle/mysql-sessions.d.mts +15 -16
  39. package/dist/drizzle/mysql.d.mts +8 -9
  40. package/dist/drizzle/oauth-connected-model.d.mts +21 -22
  41. package/dist/drizzle/oauth-connected-reference.d.mts +1 -2
  42. package/dist/drizzle/oauth-connected-state.d.mts +1950 -7
  43. package/dist/drizzle/oauth-connected-target.d.mts +7 -8
  44. package/dist/drizzle/oauth-flow.d.mts +22 -2
  45. package/dist/drizzle/oauth-model.d.mts +45 -46
  46. package/dist/drizzle/oauth-owner.d.mts +10 -2
  47. package/dist/drizzle/oauth-target.d.mts +9 -10
  48. package/dist/drizzle/passkey-model.d.mts +34 -35
  49. package/dist/drizzle/passkey-registration-ceremony-model.d.mts +5 -6
  50. package/dist/drizzle/passkey-write-model.d.mts +13 -14
  51. package/dist/drizzle/password-model.d.mts +29 -30
  52. package/dist/drizzle/password-prepared-model.d.mts +10 -11
  53. package/dist/drizzle/password-prepared-target.d.mts +1 -2
  54. package/dist/drizzle/password-registration.d.mts +1 -2
  55. package/dist/drizzle/password-target.d.mts +2 -3
  56. package/dist/drizzle/pg-emails.d.mts +7 -8
  57. package/dist/drizzle/pg-password-prepared.d.mts +3 -4
  58. package/dist/drizzle/pg-passwords.d.mts +6 -7
  59. package/dist/drizzle/pg-proofs.d.mts +3 -4
  60. package/dist/drizzle/pg-sessions.d.mts +15 -16
  61. package/dist/drizzle/pg.d.mts +10 -11
  62. package/dist/drizzle/phone-model.d.mts +9 -10
  63. package/dist/drizzle/phone-target.d.mts +1 -2
  64. package/dist/drizzle/proof-model.d.mts +25 -26
  65. package/dist/drizzle/proof-target.d.mts +1 -2
  66. package/dist/drizzle/session-model.d.mts +25 -26
  67. package/dist/drizzle/session-target.d.mts +4 -5
  68. package/dist/drizzle/sqlite.d.mts +8 -9
  69. package/dist/drizzle/standalone-guard.mjs +3 -5
  70. package/dist/drizzle/standalone-guard.mjs.map +1 -1
  71. package/dist/drizzle/step-up-model.d.mts +6 -7
  72. package/dist/drizzle/totp-model.d.mts +7 -8
  73. package/dist/drizzle/totp-state.d.mts +2 -3
  74. package/dist/drizzle/totp-target.d.mts +1 -2
  75. package/dist/drizzle/transaction-mysql.mjs +1 -0
  76. package/dist/drizzle/transaction-mysql.mjs.map +1 -1
  77. package/dist/drizzle/transaction-owner.d.mts +3 -2
  78. package/dist/index.d.mts +2 -1
  79. package/dist/index.mjs +2 -1
  80. package/dist/internal/configuration.d.mts +19 -19
  81. package/dist/internal/mapping-error.d.mts +2 -3
  82. package/dist/internal/oauth-app.d.mts +1 -2
  83. package/dist/internal/oauth-app.mjs +3 -4
  84. package/dist/internal/oauth-app.mjs.map +1 -1
  85. package/dist/internal/oauth-server.d.mts +10 -0
  86. package/dist/internal/oauth-server.mjs +66 -0
  87. package/dist/internal/oauth-server.mjs.map +1 -0
  88. package/dist/internal/passkey/target.d.mts +2 -3
  89. package/dist/internal/passkeys.mjs +2 -1
  90. package/dist/internal/passkeys.mjs.map +1 -1
  91. package/dist/internal/persistence.mjs +3 -2
  92. package/dist/internal/persistence.mjs.map +1 -1
  93. package/dist/internal/sql-persistence.d.mts +1 -2
  94. package/dist/internal/sql-table.d.mts +6 -7
  95. package/dist/internal/sql-table.mjs +12 -2
  96. package/dist/internal/sql-table.mjs.map +1 -1
  97. package/dist/internal/standalone.mjs +13 -0
  98. package/dist/internal/standalone.mjs.map +1 -0
  99. package/dist/internal/storage-tables.d.mts +5 -6
  100. package/dist/internal/transaction-execution-kernel.d.mts +2 -3
  101. package/dist/internal/transaction-execution-kernel.mjs +3 -5
  102. package/dist/internal/transaction-execution-kernel.mjs.map +1 -1
  103. package/dist/internal/transaction-kernel.d.mts +49 -2
  104. package/package.json +1 -1
  105. package/src/DrizzleLibsql.ts +10 -54
  106. package/src/drizzle/model.ts +8 -10
  107. package/src/drizzle/standalone-guard.ts +4 -9
  108. package/src/drizzle/transaction-mysql.ts +2 -0
  109. package/src/index.ts +1 -0
  110. package/src/internal/oauth-app.ts +4 -5
  111. package/src/internal/oauth-server.ts +89 -0
  112. package/src/internal/passkeys.ts +2 -6
  113. package/src/internal/persistence.ts +3 -5
  114. package/src/internal/sql-table.ts +17 -2
  115. package/src/internal/standalone.ts +30 -0
  116. package/src/internal/transaction-execution-kernel.ts +3 -7
@@ -1,14 +1,1957 @@
1
+ import { PersistenceMappingError } from "../internal/mapping-error.mjs";
1
2
  import "./model.mjs";
2
- import { OAuthConnectedMapping, OAuthConnectedRevocationMapping } from "./oauth-connected-model.mjs";
3
+ import { OAuthConnectedAuthorityMapping, OAuthConnectedClientRegistrationTable, OAuthConnectedCohortTable, OAuthConnectedMapping, OAuthConnectedPolicyInput, OAuthConnectedRevocationJobTable, OAuthConnectedRevocationMapping } from "./oauth-connected-model.mjs";
4
+ import { Observation, Row } from "../internal/transaction-kernel.mjs";
3
5
  import "./transaction-owner.mjs";
4
- import "./oauth-owner.mjs";
5
- import "./oauth-flow.mjs";
6
+ import { CurrentOAuthTransaction } from "./oauth-owner.mjs";
7
+ import { currentSubject } from "./oauth-flow.mjs";
6
8
  import { DateTime, Effect, Schema } from "effect";
9
+ import * as M from "@yielded/auth/OAuth";
7
10
  import { OAuthAccountRevision } from "@yielded/auth/OAuth";
8
11
  import { SQL, Table } from "drizzle-orm";
9
- //#region src/drizzle/oauth-connected-state.d.ts
10
- type Mapping = OAuthConnectedMapping<any, any, any, any, any, any, any, any, any, any, any, any>;
11
- type Revocations = OAuthConnectedRevocationMapping<any, any, any, any, any, any, any, any>;
12
+ declare namespace oauth_connected_state_d_exports {
13
+ export { Authority, ClientAnchor, Current, Mapping, Revocations, ScopeAnchor, action, admissionStorage, claimStorage, client, clientKey, cohort, cohortKey, cohortWork, commandStorage, configuration, contextStorage, countCondition, current, disconnectStorage, disconnectedStorage, flowStorage, grantStorage, heldScope, initialGeneration, jobStorage, jobTable, lockClientById, nativeCopy, nativeOrder, nextOrder, orderNumber, policy, prelockClients, readGrant, readScope, refreshStorage, retainedUntil, rowCount, scope, scopeKey, sealedStorage, summaryStorage, tokenContextStorage, touchScope, unknownWork, useAuthority };
14
+ }
15
+ export type Authority = OAuthConnectedAuthorityMapping<any, any, any, any, any, any, any> & {
16
+ readonly client: Partial<Pick<OAuthConnectedClientRegistrationTable<any>, "encodeInsert">>;
17
+ readonly cohort: Partial<Pick<OAuthConnectedCohortTable<any>, "encodeInsert">>;
18
+ };
19
+ export type Mapping = OAuthConnectedMapping<any, any, any, any, any, any, any, any, any, any, any, any>;
20
+ export type Revocations = OAuthConnectedRevocationMapping<any, any, any, any, any, any, any, any>;
21
+ export type Current = NonNullable<Effect.Success<ReturnType<typeof currentSubject>>>;
22
+ export declare const contextStorage: {
23
+ encode: (value: {
24
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
25
+ readonly protocol: "oauth" | "oidc";
26
+ readonly configurationGeneration: number;
27
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
28
+ readonly responseIssuerMode: "required" | "unsupported";
29
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
30
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
31
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
32
+ readonly generation: number;
33
+ readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
34
+ readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
35
+ readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
36
+ readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
37
+ readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
38
+ readonly requestBindingExpiresAtMillis: number;
39
+ readonly issuedAtMillis: number;
40
+ readonly expiresAtMillis: number;
41
+ readonly claimLifetimeMillis: number;
42
+ readonly namespace: "effect-auth/oauth-connected-context/v1";
43
+ readonly revision: {
44
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
45
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
46
+ readonly credentials: readonly {
47
+ readonly credentialId: string;
48
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
49
+ }[];
50
+ };
51
+ readonly profile: {
52
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
53
+ readonly generation: number;
54
+ readonly issuance: "active" | "retired";
55
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
56
+ readonly clientRegistrationId: string;
57
+ readonly scopes: readonly string[];
58
+ readonly resources: readonly string[];
59
+ readonly retention: "access-and-refresh" | "access-only";
60
+ readonly maximumAccessLifetimeMillis: number;
61
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
62
+ readonly refreshAheadMillis: number;
63
+ readonly refresh: "confidential" | "rotating" | "unsupported";
64
+ readonly revocation: "cohort" | "unsupported";
65
+ };
66
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
67
+ readonly reconnect?: {
68
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
69
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
70
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
71
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
72
+ readonly identity: {
73
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
74
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
75
+ readonly subject: string;
76
+ };
77
+ readonly configuration: {
78
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
79
+ readonly protocol: "oauth" | "oidc";
80
+ readonly configurationGeneration: number;
81
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
82
+ readonly responseIssuerMode: "required" | "unsupported";
83
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
84
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
85
+ readonly profile: {
86
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
87
+ readonly generation: number;
88
+ readonly issuance: "active" | "retired";
89
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
90
+ readonly clientRegistrationId: string;
91
+ readonly scopes: readonly string[];
92
+ readonly resources: readonly string[];
93
+ readonly retention: "access-and-refresh" | "access-only";
94
+ readonly maximumAccessLifetimeMillis: number;
95
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
96
+ readonly refreshAheadMillis: number;
97
+ readonly refresh: "confidential" | "rotating" | "unsupported";
98
+ readonly revocation: "cohort" | "unsupported";
99
+ };
100
+ };
101
+ } | undefined;
102
+ readonly maximumEvidenceAgeMillis: number;
103
+ }) => string;
104
+ decode: (value: string) => {
105
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
106
+ readonly protocol: "oauth" | "oidc";
107
+ readonly configurationGeneration: number;
108
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
109
+ readonly responseIssuerMode: "required" | "unsupported";
110
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
111
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
112
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
113
+ readonly generation: number;
114
+ readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
115
+ readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
116
+ readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
117
+ readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
118
+ readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
119
+ readonly requestBindingExpiresAtMillis: number;
120
+ readonly issuedAtMillis: number;
121
+ readonly expiresAtMillis: number;
122
+ readonly claimLifetimeMillis: number;
123
+ readonly namespace: "effect-auth/oauth-connected-context/v1";
124
+ readonly revision: {
125
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
126
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
127
+ readonly credentials: readonly {
128
+ readonly credentialId: string;
129
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
130
+ }[];
131
+ };
132
+ readonly profile: {
133
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
134
+ readonly generation: number;
135
+ readonly issuance: "active" | "retired";
136
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
137
+ readonly clientRegistrationId: string;
138
+ readonly scopes: readonly string[];
139
+ readonly resources: readonly string[];
140
+ readonly retention: "access-and-refresh" | "access-only";
141
+ readonly maximumAccessLifetimeMillis: number;
142
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
143
+ readonly refreshAheadMillis: number;
144
+ readonly refresh: "confidential" | "rotating" | "unsupported";
145
+ readonly revocation: "cohort" | "unsupported";
146
+ };
147
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
148
+ readonly reconnect?: {
149
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
150
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
151
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
152
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
153
+ readonly identity: {
154
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
155
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
156
+ readonly subject: string;
157
+ };
158
+ readonly configuration: {
159
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
160
+ readonly protocol: "oauth" | "oidc";
161
+ readonly configurationGeneration: number;
162
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
163
+ readonly responseIssuerMode: "required" | "unsupported";
164
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
165
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
166
+ readonly profile: {
167
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
168
+ readonly generation: number;
169
+ readonly issuance: "active" | "retired";
170
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
171
+ readonly clientRegistrationId: string;
172
+ readonly scopes: readonly string[];
173
+ readonly resources: readonly string[];
174
+ readonly retention: "access-and-refresh" | "access-only";
175
+ readonly maximumAccessLifetimeMillis: number;
176
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
177
+ readonly refreshAheadMillis: number;
178
+ readonly refresh: "confidential" | "rotating" | "unsupported";
179
+ readonly revocation: "cohort" | "unsupported";
180
+ };
181
+ };
182
+ } | undefined;
183
+ readonly maximumEvidenceAgeMillis: number;
184
+ };
185
+ };
186
+ export declare const flowStorage: {
187
+ encode: (value: {
188
+ readonly context: {
189
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
190
+ readonly protocol: "oauth" | "oidc";
191
+ readonly configurationGeneration: number;
192
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
193
+ readonly responseIssuerMode: "required" | "unsupported";
194
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
195
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
196
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
197
+ readonly generation: number;
198
+ readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
199
+ readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
200
+ readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
201
+ readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
202
+ readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
203
+ readonly requestBindingExpiresAtMillis: number;
204
+ readonly issuedAtMillis: number;
205
+ readonly expiresAtMillis: number;
206
+ readonly claimLifetimeMillis: number;
207
+ readonly namespace: "effect-auth/oauth-connected-context/v1";
208
+ readonly revision: {
209
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
210
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
211
+ readonly credentials: readonly {
212
+ readonly credentialId: string;
213
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
214
+ }[];
215
+ };
216
+ readonly profile: {
217
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
218
+ readonly generation: number;
219
+ readonly issuance: "active" | "retired";
220
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
221
+ readonly clientRegistrationId: string;
222
+ readonly scopes: readonly string[];
223
+ readonly resources: readonly string[];
224
+ readonly retention: "access-and-refresh" | "access-only";
225
+ readonly maximumAccessLifetimeMillis: number;
226
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
227
+ readonly refreshAheadMillis: number;
228
+ readonly refresh: "confidential" | "rotating" | "unsupported";
229
+ readonly revocation: "cohort" | "unsupported";
230
+ };
231
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
232
+ readonly reconnect?: {
233
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
234
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
235
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
236
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
237
+ readonly identity: {
238
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
239
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
240
+ readonly subject: string;
241
+ };
242
+ readonly configuration: {
243
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
244
+ readonly protocol: "oauth" | "oidc";
245
+ readonly configurationGeneration: number;
246
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
247
+ readonly responseIssuerMode: "required" | "unsupported";
248
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
249
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
250
+ readonly profile: {
251
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
252
+ readonly generation: number;
253
+ readonly issuance: "active" | "retired";
254
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
255
+ readonly clientRegistrationId: string;
256
+ readonly scopes: readonly string[];
257
+ readonly resources: readonly string[];
258
+ readonly retention: "access-and-refresh" | "access-only";
259
+ readonly maximumAccessLifetimeMillis: number;
260
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
261
+ readonly refreshAheadMillis: number;
262
+ readonly refresh: "confidential" | "rotating" | "unsupported";
263
+ readonly revocation: "cohort" | "unsupported";
264
+ };
265
+ };
266
+ } | undefined;
267
+ readonly maximumEvidenceAgeMillis: number;
268
+ };
269
+ readonly sealed: {
270
+ readonly format: "oauth-xchacha20poly1305-v1";
271
+ readonly keyId: string;
272
+ readonly nonce: string;
273
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
274
+ };
275
+ readonly retentionUntilMillis: number;
276
+ }) => string;
277
+ decode: (value: string) => {
278
+ readonly context: {
279
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
280
+ readonly protocol: "oauth" | "oidc";
281
+ readonly configurationGeneration: number;
282
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
283
+ readonly responseIssuerMode: "required" | "unsupported";
284
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
285
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
286
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
287
+ readonly generation: number;
288
+ readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
289
+ readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
290
+ readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
291
+ readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
292
+ readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
293
+ readonly requestBindingExpiresAtMillis: number;
294
+ readonly issuedAtMillis: number;
295
+ readonly expiresAtMillis: number;
296
+ readonly claimLifetimeMillis: number;
297
+ readonly namespace: "effect-auth/oauth-connected-context/v1";
298
+ readonly revision: {
299
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
300
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
301
+ readonly credentials: readonly {
302
+ readonly credentialId: string;
303
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
304
+ }[];
305
+ };
306
+ readonly profile: {
307
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
308
+ readonly generation: number;
309
+ readonly issuance: "active" | "retired";
310
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
311
+ readonly clientRegistrationId: string;
312
+ readonly scopes: readonly string[];
313
+ readonly resources: readonly string[];
314
+ readonly retention: "access-and-refresh" | "access-only";
315
+ readonly maximumAccessLifetimeMillis: number;
316
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
317
+ readonly refreshAheadMillis: number;
318
+ readonly refresh: "confidential" | "rotating" | "unsupported";
319
+ readonly revocation: "cohort" | "unsupported";
320
+ };
321
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
322
+ readonly reconnect?: {
323
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
324
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
325
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
326
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
327
+ readonly identity: {
328
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
329
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
330
+ readonly subject: string;
331
+ };
332
+ readonly configuration: {
333
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
334
+ readonly protocol: "oauth" | "oidc";
335
+ readonly configurationGeneration: number;
336
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
337
+ readonly responseIssuerMode: "required" | "unsupported";
338
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
339
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
340
+ readonly profile: {
341
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
342
+ readonly generation: number;
343
+ readonly issuance: "active" | "retired";
344
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
345
+ readonly clientRegistrationId: string;
346
+ readonly scopes: readonly string[];
347
+ readonly resources: readonly string[];
348
+ readonly retention: "access-and-refresh" | "access-only";
349
+ readonly maximumAccessLifetimeMillis: number;
350
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
351
+ readonly refreshAheadMillis: number;
352
+ readonly refresh: "confidential" | "rotating" | "unsupported";
353
+ readonly revocation: "cohort" | "unsupported";
354
+ };
355
+ };
356
+ } | undefined;
357
+ readonly maximumEvidenceAgeMillis: number;
358
+ };
359
+ readonly sealed: {
360
+ readonly format: "oauth-xchacha20poly1305-v1";
361
+ readonly keyId: string;
362
+ readonly nonce: string;
363
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
364
+ };
365
+ readonly retentionUntilMillis: number;
366
+ };
367
+ };
368
+ export declare const claimStorage: {
369
+ encode: (value: {
370
+ readonly flow: {
371
+ readonly context: {
372
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
373
+ readonly protocol: "oauth" | "oidc";
374
+ readonly configurationGeneration: number;
375
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
376
+ readonly responseIssuerMode: "required" | "unsupported";
377
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
378
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
379
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
380
+ readonly generation: number;
381
+ readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
382
+ readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
383
+ readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
384
+ readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
385
+ readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
386
+ readonly requestBindingExpiresAtMillis: number;
387
+ readonly issuedAtMillis: number;
388
+ readonly expiresAtMillis: number;
389
+ readonly claimLifetimeMillis: number;
390
+ readonly namespace: "effect-auth/oauth-connected-context/v1";
391
+ readonly revision: {
392
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
393
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
394
+ readonly credentials: readonly {
395
+ readonly credentialId: string;
396
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
397
+ }[];
398
+ };
399
+ readonly profile: {
400
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
401
+ readonly generation: number;
402
+ readonly issuance: "active" | "retired";
403
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
404
+ readonly clientRegistrationId: string;
405
+ readonly scopes: readonly string[];
406
+ readonly resources: readonly string[];
407
+ readonly retention: "access-and-refresh" | "access-only";
408
+ readonly maximumAccessLifetimeMillis: number;
409
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
410
+ readonly refreshAheadMillis: number;
411
+ readonly refresh: "confidential" | "rotating" | "unsupported";
412
+ readonly revocation: "cohort" | "unsupported";
413
+ };
414
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
415
+ readonly reconnect?: {
416
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
417
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
418
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
419
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
420
+ readonly identity: {
421
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
422
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
423
+ readonly subject: string;
424
+ };
425
+ readonly configuration: {
426
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
427
+ readonly protocol: "oauth" | "oidc";
428
+ readonly configurationGeneration: number;
429
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
430
+ readonly responseIssuerMode: "required" | "unsupported";
431
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
432
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
433
+ readonly profile: {
434
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
435
+ readonly generation: number;
436
+ readonly issuance: "active" | "retired";
437
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
438
+ readonly clientRegistrationId: string;
439
+ readonly scopes: readonly string[];
440
+ readonly resources: readonly string[];
441
+ readonly retention: "access-and-refresh" | "access-only";
442
+ readonly maximumAccessLifetimeMillis: number;
443
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
444
+ readonly refreshAheadMillis: number;
445
+ readonly refresh: "confidential" | "rotating" | "unsupported";
446
+ readonly revocation: "cohort" | "unsupported";
447
+ };
448
+ };
449
+ } | undefined;
450
+ readonly maximumEvidenceAgeMillis: number;
451
+ };
452
+ readonly sealed: {
453
+ readonly format: "oauth-xchacha20poly1305-v1";
454
+ readonly keyId: string;
455
+ readonly nonce: string;
456
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
457
+ };
458
+ readonly retentionUntilMillis: number;
459
+ };
460
+ readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
461
+ readonly claimedAtMillis: number;
462
+ readonly claimExpiresAtMillis: number;
463
+ readonly order: string;
464
+ }) => string;
465
+ decode: (value: string) => {
466
+ readonly flow: {
467
+ readonly context: {
468
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
469
+ readonly protocol: "oauth" | "oidc";
470
+ readonly configurationGeneration: number;
471
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
472
+ readonly responseIssuerMode: "required" | "unsupported";
473
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
474
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
475
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
476
+ readonly generation: number;
477
+ readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
478
+ readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
479
+ readonly returnTarget: string & import("effect/Brand").Brand<"effect-auth/OAuthReturnTarget">;
480
+ readonly stateDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
481
+ readonly requestBindingVerifier: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
482
+ readonly requestBindingExpiresAtMillis: number;
483
+ readonly issuedAtMillis: number;
484
+ readonly expiresAtMillis: number;
485
+ readonly claimLifetimeMillis: number;
486
+ readonly namespace: "effect-auth/oauth-connected-context/v1";
487
+ readonly revision: {
488
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
489
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
490
+ readonly credentials: readonly {
491
+ readonly credentialId: string;
492
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
493
+ }[];
494
+ };
495
+ readonly profile: {
496
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
497
+ readonly generation: number;
498
+ readonly issuance: "active" | "retired";
499
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
500
+ readonly clientRegistrationId: string;
501
+ readonly scopes: readonly string[];
502
+ readonly resources: readonly string[];
503
+ readonly retention: "access-and-refresh" | "access-only";
504
+ readonly maximumAccessLifetimeMillis: number;
505
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
506
+ readonly refreshAheadMillis: number;
507
+ readonly refresh: "confidential" | "rotating" | "unsupported";
508
+ readonly revocation: "cohort" | "unsupported";
509
+ };
510
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
511
+ readonly reconnect?: {
512
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
513
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
514
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
515
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
516
+ readonly identity: {
517
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
518
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
519
+ readonly subject: string;
520
+ };
521
+ readonly configuration: {
522
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
523
+ readonly protocol: "oauth" | "oidc";
524
+ readonly configurationGeneration: number;
525
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
526
+ readonly responseIssuerMode: "required" | "unsupported";
527
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
528
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
529
+ readonly profile: {
530
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
531
+ readonly generation: number;
532
+ readonly issuance: "active" | "retired";
533
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
534
+ readonly clientRegistrationId: string;
535
+ readonly scopes: readonly string[];
536
+ readonly resources: readonly string[];
537
+ readonly retention: "access-and-refresh" | "access-only";
538
+ readonly maximumAccessLifetimeMillis: number;
539
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
540
+ readonly refreshAheadMillis: number;
541
+ readonly refresh: "confidential" | "rotating" | "unsupported";
542
+ readonly revocation: "cohort" | "unsupported";
543
+ };
544
+ };
545
+ } | undefined;
546
+ readonly maximumEvidenceAgeMillis: number;
547
+ };
548
+ readonly sealed: {
549
+ readonly format: "oauth-xchacha20poly1305-v1";
550
+ readonly keyId: string;
551
+ readonly nonce: string;
552
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
553
+ };
554
+ readonly retentionUntilMillis: number;
555
+ };
556
+ readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
557
+ readonly claimedAtMillis: number;
558
+ readonly claimExpiresAtMillis: number;
559
+ readonly order: string;
560
+ };
561
+ };
562
+ export declare const tokenContextStorage: {
563
+ encode: (value: {
564
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
565
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
566
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
567
+ readonly identity: {
568
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
569
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
570
+ readonly subject: string;
571
+ };
572
+ readonly configuration: {
573
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
574
+ readonly protocol: "oauth" | "oidc";
575
+ readonly configurationGeneration: number;
576
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
577
+ readonly responseIssuerMode: "required" | "unsupported";
578
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
579
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
580
+ readonly profile: {
581
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
582
+ readonly generation: number;
583
+ readonly issuance: "active" | "retired";
584
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
585
+ readonly clientRegistrationId: string;
586
+ readonly scopes: readonly string[];
587
+ readonly resources: readonly string[];
588
+ readonly retention: "access-and-refresh" | "access-only";
589
+ readonly maximumAccessLifetimeMillis: number;
590
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
591
+ readonly refreshAheadMillis: number;
592
+ readonly refresh: "confidential" | "rotating" | "unsupported";
593
+ readonly revocation: "cohort" | "unsupported";
594
+ };
595
+ };
596
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
597
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
598
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
599
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
600
+ readonly metadata: {
601
+ readonly scopes: readonly string[];
602
+ readonly resources: readonly string[];
603
+ readonly accessExpiresAtMillis?: number | undefined;
604
+ readonly refreshExpiresAtMillis?: number | undefined;
605
+ readonly useUntilMillis: number;
606
+ readonly refreshUseUntilMillis?: number | undefined;
607
+ readonly obtainedAtMillis: number;
608
+ readonly profile?: {
609
+ readonly displayName?: string | undefined;
610
+ readonly handle?: string | undefined;
611
+ readonly avatarUrl?: string | undefined;
612
+ readonly profileUrl?: string | undefined;
613
+ readonly email?: string | undefined;
614
+ readonly emailVerified?: boolean | undefined;
615
+ readonly providerData?: {
616
+ readonly [x: string]: Schema.Json;
617
+ } | undefined;
618
+ } | undefined;
619
+ };
620
+ }) => string;
621
+ decode: (value: string) => {
622
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
623
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
624
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
625
+ readonly identity: {
626
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
627
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
628
+ readonly subject: string;
629
+ };
630
+ readonly configuration: {
631
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
632
+ readonly protocol: "oauth" | "oidc";
633
+ readonly configurationGeneration: number;
634
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
635
+ readonly responseIssuerMode: "required" | "unsupported";
636
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
637
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
638
+ readonly profile: {
639
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
640
+ readonly generation: number;
641
+ readonly issuance: "active" | "retired";
642
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
643
+ readonly clientRegistrationId: string;
644
+ readonly scopes: readonly string[];
645
+ readonly resources: readonly string[];
646
+ readonly retention: "access-and-refresh" | "access-only";
647
+ readonly maximumAccessLifetimeMillis: number;
648
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
649
+ readonly refreshAheadMillis: number;
650
+ readonly refresh: "confidential" | "rotating" | "unsupported";
651
+ readonly revocation: "cohort" | "unsupported";
652
+ };
653
+ };
654
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
655
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
656
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
657
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
658
+ readonly metadata: {
659
+ readonly scopes: readonly string[];
660
+ readonly resources: readonly string[];
661
+ readonly accessExpiresAtMillis?: number | undefined;
662
+ readonly refreshExpiresAtMillis?: number | undefined;
663
+ readonly useUntilMillis: number;
664
+ readonly refreshUseUntilMillis?: number | undefined;
665
+ readonly obtainedAtMillis: number;
666
+ readonly profile?: {
667
+ readonly displayName?: string | undefined;
668
+ readonly handle?: string | undefined;
669
+ readonly avatarUrl?: string | undefined;
670
+ readonly profileUrl?: string | undefined;
671
+ readonly email?: string | undefined;
672
+ readonly emailVerified?: boolean | undefined;
673
+ readonly providerData?: {
674
+ readonly [x: string]: Schema.Json;
675
+ } | undefined;
676
+ } | undefined;
677
+ };
678
+ };
679
+ };
680
+ export declare const sealedStorage: {
681
+ encode: (value: {
682
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
683
+ readonly keyId: string;
684
+ readonly nonce: string;
685
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
686
+ }) => string;
687
+ decode: (value: string) => {
688
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
689
+ readonly keyId: string;
690
+ readonly nonce: string;
691
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
692
+ };
693
+ };
694
+ export declare const grantStorage: {
695
+ encode: (value: {
696
+ readonly context: {
697
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
698
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
699
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
700
+ readonly identity: {
701
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
702
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
703
+ readonly subject: string;
704
+ };
705
+ readonly configuration: {
706
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
707
+ readonly protocol: "oauth" | "oidc";
708
+ readonly configurationGeneration: number;
709
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
710
+ readonly responseIssuerMode: "required" | "unsupported";
711
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
712
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
713
+ readonly profile: {
714
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
715
+ readonly generation: number;
716
+ readonly issuance: "active" | "retired";
717
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
718
+ readonly clientRegistrationId: string;
719
+ readonly scopes: readonly string[];
720
+ readonly resources: readonly string[];
721
+ readonly retention: "access-and-refresh" | "access-only";
722
+ readonly maximumAccessLifetimeMillis: number;
723
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
724
+ readonly refreshAheadMillis: number;
725
+ readonly refresh: "confidential" | "rotating" | "unsupported";
726
+ readonly revocation: "cohort" | "unsupported";
727
+ };
728
+ };
729
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
730
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
731
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
732
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
733
+ readonly metadata: {
734
+ readonly scopes: readonly string[];
735
+ readonly resources: readonly string[];
736
+ readonly accessExpiresAtMillis?: number | undefined;
737
+ readonly refreshExpiresAtMillis?: number | undefined;
738
+ readonly useUntilMillis: number;
739
+ readonly refreshUseUntilMillis?: number | undefined;
740
+ readonly obtainedAtMillis: number;
741
+ readonly profile?: {
742
+ readonly displayName?: string | undefined;
743
+ readonly handle?: string | undefined;
744
+ readonly avatarUrl?: string | undefined;
745
+ readonly profileUrl?: string | undefined;
746
+ readonly email?: string | undefined;
747
+ readonly emailVerified?: boolean | undefined;
748
+ readonly providerData?: {
749
+ readonly [x: string]: Schema.Json;
750
+ } | undefined;
751
+ } | undefined;
752
+ };
753
+ };
754
+ readonly sealed: {
755
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
756
+ readonly keyId: string;
757
+ readonly nonce: string;
758
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
759
+ };
760
+ }) => string;
761
+ decode: (value: string) => {
762
+ readonly context: {
763
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
764
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
765
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
766
+ readonly identity: {
767
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
768
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
769
+ readonly subject: string;
770
+ };
771
+ readonly configuration: {
772
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
773
+ readonly protocol: "oauth" | "oidc";
774
+ readonly configurationGeneration: number;
775
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
776
+ readonly responseIssuerMode: "required" | "unsupported";
777
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
778
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
779
+ readonly profile: {
780
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
781
+ readonly generation: number;
782
+ readonly issuance: "active" | "retired";
783
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
784
+ readonly clientRegistrationId: string;
785
+ readonly scopes: readonly string[];
786
+ readonly resources: readonly string[];
787
+ readonly retention: "access-and-refresh" | "access-only";
788
+ readonly maximumAccessLifetimeMillis: number;
789
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
790
+ readonly refreshAheadMillis: number;
791
+ readonly refresh: "confidential" | "rotating" | "unsupported";
792
+ readonly revocation: "cohort" | "unsupported";
793
+ };
794
+ };
795
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
796
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
797
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
798
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
799
+ readonly metadata: {
800
+ readonly scopes: readonly string[];
801
+ readonly resources: readonly string[];
802
+ readonly accessExpiresAtMillis?: number | undefined;
803
+ readonly refreshExpiresAtMillis?: number | undefined;
804
+ readonly useUntilMillis: number;
805
+ readonly refreshUseUntilMillis?: number | undefined;
806
+ readonly obtainedAtMillis: number;
807
+ readonly profile?: {
808
+ readonly displayName?: string | undefined;
809
+ readonly handle?: string | undefined;
810
+ readonly avatarUrl?: string | undefined;
811
+ readonly profileUrl?: string | undefined;
812
+ readonly email?: string | undefined;
813
+ readonly emailVerified?: boolean | undefined;
814
+ readonly providerData?: {
815
+ readonly [x: string]: Schema.Json;
816
+ } | undefined;
817
+ } | undefined;
818
+ };
819
+ };
820
+ readonly sealed: {
821
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
822
+ readonly keyId: string;
823
+ readonly nonce: string;
824
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
825
+ };
826
+ };
827
+ };
828
+ export declare const admissionStorage: {
829
+ encode: (value: {
830
+ readonly grant: {
831
+ readonly context: {
832
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
833
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
834
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
835
+ readonly identity: {
836
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
837
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
838
+ readonly subject: string;
839
+ };
840
+ readonly configuration: {
841
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
842
+ readonly protocol: "oauth" | "oidc";
843
+ readonly configurationGeneration: number;
844
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
845
+ readonly responseIssuerMode: "required" | "unsupported";
846
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
847
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
848
+ readonly profile: {
849
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
850
+ readonly generation: number;
851
+ readonly issuance: "active" | "retired";
852
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
853
+ readonly clientRegistrationId: string;
854
+ readonly scopes: readonly string[];
855
+ readonly resources: readonly string[];
856
+ readonly retention: "access-and-refresh" | "access-only";
857
+ readonly maximumAccessLifetimeMillis: number;
858
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
859
+ readonly refreshAheadMillis: number;
860
+ readonly refresh: "confidential" | "rotating" | "unsupported";
861
+ readonly revocation: "cohort" | "unsupported";
862
+ };
863
+ };
864
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
865
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
866
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
867
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
868
+ readonly metadata: {
869
+ readonly scopes: readonly string[];
870
+ readonly resources: readonly string[];
871
+ readonly accessExpiresAtMillis?: number | undefined;
872
+ readonly refreshExpiresAtMillis?: number | undefined;
873
+ readonly useUntilMillis: number;
874
+ readonly refreshUseUntilMillis?: number | undefined;
875
+ readonly obtainedAtMillis: number;
876
+ readonly profile?: {
877
+ readonly displayName?: string | undefined;
878
+ readonly handle?: string | undefined;
879
+ readonly avatarUrl?: string | undefined;
880
+ readonly profileUrl?: string | undefined;
881
+ readonly email?: string | undefined;
882
+ readonly emailVerified?: boolean | undefined;
883
+ readonly providerData?: {
884
+ readonly [x: string]: Schema.Json;
885
+ } | undefined;
886
+ } | undefined;
887
+ };
888
+ };
889
+ readonly sealed: {
890
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
891
+ readonly keyId: string;
892
+ readonly nonce: string;
893
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
894
+ };
895
+ };
896
+ readonly authorization: {
897
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
898
+ readonly revision: {
899
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
900
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
901
+ readonly credentials: readonly {
902
+ readonly credentialId: string;
903
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
904
+ }[];
905
+ };
906
+ readonly policyRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
907
+ readonly expiresAtMillis: number;
908
+ readonly purpose: "metadata" | "use";
909
+ readonly grantId?: (string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">) | undefined;
910
+ readonly profileKey?: (string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">) | undefined;
911
+ };
912
+ }) => string;
913
+ decode: (value: string) => {
914
+ readonly grant: {
915
+ readonly context: {
916
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
917
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
918
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
919
+ readonly identity: {
920
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
921
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
922
+ readonly subject: string;
923
+ };
924
+ readonly configuration: {
925
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
926
+ readonly protocol: "oauth" | "oidc";
927
+ readonly configurationGeneration: number;
928
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
929
+ readonly responseIssuerMode: "required" | "unsupported";
930
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
931
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
932
+ readonly profile: {
933
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
934
+ readonly generation: number;
935
+ readonly issuance: "active" | "retired";
936
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
937
+ readonly clientRegistrationId: string;
938
+ readonly scopes: readonly string[];
939
+ readonly resources: readonly string[];
940
+ readonly retention: "access-and-refresh" | "access-only";
941
+ readonly maximumAccessLifetimeMillis: number;
942
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
943
+ readonly refreshAheadMillis: number;
944
+ readonly refresh: "confidential" | "rotating" | "unsupported";
945
+ readonly revocation: "cohort" | "unsupported";
946
+ };
947
+ };
948
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
949
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
950
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
951
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
952
+ readonly metadata: {
953
+ readonly scopes: readonly string[];
954
+ readonly resources: readonly string[];
955
+ readonly accessExpiresAtMillis?: number | undefined;
956
+ readonly refreshExpiresAtMillis?: number | undefined;
957
+ readonly useUntilMillis: number;
958
+ readonly refreshUseUntilMillis?: number | undefined;
959
+ readonly obtainedAtMillis: number;
960
+ readonly profile?: {
961
+ readonly displayName?: string | undefined;
962
+ readonly handle?: string | undefined;
963
+ readonly avatarUrl?: string | undefined;
964
+ readonly profileUrl?: string | undefined;
965
+ readonly email?: string | undefined;
966
+ readonly emailVerified?: boolean | undefined;
967
+ readonly providerData?: {
968
+ readonly [x: string]: Schema.Json;
969
+ } | undefined;
970
+ } | undefined;
971
+ };
972
+ };
973
+ readonly sealed: {
974
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
975
+ readonly keyId: string;
976
+ readonly nonce: string;
977
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
978
+ };
979
+ };
980
+ readonly authorization: {
981
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
982
+ readonly revision: {
983
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
984
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
985
+ readonly credentials: readonly {
986
+ readonly credentialId: string;
987
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
988
+ }[];
989
+ };
990
+ readonly policyRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
991
+ readonly expiresAtMillis: number;
992
+ readonly purpose: "metadata" | "use";
993
+ readonly grantId?: (string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">) | undefined;
994
+ readonly profileKey?: (string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">) | undefined;
995
+ };
996
+ };
997
+ };
998
+ export declare const commandStorage: {
999
+ encode: (value: {
1000
+ readonly context: {
1001
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1002
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1003
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1004
+ readonly identity: {
1005
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1006
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1007
+ readonly subject: string;
1008
+ };
1009
+ readonly configuration: {
1010
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1011
+ readonly protocol: "oauth" | "oidc";
1012
+ readonly configurationGeneration: number;
1013
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1014
+ readonly responseIssuerMode: "required" | "unsupported";
1015
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1016
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1017
+ readonly profile: {
1018
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1019
+ readonly generation: number;
1020
+ readonly issuance: "active" | "retired";
1021
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1022
+ readonly clientRegistrationId: string;
1023
+ readonly scopes: readonly string[];
1024
+ readonly resources: readonly string[];
1025
+ readonly retention: "access-and-refresh" | "access-only";
1026
+ readonly maximumAccessLifetimeMillis: number;
1027
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1028
+ readonly refreshAheadMillis: number;
1029
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1030
+ readonly revocation: "cohort" | "unsupported";
1031
+ };
1032
+ };
1033
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1034
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1035
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1036
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1037
+ readonly metadata: {
1038
+ readonly scopes: readonly string[];
1039
+ readonly resources: readonly string[];
1040
+ readonly accessExpiresAtMillis?: number | undefined;
1041
+ readonly refreshExpiresAtMillis?: number | undefined;
1042
+ readonly useUntilMillis: number;
1043
+ readonly refreshUseUntilMillis?: number | undefined;
1044
+ readonly obtainedAtMillis: number;
1045
+ readonly profile?: {
1046
+ readonly displayName?: string | undefined;
1047
+ readonly handle?: string | undefined;
1048
+ readonly avatarUrl?: string | undefined;
1049
+ readonly profileUrl?: string | undefined;
1050
+ readonly email?: string | undefined;
1051
+ readonly emailVerified?: boolean | undefined;
1052
+ readonly providerData?: {
1053
+ readonly [x: string]: Schema.Json;
1054
+ } | undefined;
1055
+ } | undefined;
1056
+ };
1057
+ };
1058
+ readonly originalDigest: string;
1059
+ readonly revocationJobId?: string | undefined;
1060
+ }) => string;
1061
+ decode: (value: string) => {
1062
+ readonly context: {
1063
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1064
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1065
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1066
+ readonly identity: {
1067
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1068
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1069
+ readonly subject: string;
1070
+ };
1071
+ readonly configuration: {
1072
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1073
+ readonly protocol: "oauth" | "oidc";
1074
+ readonly configurationGeneration: number;
1075
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1076
+ readonly responseIssuerMode: "required" | "unsupported";
1077
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1078
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1079
+ readonly profile: {
1080
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1081
+ readonly generation: number;
1082
+ readonly issuance: "active" | "retired";
1083
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1084
+ readonly clientRegistrationId: string;
1085
+ readonly scopes: readonly string[];
1086
+ readonly resources: readonly string[];
1087
+ readonly retention: "access-and-refresh" | "access-only";
1088
+ readonly maximumAccessLifetimeMillis: number;
1089
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1090
+ readonly refreshAheadMillis: number;
1091
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1092
+ readonly revocation: "cohort" | "unsupported";
1093
+ };
1094
+ };
1095
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1096
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1097
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1098
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1099
+ readonly metadata: {
1100
+ readonly scopes: readonly string[];
1101
+ readonly resources: readonly string[];
1102
+ readonly accessExpiresAtMillis?: number | undefined;
1103
+ readonly refreshExpiresAtMillis?: number | undefined;
1104
+ readonly useUntilMillis: number;
1105
+ readonly refreshUseUntilMillis?: number | undefined;
1106
+ readonly obtainedAtMillis: number;
1107
+ readonly profile?: {
1108
+ readonly displayName?: string | undefined;
1109
+ readonly handle?: string | undefined;
1110
+ readonly avatarUrl?: string | undefined;
1111
+ readonly profileUrl?: string | undefined;
1112
+ readonly email?: string | undefined;
1113
+ readonly emailVerified?: boolean | undefined;
1114
+ readonly providerData?: {
1115
+ readonly [x: string]: Schema.Json;
1116
+ } | undefined;
1117
+ } | undefined;
1118
+ };
1119
+ };
1120
+ readonly originalDigest: string;
1121
+ readonly revocationJobId?: string | undefined;
1122
+ };
1123
+ };
1124
+ export declare const disconnectStorage: {
1125
+ encode: (value: {
1126
+ readonly context: {
1127
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1128
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1129
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1130
+ readonly identity: {
1131
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1132
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1133
+ readonly subject: string;
1134
+ };
1135
+ readonly configuration: {
1136
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1137
+ readonly protocol: "oauth" | "oidc";
1138
+ readonly configurationGeneration: number;
1139
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1140
+ readonly responseIssuerMode: "required" | "unsupported";
1141
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1142
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1143
+ readonly profile: {
1144
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1145
+ readonly generation: number;
1146
+ readonly issuance: "active" | "retired";
1147
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1148
+ readonly clientRegistrationId: string;
1149
+ readonly scopes: readonly string[];
1150
+ readonly resources: readonly string[];
1151
+ readonly retention: "access-and-refresh" | "access-only";
1152
+ readonly maximumAccessLifetimeMillis: number;
1153
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1154
+ readonly refreshAheadMillis: number;
1155
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1156
+ readonly revocation: "cohort" | "unsupported";
1157
+ };
1158
+ };
1159
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1160
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1161
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1162
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1163
+ readonly metadata: {
1164
+ readonly scopes: readonly string[];
1165
+ readonly resources: readonly string[];
1166
+ readonly accessExpiresAtMillis?: number | undefined;
1167
+ readonly refreshExpiresAtMillis?: number | undefined;
1168
+ readonly useUntilMillis: number;
1169
+ readonly refreshUseUntilMillis?: number | undefined;
1170
+ readonly obtainedAtMillis: number;
1171
+ readonly profile?: {
1172
+ readonly displayName?: string | undefined;
1173
+ readonly handle?: string | undefined;
1174
+ readonly avatarUrl?: string | undefined;
1175
+ readonly profileUrl?: string | undefined;
1176
+ readonly email?: string | undefined;
1177
+ readonly emailVerified?: boolean | undefined;
1178
+ readonly providerData?: {
1179
+ readonly [x: string]: Schema.Json;
1180
+ } | undefined;
1181
+ } | undefined;
1182
+ };
1183
+ };
1184
+ readonly sealed?: {
1185
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
1186
+ readonly keyId: string;
1187
+ readonly nonce: string;
1188
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
1189
+ } | undefined;
1190
+ }) => string;
1191
+ decode: (value: string) => {
1192
+ readonly context: {
1193
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1194
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1195
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1196
+ readonly identity: {
1197
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1198
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1199
+ readonly subject: string;
1200
+ };
1201
+ readonly configuration: {
1202
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1203
+ readonly protocol: "oauth" | "oidc";
1204
+ readonly configurationGeneration: number;
1205
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1206
+ readonly responseIssuerMode: "required" | "unsupported";
1207
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1208
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1209
+ readonly profile: {
1210
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1211
+ readonly generation: number;
1212
+ readonly issuance: "active" | "retired";
1213
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1214
+ readonly clientRegistrationId: string;
1215
+ readonly scopes: readonly string[];
1216
+ readonly resources: readonly string[];
1217
+ readonly retention: "access-and-refresh" | "access-only";
1218
+ readonly maximumAccessLifetimeMillis: number;
1219
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1220
+ readonly refreshAheadMillis: number;
1221
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1222
+ readonly revocation: "cohort" | "unsupported";
1223
+ };
1224
+ };
1225
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1226
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1227
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1228
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1229
+ readonly metadata: {
1230
+ readonly scopes: readonly string[];
1231
+ readonly resources: readonly string[];
1232
+ readonly accessExpiresAtMillis?: number | undefined;
1233
+ readonly refreshExpiresAtMillis?: number | undefined;
1234
+ readonly useUntilMillis: number;
1235
+ readonly refreshUseUntilMillis?: number | undefined;
1236
+ readonly obtainedAtMillis: number;
1237
+ readonly profile?: {
1238
+ readonly displayName?: string | undefined;
1239
+ readonly handle?: string | undefined;
1240
+ readonly avatarUrl?: string | undefined;
1241
+ readonly profileUrl?: string | undefined;
1242
+ readonly email?: string | undefined;
1243
+ readonly emailVerified?: boolean | undefined;
1244
+ readonly providerData?: {
1245
+ readonly [x: string]: Schema.Json;
1246
+ } | undefined;
1247
+ } | undefined;
1248
+ };
1249
+ };
1250
+ readonly sealed?: {
1251
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
1252
+ readonly keyId: string;
1253
+ readonly nonce: string;
1254
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
1255
+ } | undefined;
1256
+ };
1257
+ };
1258
+ export declare const refreshStorage: {
1259
+ encode: (value: {
1260
+ readonly grant: {
1261
+ readonly context: {
1262
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1263
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1264
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1265
+ readonly identity: {
1266
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1267
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1268
+ readonly subject: string;
1269
+ };
1270
+ readonly configuration: {
1271
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1272
+ readonly protocol: "oauth" | "oidc";
1273
+ readonly configurationGeneration: number;
1274
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1275
+ readonly responseIssuerMode: "required" | "unsupported";
1276
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1277
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1278
+ readonly profile: {
1279
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1280
+ readonly generation: number;
1281
+ readonly issuance: "active" | "retired";
1282
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1283
+ readonly clientRegistrationId: string;
1284
+ readonly scopes: readonly string[];
1285
+ readonly resources: readonly string[];
1286
+ readonly retention: "access-and-refresh" | "access-only";
1287
+ readonly maximumAccessLifetimeMillis: number;
1288
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1289
+ readonly refreshAheadMillis: number;
1290
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1291
+ readonly revocation: "cohort" | "unsupported";
1292
+ };
1293
+ };
1294
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1295
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1296
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1297
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1298
+ readonly metadata: {
1299
+ readonly scopes: readonly string[];
1300
+ readonly resources: readonly string[];
1301
+ readonly accessExpiresAtMillis?: number | undefined;
1302
+ readonly refreshExpiresAtMillis?: number | undefined;
1303
+ readonly useUntilMillis: number;
1304
+ readonly refreshUseUntilMillis?: number | undefined;
1305
+ readonly obtainedAtMillis: number;
1306
+ readonly profile?: {
1307
+ readonly displayName?: string | undefined;
1308
+ readonly handle?: string | undefined;
1309
+ readonly avatarUrl?: string | undefined;
1310
+ readonly profileUrl?: string | undefined;
1311
+ readonly email?: string | undefined;
1312
+ readonly emailVerified?: boolean | undefined;
1313
+ readonly providerData?: {
1314
+ readonly [x: string]: Schema.Json;
1315
+ } | undefined;
1316
+ } | undefined;
1317
+ };
1318
+ };
1319
+ readonly sealed: {
1320
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
1321
+ readonly keyId: string;
1322
+ readonly nonce: string;
1323
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
1324
+ };
1325
+ };
1326
+ readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1327
+ readonly claimedAtMillis: number;
1328
+ readonly claimExpiresAtMillis: number;
1329
+ readonly nextTokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1330
+ }) => string;
1331
+ decode: (value: string) => {
1332
+ readonly grant: {
1333
+ readonly context: {
1334
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1335
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1336
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1337
+ readonly identity: {
1338
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1339
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1340
+ readonly subject: string;
1341
+ };
1342
+ readonly configuration: {
1343
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1344
+ readonly protocol: "oauth" | "oidc";
1345
+ readonly configurationGeneration: number;
1346
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1347
+ readonly responseIssuerMode: "required" | "unsupported";
1348
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1349
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1350
+ readonly profile: {
1351
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1352
+ readonly generation: number;
1353
+ readonly issuance: "active" | "retired";
1354
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1355
+ readonly clientRegistrationId: string;
1356
+ readonly scopes: readonly string[];
1357
+ readonly resources: readonly string[];
1358
+ readonly retention: "access-and-refresh" | "access-only";
1359
+ readonly maximumAccessLifetimeMillis: number;
1360
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1361
+ readonly refreshAheadMillis: number;
1362
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1363
+ readonly revocation: "cohort" | "unsupported";
1364
+ };
1365
+ };
1366
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1367
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1368
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1369
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1370
+ readonly metadata: {
1371
+ readonly scopes: readonly string[];
1372
+ readonly resources: readonly string[];
1373
+ readonly accessExpiresAtMillis?: number | undefined;
1374
+ readonly refreshExpiresAtMillis?: number | undefined;
1375
+ readonly useUntilMillis: number;
1376
+ readonly refreshUseUntilMillis?: number | undefined;
1377
+ readonly obtainedAtMillis: number;
1378
+ readonly profile?: {
1379
+ readonly displayName?: string | undefined;
1380
+ readonly handle?: string | undefined;
1381
+ readonly avatarUrl?: string | undefined;
1382
+ readonly profileUrl?: string | undefined;
1383
+ readonly email?: string | undefined;
1384
+ readonly emailVerified?: boolean | undefined;
1385
+ readonly providerData?: {
1386
+ readonly [x: string]: Schema.Json;
1387
+ } | undefined;
1388
+ } | undefined;
1389
+ };
1390
+ };
1391
+ readonly sealed: {
1392
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
1393
+ readonly keyId: string;
1394
+ readonly nonce: string;
1395
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
1396
+ };
1397
+ };
1398
+ readonly claimId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1399
+ readonly claimedAtMillis: number;
1400
+ readonly claimExpiresAtMillis: number;
1401
+ readonly nextTokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1402
+ };
1403
+ };
1404
+ export declare const jobStorage: {
1405
+ encode: (value: {
1406
+ readonly context: {
1407
+ readonly namespace: "effect-auth/oauth-connected-revocation-context/v1";
1408
+ readonly jobId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1409
+ readonly token: {
1410
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1411
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1412
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1413
+ readonly identity: {
1414
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1415
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1416
+ readonly subject: string;
1417
+ };
1418
+ readonly configuration: {
1419
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1420
+ readonly protocol: "oauth" | "oidc";
1421
+ readonly configurationGeneration: number;
1422
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1423
+ readonly responseIssuerMode: "required" | "unsupported";
1424
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1425
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1426
+ readonly profile: {
1427
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1428
+ readonly generation: number;
1429
+ readonly issuance: "active" | "retired";
1430
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1431
+ readonly clientRegistrationId: string;
1432
+ readonly scopes: readonly string[];
1433
+ readonly resources: readonly string[];
1434
+ readonly retention: "access-and-refresh" | "access-only";
1435
+ readonly maximumAccessLifetimeMillis: number;
1436
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1437
+ readonly refreshAheadMillis: number;
1438
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1439
+ readonly revocation: "cohort" | "unsupported";
1440
+ };
1441
+ };
1442
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1443
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1444
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1445
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1446
+ readonly metadata: {
1447
+ readonly scopes: readonly string[];
1448
+ readonly resources: readonly string[];
1449
+ readonly accessExpiresAtMillis?: number | undefined;
1450
+ readonly refreshExpiresAtMillis?: number | undefined;
1451
+ readonly useUntilMillis: number;
1452
+ readonly refreshUseUntilMillis?: number | undefined;
1453
+ readonly obtainedAtMillis: number;
1454
+ readonly profile?: {
1455
+ readonly displayName?: string | undefined;
1456
+ readonly handle?: string | undefined;
1457
+ readonly avatarUrl?: string | undefined;
1458
+ readonly profileUrl?: string | undefined;
1459
+ readonly email?: string | undefined;
1460
+ readonly emailVerified?: boolean | undefined;
1461
+ readonly providerData?: {
1462
+ readonly [x: string]: Schema.Json;
1463
+ } | undefined;
1464
+ } | undefined;
1465
+ };
1466
+ };
1467
+ };
1468
+ readonly sealed: {
1469
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
1470
+ readonly keyId: string;
1471
+ readonly nonce: string;
1472
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
1473
+ };
1474
+ }) => string;
1475
+ decode: (value: string) => {
1476
+ readonly context: {
1477
+ readonly namespace: "effect-auth/oauth-connected-revocation-context/v1";
1478
+ readonly jobId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
1479
+ readonly token: {
1480
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1481
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1482
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1483
+ readonly identity: {
1484
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1485
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1486
+ readonly subject: string;
1487
+ };
1488
+ readonly configuration: {
1489
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1490
+ readonly protocol: "oauth" | "oidc";
1491
+ readonly configurationGeneration: number;
1492
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1493
+ readonly responseIssuerMode: "required" | "unsupported";
1494
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1495
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1496
+ readonly profile: {
1497
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1498
+ readonly generation: number;
1499
+ readonly issuance: "active" | "retired";
1500
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1501
+ readonly clientRegistrationId: string;
1502
+ readonly scopes: readonly string[];
1503
+ readonly resources: readonly string[];
1504
+ readonly retention: "access-and-refresh" | "access-only";
1505
+ readonly maximumAccessLifetimeMillis: number;
1506
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1507
+ readonly refreshAheadMillis: number;
1508
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1509
+ readonly revocation: "cohort" | "unsupported";
1510
+ };
1511
+ };
1512
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1513
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1514
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1515
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1516
+ readonly metadata: {
1517
+ readonly scopes: readonly string[];
1518
+ readonly resources: readonly string[];
1519
+ readonly accessExpiresAtMillis?: number | undefined;
1520
+ readonly refreshExpiresAtMillis?: number | undefined;
1521
+ readonly useUntilMillis: number;
1522
+ readonly refreshUseUntilMillis?: number | undefined;
1523
+ readonly obtainedAtMillis: number;
1524
+ readonly profile?: {
1525
+ readonly displayName?: string | undefined;
1526
+ readonly handle?: string | undefined;
1527
+ readonly avatarUrl?: string | undefined;
1528
+ readonly profileUrl?: string | undefined;
1529
+ readonly email?: string | undefined;
1530
+ readonly emailVerified?: boolean | undefined;
1531
+ readonly providerData?: {
1532
+ readonly [x: string]: Schema.Json;
1533
+ } | undefined;
1534
+ } | undefined;
1535
+ };
1536
+ };
1537
+ };
1538
+ readonly sealed: {
1539
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
1540
+ readonly keyId: string;
1541
+ readonly nonce: string;
1542
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
1543
+ };
1544
+ };
1545
+ };
1546
+ export declare const summaryStorage: {
1547
+ encode: (value: {
1548
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1549
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1550
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1551
+ readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1552
+ readonly status: "Active" | "Disconnected" | "ReauthorizationRequired" | "Refreshing";
1553
+ readonly scopes: readonly string[];
1554
+ readonly accessExpiresAtMillis?: number | undefined;
1555
+ readonly useUntilMillis: number;
1556
+ readonly profile?: {
1557
+ readonly displayName?: string | undefined;
1558
+ readonly handle?: string | undefined;
1559
+ readonly avatarUrl?: string | undefined;
1560
+ readonly profileUrl?: string | undefined;
1561
+ readonly email?: string | undefined;
1562
+ readonly emailVerified?: boolean | undefined;
1563
+ readonly providerData?: {
1564
+ readonly [x: string]: Schema.Json;
1565
+ } | undefined;
1566
+ } | undefined;
1567
+ readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1568
+ }) => string;
1569
+ decode: (value: string) => {
1570
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1571
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1572
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1573
+ readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1574
+ readonly status: "Active" | "Disconnected" | "ReauthorizationRequired" | "Refreshing";
1575
+ readonly scopes: readonly string[];
1576
+ readonly accessExpiresAtMillis?: number | undefined;
1577
+ readonly useUntilMillis: number;
1578
+ readonly profile?: {
1579
+ readonly displayName?: string | undefined;
1580
+ readonly handle?: string | undefined;
1581
+ readonly avatarUrl?: string | undefined;
1582
+ readonly profileUrl?: string | undefined;
1583
+ readonly email?: string | undefined;
1584
+ readonly emailVerified?: boolean | undefined;
1585
+ readonly providerData?: {
1586
+ readonly [x: string]: Schema.Json;
1587
+ } | undefined;
1588
+ } | undefined;
1589
+ readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1590
+ };
1591
+ };
1592
+ export declare const disconnectedStorage: {
1593
+ encode: (value: {
1594
+ readonly _tag: "Disconnected";
1595
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1596
+ readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1597
+ readonly affectedGrantCount: number;
1598
+ readonly replayed: boolean;
1599
+ }) => string;
1600
+ decode: (value: string) => {
1601
+ readonly _tag: "Disconnected";
1602
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1603
+ readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1604
+ readonly affectedGrantCount: number;
1605
+ readonly replayed: boolean;
1606
+ };
1607
+ };
1608
+ export declare const orderNumber: (value: string) => number;
1609
+ export declare const nativeOrder: (mapping: Authority, value: unknown) => number;
1610
+ export declare const clientKey: (configuration: M.OAuthConnectedConfiguration) => string;
1611
+ export declare const cohortKey: (client: string, identity: string) => string;
1612
+ export declare const initialGeneration: (cohort: string) => string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1613
+ export declare const configuration: (flow: M.OAuthConnectedPendingFlow) => M.OAuthConnectedConfiguration;
1614
+ export declare const retainedUntil: (mapping: Authority, now: number) => number;
1615
+ export declare const rowCount: (table: Table<import("drizzle-orm").TableConfig<import("drizzle-orm").Columns>>, where: SQL<unknown>) => Effect.Effect<number, M.OAuthUnavailable, CurrentOAuthTransaction>;
1616
+ export declare const countCondition: (table: Table, where: SQL, count: number) => SQL<unknown>;
1617
+ export declare const current: (mapping: Mapping, subject: string & import("effect/Brand").Brand<"effect-auth/SubjectId">) => Effect.Effect<{
1618
+ subject: Observation;
1619
+ row: Row;
1620
+ authorities: Observation;
1621
+ revision: {
1622
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1623
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1624
+ readonly credentials: readonly {
1625
+ readonly credentialId: string;
1626
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1627
+ }[];
1628
+ };
1629
+ nativeId: unknown;
1630
+ } | undefined, M.OAuthUnavailable | PersistenceMappingError, CurrentOAuthTransaction>;
1631
+ export declare const nativeCopy: <N>(value: N) => N;
1632
+ export declare const jobTable: (mapping: Authority) => Omit<OAuthConnectedRevocationJobTable<any, any>, "encodeInsert"> | undefined;
1633
+ export declare const policy: (mapping: Mapping, input: OAuthConnectedPolicyInput<any>) => Effect.Effect<boolean, M.OAuthUnavailable, CurrentOAuthTransaction>;
1634
+ export declare const action: (mapping: Mapping, found: {
1635
+ subject: Observation;
1636
+ row: Row;
1637
+ authorities: Observation;
1638
+ revision: {
1639
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1640
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1641
+ readonly credentials: readonly {
1642
+ readonly credentialId: string;
1643
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1644
+ }[];
1645
+ };
1646
+ nativeId: unknown;
1647
+ }, authorization: {
1648
+ readonly evidence: {
1649
+ readonly revision: {
1650
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1651
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1652
+ readonly credentials: readonly {
1653
+ readonly credentialId: string;
1654
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1655
+ }[];
1656
+ };
1657
+ readonly flowId: string & import("effect/Brand").Brand<"effect-auth/AuthenticationFlowId">;
1658
+ readonly bindingDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
1659
+ readonly proofs: readonly [{
1660
+ readonly userVerified: boolean;
1661
+ readonly phishingResistant: boolean;
1662
+ readonly verifiedAt: DateTime.Utc;
1663
+ readonly method: string;
1664
+ readonly credentialId: string;
1665
+ readonly factors: readonly ("inherence" | "knowledge" | "possession")[];
1666
+ }, ...{
1667
+ readonly userVerified: boolean;
1668
+ readonly phishingResistant: boolean;
1669
+ readonly verifiedAt: DateTime.Utc;
1670
+ readonly method: string;
1671
+ readonly credentialId: string;
1672
+ readonly factors: readonly ("inherence" | "knowledge" | "possession")[];
1673
+ }[]];
1674
+ };
1675
+ readonly requirement: {
1676
+ readonly maximumAgeMillis: number;
1677
+ readonly alternatives: readonly [{
1678
+ readonly userVerified: boolean;
1679
+ readonly phishingResistant: boolean;
1680
+ readonly factors: readonly ("inherence" | "knowledge" | "possession")[];
1681
+ readonly minimumCredentials: number;
1682
+ }, ...{
1683
+ readonly userVerified: boolean;
1684
+ readonly phishingResistant: boolean;
1685
+ readonly factors: readonly ("inherence" | "knowledge" | "possession")[];
1686
+ readonly minimumCredentials: number;
1687
+ }[]];
1688
+ };
1689
+ readonly challenge: {
1690
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1691
+ readonly action: "connected-begin" | "connected-complete" | "connected-disconnect";
1692
+ readonly flowId: string & import("effect/Brand").Brand<"effect-auth/RequestBindingFlowId">;
1693
+ readonly commandId: string & import("effect/Brand").Brand<"effect-auth/OAuthCommandId">;
1694
+ readonly revision: {
1695
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1696
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1697
+ readonly credentials: readonly {
1698
+ readonly credentialId: string;
1699
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1700
+ }[];
1701
+ };
1702
+ readonly intentDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
1703
+ readonly bindingDigest: string & import("effect/Brand").Brand<"effect-auth/TokenDigest">;
1704
+ };
1705
+ }, operation: "claim" | "disconnect" | "issue" | "settle", expected: {
1706
+ readonly moduleId: string;
1707
+ readonly flowId: string;
1708
+ readonly commandId: string;
1709
+ readonly revision: OAuthAccountRevision;
1710
+ readonly intent: string;
1711
+ readonly maximumAgeMillis: number;
1712
+ readonly configuration: M.OAuthConnectedConfiguration;
1713
+ readonly grant?: M.OAuthConnectedTokenContext;
1714
+ }) => Effect.Effect<boolean, M.OAuthUnavailable, CurrentOAuthTransaction>;
1715
+ export declare const useAuthority: (mapping: Mapping, authorization: {
1716
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1717
+ readonly revision: {
1718
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1719
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1720
+ readonly credentials: readonly {
1721
+ readonly credentialId: string;
1722
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1723
+ }[];
1724
+ };
1725
+ readonly policyRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1726
+ readonly expiresAtMillis: number;
1727
+ readonly purpose: "metadata" | "use";
1728
+ readonly grantId?: (string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">) | undefined;
1729
+ readonly profileKey?: (string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">) | undefined;
1730
+ }, kind: "metadata" | "use", grant?: {
1731
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1732
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1733
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1734
+ readonly identity: {
1735
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1736
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1737
+ readonly subject: string;
1738
+ };
1739
+ readonly configuration: {
1740
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1741
+ readonly protocol: "oauth" | "oidc";
1742
+ readonly configurationGeneration: number;
1743
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1744
+ readonly responseIssuerMode: "required" | "unsupported";
1745
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1746
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1747
+ readonly profile: {
1748
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1749
+ readonly generation: number;
1750
+ readonly issuance: "active" | "retired";
1751
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1752
+ readonly clientRegistrationId: string;
1753
+ readonly scopes: readonly string[];
1754
+ readonly resources: readonly string[];
1755
+ readonly retention: "access-and-refresh" | "access-only";
1756
+ readonly maximumAccessLifetimeMillis: number;
1757
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1758
+ readonly refreshAheadMillis: number;
1759
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1760
+ readonly revocation: "cohort" | "unsupported";
1761
+ };
1762
+ };
1763
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1764
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1765
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1766
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1767
+ readonly metadata: {
1768
+ readonly scopes: readonly string[];
1769
+ readonly resources: readonly string[];
1770
+ readonly accessExpiresAtMillis?: number | undefined;
1771
+ readonly refreshExpiresAtMillis?: number | undefined;
1772
+ readonly useUntilMillis: number;
1773
+ readonly refreshUseUntilMillis?: number | undefined;
1774
+ readonly obtainedAtMillis: number;
1775
+ readonly profile?: {
1776
+ readonly displayName?: string | undefined;
1777
+ readonly handle?: string | undefined;
1778
+ readonly avatarUrl?: string | undefined;
1779
+ readonly profileUrl?: string | undefined;
1780
+ readonly email?: string | undefined;
1781
+ readonly emailVerified?: boolean | undefined;
1782
+ readonly providerData?: {
1783
+ readonly [x: string]: Schema.Json;
1784
+ } | undefined;
1785
+ } | undefined;
1786
+ };
1787
+ } | undefined) => Effect.Effect<{
1788
+ subject: Observation;
1789
+ row: Row;
1790
+ authorities: Observation;
1791
+ revision: {
1792
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1793
+ readonly securityRevision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1794
+ readonly credentials: readonly {
1795
+ readonly credentialId: string;
1796
+ readonly revision: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1797
+ }[];
1798
+ };
1799
+ nativeId: unknown;
1800
+ } | undefined, M.OAuthUnavailable | PersistenceMappingError, CurrentOAuthTransaction>;
1801
+ export declare const scopeKey: (provider: string, issuer: string) => string;
1802
+ export interface ScopeAnchor {
1803
+ readonly id: string;
1804
+ row: Row;
1805
+ }
1806
+ export interface ClientAnchor {
1807
+ readonly id: string;
1808
+ row: Row;
1809
+ counter: number;
1810
+ readonly scope: ScopeAnchor;
1811
+ }
1812
+ /** Empty registration ID is impossible in the public profile label schema. The
1813
+ * distinct 52-byte key domain shares the physical table, never a client counter. */
1814
+ export declare const scope: (mapping: Authority, config: {
1815
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1816
+ readonly protocol: "oauth" | "oidc";
1817
+ readonly configurationGeneration: number;
1818
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1819
+ readonly responseIssuerMode: "required" | "unsupported";
1820
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1821
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1822
+ readonly profile: {
1823
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1824
+ readonly generation: number;
1825
+ readonly issuance: "active" | "retired";
1826
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1827
+ readonly clientRegistrationId: string;
1828
+ readonly scopes: readonly string[];
1829
+ readonly resources: readonly string[];
1830
+ readonly retention: "access-and-refresh" | "access-only";
1831
+ readonly maximumAccessLifetimeMillis: number;
1832
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1833
+ readonly refreshAheadMillis: number;
1834
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1835
+ readonly revocation: "cohort" | "unsupported";
1836
+ };
1837
+ }, create: boolean) => Effect.Effect<ScopeAnchor | undefined, M.OAuthUnavailable, CurrentOAuthTransaction>;
1838
+ export declare const touchScope: (mapping: Authority, found: ScopeAnchor) => Effect.Effect<void, M.OAuthUnavailable, CurrentOAuthTransaction>;
1839
+ export declare const readScope: (mapping: Authority, provider: string, issuer: string) => Effect.Effect<ScopeAnchor, M.OAuthUnavailable, CurrentOAuthTransaction>;
1840
+ export declare const lockClientById: (mapping: Authority, id: string) => Effect.Effect<ClientAnchor, M.OAuthUnavailable, CurrentOAuthTransaction>;
1841
+ export declare const heldScope: (mapping: Authority, provider: string, issuer: string) => Effect.Effect<ScopeAnchor | undefined, never, CurrentOAuthTransaction>;
1842
+ /** Cleanup obtains every scope then every client before entering any tuple. */
1843
+ export declare const prelockClients: (mapping: Authority, ids: readonly string[], releaseScopes?: readonly {
1844
+ readonly provider: string;
1845
+ readonly issuer: string;
1846
+ }[] | undefined) => Effect.Effect<void, M.OAuthUnavailable, CurrentOAuthTransaction>;
1847
+ export declare const client: (mapping: Authority, config: {
1848
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1849
+ readonly protocol: "oauth" | "oidc";
1850
+ readonly configurationGeneration: number;
1851
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1852
+ readonly responseIssuerMode: "required" | "unsupported";
1853
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1854
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1855
+ readonly profile: {
1856
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1857
+ readonly generation: number;
1858
+ readonly issuance: "active" | "retired";
1859
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1860
+ readonly clientRegistrationId: string;
1861
+ readonly scopes: readonly string[];
1862
+ readonly resources: readonly string[];
1863
+ readonly retention: "access-and-refresh" | "access-only";
1864
+ readonly maximumAccessLifetimeMillis: number;
1865
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1866
+ readonly refreshAheadMillis: number;
1867
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1868
+ readonly revocation: "cohort" | "unsupported";
1869
+ };
1870
+ }, create: boolean) => Effect.Effect<ClientAnchor | undefined, M.OAuthUnavailable, CurrentOAuthTransaction>;
1871
+ export declare const nextOrder: (mapping: Authority, found: ClientAnchor) => Effect.Effect<number, M.OAuthUnavailable, CurrentOAuthTransaction>;
1872
+ export declare const cohort: (mapping: Authority, clientId: string, identityId: string, create: boolean) => Effect.Effect<{
1873
+ id: string;
1874
+ row: undefined;
1875
+ generation: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1876
+ cutoff: number;
1877
+ blocked: boolean;
1878
+ } | {
1879
+ id: string;
1880
+ row: Row;
1881
+ generation: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1882
+ cutoff: number;
1883
+ blocked: boolean;
1884
+ }, M.OAuthUnavailable, CurrentOAuthTransaction>;
1885
+ export declare const readGrant: (mapping: Authority, moduleId: string, grantId: string, lock?: any) => Effect.Effect<{
1886
+ row: Row;
1887
+ context: {
1888
+ readonly namespace: "effect-auth/oauth-connected-token-context/v1";
1889
+ readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
1890
+ readonly subjectId: string & import("effect/Brand").Brand<"effect-auth/SubjectId">;
1891
+ readonly identity: {
1892
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1893
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1894
+ readonly subject: string;
1895
+ };
1896
+ readonly configuration: {
1897
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1898
+ readonly protocol: "oauth" | "oidc";
1899
+ readonly configurationGeneration: number;
1900
+ readonly issuer: string & import("effect/Brand").Brand<"effect-auth/OAuthIssuer">;
1901
+ readonly responseIssuerMode: "required" | "unsupported";
1902
+ readonly callbackId: string & import("effect/Brand").Brand<"effect-auth/OAuthCallbackId">;
1903
+ readonly redirectUri: string & import("effect/Brand").Brand<"effect-auth/OAuthRedirectUri">;
1904
+ readonly profile: {
1905
+ readonly key: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1906
+ readonly generation: number;
1907
+ readonly issuance: "active" | "retired";
1908
+ readonly provider: string & import("effect/Brand").Brand<"effect-auth/OAuthProviderKey">;
1909
+ readonly clientRegistrationId: string;
1910
+ readonly scopes: readonly string[];
1911
+ readonly resources: readonly string[];
1912
+ readonly retention: "access-and-refresh" | "access-only";
1913
+ readonly maximumAccessLifetimeMillis: number;
1914
+ readonly maximumRefreshLifetimeMillis?: number | undefined;
1915
+ readonly refreshAheadMillis: number;
1916
+ readonly refresh: "confidential" | "rotating" | "unsupported";
1917
+ readonly revocation: "cohort" | "unsupported";
1918
+ };
1919
+ };
1920
+ readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1921
+ readonly grantVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1922
+ readonly tokenVersion: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1923
+ readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1924
+ readonly metadata: {
1925
+ readonly scopes: readonly string[];
1926
+ readonly resources: readonly string[];
1927
+ readonly accessExpiresAtMillis?: number | undefined;
1928
+ readonly refreshExpiresAtMillis?: number | undefined;
1929
+ readonly useUntilMillis: number;
1930
+ readonly refreshUseUntilMillis?: number | undefined;
1931
+ readonly obtainedAtMillis: number;
1932
+ readonly profile?: {
1933
+ readonly displayName?: string | undefined;
1934
+ readonly handle?: string | undefined;
1935
+ readonly avatarUrl?: string | undefined;
1936
+ readonly profileUrl?: string | undefined;
1937
+ readonly email?: string | undefined;
1938
+ readonly emailVerified?: boolean | undefined;
1939
+ readonly providerData?: {
1940
+ readonly [x: string]: Schema.Json;
1941
+ } | undefined;
1942
+ } | undefined;
1943
+ };
1944
+ };
1945
+ native: any;
1946
+ sealed: {
1947
+ readonly format: "oauth-connected-xchacha20poly1305-v1";
1948
+ readonly keyId: string;
1949
+ readonly nonce: string;
1950
+ readonly ciphertext: import("effect/Redacted").Redacted<string>;
1951
+ } | undefined;
1952
+ } | undefined, M.OAuthUnavailable | PersistenceMappingError, CurrentOAuthTransaction>;
1953
+ export declare const unknownWork: (mapping: Authority, clientId: string | SQL, cutoff?: number) => SQL<unknown>;
1954
+ export declare const cohortWork: (mapping: Authority, id: string | SQL) => SQL<unknown>;
12
1955
  //#endregion
13
- export { Mapping, Revocations };
1956
+ export { oauth_connected_state_d_exports };
14
1957
  //# sourceMappingURL=oauth-connected-state.d.mts.map