@movk/nuxt 1.1.2 → 1.2.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/README.md +5 -29
- package/dist/module.d.mts +3 -1
- package/dist/module.json +3 -3
- package/dist/module.mjs +120 -34
- package/dist/runtime/auto-form/controls.d.ts +221 -0
- package/dist/runtime/auto-form/controls.js +70 -0
- package/dist/runtime/{utils → auto-form}/field-utils.d.ts +4 -20
- package/dist/runtime/{utils → auto-form}/field-utils.js +1 -2
- package/dist/runtime/auto-form/metadata.d.ts +22 -0
- package/dist/runtime/auto-form/metadata.js +53 -0
- package/dist/runtime/auto-form/provider.d.ts +27 -0
- package/dist/runtime/{internal/useAutoFormProvider.js → auto-form/provider.js} +1 -1
- package/dist/runtime/{utils → auto-form}/reactive-utils.d.ts +4 -22
- package/dist/runtime/{utils → auto-form}/schema-introspector.d.ts +3 -9
- package/dist/runtime/{utils → auto-form}/schema-introspector.js +11 -9
- package/dist/runtime/components/AutoForm.d.vue.ts +4 -5
- package/dist/runtime/components/AutoForm.vue +12 -35
- package/dist/runtime/components/AutoForm.vue.d.ts +4 -5
- package/dist/runtime/components/ColorChooser.d.vue.ts +10 -6
- package/dist/runtime/components/ColorChooser.vue +4 -7
- package/dist/runtime/components/ColorChooser.vue.d.ts +10 -6
- package/dist/runtime/components/DatePicker.d.vue.ts +16 -10
- package/dist/runtime/components/DatePicker.vue.d.ts +16 -10
- package/dist/runtime/components/SearchForm.d.vue.ts +171 -0
- package/dist/runtime/components/SearchForm.vue +216 -0
- package/dist/runtime/components/SearchForm.vue.d.ts +171 -0
- package/dist/runtime/components/SlideVerify.d.vue.ts +5 -32
- package/dist/runtime/components/SlideVerify.vue +4 -4
- package/dist/runtime/components/SlideVerify.vue.d.ts +5 -32
- package/dist/runtime/components/StarRating.d.vue.ts +8 -16
- package/dist/runtime/components/StarRating.vue +50 -65
- package/dist/runtime/components/StarRating.vue.d.ts +8 -16
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.d.vue.ts +10 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.vue +16 -23
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.vue.d.ts +10 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererChildren.d.vue.ts +26 -0
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererChildren.vue +50 -0
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererChildren.vue.d.ts +26 -0
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.d.vue.ts +8 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.vue +2 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.vue.d.ts +8 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.d.vue.ts +8 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.vue +29 -64
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.vue.d.ts +8 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.d.vue.ts +8 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.vue +15 -69
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.vue.d.ts +8 -2
- package/dist/runtime/components/input/AsPhoneNumberInput.d.vue.ts +36 -0
- package/dist/runtime/components/input/AsPhoneNumberInput.vue +35 -0
- package/dist/runtime/components/input/AsPhoneNumberInput.vue.d.ts +36 -0
- package/dist/runtime/components/input/WithCharacterLimit.d.vue.ts +17 -9
- package/dist/runtime/components/input/WithCharacterLimit.vue +5 -5
- package/dist/runtime/components/input/WithCharacterLimit.vue.d.ts +17 -9
- package/dist/runtime/components/input/WithClear.d.vue.ts +13 -9
- package/dist/runtime/components/input/WithClear.vue +2 -2
- package/dist/runtime/components/input/WithClear.vue.d.ts +13 -9
- package/dist/runtime/components/input/WithCopy.d.vue.ts +16 -10
- package/dist/runtime/components/input/WithCopy.vue +3 -3
- package/dist/runtime/components/input/WithCopy.vue.d.ts +16 -10
- package/dist/runtime/components/input/WithFloatingLabel.d.vue.ts +36 -0
- package/dist/runtime/components/input/WithFloatingLabel.vue +67 -0
- package/dist/runtime/components/input/WithFloatingLabel.vue.d.ts +36 -0
- package/dist/runtime/components/input/WithPasswordToggle.d.vue.ts +11 -9
- package/dist/runtime/components/input/WithPasswordToggle.vue +3 -3
- package/dist/runtime/components/input/WithPasswordToggle.vue.d.ts +11 -9
- package/dist/runtime/components/theme-picker/ThemePicker.d.vue.ts +1 -1
- package/dist/runtime/components/theme-picker/ThemePicker.vue +19 -25
- package/dist/runtime/components/theme-picker/ThemePicker.vue.d.ts +1 -1
- package/dist/runtime/components/theme-picker/ThemePickerButton.d.vue.ts +1 -7
- package/dist/runtime/components/theme-picker/ThemePickerButton.vue.d.ts +1 -7
- package/dist/runtime/composables/index.d.ts +1 -1
- package/dist/runtime/composables/index.js +1 -1
- package/dist/runtime/composables/useApiFetch.d.ts +17 -14
- package/dist/runtime/composables/useApiFetch.js +3 -28
- package/dist/runtime/composables/useAutoForm.d.ts +14 -98
- package/dist/runtime/composables/useAutoForm.js +37 -157
- package/dist/runtime/composables/useClientApiFetch.d.ts +5 -6
- package/dist/runtime/composables/useDownloadWithProgress.js +5 -6
- package/dist/runtime/composables/useLazyApiFetch.d.ts +18 -0
- package/dist/runtime/composables/useLazyApiFetch.js +4 -0
- package/dist/runtime/composables/useTheme.d.ts +17 -14
- package/dist/runtime/composables/useTheme.js +68 -72
- package/dist/runtime/composables/useUploadWithProgress.d.ts +2 -2
- package/dist/runtime/composables/useUploadWithProgress.js +7 -7
- package/dist/runtime/constants/api-defaults.d.ts +9 -0
- package/dist/runtime/constants/api-defaults.js +32 -0
- package/dist/runtime/constants/auto-form.d.ts +0 -2
- package/dist/runtime/constants/auto-form.js +0 -25
- package/dist/runtime/constants/grid-cols.d.ts +7 -0
- package/dist/runtime/constants/grid-cols.js +44 -0
- package/dist/runtime/plugins/api.factory.js +78 -121
- package/dist/runtime/plugins/theme.js +44 -64
- package/dist/runtime/style.css +1 -1
- package/dist/runtime/types/api.d.ts +277 -146
- package/dist/runtime/types/auto-form.d.ts +122 -411
- package/dist/runtime/types/index.d.ts +2 -2
- package/dist/runtime/types/index.js +2 -2
- package/dist/runtime/types/module.d.ts +70 -13
- package/dist/runtime/types/theme.d.ts +2 -0
- package/dist/runtime/types/zod.d.ts +11 -10
- package/dist/runtime/utils/api-utils.d.ts +27 -48
- package/dist/runtime/utils/api-utils.js +18 -47
- package/dist/runtime/utils/meta.d.ts +7 -0
- package/dist/runtime/utils/meta.js +16 -0
- package/package.json +36 -35
- package/dist/runtime/composables/useApiAuth.d.ts +0 -47
- package/dist/runtime/composables/useApiAuth.js +0 -66
- package/dist/runtime/internal/useAutoFormProvider.d.ts +0 -50
- package/dist/runtime/schemas/api.d.ts +0 -590
- package/dist/runtime/schemas/api.js +0 -228
- package/dist/runtime/server/api/_movk/session.post.d.ts +0 -10
- package/dist/runtime/server/api/_movk/session.post.js +0 -18
- package/dist/runtime/types/auth.d.ts +0 -34
- package/dist/runtime/types/auto-form-renderer.d.ts +0 -22
- package/dist/runtime/types/components.d.ts +0 -43
- package/dist/runtime/types/components.js +0 -0
- package/dist/runtime/utils/auto-form.d.ts +0 -3
- package/dist/runtime/utils/auto-form.js +0 -18
- /package/dist/runtime/{utils → auto-form}/reactive-utils.js +0 -0
- /package/dist/runtime/types/{auto-form-renderer.js → theme.js} +0 -0
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
|
-
import type { AutoFormField, AutoFormFieldContext } from '../types/auto-form.js';
|
|
3
|
-
export declare function useAutoFormProvider<T extends Record<string, any>>(state: Ref<T>, slots: Record<string, any>): {
|
|
4
|
-
createFieldContext: (field: AutoFormField, extraProps?: Record<string, any>) => AutoFormFieldContext;
|
|
5
|
-
createSlotProps: (field: AutoFormField, extraProps?: Record<string, any>) => AutoFormFieldContext;
|
|
6
|
-
resolveFieldProp: <T_1 = any>(field: AutoFormField, prop: string, defaultValue?: T_1, extraProps?: Record<string, any>) => T_1 | undefined;
|
|
7
|
-
renderFieldSlot: (fn?: (props?: any) => any, slotProps?: any) => any;
|
|
8
|
-
getResolvedFieldSlots: (field: AutoFormField, extraProps?: Record<string, any>) => undefined;
|
|
9
|
-
renderControl: (field: AutoFormField, extraProps?: Record<string, any>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}> | null;
|
|
12
|
-
createSlotResolver: (field: AutoFormField, extraProps?: Record<string, any>) => {
|
|
13
|
-
hasSlot(name: string): boolean;
|
|
14
|
-
renderSlot(name: string, slotProps: any): any;
|
|
15
|
-
};
|
|
16
|
-
createFormFieldSlots: (field: AutoFormField, slotResolver: ReturnType<(field: AutoFormField, extraProps?: Record<string, any>) => {
|
|
17
|
-
hasSlot(name: string): boolean;
|
|
18
|
-
renderSlot(name: string, slotProps: any): any;
|
|
19
|
-
}>, extraProps?: Record<string, any>) => Record<string, any>;
|
|
20
|
-
createCollapsibleEnhancer: (field: AutoFormField, extraProps?: Record<string, any>) => {
|
|
21
|
-
collapsibleConfig: import("vue").ComputedRef<undefined>;
|
|
22
|
-
shouldShowCollapsible: import("vue").ComputedRef<boolean>;
|
|
23
|
-
isHidden: import("vue").ComputedRef<undefined>;
|
|
24
|
-
enhancedField: import("vue").ComputedRef<AutoFormField>;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export declare function useAutoFormInjector(): {
|
|
28
|
-
createFieldContext: (field: AutoFormField, extraProps?: Record<string, any>) => AutoFormFieldContext;
|
|
29
|
-
createSlotProps: (field: AutoFormField, extraProps?: Record<string, any>) => AutoFormFieldContext;
|
|
30
|
-
resolveFieldProp: <T = any>(field: AutoFormField, prop: string, defaultValue?: T | undefined, extraProps?: Record<string, any>) => T | undefined;
|
|
31
|
-
renderFieldSlot: (fn?: ((props?: any) => any) | undefined, slotProps?: any) => any;
|
|
32
|
-
getResolvedFieldSlots: (field: AutoFormField, extraProps?: Record<string, any>) => undefined;
|
|
33
|
-
renderControl: (field: AutoFormField, extraProps?: Record<string, any>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
34
|
-
[key: string]: any;
|
|
35
|
-
}> | null;
|
|
36
|
-
createSlotResolver: (field: AutoFormField, extraProps?: Record<string, any>) => {
|
|
37
|
-
hasSlot(name: string): boolean;
|
|
38
|
-
renderSlot(name: string, slotProps: any): any;
|
|
39
|
-
};
|
|
40
|
-
createFormFieldSlots: (field: AutoFormField, slotResolver: {
|
|
41
|
-
hasSlot(name: string): boolean;
|
|
42
|
-
renderSlot(name: string, slotProps: any): any;
|
|
43
|
-
}, extraProps?: Record<string, any>) => Record<string, any>;
|
|
44
|
-
createCollapsibleEnhancer: (field: AutoFormField, extraProps?: Record<string, any>) => {
|
|
45
|
-
collapsibleConfig: import("vue").ComputedRef<undefined>;
|
|
46
|
-
shouldShowCollapsible: import("vue").ComputedRef<boolean>;
|
|
47
|
-
isHidden: import("vue").ComputedRef<undefined>;
|
|
48
|
-
enhancedField: import("vue").ComputedRef<AutoFormField>;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
@@ -1,590 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod/v4';
|
|
2
|
-
/**
|
|
3
|
-
* API 响应配置 Schema
|
|
4
|
-
* @description 定义业务状态码判断规则和数据/消息字段的映射关系
|
|
5
|
-
*/
|
|
6
|
-
export declare const apiResponseConfigSchema: z.ZodObject<{
|
|
7
|
-
successCodes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
8
|
-
codeKey: z.ZodDefault<z.ZodString>;
|
|
9
|
-
messageKey: z.ZodDefault<z.ZodString>;
|
|
10
|
-
dataKey: z.ZodDefault<z.ZodString>;
|
|
11
|
-
}, z.core.$strip>;
|
|
12
|
-
/**
|
|
13
|
-
* 401 未授权处理配置 Schema
|
|
14
|
-
* @description 定义当接收到 401 响应时的自动处理行为
|
|
15
|
-
*/
|
|
16
|
-
export declare const apiUnauthorizedConfigSchema: z.ZodObject<{
|
|
17
|
-
redirect: z.ZodDefault<z.ZodBoolean>;
|
|
18
|
-
loginPath: z.ZodDefault<z.ZodString>;
|
|
19
|
-
clearSession: z.ZodDefault<z.ZodBoolean>;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
|
-
/**
|
|
22
|
-
* API 认证配置 Schema
|
|
23
|
-
* @description 定义认证令牌的来源、格式和请求头配置
|
|
24
|
-
*/
|
|
25
|
-
export declare const apiAuthConfigSchema: z.ZodObject<{
|
|
26
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
27
|
-
tokenSource: z.ZodDefault<z.ZodEnum<{
|
|
28
|
-
custom: "custom";
|
|
29
|
-
session: "session";
|
|
30
|
-
}>>;
|
|
31
|
-
sessionTokenPath: z.ZodDefault<z.ZodString>;
|
|
32
|
-
tokenType: z.ZodDefault<z.ZodEnum<{
|
|
33
|
-
Bearer: "Bearer";
|
|
34
|
-
Basic: "Basic";
|
|
35
|
-
Custom: "Custom";
|
|
36
|
-
}>>;
|
|
37
|
-
customTokenType: z.ZodOptional<z.ZodString>;
|
|
38
|
-
headerName: z.ZodDefault<z.ZodString>;
|
|
39
|
-
unauthorized: z.ZodOptional<z.ZodObject<{
|
|
40
|
-
redirect: z.ZodDefault<z.ZodBoolean>;
|
|
41
|
-
loginPath: z.ZodDefault<z.ZodString>;
|
|
42
|
-
clearSession: z.ZodDefault<z.ZodBoolean>;
|
|
43
|
-
}, z.core.$strip>>;
|
|
44
|
-
}, z.core.$strip>;
|
|
45
|
-
/**
|
|
46
|
-
* Toast 提示配置 Schema
|
|
47
|
-
* @description 定义成功和错误提示的全局样式和行为
|
|
48
|
-
*/
|
|
49
|
-
export declare const apiToastConfigSchema: z.ZodObject<{
|
|
50
|
-
/**
|
|
51
|
-
* 是否启用 Toast 提示
|
|
52
|
-
* @defaultValue true
|
|
53
|
-
*/
|
|
54
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
55
|
-
/** 成功提示配置 */
|
|
56
|
-
success: z.ZodOptional<z.ZodObject<{
|
|
57
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
58
|
-
color: z.ZodDefault<z.ZodString>;
|
|
59
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
60
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
61
|
-
}, z.core.$strip>>;
|
|
62
|
-
/** 错误提示配置 */
|
|
63
|
-
error: z.ZodOptional<z.ZodObject<{
|
|
64
|
-
/**
|
|
65
|
-
* 是否显示错误提示
|
|
66
|
-
* @defaultValue true
|
|
67
|
-
*/
|
|
68
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
69
|
-
/**
|
|
70
|
-
* 提示颜色
|
|
71
|
-
* @defaultValue 'error'
|
|
72
|
-
*/
|
|
73
|
-
color: z.ZodDefault<z.ZodString>;
|
|
74
|
-
/**
|
|
75
|
-
* 图标类名
|
|
76
|
-
* @defaultValue 'i-lucide-circle-x'
|
|
77
|
-
*/
|
|
78
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
79
|
-
/**
|
|
80
|
-
* 显示时长(毫秒)
|
|
81
|
-
* @defaultValue 3000
|
|
82
|
-
*/
|
|
83
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
84
|
-
}, z.core.$loose>>;
|
|
85
|
-
}, z.core.$loose>;
|
|
86
|
-
/**
|
|
87
|
-
* API 端点公共配置 Schema
|
|
88
|
-
* @description 定义单个 API 端点的配置(可在客户端访问的配置)
|
|
89
|
-
*/
|
|
90
|
-
export declare const apiEndpointPublicConfigSchema: z.ZodObject<{
|
|
91
|
-
baseURL: z.ZodString;
|
|
92
|
-
alias: z.ZodOptional<z.ZodString>;
|
|
93
|
-
auth: z.ZodOptional<z.ZodObject<{
|
|
94
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
-
tokenSource: z.ZodOptional<z.ZodEnum<{
|
|
96
|
-
custom: "custom";
|
|
97
|
-
session: "session";
|
|
98
|
-
}>>;
|
|
99
|
-
sessionTokenPath: z.ZodOptional<z.ZodString>;
|
|
100
|
-
tokenType: z.ZodOptional<z.ZodEnum<{
|
|
101
|
-
Bearer: "Bearer";
|
|
102
|
-
Basic: "Basic";
|
|
103
|
-
Custom: "Custom";
|
|
104
|
-
}>>;
|
|
105
|
-
customTokenType: z.ZodOptional<z.ZodString>;
|
|
106
|
-
headerName: z.ZodOptional<z.ZodString>;
|
|
107
|
-
unauthorized: z.ZodOptional<z.ZodObject<{
|
|
108
|
-
redirect: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
-
loginPath: z.ZodOptional<z.ZodString>;
|
|
110
|
-
clearSession: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
-
}, z.core.$strip>>;
|
|
112
|
-
}, z.core.$strip>>;
|
|
113
|
-
toast: z.ZodOptional<z.ZodObject<{
|
|
114
|
-
enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
115
|
-
success: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
116
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
117
|
-
color: z.ZodDefault<z.ZodString>;
|
|
118
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
119
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
120
|
-
}, z.core.$strip>>>;
|
|
121
|
-
error: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
122
|
-
/**
|
|
123
|
-
* 是否显示错误提示
|
|
124
|
-
* @defaultValue true
|
|
125
|
-
*/
|
|
126
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
127
|
-
/**
|
|
128
|
-
* 提示颜色
|
|
129
|
-
* @defaultValue 'error'
|
|
130
|
-
*/
|
|
131
|
-
color: z.ZodDefault<z.ZodString>;
|
|
132
|
-
/**
|
|
133
|
-
* 图标类名
|
|
134
|
-
* @defaultValue 'i-lucide-circle-x'
|
|
135
|
-
*/
|
|
136
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
137
|
-
/**
|
|
138
|
-
* 显示时长(毫秒)
|
|
139
|
-
* @defaultValue 3000
|
|
140
|
-
*/
|
|
141
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
142
|
-
}, z.core.$loose>>>;
|
|
143
|
-
}, z.core.$loose>>;
|
|
144
|
-
response: z.ZodOptional<z.ZodObject<{
|
|
145
|
-
successCodes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>>;
|
|
146
|
-
codeKey: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
147
|
-
messageKey: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
148
|
-
dataKey: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
149
|
-
}, z.core.$strip>>;
|
|
150
|
-
}, z.core.$strip>;
|
|
151
|
-
/**
|
|
152
|
-
* API 端点私有配置 Schema
|
|
153
|
-
* @description 定义仅在服务端可访问的端点配置(不会暴露给客户端)
|
|
154
|
-
*/
|
|
155
|
-
export declare const apiEndpointPrivateConfigSchema: z.ZodObject<{
|
|
156
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
157
|
-
}, z.core.$strip>;
|
|
158
|
-
/**
|
|
159
|
-
* Movk API 模块公共配置 Schema
|
|
160
|
-
* @description 定义模块的全局配置(可在客户端访问)
|
|
161
|
-
*/
|
|
162
|
-
export declare const movkApiPublicConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
163
|
-
defaultEndpoint: z.ZodDefault<z.ZodString>;
|
|
164
|
-
debug: z.ZodDefault<z.ZodBoolean>;
|
|
165
|
-
endpoints: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
166
|
-
baseURL: z.ZodString;
|
|
167
|
-
alias: z.ZodOptional<z.ZodString>;
|
|
168
|
-
auth: z.ZodOptional<z.ZodObject<{
|
|
169
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
-
tokenSource: z.ZodOptional<z.ZodEnum<{
|
|
171
|
-
custom: "custom";
|
|
172
|
-
session: "session";
|
|
173
|
-
}>>;
|
|
174
|
-
sessionTokenPath: z.ZodOptional<z.ZodString>;
|
|
175
|
-
tokenType: z.ZodOptional<z.ZodEnum<{
|
|
176
|
-
Bearer: "Bearer";
|
|
177
|
-
Basic: "Basic";
|
|
178
|
-
Custom: "Custom";
|
|
179
|
-
}>>;
|
|
180
|
-
customTokenType: z.ZodOptional<z.ZodString>;
|
|
181
|
-
headerName: z.ZodOptional<z.ZodString>;
|
|
182
|
-
unauthorized: z.ZodOptional<z.ZodObject<{
|
|
183
|
-
redirect: z.ZodOptional<z.ZodBoolean>;
|
|
184
|
-
loginPath: z.ZodOptional<z.ZodString>;
|
|
185
|
-
clearSession: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
-
}, z.core.$strip>>;
|
|
187
|
-
}, z.core.$strip>>;
|
|
188
|
-
toast: z.ZodOptional<z.ZodObject<{
|
|
189
|
-
enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
190
|
-
success: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
191
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
192
|
-
color: z.ZodDefault<z.ZodString>;
|
|
193
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
194
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
195
|
-
}, z.core.$strip>>>;
|
|
196
|
-
error: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
197
|
-
/**
|
|
198
|
-
* 是否显示错误提示
|
|
199
|
-
* @defaultValue true
|
|
200
|
-
*/
|
|
201
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
202
|
-
/**
|
|
203
|
-
* 提示颜色
|
|
204
|
-
* @defaultValue 'error'
|
|
205
|
-
*/
|
|
206
|
-
color: z.ZodDefault<z.ZodString>;
|
|
207
|
-
/**
|
|
208
|
-
* 图标类名
|
|
209
|
-
* @defaultValue 'i-lucide-circle-x'
|
|
210
|
-
*/
|
|
211
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
212
|
-
/**
|
|
213
|
-
* 显示时长(毫秒)
|
|
214
|
-
* @defaultValue 3000
|
|
215
|
-
*/
|
|
216
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
217
|
-
}, z.core.$loose>>>;
|
|
218
|
-
}, z.core.$loose>>;
|
|
219
|
-
response: z.ZodOptional<z.ZodObject<{
|
|
220
|
-
successCodes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>>;
|
|
221
|
-
codeKey: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
222
|
-
messageKey: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
223
|
-
dataKey: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
224
|
-
}, z.core.$strip>>;
|
|
225
|
-
}, z.core.$strip>>>;
|
|
226
|
-
response: z.ZodOptional<z.ZodObject<{
|
|
227
|
-
successCodes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
228
|
-
codeKey: z.ZodDefault<z.ZodString>;
|
|
229
|
-
messageKey: z.ZodDefault<z.ZodString>;
|
|
230
|
-
dataKey: z.ZodDefault<z.ZodString>;
|
|
231
|
-
}, z.core.$strip>>;
|
|
232
|
-
auth: z.ZodOptional<z.ZodObject<{
|
|
233
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
234
|
-
tokenSource: z.ZodDefault<z.ZodEnum<{
|
|
235
|
-
custom: "custom";
|
|
236
|
-
session: "session";
|
|
237
|
-
}>>;
|
|
238
|
-
sessionTokenPath: z.ZodDefault<z.ZodString>;
|
|
239
|
-
tokenType: z.ZodDefault<z.ZodEnum<{
|
|
240
|
-
Bearer: "Bearer";
|
|
241
|
-
Basic: "Basic";
|
|
242
|
-
Custom: "Custom";
|
|
243
|
-
}>>;
|
|
244
|
-
customTokenType: z.ZodOptional<z.ZodString>;
|
|
245
|
-
headerName: z.ZodDefault<z.ZodString>;
|
|
246
|
-
unauthorized: z.ZodOptional<z.ZodObject<{
|
|
247
|
-
redirect: z.ZodDefault<z.ZodBoolean>;
|
|
248
|
-
loginPath: z.ZodDefault<z.ZodString>;
|
|
249
|
-
clearSession: z.ZodDefault<z.ZodBoolean>;
|
|
250
|
-
}, z.core.$strip>>;
|
|
251
|
-
}, z.core.$strip>>;
|
|
252
|
-
toast: z.ZodOptional<z.ZodObject<{
|
|
253
|
-
/**
|
|
254
|
-
* 是否启用 Toast 提示
|
|
255
|
-
* @defaultValue true
|
|
256
|
-
*/
|
|
257
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
258
|
-
/** 成功提示配置 */
|
|
259
|
-
success: z.ZodOptional<z.ZodObject<{
|
|
260
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
261
|
-
color: z.ZodDefault<z.ZodString>;
|
|
262
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
263
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
264
|
-
}, z.core.$strip>>;
|
|
265
|
-
/** 错误提示配置 */
|
|
266
|
-
error: z.ZodOptional<z.ZodObject<{
|
|
267
|
-
/**
|
|
268
|
-
* 是否显示错误提示
|
|
269
|
-
* @defaultValue true
|
|
270
|
-
*/
|
|
271
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
272
|
-
/**
|
|
273
|
-
* 提示颜色
|
|
274
|
-
* @defaultValue 'error'
|
|
275
|
-
*/
|
|
276
|
-
color: z.ZodDefault<z.ZodString>;
|
|
277
|
-
/**
|
|
278
|
-
* 图标类名
|
|
279
|
-
* @defaultValue 'i-lucide-circle-x'
|
|
280
|
-
*/
|
|
281
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
282
|
-
/**
|
|
283
|
-
* 显示时长(毫秒)
|
|
284
|
-
* @defaultValue 3000
|
|
285
|
-
*/
|
|
286
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
287
|
-
}, z.core.$loose>>;
|
|
288
|
-
}, z.core.$loose>>;
|
|
289
|
-
}, z.core.$strip>, z.ZodTransform<{
|
|
290
|
-
response: {
|
|
291
|
-
successCodes: (string | number)[];
|
|
292
|
-
codeKey: string;
|
|
293
|
-
messageKey: string;
|
|
294
|
-
dataKey: string;
|
|
295
|
-
};
|
|
296
|
-
auth: {
|
|
297
|
-
enabled: boolean;
|
|
298
|
-
tokenSource: "custom" | "session";
|
|
299
|
-
sessionTokenPath: string;
|
|
300
|
-
tokenType: "Bearer" | "Basic" | "Custom";
|
|
301
|
-
headerName: string;
|
|
302
|
-
customTokenType?: string | undefined;
|
|
303
|
-
unauthorized?: {
|
|
304
|
-
redirect: boolean;
|
|
305
|
-
loginPath: string;
|
|
306
|
-
clearSession: boolean;
|
|
307
|
-
} | undefined;
|
|
308
|
-
};
|
|
309
|
-
toast: {
|
|
310
|
-
[x: string]: unknown;
|
|
311
|
-
enabled: boolean;
|
|
312
|
-
success?: {
|
|
313
|
-
show: boolean;
|
|
314
|
-
color: string;
|
|
315
|
-
duration: number;
|
|
316
|
-
icon?: string | undefined;
|
|
317
|
-
} | undefined;
|
|
318
|
-
error?: {
|
|
319
|
-
[x: string]: unknown;
|
|
320
|
-
show: boolean;
|
|
321
|
-
color: string;
|
|
322
|
-
duration: number;
|
|
323
|
-
icon?: string | undefined;
|
|
324
|
-
} | undefined;
|
|
325
|
-
};
|
|
326
|
-
defaultEndpoint: string;
|
|
327
|
-
debug: boolean;
|
|
328
|
-
endpoints: Record<string, {
|
|
329
|
-
baseURL: string;
|
|
330
|
-
alias?: string | undefined;
|
|
331
|
-
auth?: {
|
|
332
|
-
enabled?: boolean | undefined;
|
|
333
|
-
tokenSource?: "custom" | "session" | undefined;
|
|
334
|
-
sessionTokenPath?: string | undefined;
|
|
335
|
-
tokenType?: "Bearer" | "Basic" | "Custom" | undefined;
|
|
336
|
-
customTokenType?: string | undefined;
|
|
337
|
-
headerName?: string | undefined;
|
|
338
|
-
unauthorized?: {
|
|
339
|
-
redirect?: boolean | undefined;
|
|
340
|
-
loginPath?: string | undefined;
|
|
341
|
-
clearSession?: boolean | undefined;
|
|
342
|
-
} | undefined;
|
|
343
|
-
} | undefined;
|
|
344
|
-
toast?: {
|
|
345
|
-
[x: string]: unknown;
|
|
346
|
-
enabled?: boolean | undefined;
|
|
347
|
-
success?: {
|
|
348
|
-
show: boolean;
|
|
349
|
-
color: string;
|
|
350
|
-
duration: number;
|
|
351
|
-
icon?: string | undefined;
|
|
352
|
-
} | undefined;
|
|
353
|
-
error?: {
|
|
354
|
-
[x: string]: unknown;
|
|
355
|
-
show: boolean;
|
|
356
|
-
color: string;
|
|
357
|
-
duration: number;
|
|
358
|
-
icon?: string | undefined;
|
|
359
|
-
} | undefined;
|
|
360
|
-
} | undefined;
|
|
361
|
-
response?: {
|
|
362
|
-
successCodes?: (string | number)[] | undefined;
|
|
363
|
-
codeKey?: string | undefined;
|
|
364
|
-
messageKey?: string | undefined;
|
|
365
|
-
dataKey?: string | undefined;
|
|
366
|
-
} | undefined;
|
|
367
|
-
}>;
|
|
368
|
-
}, {
|
|
369
|
-
defaultEndpoint: string;
|
|
370
|
-
debug: boolean;
|
|
371
|
-
endpoints: Record<string, {
|
|
372
|
-
baseURL: string;
|
|
373
|
-
alias?: string | undefined;
|
|
374
|
-
auth?: {
|
|
375
|
-
enabled?: boolean | undefined;
|
|
376
|
-
tokenSource?: "custom" | "session" | undefined;
|
|
377
|
-
sessionTokenPath?: string | undefined;
|
|
378
|
-
tokenType?: "Bearer" | "Basic" | "Custom" | undefined;
|
|
379
|
-
customTokenType?: string | undefined;
|
|
380
|
-
headerName?: string | undefined;
|
|
381
|
-
unauthorized?: {
|
|
382
|
-
redirect?: boolean | undefined;
|
|
383
|
-
loginPath?: string | undefined;
|
|
384
|
-
clearSession?: boolean | undefined;
|
|
385
|
-
} | undefined;
|
|
386
|
-
} | undefined;
|
|
387
|
-
toast?: {
|
|
388
|
-
[x: string]: unknown;
|
|
389
|
-
enabled?: boolean | undefined;
|
|
390
|
-
success?: {
|
|
391
|
-
show: boolean;
|
|
392
|
-
color: string;
|
|
393
|
-
duration: number;
|
|
394
|
-
icon?: string | undefined;
|
|
395
|
-
} | undefined;
|
|
396
|
-
error?: {
|
|
397
|
-
[x: string]: unknown;
|
|
398
|
-
show: boolean;
|
|
399
|
-
color: string;
|
|
400
|
-
duration: number;
|
|
401
|
-
icon?: string | undefined;
|
|
402
|
-
} | undefined;
|
|
403
|
-
} | undefined;
|
|
404
|
-
response?: {
|
|
405
|
-
successCodes?: (string | number)[] | undefined;
|
|
406
|
-
codeKey?: string | undefined;
|
|
407
|
-
messageKey?: string | undefined;
|
|
408
|
-
dataKey?: string | undefined;
|
|
409
|
-
} | undefined;
|
|
410
|
-
}>;
|
|
411
|
-
response?: {
|
|
412
|
-
successCodes: (string | number)[];
|
|
413
|
-
codeKey: string;
|
|
414
|
-
messageKey: string;
|
|
415
|
-
dataKey: string;
|
|
416
|
-
} | undefined;
|
|
417
|
-
auth?: {
|
|
418
|
-
enabled: boolean;
|
|
419
|
-
tokenSource: "custom" | "session";
|
|
420
|
-
sessionTokenPath: string;
|
|
421
|
-
tokenType: "Bearer" | "Basic" | "Custom";
|
|
422
|
-
headerName: string;
|
|
423
|
-
customTokenType?: string | undefined;
|
|
424
|
-
unauthorized?: {
|
|
425
|
-
redirect: boolean;
|
|
426
|
-
loginPath: string;
|
|
427
|
-
clearSession: boolean;
|
|
428
|
-
} | undefined;
|
|
429
|
-
} | undefined;
|
|
430
|
-
toast?: {
|
|
431
|
-
[x: string]: unknown;
|
|
432
|
-
enabled: boolean;
|
|
433
|
-
success?: {
|
|
434
|
-
show: boolean;
|
|
435
|
-
color: string;
|
|
436
|
-
duration: number;
|
|
437
|
-
icon?: string | undefined;
|
|
438
|
-
} | undefined;
|
|
439
|
-
error?: {
|
|
440
|
-
[x: string]: unknown;
|
|
441
|
-
show: boolean;
|
|
442
|
-
color: string;
|
|
443
|
-
duration: number;
|
|
444
|
-
icon?: string | undefined;
|
|
445
|
-
} | undefined;
|
|
446
|
-
} | undefined;
|
|
447
|
-
}>>;
|
|
448
|
-
/**
|
|
449
|
-
* Movk API 模块私有配置 Schema
|
|
450
|
-
* @description 定义模块的私有配置(仅服务端可访问,不会暴露给客户端)
|
|
451
|
-
*/
|
|
452
|
-
export declare const movkApiPrivateConfigSchema: z.ZodObject<{
|
|
453
|
-
endpoints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
454
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
455
|
-
}, z.core.$strip>>>;
|
|
456
|
-
}, z.core.$strip>;
|
|
457
|
-
/**
|
|
458
|
-
* Movk API 模块完整配置 Schema
|
|
459
|
-
* @description 定义模块的完整配置(公共+私有),用于模块初始化时的配置验证
|
|
460
|
-
*/
|
|
461
|
-
export declare const movkApiFullConfigSchema: z.ZodObject<{
|
|
462
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
463
|
-
defaultEndpoint: z.ZodDefault<z.ZodString>;
|
|
464
|
-
debug: z.ZodDefault<z.ZodBoolean>;
|
|
465
|
-
endpoints: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
466
|
-
baseURL: z.ZodString;
|
|
467
|
-
alias: z.ZodOptional<z.ZodString>;
|
|
468
|
-
auth: z.ZodOptional<z.ZodObject<{
|
|
469
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
470
|
-
tokenSource: z.ZodOptional<z.ZodEnum<{
|
|
471
|
-
custom: "custom";
|
|
472
|
-
session: "session";
|
|
473
|
-
}>>;
|
|
474
|
-
sessionTokenPath: z.ZodOptional<z.ZodString>;
|
|
475
|
-
tokenType: z.ZodOptional<z.ZodEnum<{
|
|
476
|
-
Bearer: "Bearer";
|
|
477
|
-
Basic: "Basic";
|
|
478
|
-
Custom: "Custom";
|
|
479
|
-
}>>;
|
|
480
|
-
customTokenType: z.ZodOptional<z.ZodString>;
|
|
481
|
-
headerName: z.ZodOptional<z.ZodString>;
|
|
482
|
-
unauthorized: z.ZodOptional<z.ZodObject<{
|
|
483
|
-
redirect: z.ZodOptional<z.ZodBoolean>;
|
|
484
|
-
loginPath: z.ZodOptional<z.ZodString>;
|
|
485
|
-
clearSession: z.ZodOptional<z.ZodBoolean>;
|
|
486
|
-
}, z.core.$strip>>;
|
|
487
|
-
}, z.core.$strip>>;
|
|
488
|
-
toast: z.ZodOptional<z.ZodObject<{
|
|
489
|
-
enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
490
|
-
success: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
491
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
492
|
-
color: z.ZodDefault<z.ZodString>;
|
|
493
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
494
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
495
|
-
}, z.core.$strip>>>;
|
|
496
|
-
error: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
497
|
-
/**
|
|
498
|
-
* 是否显示错误提示
|
|
499
|
-
* @defaultValue true
|
|
500
|
-
*/
|
|
501
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
502
|
-
/**
|
|
503
|
-
* 提示颜色
|
|
504
|
-
* @defaultValue 'error'
|
|
505
|
-
*/
|
|
506
|
-
color: z.ZodDefault<z.ZodString>;
|
|
507
|
-
/**
|
|
508
|
-
* 图标类名
|
|
509
|
-
* @defaultValue 'i-lucide-circle-x'
|
|
510
|
-
*/
|
|
511
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
512
|
-
/**
|
|
513
|
-
* 显示时长(毫秒)
|
|
514
|
-
* @defaultValue 3000
|
|
515
|
-
*/
|
|
516
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
517
|
-
}, z.core.$loose>>>;
|
|
518
|
-
}, z.core.$loose>>;
|
|
519
|
-
response: z.ZodOptional<z.ZodObject<{
|
|
520
|
-
successCodes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>>;
|
|
521
|
-
codeKey: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
522
|
-
messageKey: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
523
|
-
dataKey: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
524
|
-
}, z.core.$strip>>;
|
|
525
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
526
|
-
}, z.core.$strip>>>;
|
|
527
|
-
response: z.ZodOptional<z.ZodObject<{
|
|
528
|
-
successCodes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
529
|
-
codeKey: z.ZodDefault<z.ZodString>;
|
|
530
|
-
messageKey: z.ZodDefault<z.ZodString>;
|
|
531
|
-
dataKey: z.ZodDefault<z.ZodString>;
|
|
532
|
-
}, z.core.$strip>>;
|
|
533
|
-
auth: z.ZodOptional<z.ZodObject<{
|
|
534
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
535
|
-
tokenSource: z.ZodDefault<z.ZodEnum<{
|
|
536
|
-
custom: "custom";
|
|
537
|
-
session: "session";
|
|
538
|
-
}>>;
|
|
539
|
-
sessionTokenPath: z.ZodDefault<z.ZodString>;
|
|
540
|
-
tokenType: z.ZodDefault<z.ZodEnum<{
|
|
541
|
-
Bearer: "Bearer";
|
|
542
|
-
Basic: "Basic";
|
|
543
|
-
Custom: "Custom";
|
|
544
|
-
}>>;
|
|
545
|
-
customTokenType: z.ZodOptional<z.ZodString>;
|
|
546
|
-
headerName: z.ZodDefault<z.ZodString>;
|
|
547
|
-
unauthorized: z.ZodOptional<z.ZodObject<{
|
|
548
|
-
redirect: z.ZodDefault<z.ZodBoolean>;
|
|
549
|
-
loginPath: z.ZodDefault<z.ZodString>;
|
|
550
|
-
clearSession: z.ZodDefault<z.ZodBoolean>;
|
|
551
|
-
}, z.core.$strip>>;
|
|
552
|
-
}, z.core.$strip>>;
|
|
553
|
-
toast: z.ZodOptional<z.ZodObject<{
|
|
554
|
-
/**
|
|
555
|
-
* 是否启用 Toast 提示
|
|
556
|
-
* @defaultValue true
|
|
557
|
-
*/
|
|
558
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
559
|
-
/** 成功提示配置 */
|
|
560
|
-
success: z.ZodOptional<z.ZodObject<{
|
|
561
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
562
|
-
color: z.ZodDefault<z.ZodString>;
|
|
563
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
564
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
565
|
-
}, z.core.$strip>>;
|
|
566
|
-
/** 错误提示配置 */
|
|
567
|
-
error: z.ZodOptional<z.ZodObject<{
|
|
568
|
-
/**
|
|
569
|
-
* 是否显示错误提示
|
|
570
|
-
* @defaultValue true
|
|
571
|
-
*/
|
|
572
|
-
show: z.ZodDefault<z.ZodBoolean>;
|
|
573
|
-
/**
|
|
574
|
-
* 提示颜色
|
|
575
|
-
* @defaultValue 'error'
|
|
576
|
-
*/
|
|
577
|
-
color: z.ZodDefault<z.ZodString>;
|
|
578
|
-
/**
|
|
579
|
-
* 图标类名
|
|
580
|
-
* @defaultValue 'i-lucide-circle-x'
|
|
581
|
-
*/
|
|
582
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
583
|
-
/**
|
|
584
|
-
* 显示时长(毫秒)
|
|
585
|
-
* @defaultValue 3000
|
|
586
|
-
*/
|
|
587
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
588
|
-
}, z.core.$loose>>;
|
|
589
|
-
}, z.core.$loose>>;
|
|
590
|
-
}, z.core.$strip>;
|