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

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