@sixb/server 0.0.1

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 (216) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +123 -0
  3. package/dist/auth/access-token-boundary.d.ts +23 -0
  4. package/dist/auth/access-token-boundary.d.ts.map +1 -0
  5. package/dist/auth/application-access.d.ts +4 -0
  6. package/dist/auth/application-access.d.ts.map +1 -0
  7. package/dist/auth/browser-origin.d.ts +62 -0
  8. package/dist/auth/browser-origin.d.ts.map +1 -0
  9. package/dist/auth/csrf.d.ts +2 -0
  10. package/dist/auth/csrf.d.ts.map +1 -0
  11. package/dist/auth/guard.d.ts +35 -0
  12. package/dist/auth/guard.d.ts.map +1 -0
  13. package/dist/auth/public-routes.d.ts +8 -0
  14. package/dist/auth/public-routes.d.ts.map +1 -0
  15. package/dist/auth/responses.d.ts +11 -0
  16. package/dist/auth/responses.d.ts.map +1 -0
  17. package/dist/auth/return-to.d.ts +3 -0
  18. package/dist/auth/return-to.d.ts.map +1 -0
  19. package/dist/auth/scope.d.ts +43 -0
  20. package/dist/auth/scope.d.ts.map +1 -0
  21. package/dist/auth/session-activity.d.ts +4 -0
  22. package/dist/auth/session-activity.d.ts.map +1 -0
  23. package/dist/auth/session-cookies.d.ts +12 -0
  24. package/dist/auth/session-cookies.d.ts.map +1 -0
  25. package/dist/files/content.d.ts +141 -0
  26. package/dist/files/content.d.ts.map +1 -0
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +11522 -0
  30. package/dist/index.js.map +78 -0
  31. package/dist/openapi/security.d.ts +26 -0
  32. package/dist/openapi/security.d.ts.map +1 -0
  33. package/dist/openapi/tags.d.ts +151 -0
  34. package/dist/openapi/tags.d.ts.map +1 -0
  35. package/dist/registerRoutes.d.ts +31 -0
  36. package/dist/registerRoutes.d.ts.map +1 -0
  37. package/dist/routes/action-runs.d.ts +244 -0
  38. package/dist/routes/action-runs.d.ts.map +1 -0
  39. package/dist/routes/actions.d.ts +183 -0
  40. package/dist/routes/actions.d.ts.map +1 -0
  41. package/dist/routes/agent-api-gateway.d.ts +4 -0
  42. package/dist/routes/agent-api-gateway.d.ts.map +1 -0
  43. package/dist/routes/agents.d.ts +1061 -0
  44. package/dist/routes/agents.d.ts.map +1 -0
  45. package/dist/routes/auth.d.ts +1366 -0
  46. package/dist/routes/auth.d.ts.map +1 -0
  47. package/dist/routes/connectors.d.ts +108 -0
  48. package/dist/routes/connectors.d.ts.map +1 -0
  49. package/dist/routes/datasets.d.ts +339 -0
  50. package/dist/routes/datasets.d.ts.map +1 -0
  51. package/dist/routes/events.d.ts +116 -0
  52. package/dist/routes/events.d.ts.map +1 -0
  53. package/dist/routes/files.d.ts +340 -0
  54. package/dist/routes/files.d.ts.map +1 -0
  55. package/dist/routes/links.d.ts +175 -0
  56. package/dist/routes/links.d.ts.map +1 -0
  57. package/dist/routes/logs.d.ts +88 -0
  58. package/dist/routes/logs.d.ts.map +1 -0
  59. package/dist/routes/objects.d.ts +450 -0
  60. package/dist/routes/objects.d.ts.map +1 -0
  61. package/dist/routes/ontology.d.ts +240 -0
  62. package/dist/routes/ontology.d.ts.map +1 -0
  63. package/dist/routes/pipelines.d.ts +399 -0
  64. package/dist/routes/pipelines.d.ts.map +1 -0
  65. package/dist/routes/project.d.ts +56 -0
  66. package/dist/routes/project.d.ts.map +1 -0
  67. package/dist/routes/projections.d.ts +916 -0
  68. package/dist/routes/projections.d.ts.map +1 -0
  69. package/dist/routes/rules.d.ts +165 -0
  70. package/dist/routes/rules.d.ts.map +1 -0
  71. package/dist/routes/status.d.ts +81 -0
  72. package/dist/routes/status.d.ts.map +1 -0
  73. package/dist/routes/syncs.d.ts +294 -0
  74. package/dist/routes/syncs.d.ts.map +1 -0
  75. package/dist/routes/telemetry.d.ts +241 -0
  76. package/dist/routes/telemetry.d.ts.map +1 -0
  77. package/dist/routes/webhook-runs.d.ts +89 -0
  78. package/dist/routes/webhook-runs.d.ts.map +1 -0
  79. package/dist/routes/webhooks.d.ts +60 -0
  80. package/dist/routes/webhooks.d.ts.map +1 -0
  81. package/dist/routes/workflows.d.ts +973 -0
  82. package/dist/routes/workflows.d.ts.map +1 -0
  83. package/dist/routes/ws/agents.d.ts +99 -0
  84. package/dist/routes/ws/agents.d.ts.map +1 -0
  85. package/dist/routes/ws/events.d.ts +89 -0
  86. package/dist/routes/ws/events.d.ts.map +1 -0
  87. package/dist/routes/ws/index.d.ts +31 -0
  88. package/dist/routes/ws/index.d.ts.map +1 -0
  89. package/dist/routes/ws/log-subscription-hub.d.ts +47 -0
  90. package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -0
  91. package/dist/routes/ws/logs.d.ts +110 -0
  92. package/dist/routes/ws/logs.d.ts.map +1 -0
  93. package/dist/schemas/actions.d.ts +644 -0
  94. package/dist/schemas/actions.d.ts.map +1 -0
  95. package/dist/schemas/agents.d.ts +3157 -0
  96. package/dist/schemas/agents.d.ts.map +1 -0
  97. package/dist/schemas/auth.d.ts +2023 -0
  98. package/dist/schemas/auth.d.ts.map +1 -0
  99. package/dist/schemas/common.d.ts +30 -0
  100. package/dist/schemas/common.d.ts.map +1 -0
  101. package/dist/schemas/connectors.d.ts +82 -0
  102. package/dist/schemas/connectors.d.ts.map +1 -0
  103. package/dist/schemas/datasets.d.ts +744 -0
  104. package/dist/schemas/datasets.d.ts.map +1 -0
  105. package/dist/schemas/event-payloads.d.ts +477 -0
  106. package/dist/schemas/event-payloads.d.ts.map +1 -0
  107. package/dist/schemas/events.d.ts +665 -0
  108. package/dist/schemas/events.d.ts.map +1 -0
  109. package/dist/schemas/files.d.ts +241 -0
  110. package/dist/schemas/files.d.ts.map +1 -0
  111. package/dist/schemas/links.d.ts +90 -0
  112. package/dist/schemas/links.d.ts.map +1 -0
  113. package/dist/schemas/logs.d.ts +231 -0
  114. package/dist/schemas/logs.d.ts.map +1 -0
  115. package/dist/schemas/objects.d.ts +288 -0
  116. package/dist/schemas/objects.d.ts.map +1 -0
  117. package/dist/schemas/ontology.d.ts +778 -0
  118. package/dist/schemas/ontology.d.ts.map +1 -0
  119. package/dist/schemas/pipelines.d.ts +1373 -0
  120. package/dist/schemas/pipelines.d.ts.map +1 -0
  121. package/dist/schemas/project.d.ts +9 -0
  122. package/dist/schemas/project.d.ts.map +1 -0
  123. package/dist/schemas/projections.d.ts +6992 -0
  124. package/dist/schemas/projections.d.ts.map +1 -0
  125. package/dist/schemas/rules.d.ts +204 -0
  126. package/dist/schemas/rules.d.ts.map +1 -0
  127. package/dist/schemas/status.d.ts +189 -0
  128. package/dist/schemas/status.d.ts.map +1 -0
  129. package/dist/schemas/syncs.d.ts +538 -0
  130. package/dist/schemas/syncs.d.ts.map +1 -0
  131. package/dist/schemas/telemetry.d.ts +265 -0
  132. package/dist/schemas/telemetry.d.ts.map +1 -0
  133. package/dist/schemas/webhook-runs.d.ts +169 -0
  134. package/dist/schemas/webhook-runs.d.ts.map +1 -0
  135. package/dist/schemas/workflows.d.ts +1720 -0
  136. package/dist/schemas/workflows.d.ts.map +1 -0
  137. package/dist/server.d.ts +64 -0
  138. package/dist/server.d.ts.map +1 -0
  139. package/dist/tsconfig.json +5 -0
  140. package/dist/utils/http.d.ts +23 -0
  141. package/dist/utils/http.d.ts.map +1 -0
  142. package/dist/utils/request-body.d.ts +15 -0
  143. package/dist/utils/request-body.d.ts.map +1 -0
  144. package/dist/utils/ws.d.ts +10 -0
  145. package/dist/utils/ws.d.ts.map +1 -0
  146. package/package.json +68 -0
  147. package/src/auth/access-token-boundary.ts +68 -0
  148. package/src/auth/application-access.ts +16 -0
  149. package/src/auth/browser-origin.ts +367 -0
  150. package/src/auth/csrf.ts +1 -0
  151. package/src/auth/guard.ts +169 -0
  152. package/src/auth/public-routes.ts +87 -0
  153. package/src/auth/responses.ts +54 -0
  154. package/src/auth/return-to.ts +21 -0
  155. package/src/auth/scope.ts +64 -0
  156. package/src/auth/session-activity.ts +19 -0
  157. package/src/auth/session-cookies.ts +43 -0
  158. package/src/files/content.ts +419 -0
  159. package/src/index.ts +2 -0
  160. package/src/openapi/security.ts +37 -0
  161. package/src/openapi/tags.ts +151 -0
  162. package/src/registerRoutes.ts +49 -0
  163. package/src/routes/action-runs.ts +238 -0
  164. package/src/routes/actions.ts +126 -0
  165. package/src/routes/agent-api-gateway.ts +260 -0
  166. package/src/routes/agents.ts +943 -0
  167. package/src/routes/auth.ts +2233 -0
  168. package/src/routes/connectors.ts +69 -0
  169. package/src/routes/datasets.ts +402 -0
  170. package/src/routes/events.ts +55 -0
  171. package/src/routes/files.ts +675 -0
  172. package/src/routes/links.ts +143 -0
  173. package/src/routes/logs.ts +65 -0
  174. package/src/routes/objects.ts +838 -0
  175. package/src/routes/ontology.ts +138 -0
  176. package/src/routes/pipelines.ts +332 -0
  177. package/src/routes/project.ts +16 -0
  178. package/src/routes/projections.ts +251 -0
  179. package/src/routes/rules.ts +124 -0
  180. package/src/routes/status.ts +53 -0
  181. package/src/routes/syncs.ts +243 -0
  182. package/src/routes/telemetry.ts +207 -0
  183. package/src/routes/webhook-runs.ts +81 -0
  184. package/src/routes/webhooks.ts +508 -0
  185. package/src/routes/workflows.ts +1333 -0
  186. package/src/routes/ws/agents.ts +301 -0
  187. package/src/routes/ws/events.ts +278 -0
  188. package/src/routes/ws/index.ts +12 -0
  189. package/src/routes/ws/log-subscription-hub.ts +375 -0
  190. package/src/routes/ws/logs.ts +117 -0
  191. package/src/schemas/actions.ts +123 -0
  192. package/src/schemas/agents.ts +293 -0
  193. package/src/schemas/auth.ts +317 -0
  194. package/src/schemas/common.ts +60 -0
  195. package/src/schemas/connectors.ts +21 -0
  196. package/src/schemas/datasets.ts +107 -0
  197. package/src/schemas/event-payloads.ts +79 -0
  198. package/src/schemas/events.ts +117 -0
  199. package/src/schemas/files.ts +82 -0
  200. package/src/schemas/links.ts +38 -0
  201. package/src/schemas/logs.ts +76 -0
  202. package/src/schemas/objects.ts +759 -0
  203. package/src/schemas/ontology.ts +77 -0
  204. package/src/schemas/pipelines.ts +150 -0
  205. package/src/schemas/project.ts +5 -0
  206. package/src/schemas/projections.ts +144 -0
  207. package/src/schemas/rules.ts +98 -0
  208. package/src/schemas/status.ts +51 -0
  209. package/src/schemas/syncs.ts +83 -0
  210. package/src/schemas/telemetry.ts +59 -0
  211. package/src/schemas/webhook-runs.ts +40 -0
  212. package/src/schemas/workflows.ts +229 -0
  213. package/src/server.ts +383 -0
  214. package/src/utils/http.ts +108 -0
  215. package/src/utils/request-body.ts +62 -0
  216. package/src/utils/ws.ts +59 -0
@@ -0,0 +1,1366 @@
1
+ import type { OntologySource, Sixb } from "@sixb/core";
2
+ import { type Elysia } from "elysia";
3
+ import { type AuthInvitationDestinationOptions, type AuthInvitationRedirectContext, type AuthInvitationRedirectInput, type ResolveAuthRedirectContext, type ResolveRequestAuthContext } from "../auth/browser-origin";
4
+ export interface AuthRoutesOptions {
5
+ readonly resolveAuthContext: ResolveRequestAuthContext;
6
+ readonly resolveAuthRedirectContext: ResolveAuthRedirectContext;
7
+ readonly getInvitationDestinationOptions: (request: Request) => AuthInvitationDestinationOptions;
8
+ readonly resolveAuthRequestOrigin: (request: Request) => string;
9
+ readonly resolveInvitationRedirectContext: (request: Request, input: AuthInvitationRedirectInput) => AuthInvitationRedirectContext;
10
+ }
11
+ export declare function registerAuthRoutes(app: Elysia, sixb: Sixb<readonly OntologySource[]>, options: AuthRoutesOptions): Elysia<"", {
12
+ decorator: {};
13
+ store: {};
14
+ derive: {};
15
+ resolve: {};
16
+ }, {
17
+ typebox: {};
18
+ error: {};
19
+ }, {
20
+ schema: {};
21
+ standaloneSchema: {};
22
+ macro: {};
23
+ macroFn: {};
24
+ parser: {};
25
+ response: {};
26
+ }, {
27
+ api: {
28
+ auth: {
29
+ session: {
30
+ get: {
31
+ body: unknown;
32
+ params: {};
33
+ query: unknown;
34
+ headers: unknown;
35
+ response: {
36
+ 200: {
37
+ authenticated: false;
38
+ } | {
39
+ session: {
40
+ id: string;
41
+ expiresAt: string;
42
+ };
43
+ csrfToken: string;
44
+ user: {
45
+ id: string;
46
+ email: string;
47
+ groupIds: string[];
48
+ displayName?: string | undefined;
49
+ avatarUrl?: string | undefined;
50
+ };
51
+ authenticated: true;
52
+ applicationAccess: {
53
+ audience: "atlas" | "app";
54
+ allowed: boolean;
55
+ };
56
+ };
57
+ 422: {
58
+ type: "validation";
59
+ on: string;
60
+ summary?: string;
61
+ message?: string;
62
+ found?: unknown;
63
+ property?: string;
64
+ expected?: string;
65
+ };
66
+ };
67
+ };
68
+ };
69
+ };
70
+ };
71
+ } & {
72
+ api: {
73
+ auth: {
74
+ "sign-out": {
75
+ post: {
76
+ body: unknown;
77
+ params: {};
78
+ query: unknown;
79
+ headers: unknown;
80
+ response: {
81
+ 200: {
82
+ success: boolean;
83
+ };
84
+ 403: {
85
+ error: string;
86
+ };
87
+ 422: {
88
+ type: "validation";
89
+ on: string;
90
+ summary?: string;
91
+ message?: string;
92
+ found?: unknown;
93
+ property?: string;
94
+ expected?: string;
95
+ };
96
+ };
97
+ };
98
+ };
99
+ };
100
+ };
101
+ } & {
102
+ api: {
103
+ auth: {
104
+ sessions: {
105
+ get: {
106
+ body: unknown;
107
+ params: {};
108
+ query: unknown;
109
+ headers: unknown;
110
+ response: {
111
+ 200: {
112
+ sessions: {
113
+ audience: "atlas" | "app";
114
+ id: string;
115
+ expiresAt: string;
116
+ createdAt: string;
117
+ current: boolean;
118
+ lastSeenAt?: string | undefined;
119
+ userAgent?: string | undefined;
120
+ ipAddress?: string | undefined;
121
+ }[];
122
+ };
123
+ 401: {
124
+ error: string;
125
+ };
126
+ 422: {
127
+ type: "validation";
128
+ on: string;
129
+ summary?: string;
130
+ message?: string;
131
+ found?: unknown;
132
+ property?: string;
133
+ expected?: string;
134
+ };
135
+ };
136
+ };
137
+ };
138
+ };
139
+ };
140
+ } & {
141
+ api: {
142
+ auth: {
143
+ sessions: {
144
+ ":sessionId": {
145
+ revoke: {
146
+ post: {
147
+ body: unknown;
148
+ params: {
149
+ sessionId: string;
150
+ };
151
+ query: unknown;
152
+ headers: unknown;
153
+ response: {
154
+ 200: {
155
+ success: boolean;
156
+ };
157
+ 401: {
158
+ error: string;
159
+ };
160
+ 403: {
161
+ error: string;
162
+ };
163
+ 404: {
164
+ error: string;
165
+ };
166
+ 422: {
167
+ type: "validation";
168
+ on: string;
169
+ summary?: string;
170
+ message?: string;
171
+ found?: unknown;
172
+ property?: string;
173
+ expected?: string;
174
+ };
175
+ };
176
+ };
177
+ };
178
+ };
179
+ };
180
+ };
181
+ };
182
+ } & {
183
+ api: {
184
+ auth: {
185
+ "sign-out-all": {
186
+ post: {
187
+ body: unknown;
188
+ params: {};
189
+ query: unknown;
190
+ headers: unknown;
191
+ response: {
192
+ 200: {
193
+ success: boolean;
194
+ revokedCount: number;
195
+ };
196
+ 401: {
197
+ error: string;
198
+ };
199
+ 403: {
200
+ error: string;
201
+ };
202
+ 422: {
203
+ type: "validation";
204
+ on: string;
205
+ summary?: string;
206
+ message?: string;
207
+ found?: unknown;
208
+ property?: string;
209
+ expected?: string;
210
+ };
211
+ };
212
+ };
213
+ };
214
+ };
215
+ };
216
+ } & {
217
+ api: {
218
+ auth: {
219
+ "access-management-options": {
220
+ get: {
221
+ body: unknown;
222
+ params: {};
223
+ query: unknown;
224
+ headers: unknown;
225
+ response: {
226
+ 200: {
227
+ groups: {
228
+ id: string;
229
+ description?: string | undefined;
230
+ label?: string | undefined;
231
+ }[];
232
+ };
233
+ 401: {
234
+ error: string;
235
+ };
236
+ 422: {
237
+ type: "validation";
238
+ on: string;
239
+ summary?: string;
240
+ message?: string;
241
+ found?: unknown;
242
+ property?: string;
243
+ expected?: string;
244
+ };
245
+ 500: {
246
+ error: string;
247
+ };
248
+ };
249
+ };
250
+ };
251
+ };
252
+ };
253
+ } & {
254
+ api: {
255
+ auth: {
256
+ "access-tokens": {
257
+ get: {
258
+ body: unknown;
259
+ params: {};
260
+ query: unknown;
261
+ headers: unknown;
262
+ response: {
263
+ 200: {
264
+ accessTokens: {
265
+ status: "expired" | "active" | "revoked";
266
+ kind: "serviceAccount" | "personal";
267
+ name: string;
268
+ id: string;
269
+ expiresAt: string;
270
+ createdAt: string;
271
+ subjectType: "serviceAccount" | "user";
272
+ subjectId: string;
273
+ groupIds?: string[] | undefined;
274
+ revokedAt?: string | undefined;
275
+ subjectLabel?: string | undefined;
276
+ lastUsedAt?: string | undefined;
277
+ lastUsedUserAgent?: string | undefined;
278
+ lastUsedIpAddress?: string | undefined;
279
+ }[];
280
+ };
281
+ 401: {
282
+ error: string;
283
+ };
284
+ 422: {
285
+ type: "validation";
286
+ on: string;
287
+ summary?: string;
288
+ message?: string;
289
+ found?: unknown;
290
+ property?: string;
291
+ expected?: string;
292
+ };
293
+ 500: {
294
+ error: string;
295
+ };
296
+ };
297
+ };
298
+ };
299
+ };
300
+ };
301
+ } & {
302
+ api: {
303
+ auth: {
304
+ "access-tokens": {
305
+ post: {
306
+ body: {
307
+ name: string;
308
+ expiresAt: string;
309
+ groupIds?: string[] | undefined;
310
+ };
311
+ params: {};
312
+ query: unknown;
313
+ headers: unknown;
314
+ response: {
315
+ 200: Response;
316
+ 401: {
317
+ error: string;
318
+ };
319
+ 403: {
320
+ error: string;
321
+ };
322
+ 400: {
323
+ error: string;
324
+ };
325
+ 201: {
326
+ accessToken: {
327
+ status: "expired" | "active" | "revoked";
328
+ kind: "serviceAccount" | "personal";
329
+ name: string;
330
+ id: string;
331
+ expiresAt: string;
332
+ createdAt: string;
333
+ subjectType: "serviceAccount" | "user";
334
+ subjectId: string;
335
+ groupIds?: string[] | undefined;
336
+ revokedAt?: string | undefined;
337
+ subjectLabel?: string | undefined;
338
+ lastUsedAt?: string | undefined;
339
+ lastUsedUserAgent?: string | undefined;
340
+ lastUsedIpAddress?: string | undefined;
341
+ };
342
+ tokenValue: string;
343
+ };
344
+ 422: {
345
+ type: "validation";
346
+ on: string;
347
+ summary?: string;
348
+ message?: string;
349
+ found?: unknown;
350
+ property?: string;
351
+ expected?: string;
352
+ };
353
+ 500: {
354
+ error: string;
355
+ };
356
+ };
357
+ };
358
+ };
359
+ };
360
+ };
361
+ } & {
362
+ api: {
363
+ auth: {
364
+ "access-tokens": {
365
+ ":tokenId": {
366
+ revoke: {
367
+ post: {
368
+ body: unknown;
369
+ params: {
370
+ tokenId: string;
371
+ };
372
+ query: unknown;
373
+ headers: unknown;
374
+ response: {
375
+ 200: {
376
+ accessToken: {
377
+ status: "expired" | "active" | "revoked";
378
+ kind: "serviceAccount" | "personal";
379
+ name: string;
380
+ id: string;
381
+ expiresAt: string;
382
+ createdAt: string;
383
+ subjectType: "serviceAccount" | "user";
384
+ subjectId: string;
385
+ groupIds?: string[] | undefined;
386
+ revokedAt?: string | undefined;
387
+ subjectLabel?: string | undefined;
388
+ lastUsedAt?: string | undefined;
389
+ lastUsedUserAgent?: string | undefined;
390
+ lastUsedIpAddress?: string | undefined;
391
+ };
392
+ };
393
+ 401: {
394
+ error: string;
395
+ };
396
+ 403: {
397
+ error: string;
398
+ };
399
+ 404: {
400
+ error: string;
401
+ };
402
+ 422: {
403
+ type: "validation";
404
+ on: string;
405
+ summary?: string;
406
+ message?: string;
407
+ found?: unknown;
408
+ property?: string;
409
+ expected?: string;
410
+ };
411
+ 500: {
412
+ error: string;
413
+ };
414
+ };
415
+ };
416
+ };
417
+ };
418
+ };
419
+ };
420
+ };
421
+ } & {
422
+ api: {
423
+ auth: {
424
+ "service-accounts": {
425
+ get: {
426
+ body: unknown;
427
+ params: {};
428
+ query: unknown;
429
+ headers: unknown;
430
+ response: {
431
+ 200: {
432
+ serviceAccounts: {
433
+ status: "active" | "suspended";
434
+ name: string;
435
+ id: string;
436
+ groupIds: string[];
437
+ createdAt: string;
438
+ updatedAt: string;
439
+ description?: string | undefined;
440
+ }[];
441
+ };
442
+ 401: {
443
+ error: string;
444
+ };
445
+ 403: {
446
+ error: string;
447
+ };
448
+ 422: {
449
+ type: "validation";
450
+ on: string;
451
+ summary?: string;
452
+ message?: string;
453
+ found?: unknown;
454
+ property?: string;
455
+ expected?: string;
456
+ };
457
+ 500: {
458
+ error: string;
459
+ };
460
+ };
461
+ };
462
+ };
463
+ };
464
+ };
465
+ } & {
466
+ api: {
467
+ auth: {
468
+ "service-accounts": {
469
+ post: {
470
+ body: {
471
+ name: string;
472
+ description?: string | undefined;
473
+ id?: string | undefined;
474
+ groupIds?: string[] | undefined;
475
+ };
476
+ params: {};
477
+ query: unknown;
478
+ headers: unknown;
479
+ response: {
480
+ 200: Response;
481
+ 401: {
482
+ error: string;
483
+ };
484
+ 403: {
485
+ error: string;
486
+ };
487
+ 400: {
488
+ error: string;
489
+ };
490
+ 201: {
491
+ serviceAccount: {
492
+ status: "active" | "suspended";
493
+ name: string;
494
+ id: string;
495
+ groupIds: string[];
496
+ createdAt: string;
497
+ updatedAt: string;
498
+ description?: string | undefined;
499
+ };
500
+ };
501
+ 422: {
502
+ type: "validation";
503
+ on: string;
504
+ summary?: string;
505
+ message?: string;
506
+ found?: unknown;
507
+ property?: string;
508
+ expected?: string;
509
+ };
510
+ 500: {
511
+ error: string;
512
+ };
513
+ };
514
+ };
515
+ };
516
+ };
517
+ };
518
+ } & {
519
+ api: {
520
+ auth: {
521
+ "service-accounts": {
522
+ ":serviceAccountId": {
523
+ disable: {
524
+ post: {
525
+ body: unknown;
526
+ params: {
527
+ serviceAccountId: string;
528
+ };
529
+ query: unknown;
530
+ headers: unknown;
531
+ response: {
532
+ 200: {
533
+ serviceAccount: {
534
+ status: "active" | "suspended";
535
+ name: string;
536
+ id: string;
537
+ groupIds: string[];
538
+ createdAt: string;
539
+ updatedAt: string;
540
+ description?: string | undefined;
541
+ };
542
+ };
543
+ 401: {
544
+ error: string;
545
+ };
546
+ 403: {
547
+ error: string;
548
+ };
549
+ 404: {
550
+ error: string;
551
+ };
552
+ 422: {
553
+ type: "validation";
554
+ on: string;
555
+ summary?: string;
556
+ message?: string;
557
+ found?: unknown;
558
+ property?: string;
559
+ expected?: string;
560
+ };
561
+ 500: {
562
+ error: string;
563
+ };
564
+ };
565
+ };
566
+ };
567
+ };
568
+ };
569
+ };
570
+ };
571
+ } & {
572
+ api: {
573
+ auth: {
574
+ "service-accounts": {
575
+ ":serviceAccountId": {
576
+ "access-tokens": {
577
+ get: {
578
+ body: unknown;
579
+ params: {
580
+ serviceAccountId: string;
581
+ };
582
+ query: unknown;
583
+ headers: unknown;
584
+ response: {
585
+ 200: {
586
+ accessTokens: {
587
+ status: "expired" | "active" | "revoked";
588
+ kind: "serviceAccount" | "personal";
589
+ name: string;
590
+ id: string;
591
+ expiresAt: string;
592
+ createdAt: string;
593
+ subjectType: "serviceAccount" | "user";
594
+ subjectId: string;
595
+ groupIds?: string[] | undefined;
596
+ revokedAt?: string | undefined;
597
+ subjectLabel?: string | undefined;
598
+ lastUsedAt?: string | undefined;
599
+ lastUsedUserAgent?: string | undefined;
600
+ lastUsedIpAddress?: string | undefined;
601
+ }[];
602
+ };
603
+ 401: {
604
+ error: string;
605
+ };
606
+ 403: {
607
+ error: string;
608
+ };
609
+ 404: {
610
+ error: string;
611
+ };
612
+ 422: {
613
+ type: "validation";
614
+ on: string;
615
+ summary?: string;
616
+ message?: string;
617
+ found?: unknown;
618
+ property?: string;
619
+ expected?: string;
620
+ };
621
+ 500: {
622
+ error: string;
623
+ };
624
+ };
625
+ };
626
+ };
627
+ };
628
+ };
629
+ };
630
+ };
631
+ } & {
632
+ api: {
633
+ auth: {
634
+ "service-accounts": {
635
+ ":serviceAccountId": {
636
+ "access-tokens": {
637
+ post: {
638
+ body: {
639
+ name: string;
640
+ expiresAt: string;
641
+ groupIds?: string[] | undefined;
642
+ };
643
+ params: {
644
+ serviceAccountId: string;
645
+ };
646
+ query: unknown;
647
+ headers: unknown;
648
+ response: {
649
+ 200: Response;
650
+ 401: {
651
+ error: string;
652
+ };
653
+ 403: {
654
+ error: string;
655
+ };
656
+ 400: {
657
+ error: string;
658
+ };
659
+ 404: {
660
+ error: string;
661
+ };
662
+ 201: {
663
+ accessToken: {
664
+ status: "expired" | "active" | "revoked";
665
+ kind: "serviceAccount" | "personal";
666
+ name: string;
667
+ id: string;
668
+ expiresAt: string;
669
+ createdAt: string;
670
+ subjectType: "serviceAccount" | "user";
671
+ subjectId: string;
672
+ groupIds?: string[] | undefined;
673
+ revokedAt?: string | undefined;
674
+ subjectLabel?: string | undefined;
675
+ lastUsedAt?: string | undefined;
676
+ lastUsedUserAgent?: string | undefined;
677
+ lastUsedIpAddress?: string | undefined;
678
+ };
679
+ tokenValue: string;
680
+ };
681
+ 422: {
682
+ type: "validation";
683
+ on: string;
684
+ summary?: string;
685
+ message?: string;
686
+ found?: unknown;
687
+ property?: string;
688
+ expected?: string;
689
+ };
690
+ 500: {
691
+ error: string;
692
+ };
693
+ };
694
+ };
695
+ };
696
+ };
697
+ };
698
+ };
699
+ };
700
+ } & {
701
+ api: {
702
+ auth: {
703
+ "service-accounts": {
704
+ ":serviceAccountId": {
705
+ "access-tokens": {
706
+ ":tokenId": {
707
+ revoke: {
708
+ post: {
709
+ body: unknown;
710
+ params: {
711
+ tokenId: string;
712
+ serviceAccountId: string;
713
+ };
714
+ query: unknown;
715
+ headers: unknown;
716
+ response: {
717
+ 200: {
718
+ accessToken: {
719
+ status: "expired" | "active" | "revoked";
720
+ kind: "serviceAccount" | "personal";
721
+ name: string;
722
+ id: string;
723
+ expiresAt: string;
724
+ createdAt: string;
725
+ subjectType: "serviceAccount" | "user";
726
+ subjectId: string;
727
+ groupIds?: string[] | undefined;
728
+ revokedAt?: string | undefined;
729
+ subjectLabel?: string | undefined;
730
+ lastUsedAt?: string | undefined;
731
+ lastUsedUserAgent?: string | undefined;
732
+ lastUsedIpAddress?: string | undefined;
733
+ };
734
+ };
735
+ 401: {
736
+ error: string;
737
+ };
738
+ 403: {
739
+ error: string;
740
+ };
741
+ 404: {
742
+ error: string;
743
+ };
744
+ 422: {
745
+ type: "validation";
746
+ on: string;
747
+ summary?: string;
748
+ message?: string;
749
+ found?: unknown;
750
+ property?: string;
751
+ expected?: string;
752
+ };
753
+ 500: {
754
+ error: string;
755
+ };
756
+ };
757
+ };
758
+ };
759
+ };
760
+ };
761
+ };
762
+ };
763
+ };
764
+ };
765
+ } & {
766
+ api: {
767
+ auth: {
768
+ invitations: {
769
+ post: {
770
+ body: {
771
+ email: string;
772
+ returnTo?: string | undefined;
773
+ expiresAt?: string | undefined;
774
+ groupIds?: string[] | undefined;
775
+ destinationId?: "atlas" | "app" | undefined;
776
+ };
777
+ params: {};
778
+ query: unknown;
779
+ headers: unknown;
780
+ response: {
781
+ 200: Response;
782
+ 401: {
783
+ error: string;
784
+ };
785
+ 403: {
786
+ error: string;
787
+ };
788
+ 400: {
789
+ error: string;
790
+ };
791
+ 404: {
792
+ error: string;
793
+ };
794
+ 201: {
795
+ invitation: {
796
+ status: "pending" | "accepted" | "revoked";
797
+ id: string;
798
+ email: string;
799
+ expiresAt: string;
800
+ groupIds: string[];
801
+ createdAt: string;
802
+ updatedAt: string;
803
+ acceptedAt?: string | undefined;
804
+ revokedAt?: string | undefined;
805
+ };
806
+ delivery: {
807
+ status: "skipped" | "sent" | "rate_limited" | "not_supported";
808
+ };
809
+ };
810
+ 422: {
811
+ type: "validation";
812
+ on: string;
813
+ summary?: string;
814
+ message?: string;
815
+ found?: unknown;
816
+ property?: string;
817
+ expected?: string;
818
+ };
819
+ 429: {
820
+ error: string;
821
+ };
822
+ 500: {
823
+ error: string;
824
+ };
825
+ };
826
+ };
827
+ };
828
+ };
829
+ };
830
+ } & {
831
+ api: {
832
+ auth: {
833
+ "invitation-options": {
834
+ get: {
835
+ body: unknown;
836
+ params: {};
837
+ query: unknown;
838
+ headers: unknown;
839
+ response: {
840
+ 200: {
841
+ capabilities: {
842
+ createInvitation: {
843
+ state: "enabled";
844
+ } | {
845
+ state: "disabled";
846
+ reason: "missing_membership_policy" | "invitation_delivery_not_supported";
847
+ };
848
+ };
849
+ groups: {
850
+ id: string;
851
+ description?: string | undefined;
852
+ label?: string | undefined;
853
+ }[];
854
+ destinations: {
855
+ id: "atlas" | "app";
856
+ label: string;
857
+ }[];
858
+ canInviteWithoutGroups: boolean;
859
+ defaultDestinationId?: "atlas" | "app" | undefined;
860
+ };
861
+ 401: {
862
+ error: string;
863
+ };
864
+ 422: {
865
+ type: "validation";
866
+ on: string;
867
+ summary?: string;
868
+ message?: string;
869
+ found?: unknown;
870
+ property?: string;
871
+ expected?: string;
872
+ };
873
+ 500: {
874
+ error: string;
875
+ };
876
+ };
877
+ };
878
+ };
879
+ };
880
+ };
881
+ } & {
882
+ api: {
883
+ auth: {
884
+ invitations: {
885
+ get: {
886
+ body: unknown;
887
+ params: {};
888
+ query: {
889
+ status?: "pending" | "accepted" | "revoked" | undefined;
890
+ limit?: string | undefined;
891
+ offset?: string | undefined;
892
+ order?: "asc" | "desc" | undefined;
893
+ email?: string | undefined;
894
+ };
895
+ headers: unknown;
896
+ response: {
897
+ 200: {
898
+ hasMore: boolean;
899
+ total: number;
900
+ invitations: {
901
+ status: "pending" | "accepted" | "revoked";
902
+ id: string;
903
+ email: string;
904
+ expiresAt: string;
905
+ groupIds: string[];
906
+ createdAt: string;
907
+ updatedAt: string;
908
+ acceptedAt?: string | undefined;
909
+ revokedAt?: string | undefined;
910
+ }[];
911
+ };
912
+ 401: {
913
+ error: string;
914
+ };
915
+ 403: {
916
+ error: string;
917
+ };
918
+ 400: {
919
+ error: string;
920
+ };
921
+ 404: {
922
+ error: string;
923
+ };
924
+ 422: {
925
+ type: "validation";
926
+ on: string;
927
+ summary?: string;
928
+ message?: string;
929
+ found?: unknown;
930
+ property?: string;
931
+ expected?: string;
932
+ };
933
+ 500: {
934
+ error: string;
935
+ };
936
+ };
937
+ };
938
+ };
939
+ };
940
+ };
941
+ } & {
942
+ api: {
943
+ auth: {
944
+ invitations: {
945
+ ":invitationId": {
946
+ revoke: {
947
+ post: {
948
+ body: unknown;
949
+ params: {
950
+ invitationId: string;
951
+ };
952
+ query: unknown;
953
+ headers: unknown;
954
+ response: {
955
+ 200: {
956
+ invitation: {
957
+ status: "pending" | "accepted" | "revoked";
958
+ id: string;
959
+ email: string;
960
+ expiresAt: string;
961
+ groupIds: string[];
962
+ createdAt: string;
963
+ updatedAt: string;
964
+ acceptedAt?: string | undefined;
965
+ revokedAt?: string | undefined;
966
+ };
967
+ };
968
+ 401: {
969
+ error: string;
970
+ };
971
+ 403: {
972
+ error: string;
973
+ };
974
+ 400: {
975
+ error: string;
976
+ };
977
+ 404: {
978
+ error: string;
979
+ };
980
+ 422: {
981
+ type: "validation";
982
+ on: string;
983
+ summary?: string;
984
+ message?: string;
985
+ found?: unknown;
986
+ property?: string;
987
+ expected?: string;
988
+ };
989
+ 500: {
990
+ error: string;
991
+ };
992
+ };
993
+ };
994
+ };
995
+ };
996
+ };
997
+ };
998
+ };
999
+ } & {
1000
+ api: {
1001
+ auth: {
1002
+ "membership-options": {
1003
+ get: {
1004
+ body: unknown;
1005
+ params: {};
1006
+ query: unknown;
1007
+ headers: unknown;
1008
+ response: {
1009
+ 200: {
1010
+ capabilities: {
1011
+ assignGroups: boolean;
1012
+ suspend: boolean;
1013
+ invite: boolean;
1014
+ };
1015
+ groups: {
1016
+ id: string;
1017
+ description?: string | undefined;
1018
+ label?: string | undefined;
1019
+ }[];
1020
+ };
1021
+ 401: {
1022
+ error: string;
1023
+ };
1024
+ 422: {
1025
+ type: "validation";
1026
+ on: string;
1027
+ summary?: string;
1028
+ message?: string;
1029
+ found?: unknown;
1030
+ property?: string;
1031
+ expected?: string;
1032
+ };
1033
+ 500: {
1034
+ error: string;
1035
+ };
1036
+ };
1037
+ };
1038
+ };
1039
+ };
1040
+ };
1041
+ } & {
1042
+ api: {
1043
+ auth: {
1044
+ members: {
1045
+ get: {
1046
+ body: unknown;
1047
+ params: {};
1048
+ query: {
1049
+ limit?: string | undefined;
1050
+ offset?: string | undefined;
1051
+ order?: "asc" | "desc" | undefined;
1052
+ };
1053
+ headers: unknown;
1054
+ response: {
1055
+ 200: {
1056
+ hasMore: boolean;
1057
+ total: number;
1058
+ members: {
1059
+ user: {
1060
+ status: "active" | "suspended";
1061
+ id: string;
1062
+ email: string;
1063
+ createdAt: string;
1064
+ updatedAt: string;
1065
+ displayName?: string | undefined;
1066
+ avatarUrl?: string | undefined;
1067
+ };
1068
+ groupIds: string[];
1069
+ capabilities: {
1070
+ assignGroups: boolean;
1071
+ suspend: boolean;
1072
+ reactivate: boolean;
1073
+ };
1074
+ }[];
1075
+ };
1076
+ 401: {
1077
+ error: string;
1078
+ };
1079
+ 400: {
1080
+ error: string;
1081
+ };
1082
+ 422: {
1083
+ type: "validation";
1084
+ on: string;
1085
+ summary?: string;
1086
+ message?: string;
1087
+ found?: unknown;
1088
+ property?: string;
1089
+ expected?: string;
1090
+ };
1091
+ 500: {
1092
+ error: string;
1093
+ };
1094
+ };
1095
+ };
1096
+ };
1097
+ };
1098
+ };
1099
+ } & {
1100
+ api: {
1101
+ auth: {
1102
+ members: {
1103
+ ":userId": {
1104
+ groups: {
1105
+ patch: {
1106
+ body: {
1107
+ groupIds: string[];
1108
+ };
1109
+ params: {
1110
+ userId: string;
1111
+ };
1112
+ query: unknown;
1113
+ headers: unknown;
1114
+ response: {
1115
+ 200: {
1116
+ member: {
1117
+ user: {
1118
+ status: "active" | "suspended";
1119
+ id: string;
1120
+ email: string;
1121
+ createdAt: string;
1122
+ updatedAt: string;
1123
+ displayName?: string | undefined;
1124
+ avatarUrl?: string | undefined;
1125
+ };
1126
+ groupIds: string[];
1127
+ };
1128
+ };
1129
+ 401: {
1130
+ error: string;
1131
+ };
1132
+ 403: {
1133
+ error: string;
1134
+ };
1135
+ 400: {
1136
+ error: string;
1137
+ };
1138
+ 404: {
1139
+ error: string;
1140
+ };
1141
+ 422: {
1142
+ type: "validation";
1143
+ on: string;
1144
+ summary?: string;
1145
+ message?: string;
1146
+ found?: unknown;
1147
+ property?: string;
1148
+ expected?: string;
1149
+ };
1150
+ 500: {
1151
+ error: string;
1152
+ };
1153
+ };
1154
+ };
1155
+ };
1156
+ };
1157
+ };
1158
+ };
1159
+ };
1160
+ } & {
1161
+ api: {
1162
+ auth: {
1163
+ members: {
1164
+ ":userId": {
1165
+ suspend: {
1166
+ post: {
1167
+ body: unknown;
1168
+ params: {
1169
+ userId: string;
1170
+ };
1171
+ query: unknown;
1172
+ headers: unknown;
1173
+ response: {
1174
+ 200: {
1175
+ member: {
1176
+ user: {
1177
+ status: "active" | "suspended";
1178
+ id: string;
1179
+ email: string;
1180
+ createdAt: string;
1181
+ updatedAt: string;
1182
+ displayName?: string | undefined;
1183
+ avatarUrl?: string | undefined;
1184
+ };
1185
+ groupIds: string[];
1186
+ };
1187
+ };
1188
+ 401: {
1189
+ error: string;
1190
+ };
1191
+ 403: {
1192
+ error: string;
1193
+ };
1194
+ 404: {
1195
+ error: string;
1196
+ };
1197
+ 422: {
1198
+ type: "validation";
1199
+ on: string;
1200
+ summary?: string;
1201
+ message?: string;
1202
+ found?: unknown;
1203
+ property?: string;
1204
+ expected?: string;
1205
+ };
1206
+ 500: {
1207
+ error: string;
1208
+ };
1209
+ };
1210
+ };
1211
+ };
1212
+ };
1213
+ };
1214
+ };
1215
+ };
1216
+ } & {
1217
+ api: {
1218
+ auth: {
1219
+ members: {
1220
+ ":userId": {
1221
+ reactivate: {
1222
+ post: {
1223
+ body: unknown;
1224
+ params: {
1225
+ userId: string;
1226
+ };
1227
+ query: unknown;
1228
+ headers: unknown;
1229
+ response: {
1230
+ 200: {
1231
+ member: {
1232
+ user: {
1233
+ status: "active" | "suspended";
1234
+ id: string;
1235
+ email: string;
1236
+ createdAt: string;
1237
+ updatedAt: string;
1238
+ displayName?: string | undefined;
1239
+ avatarUrl?: string | undefined;
1240
+ };
1241
+ groupIds: string[];
1242
+ };
1243
+ };
1244
+ 401: {
1245
+ error: string;
1246
+ };
1247
+ 403: {
1248
+ error: string;
1249
+ };
1250
+ 404: {
1251
+ error: string;
1252
+ };
1253
+ 422: {
1254
+ type: "validation";
1255
+ on: string;
1256
+ summary?: string;
1257
+ message?: string;
1258
+ found?: unknown;
1259
+ property?: string;
1260
+ expected?: string;
1261
+ };
1262
+ 500: {
1263
+ error: string;
1264
+ };
1265
+ };
1266
+ };
1267
+ };
1268
+ };
1269
+ };
1270
+ };
1271
+ };
1272
+ } & {
1273
+ auth: {
1274
+ "sign-in": {
1275
+ post: {
1276
+ body: {
1277
+ returnTo?: string | undefined;
1278
+ audience?: string | undefined;
1279
+ email?: string | undefined;
1280
+ };
1281
+ params: {};
1282
+ query: unknown;
1283
+ headers: unknown;
1284
+ response: {
1285
+ 200: Response;
1286
+ 422: {
1287
+ type: "validation";
1288
+ on: string;
1289
+ summary?: string;
1290
+ message?: string;
1291
+ found?: unknown;
1292
+ property?: string;
1293
+ expected?: string;
1294
+ };
1295
+ };
1296
+ };
1297
+ };
1298
+ };
1299
+ } & {
1300
+ auth: {
1301
+ "sign-in": {
1302
+ get: {
1303
+ body: unknown;
1304
+ params: {};
1305
+ query: unknown;
1306
+ headers: unknown;
1307
+ response: {
1308
+ 200: Response;
1309
+ };
1310
+ };
1311
+ };
1312
+ };
1313
+ } & {
1314
+ auth: {
1315
+ callback: {
1316
+ get: {
1317
+ body: unknown;
1318
+ params: {};
1319
+ query: unknown;
1320
+ headers: unknown;
1321
+ response: {
1322
+ 200: Response;
1323
+ };
1324
+ };
1325
+ };
1326
+ };
1327
+ } & {
1328
+ auth: {
1329
+ callback: {
1330
+ post: {
1331
+ body: {
1332
+ token?: string | undefined;
1333
+ magicLinkId?: string | undefined;
1334
+ };
1335
+ params: {};
1336
+ query: unknown;
1337
+ headers: unknown;
1338
+ response: {
1339
+ 200: Response;
1340
+ 422: {
1341
+ type: "validation";
1342
+ on: string;
1343
+ summary?: string;
1344
+ message?: string;
1345
+ found?: unknown;
1346
+ property?: string;
1347
+ expected?: string;
1348
+ };
1349
+ };
1350
+ };
1351
+ };
1352
+ };
1353
+ }, {
1354
+ derive: {};
1355
+ resolve: {};
1356
+ schema: {};
1357
+ standaloneSchema: {};
1358
+ response: {};
1359
+ }, {
1360
+ derive: {};
1361
+ resolve: {};
1362
+ schema: {};
1363
+ standaloneSchema: {};
1364
+ response: {};
1365
+ }>;
1366
+ //# sourceMappingURL=auth.d.ts.map