@podosoft/podokit-api-client 0.8.0 → 0.8.3
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.
- package/dist/index.d.ts +147 -90
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
97
97
|
hooks: {
|
|
98
98
|
after: {
|
|
99
99
|
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
100
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<import("better-auth/client/plugins").SessionWithImpersonatedBy[] | undefined
|
|
100
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<import("better-auth/client/plugins").SessionWithImpersonatedBy[] | undefined>>;
|
|
101
101
|
}[];
|
|
102
102
|
};
|
|
103
103
|
endpoints: {
|
|
@@ -108,7 +108,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
108
108
|
role: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>;
|
|
109
109
|
}, import("zod/v4/core").$strip>;
|
|
110
110
|
requireHeaders: true;
|
|
111
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
111
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
112
112
|
session: {
|
|
113
113
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
114
114
|
session: {
|
|
@@ -122,7 +122,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
122
122
|
userAgent?: string | null | undefined;
|
|
123
123
|
};
|
|
124
124
|
};
|
|
125
|
-
}
|
|
125
|
+
}>>[];
|
|
126
126
|
metadata: {
|
|
127
127
|
openapi: {
|
|
128
128
|
operationId: string;
|
|
@@ -161,7 +161,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
161
161
|
query: import("zod").ZodObject<{
|
|
162
162
|
id: import("zod").ZodString;
|
|
163
163
|
}, import("zod/v4/core").$strip>;
|
|
164
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
164
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
165
165
|
session: {
|
|
166
166
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
167
167
|
session: {
|
|
@@ -175,7 +175,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
175
175
|
userAgent?: string | null | undefined;
|
|
176
176
|
};
|
|
177
177
|
};
|
|
178
|
-
}
|
|
178
|
+
}>>[];
|
|
179
179
|
metadata: {
|
|
180
180
|
openapi: {
|
|
181
181
|
operationId: string;
|
|
@@ -252,7 +252,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
252
252
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
253
253
|
data: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
|
|
254
254
|
}, import("zod/v4/core").$strip>;
|
|
255
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
255
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
256
256
|
session: {
|
|
257
257
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
258
258
|
session: {
|
|
@@ -266,7 +266,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
266
266
|
userAgent?: string | null | undefined;
|
|
267
267
|
};
|
|
268
268
|
};
|
|
269
|
-
}
|
|
269
|
+
}>>[];
|
|
270
270
|
metadata: {
|
|
271
271
|
openapi: {
|
|
272
272
|
operationId: string;
|
|
@@ -294,7 +294,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
294
294
|
}, import("better-auth/client/plugins").UserWithRole>;
|
|
295
295
|
listUsers: import("better-call").StrictEndpoint<"/admin/list-users", {
|
|
296
296
|
method: "GET";
|
|
297
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
297
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
298
298
|
session: {
|
|
299
299
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
300
300
|
session: {
|
|
@@ -308,7 +308,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
308
308
|
userAgent?: string | null | undefined;
|
|
309
309
|
};
|
|
310
310
|
};
|
|
311
|
-
}
|
|
311
|
+
}>>[];
|
|
312
312
|
query: import("zod").ZodObject<{
|
|
313
313
|
searchValue: import("zod").ZodOptional<import("zod").ZodString>;
|
|
314
314
|
searchField: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -330,13 +330,13 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
330
330
|
filterField: import("zod").ZodOptional<import("zod").ZodString>;
|
|
331
331
|
filterValue: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, import("zod").ZodBoolean]>, import("zod").ZodArray<import("zod").ZodString>]>, import("zod").ZodArray<import("zod").ZodNumber>]>>;
|
|
332
332
|
filterOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
333
|
+
in: "in";
|
|
334
|
+
lte: "lte";
|
|
333
335
|
eq: "eq";
|
|
334
336
|
ne: "ne";
|
|
337
|
+
lt: "lt";
|
|
335
338
|
gt: "gt";
|
|
336
339
|
gte: "gte";
|
|
337
|
-
lt: "lt";
|
|
338
|
-
lte: "lte";
|
|
339
|
-
in: "in";
|
|
340
340
|
not_in: "not_in";
|
|
341
341
|
contains: "contains";
|
|
342
342
|
starts_with: "starts_with";
|
|
@@ -386,7 +386,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
386
386
|
}>;
|
|
387
387
|
listUserSessions: import("better-call").StrictEndpoint<"/admin/list-user-sessions", {
|
|
388
388
|
method: "POST";
|
|
389
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
389
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
390
390
|
session: {
|
|
391
391
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
392
392
|
session: {
|
|
@@ -400,7 +400,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
400
400
|
userAgent?: string | null | undefined;
|
|
401
401
|
};
|
|
402
402
|
};
|
|
403
|
-
}
|
|
403
|
+
}>>[];
|
|
404
404
|
body: import("zod").ZodObject<{
|
|
405
405
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
406
406
|
}, import("zod/v4/core").$strip>;
|
|
@@ -439,7 +439,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
439
439
|
body: import("zod").ZodObject<{
|
|
440
440
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
441
441
|
}, import("zod/v4/core").$strip>;
|
|
442
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
442
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
443
443
|
session: {
|
|
444
444
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
445
445
|
session: {
|
|
@@ -453,7 +453,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
453
453
|
userAgent?: string | null | undefined;
|
|
454
454
|
};
|
|
455
455
|
};
|
|
456
|
-
}
|
|
456
|
+
}>>[];
|
|
457
457
|
metadata: {
|
|
458
458
|
openapi: {
|
|
459
459
|
operationId: string;
|
|
@@ -488,7 +488,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
488
488
|
banReason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
489
489
|
banExpiresIn: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
490
490
|
}, import("zod/v4/core").$strip>;
|
|
491
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
491
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
492
492
|
session: {
|
|
493
493
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
494
494
|
session: {
|
|
@@ -502,7 +502,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
502
502
|
userAgent?: string | null | undefined;
|
|
503
503
|
};
|
|
504
504
|
};
|
|
505
|
-
}
|
|
505
|
+
}>>[];
|
|
506
506
|
metadata: {
|
|
507
507
|
openapi: {
|
|
508
508
|
operationId: string;
|
|
@@ -535,7 +535,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
535
535
|
body: import("zod").ZodObject<{
|
|
536
536
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
537
537
|
}, import("zod/v4/core").$strip>;
|
|
538
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
538
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
539
539
|
session: {
|
|
540
540
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
541
541
|
session: {
|
|
@@ -549,7 +549,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
549
549
|
userAgent?: string | null | undefined;
|
|
550
550
|
};
|
|
551
551
|
};
|
|
552
|
-
}
|
|
552
|
+
}>>[];
|
|
553
553
|
metadata: {
|
|
554
554
|
openapi: {
|
|
555
555
|
operationId: string;
|
|
@@ -619,7 +619,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
619
619
|
body: import("zod").ZodObject<{
|
|
620
620
|
sessionToken: import("zod").ZodString;
|
|
621
621
|
}, import("zod/v4/core").$strip>;
|
|
622
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
622
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
623
623
|
session: {
|
|
624
624
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
625
625
|
session: {
|
|
@@ -633,7 +633,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
633
633
|
userAgent?: string | null | undefined;
|
|
634
634
|
};
|
|
635
635
|
};
|
|
636
|
-
}
|
|
636
|
+
}>>[];
|
|
637
637
|
metadata: {
|
|
638
638
|
openapi: {
|
|
639
639
|
operationId: string;
|
|
@@ -666,7 +666,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
666
666
|
body: import("zod").ZodObject<{
|
|
667
667
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
668
668
|
}, import("zod/v4/core").$strip>;
|
|
669
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
669
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
670
670
|
session: {
|
|
671
671
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
672
672
|
session: {
|
|
@@ -680,7 +680,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
680
680
|
userAgent?: string | null | undefined;
|
|
681
681
|
};
|
|
682
682
|
};
|
|
683
|
-
}
|
|
683
|
+
}>>[];
|
|
684
684
|
metadata: {
|
|
685
685
|
openapi: {
|
|
686
686
|
operationId: string;
|
|
@@ -713,7 +713,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
713
713
|
body: import("zod").ZodObject<{
|
|
714
714
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
715
715
|
}, import("zod/v4/core").$strip>;
|
|
716
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
716
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
717
717
|
session: {
|
|
718
718
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
719
719
|
session: {
|
|
@@ -727,7 +727,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
727
727
|
userAgent?: string | null | undefined;
|
|
728
728
|
};
|
|
729
729
|
};
|
|
730
|
-
}
|
|
730
|
+
}>>[];
|
|
731
731
|
metadata: {
|
|
732
732
|
openapi: {
|
|
733
733
|
operationId: string;
|
|
@@ -761,7 +761,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
761
761
|
newPassword: import("zod").ZodString;
|
|
762
762
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
763
763
|
}, import("zod/v4/core").$strip>;
|
|
764
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
764
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
765
765
|
session: {
|
|
766
766
|
user: import("better-auth/client/plugins").UserWithRole;
|
|
767
767
|
session: {
|
|
@@ -775,7 +775,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
775
775
|
userAgent?: string | null | undefined;
|
|
776
776
|
};
|
|
777
777
|
};
|
|
778
|
-
}
|
|
778
|
+
}>>[];
|
|
779
779
|
metadata: {
|
|
780
780
|
openapi: {
|
|
781
781
|
operationId: string;
|
|
@@ -1000,12 +1000,20 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1000
1000
|
method: "POST";
|
|
1001
1001
|
body: import("zod").ZodObject<{
|
|
1002
1002
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1003
|
+
method: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1004
|
+
otp: "otp";
|
|
1005
|
+
totp: "totp";
|
|
1006
|
+
}>>;
|
|
1003
1007
|
issuer: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1004
1008
|
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
1005
1009
|
password: import("zod").ZodString;
|
|
1010
|
+
method: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1011
|
+
otp: "otp";
|
|
1012
|
+
totp: "totp";
|
|
1013
|
+
}>>;
|
|
1006
1014
|
issuer: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1007
1015
|
}, import("zod/v4/core").$strip>;
|
|
1008
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1016
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1009
1017
|
session: {
|
|
1010
1018
|
session: Record<string, any> & {
|
|
1011
1019
|
id: string;
|
|
@@ -1027,7 +1035,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1027
1035
|
image?: string | null | undefined;
|
|
1028
1036
|
};
|
|
1029
1037
|
};
|
|
1030
|
-
}
|
|
1038
|
+
}>>[];
|
|
1031
1039
|
metadata: {
|
|
1032
1040
|
openapi: {
|
|
1033
1041
|
summary: string;
|
|
@@ -1040,6 +1048,11 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1040
1048
|
schema: {
|
|
1041
1049
|
type: "object";
|
|
1042
1050
|
properties: {
|
|
1051
|
+
method: {
|
|
1052
|
+
type: string;
|
|
1053
|
+
enum: string[];
|
|
1054
|
+
description: string;
|
|
1055
|
+
};
|
|
1043
1056
|
totpURI: {
|
|
1044
1057
|
type: string;
|
|
1045
1058
|
description: string;
|
|
@@ -1052,6 +1065,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1052
1065
|
description: string;
|
|
1053
1066
|
};
|
|
1054
1067
|
};
|
|
1068
|
+
required: string[];
|
|
1055
1069
|
};
|
|
1056
1070
|
};
|
|
1057
1071
|
};
|
|
@@ -1060,6 +1074,9 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1060
1074
|
};
|
|
1061
1075
|
};
|
|
1062
1076
|
}, {
|
|
1077
|
+
method: "otp";
|
|
1078
|
+
} | {
|
|
1079
|
+
method: "totp";
|
|
1063
1080
|
totpURI: string;
|
|
1064
1081
|
backupCodes: string[];
|
|
1065
1082
|
}>;
|
|
@@ -1070,7 +1087,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1070
1087
|
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
1071
1088
|
password: import("zod").ZodString;
|
|
1072
1089
|
}, import("zod/v4/core").$strip>;
|
|
1073
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1090
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1074
1091
|
session: {
|
|
1075
1092
|
session: Record<string, any> & {
|
|
1076
1093
|
id: string;
|
|
@@ -1092,7 +1109,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1092
1109
|
image?: string | null | undefined;
|
|
1093
1110
|
};
|
|
1094
1111
|
};
|
|
1095
|
-
}
|
|
1112
|
+
}>>[];
|
|
1096
1113
|
metadata: {
|
|
1097
1114
|
openapi: {
|
|
1098
1115
|
summary: string;
|
|
@@ -1237,7 +1254,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1237
1254
|
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
1238
1255
|
password: import("zod").ZodString;
|
|
1239
1256
|
}, import("zod/v4/core").$strip>;
|
|
1240
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1257
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1241
1258
|
session: {
|
|
1242
1259
|
session: Record<string, any> & {
|
|
1243
1260
|
id: string;
|
|
@@ -1259,7 +1276,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1259
1276
|
image?: string | null | undefined;
|
|
1260
1277
|
};
|
|
1261
1278
|
};
|
|
1262
|
-
}
|
|
1279
|
+
}>>[];
|
|
1263
1280
|
metadata: {
|
|
1264
1281
|
openapi: {
|
|
1265
1282
|
description: string;
|
|
@@ -1458,7 +1475,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1458
1475
|
}>;
|
|
1459
1476
|
getTOTPURI: import("better-call").StrictEndpoint<"/two-factor/get-totp-uri", {
|
|
1460
1477
|
method: "POST";
|
|
1461
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1478
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1462
1479
|
session: {
|
|
1463
1480
|
session: Record<string, any> & {
|
|
1464
1481
|
id: string;
|
|
@@ -1480,7 +1497,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1480
1497
|
image?: string | null | undefined;
|
|
1481
1498
|
};
|
|
1482
1499
|
};
|
|
1483
|
-
}
|
|
1500
|
+
}>>[];
|
|
1484
1501
|
body: import("zod").ZodObject<{
|
|
1485
1502
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1486
1503
|
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
@@ -1561,10 +1578,10 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1561
1578
|
hooks: {
|
|
1562
1579
|
after: {
|
|
1563
1580
|
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
1564
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1581
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1565
1582
|
twoFactorRedirect: boolean;
|
|
1566
1583
|
twoFactorMethods: string[];
|
|
1567
|
-
} | undefined
|
|
1584
|
+
} | undefined>>;
|
|
1568
1585
|
}[];
|
|
1569
1586
|
};
|
|
1570
1587
|
schema: {
|
|
@@ -1630,8 +1647,11 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1630
1647
|
}[];
|
|
1631
1648
|
$ERROR_CODES: {
|
|
1632
1649
|
OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
|
|
1650
|
+
OTP_NOT_CONFIGURED: import("better-auth").RawError<"OTP_NOT_CONFIGURED">;
|
|
1633
1651
|
OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
|
|
1634
1652
|
TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
|
|
1653
|
+
TOTP_ALREADY_ENABLED: import("better-auth").RawError<"TOTP_ALREADY_ENABLED">;
|
|
1654
|
+
TOTP_NOT_CONFIGURED: import("better-auth").RawError<"TOTP_NOT_CONFIGURED">;
|
|
1635
1655
|
TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
1636
1656
|
BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
1637
1657
|
INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
|
|
@@ -1664,8 +1684,11 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1664
1684
|
}[];
|
|
1665
1685
|
$ERROR_CODES: {
|
|
1666
1686
|
OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
|
|
1687
|
+
OTP_NOT_CONFIGURED: import("better-auth").RawError<"OTP_NOT_CONFIGURED">;
|
|
1667
1688
|
OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
|
|
1668
1689
|
TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
|
|
1690
|
+
TOTP_ALREADY_ENABLED: import("better-auth").RawError<"TOTP_ALREADY_ENABLED">;
|
|
1691
|
+
TOTP_NOT_CONFIGURED: import("better-auth").RawError<"TOTP_NOT_CONFIGURED">;
|
|
1669
1692
|
TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
1670
1693
|
BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
1671
1694
|
INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
|
|
@@ -1684,6 +1707,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1684
1707
|
signInMagicLink: import("better-call").StrictEndpoint<"/sign-in/magic-link", {
|
|
1685
1708
|
method: "POST";
|
|
1686
1709
|
requireHeaders: true;
|
|
1710
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1687
1711
|
body: import("zod").ZodObject<{
|
|
1688
1712
|
email: import("zod").ZodEmail;
|
|
1689
1713
|
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1726,7 +1750,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1726
1750
|
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1727
1751
|
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1728
1752
|
}, import("zod/v4/core").$strip>;
|
|
1729
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
1753
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1730
1754
|
requireHeaders: true;
|
|
1731
1755
|
metadata: {
|
|
1732
1756
|
openapi: {
|
|
@@ -1804,6 +1828,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1804
1828
|
endpoints: {
|
|
1805
1829
|
sendVerificationOTP: import("better-call").StrictEndpoint<"/email-otp/send-verification-otp", {
|
|
1806
1830
|
method: "POST";
|
|
1831
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1807
1832
|
body: import("zod").ZodObject<{
|
|
1808
1833
|
email: import("zod").ZodString;
|
|
1809
1834
|
type: import("zod").ZodEnum<{
|
|
@@ -2164,7 +2189,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2164
2189
|
newEmail: import("zod").ZodString;
|
|
2165
2190
|
otp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2166
2191
|
}, import("zod/v4/core").$strip>;
|
|
2167
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2192
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2168
2193
|
session: {
|
|
2169
2194
|
session: Record<string, any> & {
|
|
2170
2195
|
id: string;
|
|
@@ -2186,7 +2211,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2186
2211
|
image?: string | null | undefined;
|
|
2187
2212
|
};
|
|
2188
2213
|
};
|
|
2189
|
-
}
|
|
2214
|
+
}>>[];
|
|
2190
2215
|
metadata: {
|
|
2191
2216
|
openapi: {
|
|
2192
2217
|
operationId: string;
|
|
@@ -2219,7 +2244,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2219
2244
|
newEmail: import("zod").ZodString;
|
|
2220
2245
|
otp: import("zod").ZodString;
|
|
2221
2246
|
}, import("zod/v4/core").$strip>;
|
|
2222
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2247
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2223
2248
|
session: {
|
|
2224
2249
|
session: Record<string, any> & {
|
|
2225
2250
|
id: string;
|
|
@@ -2241,7 +2266,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2241
2266
|
image?: string | null | undefined;
|
|
2242
2267
|
};
|
|
2243
2268
|
};
|
|
2244
|
-
}
|
|
2269
|
+
}>>[];
|
|
2245
2270
|
metadata: {
|
|
2246
2271
|
openapi: {
|
|
2247
2272
|
operationId: string;
|
|
@@ -2272,7 +2297,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2272
2297
|
hooks: {
|
|
2273
2298
|
after: {
|
|
2274
2299
|
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
2275
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
2300
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
2276
2301
|
}[];
|
|
2277
2302
|
};
|
|
2278
2303
|
rateLimit: ({
|
|
@@ -2331,7 +2356,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2331
2356
|
} | {
|
|
2332
2357
|
id: "username";
|
|
2333
2358
|
version: string;
|
|
2334
|
-
$InferServerPlugin:
|
|
2359
|
+
$InferServerPlugin: {
|
|
2335
2360
|
id: "username";
|
|
2336
2361
|
version: string;
|
|
2337
2362
|
init(ctx: import("better-auth").AuthContext): {
|
|
@@ -2349,8 +2374,8 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2349
2374
|
image?: string | null | undefined;
|
|
2350
2375
|
} & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
|
|
2351
2376
|
data: {
|
|
2377
|
+
displayUsername?: string | undefined;
|
|
2352
2378
|
username: string;
|
|
2353
|
-
displayUsername: string;
|
|
2354
2379
|
id: string;
|
|
2355
2380
|
createdAt: Date;
|
|
2356
2381
|
updatedAt: Date;
|
|
@@ -2507,14 +2532,14 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2507
2532
|
unique: true;
|
|
2508
2533
|
returned: true;
|
|
2509
2534
|
transform: {
|
|
2510
|
-
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> |
|
|
2535
|
+
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | unknown[] | Record<string, unknown> | null | undefined;
|
|
2511
2536
|
};
|
|
2512
2537
|
};
|
|
2513
2538
|
displayUsername: {
|
|
2514
2539
|
type: "string";
|
|
2515
2540
|
required: false;
|
|
2516
2541
|
transform: {
|
|
2517
|
-
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> |
|
|
2542
|
+
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | unknown[] | Record<string, unknown> | null | undefined;
|
|
2518
2543
|
};
|
|
2519
2544
|
};
|
|
2520
2545
|
};
|
|
@@ -2523,7 +2548,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2523
2548
|
hooks: {
|
|
2524
2549
|
before: {
|
|
2525
2550
|
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
2526
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
2551
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
2527
2552
|
}[];
|
|
2528
2553
|
};
|
|
2529
2554
|
options: import("better-auth/plugins/username").UsernameOptions | undefined;
|
|
@@ -2536,8 +2561,9 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2536
2561
|
USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
|
|
2537
2562
|
INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
|
|
2538
2563
|
INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
|
|
2564
|
+
USERNAME_IS_IMMUTABLE: import("better-auth").RawError<"USERNAME_IS_IMMUTABLE">;
|
|
2539
2565
|
};
|
|
2540
|
-
}
|
|
2566
|
+
};
|
|
2541
2567
|
atomListeners: {
|
|
2542
2568
|
matcher: (path: string) => path is "/sign-in/username";
|
|
2543
2569
|
signal: "$sessionSignal";
|
|
@@ -2551,6 +2577,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2551
2577
|
USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
|
|
2552
2578
|
INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
|
|
2553
2579
|
INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
|
|
2580
|
+
USERNAME_IS_IMMUTABLE: import("better-auth").RawError<"USERNAME_IS_IMMUTABLE">;
|
|
2554
2581
|
};
|
|
2555
2582
|
} | {
|
|
2556
2583
|
id: "multi-session";
|
|
@@ -2638,7 +2665,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2638
2665
|
sessionToken: import("zod").ZodString;
|
|
2639
2666
|
}, import("zod/v4/core").$strip>;
|
|
2640
2667
|
requireHeaders: true;
|
|
2641
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2668
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2642
2669
|
session: {
|
|
2643
2670
|
session: Record<string, any> & {
|
|
2644
2671
|
id: string;
|
|
@@ -2660,7 +2687,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2660
2687
|
image?: string | null | undefined;
|
|
2661
2688
|
};
|
|
2662
2689
|
};
|
|
2663
|
-
}
|
|
2690
|
+
}>>[];
|
|
2664
2691
|
metadata: {
|
|
2665
2692
|
openapi: {
|
|
2666
2693
|
description: string;
|
|
@@ -2690,7 +2717,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2690
2717
|
hooks: {
|
|
2691
2718
|
after: {
|
|
2692
2719
|
matcher: (context: import("better-auth").HookEndpointContext) => boolean;
|
|
2693
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
2720
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
2694
2721
|
}[];
|
|
2695
2722
|
};
|
|
2696
2723
|
options: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined;
|
|
@@ -2744,7 +2771,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2744
2771
|
hooks: {
|
|
2745
2772
|
before: {
|
|
2746
2773
|
matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
|
|
2747
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<never
|
|
2774
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<never>>;
|
|
2748
2775
|
}[];
|
|
2749
2776
|
};
|
|
2750
2777
|
endpoints: {
|
|
@@ -2819,6 +2846,18 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2819
2846
|
}, {
|
|
2820
2847
|
message: string;
|
|
2821
2848
|
}>;
|
|
2849
|
+
consumePhoneNumberOTP: import("better-call").StrictEndpoint<string, {
|
|
2850
|
+
method: "POST";
|
|
2851
|
+
body: import("zod").ZodObject<{
|
|
2852
|
+
phoneNumber: import("zod").ZodString;
|
|
2853
|
+
code: import("zod").ZodString;
|
|
2854
|
+
}, import("zod/v4/core").$strip>;
|
|
2855
|
+
metadata: {
|
|
2856
|
+
readonly scope: "server";
|
|
2857
|
+
};
|
|
2858
|
+
}, {
|
|
2859
|
+
status: boolean;
|
|
2860
|
+
}>;
|
|
2822
2861
|
verifyPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/verify", {
|
|
2823
2862
|
method: "POST";
|
|
2824
2863
|
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
@@ -3099,7 +3138,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3099
3138
|
hooks: {
|
|
3100
3139
|
before: {
|
|
3101
3140
|
matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
|
|
3102
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3141
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3103
3142
|
user: {
|
|
3104
3143
|
id: string;
|
|
3105
3144
|
createdAt: Date;
|
|
@@ -3120,10 +3159,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3120
3159
|
expiresAt: Date;
|
|
3121
3160
|
};
|
|
3122
3161
|
} | {
|
|
3123
|
-
context: import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, {
|
|
3124
|
-
returned?: unknown | undefined;
|
|
3125
|
-
responseHeaders?: Headers | undefined;
|
|
3126
|
-
} & import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
|
|
3162
|
+
context: import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
|
|
3127
3163
|
options: import("better-auth").BetterAuthOptions;
|
|
3128
3164
|
trustedOrigins: string[];
|
|
3129
3165
|
trustedProviders: string[];
|
|
@@ -3207,6 +3243,8 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3207
3243
|
storage: "memory" | "database" | "secondary-storage";
|
|
3208
3244
|
} & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
|
|
3209
3245
|
adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
|
|
3246
|
+
checkSchema?: import("@better-auth/core/db/internal").SchemaCheck | undefined;
|
|
3247
|
+
explicitSchemaCheck?: import("@better-auth/core/db/internal").SchemaCheck | undefined;
|
|
3210
3248
|
internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
|
|
3211
3249
|
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-call").CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
|
|
3212
3250
|
secret: string;
|
|
@@ -3215,6 +3253,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3215
3253
|
updateAge: number;
|
|
3216
3254
|
expiresIn: number;
|
|
3217
3255
|
freshAge: number;
|
|
3256
|
+
cookieCacheSigner?: import("better-auth").CookieCacheSigner | undefined;
|
|
3218
3257
|
cookieRefreshCache: false | {
|
|
3219
3258
|
enabled: true;
|
|
3220
3259
|
updateAge: number;
|
|
@@ -3248,8 +3287,11 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3248
3287
|
skipCSRFCheck: boolean;
|
|
3249
3288
|
runInBackground: (promise: Promise<unknown>) => void;
|
|
3250
3289
|
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
|
|
3290
|
+
} & {
|
|
3291
|
+
returned?: unknown | undefined;
|
|
3292
|
+
responseHeaders?: Headers | undefined;
|
|
3251
3293
|
}>;
|
|
3252
|
-
}
|
|
3294
|
+
}>>;
|
|
3253
3295
|
}[];
|
|
3254
3296
|
};
|
|
3255
3297
|
endpoints: {
|
|
@@ -3464,7 +3506,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3464
3506
|
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3465
3507
|
id: import("zod").ZodString;
|
|
3466
3508
|
}, import("zod/v4/core").$strip>;
|
|
3467
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3509
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3468
3510
|
session: {
|
|
3469
3511
|
session: Record<string, any> & {
|
|
3470
3512
|
id: string;
|
|
@@ -3486,7 +3528,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3486
3528
|
image?: string | null | undefined;
|
|
3487
3529
|
};
|
|
3488
3530
|
};
|
|
3489
|
-
}
|
|
3531
|
+
}>>[];
|
|
3490
3532
|
metadata: {
|
|
3491
3533
|
openapi: {
|
|
3492
3534
|
description: string;
|
|
@@ -3801,7 +3843,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3801
3843
|
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3802
3844
|
keyId: import("zod").ZodString;
|
|
3803
3845
|
}, import("zod/v4/core").$strip>;
|
|
3804
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3846
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3805
3847
|
session: {
|
|
3806
3848
|
session: Record<string, any> & {
|
|
3807
3849
|
id: string;
|
|
@@ -3823,7 +3865,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3823
3865
|
image?: string | null | undefined;
|
|
3824
3866
|
};
|
|
3825
3867
|
};
|
|
3826
|
-
}
|
|
3868
|
+
}>>[];
|
|
3827
3869
|
metadata: {
|
|
3828
3870
|
openapi: {
|
|
3829
3871
|
description: string;
|
|
@@ -3869,7 +3911,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3869
3911
|
}>;
|
|
3870
3912
|
listApiKeys: import("better-call").StrictEndpoint<"/api-key/list", {
|
|
3871
3913
|
method: "GET";
|
|
3872
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3914
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3873
3915
|
session: {
|
|
3874
3916
|
session: Record<string, any> & {
|
|
3875
3917
|
id: string;
|
|
@@ -3891,7 +3933,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3891
3933
|
image?: string | null | undefined;
|
|
3892
3934
|
};
|
|
3893
3935
|
};
|
|
3894
|
-
}
|
|
3936
|
+
}>>[];
|
|
3895
3937
|
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
3896
3938
|
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3897
3939
|
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -4255,7 +4297,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4255
4297
|
endpoints: {
|
|
4256
4298
|
generatePasskeyRegistrationOptions: import("better-call").StrictEndpoint<"/passkey/generate-register-options", {
|
|
4257
4299
|
method: "GET";
|
|
4258
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4300
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4259
4301
|
session: {
|
|
4260
4302
|
session: Record<string, any> & {
|
|
4261
4303
|
id: string;
|
|
@@ -4277,7 +4319,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4277
4319
|
image?: string | null | undefined;
|
|
4278
4320
|
};
|
|
4279
4321
|
};
|
|
4280
|
-
}
|
|
4322
|
+
}>>[];
|
|
4281
4323
|
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
4282
4324
|
authenticatorAttachment: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
4283
4325
|
platform: "platform";
|
|
@@ -4290,15 +4332,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4290
4332
|
openapi: {
|
|
4291
4333
|
operationId: string;
|
|
4292
4334
|
description: string;
|
|
4293
|
-
parameters:
|
|
4294
|
-
name: string;
|
|
4295
|
-
in: "query";
|
|
4296
|
-
required: false;
|
|
4297
|
-
description: string;
|
|
4298
|
-
schema: {
|
|
4299
|
-
type: "string";
|
|
4300
|
-
};
|
|
4301
|
-
}[];
|
|
4335
|
+
parameters: import("better-call").OpenAPIParameter[];
|
|
4302
4336
|
responses: {
|
|
4303
4337
|
200: {
|
|
4304
4338
|
description: string;
|
|
@@ -4500,8 +4534,9 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4500
4534
|
body: import("zod").ZodObject<{
|
|
4501
4535
|
response: import("zod").ZodAny;
|
|
4502
4536
|
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4537
|
+
createSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
4503
4538
|
}, import("zod/v4/core").$strip>;
|
|
4504
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4539
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4505
4540
|
session: {
|
|
4506
4541
|
session: Record<string, any> & {
|
|
4507
4542
|
id: string;
|
|
@@ -4523,7 +4558,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4523
4558
|
image?: string | null | undefined;
|
|
4524
4559
|
};
|
|
4525
4560
|
};
|
|
4526
|
-
}
|
|
4561
|
+
}>>[];
|
|
4527
4562
|
metadata: {
|
|
4528
4563
|
openapi: {
|
|
4529
4564
|
operationId: string;
|
|
@@ -4534,7 +4569,20 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4534
4569
|
content: {
|
|
4535
4570
|
"application/json": {
|
|
4536
4571
|
schema: {
|
|
4537
|
-
|
|
4572
|
+
readonly type: "object";
|
|
4573
|
+
readonly allOf: readonly [{
|
|
4574
|
+
readonly $ref: "#/components/schemas/Passkey";
|
|
4575
|
+
}, {
|
|
4576
|
+
readonly type: "object";
|
|
4577
|
+
readonly properties: {
|
|
4578
|
+
readonly session: {
|
|
4579
|
+
readonly $ref: "#/components/schemas/Session";
|
|
4580
|
+
};
|
|
4581
|
+
readonly user: {
|
|
4582
|
+
readonly $ref: "#/components/schemas/User";
|
|
4583
|
+
};
|
|
4584
|
+
};
|
|
4585
|
+
}];
|
|
4538
4586
|
};
|
|
4539
4587
|
};
|
|
4540
4588
|
};
|
|
@@ -4605,7 +4653,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4605
4653
|
}>;
|
|
4606
4654
|
listPasskeys: import("better-call").StrictEndpoint<"/passkey/list-user-passkeys", {
|
|
4607
4655
|
method: "GET";
|
|
4608
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4656
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4609
4657
|
session: {
|
|
4610
4658
|
session: Record<string, any> & {
|
|
4611
4659
|
id: string;
|
|
@@ -4627,7 +4675,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4627
4675
|
image?: string | null | undefined;
|
|
4628
4676
|
};
|
|
4629
4677
|
};
|
|
4630
|
-
}
|
|
4678
|
+
}>>[];
|
|
4631
4679
|
metadata: {
|
|
4632
4680
|
openapi: {
|
|
4633
4681
|
description: string;
|
|
@@ -4656,7 +4704,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4656
4704
|
body: import("zod").ZodObject<{
|
|
4657
4705
|
id: import("zod").ZodString;
|
|
4658
4706
|
}, import("zod/v4/core").$strip>;
|
|
4659
|
-
use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4707
|
+
use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4660
4708
|
session: {
|
|
4661
4709
|
session: Record<string, any> & {
|
|
4662
4710
|
id: string;
|
|
@@ -4678,9 +4726,9 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4678
4726
|
image?: string | null | undefined;
|
|
4679
4727
|
};
|
|
4680
4728
|
};
|
|
4681
|
-
}
|
|
4729
|
+
}>> | import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4682
4730
|
verifiedResource: {};
|
|
4683
|
-
}
|
|
4731
|
+
}>>)[];
|
|
4684
4732
|
metadata: {
|
|
4685
4733
|
openapi: {
|
|
4686
4734
|
description: string;
|
|
@@ -4714,7 +4762,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4714
4762
|
id: import("zod").ZodString;
|
|
4715
4763
|
name: import("zod").ZodString;
|
|
4716
4764
|
}, import("zod/v4/core").$strip>;
|
|
4717
|
-
use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4765
|
+
use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4718
4766
|
session: {
|
|
4719
4767
|
session: Record<string, any> & {
|
|
4720
4768
|
id: string;
|
|
@@ -4736,9 +4784,9 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4736
4784
|
image?: string | null | undefined;
|
|
4737
4785
|
};
|
|
4738
4786
|
};
|
|
4739
|
-
}
|
|
4787
|
+
}>> | import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4740
4788
|
verifiedResource: {};
|
|
4741
|
-
}
|
|
4789
|
+
}>>)[];
|
|
4742
4790
|
metadata: {
|
|
4743
4791
|
openapi: {
|
|
4744
4792
|
description: string;
|
|
@@ -4825,6 +4873,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4825
4873
|
PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
|
|
4826
4874
|
AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
|
|
4827
4875
|
UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
|
|
4876
|
+
USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
|
|
4828
4877
|
FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
|
|
4829
4878
|
PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
|
|
4830
4879
|
REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
|
|
@@ -4893,6 +4942,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4893
4942
|
name?: string;
|
|
4894
4943
|
authenticatorAttachment?: "platform" | "cross-platform";
|
|
4895
4944
|
context?: string | null;
|
|
4945
|
+
createSession?: boolean;
|
|
4896
4946
|
extensions?: import("@simplewebauthn/server").AuthenticationExtensionsClientInputs;
|
|
4897
4947
|
useAutoRegister?: boolean;
|
|
4898
4948
|
returnWebAuthnResponse?: boolean;
|
|
@@ -4904,14 +4954,20 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4904
4954
|
statusText: string;
|
|
4905
4955
|
};
|
|
4906
4956
|
} | {
|
|
4907
|
-
data: import("@better-auth/passkey/client").Passkey
|
|
4957
|
+
data: import("@better-auth/passkey/client").Passkey & {
|
|
4958
|
+
session?: import("better-auth").Session;
|
|
4959
|
+
user?: import("better-auth").User;
|
|
4960
|
+
};
|
|
4908
4961
|
error: null;
|
|
4909
4962
|
} | {
|
|
4910
4963
|
webauthn: {
|
|
4911
4964
|
response: import("@simplewebauthn/server").RegistrationResponseJSON;
|
|
4912
4965
|
clientExtensionResults: import("@simplewebauthn/server").AuthenticationExtensionsClientOutputs;
|
|
4913
4966
|
};
|
|
4914
|
-
data: import("@better-auth/passkey/client").Passkey
|
|
4967
|
+
data: import("@better-auth/passkey/client").Passkey & {
|
|
4968
|
+
session?: import("better-auth").Session;
|
|
4969
|
+
user?: import("better-auth").User;
|
|
4970
|
+
};
|
|
4915
4971
|
error: null;
|
|
4916
4972
|
} | {
|
|
4917
4973
|
data: null;
|
|
@@ -4949,6 +5005,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4949
5005
|
PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
|
|
4950
5006
|
AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
|
|
4951
5007
|
UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
|
|
5008
|
+
USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
|
|
4952
5009
|
FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
|
|
4953
5010
|
PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
|
|
4954
5011
|
REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podosoft/podokit-api-client",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Typed API client for PodoKit backends: better-auth (auth + admin) plus a standard error-envelope request layer.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@podosoft/podokit-contracts": "^0.4.0",
|
|
33
|
-
"better-auth": "^1.
|
|
34
|
-
"@better-auth/api-key": "^1.
|
|
35
|
-
"@better-auth/passkey": "^1.
|
|
33
|
+
"better-auth": "^1.7.4",
|
|
34
|
+
"@better-auth/api-key": "^1.7.4",
|
|
35
|
+
"@better-auth/passkey": "^1.7.4"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsc -p tsconfig.json",
|