area-yg 0.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 +115 -0
- package/dist/favicon.ico +0 -0
- package/dist/index-CJifylpR.js +25134 -0
- package/dist/index-Kin1M8uF.js +17 -0
- package/dist/index.js +31 -0
- package/dist/index.umd.cjs +44 -0
- package/dist/login-DBrJtXPy.js +19 -0
- package/dist/logo.png +0 -0
- package/dist/style.css +1 -0
- package/dist/template/template-orgs.xlsx +0 -0
- package/dist/template/template-questions.xlsx +0 -0
- package/dist/template/template-users.xlsx +0 -0
- package/package.json +75 -0
- package/types/index.d.ts +218 -0
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { App } from "vue";
|
|
2
|
+
import { AxiosInstance } from "axios";
|
|
3
|
+
import type { SnackbarOptions } from "@/types/snackbar";
|
|
4
|
+
import type { Image2imageResponse, Text2imageResponse } from "@/types/ai-image";
|
|
5
|
+
|
|
6
|
+
export interface Users {
|
|
7
|
+
id?: string;
|
|
8
|
+
username: string;
|
|
9
|
+
nickname: string;
|
|
10
|
+
email?: string;
|
|
11
|
+
phone?: string;
|
|
12
|
+
avatar?: string;
|
|
13
|
+
password?: string;
|
|
14
|
+
orgs?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface Authorities {
|
|
18
|
+
authority: string;
|
|
19
|
+
key: string;
|
|
20
|
+
name: string | null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface AccountsStore {
|
|
24
|
+
account?: Users;
|
|
25
|
+
authorities: Authorities[];
|
|
26
|
+
matchAuthorities(
|
|
27
|
+
authorities: Authorities[],
|
|
28
|
+
hasAuthority: string[] | undefined
|
|
29
|
+
): any;
|
|
30
|
+
hasAuthority(authority: string): any;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface AuthorizationStore {
|
|
34
|
+
head: string;
|
|
35
|
+
prefix: string;
|
|
36
|
+
token: string;
|
|
37
|
+
getFullToken: StringConstructor;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface AxiosConfig {
|
|
41
|
+
baseURL: string;
|
|
42
|
+
withCredentials: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare var accountsService: AxiosInstance;
|
|
46
|
+
declare var accountsServiceConfig: AxiosConfig;
|
|
47
|
+
declare var emailService: AxiosInstance;
|
|
48
|
+
declare var emailServiceConfig: AxiosConfig;
|
|
49
|
+
declare var fileService: AxiosInstance;
|
|
50
|
+
declare var fileServiceConfig: AxiosInstance;
|
|
51
|
+
declare var smsService: AxiosInstance;
|
|
52
|
+
declare var smsServiceConfig: AxiosInstance;
|
|
53
|
+
|
|
54
|
+
declare var useAccountsStore: () => AccountsStore;
|
|
55
|
+
declare var useAuthorizationStore: () => AuthorizationStore;
|
|
56
|
+
declare var useLoginStore: () => any;
|
|
57
|
+
declare var useSnackbarStore: () => any;
|
|
58
|
+
declare var useFileStore: () => any;
|
|
59
|
+
declare var useSSOStore: () => any;
|
|
60
|
+
|
|
61
|
+
declare var FileApi: {
|
|
62
|
+
filePath: string;
|
|
63
|
+
upload(file: any, path: string, hide?: boolean): Promise<any>;
|
|
64
|
+
download(url: string): Promise<any>;
|
|
65
|
+
downloadTxt(url: string): Promise<any>;
|
|
66
|
+
ppt2image(file: any): Promise<any>;
|
|
67
|
+
delete(url: string): Promise<any>;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
declare var EmailApi: {
|
|
71
|
+
codeSignUp(email: string, username: string): Promise<any>;
|
|
72
|
+
codeForgotPassword(email: string): Promise<any>;
|
|
73
|
+
verify(email: string, code: string): Promise<any>;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
declare var ForgotPasswordApi: {
|
|
77
|
+
forgotPassword(data: any): Promise<any>;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
declare var LoginApi: {
|
|
81
|
+
login(username: string, password: string): Promise<any>;
|
|
82
|
+
uniqueVerification(username: string): Promise<any>;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
declare var SignUpApi: {
|
|
86
|
+
signUp(data: any): Promise<any>;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
declare var AuthoritiesApi: {
|
|
90
|
+
list(): Promise<any>;
|
|
91
|
+
listByRole(role: string): Promise<any>;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
declare var RolesApi: {
|
|
95
|
+
list(keys?: string): Promise<any>;
|
|
96
|
+
edit(data: object): Promise<any>;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
declare var OrgsApi: {
|
|
100
|
+
list(childrenCount?: boolean): Promise<any>;
|
|
101
|
+
listByPid(pid: string, childrenCount?: boolean): Promise<any>;
|
|
102
|
+
listByCodes(codes: string): Promise<any>;
|
|
103
|
+
oneById(id: string): Promise<any>;
|
|
104
|
+
del(id: string): Promise<any>;
|
|
105
|
+
edit(data: {
|
|
106
|
+
id: string;
|
|
107
|
+
pid: string;
|
|
108
|
+
name: string;
|
|
109
|
+
maxUser: number;
|
|
110
|
+
}): Promise<any>;
|
|
111
|
+
ordering(ids: string): Promise<any>;
|
|
112
|
+
switchStatus(id: string, status: boolean): Promise<any>;
|
|
113
|
+
detailsInfo(id: string): Promise<any>;
|
|
114
|
+
detailsSave(data: {
|
|
115
|
+
id: string;
|
|
116
|
+
shortName: string;
|
|
117
|
+
website: string;
|
|
118
|
+
contact: string;
|
|
119
|
+
contactNumber: string;
|
|
120
|
+
email: string;
|
|
121
|
+
comment: string;
|
|
122
|
+
address: string;
|
|
123
|
+
}): Promise<any>;
|
|
124
|
+
AutocompleteList(): Promise<any>;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
declare var UsersApi: {
|
|
128
|
+
info(): Promise<any>;
|
|
129
|
+
list(ids: string): Promise<any>;
|
|
130
|
+
edit(data: Users): Promise<any>;
|
|
131
|
+
del(id: string): Promise<any>;
|
|
132
|
+
repwd(id: string, newPwd: string): Promise<any>;
|
|
133
|
+
changePwd(newPwd: string, oldPwd: string): Promise<any>;
|
|
134
|
+
page(params: {
|
|
135
|
+
current: number;
|
|
136
|
+
size: number;
|
|
137
|
+
sortKey: string;
|
|
138
|
+
sortOrder: string;
|
|
139
|
+
name: string;
|
|
140
|
+
role: string;
|
|
141
|
+
org: string;
|
|
142
|
+
}): Promise<any>;
|
|
143
|
+
batch(data: object): Promise<any>;
|
|
144
|
+
setTags(ids: string, tags: string): Promise<boolean>;
|
|
145
|
+
delTags(ids: string): Promise<boolean>;
|
|
146
|
+
listByRole(role: string): Promise<any>;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
declare var TokenApi: {
|
|
150
|
+
validate(token: string): Promise<any>;
|
|
151
|
+
logout(): Promise<any>;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
declare var SMSApi: {
|
|
155
|
+
sendUserRegistrationVerificationCode(phoneNumber: string): Promise<any>;
|
|
156
|
+
verifyCode(phoneNumber: string, userCode: string): Promise<any>;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
declare var AIImageApi: {
|
|
160
|
+
text2image(options: {
|
|
161
|
+
prompt: string;
|
|
162
|
+
n: number;
|
|
163
|
+
size: string;
|
|
164
|
+
seed: number;
|
|
165
|
+
negative_prompt: string;
|
|
166
|
+
}): Promise<Text2imageResponse>;
|
|
167
|
+
image2image(options: {
|
|
168
|
+
imageBase64: string;
|
|
169
|
+
prompt: string;
|
|
170
|
+
seed: number;
|
|
171
|
+
negative_prompt: string;
|
|
172
|
+
}): Promise<Image2imageResponse>;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
declare var snackbar: (options: SnackbarOptions) => void;
|
|
176
|
+
|
|
177
|
+
export interface SpacegtStatic {
|
|
178
|
+
install(app: App): void;
|
|
179
|
+
locales: any;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
declare const spacegt: SpacegtStatic;
|
|
183
|
+
|
|
184
|
+
export default spacegt;
|
|
185
|
+
|
|
186
|
+
export {
|
|
187
|
+
// Service
|
|
188
|
+
accountsService,
|
|
189
|
+
accountsServiceConfig,
|
|
190
|
+
emailService,
|
|
191
|
+
emailServiceConfig,
|
|
192
|
+
fileService,
|
|
193
|
+
fileServiceConfig,
|
|
194
|
+
smsService,
|
|
195
|
+
smsServiceConfig,
|
|
196
|
+
// Store
|
|
197
|
+
useAccountsStore,
|
|
198
|
+
useAuthorizationStore,
|
|
199
|
+
useLoginStore,
|
|
200
|
+
useSnackbarStore,
|
|
201
|
+
useFileStore,
|
|
202
|
+
useSSOStore,
|
|
203
|
+
// API
|
|
204
|
+
FileApi,
|
|
205
|
+
EmailApi,
|
|
206
|
+
ForgotPasswordApi,
|
|
207
|
+
LoginApi,
|
|
208
|
+
SignUpApi,
|
|
209
|
+
AuthoritiesApi,
|
|
210
|
+
RolesApi,
|
|
211
|
+
OrgsApi,
|
|
212
|
+
UsersApi,
|
|
213
|
+
TokenApi,
|
|
214
|
+
SMSApi,
|
|
215
|
+
AIImageApi,
|
|
216
|
+
//fn
|
|
217
|
+
snackbar,
|
|
218
|
+
};
|