@hostlink/light 1.2.6 → 2.0.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/auth.d.ts +16 -11
- package/dist/config.d.ts +4 -0
- package/dist/createClient.d.ts +28 -0
- package/dist/fs.d.ts +19 -10
- package/dist/gqlBuilder.d.ts +2 -1
- package/dist/index.d.ts +2 -10
- package/dist/light.js +475 -466
- package/dist/light.umd.cjs +1 -1
- package/dist/mail.d.ts +5 -0
- package/dist/model.d.ts +6 -8
- package/dist/models.d.ts +8 -0
- package/dist/mutation.d.ts +2 -1
- package/dist/query.d.ts +2 -1
- package/dist/roles.d.ts +5 -0
- package/dist/roles.test.d.ts +1 -0
- package/dist/toQuery.d.ts +1 -1
- package/dist/users.d.ts +5 -0
- package/dist/webauthn.d.ts +6 -0
- package/package.json +3 -3
- package/dist/apiUrl.d.ts +0 -2
- package/dist/axios.d.ts +0 -4
- package/dist/getConfig.d.ts +0 -2
- package/dist/granted.d.ts +0 -1
- package/dist/role.d.ts +0 -1
- package/dist/sendMail.d.ts +0 -2
- package/dist/uploadFile.d.ts +0 -1
- package/dist/user.d.ts +0 -1
- package/dist/webauthnLogin.d.ts +0 -1
- package/dist/webauthnRegister.d.ts +0 -1
- /package/dist/{login.test.d.ts → auth.test.d.ts} +0 -0
package/dist/auth.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
declare const _default: (axios: AxiosInstance) => {
|
|
3
|
+
WebAuthn: {
|
|
4
|
+
login: (username: string) => Promise<void>;
|
|
5
|
+
register: () => Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
googleLogin: (credential: string) => Promise<boolean>;
|
|
8
|
+
login: (username: string, password: string, code?: string) => Promise<boolean>;
|
|
9
|
+
logout: () => Promise<boolean>;
|
|
10
|
+
updatePassword: (oldPassword: string, newPassword: string) => Promise<boolean>;
|
|
11
|
+
resetPassword: (email: string, password: string, code: string) => Promise<boolean>;
|
|
12
|
+
forgetPassword: (email: string) => Promise<boolean>;
|
|
13
|
+
verifyCode(email: string, code: string): Promise<boolean>;
|
|
14
|
+
granted: (rights: string[]) => Promise<string[]>;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as auth } from './auth';
|
|
2
|
+
import { AxiosInstance } from 'axios';
|
|
3
|
+
import { Fields } from '.';
|
|
4
|
+
import { default as _config } from './config';
|
|
5
|
+
import { default as _mail } from './mail';
|
|
6
|
+
import { default as _users } from './users';
|
|
7
|
+
import { default as _fs } from './fs';
|
|
8
|
+
import { default as models } from './models';
|
|
9
|
+
import { default as model } from './model';
|
|
10
|
+
import { default as roles } from './roles';
|
|
11
|
+
export interface LightClient {
|
|
12
|
+
baseURL: string;
|
|
13
|
+
axios: AxiosInstance;
|
|
14
|
+
auth: ReturnType<typeof auth>;
|
|
15
|
+
mutation: (operation: string, args: {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
} | null, fields: Fields) => Promise<any>;
|
|
18
|
+
query: (q: Object | Array<string | Object | string>) => Promise<any>;
|
|
19
|
+
config: ReturnType<typeof _config>;
|
|
20
|
+
mail: ReturnType<typeof _mail>;
|
|
21
|
+
users: ReturnType<typeof _users>;
|
|
22
|
+
fs: ReturnType<typeof _fs>;
|
|
23
|
+
models: ReturnType<typeof models>;
|
|
24
|
+
model(name: string): ReturnType<typeof model>;
|
|
25
|
+
roles: ReturnType<typeof roles>;
|
|
26
|
+
}
|
|
27
|
+
declare const _default: (baseURL: string) => LightClient;
|
|
28
|
+
export default _default;
|
package/dist/fs.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
1
2
|
export type FSFile = {
|
|
2
3
|
name: string;
|
|
3
4
|
path: string;
|
|
@@ -10,13 +11,21 @@ export type FSFolder = {
|
|
|
10
11
|
name: String;
|
|
11
12
|
path: String;
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
declare const _default: (axios: AxiosInstance) => {
|
|
15
|
+
uploadTempFile: (file: File) => Promise<any>;
|
|
16
|
+
folders: {
|
|
17
|
+
list: (path: string) => Promise<any>;
|
|
18
|
+
create: (path: string) => Promise<any>;
|
|
19
|
+
delete: (path: string) => Promise<any>;
|
|
20
|
+
rename: (path: string, name: string) => Promise<any>;
|
|
21
|
+
};
|
|
22
|
+
files: {
|
|
23
|
+
list: (path: string) => Promise<any>;
|
|
24
|
+
read: (path: string) => Promise<string>;
|
|
25
|
+
write: (path: string, content: string) => Promise<any>;
|
|
26
|
+
delete: (path: string) => Promise<any>;
|
|
27
|
+
rename: (path: string, name: string) => Promise<any>;
|
|
28
|
+
move: (source: string, target: string) => Promise<any>;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
package/dist/gqlBuilder.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
export * from './auth';
|
|
2
|
-
export * from './axios';
|
|
3
|
-
export * from './granted';
|
|
4
2
|
export * from './model';
|
|
5
3
|
export * from './file';
|
|
6
|
-
export * from './role';
|
|
7
|
-
export * from './user';
|
|
8
4
|
export { default as query } from './query';
|
|
9
5
|
export { default as mutation } from './mutation';
|
|
10
6
|
export { default as toQuery } from './toQuery';
|
|
11
|
-
export * from './apiUrl';
|
|
12
|
-
export { default as uploadFile } from './uploadFile';
|
|
13
|
-
export { default as sendMail } from './sendMail';
|
|
14
|
-
export { default as getConfig } from './getConfig';
|
|
15
|
-
export { default as webauthnLogin } from './webauthnLogin';
|
|
16
|
-
export { default as webauthnRegister } from './webauthnRegister';
|
|
17
7
|
export type Fields = Object | Array<string | Object> | string;
|
|
18
8
|
export * from './fs';
|
|
9
|
+
export { default as createClient } from './createClient';
|
|
10
|
+
export type { LightClient } from './createClient';
|