@teamblind/axeda-better-auth 0.0.0-stage → 0.1.0-alpha.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.
@@ -0,0 +1,1954 @@
1
+ import { type Axeda, type AxedaOptions, type AxedaPersistence, type Clock, type InvitationMessage } from '@teamblind/axeda-core';
2
+ /** Cómo hacer llegar una invitación. Sin esto las invitaciones están desactivadas. */
3
+ export interface InvitationDeliveryOptions {
4
+ /**
5
+ * El enlace de aceptación a partir del secreto. Lo construye la aplicación con su URL base
6
+ * configurada: nunca debe salir de la cabecera `Host` de una petición.
7
+ */
8
+ readonly acceptUrl: (token: string) => string;
9
+ /** Envía el correo. Recibe datos, no HTML: escapa lo que muestres. */
10
+ readonly send: (message: InvitationMessage & {
11
+ readonly link: string;
12
+ }) => Promise<void>;
13
+ }
14
+ export interface AxedaPluginOptions extends AxedaOptions {
15
+ /** Solo para pruebas. */
16
+ readonly clock?: Clock;
17
+ /** Cómo enviar las invitaciones. Sin esto están desactivadas. */
18
+ readonly invitationDelivery?: InvitationDeliveryOptions;
19
+ /**
20
+ * Publica `GET /axeda/public/identity` (nombre y logos de una compañía o negocio activo, sin
21
+ * sesión). Desactivado por defecto: es el único endpoint que no exige iniciar sesión.
22
+ */
23
+ readonly publicIdentity?: boolean;
24
+ }
25
+ /**
26
+ * Plugin de Axeda para Better Auth: esquema, endpoints `/axeda/*`, el hook de borrado de usuario
27
+ * y la conexión de la persistencia de Axeda al adaptador de base de datos de Better Auth.
28
+ *
29
+ * ```ts
30
+ * const axedaPlugin = axeda({ permissions: ['invoice:read'], roles: { viewer: ['invoice:read'] } });
31
+ * const auth = betterAuth({ plugins: [axedaPlugin] });
32
+ * await axedaPlugin.start(); // tras migrar la base de datos
33
+ * ```
34
+ */
35
+ export declare function axeda(options: AxedaPluginOptions): {
36
+ id: "axeda";
37
+ schema: {
38
+ user: {
39
+ fields: {
40
+ authzVersion: {
41
+ type: "number";
42
+ required: false;
43
+ defaultValue: number;
44
+ input: false;
45
+ };
46
+ banned: {
47
+ type: "boolean";
48
+ required: false;
49
+ defaultValue: false;
50
+ input: false;
51
+ };
52
+ banReason: {
53
+ type: "string";
54
+ required: false;
55
+ input: false;
56
+ };
57
+ banExpires: {
58
+ type: "date";
59
+ required: false;
60
+ input: false;
61
+ };
62
+ };
63
+ };
64
+ axedaRole: {
65
+ fields: {
66
+ key: {
67
+ type: "string";
68
+ required: true;
69
+ unique: true;
70
+ input: false;
71
+ };
72
+ name: {
73
+ type: "string";
74
+ required: true;
75
+ input: false;
76
+ };
77
+ description: {
78
+ type: "string";
79
+ required: false;
80
+ input: false;
81
+ };
82
+ permissions: {
83
+ type: "string[]";
84
+ required: true;
85
+ input: false;
86
+ };
87
+ requireMfa: {
88
+ type: "boolean";
89
+ required: true;
90
+ defaultValue: false;
91
+ input: false;
92
+ };
93
+ status: {
94
+ type: "string";
95
+ required: true;
96
+ defaultValue: string;
97
+ input: false;
98
+ };
99
+ managed: {
100
+ type: "boolean";
101
+ required: true;
102
+ defaultValue: false;
103
+ input: false;
104
+ };
105
+ version: {
106
+ type: "number";
107
+ required: true;
108
+ defaultValue: number;
109
+ input: false;
110
+ };
111
+ createdAt: {
112
+ type: "date";
113
+ required: true;
114
+ input: false;
115
+ };
116
+ updatedAt: {
117
+ type: "date";
118
+ required: true;
119
+ input: false;
120
+ };
121
+ };
122
+ };
123
+ axedaAssignment: {
124
+ fields: {
125
+ userId: {
126
+ type: "string";
127
+ required: true;
128
+ input: false;
129
+ references: {
130
+ model: string;
131
+ field: string;
132
+ onDelete: "cascade";
133
+ };
134
+ };
135
+ roleId: {
136
+ type: "string";
137
+ required: true;
138
+ input: false;
139
+ references: {
140
+ model: "axedaRole";
141
+ field: string;
142
+ onDelete: "cascade";
143
+ };
144
+ };
145
+ scopeType: {
146
+ type: "string";
147
+ required: true;
148
+ input: false;
149
+ };
150
+ scopeId: {
151
+ type: "string";
152
+ required: true;
153
+ input: false;
154
+ };
155
+ grantedBy: {
156
+ type: "string";
157
+ required: false;
158
+ input: false;
159
+ };
160
+ createdAt: {
161
+ type: "date";
162
+ required: true;
163
+ input: false;
164
+ };
165
+ expiresAt: {
166
+ type: "date";
167
+ required: false;
168
+ input: false;
169
+ };
170
+ };
171
+ indexes: ({
172
+ fields: [string, string, string, string];
173
+ unique: true;
174
+ } | {
175
+ fields: [string, string];
176
+ unique?: never;
177
+ })[];
178
+ };
179
+ axedaState: {
180
+ fields: {
181
+ key: {
182
+ type: "string";
183
+ required: true;
184
+ unique: true;
185
+ input: false;
186
+ };
187
+ version: {
188
+ type: "number";
189
+ required: true;
190
+ defaultValue: number;
191
+ input: false;
192
+ };
193
+ };
194
+ };
195
+ axedaAudit: {
196
+ fields: {
197
+ actorId: {
198
+ type: "string";
199
+ required: false;
200
+ input: false;
201
+ };
202
+ action: {
203
+ type: "string";
204
+ required: true;
205
+ input: false;
206
+ };
207
+ targetType: {
208
+ type: "string";
209
+ required: true;
210
+ input: false;
211
+ };
212
+ targetId: {
213
+ type: "string";
214
+ required: false;
215
+ input: false;
216
+ };
217
+ scopeType: {
218
+ type: "string";
219
+ required: false;
220
+ input: false;
221
+ };
222
+ scopeId: {
223
+ type: "string";
224
+ required: false;
225
+ input: false;
226
+ };
227
+ outcome: {
228
+ type: "string";
229
+ required: true;
230
+ input: false;
231
+ };
232
+ ip: {
233
+ type: "string";
234
+ required: false;
235
+ input: false;
236
+ };
237
+ userAgent: {
238
+ type: "string";
239
+ required: false;
240
+ input: false;
241
+ };
242
+ metadata: {
243
+ type: "json";
244
+ required: true;
245
+ input: false;
246
+ };
247
+ at: {
248
+ type: "date";
249
+ required: true;
250
+ input: false;
251
+ };
252
+ };
253
+ indexes: ({
254
+ fields: [string];
255
+ } | {
256
+ fields: [string, string];
257
+ })[];
258
+ };
259
+ axedaCompany: {
260
+ fields: {
261
+ slug: {
262
+ type: "string";
263
+ required: true;
264
+ unique: true;
265
+ input: false;
266
+ };
267
+ name: {
268
+ type: "string";
269
+ required: true;
270
+ input: false;
271
+ };
272
+ legalName: {
273
+ type: "string";
274
+ required: false;
275
+ input: false;
276
+ };
277
+ logoUrl: {
278
+ type: "string";
279
+ required: false;
280
+ input: false;
281
+ };
282
+ faviconUrl: {
283
+ type: "string";
284
+ required: false;
285
+ input: false;
286
+ };
287
+ status: {
288
+ type: "string";
289
+ required: true;
290
+ defaultValue: string;
291
+ input: false;
292
+ };
293
+ metadata: {
294
+ type: "json";
295
+ required: true;
296
+ input: false;
297
+ };
298
+ version: {
299
+ type: "number";
300
+ required: true;
301
+ defaultValue: number;
302
+ input: false;
303
+ };
304
+ deletedAt: {
305
+ type: "date";
306
+ required: false;
307
+ input: false;
308
+ };
309
+ createdAt: {
310
+ type: "date";
311
+ required: true;
312
+ input: false;
313
+ };
314
+ updatedAt: {
315
+ type: "date";
316
+ required: true;
317
+ input: false;
318
+ };
319
+ };
320
+ indexes: {
321
+ fields: [string];
322
+ }[];
323
+ };
324
+ axedaBusiness: {
325
+ fields: {
326
+ companyId: {
327
+ type: "string";
328
+ required: true;
329
+ input: false;
330
+ references: {
331
+ model: "axedaCompany";
332
+ field: string;
333
+ onDelete: "cascade";
334
+ };
335
+ };
336
+ slug: {
337
+ type: "string";
338
+ required: true;
339
+ input: false;
340
+ };
341
+ name: {
342
+ type: "string";
343
+ required: true;
344
+ input: false;
345
+ };
346
+ logoUrl: {
347
+ type: "string";
348
+ required: false;
349
+ input: false;
350
+ };
351
+ faviconUrl: {
352
+ type: "string";
353
+ required: false;
354
+ input: false;
355
+ };
356
+ status: {
357
+ type: "string";
358
+ required: true;
359
+ defaultValue: string;
360
+ input: false;
361
+ };
362
+ metadata: {
363
+ type: "json";
364
+ required: true;
365
+ input: false;
366
+ };
367
+ version: {
368
+ type: "number";
369
+ required: true;
370
+ defaultValue: number;
371
+ input: false;
372
+ };
373
+ deletedAt: {
374
+ type: "date";
375
+ required: false;
376
+ input: false;
377
+ };
378
+ createdAt: {
379
+ type: "date";
380
+ required: true;
381
+ input: false;
382
+ };
383
+ updatedAt: {
384
+ type: "date";
385
+ required: true;
386
+ input: false;
387
+ };
388
+ };
389
+ indexes: ({
390
+ fields: [string, string];
391
+ unique: true;
392
+ } | {
393
+ fields: [string];
394
+ unique?: never;
395
+ })[];
396
+ };
397
+ axedaInvitation: {
398
+ fields: {
399
+ email: {
400
+ type: "string";
401
+ required: true;
402
+ input: false;
403
+ };
404
+ scopeType: {
405
+ type: "string";
406
+ required: true;
407
+ input: false;
408
+ };
409
+ scopeId: {
410
+ type: "string";
411
+ required: true;
412
+ input: false;
413
+ };
414
+ roleIds: {
415
+ type: "string[]";
416
+ required: true;
417
+ input: false;
418
+ };
419
+ invitedBy: {
420
+ type: "string";
421
+ required: true;
422
+ input: false;
423
+ };
424
+ secretHash: {
425
+ type: "string";
426
+ required: true;
427
+ input: false;
428
+ };
429
+ expiresAt: {
430
+ type: "date";
431
+ required: true;
432
+ input: false;
433
+ };
434
+ acceptedAt: {
435
+ type: "date";
436
+ required: false;
437
+ input: false;
438
+ };
439
+ revokedAt: {
440
+ type: "date";
441
+ required: false;
442
+ input: false;
443
+ };
444
+ pendingKey: {
445
+ type: "string";
446
+ required: true;
447
+ unique: true;
448
+ input: false;
449
+ };
450
+ consumed: {
451
+ type: "number";
452
+ required: true;
453
+ defaultValue: number;
454
+ input: false;
455
+ };
456
+ createdAt: {
457
+ type: "date";
458
+ required: true;
459
+ input: false;
460
+ };
461
+ };
462
+ indexes: ({
463
+ fields: [string, string];
464
+ } | {
465
+ fields: [string];
466
+ })[];
467
+ };
468
+ };
469
+ endpoints: {
470
+ axedaPublicIdentity: import("better-call").StrictEndpoint<"/axeda/public/identity", {
471
+ method: "GET";
472
+ query: import("zod").ZodObject<{
473
+ company: import("zod").ZodString;
474
+ business: import("zod").ZodOptional<import("zod").ZodString>;
475
+ }, import("zod/v4/core").$strict>;
476
+ metadata: {
477
+ axeda: {
478
+ public: boolean;
479
+ requires: string;
480
+ scope: "own";
481
+ };
482
+ };
483
+ }, import("@teamblind/axeda-core").PublicIdentity>;
484
+ axedaUserList: import("better-call").StrictEndpoint<"/axeda/user/list", {
485
+ method: "GET";
486
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
487
+ session: {
488
+ session: Record<string, any> & {
489
+ id: string;
490
+ createdAt: Date;
491
+ updatedAt: Date;
492
+ userId: string;
493
+ expiresAt: Date;
494
+ token: string;
495
+ ipAddress?: string | null | undefined;
496
+ userAgent?: string | null | undefined;
497
+ };
498
+ user: Record<string, any> & {
499
+ id: string;
500
+ createdAt: Date;
501
+ updatedAt: Date;
502
+ email: string;
503
+ emailVerified: boolean;
504
+ name: string;
505
+ image?: string | null | undefined;
506
+ };
507
+ };
508
+ }>>[];
509
+ query: import("zod").ZodObject<{
510
+ emailPrefix: import("zod").ZodOptional<import("zod").ZodString>;
511
+ banned: import("zod").ZodOptional<import("zod").ZodEnum<{
512
+ true: "true";
513
+ false: "false";
514
+ }>>;
515
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
516
+ limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
517
+ }, import("zod/v4/core").$strict>;
518
+ metadata: {
519
+ axeda: {
520
+ requires: string;
521
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
522
+ };
523
+ };
524
+ }, {
525
+ items: import("./dto.js").ManagedUserDto[];
526
+ nextCursor: string | null;
527
+ }>;
528
+ axedaUserCreate: import("better-call").StrictEndpoint<"/axeda/user/create", {
529
+ method: "POST";
530
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
531
+ session: {
532
+ session: Record<string, any> & {
533
+ id: string;
534
+ createdAt: Date;
535
+ updatedAt: Date;
536
+ userId: string;
537
+ expiresAt: Date;
538
+ token: string;
539
+ ipAddress?: string | null | undefined;
540
+ userAgent?: string | null | undefined;
541
+ };
542
+ user: Record<string, any> & {
543
+ id: string;
544
+ createdAt: Date;
545
+ updatedAt: Date;
546
+ email: string;
547
+ emailVerified: boolean;
548
+ name: string;
549
+ image?: string | null | undefined;
550
+ };
551
+ };
552
+ }>>[];
553
+ body: import("zod").ZodObject<{
554
+ email: import("zod").ZodString;
555
+ name: import("zod").ZodString;
556
+ }, import("zod/v4/core").$strict>;
557
+ metadata: {
558
+ axeda: {
559
+ requires: string;
560
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
561
+ };
562
+ };
563
+ }, import("./dto.js").ManagedUserDto>;
564
+ axedaUserBan: import("better-call").StrictEndpoint<"/axeda/user/ban", {
565
+ method: "POST";
566
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
567
+ session: {
568
+ session: Record<string, any> & {
569
+ id: string;
570
+ createdAt: Date;
571
+ updatedAt: Date;
572
+ userId: string;
573
+ expiresAt: Date;
574
+ token: string;
575
+ ipAddress?: string | null | undefined;
576
+ userAgent?: string | null | undefined;
577
+ };
578
+ user: Record<string, any> & {
579
+ id: string;
580
+ createdAt: Date;
581
+ updatedAt: Date;
582
+ email: string;
583
+ emailVerified: boolean;
584
+ name: string;
585
+ image?: string | null | undefined;
586
+ };
587
+ };
588
+ }>>[];
589
+ body: import("zod").ZodObject<{
590
+ id: import("zod").ZodString;
591
+ reason: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
592
+ expiresAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodISODateTime>>;
593
+ }, import("zod/v4/core").$strict>;
594
+ metadata: {
595
+ axeda: {
596
+ requires: string;
597
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
598
+ };
599
+ };
600
+ }, import("./dto.js").ManagedUserDto>;
601
+ axedaUserUnban: import("better-call").StrictEndpoint<"/axeda/user/unban", {
602
+ method: "POST";
603
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
604
+ session: {
605
+ session: Record<string, any> & {
606
+ id: string;
607
+ createdAt: Date;
608
+ updatedAt: Date;
609
+ userId: string;
610
+ expiresAt: Date;
611
+ token: string;
612
+ ipAddress?: string | null | undefined;
613
+ userAgent?: string | null | undefined;
614
+ };
615
+ user: Record<string, any> & {
616
+ id: string;
617
+ createdAt: Date;
618
+ updatedAt: Date;
619
+ email: string;
620
+ emailVerified: boolean;
621
+ name: string;
622
+ image?: string | null | undefined;
623
+ };
624
+ };
625
+ }>>[];
626
+ body: import("zod").ZodObject<{
627
+ id: import("zod").ZodString;
628
+ }, import("zod/v4/core").$strict>;
629
+ metadata: {
630
+ axeda: {
631
+ requires: string;
632
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
633
+ };
634
+ };
635
+ }, import("./dto.js").ManagedUserDto>;
636
+ axedaUserRevokeSessions: import("better-call").StrictEndpoint<"/axeda/user/revoke-sessions", {
637
+ method: "POST";
638
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
639
+ session: {
640
+ session: Record<string, any> & {
641
+ id: string;
642
+ createdAt: Date;
643
+ updatedAt: Date;
644
+ userId: string;
645
+ expiresAt: Date;
646
+ token: string;
647
+ ipAddress?: string | null | undefined;
648
+ userAgent?: string | null | undefined;
649
+ };
650
+ user: Record<string, any> & {
651
+ id: string;
652
+ createdAt: Date;
653
+ updatedAt: Date;
654
+ email: string;
655
+ emailVerified: boolean;
656
+ name: string;
657
+ image?: string | null | undefined;
658
+ };
659
+ };
660
+ }>>[];
661
+ body: import("zod").ZodObject<{
662
+ id: import("zod").ZodString;
663
+ }, import("zod/v4/core").$strict>;
664
+ metadata: {
665
+ axeda: {
666
+ requires: string;
667
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
668
+ };
669
+ };
670
+ }, {
671
+ revoked: number;
672
+ }>;
673
+ axedaMenu: import("better-call").StrictEndpoint<"/axeda/menu", {
674
+ method: "GET";
675
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
676
+ session: {
677
+ session: Record<string, any> & {
678
+ id: string;
679
+ createdAt: Date;
680
+ updatedAt: Date;
681
+ userId: string;
682
+ expiresAt: Date;
683
+ token: string;
684
+ ipAddress?: string | null | undefined;
685
+ userAgent?: string | null | undefined;
686
+ };
687
+ user: Record<string, any> & {
688
+ id: string;
689
+ createdAt: Date;
690
+ updatedAt: Date;
691
+ email: string;
692
+ emailVerified: boolean;
693
+ name: string;
694
+ image?: string | null | undefined;
695
+ };
696
+ };
697
+ }>>[];
698
+ query: import("zod").ZodObject<{
699
+ locale: import("zod").ZodOptional<import("zod").ZodString>;
700
+ scopeType: import("zod").ZodOptional<import("zod").ZodEnum<{
701
+ company: "company";
702
+ business: "business";
703
+ global: "global";
704
+ }>>;
705
+ scopeId: import("zod").ZodOptional<import("zod").ZodString>;
706
+ }, import("zod/v4/core").$strict>;
707
+ metadata: {
708
+ axeda: {
709
+ requires: string;
710
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
711
+ };
712
+ };
713
+ }, {
714
+ items: import("@teamblind/axeda-core").MenuNode[];
715
+ }>;
716
+ axedaInvitationList: import("better-call").StrictEndpoint<"/axeda/invitation/list", {
717
+ method: "GET";
718
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
719
+ session: {
720
+ session: Record<string, any> & {
721
+ id: string;
722
+ createdAt: Date;
723
+ updatedAt: Date;
724
+ userId: string;
725
+ expiresAt: Date;
726
+ token: string;
727
+ ipAddress?: string | null | undefined;
728
+ userAgent?: string | null | undefined;
729
+ };
730
+ user: Record<string, any> & {
731
+ id: string;
732
+ createdAt: Date;
733
+ updatedAt: Date;
734
+ email: string;
735
+ emailVerified: boolean;
736
+ name: string;
737
+ image?: string | null | undefined;
738
+ };
739
+ };
740
+ }>>[];
741
+ query: import("zod").ZodObject<{
742
+ pendingOnly: import("zod").ZodOptional<import("zod").ZodEnum<{
743
+ true: "true";
744
+ false: "false";
745
+ }>>;
746
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
747
+ limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
748
+ scopeType: import("zod").ZodOptional<import("zod").ZodEnum<{
749
+ company: "company";
750
+ business: "business";
751
+ global: "global";
752
+ }>>;
753
+ scopeId: import("zod").ZodOptional<import("zod").ZodString>;
754
+ }, import("zod/v4/core").$strict>;
755
+ metadata: {
756
+ axeda: {
757
+ requires: string;
758
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
759
+ };
760
+ };
761
+ }, {
762
+ items: import("./dto.js").InvitationDto[];
763
+ nextCursor: string | null;
764
+ }>;
765
+ axedaInvitationCreate: import("better-call").StrictEndpoint<"/axeda/invitation/create", {
766
+ method: "POST";
767
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
768
+ session: {
769
+ session: Record<string, any> & {
770
+ id: string;
771
+ createdAt: Date;
772
+ updatedAt: Date;
773
+ userId: string;
774
+ expiresAt: Date;
775
+ token: string;
776
+ ipAddress?: string | null | undefined;
777
+ userAgent?: string | null | undefined;
778
+ };
779
+ user: Record<string, any> & {
780
+ id: string;
781
+ createdAt: Date;
782
+ updatedAt: Date;
783
+ email: string;
784
+ emailVerified: boolean;
785
+ name: string;
786
+ image?: string | null | undefined;
787
+ };
788
+ };
789
+ }>>[];
790
+ body: import("zod").ZodObject<{
791
+ email: import("zod").ZodString;
792
+ scope: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
793
+ type: import("zod").ZodLiteral<"global">;
794
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
795
+ type: import("zod").ZodEnum<{
796
+ company: "company";
797
+ business: "business";
798
+ }>;
799
+ id: import("zod").ZodString;
800
+ }, import("zod/v4/core").$strict>]>;
801
+ roleIds: import("zod").ZodArray<import("zod").ZodString>;
802
+ ttlHours: import("zod").ZodOptional<import("zod").ZodNumber>;
803
+ }, import("zod/v4/core").$strict>;
804
+ metadata: {
805
+ axeda: {
806
+ requires: string;
807
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
808
+ };
809
+ };
810
+ }, import("./dto.js").InvitationDto>;
811
+ axedaInvitationAccept: import("better-call").StrictEndpoint<"/axeda/invitation/accept", {
812
+ method: "POST";
813
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
814
+ session: {
815
+ session: Record<string, any> & {
816
+ id: string;
817
+ createdAt: Date;
818
+ updatedAt: Date;
819
+ userId: string;
820
+ expiresAt: Date;
821
+ token: string;
822
+ ipAddress?: string | null | undefined;
823
+ userAgent?: string | null | undefined;
824
+ };
825
+ user: Record<string, any> & {
826
+ id: string;
827
+ createdAt: Date;
828
+ updatedAt: Date;
829
+ email: string;
830
+ emailVerified: boolean;
831
+ name: string;
832
+ image?: string | null | undefined;
833
+ };
834
+ };
835
+ }>>[];
836
+ body: import("zod").ZodObject<{
837
+ token: import("zod").ZodString;
838
+ }, import("zod/v4/core").$strict>;
839
+ metadata: {
840
+ axeda: {
841
+ requires: string;
842
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
843
+ };
844
+ };
845
+ }, {
846
+ assignments: import("./dto.js").AssignmentDto[];
847
+ }>;
848
+ axedaInvitationRevoke: import("better-call").StrictEndpoint<"/axeda/invitation/revoke", {
849
+ method: "POST";
850
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
851
+ session: {
852
+ session: Record<string, any> & {
853
+ id: string;
854
+ createdAt: Date;
855
+ updatedAt: Date;
856
+ userId: string;
857
+ expiresAt: Date;
858
+ token: string;
859
+ ipAddress?: string | null | undefined;
860
+ userAgent?: string | null | undefined;
861
+ };
862
+ user: Record<string, any> & {
863
+ id: string;
864
+ createdAt: Date;
865
+ updatedAt: Date;
866
+ email: string;
867
+ emailVerified: boolean;
868
+ name: string;
869
+ image?: string | null | undefined;
870
+ };
871
+ };
872
+ }>>[];
873
+ body: import("zod").ZodObject<{
874
+ id: import("zod").ZodString;
875
+ }, import("zod/v4/core").$strict>;
876
+ metadata: {
877
+ axeda: {
878
+ requires: string;
879
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
880
+ };
881
+ };
882
+ }, {
883
+ revoked: true;
884
+ }>;
885
+ axedaCompanyList: import("better-call").StrictEndpoint<"/axeda/company/list", {
886
+ method: "GET";
887
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
888
+ session: {
889
+ session: Record<string, any> & {
890
+ id: string;
891
+ createdAt: Date;
892
+ updatedAt: Date;
893
+ userId: string;
894
+ expiresAt: Date;
895
+ token: string;
896
+ ipAddress?: string | null | undefined;
897
+ userAgent?: string | null | undefined;
898
+ };
899
+ user: Record<string, any> & {
900
+ id: string;
901
+ createdAt: Date;
902
+ updatedAt: Date;
903
+ email: string;
904
+ emailVerified: boolean;
905
+ name: string;
906
+ image?: string | null | undefined;
907
+ };
908
+ };
909
+ }>>[];
910
+ query: import("zod").ZodObject<{
911
+ deleted: import("zod").ZodOptional<import("zod").ZodEnum<{
912
+ exclude: "exclude";
913
+ include: "include";
914
+ only: "only";
915
+ }>>;
916
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
917
+ limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
918
+ }, import("zod/v4/core").$strict>;
919
+ metadata: {
920
+ axeda: {
921
+ requires: string;
922
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
923
+ };
924
+ };
925
+ }, {
926
+ items: import("./dto.js").CompanyDto[];
927
+ nextCursor: string | null;
928
+ }>;
929
+ axedaCompanyGet: import("better-call").StrictEndpoint<"/axeda/company/get", {
930
+ method: "GET";
931
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
932
+ session: {
933
+ session: Record<string, any> & {
934
+ id: string;
935
+ createdAt: Date;
936
+ updatedAt: Date;
937
+ userId: string;
938
+ expiresAt: Date;
939
+ token: string;
940
+ ipAddress?: string | null | undefined;
941
+ userAgent?: string | null | undefined;
942
+ };
943
+ user: Record<string, any> & {
944
+ id: string;
945
+ createdAt: Date;
946
+ updatedAt: Date;
947
+ email: string;
948
+ emailVerified: boolean;
949
+ name: string;
950
+ image?: string | null | undefined;
951
+ };
952
+ };
953
+ }>>[];
954
+ query: import("zod").ZodObject<{
955
+ id: import("zod").ZodString;
956
+ }, import("zod/v4/core").$strict>;
957
+ metadata: {
958
+ axeda: {
959
+ requires: string;
960
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
961
+ };
962
+ };
963
+ }, import("./dto.js").CompanyDto>;
964
+ axedaCompanyCreate: import("better-call").StrictEndpoint<"/axeda/company/create", {
965
+ method: "POST";
966
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
967
+ session: {
968
+ session: Record<string, any> & {
969
+ id: string;
970
+ createdAt: Date;
971
+ updatedAt: Date;
972
+ userId: string;
973
+ expiresAt: Date;
974
+ token: string;
975
+ ipAddress?: string | null | undefined;
976
+ userAgent?: string | null | undefined;
977
+ };
978
+ user: Record<string, any> & {
979
+ id: string;
980
+ createdAt: Date;
981
+ updatedAt: Date;
982
+ email: string;
983
+ emailVerified: boolean;
984
+ name: string;
985
+ image?: string | null | undefined;
986
+ };
987
+ };
988
+ }>>[];
989
+ body: import("zod").ZodObject<{
990
+ slug: import("zod").ZodString;
991
+ name: import("zod").ZodString;
992
+ legalName: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
993
+ logoUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
994
+ faviconUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
995
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
996
+ }, import("zod/v4/core").$strict>;
997
+ metadata: {
998
+ axeda: {
999
+ requires: string;
1000
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1001
+ };
1002
+ };
1003
+ }, import("./dto.js").CompanyDto>;
1004
+ axedaCompanyUpdate: import("better-call").StrictEndpoint<"/axeda/company/update", {
1005
+ method: "POST";
1006
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1007
+ session: {
1008
+ session: Record<string, any> & {
1009
+ id: string;
1010
+ createdAt: Date;
1011
+ updatedAt: Date;
1012
+ userId: string;
1013
+ expiresAt: Date;
1014
+ token: string;
1015
+ ipAddress?: string | null | undefined;
1016
+ userAgent?: string | null | undefined;
1017
+ };
1018
+ user: Record<string, any> & {
1019
+ id: string;
1020
+ createdAt: Date;
1021
+ updatedAt: Date;
1022
+ email: string;
1023
+ emailVerified: boolean;
1024
+ name: string;
1025
+ image?: string | null | undefined;
1026
+ };
1027
+ };
1028
+ }>>[];
1029
+ body: import("zod").ZodObject<{
1030
+ id: import("zod").ZodString;
1031
+ version: import("zod").ZodNumber;
1032
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1033
+ legalName: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1034
+ logoUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1035
+ faviconUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1036
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1037
+ }, import("zod/v4/core").$strict>;
1038
+ metadata: {
1039
+ axeda: {
1040
+ requires: string;
1041
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1042
+ };
1043
+ };
1044
+ }, import("./dto.js").CompanyDto>;
1045
+ axedaCompanySetStatus: import("better-call").StrictEndpoint<"/axeda/company/set-status", {
1046
+ method: "POST";
1047
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1048
+ session: {
1049
+ session: Record<string, any> & {
1050
+ id: string;
1051
+ createdAt: Date;
1052
+ updatedAt: Date;
1053
+ userId: string;
1054
+ expiresAt: Date;
1055
+ token: string;
1056
+ ipAddress?: string | null | undefined;
1057
+ userAgent?: string | null | undefined;
1058
+ };
1059
+ user: Record<string, any> & {
1060
+ id: string;
1061
+ createdAt: Date;
1062
+ updatedAt: Date;
1063
+ email: string;
1064
+ emailVerified: boolean;
1065
+ name: string;
1066
+ image?: string | null | undefined;
1067
+ };
1068
+ };
1069
+ }>>[];
1070
+ body: import("zod").ZodObject<{
1071
+ id: import("zod").ZodString;
1072
+ version: import("zod").ZodNumber;
1073
+ status: import("zod").ZodEnum<{
1074
+ active: "active";
1075
+ inactive: "inactive";
1076
+ }>;
1077
+ }, import("zod/v4/core").$strict>;
1078
+ metadata: {
1079
+ axeda: {
1080
+ requires: string;
1081
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1082
+ };
1083
+ };
1084
+ }, import("./dto.js").CompanyDto>;
1085
+ axedaCompanyDelete: import("better-call").StrictEndpoint<"/axeda/company/delete", {
1086
+ method: "POST";
1087
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1088
+ session: {
1089
+ session: Record<string, any> & {
1090
+ id: string;
1091
+ createdAt: Date;
1092
+ updatedAt: Date;
1093
+ userId: string;
1094
+ expiresAt: Date;
1095
+ token: string;
1096
+ ipAddress?: string | null | undefined;
1097
+ userAgent?: string | null | undefined;
1098
+ };
1099
+ user: Record<string, any> & {
1100
+ id: string;
1101
+ createdAt: Date;
1102
+ updatedAt: Date;
1103
+ email: string;
1104
+ emailVerified: boolean;
1105
+ name: string;
1106
+ image?: string | null | undefined;
1107
+ };
1108
+ };
1109
+ }>>[];
1110
+ body: import("zod").ZodObject<{
1111
+ id: import("zod").ZodString;
1112
+ version: import("zod").ZodNumber;
1113
+ immediate: import("zod").ZodOptional<import("zod").ZodBoolean>;
1114
+ }, import("zod/v4/core").$strict>;
1115
+ metadata: {
1116
+ axeda: {
1117
+ requires: string;
1118
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1119
+ };
1120
+ };
1121
+ }, {
1122
+ deleted: true;
1123
+ }>;
1124
+ axedaCompanyRestore: import("better-call").StrictEndpoint<"/axeda/company/restore", {
1125
+ method: "POST";
1126
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1127
+ session: {
1128
+ session: Record<string, any> & {
1129
+ id: string;
1130
+ createdAt: Date;
1131
+ updatedAt: Date;
1132
+ userId: string;
1133
+ expiresAt: Date;
1134
+ token: string;
1135
+ ipAddress?: string | null | undefined;
1136
+ userAgent?: string | null | undefined;
1137
+ };
1138
+ user: Record<string, any> & {
1139
+ id: string;
1140
+ createdAt: Date;
1141
+ updatedAt: Date;
1142
+ email: string;
1143
+ emailVerified: boolean;
1144
+ name: string;
1145
+ image?: string | null | undefined;
1146
+ };
1147
+ };
1148
+ }>>[];
1149
+ body: import("zod").ZodObject<{
1150
+ id: import("zod").ZodString;
1151
+ version: import("zod").ZodNumber;
1152
+ }, import("zod/v4/core").$strict>;
1153
+ metadata: {
1154
+ axeda: {
1155
+ requires: string;
1156
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1157
+ };
1158
+ };
1159
+ }, import("./dto.js").CompanyDto>;
1160
+ axedaBusinessList: import("better-call").StrictEndpoint<"/axeda/business/list", {
1161
+ method: "GET";
1162
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1163
+ session: {
1164
+ session: Record<string, any> & {
1165
+ id: string;
1166
+ createdAt: Date;
1167
+ updatedAt: Date;
1168
+ userId: string;
1169
+ expiresAt: Date;
1170
+ token: string;
1171
+ ipAddress?: string | null | undefined;
1172
+ userAgent?: string | null | undefined;
1173
+ };
1174
+ user: Record<string, any> & {
1175
+ id: string;
1176
+ createdAt: Date;
1177
+ updatedAt: Date;
1178
+ email: string;
1179
+ emailVerified: boolean;
1180
+ name: string;
1181
+ image?: string | null | undefined;
1182
+ };
1183
+ };
1184
+ }>>[];
1185
+ query: import("zod").ZodObject<{
1186
+ companyId: import("zod").ZodString;
1187
+ deleted: import("zod").ZodOptional<import("zod").ZodEnum<{
1188
+ exclude: "exclude";
1189
+ include: "include";
1190
+ only: "only";
1191
+ }>>;
1192
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
1193
+ limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
1194
+ }, import("zod/v4/core").$strict>;
1195
+ metadata: {
1196
+ axeda: {
1197
+ requires: string;
1198
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1199
+ };
1200
+ };
1201
+ }, {
1202
+ items: import("./dto.js").BusinessDto[];
1203
+ nextCursor: string | null;
1204
+ }>;
1205
+ axedaBusinessGet: import("better-call").StrictEndpoint<"/axeda/business/get", {
1206
+ method: "GET";
1207
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1208
+ session: {
1209
+ session: Record<string, any> & {
1210
+ id: string;
1211
+ createdAt: Date;
1212
+ updatedAt: Date;
1213
+ userId: string;
1214
+ expiresAt: Date;
1215
+ token: string;
1216
+ ipAddress?: string | null | undefined;
1217
+ userAgent?: string | null | undefined;
1218
+ };
1219
+ user: Record<string, any> & {
1220
+ id: string;
1221
+ createdAt: Date;
1222
+ updatedAt: Date;
1223
+ email: string;
1224
+ emailVerified: boolean;
1225
+ name: string;
1226
+ image?: string | null | undefined;
1227
+ };
1228
+ };
1229
+ }>>[];
1230
+ query: import("zod").ZodObject<{
1231
+ id: import("zod").ZodString;
1232
+ }, import("zod/v4/core").$strict>;
1233
+ metadata: {
1234
+ axeda: {
1235
+ requires: string;
1236
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1237
+ };
1238
+ };
1239
+ }, import("./dto.js").BusinessDto>;
1240
+ axedaBusinessCreate: import("better-call").StrictEndpoint<"/axeda/business/create", {
1241
+ method: "POST";
1242
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1243
+ session: {
1244
+ session: Record<string, any> & {
1245
+ id: string;
1246
+ createdAt: Date;
1247
+ updatedAt: Date;
1248
+ userId: string;
1249
+ expiresAt: Date;
1250
+ token: string;
1251
+ ipAddress?: string | null | undefined;
1252
+ userAgent?: string | null | undefined;
1253
+ };
1254
+ user: Record<string, any> & {
1255
+ id: string;
1256
+ createdAt: Date;
1257
+ updatedAt: Date;
1258
+ email: string;
1259
+ emailVerified: boolean;
1260
+ name: string;
1261
+ image?: string | null | undefined;
1262
+ };
1263
+ };
1264
+ }>>[];
1265
+ body: import("zod").ZodObject<{
1266
+ companyId: import("zod").ZodString;
1267
+ slug: import("zod").ZodString;
1268
+ name: import("zod").ZodString;
1269
+ logoUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1270
+ faviconUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1271
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1272
+ }, import("zod/v4/core").$strict>;
1273
+ metadata: {
1274
+ axeda: {
1275
+ requires: string;
1276
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1277
+ };
1278
+ };
1279
+ }, import("./dto.js").BusinessDto>;
1280
+ axedaBusinessUpdate: import("better-call").StrictEndpoint<"/axeda/business/update", {
1281
+ method: "POST";
1282
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1283
+ session: {
1284
+ session: Record<string, any> & {
1285
+ id: string;
1286
+ createdAt: Date;
1287
+ updatedAt: Date;
1288
+ userId: string;
1289
+ expiresAt: Date;
1290
+ token: string;
1291
+ ipAddress?: string | null | undefined;
1292
+ userAgent?: string | null | undefined;
1293
+ };
1294
+ user: Record<string, any> & {
1295
+ id: string;
1296
+ createdAt: Date;
1297
+ updatedAt: Date;
1298
+ email: string;
1299
+ emailVerified: boolean;
1300
+ name: string;
1301
+ image?: string | null | undefined;
1302
+ };
1303
+ };
1304
+ }>>[];
1305
+ body: import("zod").ZodObject<{
1306
+ id: import("zod").ZodString;
1307
+ version: import("zod").ZodNumber;
1308
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1309
+ logoUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1310
+ faviconUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1311
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1312
+ }, import("zod/v4/core").$strict>;
1313
+ metadata: {
1314
+ axeda: {
1315
+ requires: string;
1316
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1317
+ };
1318
+ };
1319
+ }, import("./dto.js").BusinessDto>;
1320
+ axedaBusinessSetStatus: import("better-call").StrictEndpoint<"/axeda/business/set-status", {
1321
+ method: "POST";
1322
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1323
+ session: {
1324
+ session: Record<string, any> & {
1325
+ id: string;
1326
+ createdAt: Date;
1327
+ updatedAt: Date;
1328
+ userId: string;
1329
+ expiresAt: Date;
1330
+ token: string;
1331
+ ipAddress?: string | null | undefined;
1332
+ userAgent?: string | null | undefined;
1333
+ };
1334
+ user: Record<string, any> & {
1335
+ id: string;
1336
+ createdAt: Date;
1337
+ updatedAt: Date;
1338
+ email: string;
1339
+ emailVerified: boolean;
1340
+ name: string;
1341
+ image?: string | null | undefined;
1342
+ };
1343
+ };
1344
+ }>>[];
1345
+ body: import("zod").ZodObject<{
1346
+ id: import("zod").ZodString;
1347
+ version: import("zod").ZodNumber;
1348
+ status: import("zod").ZodEnum<{
1349
+ active: "active";
1350
+ inactive: "inactive";
1351
+ }>;
1352
+ }, import("zod/v4/core").$strict>;
1353
+ metadata: {
1354
+ axeda: {
1355
+ requires: string;
1356
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1357
+ };
1358
+ };
1359
+ }, import("./dto.js").BusinessDto>;
1360
+ axedaBusinessDelete: import("better-call").StrictEndpoint<"/axeda/business/delete", {
1361
+ method: "POST";
1362
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1363
+ session: {
1364
+ session: Record<string, any> & {
1365
+ id: string;
1366
+ createdAt: Date;
1367
+ updatedAt: Date;
1368
+ userId: string;
1369
+ expiresAt: Date;
1370
+ token: string;
1371
+ ipAddress?: string | null | undefined;
1372
+ userAgent?: string | null | undefined;
1373
+ };
1374
+ user: Record<string, any> & {
1375
+ id: string;
1376
+ createdAt: Date;
1377
+ updatedAt: Date;
1378
+ email: string;
1379
+ emailVerified: boolean;
1380
+ name: string;
1381
+ image?: string | null | undefined;
1382
+ };
1383
+ };
1384
+ }>>[];
1385
+ body: import("zod").ZodObject<{
1386
+ id: import("zod").ZodString;
1387
+ version: import("zod").ZodNumber;
1388
+ immediate: import("zod").ZodOptional<import("zod").ZodBoolean>;
1389
+ }, import("zod/v4/core").$strict>;
1390
+ metadata: {
1391
+ axeda: {
1392
+ requires: string;
1393
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1394
+ };
1395
+ };
1396
+ }, {
1397
+ deleted: true;
1398
+ }>;
1399
+ axedaBusinessRestore: import("better-call").StrictEndpoint<"/axeda/business/restore", {
1400
+ method: "POST";
1401
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1402
+ session: {
1403
+ session: Record<string, any> & {
1404
+ id: string;
1405
+ createdAt: Date;
1406
+ updatedAt: Date;
1407
+ userId: string;
1408
+ expiresAt: Date;
1409
+ token: string;
1410
+ ipAddress?: string | null | undefined;
1411
+ userAgent?: string | null | undefined;
1412
+ };
1413
+ user: Record<string, any> & {
1414
+ id: string;
1415
+ createdAt: Date;
1416
+ updatedAt: Date;
1417
+ email: string;
1418
+ emailVerified: boolean;
1419
+ name: string;
1420
+ image?: string | null | undefined;
1421
+ };
1422
+ };
1423
+ }>>[];
1424
+ body: import("zod").ZodObject<{
1425
+ id: import("zod").ZodString;
1426
+ version: import("zod").ZodNumber;
1427
+ }, import("zod/v4/core").$strict>;
1428
+ metadata: {
1429
+ axeda: {
1430
+ requires: string;
1431
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1432
+ };
1433
+ };
1434
+ }, import("./dto.js").BusinessDto>;
1435
+ axedaMe: import("better-call").StrictEndpoint<"/axeda/me", {
1436
+ method: "GET";
1437
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1438
+ session: {
1439
+ session: Record<string, any> & {
1440
+ id: string;
1441
+ createdAt: Date;
1442
+ updatedAt: Date;
1443
+ userId: string;
1444
+ expiresAt: Date;
1445
+ token: string;
1446
+ ipAddress?: string | null | undefined;
1447
+ userAgent?: string | null | undefined;
1448
+ };
1449
+ user: Record<string, any> & {
1450
+ id: string;
1451
+ createdAt: Date;
1452
+ updatedAt: Date;
1453
+ email: string;
1454
+ emailVerified: boolean;
1455
+ name: string;
1456
+ image?: string | null | undefined;
1457
+ };
1458
+ };
1459
+ }>>[];
1460
+ metadata: {
1461
+ axeda: {
1462
+ requires: string;
1463
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1464
+ };
1465
+ };
1466
+ }, {
1467
+ userId: string;
1468
+ twoFactorEnabled: boolean;
1469
+ globalPermissions: string[];
1470
+ assignments: import("./dto.js").AssignmentDto[];
1471
+ }>;
1472
+ axedaPermissionList: import("better-call").StrictEndpoint<"/axeda/permission/list", {
1473
+ method: "GET";
1474
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1475
+ session: {
1476
+ session: Record<string, any> & {
1477
+ id: string;
1478
+ createdAt: Date;
1479
+ updatedAt: Date;
1480
+ userId: string;
1481
+ expiresAt: Date;
1482
+ token: string;
1483
+ ipAddress?: string | null | undefined;
1484
+ userAgent?: string | null | undefined;
1485
+ };
1486
+ user: Record<string, any> & {
1487
+ id: string;
1488
+ createdAt: Date;
1489
+ updatedAt: Date;
1490
+ email: string;
1491
+ emailVerified: boolean;
1492
+ name: string;
1493
+ image?: string | null | undefined;
1494
+ };
1495
+ };
1496
+ }>>[];
1497
+ metadata: {
1498
+ axeda: {
1499
+ requires: string;
1500
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1501
+ };
1502
+ };
1503
+ }, {
1504
+ permissions: string[];
1505
+ }>;
1506
+ axedaRoleList: import("better-call").StrictEndpoint<"/axeda/role/list", {
1507
+ method: "GET";
1508
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1509
+ session: {
1510
+ session: Record<string, any> & {
1511
+ id: string;
1512
+ createdAt: Date;
1513
+ updatedAt: Date;
1514
+ userId: string;
1515
+ expiresAt: Date;
1516
+ token: string;
1517
+ ipAddress?: string | null | undefined;
1518
+ userAgent?: string | null | undefined;
1519
+ };
1520
+ user: Record<string, any> & {
1521
+ id: string;
1522
+ createdAt: Date;
1523
+ updatedAt: Date;
1524
+ email: string;
1525
+ emailVerified: boolean;
1526
+ name: string;
1527
+ image?: string | null | undefined;
1528
+ };
1529
+ };
1530
+ }>>[];
1531
+ query: import("zod").ZodObject<{
1532
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
1533
+ limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
1534
+ }, import("zod/v4/core").$strict>;
1535
+ metadata: {
1536
+ axeda: {
1537
+ requires: string;
1538
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1539
+ };
1540
+ };
1541
+ }, {
1542
+ items: import("./dto.js").RoleDto[];
1543
+ nextCursor: string | null;
1544
+ }>;
1545
+ axedaRoleGet: import("better-call").StrictEndpoint<"/axeda/role/get", {
1546
+ method: "GET";
1547
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1548
+ session: {
1549
+ session: Record<string, any> & {
1550
+ id: string;
1551
+ createdAt: Date;
1552
+ updatedAt: Date;
1553
+ userId: string;
1554
+ expiresAt: Date;
1555
+ token: string;
1556
+ ipAddress?: string | null | undefined;
1557
+ userAgent?: string | null | undefined;
1558
+ };
1559
+ user: Record<string, any> & {
1560
+ id: string;
1561
+ createdAt: Date;
1562
+ updatedAt: Date;
1563
+ email: string;
1564
+ emailVerified: boolean;
1565
+ name: string;
1566
+ image?: string | null | undefined;
1567
+ };
1568
+ };
1569
+ }>>[];
1570
+ query: import("zod").ZodObject<{
1571
+ id: import("zod").ZodString;
1572
+ }, import("zod/v4/core").$strict>;
1573
+ metadata: {
1574
+ axeda: {
1575
+ requires: string;
1576
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1577
+ };
1578
+ };
1579
+ }, import("./dto.js").RoleDto>;
1580
+ axedaRoleCreate: import("better-call").StrictEndpoint<"/axeda/role/create", {
1581
+ method: "POST";
1582
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1583
+ session: {
1584
+ session: Record<string, any> & {
1585
+ id: string;
1586
+ createdAt: Date;
1587
+ updatedAt: Date;
1588
+ userId: string;
1589
+ expiresAt: Date;
1590
+ token: string;
1591
+ ipAddress?: string | null | undefined;
1592
+ userAgent?: string | null | undefined;
1593
+ };
1594
+ user: Record<string, any> & {
1595
+ id: string;
1596
+ createdAt: Date;
1597
+ updatedAt: Date;
1598
+ email: string;
1599
+ emailVerified: boolean;
1600
+ name: string;
1601
+ image?: string | null | undefined;
1602
+ };
1603
+ };
1604
+ }>>[];
1605
+ body: import("zod").ZodObject<{
1606
+ key: import("zod").ZodString;
1607
+ name: import("zod").ZodString;
1608
+ description: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1609
+ permissions: import("zod").ZodArray<import("zod").ZodString>;
1610
+ requireMfa: import("zod").ZodOptional<import("zod").ZodBoolean>;
1611
+ }, import("zod/v4/core").$strict>;
1612
+ metadata: {
1613
+ axeda: {
1614
+ requires: string;
1615
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1616
+ };
1617
+ };
1618
+ }, import("./dto.js").RoleDto>;
1619
+ axedaRoleUpdate: import("better-call").StrictEndpoint<"/axeda/role/update", {
1620
+ method: "POST";
1621
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").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
+ body: import("zod").ZodObject<{
1645
+ id: import("zod").ZodString;
1646
+ version: import("zod").ZodNumber;
1647
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1648
+ description: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1649
+ permissions: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1650
+ requireMfa: import("zod").ZodOptional<import("zod").ZodBoolean>;
1651
+ }, import("zod/v4/core").$strict>;
1652
+ metadata: {
1653
+ axeda: {
1654
+ requires: string;
1655
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1656
+ };
1657
+ };
1658
+ }, import("./dto.js").RoleDto>;
1659
+ axedaRoleSetStatus: import("better-call").StrictEndpoint<"/axeda/role/set-status", {
1660
+ method: "POST";
1661
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1662
+ session: {
1663
+ session: Record<string, any> & {
1664
+ id: string;
1665
+ createdAt: Date;
1666
+ updatedAt: Date;
1667
+ userId: string;
1668
+ expiresAt: Date;
1669
+ token: string;
1670
+ ipAddress?: string | null | undefined;
1671
+ userAgent?: string | null | undefined;
1672
+ };
1673
+ user: Record<string, any> & {
1674
+ id: string;
1675
+ createdAt: Date;
1676
+ updatedAt: Date;
1677
+ email: string;
1678
+ emailVerified: boolean;
1679
+ name: string;
1680
+ image?: string | null | undefined;
1681
+ };
1682
+ };
1683
+ }>>[];
1684
+ body: import("zod").ZodObject<{
1685
+ id: import("zod").ZodString;
1686
+ version: import("zod").ZodNumber;
1687
+ status: import("zod").ZodEnum<{
1688
+ active: "active";
1689
+ inactive: "inactive";
1690
+ }>;
1691
+ }, import("zod/v4/core").$strict>;
1692
+ metadata: {
1693
+ axeda: {
1694
+ requires: string;
1695
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1696
+ };
1697
+ };
1698
+ }, import("./dto.js").RoleDto>;
1699
+ axedaRoleDelete: import("better-call").StrictEndpoint<"/axeda/role/delete", {
1700
+ method: "POST";
1701
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1702
+ session: {
1703
+ session: Record<string, any> & {
1704
+ id: string;
1705
+ createdAt: Date;
1706
+ updatedAt: Date;
1707
+ userId: string;
1708
+ expiresAt: Date;
1709
+ token: string;
1710
+ ipAddress?: string | null | undefined;
1711
+ userAgent?: string | null | undefined;
1712
+ };
1713
+ user: Record<string, any> & {
1714
+ id: string;
1715
+ createdAt: Date;
1716
+ updatedAt: Date;
1717
+ email: string;
1718
+ emailVerified: boolean;
1719
+ name: string;
1720
+ image?: string | null | undefined;
1721
+ };
1722
+ };
1723
+ }>>[];
1724
+ body: import("zod").ZodObject<{
1725
+ id: import("zod").ZodString;
1726
+ }, import("zod/v4/core").$strict>;
1727
+ metadata: {
1728
+ axeda: {
1729
+ requires: string;
1730
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1731
+ };
1732
+ };
1733
+ }, {
1734
+ deleted: true;
1735
+ }>;
1736
+ axedaAssignmentList: import("better-call").StrictEndpoint<"/axeda/assignment/list", {
1737
+ method: "GET";
1738
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1739
+ session: {
1740
+ session: Record<string, any> & {
1741
+ id: string;
1742
+ createdAt: Date;
1743
+ updatedAt: Date;
1744
+ userId: string;
1745
+ expiresAt: Date;
1746
+ token: string;
1747
+ ipAddress?: string | null | undefined;
1748
+ userAgent?: string | null | undefined;
1749
+ };
1750
+ user: Record<string, any> & {
1751
+ id: string;
1752
+ createdAt: Date;
1753
+ updatedAt: Date;
1754
+ email: string;
1755
+ emailVerified: boolean;
1756
+ name: string;
1757
+ image?: string | null | undefined;
1758
+ };
1759
+ };
1760
+ }>>[];
1761
+ query: import("zod").ZodObject<{
1762
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
1763
+ limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
1764
+ scopeType: import("zod").ZodOptional<import("zod").ZodEnum<{
1765
+ company: "company";
1766
+ business: "business";
1767
+ global: "global";
1768
+ }>>;
1769
+ scopeId: import("zod").ZodOptional<import("zod").ZodString>;
1770
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1771
+ }, import("zod/v4/core").$strict>;
1772
+ metadata: {
1773
+ axeda: {
1774
+ requires: string;
1775
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1776
+ };
1777
+ };
1778
+ }, {
1779
+ items: import("./dto.js").AssignmentDto[];
1780
+ nextCursor: string | null;
1781
+ }>;
1782
+ axedaAssignmentCreate: import("better-call").StrictEndpoint<"/axeda/assignment/create", {
1783
+ method: "POST";
1784
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1785
+ session: {
1786
+ session: Record<string, any> & {
1787
+ id: string;
1788
+ createdAt: Date;
1789
+ updatedAt: Date;
1790
+ userId: string;
1791
+ expiresAt: Date;
1792
+ token: string;
1793
+ ipAddress?: string | null | undefined;
1794
+ userAgent?: string | null | undefined;
1795
+ };
1796
+ user: Record<string, any> & {
1797
+ id: string;
1798
+ createdAt: Date;
1799
+ updatedAt: Date;
1800
+ email: string;
1801
+ emailVerified: boolean;
1802
+ name: string;
1803
+ image?: string | null | undefined;
1804
+ };
1805
+ };
1806
+ }>>[];
1807
+ body: import("zod").ZodObject<{
1808
+ userId: import("zod").ZodString;
1809
+ roleId: import("zod").ZodString;
1810
+ scope: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1811
+ type: import("zod").ZodLiteral<"global">;
1812
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
1813
+ type: import("zod").ZodEnum<{
1814
+ company: "company";
1815
+ business: "business";
1816
+ }>;
1817
+ id: import("zod").ZodString;
1818
+ }, import("zod/v4/core").$strict>]>;
1819
+ expiresAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodISODateTime>>;
1820
+ }, import("zod/v4/core").$strict>;
1821
+ metadata: {
1822
+ axeda: {
1823
+ requires: string;
1824
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1825
+ };
1826
+ };
1827
+ }, import("./dto.js").AssignmentDto>;
1828
+ axedaAssignmentRevoke: import("better-call").StrictEndpoint<"/axeda/assignment/revoke", {
1829
+ method: "POST";
1830
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1831
+ session: {
1832
+ session: Record<string, any> & {
1833
+ id: string;
1834
+ createdAt: Date;
1835
+ updatedAt: Date;
1836
+ userId: string;
1837
+ expiresAt: Date;
1838
+ token: string;
1839
+ ipAddress?: string | null | undefined;
1840
+ userAgent?: string | null | undefined;
1841
+ };
1842
+ user: Record<string, any> & {
1843
+ id: string;
1844
+ createdAt: Date;
1845
+ updatedAt: Date;
1846
+ email: string;
1847
+ emailVerified: boolean;
1848
+ name: string;
1849
+ image?: string | null | undefined;
1850
+ };
1851
+ };
1852
+ }>>[];
1853
+ body: import("zod").ZodObject<{
1854
+ id: import("zod").ZodString;
1855
+ }, import("zod/v4/core").$strict>;
1856
+ metadata: {
1857
+ axeda: {
1858
+ requires: string;
1859
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1860
+ };
1861
+ };
1862
+ }, {
1863
+ revoked: true;
1864
+ }>;
1865
+ axedaAuditList: import("better-call").StrictEndpoint<"/axeda/audit/list", {
1866
+ method: "GET";
1867
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1868
+ session: {
1869
+ session: Record<string, any> & {
1870
+ id: string;
1871
+ createdAt: Date;
1872
+ updatedAt: Date;
1873
+ userId: string;
1874
+ expiresAt: Date;
1875
+ token: string;
1876
+ ipAddress?: string | null | undefined;
1877
+ userAgent?: string | null | undefined;
1878
+ };
1879
+ user: Record<string, any> & {
1880
+ id: string;
1881
+ createdAt: Date;
1882
+ updatedAt: Date;
1883
+ email: string;
1884
+ emailVerified: boolean;
1885
+ name: string;
1886
+ image?: string | null | undefined;
1887
+ };
1888
+ };
1889
+ }>>[];
1890
+ query: import("zod").ZodObject<{
1891
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
1892
+ limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
1893
+ scopeType: import("zod").ZodOptional<import("zod").ZodEnum<{
1894
+ company: "company";
1895
+ business: "business";
1896
+ global: "global";
1897
+ }>>;
1898
+ scopeId: import("zod").ZodOptional<import("zod").ZodString>;
1899
+ actorId: import("zod").ZodOptional<import("zod").ZodString>;
1900
+ action: import("zod").ZodOptional<import("zod").ZodString>;
1901
+ targetType: import("zod").ZodOptional<import("zod").ZodString>;
1902
+ targetId: import("zod").ZodOptional<import("zod").ZodString>;
1903
+ }, import("zod/v4/core").$strict>;
1904
+ metadata: {
1905
+ axeda: {
1906
+ requires: string;
1907
+ scope: "own" | "any" | "global" | "scope-parameter" | "per-target";
1908
+ };
1909
+ };
1910
+ }, {
1911
+ items: import("./dto.js").AuditEventDto[];
1912
+ nextCursor: string | null;
1913
+ }>;
1914
+ };
1915
+ rateLimit: {
1916
+ pathMatcher: (path: string) => boolean;
1917
+ max: number;
1918
+ window: number;
1919
+ }[];
1920
+ hooks: {
1921
+ after: {
1922
+ matcher: (context: import("@better-auth/core").HookEndpointContext) => boolean;
1923
+ handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
1924
+ }[];
1925
+ };
1926
+ init(ctx: import("@better-auth/core").AuthContext): {
1927
+ options: {
1928
+ databaseHooks: {
1929
+ session: {
1930
+ create: {
1931
+ before: (session: {
1932
+ userId: string;
1933
+ }) => Promise<void>;
1934
+ };
1935
+ };
1936
+ user: {
1937
+ delete: {
1938
+ after: (user: {
1939
+ id: string;
1940
+ }) => Promise<void>;
1941
+ };
1942
+ };
1943
+ };
1944
+ };
1945
+ };
1946
+ } & {
1947
+ /** El núcleo de Axeda (`can`, `scopesFor`, `bootstrap`…). Disponible tras crear Better Auth. */
1948
+ instance: () => Axeda;
1949
+ /** Comprueba la base de datos y sincroniza las funciones declaradas. Llamar tras migrar. */
1950
+ start: () => Promise<void>;
1951
+ /** La persistencia, para herramientas de la propia aplicación. */
1952
+ persistence: () => AxedaPersistence;
1953
+ };
1954
+ export type AxedaPlugin = ReturnType<typeof axeda>;