@krak-stack/auth 0.1.70 → 0.2.0

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 (73) hide show
  1. package/README.md +4 -3
  2. package/dist/access.d.ts +4 -4
  3. package/dist/access.js +10 -4
  4. package/dist/admin/api.group.d.ts +17 -17
  5. package/dist/admin/api.group.js +2 -2
  6. package/dist/admin/schema.d.ts +18 -18
  7. package/dist/admin/schema.js +3 -3
  8. package/dist/api.d.ts +2093 -631
  9. package/dist/api.js +7 -7
  10. package/dist/auth/api.group.d.ts +793 -0
  11. package/dist/auth/api.group.js +241 -0
  12. package/dist/auth/schema.d.ts +800 -0
  13. package/dist/auth/schema.js +625 -0
  14. package/dist/components/admin-organization-form.d.ts +1 -1
  15. package/dist/components/admin-organization-form.js +16 -18
  16. package/dist/components/admin-organizations.js +52 -46
  17. package/dist/components/admin-users.js +115 -138
  18. package/dist/components/api-key-edit-form.d.ts +4 -3
  19. package/dist/components/api-key-edit-form.js +32 -27
  20. package/dist/components/api-key-permissions.d.ts +1 -1
  21. package/dist/components/api-key-rate-limit.d.ts +1 -1
  22. package/dist/components/api-key-referrers.d.ts +3 -2
  23. package/dist/components/api-key-referrers.js +2 -3
  24. package/dist/components/api-key.d.ts +0 -9
  25. package/dist/components/api-key.js +0 -39
  26. package/dist/components/auth-atoms.d.ts +178 -0
  27. package/dist/components/auth-atoms.js +46 -0
  28. package/dist/components/auth-client-api.d.ts +2474 -142
  29. package/dist/components/auth-client-api.js +14 -10
  30. package/dist/components/auth-forms.d.ts +1 -3
  31. package/dist/components/auth-forms.js +168 -195
  32. package/dist/components/auth-provider.d.ts +3 -7
  33. package/dist/components/auth-provider.js +56 -30
  34. package/dist/components/has-permission.js +1 -1
  35. package/dist/components/index.d.ts +19 -20
  36. package/dist/components/index.js +13 -13
  37. package/dist/components/member-required.d.ts +1 -3
  38. package/dist/components/member-required.js +102 -78
  39. package/dist/components/organization-switcher.d.ts +4 -6
  40. package/dist/components/organization-switcher.js +469 -324
  41. package/dist/components/project-access-matrix.d.ts +1 -1
  42. package/dist/components/project-access-matrix.js +9 -13
  43. package/dist/components/user-button.d.ts +5 -3
  44. package/dist/components/user-button.js +265 -316
  45. package/dist/components/utils.d.ts +3 -1
  46. package/dist/components/utils.js +4 -11
  47. package/dist/extra/api.group.d.ts +3 -3
  48. package/dist/extra/api.group.js +6 -6
  49. package/dist/extra/schema.js +1 -1
  50. package/dist/index.d.ts +11 -12
  51. package/dist/index.js +11 -12
  52. package/dist/query.d.ts +2 -2
  53. package/dist/roles.d.ts +5 -4
  54. package/dist/roles.js +11 -7
  55. package/dist/schema.d.ts +1 -1
  56. package/dist/schema.js +26 -19
  57. package/dist/server/actor.d.ts +30 -32
  58. package/dist/server/actor.js +39 -22
  59. package/dist/server/api.group.js +2 -2
  60. package/dist/server/index.d.ts +14 -14
  61. package/dist/server/index.js +8 -8
  62. package/dist/server/middleware.d.ts +3 -3
  63. package/dist/server/middleware.js +10 -5
  64. package/dist/server/schema.js +1 -1
  65. package/dist/service.d.ts +2053 -201
  66. package/dist/service.js +32 -21
  67. package/package.json +10 -9
  68. package/dist/better-auth/api.group.d.ts +0 -62
  69. package/dist/better-auth/api.group.js +0 -39
  70. package/dist/better-auth/schema.d.ts +0 -72
  71. package/dist/better-auth/schema.js +0 -110
  72. package/dist/components/auth-client.d.ts +0 -50
  73. package/dist/components/auth-client.js +0 -46
@@ -0,0 +1,793 @@
1
+ import { Schema } from "effect";
2
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
3
+ import { AuthBadRequest } from "./schema.js";
4
+ export * from "./schema.js";
5
+ export declare const AuthApiGroup: HttpApiGroup.HttpApiGroup<"auth", HttpApiEndpoint.HttpApiEndpoint<"adminBanUser", "POST", "/admin/ban-user", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
6
+ readonly userId: Schema.String;
7
+ readonly banReason: Schema.optional<Schema.String>;
8
+ readonly banExpiresIn: Schema.optional<Schema.Number>;
9
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
10
+ readonly user: Schema.Struct<{
11
+ readonly id: Schema.String;
12
+ readonly name: Schema.String;
13
+ readonly email: Schema.String;
14
+ readonly emailVerified: Schema.Boolean;
15
+ readonly image: Schema.NullOr<Schema.String>;
16
+ readonly role: Schema.NullOr<Schema.String>;
17
+ readonly banned: Schema.NullOr<Schema.Boolean>;
18
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
19
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
20
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
21
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
22
+ readonly createdAt: Schema.DateFromString;
23
+ readonly updatedAt: Schema.DateFromString;
24
+ }>;
25
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"adminImpersonateUser", "POST", "/admin/impersonate-user", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
26
+ readonly userId: Schema.String;
27
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
28
+ readonly session: Schema.Struct<{
29
+ readonly id: Schema.String;
30
+ readonly expiresAt: Schema.DateFromString;
31
+ readonly token: Schema.String;
32
+ readonly createdAt: Schema.DateFromString;
33
+ readonly updatedAt: Schema.DateFromString;
34
+ readonly ipAddress: Schema.optional<Schema.NullOr<Schema.String>>;
35
+ readonly userAgent: Schema.optional<Schema.NullOr<Schema.String>>;
36
+ readonly userId: Schema.String;
37
+ readonly impersonatedBy: Schema.optional<Schema.NullOr<Schema.String>>;
38
+ readonly impersonatedByOrganizationId: Schema.optional<Schema.NullOr<Schema.String>>;
39
+ readonly activeOrganizationId: Schema.optional<Schema.NullOr<Schema.String>>;
40
+ }>;
41
+ readonly user: Schema.Struct<{
42
+ readonly id: Schema.String;
43
+ readonly name: Schema.String;
44
+ readonly email: Schema.String;
45
+ readonly emailVerified: Schema.Boolean;
46
+ readonly image: Schema.NullOr<Schema.String>;
47
+ readonly role: Schema.NullOr<Schema.String>;
48
+ readonly banned: Schema.NullOr<Schema.Boolean>;
49
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
50
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
51
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
52
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
53
+ readonly createdAt: Schema.DateFromString;
54
+ readonly updatedAt: Schema.DateFromString;
55
+ }>;
56
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"adminStopImpersonating", "POST", "/admin/stop-impersonating", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
57
+ readonly session: Schema.Struct<{
58
+ readonly id: Schema.String;
59
+ readonly expiresAt: Schema.DateFromString;
60
+ readonly token: Schema.String;
61
+ readonly createdAt: Schema.DateFromString;
62
+ readonly updatedAt: Schema.DateFromString;
63
+ readonly ipAddress: Schema.optional<Schema.NullOr<Schema.String>>;
64
+ readonly userAgent: Schema.optional<Schema.NullOr<Schema.String>>;
65
+ readonly userId: Schema.String;
66
+ readonly impersonatedBy: Schema.optional<Schema.NullOr<Schema.String>>;
67
+ readonly impersonatedByOrganizationId: Schema.optional<Schema.NullOr<Schema.String>>;
68
+ readonly activeOrganizationId: Schema.optional<Schema.NullOr<Schema.String>>;
69
+ }>;
70
+ readonly user: Schema.Struct<{
71
+ readonly id: Schema.String;
72
+ readonly name: Schema.String;
73
+ readonly email: Schema.String;
74
+ readonly emailVerified: Schema.Boolean;
75
+ readonly image: Schema.NullOr<Schema.String>;
76
+ readonly role: Schema.NullOr<Schema.String>;
77
+ readonly banned: Schema.NullOr<Schema.Boolean>;
78
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
79
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
80
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
81
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
82
+ readonly createdAt: Schema.DateFromString;
83
+ readonly updatedAt: Schema.DateFromString;
84
+ }>;
85
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"adminUnbanUser", "POST", "/admin/unban-user", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
86
+ readonly userId: Schema.String;
87
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
88
+ readonly user: Schema.Struct<{
89
+ readonly id: Schema.String;
90
+ readonly name: Schema.String;
91
+ readonly email: Schema.String;
92
+ readonly emailVerified: Schema.Boolean;
93
+ readonly image: Schema.NullOr<Schema.String>;
94
+ readonly role: Schema.NullOr<Schema.String>;
95
+ readonly banned: Schema.NullOr<Schema.Boolean>;
96
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
97
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
98
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
99
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
100
+ readonly createdAt: Schema.DateFromString;
101
+ readonly updatedAt: Schema.DateFromString;
102
+ }>;
103
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"apiKeyDelete", "POST", "/api-key/delete", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
104
+ readonly configId: Schema.optional<Schema.String>;
105
+ readonly keyId: Schema.String;
106
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
107
+ readonly success: Schema.Boolean;
108
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"apiKeyList", "GET", "/api-key/list", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
109
+ readonly configId: Schema.optional<Schema.String>;
110
+ readonly organizationId: Schema.optional<Schema.String>;
111
+ readonly limit: Schema.optional<Schema.NumberFromString>;
112
+ readonly offset: Schema.optional<Schema.NumberFromString>;
113
+ readonly sortBy: Schema.optional<Schema.String>;
114
+ readonly sortDirection: Schema.optional<Schema.Literals<readonly ["asc", "desc"]>>;
115
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
116
+ readonly apiKeys: Schema.$Array<Schema.Struct<{
117
+ readonly id: Schema.String;
118
+ readonly name: Schema.NullOr<Schema.String>;
119
+ readonly start: Schema.NullOr<Schema.String>;
120
+ readonly prefix: Schema.NullOr<Schema.String>;
121
+ readonly userId: Schema.optional<Schema.String>;
122
+ readonly referenceId: Schema.String;
123
+ readonly configId: Schema.String;
124
+ readonly refillInterval: Schema.NullOr<Schema.Number>;
125
+ readonly refillAmount: Schema.NullOr<Schema.Number>;
126
+ readonly lastRefillAt: Schema.NullOr<Schema.DateFromString>;
127
+ readonly enabled: Schema.Boolean;
128
+ readonly rateLimitEnabled: Schema.Boolean;
129
+ readonly rateLimitTimeWindow: Schema.NullOr<Schema.Number>;
130
+ readonly rateLimitMax: Schema.NullOr<Schema.Number>;
131
+ readonly requestCount: Schema.Number;
132
+ readonly remaining: Schema.NullOr<Schema.Number>;
133
+ readonly lastRequest: Schema.NullOr<Schema.DateFromString>;
134
+ readonly expiresAt: Schema.NullOr<Schema.DateFromString>;
135
+ readonly createdAt: Schema.DateFromString;
136
+ readonly updatedAt: Schema.DateFromString;
137
+ readonly metadata: Schema.NullOr<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
138
+ readonly permissions: Schema.optional<Schema.NullOr<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>>;
139
+ readonly referrers: Schema.optional<Schema.NullOr<Schema.$Array<Schema.String>>>;
140
+ }>>;
141
+ readonly total: Schema.Number;
142
+ readonly limit: Schema.optional<Schema.NullOr<Schema.Number>>;
143
+ readonly offset: Schema.optional<Schema.NullOr<Schema.Number>>;
144
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"changePassword", "POST", "/change-password", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
145
+ readonly newPassword: Schema.String;
146
+ readonly currentPassword: Schema.String;
147
+ readonly revokeOtherSessions: Schema.optional<Schema.Boolean>;
148
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
149
+ readonly token: Schema.optional<Schema.NullOr<Schema.String>>;
150
+ readonly user: Schema.Struct<{
151
+ readonly id: Schema.String;
152
+ readonly name: Schema.String;
153
+ readonly email: Schema.String;
154
+ readonly emailVerified: Schema.Boolean;
155
+ readonly image: Schema.NullOr<Schema.String>;
156
+ readonly role: Schema.NullOr<Schema.String>;
157
+ readonly banned: Schema.NullOr<Schema.Boolean>;
158
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
159
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
160
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
161
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
162
+ readonly createdAt: Schema.DateFromString;
163
+ readonly updatedAt: Schema.DateFromString;
164
+ }>;
165
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getSession", "GET", "/get-session", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
166
+ readonly disableCookieCache: Schema.optional<Schema.String>;
167
+ readonly disableRefresh: Schema.optional<Schema.String>;
168
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<Schema.Struct<{
169
+ readonly session: Schema.Struct<{
170
+ readonly id: Schema.String;
171
+ readonly expiresAt: Schema.DateFromString;
172
+ readonly token: Schema.String;
173
+ readonly createdAt: Schema.DateFromString;
174
+ readonly updatedAt: Schema.DateFromString;
175
+ readonly ipAddress: Schema.optional<Schema.NullOr<Schema.String>>;
176
+ readonly userAgent: Schema.optional<Schema.NullOr<Schema.String>>;
177
+ readonly userId: Schema.String;
178
+ readonly impersonatedBy: Schema.optional<Schema.NullOr<Schema.String>>;
179
+ readonly impersonatedByOrganizationId: Schema.optional<Schema.NullOr<Schema.String>>;
180
+ readonly activeOrganizationId: Schema.optional<Schema.NullOr<Schema.String>>;
181
+ }>;
182
+ readonly user: Schema.Struct<{
183
+ readonly id: Schema.String;
184
+ readonly name: Schema.String;
185
+ readonly email: Schema.String;
186
+ readonly emailVerified: Schema.Boolean;
187
+ readonly image: Schema.NullOr<Schema.String>;
188
+ readonly role: Schema.NullOr<Schema.String>;
189
+ readonly banned: Schema.NullOr<Schema.Boolean>;
190
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
191
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
192
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
193
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
194
+ readonly createdAt: Schema.DateFromString;
195
+ readonly updatedAt: Schema.DateFromString;
196
+ }>;
197
+ }>>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"linkSocial", "POST", "/link-social", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
198
+ readonly callbackURL: Schema.optional<Schema.String>;
199
+ readonly provider: Schema.String;
200
+ readonly idToken: Schema.optional<Schema.Struct<{
201
+ readonly token: Schema.String;
202
+ readonly nonce: Schema.optional<Schema.String>;
203
+ readonly accessToken: Schema.optional<Schema.String>;
204
+ readonly refreshToken: Schema.optional<Schema.String>;
205
+ readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
206
+ }>>;
207
+ readonly requestSignUp: Schema.optional<Schema.Boolean>;
208
+ readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
209
+ readonly errorCallbackURL: Schema.optional<Schema.String>;
210
+ readonly disableRedirect: Schema.optional<Schema.Boolean>;
211
+ readonly additionalData: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
212
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
213
+ readonly url: Schema.optional<Schema.String>;
214
+ readonly redirect: Schema.Boolean;
215
+ readonly token: Schema.optional<Schema.String>;
216
+ readonly user: Schema.optional<Schema.Struct<{
217
+ readonly id: Schema.String;
218
+ readonly name: Schema.String;
219
+ readonly email: Schema.String;
220
+ readonly emailVerified: Schema.Boolean;
221
+ readonly image: Schema.NullOr<Schema.String>;
222
+ readonly role: Schema.NullOr<Schema.String>;
223
+ readonly banned: Schema.NullOr<Schema.Boolean>;
224
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
225
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
226
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
227
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
228
+ readonly createdAt: Schema.DateFromString;
229
+ readonly updatedAt: Schema.DateFromString;
230
+ }>>;
231
+ readonly status: Schema.optional<Schema.Boolean>;
232
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listAccounts", "GET", "/list-accounts", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<Schema.Struct<{
233
+ readonly id: Schema.String;
234
+ readonly providerId: Schema.String;
235
+ readonly createdAt: Schema.DateFromString;
236
+ readonly updatedAt: Schema.DateFromString;
237
+ readonly accountId: Schema.String;
238
+ readonly userId: Schema.String;
239
+ readonly scopes: Schema.$Array<Schema.String>;
240
+ }>>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"oauthConsent", "POST", "/oauth2/consent", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
241
+ readonly accept: Schema.Boolean;
242
+ readonly scope: Schema.optional<Schema.String>;
243
+ readonly oauth_query: Schema.optional<Schema.String>;
244
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
245
+ readonly redirect: Schema.Boolean;
246
+ readonly url: Schema.String;
247
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"oauthPublicClient", "GET", "/oauth2/public-client", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
248
+ readonly client_id: Schema.String;
249
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
250
+ readonly client_id: Schema.String;
251
+ readonly client_name: Schema.optional<Schema.String>;
252
+ readonly client_uri: Schema.optional<Schema.String>;
253
+ readonly logo_uri: Schema.optional<Schema.String>;
254
+ readonly contacts: Schema.optional<Schema.$Array<Schema.String>>;
255
+ readonly tos_uri: Schema.optional<Schema.String>;
256
+ readonly policy_uri: Schema.optional<Schema.String>;
257
+ readonly redirect_uris: Schema.$Array<Schema.String>;
258
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationAcceptInvitation", "POST", "/organization/accept-invitation", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
259
+ readonly invitationId: Schema.String;
260
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
261
+ readonly invitation: Schema.NullOr<Schema.Struct<{
262
+ readonly id: Schema.String;
263
+ readonly email: Schema.String;
264
+ readonly role: Schema.String;
265
+ readonly organizationId: Schema.String;
266
+ readonly organizationName: Schema.optional<Schema.NullOr<Schema.String>>;
267
+ readonly inviterId: Schema.String;
268
+ readonly teamId: Schema.optional<Schema.NullOr<Schema.String>>;
269
+ readonly status: Schema.String;
270
+ readonly expiresAt: Schema.DateFromString;
271
+ readonly createdAt: Schema.optional<Schema.DateFromString>;
272
+ }>>;
273
+ readonly member: Schema.NullOr<Schema.Struct<{
274
+ readonly id: Schema.String;
275
+ readonly organizationId: Schema.String;
276
+ readonly userId: Schema.String;
277
+ readonly role: Schema.String;
278
+ readonly createdAt: Schema.DateFromString;
279
+ }>>;
280
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationCancelInvitation", "POST", "/organization/cancel-invitation", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
281
+ readonly invitationId: Schema.String;
282
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
283
+ readonly id: Schema.String;
284
+ readonly email: Schema.String;
285
+ readonly role: Schema.String;
286
+ readonly organizationId: Schema.String;
287
+ readonly organizationName: Schema.optional<Schema.NullOr<Schema.String>>;
288
+ readonly inviterId: Schema.String;
289
+ readonly teamId: Schema.optional<Schema.NullOr<Schema.String>>;
290
+ readonly status: Schema.String;
291
+ readonly expiresAt: Schema.DateFromString;
292
+ readonly createdAt: Schema.optional<Schema.DateFromString>;
293
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationCreate", "POST", "/organization/create", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
294
+ readonly name: Schema.NonEmptyString;
295
+ readonly slug: Schema.NonEmptyString;
296
+ readonly logo: Schema.optional<Schema.NullOr<Schema.String>>;
297
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
298
+ readonly parentId: Schema.optional<Schema.NullOr<Schema.String>>;
299
+ readonly keepCurrentActiveOrganization: Schema.optional<Schema.Boolean>;
300
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
301
+ readonly id: Schema.String;
302
+ readonly name: Schema.String;
303
+ readonly slug: Schema.String;
304
+ readonly logo: Schema.optional<Schema.NullOr<Schema.String>>;
305
+ readonly metadata: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.String]>>>;
306
+ readonly userId: Schema.optional<Schema.NullOr<Schema.String>>;
307
+ readonly parentId: Schema.optional<Schema.NullOr<Schema.String>>;
308
+ readonly createdAt: Schema.DateFromString;
309
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationGetFull", "GET", "/organization/get-full-organization", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
310
+ readonly organizationId: Schema.optional<Schema.String>;
311
+ readonly organizationSlug: Schema.optional<Schema.String>;
312
+ readonly membersLimit: Schema.optional<Schema.NumberFromString>;
313
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<Schema.Struct<{
314
+ readonly id: Schema.String;
315
+ readonly name: Schema.String;
316
+ readonly slug: Schema.String;
317
+ readonly logo: Schema.optional<Schema.NullOr<Schema.String>>;
318
+ readonly metadata: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.String]>>>;
319
+ readonly userId: Schema.optional<Schema.NullOr<Schema.String>>;
320
+ readonly parentId: Schema.optional<Schema.NullOr<Schema.String>>;
321
+ readonly createdAt: Schema.DateFromString;
322
+ readonly members: Schema.$Array<Schema.Struct<{
323
+ readonly id: Schema.String;
324
+ readonly organizationId: Schema.String;
325
+ readonly userId: Schema.String;
326
+ readonly role: Schema.String;
327
+ readonly createdAt: Schema.DateFromString;
328
+ readonly user: Schema.Struct<{
329
+ readonly id: Schema.String;
330
+ readonly name: Schema.String;
331
+ readonly email: Schema.String;
332
+ readonly emailVerified: Schema.Boolean;
333
+ readonly image: Schema.NullOr<Schema.String>;
334
+ readonly role: Schema.NullOr<Schema.String>;
335
+ readonly banned: Schema.NullOr<Schema.Boolean>;
336
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
337
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
338
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
339
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
340
+ readonly createdAt: Schema.DateFromString;
341
+ readonly updatedAt: Schema.DateFromString;
342
+ }>;
343
+ }>>;
344
+ readonly invitations: Schema.$Array<Schema.Struct<{
345
+ readonly id: Schema.String;
346
+ readonly email: Schema.String;
347
+ readonly role: Schema.String;
348
+ readonly organizationId: Schema.String;
349
+ readonly organizationName: Schema.optional<Schema.NullOr<Schema.String>>;
350
+ readonly inviterId: Schema.String;
351
+ readonly teamId: Schema.optional<Schema.NullOr<Schema.String>>;
352
+ readonly status: Schema.String;
353
+ readonly expiresAt: Schema.DateFromString;
354
+ readonly createdAt: Schema.optional<Schema.DateFromString>;
355
+ }>>;
356
+ }>>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationGetInvitation", "GET", "/organization/get-invitation", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
357
+ readonly id: Schema.String;
358
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
359
+ readonly id: Schema.String;
360
+ readonly email: Schema.String;
361
+ readonly role: Schema.String;
362
+ readonly organizationId: Schema.String;
363
+ readonly inviterId: Schema.String;
364
+ readonly teamId: Schema.optional<Schema.NullOr<Schema.String>>;
365
+ readonly status: Schema.String;
366
+ readonly expiresAt: Schema.DateFromString;
367
+ readonly createdAt: Schema.optional<Schema.DateFromString>;
368
+ readonly organizationName: Schema.String;
369
+ readonly organizationSlug: Schema.String;
370
+ readonly inviterEmail: Schema.String;
371
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationImpersonateUser", "POST", "/organization/impersonate-user", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
372
+ readonly organizationId: Schema.NonEmptyString;
373
+ readonly actorUserId: Schema.NonEmptyString;
374
+ readonly targetUserId: Schema.NonEmptyString;
375
+ readonly expiresInSeconds: Schema.optional<Schema.Number>;
376
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
377
+ readonly session: Schema.Struct<{
378
+ readonly id: Schema.String;
379
+ readonly expiresAt: Schema.DateFromString;
380
+ readonly token: Schema.String;
381
+ readonly createdAt: Schema.DateFromString;
382
+ readonly updatedAt: Schema.DateFromString;
383
+ readonly ipAddress: Schema.optional<Schema.NullOr<Schema.String>>;
384
+ readonly userAgent: Schema.optional<Schema.NullOr<Schema.String>>;
385
+ readonly userId: Schema.String;
386
+ readonly impersonatedBy: Schema.optional<Schema.NullOr<Schema.String>>;
387
+ readonly impersonatedByOrganizationId: Schema.optional<Schema.NullOr<Schema.String>>;
388
+ readonly activeOrganizationId: Schema.optional<Schema.NullOr<Schema.String>>;
389
+ }>;
390
+ readonly user: Schema.Struct<{
391
+ readonly id: Schema.String;
392
+ readonly name: Schema.String;
393
+ readonly email: Schema.String;
394
+ readonly emailVerified: Schema.Boolean;
395
+ readonly image: Schema.NullOr<Schema.String>;
396
+ readonly role: Schema.NullOr<Schema.String>;
397
+ readonly banned: Schema.NullOr<Schema.Boolean>;
398
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
399
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
400
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
401
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
402
+ readonly createdAt: Schema.DateFromString;
403
+ readonly updatedAt: Schema.DateFromString;
404
+ }>;
405
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationInviteMember", "POST", "/organization/invite-member", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
406
+ readonly email: Schema.String;
407
+ readonly role: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>;
408
+ readonly organizationId: Schema.optional<Schema.String>;
409
+ readonly resend: Schema.optional<Schema.Boolean>;
410
+ readonly teamId: Schema.optional<Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>>;
411
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
412
+ readonly id: Schema.String;
413
+ readonly email: Schema.String;
414
+ readonly role: Schema.String;
415
+ readonly organizationId: Schema.String;
416
+ readonly organizationName: Schema.optional<Schema.NullOr<Schema.String>>;
417
+ readonly inviterId: Schema.String;
418
+ readonly teamId: Schema.optional<Schema.NullOr<Schema.String>>;
419
+ readonly status: Schema.String;
420
+ readonly expiresAt: Schema.DateFromString;
421
+ readonly createdAt: Schema.optional<Schema.DateFromString>;
422
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationLeave", "POST", "/organization/leave", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
423
+ readonly organizationId: Schema.String;
424
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
425
+ readonly id: Schema.String;
426
+ readonly organizationId: Schema.String;
427
+ readonly userId: Schema.String;
428
+ readonly role: Schema.String;
429
+ readonly createdAt: Schema.DateFromString;
430
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationList", "GET", "/organization/list", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<Schema.Struct<{
431
+ readonly id: Schema.String;
432
+ readonly name: Schema.String;
433
+ readonly slug: Schema.String;
434
+ readonly logo: Schema.optional<Schema.NullOr<Schema.String>>;
435
+ readonly metadata: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.String]>>>;
436
+ readonly userId: Schema.optional<Schema.NullOr<Schema.String>>;
437
+ readonly parentId: Schema.optional<Schema.NullOr<Schema.String>>;
438
+ readonly createdAt: Schema.DateFromString;
439
+ }>>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationListInvitations", "GET", "/organization/list-invitations", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
440
+ readonly organizationId: Schema.optional<Schema.String>;
441
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<Schema.Struct<{
442
+ readonly id: Schema.String;
443
+ readonly email: Schema.String;
444
+ readonly role: Schema.String;
445
+ readonly organizationId: Schema.String;
446
+ readonly organizationName: Schema.optional<Schema.NullOr<Schema.String>>;
447
+ readonly inviterId: Schema.String;
448
+ readonly teamId: Schema.optional<Schema.NullOr<Schema.String>>;
449
+ readonly status: Schema.String;
450
+ readonly expiresAt: Schema.DateFromString;
451
+ readonly createdAt: Schema.optional<Schema.DateFromString>;
452
+ }>>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationListMembers", "GET", "/organization/list-members", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
453
+ readonly limit: Schema.optional<Schema.NumberFromString>;
454
+ readonly offset: Schema.optional<Schema.NumberFromString>;
455
+ readonly sortBy: Schema.optional<Schema.String>;
456
+ readonly sortDirection: Schema.optional<Schema.Literals<readonly ["asc", "desc"]>>;
457
+ readonly filterField: Schema.optional<Schema.String>;
458
+ readonly filterValue: Schema.optional<Schema.String>;
459
+ readonly filterOperator: Schema.optional<Schema.String>;
460
+ readonly organizationId: Schema.optional<Schema.String>;
461
+ readonly organizationSlug: Schema.optional<Schema.String>;
462
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
463
+ readonly members: Schema.$Array<Schema.Struct<{
464
+ readonly id: Schema.String;
465
+ readonly organizationId: Schema.String;
466
+ readonly userId: Schema.String;
467
+ readonly role: Schema.String;
468
+ readonly createdAt: Schema.DateFromString;
469
+ readonly user: Schema.Struct<{
470
+ readonly id: Schema.String;
471
+ readonly name: Schema.String;
472
+ readonly email: Schema.String;
473
+ readonly emailVerified: Schema.Boolean;
474
+ readonly image: Schema.NullOr<Schema.String>;
475
+ readonly role: Schema.NullOr<Schema.String>;
476
+ readonly banned: Schema.NullOr<Schema.Boolean>;
477
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
478
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
479
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
480
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
481
+ readonly createdAt: Schema.DateFromString;
482
+ readonly updatedAt: Schema.DateFromString;
483
+ }>;
484
+ }>>;
485
+ readonly total: Schema.Number;
486
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationListUserInvitations", "GET", "/organization/list-user-invitations", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<Schema.Struct<{
487
+ readonly id: Schema.String;
488
+ readonly email: Schema.String;
489
+ readonly role: Schema.String;
490
+ readonly organizationId: Schema.String;
491
+ readonly organizationName: Schema.optional<Schema.NullOr<Schema.String>>;
492
+ readonly inviterId: Schema.String;
493
+ readonly teamId: Schema.optional<Schema.NullOr<Schema.String>>;
494
+ readonly status: Schema.String;
495
+ readonly expiresAt: Schema.DateFromString;
496
+ readonly createdAt: Schema.optional<Schema.DateFromString>;
497
+ }>>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationRejectInvitation", "POST", "/organization/reject-invitation", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
498
+ readonly invitationId: Schema.String;
499
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
500
+ readonly invitation: Schema.NullOr<Schema.Struct<{
501
+ readonly id: Schema.String;
502
+ readonly email: Schema.String;
503
+ readonly role: Schema.String;
504
+ readonly organizationId: Schema.String;
505
+ readonly organizationName: Schema.optional<Schema.NullOr<Schema.String>>;
506
+ readonly inviterId: Schema.String;
507
+ readonly teamId: Schema.optional<Schema.NullOr<Schema.String>>;
508
+ readonly status: Schema.String;
509
+ readonly expiresAt: Schema.DateFromString;
510
+ readonly createdAt: Schema.optional<Schema.DateFromString>;
511
+ }>>;
512
+ readonly member: Schema.NullOr<Schema.Struct<{
513
+ readonly id: Schema.String;
514
+ readonly organizationId: Schema.String;
515
+ readonly userId: Schema.String;
516
+ readonly role: Schema.String;
517
+ readonly createdAt: Schema.DateFromString;
518
+ }>>;
519
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationRemoveMember", "POST", "/organization/remove-member", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
520
+ readonly memberIdOrEmail: Schema.String;
521
+ readonly organizationId: Schema.optional<Schema.String>;
522
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
523
+ readonly member: Schema.Struct<{
524
+ readonly id: Schema.String;
525
+ readonly organizationId: Schema.String;
526
+ readonly userId: Schema.String;
527
+ readonly role: Schema.String;
528
+ readonly createdAt: Schema.DateFromString;
529
+ }>;
530
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationSetActive", "POST", "/organization/set-active", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
531
+ readonly organizationId: Schema.optional<Schema.NullOr<Schema.String>>;
532
+ readonly organizationSlug: Schema.optional<Schema.String>;
533
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<Schema.Struct<{
534
+ readonly id: Schema.String;
535
+ readonly name: Schema.String;
536
+ readonly slug: Schema.String;
537
+ readonly logo: Schema.optional<Schema.NullOr<Schema.String>>;
538
+ readonly metadata: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.String]>>>;
539
+ readonly userId: Schema.optional<Schema.NullOr<Schema.String>>;
540
+ readonly parentId: Schema.optional<Schema.NullOr<Schema.String>>;
541
+ readonly createdAt: Schema.DateFromString;
542
+ }>>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationUpdate", "POST", "/organization/update", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
543
+ readonly organizationId: Schema.optional<Schema.String>;
544
+ readonly data: Schema.Struct<{
545
+ readonly name: Schema.optional<Schema.NonEmptyString>;
546
+ readonly slug: Schema.optional<Schema.NonEmptyString>;
547
+ readonly logo: Schema.optional<Schema.NullOr<Schema.String>>;
548
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
549
+ readonly parentId: Schema.optional<Schema.NullOr<Schema.String>>;
550
+ }>;
551
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
552
+ readonly id: Schema.String;
553
+ readonly name: Schema.String;
554
+ readonly slug: Schema.String;
555
+ readonly logo: Schema.optional<Schema.NullOr<Schema.String>>;
556
+ readonly metadata: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.String]>>>;
557
+ readonly userId: Schema.optional<Schema.NullOr<Schema.String>>;
558
+ readonly parentId: Schema.optional<Schema.NullOr<Schema.String>>;
559
+ readonly createdAt: Schema.DateFromString;
560
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationUpdateMemberRole", "POST", "/organization/update-member-role", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
561
+ readonly role: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>;
562
+ readonly memberId: Schema.String;
563
+ readonly organizationId: Schema.optional<Schema.String>;
564
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
565
+ readonly id: Schema.String;
566
+ readonly organizationId: Schema.String;
567
+ readonly userId: Schema.String;
568
+ readonly role: Schema.String;
569
+ readonly createdAt: Schema.DateFromString;
570
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"requestPasswordReset", "POST", "/request-password-reset", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
571
+ readonly email: Schema.String;
572
+ readonly redirectTo: Schema.optional<Schema.String>;
573
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
574
+ readonly status: Schema.Boolean;
575
+ readonly message: Schema.String;
576
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"resetPassword", "POST", "/reset-password", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
577
+ readonly newPassword: Schema.String;
578
+ readonly token: Schema.optional<Schema.String>;
579
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
580
+ readonly status: Schema.Boolean;
581
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"sendVerificationOtp", "POST", "/email-otp/send-verification-otp", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
582
+ readonly email: Schema.String;
583
+ readonly type: Schema.Literals<readonly ["sign-in", "email-verification", "forget-password"]>;
584
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
585
+ readonly success: Schema.Boolean;
586
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"signInEmail", "POST", "/sign-in/email", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
587
+ readonly email: Schema.String;
588
+ readonly password: Schema.String;
589
+ readonly callbackURL: Schema.optional<Schema.String>;
590
+ readonly rememberMe: Schema.optional<Schema.Boolean>;
591
+ readonly oauth_query: Schema.optional<Schema.String>;
592
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Union<readonly [Schema.Struct<{
593
+ readonly redirect: Schema.Boolean;
594
+ readonly token: Schema.String;
595
+ readonly url: Schema.optional<Schema.NullOr<Schema.String>>;
596
+ readonly user: Schema.Struct<{
597
+ readonly id: Schema.String;
598
+ readonly name: Schema.String;
599
+ readonly email: Schema.String;
600
+ readonly emailVerified: Schema.Boolean;
601
+ readonly image: Schema.NullOr<Schema.String>;
602
+ readonly role: Schema.NullOr<Schema.String>;
603
+ readonly banned: Schema.NullOr<Schema.Boolean>;
604
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
605
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
606
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
607
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
608
+ readonly createdAt: Schema.DateFromString;
609
+ readonly updatedAt: Schema.DateFromString;
610
+ }>;
611
+ }>, Schema.Struct<{
612
+ readonly twoFactorRedirect: Schema.Literal<true>;
613
+ readonly twoFactorMethods: Schema.$Array<Schema.String>;
614
+ readonly url: Schema.optional<Schema.NullOr<Schema.String>>;
615
+ }>]>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"signInEmailOtp", "POST", "/sign-in/email-otp", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
616
+ readonly email: Schema.String;
617
+ readonly otp: Schema.String;
618
+ readonly name: Schema.optional<Schema.String>;
619
+ readonly image: Schema.optional<Schema.String>;
620
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
621
+ readonly token: Schema.optional<Schema.String>;
622
+ readonly user: Schema.Struct<{
623
+ readonly id: Schema.String;
624
+ readonly name: Schema.String;
625
+ readonly email: Schema.String;
626
+ readonly emailVerified: Schema.Boolean;
627
+ readonly image: Schema.NullOr<Schema.String>;
628
+ readonly role: Schema.NullOr<Schema.String>;
629
+ readonly banned: Schema.NullOr<Schema.Boolean>;
630
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
631
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
632
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
633
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
634
+ readonly createdAt: Schema.DateFromString;
635
+ readonly updatedAt: Schema.DateFromString;
636
+ }>;
637
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"signInSocial", "POST", "/sign-in/social", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
638
+ readonly callbackURL: Schema.optional<Schema.String>;
639
+ readonly newUserCallbackURL: Schema.optional<Schema.String>;
640
+ readonly errorCallbackURL: Schema.optional<Schema.String>;
641
+ readonly provider: Schema.String;
642
+ readonly disableRedirect: Schema.optional<Schema.Boolean>;
643
+ readonly idToken: Schema.optional<Schema.Struct<{
644
+ readonly token: Schema.String;
645
+ readonly nonce: Schema.optional<Schema.String>;
646
+ readonly accessToken: Schema.optional<Schema.String>;
647
+ readonly refreshToken: Schema.optional<Schema.String>;
648
+ readonly expiresAt: Schema.optional<Schema.Number>;
649
+ readonly user: Schema.optional<Schema.Struct<{
650
+ readonly name: Schema.optional<Schema.Struct<{
651
+ readonly firstName: Schema.optional<Schema.String>;
652
+ readonly lastName: Schema.optional<Schema.String>;
653
+ }>>;
654
+ readonly email: Schema.optional<Schema.String>;
655
+ }>>;
656
+ }>>;
657
+ readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
658
+ readonly requestSignUp: Schema.optional<Schema.Boolean>;
659
+ readonly loginHint: Schema.optional<Schema.String>;
660
+ readonly additionalData: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
661
+ readonly oauth_query: Schema.optional<Schema.String>;
662
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
663
+ readonly url: Schema.optional<Schema.String>;
664
+ readonly redirect: Schema.Boolean;
665
+ readonly token: Schema.optional<Schema.String>;
666
+ readonly user: Schema.optional<Schema.Struct<{
667
+ readonly id: Schema.String;
668
+ readonly name: Schema.String;
669
+ readonly email: Schema.String;
670
+ readonly emailVerified: Schema.Boolean;
671
+ readonly image: Schema.NullOr<Schema.String>;
672
+ readonly role: Schema.NullOr<Schema.String>;
673
+ readonly banned: Schema.NullOr<Schema.Boolean>;
674
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
675
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
676
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
677
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
678
+ readonly createdAt: Schema.DateFromString;
679
+ readonly updatedAt: Schema.DateFromString;
680
+ }>>;
681
+ readonly status: Schema.optional<Schema.Boolean>;
682
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"signOut", "POST", "/sign-out", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
683
+ readonly success: Schema.Boolean;
684
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"twoFactorDisable", "POST", "/two-factor/disable", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
685
+ readonly password: Schema.optional<Schema.String>;
686
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
687
+ readonly status: Schema.Boolean;
688
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"twoFactorEnable", "POST", "/two-factor/enable", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
689
+ readonly password: Schema.optional<Schema.String>;
690
+ readonly issuer: Schema.optional<Schema.String>;
691
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
692
+ readonly totpURI: Schema.String;
693
+ readonly backupCodes: Schema.$Array<Schema.String>;
694
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"twoFactorSendOtp", "POST", "/two-factor/send-otp", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
695
+ readonly trustDevice: Schema.optional<Schema.Boolean>;
696
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
697
+ readonly status: Schema.Boolean;
698
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"twoFactorVerifyBackupCode", "POST", "/two-factor/verify-backup-code", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
699
+ readonly code: Schema.String;
700
+ readonly disableSession: Schema.optional<Schema.Boolean>;
701
+ readonly trustDevice: Schema.optional<Schema.Boolean>;
702
+ readonly oauth_query: Schema.optional<Schema.String>;
703
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
704
+ readonly token: Schema.optional<Schema.String>;
705
+ readonly user: Schema.Struct<{
706
+ readonly id: Schema.String;
707
+ readonly name: Schema.String;
708
+ readonly email: Schema.String;
709
+ readonly emailVerified: Schema.Boolean;
710
+ readonly image: Schema.NullOr<Schema.String>;
711
+ readonly role: Schema.NullOr<Schema.String>;
712
+ readonly banned: Schema.NullOr<Schema.Boolean>;
713
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
714
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
715
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
716
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
717
+ readonly createdAt: Schema.DateFromString;
718
+ readonly updatedAt: Schema.DateFromString;
719
+ }>;
720
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"twoFactorVerifyOtp", "POST", "/two-factor/verify-otp", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
721
+ readonly code: Schema.String;
722
+ readonly trustDevice: Schema.optional<Schema.Boolean>;
723
+ readonly oauth_query: Schema.optional<Schema.String>;
724
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
725
+ readonly token: Schema.optional<Schema.String>;
726
+ readonly user: Schema.Struct<{
727
+ readonly id: Schema.String;
728
+ readonly name: Schema.String;
729
+ readonly email: Schema.String;
730
+ readonly emailVerified: Schema.Boolean;
731
+ readonly image: Schema.NullOr<Schema.String>;
732
+ readonly role: Schema.NullOr<Schema.String>;
733
+ readonly banned: Schema.NullOr<Schema.Boolean>;
734
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
735
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
736
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
737
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
738
+ readonly createdAt: Schema.DateFromString;
739
+ readonly updatedAt: Schema.DateFromString;
740
+ }>;
741
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"twoFactorVerifyTotp", "POST", "/two-factor/verify-totp", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
742
+ readonly code: Schema.String;
743
+ readonly trustDevice: Schema.optional<Schema.Boolean>;
744
+ readonly oauth_query: Schema.optional<Schema.String>;
745
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
746
+ readonly token: Schema.optional<Schema.String>;
747
+ readonly user: Schema.Struct<{
748
+ readonly id: Schema.String;
749
+ readonly name: Schema.String;
750
+ readonly email: Schema.String;
751
+ readonly emailVerified: Schema.Boolean;
752
+ readonly image: Schema.NullOr<Schema.String>;
753
+ readonly role: Schema.NullOr<Schema.String>;
754
+ readonly banned: Schema.NullOr<Schema.Boolean>;
755
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
756
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
757
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
758
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
759
+ readonly createdAt: Schema.DateFromString;
760
+ readonly updatedAt: Schema.DateFromString;
761
+ }>;
762
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"unlinkAccount", "POST", "/unlink-account", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
763
+ readonly providerId: Schema.String;
764
+ readonly accountId: Schema.optional<Schema.String>;
765
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
766
+ readonly status: Schema.Boolean;
767
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"updateUser", "POST", "/update-user", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
768
+ readonly name: Schema.optional<Schema.String>;
769
+ readonly image: Schema.optional<Schema.NullOr<Schema.String>>;
770
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
771
+ readonly status: Schema.Boolean;
772
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"verifyEmailOtp", "POST", "/email-otp/verify-email", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
773
+ readonly email: Schema.String;
774
+ readonly otp: Schema.String;
775
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
776
+ readonly status: Schema.Literal<true>;
777
+ readonly token: Schema.NullOr<Schema.String>;
778
+ readonly user: Schema.Struct<{
779
+ readonly id: Schema.String;
780
+ readonly name: Schema.String;
781
+ readonly email: Schema.String;
782
+ readonly emailVerified: Schema.Boolean;
783
+ readonly image: Schema.NullOr<Schema.String>;
784
+ readonly role: Schema.NullOr<Schema.String>;
785
+ readonly banned: Schema.NullOr<Schema.Boolean>;
786
+ readonly banReason: Schema.optional<Schema.NullOr<Schema.String>>;
787
+ readonly banExpires: Schema.optional<Schema.NullOr<Schema.DateFromString>>;
788
+ readonly twoFactorEnabled: Schema.optional<Schema.Boolean>;
789
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
790
+ readonly createdAt: Schema.DateFromString;
791
+ readonly updatedAt: Schema.DateFromString;
792
+ }>;
793
+ }>>, HttpApiEndpoint.Json<typeof AuthBadRequest>, never, never>, false>;