sa2kit 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/llm/ui/miniapp/index.d.mts +2 -2
- package/dist/ai/llm/ui/miniapp/index.d.ts +2 -2
- package/dist/ai/llm/ui/rn/index.d.mts +2 -2
- package/dist/ai/llm/ui/rn/index.d.ts +2 -2
- package/dist/ai/llm/ui/web/index.d.mts +3 -3
- package/dist/ai/llm/ui/web/index.d.ts +3 -3
- package/dist/analytics/index.d.mts +1 -1
- package/dist/analytics/index.d.ts +1 -1
- package/dist/{chunk-QP5N3ER6.js → chunk-3CSCIRQY.js} +5 -6
- package/dist/chunk-3CSCIRQY.js.map +1 -0
- package/dist/{chunk-RJP2BRJD.mjs → chunk-4OOANEJV.mjs} +2 -2
- package/dist/{chunk-RJP2BRJD.mjs.map → chunk-4OOANEJV.mjs.map} +1 -1
- package/dist/chunk-5FUAQLGC.mjs +14 -0
- package/dist/chunk-5FUAQLGC.mjs.map +1 -0
- package/dist/{chunk-S732H246.js → chunk-6PMXAK7F.js} +2 -2
- package/dist/{chunk-S732H246.js.map → chunk-6PMXAK7F.js.map} +1 -1
- package/dist/chunk-6YLCRWKM.mjs +8 -0
- package/dist/chunk-6YLCRWKM.mjs.map +1 -0
- package/dist/{chunk-IBWDBBX5.mjs → chunk-7B5SI4OF.mjs} +3 -4
- package/dist/chunk-7B5SI4OF.mjs.map +1 -0
- package/dist/chunk-EQXPL7TN.mjs +78 -0
- package/dist/chunk-EQXPL7TN.mjs.map +1 -0
- package/dist/{chunk-GQZHGSRR.js → chunk-GSNGCENJ.js} +39 -2
- package/dist/chunk-GSNGCENJ.js.map +1 -0
- package/dist/chunk-HQLKOXG7.js +16 -0
- package/dist/chunk-HQLKOXG7.js.map +1 -0
- package/dist/{chunk-S3PUP7N4.js → chunk-PA4ELVGI.js} +2 -2
- package/dist/{chunk-S3PUP7N4.js.map → chunk-PA4ELVGI.js.map} +1 -1
- package/dist/{chunk-WZDTNDYR.js → chunk-QSKLQX6H.js} +11 -11
- package/dist/{chunk-WZDTNDYR.js.map → chunk-QSKLQX6H.js.map} +1 -1
- package/dist/{chunk-LHJKLUM7.mjs → chunk-TNJ6LYX7.mjs} +2 -2
- package/dist/{chunk-LHJKLUM7.mjs.map → chunk-TNJ6LYX7.mjs.map} +1 -1
- package/dist/{chunk-J77KR2EV.mjs → chunk-WJ7IMUEJ.mjs} +3 -3
- package/dist/{chunk-J77KR2EV.mjs.map → chunk-WJ7IMUEJ.mjs.map} +1 -1
- package/dist/chunk-YTGUIRRH.js +10 -0
- package/dist/chunk-YTGUIRRH.js.map +1 -0
- package/dist/common/auth/client/index.d.mts +1 -31
- package/dist/common/auth/client/index.d.ts +1 -31
- package/dist/common/auth/client/index.js +2 -15
- package/dist/common/auth/client/index.mjs +1 -2
- package/dist/common/auth/components/index.d.mts +14 -248
- package/dist/common/auth/components/index.d.ts +14 -248
- package/dist/common/auth/components/index.js +878 -49
- package/dist/common/auth/components/index.js.map +1 -1
- package/dist/common/auth/components/index.mjs +871 -5
- package/dist/common/auth/components/index.mjs.map +1 -1
- package/dist/common/auth/hooks/index.d.mts +2 -29
- package/dist/common/auth/hooks/index.d.ts +2 -29
- package/dist/common/auth/hooks/index.js +2 -11
- package/dist/common/auth/hooks/index.mjs +1 -2
- package/dist/common/auth/index.d.mts +5 -9
- package/dist/common/auth/index.d.ts +5 -9
- package/dist/common/auth/index.js +7 -28
- package/dist/common/auth/index.mjs +3 -4
- package/dist/common/auth/react/index.d.mts +3 -3
- package/dist/common/auth/react/index.d.ts +3 -3
- package/dist/common/auth/rn/index.d.mts +3 -19
- package/dist/common/auth/rn/index.d.ts +3 -19
- package/dist/common/auth/rn/index.js +0 -32
- package/dist/common/auth/rn/index.js.map +1 -1
- package/dist/common/auth/rn/index.mjs +1 -30
- package/dist/common/auth/rn/index.mjs.map +1 -1
- package/dist/common/auth/server/index.d.mts +81 -2
- package/dist/common/auth/server/index.d.ts +81 -2
- package/dist/common/auth/server/index.js +128 -37
- package/dist/common/auth/server/index.js.map +1 -1
- package/dist/common/auth/server/index.mjs +124 -1
- package/dist/common/auth/server/index.mjs.map +1 -1
- package/dist/common/auth/services/index.js +12 -9
- package/dist/common/auth/services/index.js.map +1 -1
- package/dist/common/auth/services/index.mjs +10 -1
- package/dist/common/auth/services/index.mjs.map +1 -1
- package/dist/common/file/server/index.js +32 -32
- package/dist/common/file/server/index.mjs +3 -3
- package/dist/common/index.d.mts +5 -8
- package/dist/common/index.d.ts +5 -8
- package/dist/common/index.js +12 -14
- package/dist/common/index.mjs +6 -8
- package/dist/common/request/index.js +4 -5
- package/dist/common/request/index.mjs +2 -3
- package/dist/i18n/index.d.mts +1 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/imageCrop/index.d.mts +3 -3
- package/dist/imageCrop/index.d.ts +3 -3
- package/dist/index-Bd7cKF1j.d.mts +50 -0
- package/dist/{index-CLB80GCP.d.ts → index-D0cqaQEH.d.mts} +5 -5
- package/dist/{index-CLB80GCP.d.mts → index-D0cqaQEH.d.ts} +5 -5
- package/dist/index-DRQxtCDw.d.ts +50 -0
- package/dist/{index-BxZauNN_.d.mts → index-DoUo8IrU.d.mts} +8 -8
- package/dist/{index-BxZauNN_.d.ts → index-DoUo8IrU.d.ts} +8 -8
- package/dist/index.d.mts +152 -131
- package/dist/index.d.ts +152 -131
- package/dist/index.js +105 -554
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +106 -555
- package/dist/index.mjs.map +1 -1
- package/dist/ossFile/server/index.js +32 -32
- package/dist/ossFile/server/index.mjs +3 -3
- package/dist/request/index.js +3 -4
- package/dist/request/index.mjs +1 -2
- package/dist/universalExport/index.d.mts +3 -3
- package/dist/universalExport/index.d.ts +3 -3
- package/dist/universalFile/index.d.mts +5 -5
- package/dist/universalFile/index.d.ts +5 -5
- package/dist/universalFile/server/index.js +62 -62
- package/dist/universalFile/server/index.mjs +2 -2
- package/package.json +1 -36
- package/dist/auth/client/index.d.mts +0 -13
- package/dist/auth/client/index.d.ts +0 -13
- package/dist/auth/client/index.js +0 -26
- package/dist/auth/client/index.js.map +0 -1
- package/dist/auth/client/index.mjs +0 -5
- package/dist/auth/client/index.mjs.map +0 -1
- package/dist/auth/components/index.d.mts +0 -10
- package/dist/auth/components/index.d.ts +0 -10
- package/dist/auth/components/index.js +0 -70
- package/dist/auth/components/index.js.map +0 -1
- package/dist/auth/components/index.mjs +0 -9
- package/dist/auth/components/index.mjs.map +0 -1
- package/dist/auth/hooks/index.d.mts +0 -13
- package/dist/auth/hooks/index.d.ts +0 -13
- package/dist/auth/hooks/index.js +0 -28
- package/dist/auth/hooks/index.js.map +0 -1
- package/dist/auth/hooks/index.mjs +0 -7
- package/dist/auth/hooks/index.mjs.map +0 -1
- package/dist/auth/index.d.mts +0 -21
- package/dist/auth/index.d.ts +0 -21
- package/dist/auth/index.js +0 -112
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/index.mjs +0 -11
- package/dist/auth/index.mjs.map +0 -1
- package/dist/auth/rn/index.d.mts +0 -3133
- package/dist/auth/rn/index.d.ts +0 -3133
- package/dist/auth/rn/index.js +0 -684
- package/dist/auth/rn/index.js.map +0 -1
- package/dist/auth/rn/index.mjs +0 -663
- package/dist/auth/rn/index.mjs.map +0 -1
- package/dist/auth/schema/index.d.mts +0 -4
- package/dist/auth/schema/index.d.ts +0 -4
- package/dist/auth/schema/index.js +0 -49
- package/dist/auth/schema/index.js.map +0 -1
- package/dist/auth/schema/index.mjs +0 -4
- package/dist/auth/schema/index.mjs.map +0 -1
- package/dist/auth/services/index.d.mts +0 -1
- package/dist/auth/services/index.d.ts +0 -1
- package/dist/auth/services/index.js +0 -17
- package/dist/auth/services/index.js.map +0 -1
- package/dist/auth/services/index.mjs +0 -4
- package/dist/auth/services/index.mjs.map +0 -1
- package/dist/base-api-client-BpmcQt4Q.d.ts +0 -103
- package/dist/base-api-client-CFIhZK4C.d.mts +0 -277
- package/dist/base-api-client-CFIhZK4C.d.ts +0 -277
- package/dist/base-api-client-DXLsq2yz.d.mts +0 -103
- package/dist/chunk-7E3J7VAD.mjs +0 -3
- package/dist/chunk-7E3J7VAD.mjs.map +0 -1
- package/dist/chunk-B3CZ3HXJ.mjs +0 -126
- package/dist/chunk-B3CZ3HXJ.mjs.map +0 -1
- package/dist/chunk-FOQEQWX5.js +0 -4
- package/dist/chunk-FOQEQWX5.js.map +0 -1
- package/dist/chunk-G4NFB2QA.mjs +0 -212
- package/dist/chunk-G4NFB2QA.mjs.map +0 -1
- package/dist/chunk-G5HJGXGC.mjs +0 -39
- package/dist/chunk-G5HJGXGC.mjs.map +0 -1
- package/dist/chunk-GQZHGSRR.js.map +0 -1
- package/dist/chunk-GS7XLKET.js +0 -41
- package/dist/chunk-GS7XLKET.js.map +0 -1
- package/dist/chunk-IBWDBBX5.mjs.map +0 -1
- package/dist/chunk-MWSAH7ZG.mjs +0 -42
- package/dist/chunk-MWSAH7ZG.mjs.map +0 -1
- package/dist/chunk-MZOGYD4N.mjs +0 -186
- package/dist/chunk-MZOGYD4N.mjs.map +0 -1
- package/dist/chunk-QDUBO567.js +0 -1148
- package/dist/chunk-QDUBO567.js.map +0 -1
- package/dist/chunk-QP5N3ER6.js.map +0 -1
- package/dist/chunk-RWCD2CAD.mjs +0 -1132
- package/dist/chunk-RWCD2CAD.mjs.map +0 -1
- package/dist/chunk-S37OK2QG.js +0 -216
- package/dist/chunk-S37OK2QG.js.map +0 -1
- package/dist/chunk-SFDJNKWC.js +0 -22
- package/dist/chunk-SFDJNKWC.js.map +0 -1
- package/dist/chunk-TXMX6PZR.js +0 -190
- package/dist/chunk-TXMX6PZR.js.map +0 -1
- package/dist/chunk-VHN7PF5I.js +0 -20
- package/dist/chunk-VHN7PF5I.js.map +0 -1
- package/dist/chunk-XBZIS3MV.mjs +0 -13
- package/dist/chunk-XBZIS3MV.mjs.map +0 -1
- package/dist/chunk-XFOZ56FB.mjs +0 -20
- package/dist/chunk-XFOZ56FB.mjs.map +0 -1
- package/dist/chunk-Z23HAXHL.js +0 -136
- package/dist/chunk-Z23HAXHL.js.map +0 -1
- package/dist/index-BcjDRcKp.d.mts +0 -40
- package/dist/index-BlpXrrTy.d.ts +0 -40
- package/dist/session-BCXvGCnm.d.mts +0 -81
- package/dist/session-BCXvGCnm.d.ts +0 -81
- package/dist/types-C_W_CoUD.d.ts +0 -99
- package/dist/types-DCRvasyH.d.mts +0 -99
- package/dist/types.legacy-J-j-_ig_.d.mts +0 -25
- package/dist/types.legacy-J-j-_ig_.d.ts +0 -25
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import * as React$1 from 'react';
|
|
2
1
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { R as RequestAdapter, a as RequestConfig, S as StorageAdapter, b as StorageChangeEvent, I as IAuthClient, U as UseAuthReturn, A as ApiResponse$1, c as AuthResponse$1, d as AuthResult, B as BaseApiClient$1, e as BaseUser, L as LoginForm, f as RegisterForm, g as User, h as UserRole } from './base-api-client-CFIhZK4C.js';
|
|
4
2
|
import { ClassValue } from 'clsx';
|
|
5
3
|
import { GridItem, GridColumns, GridGap } from './components/index.js';
|
|
6
4
|
export { Dialog as AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, DialogDescription as AlertDialogDescription, DialogFooter as AlertDialogFooter, DialogHeader as AlertDialogHeader, DialogOverlay as AlertDialogOverlay, DialogPortal as AlertDialogPortal, DialogTitle as AlertDialogTitle, DialogTrigger as AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, BackButton, BackButtonProps, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ConfirmModal, ConfirmModalProps, Dialog, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FilterButtonGroup, FilterButtonGroupProps, FilterOption, GenericOrderManager, GenericOrderManagerProps, Grid, GridProps, ImageMappingItem, ImageMappingPanel, ImageMappingPanelProps, ImageMappingValue, Input, Label, LocalImageMappingPanel, LocalImageMappingPanelProps, Modal, ModalProps, OrderManagerOperations, OrderableItem, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ProgressProps, ScrollArea, ScrollBar, SearchBox, SearchResultHint, SearchResultHintProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeparatorProps, Dialog as Sheet, DialogClose as SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, DialogOverlay as SheetOverlay, DialogPortal as SheetPortal, SheetTitle, DialogTrigger as SheetTrigger, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants } from './components/index.js';
|
|
@@ -10,7 +8,8 @@ import { U as UploadFileInfo, a as UploadProgress, F as FileMetadata, b as FileQ
|
|
|
10
8
|
import { A as AliyunOSSConfig } from './types-_rFX1atk.js';
|
|
11
9
|
import * as zod_v4_core from 'zod/v4/core';
|
|
12
10
|
import * as zod from 'zod';
|
|
13
|
-
import * as
|
|
11
|
+
import * as better_auth_plugins_email_otp from 'better-auth/plugins/email-otp';
|
|
12
|
+
import * as better_auth_plugins_phone_number from 'better-auth/plugins/phone-number';
|
|
14
13
|
import * as better_auth_client from 'better-auth/client';
|
|
15
14
|
import * as better_auth from 'better-auth';
|
|
16
15
|
export { About, AboutBase, Contact, ExperimentCard, Home, HomeConfig, ProjectCarousel, ProjectsConfig } from './portfolio/index.js';
|
|
@@ -289,6 +288,36 @@ interface SmartAssistantProps {
|
|
|
289
288
|
}
|
|
290
289
|
declare const SmartAssistant: React__default.FC<SmartAssistantProps>;
|
|
291
290
|
|
|
291
|
+
/**
|
|
292
|
+
* 请求配置接口
|
|
293
|
+
*/
|
|
294
|
+
interface RequestConfig {
|
|
295
|
+
/** 请求 URL */
|
|
296
|
+
url: string;
|
|
297
|
+
/** HTTP 方法 */
|
|
298
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
299
|
+
/** 请求头 */
|
|
300
|
+
headers?: Record<string, string>;
|
|
301
|
+
/** 请求体 */
|
|
302
|
+
body?: any;
|
|
303
|
+
/** 查询参数 */
|
|
304
|
+
params?: Record<string, any>;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* 请求适配器接口
|
|
308
|
+
* 用于抽象不同平台的网络请求实现
|
|
309
|
+
* - Mobile/Desktop: fetch API
|
|
310
|
+
* - Miniapp: Taro.request
|
|
311
|
+
*/
|
|
312
|
+
interface RequestAdapter {
|
|
313
|
+
/**
|
|
314
|
+
* 发送 HTTP 请求
|
|
315
|
+
* @param config 请求配置
|
|
316
|
+
* @returns 响应数据
|
|
317
|
+
*/
|
|
318
|
+
request<T = any>(config: RequestConfig): Promise<T>;
|
|
319
|
+
}
|
|
320
|
+
|
|
292
321
|
/**
|
|
293
322
|
* Web 平台请求适配器
|
|
294
323
|
* 基于标准 fetch API
|
|
@@ -755,6 +784,53 @@ declare namespace index$e {
|
|
|
755
784
|
export { index$e_arrayUtils as arrayUtils, index$e_cn as cn, index$e_debugUtils as debugUtils, index$e_errorUtils as errorUtils, index$e_fileUtils as fileUtils, index$e_formatTime as formatTime, index$e_japaneseUtils as japaneseUtils, index$e_stringUtils as stringUtils, index$e_validators as validators };
|
|
756
785
|
}
|
|
757
786
|
|
|
787
|
+
/**
|
|
788
|
+
* 存储适配器类型定义
|
|
789
|
+
*/
|
|
790
|
+
/**
|
|
791
|
+
* 存储适配器接口
|
|
792
|
+
* 用于抽象不同平台的本地存储实现
|
|
793
|
+
*/
|
|
794
|
+
interface StorageAdapter {
|
|
795
|
+
/**
|
|
796
|
+
* 获取存储的值
|
|
797
|
+
* @param key 存储键
|
|
798
|
+
* @returns 存储的值,不存在则返回 null
|
|
799
|
+
*/
|
|
800
|
+
getItem(key: string): Promise<string | null>;
|
|
801
|
+
/**
|
|
802
|
+
* 设置存储的值
|
|
803
|
+
* @param key 存储键
|
|
804
|
+
* @param value 要存储的值
|
|
805
|
+
*/
|
|
806
|
+
setItem(key: string, value: string): Promise<void>;
|
|
807
|
+
/**
|
|
808
|
+
* 删除存储的值
|
|
809
|
+
* @param key 存储键
|
|
810
|
+
*/
|
|
811
|
+
removeItem(key: string): Promise<void>;
|
|
812
|
+
/**
|
|
813
|
+
* 清空所有存储(可选)
|
|
814
|
+
*/
|
|
815
|
+
clear?(): Promise<void>;
|
|
816
|
+
/**
|
|
817
|
+
* 监听存储变化(可选,部分平台支持)
|
|
818
|
+
*/
|
|
819
|
+
addChangeListener?(callback: (key: string, value: string | null) => void): () => void;
|
|
820
|
+
/**
|
|
821
|
+
* 移除存储变化监听器(可选)
|
|
822
|
+
*/
|
|
823
|
+
removeChangeListener?(callback: (key: string, value: string | null) => void): void;
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* 存储事件
|
|
827
|
+
*/
|
|
828
|
+
interface StorageChangeEvent {
|
|
829
|
+
key: string;
|
|
830
|
+
value: any;
|
|
831
|
+
oldValue?: any;
|
|
832
|
+
}
|
|
833
|
+
|
|
758
834
|
/**
|
|
759
835
|
* Web 平台存储适配器 (localStorage)
|
|
760
836
|
*/
|
|
@@ -897,8 +973,8 @@ type index$d_MiniAppStorageAdapter = MiniAppStorageAdapter;
|
|
|
897
973
|
declare const index$d_MiniAppStorageAdapter: typeof MiniAppStorageAdapter;
|
|
898
974
|
type index$d_ReactNativeStorageAdapter = ReactNativeStorageAdapter;
|
|
899
975
|
declare const index$d_ReactNativeStorageAdapter: typeof ReactNativeStorageAdapter;
|
|
900
|
-
|
|
901
|
-
|
|
976
|
+
type index$d_StorageAdapter = StorageAdapter;
|
|
977
|
+
type index$d_StorageChangeEvent = StorageChangeEvent;
|
|
902
978
|
type index$d_WebStorageAdapter = WebStorageAdapter;
|
|
903
979
|
declare const index$d_WebStorageAdapter: typeof WebStorageAdapter;
|
|
904
980
|
declare const index$d_useAsyncStorage: typeof useAsyncStorage;
|
|
@@ -907,7 +983,7 @@ declare const index$d_useLocalStorage: typeof useLocalStorage;
|
|
|
907
983
|
declare const index$d_useStorage: typeof useStorage;
|
|
908
984
|
declare const index$d_useTaroStorage: typeof useTaroStorage;
|
|
909
985
|
declare namespace index$d {
|
|
910
|
-
export { index$d_ElectronStorageAdapter as ElectronStorageAdapter, index$d_MiniAppStorageAdapter as MiniAppStorageAdapter, index$d_ReactNativeStorageAdapter as ReactNativeStorageAdapter, index$d_StorageAdapter as StorageAdapter, index$d_StorageChangeEvent as StorageChangeEvent, index$d_WebStorageAdapter as WebStorageAdapter, index$d_useAsyncStorage as useAsyncStorage, index$d_useElectronStorage as useElectronStorage, index$d_useLocalStorage as useLocalStorage, index$d_useStorage as useStorage, index$d_useTaroStorage as useTaroStorage };
|
|
986
|
+
export { index$d_ElectronStorageAdapter as ElectronStorageAdapter, index$d_MiniAppStorageAdapter as MiniAppStorageAdapter, index$d_ReactNativeStorageAdapter as ReactNativeStorageAdapter, type index$d_StorageAdapter as StorageAdapter, type index$d_StorageChangeEvent as StorageChangeEvent, index$d_WebStorageAdapter as WebStorageAdapter, index$d_useAsyncStorage as useAsyncStorage, index$d_useElectronStorage as useElectronStorage, index$d_useLocalStorage as useLocalStorage, index$d_useStorage as useStorage, index$d_useTaroStorage as useTaroStorage };
|
|
911
987
|
}
|
|
912
988
|
|
|
913
989
|
/**
|
|
@@ -918,12 +994,12 @@ type index$c_MiniappRequestAdapter = MiniappRequestAdapter;
|
|
|
918
994
|
declare const index$c_MiniappRequestAdapter: typeof MiniappRequestAdapter;
|
|
919
995
|
type index$c_ReactNativeRequestAdapter = ReactNativeRequestAdapter;
|
|
920
996
|
declare const index$c_ReactNativeRequestAdapter: typeof ReactNativeRequestAdapter;
|
|
921
|
-
|
|
922
|
-
|
|
997
|
+
type index$c_RequestAdapter = RequestAdapter;
|
|
998
|
+
type index$c_RequestConfig = RequestConfig;
|
|
923
999
|
type index$c_WebRequestAdapter = WebRequestAdapter;
|
|
924
1000
|
declare const index$c_WebRequestAdapter: typeof WebRequestAdapter;
|
|
925
1001
|
declare namespace index$c {
|
|
926
|
-
export { index$c_MiniappRequestAdapter as MiniappRequestAdapter, index$c_ReactNativeRequestAdapter as ReactNativeRequestAdapter, index$c_RequestAdapter as RequestAdapter, index$c_RequestConfig as RequestConfig, index$c_WebRequestAdapter as WebRequestAdapter };
|
|
1002
|
+
export { index$c_MiniappRequestAdapter as MiniappRequestAdapter, index$c_ReactNativeRequestAdapter as ReactNativeRequestAdapter, type index$c_RequestAdapter as RequestAdapter, type index$c_RequestConfig as RequestConfig, index$c_WebRequestAdapter as WebRequestAdapter };
|
|
927
1003
|
}
|
|
928
1004
|
|
|
929
1005
|
/**
|
|
@@ -2100,7 +2176,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
2100
2176
|
fetchOptions?: FetchOptions | undefined;
|
|
2101
2177
|
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<Omit<{
|
|
2102
2178
|
token: string;
|
|
2103
|
-
user:
|
|
2179
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
2104
2180
|
}, "user"> & {
|
|
2105
2181
|
user: better_auth.StripEmptyObjects<{
|
|
2106
2182
|
id: string;
|
|
@@ -2159,7 +2235,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
2159
2235
|
emailVerified: boolean;
|
|
2160
2236
|
name: string;
|
|
2161
2237
|
image?: string | null | undefined;
|
|
2162
|
-
} &
|
|
2238
|
+
} & better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
2163
2239
|
}, "user"> & {
|
|
2164
2240
|
user: better_auth.StripEmptyObjects<{
|
|
2165
2241
|
id: string;
|
|
@@ -2176,7 +2252,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
2176
2252
|
}) | (Omit<{
|
|
2177
2253
|
status: boolean;
|
|
2178
2254
|
token: null;
|
|
2179
|
-
user:
|
|
2255
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
2180
2256
|
}, "user"> & {
|
|
2181
2257
|
user: better_auth.StripEmptyObjects<{
|
|
2182
2258
|
id: string;
|
|
@@ -2340,7 +2416,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
2340
2416
|
plugins: ({
|
|
2341
2417
|
id: "email-otp";
|
|
2342
2418
|
version: string;
|
|
2343
|
-
$InferServerPlugin: ReturnType<(options:
|
|
2419
|
+
$InferServerPlugin: ReturnType<(options: better_auth_plugins_email_otp.EmailOTPOptions) => {
|
|
2344
2420
|
id: "email-otp";
|
|
2345
2421
|
version: string;
|
|
2346
2422
|
init(ctx: better_auth.AuthContext): {
|
|
@@ -2873,7 +2949,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
2873
2949
|
window: number;
|
|
2874
2950
|
max: number;
|
|
2875
2951
|
})[];
|
|
2876
|
-
options:
|
|
2952
|
+
options: better_auth_plugins_email_otp.EmailOTPOptions;
|
|
2877
2953
|
$ERROR_CODES: {
|
|
2878
2954
|
OTP_EXPIRED: better_auth.RawError<"OTP_EXPIRED">;
|
|
2879
2955
|
INVALID_OTP: better_auth.RawError<"INVALID_OTP">;
|
|
@@ -2892,7 +2968,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
2892
2968
|
} | {
|
|
2893
2969
|
id: "phoneNumber";
|
|
2894
2970
|
version: string;
|
|
2895
|
-
$InferServerPlugin: ReturnType<(options?:
|
|
2971
|
+
$InferServerPlugin: ReturnType<(options?: better_auth_plugins_phone_number.PhoneNumberOptions | undefined) => {
|
|
2896
2972
|
id: "phone-number";
|
|
2897
2973
|
version: string;
|
|
2898
2974
|
init(): {
|
|
@@ -2970,7 +3046,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
2970
3046
|
};
|
|
2971
3047
|
}, {
|
|
2972
3048
|
token: string;
|
|
2973
|
-
user:
|
|
3049
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
2974
3050
|
}>;
|
|
2975
3051
|
sendPhoneNumberOTP: better_auth.StrictEndpoint<"/phone-number/send-otp", {
|
|
2976
3052
|
method: "POST";
|
|
@@ -3108,11 +3184,11 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
3108
3184
|
emailVerified: boolean;
|
|
3109
3185
|
name: string;
|
|
3110
3186
|
image?: string | null | undefined;
|
|
3111
|
-
} &
|
|
3187
|
+
} & better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
3112
3188
|
} | {
|
|
3113
3189
|
status: boolean;
|
|
3114
3190
|
token: null;
|
|
3115
|
-
user:
|
|
3191
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
3116
3192
|
}>;
|
|
3117
3193
|
requestPasswordResetPhoneNumber: better_auth.StrictEndpoint<"/phone-number/request-password-reset", {
|
|
3118
3194
|
method: "POST";
|
|
@@ -3207,7 +3283,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
3207
3283
|
window: number;
|
|
3208
3284
|
max: number;
|
|
3209
3285
|
}[];
|
|
3210
|
-
options:
|
|
3286
|
+
options: better_auth_plugins_phone_number.PhoneNumberOptions | undefined;
|
|
3211
3287
|
$ERROR_CODES: {
|
|
3212
3288
|
OTP_EXPIRED: better_auth.RawError<"OTP_EXPIRED">;
|
|
3213
3289
|
INVALID_OTP: better_auth.RawError<"INVALID_OTP">;
|
|
@@ -3478,7 +3554,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
3478
3554
|
plugins: ({
|
|
3479
3555
|
id: "email-otp";
|
|
3480
3556
|
version: string;
|
|
3481
|
-
$InferServerPlugin: ReturnType<(options:
|
|
3557
|
+
$InferServerPlugin: ReturnType<(options: better_auth_plugins_email_otp.EmailOTPOptions) => {
|
|
3482
3558
|
id: "email-otp";
|
|
3483
3559
|
version: string;
|
|
3484
3560
|
init(ctx: better_auth.AuthContext): {
|
|
@@ -4011,7 +4087,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
4011
4087
|
window: number;
|
|
4012
4088
|
max: number;
|
|
4013
4089
|
})[];
|
|
4014
|
-
options:
|
|
4090
|
+
options: better_auth_plugins_email_otp.EmailOTPOptions;
|
|
4015
4091
|
$ERROR_CODES: {
|
|
4016
4092
|
OTP_EXPIRED: better_auth.RawError<"OTP_EXPIRED">;
|
|
4017
4093
|
INVALID_OTP: better_auth.RawError<"INVALID_OTP">;
|
|
@@ -4030,7 +4106,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
4030
4106
|
} | {
|
|
4031
4107
|
id: "phoneNumber";
|
|
4032
4108
|
version: string;
|
|
4033
|
-
$InferServerPlugin: ReturnType<(options?:
|
|
4109
|
+
$InferServerPlugin: ReturnType<(options?: better_auth_plugins_phone_number.PhoneNumberOptions | undefined) => {
|
|
4034
4110
|
id: "phone-number";
|
|
4035
4111
|
version: string;
|
|
4036
4112
|
init(): {
|
|
@@ -4108,7 +4184,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
4108
4184
|
};
|
|
4109
4185
|
}, {
|
|
4110
4186
|
token: string;
|
|
4111
|
-
user:
|
|
4187
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
4112
4188
|
}>;
|
|
4113
4189
|
sendPhoneNumberOTP: better_auth.StrictEndpoint<"/phone-number/send-otp", {
|
|
4114
4190
|
method: "POST";
|
|
@@ -4246,11 +4322,11 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
4246
4322
|
emailVerified: boolean;
|
|
4247
4323
|
name: string;
|
|
4248
4324
|
image?: string | null | undefined;
|
|
4249
|
-
} &
|
|
4325
|
+
} & better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
4250
4326
|
} | {
|
|
4251
4327
|
status: boolean;
|
|
4252
4328
|
token: null;
|
|
4253
|
-
user:
|
|
4329
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
4254
4330
|
}>;
|
|
4255
4331
|
requestPasswordResetPhoneNumber: better_auth.StrictEndpoint<"/phone-number/request-password-reset", {
|
|
4256
4332
|
method: "POST";
|
|
@@ -4345,7 +4421,7 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
4345
4421
|
window: number;
|
|
4346
4422
|
max: number;
|
|
4347
4423
|
}[];
|
|
4348
|
-
options:
|
|
4424
|
+
options: better_auth_plugins_phone_number.PhoneNumberOptions | undefined;
|
|
4349
4425
|
$ERROR_CODES: {
|
|
4350
4426
|
OTP_EXPIRED: better_auth.RawError<"OTP_EXPIRED">;
|
|
4351
4427
|
INVALID_OTP: better_auth.RawError<"INVALID_OTP">;
|
|
@@ -5056,30 +5132,6 @@ declare function buildSa2kitAuthClient$1(options: Sa2kitAuthClientOptions$1): {
|
|
|
5056
5132
|
type Sa2kitAuthClient$1 = ReturnType<typeof buildSa2kitAuthClient$1>;
|
|
5057
5133
|
declare function createSa2kitAuthClient(options: Sa2kitAuthClientOptions$1): Sa2kitAuthClient$1;
|
|
5058
5134
|
|
|
5059
|
-
/**
|
|
5060
|
-
* Auth Client - Types
|
|
5061
|
-
* API 客户端类型定义
|
|
5062
|
-
*/
|
|
5063
|
-
|
|
5064
|
-
/**
|
|
5065
|
-
* 存储键名
|
|
5066
|
-
*/
|
|
5067
|
-
declare const STORAGE_KEYS: {
|
|
5068
|
-
readonly AUTH_TOKEN: "auth_token";
|
|
5069
|
-
readonly USER_DATA: "user_data";
|
|
5070
|
-
};
|
|
5071
|
-
/**
|
|
5072
|
-
* API 路由
|
|
5073
|
-
*/
|
|
5074
|
-
declare const API_ROUTES: {
|
|
5075
|
-
readonly AUTH: {
|
|
5076
|
-
readonly LOGIN: "/auth/login";
|
|
5077
|
-
readonly REGISTER: "/auth/register";
|
|
5078
|
-
readonly LOGOUT: "/auth/logout";
|
|
5079
|
-
readonly ME: "/auth/me";
|
|
5080
|
-
};
|
|
5081
|
-
};
|
|
5082
|
-
|
|
5083
5135
|
type Sa2kitAuthClientOptions = {
|
|
5084
5136
|
baseURL: string;
|
|
5085
5137
|
basePath?: string;
|
|
@@ -5325,7 +5377,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
5325
5377
|
fetchOptions?: FetchOptions | undefined;
|
|
5326
5378
|
}>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<Omit<{
|
|
5327
5379
|
token: string;
|
|
5328
|
-
user:
|
|
5380
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
5329
5381
|
}, "user"> & {
|
|
5330
5382
|
user: better_auth.StripEmptyObjects<{
|
|
5331
5383
|
id: string;
|
|
@@ -5384,7 +5436,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
5384
5436
|
emailVerified: boolean;
|
|
5385
5437
|
name: string;
|
|
5386
5438
|
image?: string | null | undefined;
|
|
5387
|
-
} &
|
|
5439
|
+
} & better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
5388
5440
|
}, "user"> & {
|
|
5389
5441
|
user: better_auth.StripEmptyObjects<{
|
|
5390
5442
|
id: string;
|
|
@@ -5401,7 +5453,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
5401
5453
|
}) | (Omit<{
|
|
5402
5454
|
status: boolean;
|
|
5403
5455
|
token: null;
|
|
5404
|
-
user:
|
|
5456
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
5405
5457
|
}, "user"> & {
|
|
5406
5458
|
user: better_auth.StripEmptyObjects<{
|
|
5407
5459
|
id: string;
|
|
@@ -5565,7 +5617,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
5565
5617
|
plugins: ({
|
|
5566
5618
|
id: "email-otp";
|
|
5567
5619
|
version: string;
|
|
5568
|
-
$InferServerPlugin: ReturnType<(options:
|
|
5620
|
+
$InferServerPlugin: ReturnType<(options: better_auth_plugins_email_otp.EmailOTPOptions) => {
|
|
5569
5621
|
id: "email-otp";
|
|
5570
5622
|
version: string;
|
|
5571
5623
|
init(ctx: better_auth.AuthContext): {
|
|
@@ -6098,7 +6150,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
6098
6150
|
window: number;
|
|
6099
6151
|
max: number;
|
|
6100
6152
|
})[];
|
|
6101
|
-
options:
|
|
6153
|
+
options: better_auth_plugins_email_otp.EmailOTPOptions;
|
|
6102
6154
|
$ERROR_CODES: {
|
|
6103
6155
|
OTP_EXPIRED: better_auth.RawError<"OTP_EXPIRED">;
|
|
6104
6156
|
INVALID_OTP: better_auth.RawError<"INVALID_OTP">;
|
|
@@ -6117,7 +6169,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
6117
6169
|
} | {
|
|
6118
6170
|
id: "phoneNumber";
|
|
6119
6171
|
version: string;
|
|
6120
|
-
$InferServerPlugin: ReturnType<(options?:
|
|
6172
|
+
$InferServerPlugin: ReturnType<(options?: better_auth_plugins_phone_number.PhoneNumberOptions | undefined) => {
|
|
6121
6173
|
id: "phone-number";
|
|
6122
6174
|
version: string;
|
|
6123
6175
|
init(): {
|
|
@@ -6195,7 +6247,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
6195
6247
|
};
|
|
6196
6248
|
}, {
|
|
6197
6249
|
token: string;
|
|
6198
|
-
user:
|
|
6250
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
6199
6251
|
}>;
|
|
6200
6252
|
sendPhoneNumberOTP: better_auth.StrictEndpoint<"/phone-number/send-otp", {
|
|
6201
6253
|
method: "POST";
|
|
@@ -6333,11 +6385,11 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
6333
6385
|
emailVerified: boolean;
|
|
6334
6386
|
name: string;
|
|
6335
6387
|
image?: string | null | undefined;
|
|
6336
|
-
} &
|
|
6388
|
+
} & better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
6337
6389
|
} | {
|
|
6338
6390
|
status: boolean;
|
|
6339
6391
|
token: null;
|
|
6340
|
-
user:
|
|
6392
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
6341
6393
|
}>;
|
|
6342
6394
|
requestPasswordResetPhoneNumber: better_auth.StrictEndpoint<"/phone-number/request-password-reset", {
|
|
6343
6395
|
method: "POST";
|
|
@@ -6432,7 +6484,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
6432
6484
|
window: number;
|
|
6433
6485
|
max: number;
|
|
6434
6486
|
}[];
|
|
6435
|
-
options:
|
|
6487
|
+
options: better_auth_plugins_phone_number.PhoneNumberOptions | undefined;
|
|
6436
6488
|
$ERROR_CODES: {
|
|
6437
6489
|
OTP_EXPIRED: better_auth.RawError<"OTP_EXPIRED">;
|
|
6438
6490
|
INVALID_OTP: better_auth.RawError<"INVALID_OTP">;
|
|
@@ -6703,7 +6755,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
6703
6755
|
plugins: ({
|
|
6704
6756
|
id: "email-otp";
|
|
6705
6757
|
version: string;
|
|
6706
|
-
$InferServerPlugin: ReturnType<(options:
|
|
6758
|
+
$InferServerPlugin: ReturnType<(options: better_auth_plugins_email_otp.EmailOTPOptions) => {
|
|
6707
6759
|
id: "email-otp";
|
|
6708
6760
|
version: string;
|
|
6709
6761
|
init(ctx: better_auth.AuthContext): {
|
|
@@ -7236,7 +7288,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
7236
7288
|
window: number;
|
|
7237
7289
|
max: number;
|
|
7238
7290
|
})[];
|
|
7239
|
-
options:
|
|
7291
|
+
options: better_auth_plugins_email_otp.EmailOTPOptions;
|
|
7240
7292
|
$ERROR_CODES: {
|
|
7241
7293
|
OTP_EXPIRED: better_auth.RawError<"OTP_EXPIRED">;
|
|
7242
7294
|
INVALID_OTP: better_auth.RawError<"INVALID_OTP">;
|
|
@@ -7255,7 +7307,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
7255
7307
|
} | {
|
|
7256
7308
|
id: "phoneNumber";
|
|
7257
7309
|
version: string;
|
|
7258
|
-
$InferServerPlugin: ReturnType<(options?:
|
|
7310
|
+
$InferServerPlugin: ReturnType<(options?: better_auth_plugins_phone_number.PhoneNumberOptions | undefined) => {
|
|
7259
7311
|
id: "phone-number";
|
|
7260
7312
|
version: string;
|
|
7261
7313
|
init(): {
|
|
@@ -7333,7 +7385,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
7333
7385
|
};
|
|
7334
7386
|
}, {
|
|
7335
7387
|
token: string;
|
|
7336
|
-
user:
|
|
7388
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
7337
7389
|
}>;
|
|
7338
7390
|
sendPhoneNumberOTP: better_auth.StrictEndpoint<"/phone-number/send-otp", {
|
|
7339
7391
|
method: "POST";
|
|
@@ -7471,11 +7523,11 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
7471
7523
|
emailVerified: boolean;
|
|
7472
7524
|
name: string;
|
|
7473
7525
|
image?: string | null | undefined;
|
|
7474
|
-
} &
|
|
7526
|
+
} & better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
7475
7527
|
} | {
|
|
7476
7528
|
status: boolean;
|
|
7477
7529
|
token: null;
|
|
7478
|
-
user:
|
|
7530
|
+
user: better_auth_plugins_phone_number.UserWithPhoneNumber;
|
|
7479
7531
|
}>;
|
|
7480
7532
|
requestPasswordResetPhoneNumber: better_auth.StrictEndpoint<"/phone-number/request-password-reset", {
|
|
7481
7533
|
method: "POST";
|
|
@@ -7570,7 +7622,7 @@ declare function buildSa2kitAuthClient(options: Sa2kitAuthClientOptions): {
|
|
|
7570
7622
|
window: number;
|
|
7571
7623
|
max: number;
|
|
7572
7624
|
}[];
|
|
7573
|
-
options:
|
|
7625
|
+
options: better_auth_plugins_phone_number.PhoneNumberOptions | undefined;
|
|
7574
7626
|
$ERROR_CODES: {
|
|
7575
7627
|
OTP_EXPIRED: better_auth.RawError<"OTP_EXPIRED">;
|
|
7576
7628
|
INVALID_OTP: better_auth.RawError<"INVALID_OTP">;
|
|
@@ -8139,52 +8191,36 @@ declare function useSession(authClient: Sa2kitAuthClient): {
|
|
|
8139
8191
|
};
|
|
8140
8192
|
type UseSessionReturn = ReturnType<typeof useSession>;
|
|
8141
8193
|
|
|
8142
|
-
declare function useAuth(apiClient: IAuthClient): UseAuthReturn;
|
|
8143
8194
|
/**
|
|
8144
|
-
*
|
|
8145
|
-
*
|
|
8146
|
-
* @example
|
|
8147
|
-
* ```typescript
|
|
8148
|
-
* const { values, errors, handleChange, handleBlur, validate } = useAuthForm({
|
|
8149
|
-
* email: '',
|
|
8150
|
-
* password: ''
|
|
8151
|
-
* })
|
|
8152
|
-
* ```
|
|
8195
|
+
* 类型定义
|
|
8153
8196
|
*/
|
|
8154
|
-
|
|
8155
|
-
values: T;
|
|
8156
|
-
errors: Partial<Record<keyof T, string>>;
|
|
8157
|
-
touched: Partial<Record<keyof T, boolean>>;
|
|
8158
|
-
handleChange: (field: keyof T, value: any) => void;
|
|
8159
|
-
handleBlur: (field: keyof T) => void;
|
|
8160
|
-
validate: (validationRules: Partial<Record<keyof T, (value: any) => string | undefined>>) => boolean;
|
|
8161
|
-
reset: () => void;
|
|
8162
|
-
setValues: React$1.Dispatch<React$1.SetStateAction<T>>;
|
|
8163
|
-
setErrors: React$1.Dispatch<React$1.SetStateAction<Partial<Record<keyof T, string>>>>;
|
|
8164
|
-
};
|
|
8197
|
+
type UserRole = 'USER' | 'ADMIN' | 'SUPER_ADMIN';
|
|
8165
8198
|
|
|
8166
8199
|
/**
|
|
8167
|
-
*
|
|
8200
|
+
* Auth 模块类型定义
|
|
8201
|
+
* Auth Module Types
|
|
8168
8202
|
*/
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
handleSubmit: (e?: React.FormEvent) => Promise<void>;
|
|
8177
|
-
}
|
|
8178
|
-
interface RegisterFormState {
|
|
8203
|
+
|
|
8204
|
+
/**
|
|
8205
|
+
* 用户基础信息(核心字段)
|
|
8206
|
+
* Base User Information
|
|
8207
|
+
*/
|
|
8208
|
+
interface BaseUser {
|
|
8209
|
+
id: string;
|
|
8179
8210
|
email: string;
|
|
8180
|
-
password: string;
|
|
8181
8211
|
username: string;
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8212
|
+
role: UserRole;
|
|
8213
|
+
}
|
|
8214
|
+
/**
|
|
8215
|
+
* 扩展用户信息(可选字段)
|
|
8216
|
+
* Extended User Information
|
|
8217
|
+
*/
|
|
8218
|
+
interface User extends BaseUser {
|
|
8219
|
+
nickname?: string;
|
|
8220
|
+
avatar?: string;
|
|
8221
|
+
createdAt?: string;
|
|
8222
|
+
updatedAt?: string;
|
|
8223
|
+
[key: string]: any;
|
|
8188
8224
|
}
|
|
8189
8225
|
|
|
8190
8226
|
/**
|
|
@@ -8193,25 +8229,14 @@ interface RegisterFormState {
|
|
|
8193
8229
|
* Browser / client 安全入口(Better Auth 3.0)
|
|
8194
8230
|
*/
|
|
8195
8231
|
|
|
8196
|
-
|
|
8197
|
-
declare const index$9_AuthResult: typeof AuthResult;
|
|
8198
|
-
declare const index$9_BaseUser: typeof BaseUser;
|
|
8199
|
-
declare const index$9_IAuthClient: typeof IAuthClient;
|
|
8200
|
-
declare const index$9_LoginForm: typeof LoginForm;
|
|
8201
|
-
type index$9_LoginFormState = LoginFormState;
|
|
8202
|
-
declare const index$9_RegisterForm: typeof RegisterForm;
|
|
8203
|
-
type index$9_RegisterFormState = RegisterFormState;
|
|
8204
|
-
declare const index$9_STORAGE_KEYS: typeof STORAGE_KEYS;
|
|
8205
|
-
declare const index$9_UseAuthReturn: typeof UseAuthReturn;
|
|
8232
|
+
type index$9_BaseUser = BaseUser;
|
|
8206
8233
|
type index$9_UseSessionReturn = UseSessionReturn;
|
|
8207
|
-
|
|
8208
|
-
|
|
8234
|
+
type index$9_User = User;
|
|
8235
|
+
type index$9_UserRole = UserRole;
|
|
8209
8236
|
declare const index$9_createSa2kitAuthClient: typeof createSa2kitAuthClient;
|
|
8210
|
-
declare const index$9_useAuth: typeof useAuth;
|
|
8211
|
-
declare const index$9_useAuthForm: typeof useAuthForm;
|
|
8212
8237
|
declare const index$9_useSession: typeof useSession;
|
|
8213
8238
|
declare namespace index$9 {
|
|
8214
|
-
export {
|
|
8239
|
+
export { type index$9_BaseUser as BaseUser, type Sa2kitAuthClient$1 as Sa2kitAuthClient, type Sa2kitAuthClientOptions$1 as Sa2kitAuthClientOptions, type index$9_UseSessionReturn as UseSessionReturn, type index$9_User as User, type index$9_UserRole as UserRole, index$9_createSa2kitAuthClient as createSa2kitAuthClient, index$9_useSession as useSession };
|
|
8215
8240
|
}
|
|
8216
8241
|
|
|
8217
8242
|
/** 浏览器 / Next.js CSR 官方 adapter */
|
|
@@ -10254,12 +10279,12 @@ type index$4_BaseApiClientConfig = BaseApiClientConfig;
|
|
|
10254
10279
|
declare const index$4_DEFAULT_API_ROUTES: typeof DEFAULT_API_ROUTES;
|
|
10255
10280
|
declare const index$4_DEFAULT_STORAGE_KEYS: typeof DEFAULT_STORAGE_KEYS;
|
|
10256
10281
|
type index$4_PaginationParams = PaginationParams;
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10282
|
+
type index$4_RequestAdapter = RequestAdapter;
|
|
10283
|
+
type index$4_RequestConfig = RequestConfig;
|
|
10284
|
+
type index$4_StorageAdapter = StorageAdapter;
|
|
10260
10285
|
type index$4_StorageKeys = StorageKeys;
|
|
10261
10286
|
declare namespace index$4 {
|
|
10262
|
-
export { type index$4_ApiResponse as ApiResponse, type index$4_ApiRoutes as ApiRoutes, type index$4_AuthResponse as AuthResponse, index$4_BaseApiClient as BaseApiClient, type index$4_BaseApiClientConfig as BaseApiClientConfig, index$4_DEFAULT_API_ROUTES as DEFAULT_API_ROUTES, index$4_DEFAULT_STORAGE_KEYS as DEFAULT_STORAGE_KEYS, type index$4_PaginationParams as PaginationParams, index$4_RequestAdapter as RequestAdapter, index$4_RequestConfig as RequestConfig, index$4_StorageAdapter as StorageAdapter, type index$4_StorageKeys as StorageKeys };
|
|
10287
|
+
export { type index$4_ApiResponse as ApiResponse, type index$4_ApiRoutes as ApiRoutes, type index$4_AuthResponse as AuthResponse, index$4_BaseApiClient as BaseApiClient, type index$4_BaseApiClientConfig as BaseApiClientConfig, index$4_DEFAULT_API_ROUTES as DEFAULT_API_ROUTES, index$4_DEFAULT_STORAGE_KEYS as DEFAULT_STORAGE_KEYS, type index$4_PaginationParams as PaginationParams, type index$4_RequestAdapter as RequestAdapter, type index$4_RequestConfig as RequestConfig, type index$4_StorageAdapter as StorageAdapter, type index$4_StorageKeys as StorageKeys };
|
|
10263
10288
|
}
|
|
10264
10289
|
|
|
10265
10290
|
/**
|
|
@@ -10581,14 +10606,10 @@ declare const SortableExperimentItem: React__default.FC<SortableExperimentItemPr
|
|
|
10581
10606
|
interface PermissionGuardProps {
|
|
10582
10607
|
children: React__default.ReactNode;
|
|
10583
10608
|
fallback?: React__default.ReactNode;
|
|
10584
|
-
apiClient: BaseApiClient$1;
|
|
10585
10609
|
}
|
|
10586
10610
|
declare const PermissionGuard: React__default.FC<PermissionGuardProps>;
|
|
10587
10611
|
|
|
10588
|
-
|
|
10589
|
-
apiClient: BaseApiClient$1;
|
|
10590
|
-
}
|
|
10591
|
-
declare const UserInfoBar: React__default.FC<UserInfoBarProps>;
|
|
10612
|
+
declare const UserInfoBar: React__default.FC;
|
|
10592
10613
|
|
|
10593
10614
|
/**
|
|
10594
10615
|
* 实验田模块工具函数
|
|
@@ -11587,4 +11608,4 @@ declare namespace index {
|
|
|
11587
11608
|
export { index_MikuContestMiniappHome as MikuContestMiniappHome, index_MikuContestMiniappPage as MikuContestMiniappPage };
|
|
11588
11609
|
}
|
|
11589
11610
|
|
|
11590
|
-
export { type AiChatChunk, type AiChatInputOptions, type AiChatRequest, type AiChatRequestOptions, type AiChatResponse, type AiChatSession, type AiChatSessionOptions, type AiChatStatus, type AiClient, type AiClientConfig, type AiLogger, type AiMessage, type AiProvider, type AiRole, type AiToolCall, type AiToolChoice, type AiToolDefinition, type AiUsage, AutoOpenModal, type AutoOpenModalProps, type BackgroundRemovalOptions, type BackgroundRemovalState, BackgroundRemover, CategoryFilter, type CompletionFilter, CompletionFilterComponent, ConsoleLoggerAdapter, CreateMikuAnnouncementInput, CreateMikuSubmissionInput, DEFAULT_OPENAI_BASE_URL, DEFAULT_OPENAI_MODEL, DraggableExperimentGrid, type DraggableExperimentGridProps, type DrizzleLikeDb, EmptyState, type EmptyStateProps, EnhancedAvatar, type EnhancedAvatarProps, type ExperimentCategory, ExperimentGrid, type ExperimentGridItem, type ExperimentGridProps, type ExperimentItem, ExperimentItemGrid, GridColumns, GridGap, GridItem, InMemorySkillRegistry, type LogEntry, LogLevel, Logger, type LoggerAdapter, type LoggerConfig, MikuAnnouncement, MikuContestApiClient, MikuContestConfig, type MikuContestNoticeRow, MikuContestPersistedState, type MikuContestPersistenceAdapter, MikuContestPersistentService, type MikuContestPersistentServiceOptions, type MikuContestRouteConfig, MikuContestService, type MikuContestServiceLike, type MikuContestServiceOptions, MikuContestStateDbService, MikuContestStateSnapshot, type MikuContestVoteRow, MikuLeaderboardItem, MikuSubmission, MikuSubmissionContent, MikuSubmissionExportRow, MikuSubmissionFilter, MikuVoteRecord, MikuVoterRestriction, MikuVotingRules, type OCROptions, type OCRResult, OCRScanner, type OCRState, PageHeader, type PageHeaderProps, PermissionGuard, type ProfileBadge, ProfileButton, type ProfileButtonProps, type ProfileData, ProfileModal, type ProfileModalProps, type PromptTemplateOptions, type PromptVariableValue, type PromptVariables, Requester, ResetMikuVotesInput, type ResolvedAiClientConfig, ReviewMikuSubmissionInput, SentimentAnalyzer, type SentimentOptions, type SentimentResult, type SentimentState, SetMikuVoterRestrictionInput, type SkillDefinition, type SkillExecutionContext, type SkillInputSchema, type SkillRegistry, SmartAssistant, type SocialLink, SortControl, type SortControlProps, type SortMode, SortModeToggle, type SortModeToggleProps, SortableExperimentItem, type SortableExperimentItemProps, type Stat, StorageAdapter, StorageChangeEvent, type TestFieldConfig, type TestFieldPageProps, type TextGenerationOptions, type TextGenerationState, type UseAiChatOptions, UserInfoBar, type
|
|
11611
|
+
export { type AiChatChunk, type AiChatInputOptions, type AiChatRequest, type AiChatRequestOptions, type AiChatResponse, type AiChatSession, type AiChatSessionOptions, type AiChatStatus, type AiClient, type AiClientConfig, type AiLogger, type AiMessage, type AiProvider, type AiRole, type AiToolCall, type AiToolChoice, type AiToolDefinition, type AiUsage, AutoOpenModal, type AutoOpenModalProps, type BackgroundRemovalOptions, type BackgroundRemovalState, BackgroundRemover, CategoryFilter, type CompletionFilter, CompletionFilterComponent, ConsoleLoggerAdapter, CreateMikuAnnouncementInput, CreateMikuSubmissionInput, DEFAULT_OPENAI_BASE_URL, DEFAULT_OPENAI_MODEL, DraggableExperimentGrid, type DraggableExperimentGridProps, type DrizzleLikeDb, EmptyState, type EmptyStateProps, EnhancedAvatar, type EnhancedAvatarProps, type ExperimentCategory, ExperimentGrid, type ExperimentGridItem, type ExperimentGridProps, type ExperimentItem, ExperimentItemGrid, GridColumns, GridGap, GridItem, InMemorySkillRegistry, type LogEntry, LogLevel, Logger, type LoggerAdapter, type LoggerConfig, MikuAnnouncement, MikuContestApiClient, MikuContestConfig, type MikuContestNoticeRow, MikuContestPersistedState, type MikuContestPersistenceAdapter, MikuContestPersistentService, type MikuContestPersistentServiceOptions, type MikuContestRouteConfig, MikuContestService, type MikuContestServiceLike, type MikuContestServiceOptions, MikuContestStateDbService, MikuContestStateSnapshot, type MikuContestVoteRow, MikuLeaderboardItem, MikuSubmission, MikuSubmissionContent, MikuSubmissionExportRow, MikuSubmissionFilter, MikuVoteRecord, MikuVoterRestriction, MikuVotingRules, type OCROptions, type OCRResult, OCRScanner, type OCRState, PageHeader, type PageHeaderProps, PermissionGuard, type ProfileBadge, ProfileButton, type ProfileButtonProps, type ProfileData, ProfileModal, type ProfileModalProps, type PromptTemplateOptions, type PromptVariableValue, type PromptVariables, Requester, ResetMikuVotesInput, type ResolvedAiClientConfig, ReviewMikuSubmissionInput, SentimentAnalyzer, type SentimentOptions, type SentimentResult, type SentimentState, SetMikuVoterRestrictionInput, type SkillDefinition, type SkillExecutionContext, type SkillInputSchema, type SkillRegistry, SmartAssistant, type SocialLink, SortControl, type SortControlProps, type SortMode, SortModeToggle, type SortModeToggleProps, SortableExperimentItem, type SortableExperimentItemProps, type Stat, type StorageAdapter, type StorageChangeEvent, type TestFieldConfig, type TestFieldPageProps, type TextGenerationOptions, type TextGenerationState, type UseAiChatOptions, UserInfoBar, type ViewMode, type VoteCheckContext, VoteMikuSubmissionInput, applyPromptTemplate, arrayUtils, checkVoteEligibility, cn, index$3 as common, createAiClient, createChatSession, createCreateSubmissionHandler, createDefaultMikuContestConfig, createExportSubmissionsHandler, createGetContestSnapshotHandler, createListSubmissionsHandler, createLogger, createMikuContestDrizzlePersistenceAdapter, createMikuContestPersistentService, createMikuContestService, createOpenAICompatibleProvider, createResetVotesHandler, createReviewSubmissionHandler, createSetVoterRestrictionHandler, createSkillRegistry, createUpdateContestConfigHandler, createVoteHandler, debugUtils, defaultMikuVotingRules, errorUtils, fileUtils, filterExperiments, formatTime, getAllTags, getCategoryColor, getCategoryDisplayName, getCompletionFilterDisplayName, getCompletionStatusColor, getCompletionStatusText, getExperimentCounts, japaneseUtils, logger, mikuContestConfigs, mikuContestDbService, mikuContestNotices, mikuContestSubmissions, mikuContestVoterRestrictions, mikuContestVotes, index$1 as miniappService, index as miniappUI, normalizePromptVariables, skillToToolDefinition, sortByVotesDesc, sortExperiments, stringUtils, toVoteDayKey, useAiChat, useAsyncStorage, useBackgroundRemoval, useElectronStorage, useLocalStorage, useMikuContest, useOCR, useSentimentAnalysis, useStorage, useTaroStorage, useTextGeneration, validateExperiment, validateMikuSubmissionInput, validators, index$2 as webService };
|