@inkeep/agents-core 0.67.3 → 0.68.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 (40) hide show
  1. package/dist/auth/auth-schema.d.ts +1477 -109
  2. package/dist/auth/auth-schema.js +139 -6
  3. package/dist/auth/auth-validation-schemas.d.ts +154 -154
  4. package/dist/auth/auth.d.ts +2231 -0
  5. package/dist/auth/auth.js +23 -1
  6. package/dist/auth/permissions.d.ts +13 -13
  7. package/dist/data-access/manage/agents.d.ts +46 -46
  8. package/dist/data-access/manage/artifactComponents.d.ts +4 -4
  9. package/dist/data-access/manage/contextConfigs.d.ts +4 -4
  10. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  11. package/dist/data-access/manage/functionTools.d.ts +6 -6
  12. package/dist/data-access/manage/skills.d.ts +6 -6
  13. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
  14. package/dist/data-access/manage/subAgentRelations.d.ts +12 -12
  15. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
  16. package/dist/data-access/manage/subAgents.d.ts +18 -18
  17. package/dist/data-access/manage/tools.d.ts +18 -18
  18. package/dist/data-access/manage/triggers.d.ts +4 -4
  19. package/dist/data-access/runtime/apiKeys.d.ts +12 -12
  20. package/dist/data-access/runtime/apps.d.ts +15 -15
  21. package/dist/data-access/runtime/conversations.d.ts +24 -24
  22. package/dist/data-access/runtime/feedback.d.ts +2 -2
  23. package/dist/data-access/runtime/messages.d.ts +6 -6
  24. package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
  25. package/dist/data-access/runtime/tasks.d.ts +5 -5
  26. package/dist/db/manage/manage-schema.d.ts +495 -495
  27. package/dist/db/manage/manage-schema.js +39 -40
  28. package/dist/db/runtime/runtime-schema.d.ts +416 -416
  29. package/dist/db/runtime/runtime-schema.js +7 -2
  30. package/dist/index.d.ts +2 -2
  31. package/dist/index.js +2 -2
  32. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  33. package/dist/validation/schemas/skills.d.ts +31 -31
  34. package/dist/validation/schemas.d.ts +2325 -2325
  35. package/drizzle/runtime/0036_swift_hammerhead.sql +90 -0
  36. package/drizzle/runtime/meta/0036_snapshot.json +5915 -0
  37. package/drizzle/runtime/meta/_journal.json +8 -1
  38. package/package.json +2 -1
  39. package/dist/db/manage/dolt-safe-jsonb.d.ts +0 -12
  40. package/dist/db/manage/dolt-safe-jsonb.js +0 -61
@@ -1,7 +1,9 @@
1
1
  import { BetterAuthConfig, EmailServiceConfig, OIDCProviderConfig, SAMLProviderConfig, SSOProviderConfig, UserAuthConfig } from "./auth-types.js";
2
2
  import { extractCookieDomain, hasCredentialAccount } from "./auth-config-utils.js";
3
+ import * as jose0 from "jose";
3
4
  import * as zod0 from "zod";
4
5
  import * as better_auth0 from "better-auth";
6
+ import * as _better_auth_oauth_provider0 from "@better-auth/oauth-provider";
5
7
  import * as better_auth_plugins0 from "better-auth/plugins";
6
8
 
7
9
  //#region src/auth/auth.d.ts
@@ -93,6 +95,2235 @@ declare function _inferAuthType(): better_auth0.Auth<{
93
95
  handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
94
96
  }[];
95
97
  };
98
+ }, {
99
+ id: "jwt";
100
+ options: NoInfer<better_auth_plugins0.JwtOptions>;
101
+ endpoints: {
102
+ getJwks: better_auth0.StrictEndpoint<string, {
103
+ method: "GET";
104
+ metadata: {
105
+ openapi: {
106
+ operationId: string;
107
+ description: string;
108
+ responses: {
109
+ "200": {
110
+ description: string;
111
+ content: {
112
+ "application/json": {
113
+ schema: {
114
+ type: "object";
115
+ properties: {
116
+ keys: {
117
+ type: string;
118
+ description: string;
119
+ items: {
120
+ type: string;
121
+ properties: {
122
+ kid: {
123
+ type: string;
124
+ description: string;
125
+ };
126
+ kty: {
127
+ type: string;
128
+ description: string;
129
+ };
130
+ alg: {
131
+ type: string;
132
+ description: string;
133
+ };
134
+ use: {
135
+ type: string;
136
+ description: string;
137
+ enum: string[];
138
+ nullable: boolean;
139
+ };
140
+ n: {
141
+ type: string;
142
+ description: string;
143
+ nullable: boolean;
144
+ };
145
+ e: {
146
+ type: string;
147
+ description: string;
148
+ nullable: boolean;
149
+ };
150
+ crv: {
151
+ type: string;
152
+ description: string;
153
+ nullable: boolean;
154
+ };
155
+ x: {
156
+ type: string;
157
+ description: string;
158
+ nullable: boolean;
159
+ };
160
+ y: {
161
+ type: string;
162
+ description: string;
163
+ nullable: boolean;
164
+ };
165
+ };
166
+ required: string[];
167
+ };
168
+ };
169
+ };
170
+ required: string[];
171
+ };
172
+ };
173
+ };
174
+ };
175
+ };
176
+ };
177
+ };
178
+ }, jose0.JSONWebKeySet>;
179
+ getToken: better_auth0.StrictEndpoint<"/token", {
180
+ method: "GET";
181
+ requireHeaders: true;
182
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
183
+ session: {
184
+ session: Record<string, any> & {
185
+ id: string;
186
+ createdAt: Date;
187
+ updatedAt: Date;
188
+ userId: string;
189
+ expiresAt: Date;
190
+ token: string;
191
+ ipAddress?: string | null | undefined;
192
+ userAgent?: string | null | undefined;
193
+ };
194
+ user: Record<string, any> & {
195
+ id: string;
196
+ createdAt: Date;
197
+ updatedAt: Date;
198
+ email: string;
199
+ emailVerified: boolean;
200
+ name: string;
201
+ image?: string | null | undefined;
202
+ };
203
+ };
204
+ }>)[];
205
+ metadata: {
206
+ openapi: {
207
+ operationId: string;
208
+ description: string;
209
+ responses: {
210
+ 200: {
211
+ description: string;
212
+ content: {
213
+ "application/json": {
214
+ schema: {
215
+ type: "object";
216
+ properties: {
217
+ token: {
218
+ type: string;
219
+ };
220
+ };
221
+ };
222
+ };
223
+ };
224
+ };
225
+ };
226
+ };
227
+ };
228
+ }, {
229
+ token: string;
230
+ }>;
231
+ signJWT: better_auth0.StrictEndpoint<string, {
232
+ method: "POST";
233
+ metadata: {
234
+ $Infer: {
235
+ body: {
236
+ payload: jose0.JWTPayload;
237
+ overrideOptions?: better_auth_plugins0.JwtOptions | undefined;
238
+ };
239
+ };
240
+ };
241
+ body: zod0.ZodObject<{
242
+ payload: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
243
+ overrideOptions: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
244
+ }, better_auth0.$strip>;
245
+ }, {
246
+ token: string;
247
+ }>;
248
+ verifyJWT: better_auth0.StrictEndpoint<string, {
249
+ method: "POST";
250
+ metadata: {
251
+ $Infer: {
252
+ body: {
253
+ token: string;
254
+ issuer?: string;
255
+ };
256
+ response: {
257
+ payload: {
258
+ sub: string;
259
+ aud: string;
260
+ [key: string]: any;
261
+ } | null;
262
+ };
263
+ };
264
+ };
265
+ body: zod0.ZodObject<{
266
+ token: zod0.ZodString;
267
+ issuer: zod0.ZodOptional<zod0.ZodString>;
268
+ }, better_auth0.$strip>;
269
+ }, {
270
+ payload: (jose0.JWTPayload & Required<Pick<jose0.JWTPayload, "sub" | "aud">>) | null;
271
+ }>;
272
+ };
273
+ hooks: {
274
+ after: {
275
+ matcher(context: better_auth0.HookEndpointContext): boolean;
276
+ handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
277
+ }[];
278
+ };
279
+ schema: {
280
+ jwks: {
281
+ fields: {
282
+ publicKey: {
283
+ type: "string";
284
+ required: true;
285
+ };
286
+ privateKey: {
287
+ type: "string";
288
+ required: true;
289
+ };
290
+ createdAt: {
291
+ type: "date";
292
+ required: true;
293
+ };
294
+ expiresAt: {
295
+ type: "date";
296
+ required: false;
297
+ };
298
+ };
299
+ };
300
+ };
301
+ }, {
302
+ id: "oauth-provider";
303
+ options: NoInfer<{
304
+ loginPage: string;
305
+ consentPage: string;
306
+ }>;
307
+ init: (ctx: better_auth0.AuthContext) => void;
308
+ hooks: {
309
+ before: {
310
+ matcher(ctx: better_auth0.HookEndpointContext): any;
311
+ handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
312
+ }[];
313
+ after: {
314
+ matcher(ctx: better_auth0.HookEndpointContext): boolean;
315
+ handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
316
+ redirect: boolean;
317
+ url: string;
318
+ } | undefined>;
319
+ }[];
320
+ };
321
+ endpoints: {
322
+ getOAuthServerConfig: better_auth0.StrictEndpoint<"/.well-known/oauth-authorization-server", {
323
+ method: "GET";
324
+ metadata: {
325
+ SERVER_ONLY: true;
326
+ };
327
+ }, _better_auth_oauth_provider0.AuthServerMetadata>;
328
+ getOpenIdConfig: better_auth0.StrictEndpoint<"/.well-known/openid-configuration", {
329
+ method: "GET";
330
+ metadata: {
331
+ SERVER_ONLY: true;
332
+ };
333
+ }, Omit<_better_auth_oauth_provider0.OIDCMetadata, "id_token_signing_alg_values_supported"> & {
334
+ id_token_signing_alg_values_supported: better_auth_plugins0.JWSAlgorithms[] | ["HS256"];
335
+ }>;
336
+ oauth2Authorize: better_auth0.StrictEndpoint<"/oauth2/authorize", {
337
+ method: "GET";
338
+ query: zod0.ZodObject<{
339
+ response_type: zod0.ZodEnum<{
340
+ code: "code";
341
+ }>;
342
+ client_id: zod0.ZodString;
343
+ redirect_uri: zod0.ZodOptional<zod0.ZodURL>;
344
+ scope: zod0.ZodOptional<zod0.ZodString>;
345
+ state: zod0.ZodOptional<zod0.ZodString>;
346
+ code_challenge: zod0.ZodOptional<zod0.ZodString>;
347
+ code_challenge_method: zod0.ZodOptional<zod0.ZodEnum<{
348
+ S256: "S256";
349
+ }>>;
350
+ nonce: zod0.ZodOptional<zod0.ZodString>;
351
+ prompt: zod0.ZodOptional<zod0.ZodEnum<{
352
+ none: "none";
353
+ consent: "consent";
354
+ login: "login";
355
+ create: "create";
356
+ select_account: "select_account";
357
+ "login consent": "login consent";
358
+ "select_account consent": "select_account consent";
359
+ }>>;
360
+ }, better_auth0.$strip>;
361
+ metadata: {
362
+ openapi: {
363
+ description: string;
364
+ parameters: ({
365
+ name: string;
366
+ in: "query";
367
+ required: true;
368
+ schema: {
369
+ type: "string";
370
+ format?: undefined;
371
+ };
372
+ description: string;
373
+ } | {
374
+ name: string;
375
+ in: "query";
376
+ required: false;
377
+ schema: {
378
+ type: "string";
379
+ format: string;
380
+ };
381
+ description: string;
382
+ } | {
383
+ name: string;
384
+ in: "query";
385
+ required: false;
386
+ schema: {
387
+ type: "string";
388
+ format?: undefined;
389
+ };
390
+ description: string;
391
+ })[];
392
+ responses: {
393
+ "302": {
394
+ description: string;
395
+ headers: {
396
+ Location: {
397
+ description: string;
398
+ schema: {
399
+ type: string;
400
+ format: string;
401
+ };
402
+ };
403
+ };
404
+ };
405
+ "400": {
406
+ description: string;
407
+ content: {
408
+ "application/json": {
409
+ schema: {
410
+ type: "object";
411
+ properties: {
412
+ error: {
413
+ type: string;
414
+ };
415
+ error_description: {
416
+ type: string;
417
+ };
418
+ state: {
419
+ type: string;
420
+ };
421
+ };
422
+ required: string[];
423
+ };
424
+ };
425
+ };
426
+ };
427
+ };
428
+ };
429
+ };
430
+ }, {
431
+ redirect: boolean;
432
+ url: string;
433
+ }>;
434
+ oauth2Consent: better_auth0.StrictEndpoint<"/oauth2/consent", {
435
+ method: "POST";
436
+ body: zod0.ZodObject<{
437
+ accept: zod0.ZodBoolean;
438
+ scope: zod0.ZodOptional<zod0.ZodString>;
439
+ oauth_query: zod0.ZodOptional<zod0.ZodString>;
440
+ }, better_auth0.$strip>;
441
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
442
+ session: {
443
+ session: Record<string, any> & {
444
+ id: string;
445
+ createdAt: Date;
446
+ updatedAt: Date;
447
+ userId: string;
448
+ expiresAt: Date;
449
+ token: string;
450
+ ipAddress?: string | null | undefined;
451
+ userAgent?: string | null | undefined;
452
+ };
453
+ user: Record<string, any> & {
454
+ id: string;
455
+ createdAt: Date;
456
+ updatedAt: Date;
457
+ email: string;
458
+ emailVerified: boolean;
459
+ name: string;
460
+ image?: string | null | undefined;
461
+ };
462
+ };
463
+ }>)[];
464
+ metadata: {
465
+ openapi: {
466
+ description: string;
467
+ responses: {
468
+ "200": {
469
+ description: string;
470
+ content: {
471
+ "application/json": {
472
+ schema: {
473
+ type: "object";
474
+ properties: {
475
+ redirect_uri: {
476
+ type: string;
477
+ format: string;
478
+ description: string;
479
+ };
480
+ };
481
+ required: string[];
482
+ };
483
+ };
484
+ };
485
+ };
486
+ };
487
+ };
488
+ };
489
+ }, {
490
+ redirect: boolean;
491
+ url: string;
492
+ }>;
493
+ oauth2Continue: better_auth0.StrictEndpoint<"/oauth2/continue", {
494
+ method: "POST";
495
+ body: zod0.ZodObject<{
496
+ selected: zod0.ZodOptional<zod0.ZodBoolean>;
497
+ created: zod0.ZodOptional<zod0.ZodBoolean>;
498
+ postLogin: zod0.ZodOptional<zod0.ZodBoolean>;
499
+ oauth_query: zod0.ZodOptional<zod0.ZodString>;
500
+ }, better_auth0.$strip>;
501
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
502
+ session: {
503
+ session: Record<string, any> & {
504
+ id: string;
505
+ createdAt: Date;
506
+ updatedAt: Date;
507
+ userId: string;
508
+ expiresAt: Date;
509
+ token: string;
510
+ ipAddress?: string | null | undefined;
511
+ userAgent?: string | null | undefined;
512
+ };
513
+ user: Record<string, any> & {
514
+ id: string;
515
+ createdAt: Date;
516
+ updatedAt: Date;
517
+ email: string;
518
+ emailVerified: boolean;
519
+ name: string;
520
+ image?: string | null | undefined;
521
+ };
522
+ };
523
+ }>)[];
524
+ metadata: {
525
+ openapi: {
526
+ description: string;
527
+ responses: {
528
+ "200": {
529
+ description: string;
530
+ content: {
531
+ "application/json": {
532
+ schema: {
533
+ type: "object";
534
+ properties: {
535
+ redirect_uri: {
536
+ type: string;
537
+ format: string;
538
+ description: string;
539
+ };
540
+ };
541
+ required: string[];
542
+ };
543
+ };
544
+ };
545
+ };
546
+ };
547
+ };
548
+ };
549
+ }, {
550
+ redirect: boolean;
551
+ url: string;
552
+ }>;
553
+ oauth2Token: better_auth0.StrictEndpoint<"/oauth2/token", {
554
+ method: "POST";
555
+ body: zod0.ZodObject<{
556
+ grant_type: zod0.ZodEnum<{
557
+ authorization_code: "authorization_code";
558
+ client_credentials: "client_credentials";
559
+ refresh_token: "refresh_token";
560
+ }>;
561
+ client_id: zod0.ZodOptional<zod0.ZodString>;
562
+ client_secret: zod0.ZodOptional<zod0.ZodString>;
563
+ code: zod0.ZodOptional<zod0.ZodString>;
564
+ code_verifier: zod0.ZodOptional<zod0.ZodString>;
565
+ redirect_uri: zod0.ZodOptional<zod0.ZodURL>;
566
+ refresh_token: zod0.ZodOptional<zod0.ZodString>;
567
+ resource: zod0.ZodOptional<zod0.ZodString>;
568
+ scope: zod0.ZodOptional<zod0.ZodString>;
569
+ }, better_auth0.$strip>;
570
+ metadata: {
571
+ allowedMediaTypes: string[];
572
+ openapi: {
573
+ description: string;
574
+ requestBody: {
575
+ required: boolean;
576
+ content: {
577
+ "application/json": {
578
+ schema: {
579
+ type: "object";
580
+ properties: {
581
+ grant_type: {
582
+ type: string;
583
+ enum: string[];
584
+ description: string;
585
+ };
586
+ client_id: {
587
+ type: string;
588
+ description: string;
589
+ };
590
+ client_secret: {
591
+ type: string;
592
+ description: string;
593
+ };
594
+ code: {
595
+ type: string;
596
+ description: string;
597
+ };
598
+ code_verifier: {
599
+ type: string;
600
+ description: string;
601
+ };
602
+ redirect_uri: {
603
+ type: string;
604
+ format: string;
605
+ description: string;
606
+ };
607
+ refresh_token: {
608
+ type: string;
609
+ description: string;
610
+ };
611
+ resource: {
612
+ type: string;
613
+ description: string;
614
+ };
615
+ scope: {
616
+ type: string;
617
+ description: string;
618
+ };
619
+ };
620
+ required: string[];
621
+ };
622
+ };
623
+ };
624
+ };
625
+ responses: {
626
+ "200": {
627
+ description: string;
628
+ content: {
629
+ "application/json": {
630
+ schema: {
631
+ type: "object";
632
+ properties: {
633
+ access_token: {
634
+ type: string;
635
+ description: string;
636
+ };
637
+ token_type: {
638
+ type: string;
639
+ description: string;
640
+ enum: string[];
641
+ };
642
+ expires_in: {
643
+ type: string;
644
+ description: string;
645
+ };
646
+ refresh_token: {
647
+ type: string;
648
+ description: string;
649
+ };
650
+ scope: {
651
+ type: string;
652
+ description: string;
653
+ };
654
+ id_token: {
655
+ type: string;
656
+ description: string;
657
+ };
658
+ };
659
+ required: string[];
660
+ };
661
+ };
662
+ };
663
+ };
664
+ "400": {
665
+ description: string;
666
+ content: {
667
+ "application/json": {
668
+ schema: {
669
+ type: "object";
670
+ properties: {
671
+ error: {
672
+ type: string;
673
+ };
674
+ error_description: {
675
+ type: string;
676
+ };
677
+ error_uri: {
678
+ type: string;
679
+ };
680
+ };
681
+ required: string[];
682
+ };
683
+ };
684
+ };
685
+ };
686
+ };
687
+ };
688
+ };
689
+ }, {
690
+ access_token: string;
691
+ expires_in: number;
692
+ expires_at: number;
693
+ token_type: string;
694
+ scope: string;
695
+ }>;
696
+ oauth2Introspect: better_auth0.StrictEndpoint<"/oauth2/introspect", {
697
+ method: "POST";
698
+ body: zod0.ZodObject<{
699
+ client_id: zod0.ZodOptional<zod0.ZodString>;
700
+ client_secret: zod0.ZodOptional<zod0.ZodString>;
701
+ token: zod0.ZodString;
702
+ token_type_hint: zod0.ZodOptional<zod0.ZodEnum<{
703
+ refresh_token: "refresh_token";
704
+ access_token: "access_token";
705
+ }>>;
706
+ }, better_auth0.$strip>;
707
+ metadata: {
708
+ allowedMediaTypes: string[];
709
+ openapi: {
710
+ description: string;
711
+ requestBody: {
712
+ required: boolean;
713
+ content: {
714
+ "application/json": {
715
+ schema: {
716
+ type: "object";
717
+ properties: {
718
+ client_id: {
719
+ type: string;
720
+ description: string;
721
+ };
722
+ client_secret: {
723
+ type: string;
724
+ description: string;
725
+ };
726
+ token: {
727
+ type: string;
728
+ description: string;
729
+ };
730
+ token_type_hint: {
731
+ type: string;
732
+ enum: string[];
733
+ description: string;
734
+ };
735
+ resource: {
736
+ type: string;
737
+ description: string;
738
+ };
739
+ };
740
+ required: string[];
741
+ };
742
+ };
743
+ };
744
+ };
745
+ responses: {
746
+ "200": {
747
+ description: string;
748
+ content: {
749
+ "application/json": {
750
+ schema: {
751
+ type: "object";
752
+ properties: {
753
+ active: {
754
+ type: string;
755
+ description: string;
756
+ };
757
+ scope: {
758
+ type: string;
759
+ description: string;
760
+ };
761
+ client_id: {
762
+ type: string;
763
+ description: string;
764
+ };
765
+ username: {
766
+ type: string;
767
+ description: string;
768
+ };
769
+ token_type: {
770
+ type: string;
771
+ description: string;
772
+ };
773
+ exp: {
774
+ type: string;
775
+ description: string;
776
+ };
777
+ iat: {
778
+ type: string;
779
+ description: string;
780
+ };
781
+ nbf: {
782
+ type: string;
783
+ description: string;
784
+ };
785
+ sub: {
786
+ type: string;
787
+ description: string;
788
+ };
789
+ aud: {
790
+ type: string;
791
+ description: string;
792
+ };
793
+ iss: {
794
+ type: string;
795
+ description: string;
796
+ };
797
+ jti: {
798
+ type: string;
799
+ description: string;
800
+ };
801
+ };
802
+ required: string[];
803
+ };
804
+ };
805
+ };
806
+ };
807
+ "400": {
808
+ description: string;
809
+ content: {
810
+ "application/json": {
811
+ schema: {
812
+ type: "object";
813
+ properties: {
814
+ error: {
815
+ type: string;
816
+ };
817
+ error_description: {
818
+ type: string;
819
+ };
820
+ error_uri: {
821
+ type: string;
822
+ };
823
+ };
824
+ required: string[];
825
+ };
826
+ };
827
+ };
828
+ };
829
+ };
830
+ };
831
+ };
832
+ }, jose0.JWTPayload>;
833
+ oauth2Revoke: better_auth0.StrictEndpoint<"/oauth2/revoke", {
834
+ method: "POST";
835
+ body: zod0.ZodObject<{
836
+ client_id: zod0.ZodOptional<zod0.ZodString>;
837
+ client_secret: zod0.ZodOptional<zod0.ZodString>;
838
+ token: zod0.ZodString;
839
+ token_type_hint: zod0.ZodOptional<zod0.ZodEnum<{
840
+ refresh_token: "refresh_token";
841
+ access_token: "access_token";
842
+ }>>;
843
+ }, better_auth0.$strip>;
844
+ metadata: {
845
+ allowedMediaTypes: string[];
846
+ openapi: {
847
+ description: string;
848
+ requestBody: {
849
+ required: boolean;
850
+ content: {
851
+ "application/json": {
852
+ schema: {
853
+ type: "object";
854
+ properties: {
855
+ client_id: {
856
+ type: string;
857
+ description: string;
858
+ };
859
+ client_secret: {
860
+ type: string;
861
+ description: string;
862
+ };
863
+ token: {
864
+ type: string;
865
+ description: string;
866
+ };
867
+ token_type_hint: {
868
+ type: string;
869
+ enum: string[];
870
+ description: string;
871
+ };
872
+ };
873
+ required: string[];
874
+ };
875
+ };
876
+ };
877
+ };
878
+ responses: {
879
+ "200": {
880
+ description: string;
881
+ content: {
882
+ "application/json": {
883
+ schema: {
884
+ type: "object";
885
+ description: string;
886
+ };
887
+ };
888
+ };
889
+ };
890
+ "400": {
891
+ description: string;
892
+ content: {
893
+ "application/json": {
894
+ schema: {
895
+ type: "object";
896
+ properties: {
897
+ error: {
898
+ type: string;
899
+ };
900
+ error_description: {
901
+ type: string;
902
+ };
903
+ error_uri: {
904
+ type: string;
905
+ };
906
+ };
907
+ required: string[];
908
+ };
909
+ };
910
+ };
911
+ };
912
+ };
913
+ };
914
+ };
915
+ }, null | undefined>;
916
+ oauth2UserInfo: better_auth0.StrictEndpoint<"/oauth2/userinfo", {
917
+ method: "GET";
918
+ metadata: {
919
+ openapi: {
920
+ description: string;
921
+ security: ({
922
+ bearerAuth: never[];
923
+ OAuth2?: undefined;
924
+ } | {
925
+ OAuth2: string[];
926
+ bearerAuth?: undefined;
927
+ })[];
928
+ parameters: {
929
+ name: string;
930
+ in: "header";
931
+ required: false;
932
+ schema: {
933
+ type: "string";
934
+ };
935
+ description: string;
936
+ }[];
937
+ responses: {
938
+ "200": {
939
+ description: string;
940
+ content: {
941
+ "application/json": {
942
+ schema: {
943
+ type: "object";
944
+ properties: {
945
+ sub: {
946
+ type: string;
947
+ description: string;
948
+ };
949
+ email: {
950
+ type: string;
951
+ format: string;
952
+ nullable: boolean;
953
+ description: string;
954
+ };
955
+ name: {
956
+ type: string;
957
+ nullable: boolean;
958
+ description: string;
959
+ };
960
+ picture: {
961
+ type: string;
962
+ format: string;
963
+ nullable: boolean;
964
+ description: string;
965
+ };
966
+ given_name: {
967
+ type: string;
968
+ nullable: boolean;
969
+ description: string;
970
+ };
971
+ family_name: {
972
+ type: string;
973
+ nullable: boolean;
974
+ description: string;
975
+ };
976
+ email_verified: {
977
+ type: string;
978
+ nullable: boolean;
979
+ description: string;
980
+ };
981
+ };
982
+ required: string[];
983
+ };
984
+ };
985
+ };
986
+ };
987
+ "401": {
988
+ description: string;
989
+ content: {
990
+ "application/json": {
991
+ schema: {
992
+ type: "object";
993
+ properties: {
994
+ error: {
995
+ type: string;
996
+ };
997
+ error_description: {
998
+ type: string;
999
+ };
1000
+ };
1001
+ required: string[];
1002
+ };
1003
+ };
1004
+ };
1005
+ };
1006
+ "403": {
1007
+ description: string;
1008
+ content: {
1009
+ "application/json": {
1010
+ schema: {
1011
+ type: "object";
1012
+ properties: {
1013
+ error: {
1014
+ type: string;
1015
+ };
1016
+ error_description: {
1017
+ type: string;
1018
+ };
1019
+ };
1020
+ required: string[];
1021
+ };
1022
+ };
1023
+ };
1024
+ };
1025
+ };
1026
+ };
1027
+ };
1028
+ }, {
1029
+ email?: string | undefined;
1030
+ email_verified?: boolean | undefined;
1031
+ name?: string | undefined;
1032
+ picture?: string | undefined;
1033
+ given_name?: string | undefined;
1034
+ family_name?: string | undefined;
1035
+ sub: string;
1036
+ }>;
1037
+ oauth2EndSession: better_auth0.StrictEndpoint<"/oauth2/end-session", {
1038
+ method: "GET";
1039
+ query: zod0.ZodObject<{
1040
+ id_token_hint: zod0.ZodString;
1041
+ client_id: zod0.ZodOptional<zod0.ZodString>;
1042
+ post_logout_redirect_uri: zod0.ZodOptional<zod0.ZodURL>;
1043
+ state: zod0.ZodOptional<zod0.ZodString>;
1044
+ }, better_auth0.$strip>;
1045
+ metadata: {
1046
+ openapi: {
1047
+ description: string;
1048
+ responses: {
1049
+ "200": {
1050
+ description: string;
1051
+ content: {
1052
+ "application/json": {
1053
+ schema: {
1054
+ type: "object";
1055
+ properties: {
1056
+ redirect_uri: {
1057
+ type: string;
1058
+ format: string;
1059
+ description: string;
1060
+ };
1061
+ message: {
1062
+ type: string;
1063
+ description: string;
1064
+ };
1065
+ };
1066
+ };
1067
+ };
1068
+ };
1069
+ };
1070
+ };
1071
+ };
1072
+ };
1073
+ }, {
1074
+ redirect: boolean;
1075
+ url: string;
1076
+ } | undefined>;
1077
+ registerOAuthClient: better_auth0.StrictEndpoint<"/oauth2/register", {
1078
+ method: "POST";
1079
+ body: zod0.ZodObject<{
1080
+ redirect_uris: zod0.ZodArray<zod0.ZodURL>;
1081
+ scope: zod0.ZodOptional<zod0.ZodString>;
1082
+ client_name: zod0.ZodOptional<zod0.ZodString>;
1083
+ client_uri: zod0.ZodOptional<zod0.ZodString>;
1084
+ logo_uri: zod0.ZodOptional<zod0.ZodString>;
1085
+ contacts: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
1086
+ tos_uri: zod0.ZodOptional<zod0.ZodString>;
1087
+ policy_uri: zod0.ZodOptional<zod0.ZodString>;
1088
+ software_id: zod0.ZodOptional<zod0.ZodString>;
1089
+ software_version: zod0.ZodOptional<zod0.ZodString>;
1090
+ software_statement: zod0.ZodOptional<zod0.ZodString>;
1091
+ post_logout_redirect_uris: zod0.ZodOptional<zod0.ZodArray<zod0.ZodURL>>;
1092
+ token_endpoint_auth_method: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodEnum<{
1093
+ none: "none";
1094
+ client_secret_basic: "client_secret_basic";
1095
+ client_secret_post: "client_secret_post";
1096
+ }>>>;
1097
+ grant_types: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodArray<zod0.ZodEnum<{
1098
+ authorization_code: "authorization_code";
1099
+ client_credentials: "client_credentials";
1100
+ refresh_token: "refresh_token";
1101
+ }>>>>;
1102
+ response_types: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodArray<zod0.ZodEnum<{
1103
+ code: "code";
1104
+ }>>>>;
1105
+ type: zod0.ZodOptional<zod0.ZodEnum<{
1106
+ web: "web";
1107
+ native: "native";
1108
+ "user-agent-based": "user-agent-based";
1109
+ }>>;
1110
+ subject_type: zod0.ZodOptional<zod0.ZodEnum<{
1111
+ public: "public";
1112
+ pairwise: "pairwise";
1113
+ }>>;
1114
+ }, better_auth0.$strip>;
1115
+ metadata: {
1116
+ openapi: {
1117
+ description: string;
1118
+ responses: {
1119
+ "200": {
1120
+ description: string;
1121
+ content: {
1122
+ "application/json": {
1123
+ schema: {
1124
+ type: "object";
1125
+ properties: {
1126
+ client_id: {
1127
+ type: string;
1128
+ description: string;
1129
+ };
1130
+ client_secret: {
1131
+ type: string;
1132
+ description: string;
1133
+ };
1134
+ client_secret_expires_at: {
1135
+ type: string;
1136
+ description: string;
1137
+ };
1138
+ scope: {
1139
+ type: string;
1140
+ description: string;
1141
+ };
1142
+ user_id: {
1143
+ type: string;
1144
+ description: string;
1145
+ };
1146
+ client_id_issued_at: {
1147
+ type: string;
1148
+ description: string;
1149
+ };
1150
+ client_name: {
1151
+ type: string;
1152
+ description: string;
1153
+ };
1154
+ client_uri: {
1155
+ type: string;
1156
+ description: string;
1157
+ };
1158
+ logo_uri: {
1159
+ type: string;
1160
+ description: string;
1161
+ };
1162
+ contacts: {
1163
+ type: string;
1164
+ items: {
1165
+ type: string;
1166
+ };
1167
+ description: string;
1168
+ };
1169
+ tos_uri: {
1170
+ type: string;
1171
+ description: string;
1172
+ };
1173
+ policy_uri: {
1174
+ type: string;
1175
+ description: string;
1176
+ };
1177
+ software_id: {
1178
+ type: string;
1179
+ description: string;
1180
+ };
1181
+ software_version: {
1182
+ type: string;
1183
+ description: string;
1184
+ };
1185
+ software_statement: {
1186
+ type: string;
1187
+ description: string;
1188
+ };
1189
+ redirect_uris: {
1190
+ type: string;
1191
+ items: {
1192
+ type: string;
1193
+ format: string;
1194
+ };
1195
+ description: string;
1196
+ };
1197
+ post_logout_redirect_uris: {
1198
+ type: string;
1199
+ items: {
1200
+ type: string;
1201
+ format: string;
1202
+ };
1203
+ description: string;
1204
+ };
1205
+ token_endpoint_auth_method: {
1206
+ type: string;
1207
+ description: string;
1208
+ enum: string[];
1209
+ };
1210
+ grant_types: {
1211
+ type: string;
1212
+ items: {
1213
+ type: string;
1214
+ enum: string[];
1215
+ };
1216
+ description: string;
1217
+ };
1218
+ response_types: {
1219
+ type: string;
1220
+ items: {
1221
+ type: string;
1222
+ enum: string[];
1223
+ };
1224
+ description: string;
1225
+ };
1226
+ public: {
1227
+ type: string;
1228
+ description: string;
1229
+ };
1230
+ type: {
1231
+ type: string;
1232
+ description: string;
1233
+ enum: string[];
1234
+ };
1235
+ disabled: {
1236
+ type: string;
1237
+ description: string;
1238
+ };
1239
+ };
1240
+ required: string[];
1241
+ };
1242
+ };
1243
+ };
1244
+ };
1245
+ };
1246
+ };
1247
+ };
1248
+ }, _better_auth_oauth_provider0.OAuthClient>;
1249
+ adminCreateOAuthClient: better_auth0.StrictEndpoint<"/admin/oauth2/create-client", {
1250
+ method: "POST";
1251
+ body: zod0.ZodObject<{
1252
+ redirect_uris: zod0.ZodArray<zod0.ZodURL>;
1253
+ scope: zod0.ZodOptional<zod0.ZodString>;
1254
+ client_name: zod0.ZodOptional<zod0.ZodString>;
1255
+ client_uri: zod0.ZodOptional<zod0.ZodString>;
1256
+ logo_uri: zod0.ZodOptional<zod0.ZodString>;
1257
+ contacts: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
1258
+ tos_uri: zod0.ZodOptional<zod0.ZodString>;
1259
+ policy_uri: zod0.ZodOptional<zod0.ZodString>;
1260
+ software_id: zod0.ZodOptional<zod0.ZodString>;
1261
+ software_version: zod0.ZodOptional<zod0.ZodString>;
1262
+ software_statement: zod0.ZodOptional<zod0.ZodString>;
1263
+ post_logout_redirect_uris: zod0.ZodOptional<zod0.ZodArray<zod0.ZodURL>>;
1264
+ token_endpoint_auth_method: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodEnum<{
1265
+ none: "none";
1266
+ client_secret_basic: "client_secret_basic";
1267
+ client_secret_post: "client_secret_post";
1268
+ }>>>;
1269
+ grant_types: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodArray<zod0.ZodEnum<{
1270
+ authorization_code: "authorization_code";
1271
+ client_credentials: "client_credentials";
1272
+ refresh_token: "refresh_token";
1273
+ }>>>>;
1274
+ response_types: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodArray<zod0.ZodEnum<{
1275
+ code: "code";
1276
+ }>>>>;
1277
+ type: zod0.ZodOptional<zod0.ZodEnum<{
1278
+ web: "web";
1279
+ native: "native";
1280
+ "user-agent-based": "user-agent-based";
1281
+ }>>;
1282
+ client_secret_expires_at: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodNumber]>>>;
1283
+ skip_consent: zod0.ZodOptional<zod0.ZodBoolean>;
1284
+ enable_end_session: zod0.ZodOptional<zod0.ZodBoolean>;
1285
+ require_pkce: zod0.ZodOptional<zod0.ZodBoolean>;
1286
+ subject_type: zod0.ZodOptional<zod0.ZodEnum<{
1287
+ public: "public";
1288
+ pairwise: "pairwise";
1289
+ }>>;
1290
+ metadata: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>>;
1291
+ }, better_auth0.$strip>;
1292
+ metadata: {
1293
+ SERVER_ONLY: true;
1294
+ openapi: {
1295
+ description: string;
1296
+ responses: {
1297
+ "200": {
1298
+ description: string;
1299
+ content: {
1300
+ "application/json": {
1301
+ schema: {
1302
+ type: "object";
1303
+ properties: {
1304
+ client_id: {
1305
+ type: string;
1306
+ description: string;
1307
+ };
1308
+ client_secret: {
1309
+ type: string;
1310
+ description: string;
1311
+ };
1312
+ client_secret_expires_at: {
1313
+ type: string;
1314
+ description: string;
1315
+ };
1316
+ scope: {
1317
+ type: string;
1318
+ description: string;
1319
+ };
1320
+ user_id: {
1321
+ type: string;
1322
+ description: string;
1323
+ };
1324
+ client_id_issued_at: {
1325
+ type: string;
1326
+ description: string;
1327
+ };
1328
+ client_name: {
1329
+ type: string;
1330
+ description: string;
1331
+ };
1332
+ client_uri: {
1333
+ type: string;
1334
+ description: string;
1335
+ };
1336
+ logo_uri: {
1337
+ type: string;
1338
+ description: string;
1339
+ };
1340
+ contacts: {
1341
+ type: string;
1342
+ items: {
1343
+ type: string;
1344
+ };
1345
+ description: string;
1346
+ };
1347
+ tos_uri: {
1348
+ type: string;
1349
+ description: string;
1350
+ };
1351
+ policy_uri: {
1352
+ type: string;
1353
+ description: string;
1354
+ };
1355
+ software_id: {
1356
+ type: string;
1357
+ description: string;
1358
+ };
1359
+ software_version: {
1360
+ type: string;
1361
+ description: string;
1362
+ };
1363
+ software_statement: {
1364
+ type: string;
1365
+ description: string;
1366
+ };
1367
+ redirect_uris: {
1368
+ type: string;
1369
+ items: {
1370
+ type: string;
1371
+ format: string;
1372
+ };
1373
+ description: string;
1374
+ };
1375
+ token_endpoint_auth_method: {
1376
+ type: string;
1377
+ description: string;
1378
+ enum: string[];
1379
+ };
1380
+ grant_types: {
1381
+ type: string;
1382
+ items: {
1383
+ type: string;
1384
+ enum: string[];
1385
+ };
1386
+ description: string;
1387
+ };
1388
+ response_types: {
1389
+ type: string;
1390
+ items: {
1391
+ type: string;
1392
+ enum: string[];
1393
+ };
1394
+ description: string;
1395
+ };
1396
+ public: {
1397
+ type: string;
1398
+ description: string;
1399
+ };
1400
+ type: {
1401
+ type: string;
1402
+ description: string;
1403
+ enum: string[];
1404
+ };
1405
+ disabled: {
1406
+ type: string;
1407
+ description: string;
1408
+ };
1409
+ require_pkce: {
1410
+ type: string;
1411
+ description: string;
1412
+ default: boolean;
1413
+ };
1414
+ metadata: {
1415
+ type: string;
1416
+ additionalProperties: boolean;
1417
+ nullable: boolean;
1418
+ description: string;
1419
+ };
1420
+ };
1421
+ required: string[];
1422
+ };
1423
+ };
1424
+ };
1425
+ };
1426
+ };
1427
+ };
1428
+ };
1429
+ }, _better_auth_oauth_provider0.OAuthClient>;
1430
+ createOAuthClient: better_auth0.StrictEndpoint<"/oauth2/create-client", {
1431
+ method: "POST";
1432
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
1433
+ session: {
1434
+ session: Record<string, any> & {
1435
+ id: string;
1436
+ createdAt: Date;
1437
+ updatedAt: Date;
1438
+ userId: string;
1439
+ expiresAt: Date;
1440
+ token: string;
1441
+ ipAddress?: string | null | undefined;
1442
+ userAgent?: string | null | undefined;
1443
+ };
1444
+ user: Record<string, any> & {
1445
+ id: string;
1446
+ createdAt: Date;
1447
+ updatedAt: Date;
1448
+ email: string;
1449
+ emailVerified: boolean;
1450
+ name: string;
1451
+ image?: string | null | undefined;
1452
+ };
1453
+ };
1454
+ }>)[];
1455
+ body: zod0.ZodObject<{
1456
+ redirect_uris: zod0.ZodArray<zod0.ZodURL>;
1457
+ scope: zod0.ZodOptional<zod0.ZodString>;
1458
+ client_name: zod0.ZodOptional<zod0.ZodString>;
1459
+ client_uri: zod0.ZodOptional<zod0.ZodString>;
1460
+ logo_uri: zod0.ZodOptional<zod0.ZodString>;
1461
+ contacts: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
1462
+ tos_uri: zod0.ZodOptional<zod0.ZodString>;
1463
+ policy_uri: zod0.ZodOptional<zod0.ZodString>;
1464
+ software_id: zod0.ZodOptional<zod0.ZodString>;
1465
+ software_version: zod0.ZodOptional<zod0.ZodString>;
1466
+ software_statement: zod0.ZodOptional<zod0.ZodString>;
1467
+ post_logout_redirect_uris: zod0.ZodOptional<zod0.ZodArray<zod0.ZodURL>>;
1468
+ token_endpoint_auth_method: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodEnum<{
1469
+ none: "none";
1470
+ client_secret_basic: "client_secret_basic";
1471
+ client_secret_post: "client_secret_post";
1472
+ }>>>;
1473
+ grant_types: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodArray<zod0.ZodEnum<{
1474
+ authorization_code: "authorization_code";
1475
+ client_credentials: "client_credentials";
1476
+ refresh_token: "refresh_token";
1477
+ }>>>>;
1478
+ response_types: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodArray<zod0.ZodEnum<{
1479
+ code: "code";
1480
+ }>>>>;
1481
+ type: zod0.ZodOptional<zod0.ZodEnum<{
1482
+ web: "web";
1483
+ native: "native";
1484
+ "user-agent-based": "user-agent-based";
1485
+ }>>;
1486
+ }, better_auth0.$strip>;
1487
+ metadata: {
1488
+ openapi: {
1489
+ description: string;
1490
+ responses: {
1491
+ "200": {
1492
+ description: string;
1493
+ content: {
1494
+ "application/json": {
1495
+ schema: {
1496
+ type: "object";
1497
+ properties: {
1498
+ client_id: {
1499
+ type: string;
1500
+ description: string;
1501
+ };
1502
+ client_secret: {
1503
+ type: string;
1504
+ description: string;
1505
+ };
1506
+ client_secret_expires_at: {
1507
+ type: string;
1508
+ description: string;
1509
+ };
1510
+ scope: {
1511
+ type: string;
1512
+ description: string;
1513
+ };
1514
+ user_id: {
1515
+ type: string;
1516
+ description: string;
1517
+ };
1518
+ client_id_issued_at: {
1519
+ type: string;
1520
+ description: string;
1521
+ };
1522
+ client_name: {
1523
+ type: string;
1524
+ description: string;
1525
+ };
1526
+ client_uri: {
1527
+ type: string;
1528
+ description: string;
1529
+ };
1530
+ logo_uri: {
1531
+ type: string;
1532
+ description: string;
1533
+ };
1534
+ contacts: {
1535
+ type: string;
1536
+ items: {
1537
+ type: string;
1538
+ };
1539
+ description: string;
1540
+ };
1541
+ tos_uri: {
1542
+ type: string;
1543
+ description: string;
1544
+ };
1545
+ policy_uri: {
1546
+ type: string;
1547
+ description: string;
1548
+ };
1549
+ software_id: {
1550
+ type: string;
1551
+ description: string;
1552
+ };
1553
+ software_version: {
1554
+ type: string;
1555
+ description: string;
1556
+ };
1557
+ software_statement: {
1558
+ type: string;
1559
+ description: string;
1560
+ };
1561
+ redirect_uris: {
1562
+ type: string;
1563
+ items: {
1564
+ type: string;
1565
+ format: string;
1566
+ };
1567
+ description: string;
1568
+ };
1569
+ token_endpoint_auth_method: {
1570
+ type: string;
1571
+ description: string;
1572
+ enum: string[];
1573
+ };
1574
+ grant_types: {
1575
+ type: string;
1576
+ items: {
1577
+ type: string;
1578
+ enum: string[];
1579
+ };
1580
+ description: string;
1581
+ };
1582
+ response_types: {
1583
+ type: string;
1584
+ items: {
1585
+ type: string;
1586
+ enum: string[];
1587
+ };
1588
+ description: string;
1589
+ };
1590
+ public: {
1591
+ type: string;
1592
+ description: string;
1593
+ };
1594
+ type: {
1595
+ type: string;
1596
+ description: string;
1597
+ enum: string[];
1598
+ };
1599
+ disabled: {
1600
+ type: string;
1601
+ description: string;
1602
+ };
1603
+ metadata: {
1604
+ type: string;
1605
+ additionalProperties: boolean;
1606
+ nullable: boolean;
1607
+ description: string;
1608
+ };
1609
+ };
1610
+ required: string[];
1611
+ };
1612
+ };
1613
+ };
1614
+ };
1615
+ };
1616
+ };
1617
+ };
1618
+ }, _better_auth_oauth_provider0.OAuthClient>;
1619
+ getOAuthClient: better_auth0.StrictEndpoint<"/oauth2/get-client", {
1620
+ method: "GET";
1621
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
1622
+ session: {
1623
+ session: Record<string, any> & {
1624
+ id: string;
1625
+ createdAt: Date;
1626
+ updatedAt: Date;
1627
+ userId: string;
1628
+ expiresAt: Date;
1629
+ token: string;
1630
+ ipAddress?: string | null | undefined;
1631
+ userAgent?: string | null | undefined;
1632
+ };
1633
+ user: Record<string, any> & {
1634
+ id: string;
1635
+ createdAt: Date;
1636
+ updatedAt: Date;
1637
+ email: string;
1638
+ emailVerified: boolean;
1639
+ name: string;
1640
+ image?: string | null | undefined;
1641
+ };
1642
+ };
1643
+ }>)[];
1644
+ query: zod0.ZodObject<{
1645
+ client_id: zod0.ZodString;
1646
+ }, better_auth0.$strip>;
1647
+ metadata: {
1648
+ openapi: {
1649
+ description: string;
1650
+ };
1651
+ };
1652
+ }, _better_auth_oauth_provider0.OAuthClient>;
1653
+ getOAuthClientPublic: better_auth0.StrictEndpoint<"/oauth2/public-client", {
1654
+ method: "GET";
1655
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
1656
+ session: {
1657
+ session: Record<string, any> & {
1658
+ id: string;
1659
+ createdAt: Date;
1660
+ updatedAt: Date;
1661
+ userId: string;
1662
+ expiresAt: Date;
1663
+ token: string;
1664
+ ipAddress?: string | null | undefined;
1665
+ userAgent?: string | null | undefined;
1666
+ };
1667
+ user: Record<string, any> & {
1668
+ id: string;
1669
+ createdAt: Date;
1670
+ updatedAt: Date;
1671
+ email: string;
1672
+ emailVerified: boolean;
1673
+ name: string;
1674
+ image?: string | null | undefined;
1675
+ };
1676
+ };
1677
+ }>)[];
1678
+ query: zod0.ZodObject<{
1679
+ client_id: zod0.ZodString;
1680
+ }, better_auth0.$strip>;
1681
+ metadata: {
1682
+ openapi: {
1683
+ description: string;
1684
+ };
1685
+ };
1686
+ }, _better_auth_oauth_provider0.OAuthClient>;
1687
+ getOAuthClients: better_auth0.StrictEndpoint<"/oauth2/get-clients", {
1688
+ method: "GET";
1689
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
1690
+ session: {
1691
+ session: Record<string, any> & {
1692
+ id: string;
1693
+ createdAt: Date;
1694
+ updatedAt: Date;
1695
+ userId: string;
1696
+ expiresAt: Date;
1697
+ token: string;
1698
+ ipAddress?: string | null | undefined;
1699
+ userAgent?: string | null | undefined;
1700
+ };
1701
+ user: Record<string, any> & {
1702
+ id: string;
1703
+ createdAt: Date;
1704
+ updatedAt: Date;
1705
+ email: string;
1706
+ emailVerified: boolean;
1707
+ name: string;
1708
+ image?: string | null | undefined;
1709
+ };
1710
+ };
1711
+ }>)[];
1712
+ metadata: {
1713
+ openapi: {
1714
+ description: string;
1715
+ };
1716
+ };
1717
+ }, _better_auth_oauth_provider0.OAuthClient[] | null>;
1718
+ adminUpdateOAuthClient: better_auth0.StrictEndpoint<"/admin/oauth2/update-client", {
1719
+ method: "PATCH";
1720
+ body: zod0.ZodObject<{
1721
+ client_id: zod0.ZodString;
1722
+ update: zod0.ZodObject<{
1723
+ redirect_uris: zod0.ZodOptional<zod0.ZodArray<zod0.ZodURL>>;
1724
+ scope: zod0.ZodOptional<zod0.ZodString>;
1725
+ client_name: zod0.ZodOptional<zod0.ZodString>;
1726
+ client_uri: zod0.ZodOptional<zod0.ZodString>;
1727
+ logo_uri: zod0.ZodOptional<zod0.ZodString>;
1728
+ contacts: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
1729
+ tos_uri: zod0.ZodOptional<zod0.ZodString>;
1730
+ policy_uri: zod0.ZodOptional<zod0.ZodString>;
1731
+ software_id: zod0.ZodOptional<zod0.ZodString>;
1732
+ software_version: zod0.ZodOptional<zod0.ZodString>;
1733
+ software_statement: zod0.ZodOptional<zod0.ZodString>;
1734
+ post_logout_redirect_uris: zod0.ZodOptional<zod0.ZodArray<zod0.ZodURL>>;
1735
+ grant_types: zod0.ZodOptional<zod0.ZodArray<zod0.ZodEnum<{
1736
+ authorization_code: "authorization_code";
1737
+ client_credentials: "client_credentials";
1738
+ refresh_token: "refresh_token";
1739
+ }>>>;
1740
+ response_types: zod0.ZodOptional<zod0.ZodArray<zod0.ZodEnum<{
1741
+ code: "code";
1742
+ }>>>;
1743
+ type: zod0.ZodOptional<zod0.ZodEnum<{
1744
+ web: "web";
1745
+ native: "native";
1746
+ "user-agent-based": "user-agent-based";
1747
+ }>>;
1748
+ client_secret_expires_at: zod0.ZodOptional<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodNumber]>>;
1749
+ skip_consent: zod0.ZodOptional<zod0.ZodBoolean>;
1750
+ enable_end_session: zod0.ZodOptional<zod0.ZodBoolean>;
1751
+ metadata: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>>;
1752
+ }, better_auth0.$strip>;
1753
+ }, better_auth0.$strip>;
1754
+ metadata: {
1755
+ SERVER_ONLY: true;
1756
+ openapi: {
1757
+ description: string;
1758
+ };
1759
+ };
1760
+ }, _better_auth_oauth_provider0.OAuthClient>;
1761
+ updateOAuthClient: better_auth0.StrictEndpoint<"/oauth2/update-client", {
1762
+ method: "POST";
1763
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
1764
+ session: {
1765
+ session: Record<string, any> & {
1766
+ id: string;
1767
+ createdAt: Date;
1768
+ updatedAt: Date;
1769
+ userId: string;
1770
+ expiresAt: Date;
1771
+ token: string;
1772
+ ipAddress?: string | null | undefined;
1773
+ userAgent?: string | null | undefined;
1774
+ };
1775
+ user: Record<string, any> & {
1776
+ id: string;
1777
+ createdAt: Date;
1778
+ updatedAt: Date;
1779
+ email: string;
1780
+ emailVerified: boolean;
1781
+ name: string;
1782
+ image?: string | null | undefined;
1783
+ };
1784
+ };
1785
+ }>)[];
1786
+ body: zod0.ZodObject<{
1787
+ client_id: zod0.ZodString;
1788
+ update: zod0.ZodObject<{
1789
+ redirect_uris: zod0.ZodOptional<zod0.ZodArray<zod0.ZodURL>>;
1790
+ scope: zod0.ZodOptional<zod0.ZodString>;
1791
+ client_name: zod0.ZodOptional<zod0.ZodString>;
1792
+ client_uri: zod0.ZodOptional<zod0.ZodString>;
1793
+ logo_uri: zod0.ZodOptional<zod0.ZodString>;
1794
+ contacts: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
1795
+ tos_uri: zod0.ZodOptional<zod0.ZodString>;
1796
+ policy_uri: zod0.ZodOptional<zod0.ZodString>;
1797
+ software_id: zod0.ZodOptional<zod0.ZodString>;
1798
+ software_version: zod0.ZodOptional<zod0.ZodString>;
1799
+ software_statement: zod0.ZodOptional<zod0.ZodString>;
1800
+ post_logout_redirect_uris: zod0.ZodOptional<zod0.ZodArray<zod0.ZodURL>>;
1801
+ grant_types: zod0.ZodOptional<zod0.ZodArray<zod0.ZodEnum<{
1802
+ authorization_code: "authorization_code";
1803
+ client_credentials: "client_credentials";
1804
+ refresh_token: "refresh_token";
1805
+ }>>>;
1806
+ response_types: zod0.ZodOptional<zod0.ZodArray<zod0.ZodEnum<{
1807
+ code: "code";
1808
+ }>>>;
1809
+ type: zod0.ZodOptional<zod0.ZodEnum<{
1810
+ web: "web";
1811
+ native: "native";
1812
+ "user-agent-based": "user-agent-based";
1813
+ }>>;
1814
+ }, better_auth0.$strip>;
1815
+ }, better_auth0.$strip>;
1816
+ metadata: {
1817
+ openapi: {
1818
+ description: string;
1819
+ };
1820
+ };
1821
+ }, _better_auth_oauth_provider0.OAuthClient>;
1822
+ rotateClientSecret: better_auth0.StrictEndpoint<"/oauth2/client/rotate-secret", {
1823
+ method: "POST";
1824
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
1825
+ session: {
1826
+ session: Record<string, any> & {
1827
+ id: string;
1828
+ createdAt: Date;
1829
+ updatedAt: Date;
1830
+ userId: string;
1831
+ expiresAt: Date;
1832
+ token: string;
1833
+ ipAddress?: string | null | undefined;
1834
+ userAgent?: string | null | undefined;
1835
+ };
1836
+ user: Record<string, any> & {
1837
+ id: string;
1838
+ createdAt: Date;
1839
+ updatedAt: Date;
1840
+ email: string;
1841
+ emailVerified: boolean;
1842
+ name: string;
1843
+ image?: string | null | undefined;
1844
+ };
1845
+ };
1846
+ }>)[];
1847
+ body: zod0.ZodObject<{
1848
+ client_id: zod0.ZodString;
1849
+ }, better_auth0.$strip>;
1850
+ metadata: {
1851
+ openapi: {
1852
+ description: string;
1853
+ };
1854
+ };
1855
+ }, _better_auth_oauth_provider0.OAuthClient>;
1856
+ deleteOAuthClient: better_auth0.StrictEndpoint<"/oauth2/delete-client", {
1857
+ method: "POST";
1858
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
1859
+ session: {
1860
+ session: Record<string, any> & {
1861
+ id: string;
1862
+ createdAt: Date;
1863
+ updatedAt: Date;
1864
+ userId: string;
1865
+ expiresAt: Date;
1866
+ token: string;
1867
+ ipAddress?: string | null | undefined;
1868
+ userAgent?: string | null | undefined;
1869
+ };
1870
+ user: Record<string, any> & {
1871
+ id: string;
1872
+ createdAt: Date;
1873
+ updatedAt: Date;
1874
+ email: string;
1875
+ emailVerified: boolean;
1876
+ name: string;
1877
+ image?: string | null | undefined;
1878
+ };
1879
+ };
1880
+ }>)[];
1881
+ body: zod0.ZodObject<{
1882
+ client_id: zod0.ZodString;
1883
+ }, better_auth0.$strip>;
1884
+ metadata: {
1885
+ openapi: {
1886
+ description: string;
1887
+ };
1888
+ };
1889
+ }, void>;
1890
+ getOAuthConsent: better_auth0.StrictEndpoint<"/oauth2/get-consent", {
1891
+ method: "GET";
1892
+ query: zod0.ZodObject<{
1893
+ id: zod0.ZodString;
1894
+ }, better_auth0.$strip>;
1895
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
1896
+ session: {
1897
+ session: Record<string, any> & {
1898
+ id: string;
1899
+ createdAt: Date;
1900
+ updatedAt: Date;
1901
+ userId: string;
1902
+ expiresAt: Date;
1903
+ token: string;
1904
+ ipAddress?: string | null | undefined;
1905
+ userAgent?: string | null | undefined;
1906
+ };
1907
+ user: Record<string, any> & {
1908
+ id: string;
1909
+ createdAt: Date;
1910
+ updatedAt: Date;
1911
+ email: string;
1912
+ emailVerified: boolean;
1913
+ name: string;
1914
+ image?: string | null | undefined;
1915
+ };
1916
+ };
1917
+ }>)[];
1918
+ metadata: {
1919
+ openapi: {
1920
+ description: string;
1921
+ };
1922
+ };
1923
+ }, _better_auth_oauth_provider0.OAuthConsent<_better_auth_oauth_provider0.Scope[]>>;
1924
+ getOAuthConsents: better_auth0.StrictEndpoint<"/oauth2/get-consents", {
1925
+ method: "GET";
1926
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
1927
+ session: {
1928
+ session: Record<string, any> & {
1929
+ id: string;
1930
+ createdAt: Date;
1931
+ updatedAt: Date;
1932
+ userId: string;
1933
+ expiresAt: Date;
1934
+ token: string;
1935
+ ipAddress?: string | null | undefined;
1936
+ userAgent?: string | null | undefined;
1937
+ };
1938
+ user: Record<string, any> & {
1939
+ id: string;
1940
+ createdAt: Date;
1941
+ updatedAt: Date;
1942
+ email: string;
1943
+ emailVerified: boolean;
1944
+ name: string;
1945
+ image?: string | null | undefined;
1946
+ };
1947
+ };
1948
+ }>)[];
1949
+ metadata: {
1950
+ openapi: {
1951
+ description: string;
1952
+ };
1953
+ };
1954
+ }, _better_auth_oauth_provider0.OAuthConsent<_better_auth_oauth_provider0.Scope[]>[]>;
1955
+ updateOAuthConsent: better_auth0.StrictEndpoint<"/oauth2/update-consent", {
1956
+ method: "POST";
1957
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
1958
+ session: {
1959
+ session: Record<string, any> & {
1960
+ id: string;
1961
+ createdAt: Date;
1962
+ updatedAt: Date;
1963
+ userId: string;
1964
+ expiresAt: Date;
1965
+ token: string;
1966
+ ipAddress?: string | null | undefined;
1967
+ userAgent?: string | null | undefined;
1968
+ };
1969
+ user: Record<string, any> & {
1970
+ id: string;
1971
+ createdAt: Date;
1972
+ updatedAt: Date;
1973
+ email: string;
1974
+ emailVerified: boolean;
1975
+ name: string;
1976
+ image?: string | null | undefined;
1977
+ };
1978
+ };
1979
+ }>)[];
1980
+ body: zod0.ZodObject<{
1981
+ id: zod0.ZodString;
1982
+ update: zod0.ZodObject<{
1983
+ scopes: zod0.ZodArray<zod0.ZodString>;
1984
+ }, better_auth0.$strip>;
1985
+ }, better_auth0.$strip>;
1986
+ metadata: {
1987
+ openapi: {
1988
+ description: string;
1989
+ };
1990
+ };
1991
+ }, _better_auth_oauth_provider0.OAuthConsent<_better_auth_oauth_provider0.Scope[]> | null>;
1992
+ deleteOAuthConsent: better_auth0.StrictEndpoint<"/oauth2/delete-consent", {
1993
+ method: "POST";
1994
+ use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
1995
+ session: {
1996
+ session: Record<string, any> & {
1997
+ id: string;
1998
+ createdAt: Date;
1999
+ updatedAt: Date;
2000
+ userId: string;
2001
+ expiresAt: Date;
2002
+ token: string;
2003
+ ipAddress?: string | null | undefined;
2004
+ userAgent?: string | null | undefined;
2005
+ };
2006
+ user: Record<string, any> & {
2007
+ id: string;
2008
+ createdAt: Date;
2009
+ updatedAt: Date;
2010
+ email: string;
2011
+ emailVerified: boolean;
2012
+ name: string;
2013
+ image?: string | null | undefined;
2014
+ };
2015
+ };
2016
+ }>)[];
2017
+ body: zod0.ZodObject<{
2018
+ id: zod0.ZodString;
2019
+ }, better_auth0.$strip>;
2020
+ metadata: {
2021
+ openapi: {
2022
+ description: string;
2023
+ };
2024
+ };
2025
+ }, void>;
2026
+ };
2027
+ schema: {
2028
+ oauthClient: {
2029
+ modelName: string;
2030
+ fields: {
2031
+ clientId: {
2032
+ type: "string";
2033
+ unique: true;
2034
+ required: true;
2035
+ };
2036
+ clientSecret: {
2037
+ type: "string";
2038
+ required: false;
2039
+ };
2040
+ disabled: {
2041
+ type: "boolean";
2042
+ defaultValue: false;
2043
+ required: false;
2044
+ };
2045
+ skipConsent: {
2046
+ type: "boolean";
2047
+ required: false;
2048
+ };
2049
+ enableEndSession: {
2050
+ type: "boolean";
2051
+ required: false;
2052
+ };
2053
+ subjectType: {
2054
+ type: "string";
2055
+ required: false;
2056
+ };
2057
+ scopes: {
2058
+ type: "string[]";
2059
+ required: false;
2060
+ };
2061
+ userId: {
2062
+ type: "string";
2063
+ required: false;
2064
+ references: {
2065
+ model: string;
2066
+ field: string;
2067
+ };
2068
+ };
2069
+ createdAt: {
2070
+ type: "date";
2071
+ required: false;
2072
+ };
2073
+ updatedAt: {
2074
+ type: "date";
2075
+ required: false;
2076
+ };
2077
+ name: {
2078
+ type: "string";
2079
+ required: false;
2080
+ };
2081
+ uri: {
2082
+ type: "string";
2083
+ required: false;
2084
+ };
2085
+ icon: {
2086
+ type: "string";
2087
+ required: false;
2088
+ };
2089
+ contacts: {
2090
+ type: "string[]";
2091
+ required: false;
2092
+ };
2093
+ tos: {
2094
+ type: "string";
2095
+ required: false;
2096
+ };
2097
+ policy: {
2098
+ type: "string";
2099
+ required: false;
2100
+ };
2101
+ softwareId: {
2102
+ type: "string";
2103
+ required: false;
2104
+ };
2105
+ softwareVersion: {
2106
+ type: "string";
2107
+ required: false;
2108
+ };
2109
+ softwareStatement: {
2110
+ type: "string";
2111
+ required: false;
2112
+ };
2113
+ redirectUris: {
2114
+ type: "string[]";
2115
+ required: true;
2116
+ };
2117
+ postLogoutRedirectUris: {
2118
+ type: "string[]";
2119
+ required: false;
2120
+ };
2121
+ tokenEndpointAuthMethod: {
2122
+ type: "string";
2123
+ required: false;
2124
+ };
2125
+ grantTypes: {
2126
+ type: "string[]";
2127
+ required: false;
2128
+ };
2129
+ responseTypes: {
2130
+ type: "string[]";
2131
+ required: false;
2132
+ };
2133
+ public: {
2134
+ type: "boolean";
2135
+ required: false;
2136
+ };
2137
+ type: {
2138
+ type: "string";
2139
+ required: false;
2140
+ };
2141
+ requirePKCE: {
2142
+ type: "boolean";
2143
+ required: false;
2144
+ };
2145
+ referenceId: {
2146
+ type: "string";
2147
+ required: false;
2148
+ };
2149
+ metadata: {
2150
+ type: "json";
2151
+ required: false;
2152
+ };
2153
+ };
2154
+ };
2155
+ oauthRefreshToken: {
2156
+ fields: {
2157
+ token: {
2158
+ type: "string";
2159
+ required: true;
2160
+ };
2161
+ clientId: {
2162
+ type: "string";
2163
+ required: true;
2164
+ references: {
2165
+ model: string;
2166
+ field: string;
2167
+ };
2168
+ };
2169
+ sessionId: {
2170
+ type: "string";
2171
+ required: false;
2172
+ references: {
2173
+ model: string;
2174
+ field: string;
2175
+ onDelete: "set null";
2176
+ };
2177
+ };
2178
+ userId: {
2179
+ type: "string";
2180
+ required: true;
2181
+ references: {
2182
+ model: string;
2183
+ field: string;
2184
+ };
2185
+ };
2186
+ referenceId: {
2187
+ type: "string";
2188
+ required: false;
2189
+ };
2190
+ expiresAt: {
2191
+ type: "date";
2192
+ };
2193
+ createdAt: {
2194
+ type: "date";
2195
+ };
2196
+ revoked: {
2197
+ type: "date";
2198
+ required: false;
2199
+ };
2200
+ authTime: {
2201
+ type: "date";
2202
+ required: false;
2203
+ };
2204
+ scopes: {
2205
+ type: "string[]";
2206
+ required: true;
2207
+ };
2208
+ };
2209
+ };
2210
+ oauthAccessToken: {
2211
+ modelName: string;
2212
+ fields: {
2213
+ token: {
2214
+ type: "string";
2215
+ unique: true;
2216
+ };
2217
+ clientId: {
2218
+ type: "string";
2219
+ required: true;
2220
+ references: {
2221
+ model: string;
2222
+ field: string;
2223
+ };
2224
+ };
2225
+ sessionId: {
2226
+ type: "string";
2227
+ required: false;
2228
+ references: {
2229
+ model: string;
2230
+ field: string;
2231
+ onDelete: "set null";
2232
+ };
2233
+ };
2234
+ userId: {
2235
+ type: "string";
2236
+ required: false;
2237
+ references: {
2238
+ model: string;
2239
+ field: string;
2240
+ };
2241
+ };
2242
+ referenceId: {
2243
+ type: "string";
2244
+ required: false;
2245
+ };
2246
+ refreshId: {
2247
+ type: "string";
2248
+ required: false;
2249
+ references: {
2250
+ model: string;
2251
+ field: string;
2252
+ };
2253
+ };
2254
+ expiresAt: {
2255
+ type: "date";
2256
+ };
2257
+ createdAt: {
2258
+ type: "date";
2259
+ };
2260
+ scopes: {
2261
+ type: "string[]";
2262
+ required: true;
2263
+ };
2264
+ };
2265
+ };
2266
+ oauthConsent: {
2267
+ modelName: string;
2268
+ fields: {
2269
+ clientId: {
2270
+ type: "string";
2271
+ required: true;
2272
+ references: {
2273
+ model: string;
2274
+ field: string;
2275
+ };
2276
+ };
2277
+ userId: {
2278
+ type: "string";
2279
+ required: false;
2280
+ references: {
2281
+ model: string;
2282
+ field: string;
2283
+ };
2284
+ };
2285
+ referenceId: {
2286
+ type: "string";
2287
+ required: false;
2288
+ };
2289
+ scopes: {
2290
+ type: "string[]";
2291
+ required: true;
2292
+ };
2293
+ createdAt: {
2294
+ type: "date";
2295
+ };
2296
+ updatedAt: {
2297
+ type: "date";
2298
+ };
2299
+ };
2300
+ };
2301
+ };
2302
+ rateLimit: ({
2303
+ pathMatcher: (path: string) => path is "/oauth2/token";
2304
+ window: number;
2305
+ max: number;
2306
+ } | {
2307
+ pathMatcher: (path: string) => path is "/oauth2/authorize";
2308
+ window: number;
2309
+ max: number;
2310
+ } | {
2311
+ pathMatcher: (path: string) => path is "/oauth2/introspect";
2312
+ window: number;
2313
+ max: number;
2314
+ } | {
2315
+ pathMatcher: (path: string) => path is "/oauth2/revoke";
2316
+ window: number;
2317
+ max: number;
2318
+ } | {
2319
+ pathMatcher: (path: string) => path is "/oauth2/register";
2320
+ window: number;
2321
+ max: number;
2322
+ } | {
2323
+ pathMatcher: (path: string) => path is "/oauth2/userinfo";
2324
+ window: number;
2325
+ max: number;
2326
+ })[];
96
2327
  }, better_auth_plugins0.DefaultOrganizationPlugin<{
97
2328
  schema: {
98
2329
  invitation: {