@podosoft/podokit-api-client 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +138 -85
- 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<{
|
|
@@ -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,10 @@ 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_NOT_CONFIGURED: import("better-auth").RawError<"TOTP_NOT_CONFIGURED">;
|
|
1635
1654
|
TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
1636
1655
|
BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
1637
1656
|
INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
|
|
@@ -1664,8 +1683,10 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1664
1683
|
}[];
|
|
1665
1684
|
$ERROR_CODES: {
|
|
1666
1685
|
OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
|
|
1686
|
+
OTP_NOT_CONFIGURED: import("better-auth").RawError<"OTP_NOT_CONFIGURED">;
|
|
1667
1687
|
OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
|
|
1668
1688
|
TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
|
|
1689
|
+
TOTP_NOT_CONFIGURED: import("better-auth").RawError<"TOTP_NOT_CONFIGURED">;
|
|
1669
1690
|
TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
1670
1691
|
BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
1671
1692
|
INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
|
|
@@ -1684,6 +1705,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1684
1705
|
signInMagicLink: import("better-call").StrictEndpoint<"/sign-in/magic-link", {
|
|
1685
1706
|
method: "POST";
|
|
1686
1707
|
requireHeaders: true;
|
|
1708
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1687
1709
|
body: import("zod").ZodObject<{
|
|
1688
1710
|
email: import("zod").ZodEmail;
|
|
1689
1711
|
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1726,7 +1748,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1726
1748
|
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1727
1749
|
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1728
1750
|
}, import("zod/v4/core").$strip>;
|
|
1729
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
1751
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1730
1752
|
requireHeaders: true;
|
|
1731
1753
|
metadata: {
|
|
1732
1754
|
openapi: {
|
|
@@ -1804,6 +1826,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1804
1826
|
endpoints: {
|
|
1805
1827
|
sendVerificationOTP: import("better-call").StrictEndpoint<"/email-otp/send-verification-otp", {
|
|
1806
1828
|
method: "POST";
|
|
1829
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1807
1830
|
body: import("zod").ZodObject<{
|
|
1808
1831
|
email: import("zod").ZodString;
|
|
1809
1832
|
type: import("zod").ZodEnum<{
|
|
@@ -2164,7 +2187,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2164
2187
|
newEmail: import("zod").ZodString;
|
|
2165
2188
|
otp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2166
2189
|
}, import("zod/v4/core").$strip>;
|
|
2167
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2190
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2168
2191
|
session: {
|
|
2169
2192
|
session: Record<string, any> & {
|
|
2170
2193
|
id: string;
|
|
@@ -2186,7 +2209,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2186
2209
|
image?: string | null | undefined;
|
|
2187
2210
|
};
|
|
2188
2211
|
};
|
|
2189
|
-
}
|
|
2212
|
+
}>>[];
|
|
2190
2213
|
metadata: {
|
|
2191
2214
|
openapi: {
|
|
2192
2215
|
operationId: string;
|
|
@@ -2219,7 +2242,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2219
2242
|
newEmail: import("zod").ZodString;
|
|
2220
2243
|
otp: import("zod").ZodString;
|
|
2221
2244
|
}, import("zod/v4/core").$strip>;
|
|
2222
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2245
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2223
2246
|
session: {
|
|
2224
2247
|
session: Record<string, any> & {
|
|
2225
2248
|
id: string;
|
|
@@ -2241,7 +2264,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2241
2264
|
image?: string | null | undefined;
|
|
2242
2265
|
};
|
|
2243
2266
|
};
|
|
2244
|
-
}
|
|
2267
|
+
}>>[];
|
|
2245
2268
|
metadata: {
|
|
2246
2269
|
openapi: {
|
|
2247
2270
|
operationId: string;
|
|
@@ -2272,7 +2295,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2272
2295
|
hooks: {
|
|
2273
2296
|
after: {
|
|
2274
2297
|
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
2275
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
2298
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
2276
2299
|
}[];
|
|
2277
2300
|
};
|
|
2278
2301
|
rateLimit: ({
|
|
@@ -2331,7 +2354,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2331
2354
|
} | {
|
|
2332
2355
|
id: "username";
|
|
2333
2356
|
version: string;
|
|
2334
|
-
$InferServerPlugin:
|
|
2357
|
+
$InferServerPlugin: {
|
|
2335
2358
|
id: "username";
|
|
2336
2359
|
version: string;
|
|
2337
2360
|
init(ctx: import("better-auth").AuthContext): {
|
|
@@ -2349,8 +2372,8 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2349
2372
|
image?: string | null | undefined;
|
|
2350
2373
|
} & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
|
|
2351
2374
|
data: {
|
|
2375
|
+
displayUsername?: string | undefined;
|
|
2352
2376
|
username: string;
|
|
2353
|
-
displayUsername: string;
|
|
2354
2377
|
id: string;
|
|
2355
2378
|
createdAt: Date;
|
|
2356
2379
|
updatedAt: Date;
|
|
@@ -2523,7 +2546,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2523
2546
|
hooks: {
|
|
2524
2547
|
before: {
|
|
2525
2548
|
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
2526
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
2549
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
2527
2550
|
}[];
|
|
2528
2551
|
};
|
|
2529
2552
|
options: import("better-auth/plugins/username").UsernameOptions | undefined;
|
|
@@ -2536,8 +2559,9 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2536
2559
|
USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
|
|
2537
2560
|
INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
|
|
2538
2561
|
INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
|
|
2562
|
+
USERNAME_IS_IMMUTABLE: import("better-auth").RawError<"USERNAME_IS_IMMUTABLE">;
|
|
2539
2563
|
};
|
|
2540
|
-
}
|
|
2564
|
+
};
|
|
2541
2565
|
atomListeners: {
|
|
2542
2566
|
matcher: (path: string) => path is "/sign-in/username";
|
|
2543
2567
|
signal: "$sessionSignal";
|
|
@@ -2551,6 +2575,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2551
2575
|
USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
|
|
2552
2576
|
INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
|
|
2553
2577
|
INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
|
|
2578
|
+
USERNAME_IS_IMMUTABLE: import("better-auth").RawError<"USERNAME_IS_IMMUTABLE">;
|
|
2554
2579
|
};
|
|
2555
2580
|
} | {
|
|
2556
2581
|
id: "multi-session";
|
|
@@ -2638,7 +2663,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2638
2663
|
sessionToken: import("zod").ZodString;
|
|
2639
2664
|
}, import("zod/v4/core").$strip>;
|
|
2640
2665
|
requireHeaders: true;
|
|
2641
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2666
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2642
2667
|
session: {
|
|
2643
2668
|
session: Record<string, any> & {
|
|
2644
2669
|
id: string;
|
|
@@ -2660,7 +2685,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2660
2685
|
image?: string | null | undefined;
|
|
2661
2686
|
};
|
|
2662
2687
|
};
|
|
2663
|
-
}
|
|
2688
|
+
}>>[];
|
|
2664
2689
|
metadata: {
|
|
2665
2690
|
openapi: {
|
|
2666
2691
|
description: string;
|
|
@@ -2690,7 +2715,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2690
2715
|
hooks: {
|
|
2691
2716
|
after: {
|
|
2692
2717
|
matcher: (context: import("better-auth").HookEndpointContext) => boolean;
|
|
2693
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
2718
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
2694
2719
|
}[];
|
|
2695
2720
|
};
|
|
2696
2721
|
options: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined;
|
|
@@ -2744,7 +2769,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2744
2769
|
hooks: {
|
|
2745
2770
|
before: {
|
|
2746
2771
|
matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
|
|
2747
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<never
|
|
2772
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<never>>;
|
|
2748
2773
|
}[];
|
|
2749
2774
|
};
|
|
2750
2775
|
endpoints: {
|
|
@@ -2819,6 +2844,18 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2819
2844
|
}, {
|
|
2820
2845
|
message: string;
|
|
2821
2846
|
}>;
|
|
2847
|
+
consumePhoneNumberOTP: import("better-call").StrictEndpoint<string, {
|
|
2848
|
+
method: "POST";
|
|
2849
|
+
body: import("zod").ZodObject<{
|
|
2850
|
+
phoneNumber: import("zod").ZodString;
|
|
2851
|
+
code: import("zod").ZodString;
|
|
2852
|
+
}, import("zod/v4/core").$strip>;
|
|
2853
|
+
metadata: {
|
|
2854
|
+
readonly scope: "server";
|
|
2855
|
+
};
|
|
2856
|
+
}, {
|
|
2857
|
+
status: boolean;
|
|
2858
|
+
}>;
|
|
2822
2859
|
verifyPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/verify", {
|
|
2823
2860
|
method: "POST";
|
|
2824
2861
|
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
@@ -3099,7 +3136,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3099
3136
|
hooks: {
|
|
3100
3137
|
before: {
|
|
3101
3138
|
matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
|
|
3102
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3139
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3103
3140
|
user: {
|
|
3104
3141
|
id: string;
|
|
3105
3142
|
createdAt: Date;
|
|
@@ -3120,10 +3157,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3120
3157
|
expiresAt: Date;
|
|
3121
3158
|
};
|
|
3122
3159
|
} | {
|
|
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 & {
|
|
3160
|
+
context: import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
|
|
3127
3161
|
options: import("better-auth").BetterAuthOptions;
|
|
3128
3162
|
trustedOrigins: string[];
|
|
3129
3163
|
trustedProviders: string[];
|
|
@@ -3215,6 +3249,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3215
3249
|
updateAge: number;
|
|
3216
3250
|
expiresIn: number;
|
|
3217
3251
|
freshAge: number;
|
|
3252
|
+
cookieCacheSigner?: import("better-auth").CookieCacheSigner | undefined;
|
|
3218
3253
|
cookieRefreshCache: false | {
|
|
3219
3254
|
enabled: true;
|
|
3220
3255
|
updateAge: number;
|
|
@@ -3248,8 +3283,11 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3248
3283
|
skipCSRFCheck: boolean;
|
|
3249
3284
|
runInBackground: (promise: Promise<unknown>) => void;
|
|
3250
3285
|
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
|
|
3286
|
+
} & {
|
|
3287
|
+
returned?: unknown | undefined;
|
|
3288
|
+
responseHeaders?: Headers | undefined;
|
|
3251
3289
|
}>;
|
|
3252
|
-
}
|
|
3290
|
+
}>>;
|
|
3253
3291
|
}[];
|
|
3254
3292
|
};
|
|
3255
3293
|
endpoints: {
|
|
@@ -3464,7 +3502,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3464
3502
|
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3465
3503
|
id: import("zod").ZodString;
|
|
3466
3504
|
}, import("zod/v4/core").$strip>;
|
|
3467
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3505
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3468
3506
|
session: {
|
|
3469
3507
|
session: Record<string, any> & {
|
|
3470
3508
|
id: string;
|
|
@@ -3486,7 +3524,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3486
3524
|
image?: string | null | undefined;
|
|
3487
3525
|
};
|
|
3488
3526
|
};
|
|
3489
|
-
}
|
|
3527
|
+
}>>[];
|
|
3490
3528
|
metadata: {
|
|
3491
3529
|
openapi: {
|
|
3492
3530
|
description: string;
|
|
@@ -3801,7 +3839,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3801
3839
|
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3802
3840
|
keyId: import("zod").ZodString;
|
|
3803
3841
|
}, import("zod/v4/core").$strip>;
|
|
3804
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3842
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3805
3843
|
session: {
|
|
3806
3844
|
session: Record<string, any> & {
|
|
3807
3845
|
id: string;
|
|
@@ -3823,7 +3861,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3823
3861
|
image?: string | null | undefined;
|
|
3824
3862
|
};
|
|
3825
3863
|
};
|
|
3826
|
-
}
|
|
3864
|
+
}>>[];
|
|
3827
3865
|
metadata: {
|
|
3828
3866
|
openapi: {
|
|
3829
3867
|
description: string;
|
|
@@ -3869,7 +3907,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3869
3907
|
}>;
|
|
3870
3908
|
listApiKeys: import("better-call").StrictEndpoint<"/api-key/list", {
|
|
3871
3909
|
method: "GET";
|
|
3872
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3910
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3873
3911
|
session: {
|
|
3874
3912
|
session: Record<string, any> & {
|
|
3875
3913
|
id: string;
|
|
@@ -3891,7 +3929,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3891
3929
|
image?: string | null | undefined;
|
|
3892
3930
|
};
|
|
3893
3931
|
};
|
|
3894
|
-
}
|
|
3932
|
+
}>>[];
|
|
3895
3933
|
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
3896
3934
|
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3897
3935
|
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -4255,7 +4293,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4255
4293
|
endpoints: {
|
|
4256
4294
|
generatePasskeyRegistrationOptions: import("better-call").StrictEndpoint<"/passkey/generate-register-options", {
|
|
4257
4295
|
method: "GET";
|
|
4258
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4296
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4259
4297
|
session: {
|
|
4260
4298
|
session: Record<string, any> & {
|
|
4261
4299
|
id: string;
|
|
@@ -4277,7 +4315,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4277
4315
|
image?: string | null | undefined;
|
|
4278
4316
|
};
|
|
4279
4317
|
};
|
|
4280
|
-
}
|
|
4318
|
+
}>>[];
|
|
4281
4319
|
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
4282
4320
|
authenticatorAttachment: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
4283
4321
|
platform: "platform";
|
|
@@ -4290,15 +4328,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4290
4328
|
openapi: {
|
|
4291
4329
|
operationId: string;
|
|
4292
4330
|
description: string;
|
|
4293
|
-
parameters:
|
|
4294
|
-
name: string;
|
|
4295
|
-
in: "query";
|
|
4296
|
-
required: false;
|
|
4297
|
-
description: string;
|
|
4298
|
-
schema: {
|
|
4299
|
-
type: "string";
|
|
4300
|
-
};
|
|
4301
|
-
}[];
|
|
4331
|
+
parameters: import("better-call").OpenAPIParameter[];
|
|
4302
4332
|
responses: {
|
|
4303
4333
|
200: {
|
|
4304
4334
|
description: string;
|
|
@@ -4500,8 +4530,9 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4500
4530
|
body: import("zod").ZodObject<{
|
|
4501
4531
|
response: import("zod").ZodAny;
|
|
4502
4532
|
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4533
|
+
createSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
4503
4534
|
}, import("zod/v4/core").$strip>;
|
|
4504
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4535
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4505
4536
|
session: {
|
|
4506
4537
|
session: Record<string, any> & {
|
|
4507
4538
|
id: string;
|
|
@@ -4523,7 +4554,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4523
4554
|
image?: string | null | undefined;
|
|
4524
4555
|
};
|
|
4525
4556
|
};
|
|
4526
|
-
}
|
|
4557
|
+
}>>[];
|
|
4527
4558
|
metadata: {
|
|
4528
4559
|
openapi: {
|
|
4529
4560
|
operationId: string;
|
|
@@ -4534,7 +4565,20 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4534
4565
|
content: {
|
|
4535
4566
|
"application/json": {
|
|
4536
4567
|
schema: {
|
|
4537
|
-
|
|
4568
|
+
readonly type: "object";
|
|
4569
|
+
readonly allOf: readonly [{
|
|
4570
|
+
readonly $ref: "#/components/schemas/Passkey";
|
|
4571
|
+
}, {
|
|
4572
|
+
readonly type: "object";
|
|
4573
|
+
readonly properties: {
|
|
4574
|
+
readonly session: {
|
|
4575
|
+
readonly $ref: "#/components/schemas/Session";
|
|
4576
|
+
};
|
|
4577
|
+
readonly user: {
|
|
4578
|
+
readonly $ref: "#/components/schemas/User";
|
|
4579
|
+
};
|
|
4580
|
+
};
|
|
4581
|
+
}];
|
|
4538
4582
|
};
|
|
4539
4583
|
};
|
|
4540
4584
|
};
|
|
@@ -4605,7 +4649,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4605
4649
|
}>;
|
|
4606
4650
|
listPasskeys: import("better-call").StrictEndpoint<"/passkey/list-user-passkeys", {
|
|
4607
4651
|
method: "GET";
|
|
4608
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4652
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4609
4653
|
session: {
|
|
4610
4654
|
session: Record<string, any> & {
|
|
4611
4655
|
id: string;
|
|
@@ -4627,7 +4671,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4627
4671
|
image?: string | null | undefined;
|
|
4628
4672
|
};
|
|
4629
4673
|
};
|
|
4630
|
-
}
|
|
4674
|
+
}>>[];
|
|
4631
4675
|
metadata: {
|
|
4632
4676
|
openapi: {
|
|
4633
4677
|
description: string;
|
|
@@ -4656,7 +4700,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4656
4700
|
body: import("zod").ZodObject<{
|
|
4657
4701
|
id: import("zod").ZodString;
|
|
4658
4702
|
}, import("zod/v4/core").$strip>;
|
|
4659
|
-
use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4703
|
+
use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4660
4704
|
session: {
|
|
4661
4705
|
session: Record<string, any> & {
|
|
4662
4706
|
id: string;
|
|
@@ -4678,9 +4722,9 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4678
4722
|
image?: string | null | undefined;
|
|
4679
4723
|
};
|
|
4680
4724
|
};
|
|
4681
|
-
}
|
|
4725
|
+
}>> | import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4682
4726
|
verifiedResource: {};
|
|
4683
|
-
}
|
|
4727
|
+
}>>)[];
|
|
4684
4728
|
metadata: {
|
|
4685
4729
|
openapi: {
|
|
4686
4730
|
description: string;
|
|
@@ -4714,7 +4758,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4714
4758
|
id: import("zod").ZodString;
|
|
4715
4759
|
name: import("zod").ZodString;
|
|
4716
4760
|
}, import("zod/v4/core").$strip>;
|
|
4717
|
-
use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4761
|
+
use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4718
4762
|
session: {
|
|
4719
4763
|
session: Record<string, any> & {
|
|
4720
4764
|
id: string;
|
|
@@ -4736,9 +4780,9 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4736
4780
|
image?: string | null | undefined;
|
|
4737
4781
|
};
|
|
4738
4782
|
};
|
|
4739
|
-
}
|
|
4783
|
+
}>> | import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
4740
4784
|
verifiedResource: {};
|
|
4741
|
-
}
|
|
4785
|
+
}>>)[];
|
|
4742
4786
|
metadata: {
|
|
4743
4787
|
openapi: {
|
|
4744
4788
|
description: string;
|
|
@@ -4825,6 +4869,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4825
4869
|
PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
|
|
4826
4870
|
AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
|
|
4827
4871
|
UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
|
|
4872
|
+
USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
|
|
4828
4873
|
FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
|
|
4829
4874
|
PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
|
|
4830
4875
|
REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
|
|
@@ -4893,6 +4938,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4893
4938
|
name?: string;
|
|
4894
4939
|
authenticatorAttachment?: "platform" | "cross-platform";
|
|
4895
4940
|
context?: string | null;
|
|
4941
|
+
createSession?: boolean;
|
|
4896
4942
|
extensions?: import("@simplewebauthn/server").AuthenticationExtensionsClientInputs;
|
|
4897
4943
|
useAutoRegister?: boolean;
|
|
4898
4944
|
returnWebAuthnResponse?: boolean;
|
|
@@ -4904,14 +4950,20 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4904
4950
|
statusText: string;
|
|
4905
4951
|
};
|
|
4906
4952
|
} | {
|
|
4907
|
-
data: import("@better-auth/passkey/client").Passkey
|
|
4953
|
+
data: import("@better-auth/passkey/client").Passkey & {
|
|
4954
|
+
session?: import("better-auth").Session;
|
|
4955
|
+
user?: import("better-auth").User;
|
|
4956
|
+
};
|
|
4908
4957
|
error: null;
|
|
4909
4958
|
} | {
|
|
4910
4959
|
webauthn: {
|
|
4911
4960
|
response: import("@simplewebauthn/server").RegistrationResponseJSON;
|
|
4912
4961
|
clientExtensionResults: import("@simplewebauthn/server").AuthenticationExtensionsClientOutputs;
|
|
4913
4962
|
};
|
|
4914
|
-
data: import("@better-auth/passkey/client").Passkey
|
|
4963
|
+
data: import("@better-auth/passkey/client").Passkey & {
|
|
4964
|
+
session?: import("better-auth").Session;
|
|
4965
|
+
user?: import("better-auth").User;
|
|
4966
|
+
};
|
|
4915
4967
|
error: null;
|
|
4916
4968
|
} | {
|
|
4917
4969
|
data: null;
|
|
@@ -4949,6 +5001,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
4949
5001
|
PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
|
|
4950
5002
|
AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
|
|
4951
5003
|
UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
|
|
5004
|
+
USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
|
|
4952
5005
|
FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
|
|
4953
5006
|
PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
|
|
4954
5007
|
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.1",
|
|
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.1",
|
|
34
|
+
"@better-auth/api-key": "^1.7.1",
|
|
35
|
+
"@better-auth/passkey": "^1.7.1"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsc -p tsconfig.json",
|