cheshirecat-typescript-client 1.2.3 → 1.2.4
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 +8 -6
- package/dist/client.d.ts +5 -5
- package/dist/client.js.map +1 -1
- package/dist/clients/httpclient.d.ts +1 -1
- package/dist/clients/httpclient.js +2 -2
- package/dist/clients/httpclient.js.map +1 -1
- package/dist/clients/wsclient.d.ts +3 -3
- package/dist/clients/wsclient.js +2 -4
- package/dist/clients/wsclient.js.map +1 -1
- package/dist/endpoints/abstract.d.ts +5 -5
- package/dist/endpoints/abstract.js +2 -2
- package/dist/endpoints/abstract.js.map +1 -1
- package/dist/endpoints/admins.d.ts +3 -3
- package/dist/endpoints/admins.js +8 -8
- package/dist/endpoints/admins.js.map +1 -1
- package/dist/endpoints/authHandler.d.ts +7 -7
- package/dist/endpoints/authHandler.js +6 -6
- package/dist/endpoints/authHandler.js.map +1 -1
- package/dist/endpoints/chunker.d.ts +7 -10
- package/dist/endpoints/chunker.js +6 -9
- package/dist/endpoints/chunker.js.map +1 -1
- package/dist/endpoints/customEndpoint.d.ts +4 -4
- package/dist/endpoints/customEndpoint.js +4 -4
- package/dist/endpoints/customEndpoint.js.map +1 -1
- package/dist/endpoints/embedder.js +1 -1
- package/dist/endpoints/embedder.js.map +1 -1
- package/dist/endpoints/fileManager.d.ts +8 -11
- package/dist/endpoints/fileManager.js +6 -9
- package/dist/endpoints/fileManager.js.map +1 -1
- package/dist/endpoints/largeLanguageModel.d.ts +7 -10
- package/dist/endpoints/largeLanguageModel.js +6 -9
- package/dist/endpoints/largeLanguageModel.js.map +1 -1
- package/dist/endpoints/memory.d.ts +43 -62
- package/dist/endpoints/memory.js +40 -59
- package/dist/endpoints/memory.js.map +1 -1
- package/dist/endpoints/message.d.ts +2 -2
- package/dist/endpoints/message.js +1 -1
- package/dist/endpoints/message.js.map +1 -1
- package/dist/endpoints/plugins.d.ts +12 -17
- package/dist/endpoints/plugins.js +11 -16
- package/dist/endpoints/plugins.js.map +1 -1
- package/dist/endpoints/rabbitHole.d.ts +11 -15
- package/dist/endpoints/rabbitHole.js +8 -12
- package/dist/endpoints/rabbitHole.js.map +1 -1
- package/dist/endpoints/settings.d.ts +12 -22
- package/dist/endpoints/settings.js +11 -21
- package/dist/endpoints/settings.js.map +1 -1
- package/dist/endpoints/users.d.ts +8 -21
- package/dist/endpoints/users.js +6 -19
- package/dist/endpoints/users.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,83 +17,70 @@ export declare class UsersEndpoint extends AbstractEndpoint {
|
|
|
17
17
|
/**
|
|
18
18
|
* This endpoint is used to get a list of available permissions in the system. The permissions are used to define
|
|
19
19
|
* the access rights of the users in the system. The permissions are defined by the system administrator.
|
|
20
|
-
* The endpoint can be used either for the agent identified by the agentId parameter (for multi-agent installations)
|
|
21
|
-
* or for the default agent (for single-agent installations).
|
|
22
20
|
*
|
|
23
21
|
* @param agentId The ID of the agent.
|
|
24
22
|
*
|
|
25
23
|
* @returns The available permissions in the system.
|
|
26
24
|
*/
|
|
27
|
-
getAvailablePermissions(agentId
|
|
25
|
+
getAvailablePermissions(agentId: string): Promise<Permission>;
|
|
28
26
|
/**
|
|
29
27
|
* This endpoint is used to create a new user in the system. The user is created with the specified username and
|
|
30
28
|
* password. The user is assigned the specified permissions. The permissions are used to define the access rights
|
|
31
29
|
* of the user in the system and are defined by the system administrator.
|
|
32
|
-
* The endpoint can be used either for the
|
|
33
|
-
* agent identified by the agentId parameter (for multi-agent installations) or for the default agent (for
|
|
34
|
-
* single-agent installations).
|
|
35
30
|
*
|
|
31
|
+
* @param agentId The ID of the agent.
|
|
36
32
|
* @param username The username of the user.
|
|
37
33
|
* @param password The password of the user.
|
|
38
34
|
* @param permissions The permissions of the user.
|
|
39
|
-
* @param agentId The ID of the agent.
|
|
40
35
|
*
|
|
41
36
|
* @returns The created user.
|
|
42
37
|
*/
|
|
43
|
-
postUser(username: string, password: string, permissions?: Record<string, string[]> | null
|
|
38
|
+
postUser(agentId: string, username: string, password: string, permissions?: Record<string, string[]> | null): Promise<UserOutput>;
|
|
44
39
|
/**
|
|
45
40
|
* This endpoint is used to get a list of users in the system. The list includes the username and the permissions of
|
|
46
41
|
* each user. The permissions are used to define the access rights of the users in the system and are defined by the
|
|
47
42
|
* system administrator.
|
|
48
|
-
* The endpoint can be used either for the agent identified by the agentId parameter (for multi-agent installations)
|
|
49
|
-
* or for the default agent (for single-agent installations).
|
|
50
43
|
*
|
|
51
44
|
* @param agentId The ID of the agent.
|
|
52
45
|
*
|
|
53
46
|
* @returns The list of users in the system.
|
|
54
47
|
*/
|
|
55
|
-
getUsers(agentId
|
|
48
|
+
getUsers(agentId: string): Promise<UserOutput[]>;
|
|
56
49
|
/**
|
|
57
50
|
* This endpoint is used to get a user in the system. The user is identified by the userId parameter, previously
|
|
58
51
|
* provided by the CheshireCat API when the user was created. The endpoint returns the username and the permissions
|
|
59
52
|
* of the user. The permissions are used to define the access rights of the user in the system and are defined by
|
|
60
53
|
* the system administrator.
|
|
61
|
-
* The endpoint can be used either for the agent identified by the agentId parameter (for multi-agent installations)
|
|
62
|
-
* or for the default agent (for single-agent installations).
|
|
63
54
|
*
|
|
64
55
|
* @param userId The ID of the user.
|
|
65
56
|
* @param agentId The ID of the agent.
|
|
66
57
|
*
|
|
67
58
|
* @returns The user in the system.
|
|
68
59
|
*/
|
|
69
|
-
getUser(userId: string, agentId
|
|
60
|
+
getUser(userId: string, agentId: string): Promise<UserOutput>;
|
|
70
61
|
/**
|
|
71
62
|
* The endpoint is used to update the user in the system. The user is identified by the userId parameter, previously
|
|
72
63
|
* provided by the CheshireCat API when the user was created. The endpoint updates the username, the password, and
|
|
73
64
|
* the permissions of the user. The permissions are used to define the access rights of the user in the system and
|
|
74
65
|
* are defined by the system administrator.
|
|
75
|
-
* The endpoint can be used either for the agent identified by the agentId parameter (for multi-agent installations)
|
|
76
|
-
* or for the default agent (for single-agent installations).
|
|
77
66
|
*
|
|
78
67
|
* @param userId The ID of the user.
|
|
68
|
+
* @param agentId The ID of the agent.
|
|
79
69
|
* @param username The username of the user.
|
|
80
70
|
* @param password The password of the user.
|
|
81
71
|
* @param permissions The permissions of the user.
|
|
82
|
-
* @param agentId The ID of the agent.
|
|
83
72
|
*
|
|
84
73
|
* @returns The updated user.
|
|
85
74
|
*/
|
|
86
|
-
putUser(userId: string, username?: string | null, password?: string | null, permissions?: Record<string, string[]> | null
|
|
75
|
+
putUser(userId: string, agentId: string, username?: string | null, password?: string | null, permissions?: Record<string, string[]> | null): Promise<UserOutput>;
|
|
87
76
|
/**
|
|
88
77
|
* This endpoint is used to delete the user in the system. The user is identified by the userId parameter,
|
|
89
78
|
* previously provided by the CheshireCat API when the user was created.
|
|
90
|
-
* The endpoint can be used either for the agent identified by the agentId parameter (for multi-agent installations)
|
|
91
|
-
* or for the default agent (for single-agent installations).
|
|
92
79
|
*
|
|
93
80
|
* @param userId The ID of the user.
|
|
94
81
|
* @param agentId The ID of the agent.
|
|
95
82
|
*
|
|
96
83
|
* @returns The deleted user.
|
|
97
84
|
*/
|
|
98
|
-
deleteUser(userId: string, agentId
|
|
85
|
+
deleteUser(userId: string, agentId: string): Promise<UserOutput>;
|
|
99
86
|
}
|
package/dist/endpoints/users.js
CHANGED
|
@@ -27,8 +27,6 @@ class UsersEndpoint extends abstract_1.AbstractEndpoint {
|
|
|
27
27
|
/**
|
|
28
28
|
* This endpoint is used to get a list of available permissions in the system. The permissions are used to define
|
|
29
29
|
* the access rights of the users in the system. The permissions are defined by the system administrator.
|
|
30
|
-
* The endpoint can be used either for the agent identified by the agentId parameter (for multi-agent installations)
|
|
31
|
-
* or for the default agent (for single-agent installations).
|
|
32
30
|
*
|
|
33
31
|
* @param agentId The ID of the agent.
|
|
34
32
|
*
|
|
@@ -42,18 +40,15 @@ class UsersEndpoint extends abstract_1.AbstractEndpoint {
|
|
|
42
40
|
* This endpoint is used to create a new user in the system. The user is created with the specified username and
|
|
43
41
|
* password. The user is assigned the specified permissions. The permissions are used to define the access rights
|
|
44
42
|
* of the user in the system and are defined by the system administrator.
|
|
45
|
-
* The endpoint can be used either for the
|
|
46
|
-
* agent identified by the agentId parameter (for multi-agent installations) or for the default agent (for
|
|
47
|
-
* single-agent installations).
|
|
48
43
|
*
|
|
44
|
+
* @param agentId The ID of the agent.
|
|
49
45
|
* @param username The username of the user.
|
|
50
46
|
* @param password The password of the user.
|
|
51
47
|
* @param permissions The permissions of the user.
|
|
52
|
-
* @param agentId The ID of the agent.
|
|
53
48
|
*
|
|
54
49
|
* @returns The created user.
|
|
55
50
|
*/
|
|
56
|
-
async postUser(username, password, permissions
|
|
51
|
+
async postUser(agentId, username, password, permissions) {
|
|
57
52
|
const payload = {
|
|
58
53
|
username,
|
|
59
54
|
password,
|
|
@@ -62,14 +57,12 @@ class UsersEndpoint extends abstract_1.AbstractEndpoint {
|
|
|
62
57
|
if (permissions) {
|
|
63
58
|
payload.permissions = permissions;
|
|
64
59
|
}
|
|
65
|
-
return this.post(this.prefix,
|
|
60
|
+
return this.post(this.prefix, agentId, payload);
|
|
66
61
|
}
|
|
67
62
|
/**
|
|
68
63
|
* This endpoint is used to get a list of users in the system. The list includes the username and the permissions of
|
|
69
64
|
* each user. The permissions are used to define the access rights of the users in the system and are defined by the
|
|
70
65
|
* system administrator.
|
|
71
|
-
* The endpoint can be used either for the agent identified by the agentId parameter (for multi-agent installations)
|
|
72
|
-
* or for the default agent (for single-agent installations).
|
|
73
66
|
*
|
|
74
67
|
* @param agentId The ID of the agent.
|
|
75
68
|
*
|
|
@@ -85,8 +78,6 @@ class UsersEndpoint extends abstract_1.AbstractEndpoint {
|
|
|
85
78
|
* provided by the CheshireCat API when the user was created. The endpoint returns the username and the permissions
|
|
86
79
|
* of the user. The permissions are used to define the access rights of the user in the system and are defined by
|
|
87
80
|
* the system administrator.
|
|
88
|
-
* The endpoint can be used either for the agent identified by the agentId parameter (for multi-agent installations)
|
|
89
|
-
* or for the default agent (for single-agent installations).
|
|
90
81
|
*
|
|
91
82
|
* @param userId The ID of the user.
|
|
92
83
|
* @param agentId The ID of the agent.
|
|
@@ -101,18 +92,16 @@ class UsersEndpoint extends abstract_1.AbstractEndpoint {
|
|
|
101
92
|
* provided by the CheshireCat API when the user was created. The endpoint updates the username, the password, and
|
|
102
93
|
* the permissions of the user. The permissions are used to define the access rights of the user in the system and
|
|
103
94
|
* are defined by the system administrator.
|
|
104
|
-
* The endpoint can be used either for the agent identified by the agentId parameter (for multi-agent installations)
|
|
105
|
-
* or for the default agent (for single-agent installations).
|
|
106
95
|
*
|
|
107
96
|
* @param userId The ID of the user.
|
|
97
|
+
* @param agentId The ID of the agent.
|
|
108
98
|
* @param username The username of the user.
|
|
109
99
|
* @param password The password of the user.
|
|
110
100
|
* @param permissions The permissions of the user.
|
|
111
|
-
* @param agentId The ID of the agent.
|
|
112
101
|
*
|
|
113
102
|
* @returns The updated user.
|
|
114
103
|
*/
|
|
115
|
-
async putUser(userId, username, password, permissions
|
|
104
|
+
async putUser(userId, agentId, username, password, permissions) {
|
|
116
105
|
const payload = {};
|
|
117
106
|
if (username) {
|
|
118
107
|
payload.username = username;
|
|
@@ -123,13 +112,11 @@ class UsersEndpoint extends abstract_1.AbstractEndpoint {
|
|
|
123
112
|
if (permissions) {
|
|
124
113
|
payload.permissions = permissions;
|
|
125
114
|
}
|
|
126
|
-
return this.put(this.formatUrl(userId),
|
|
115
|
+
return this.put(this.formatUrl(userId), agentId, payload);
|
|
127
116
|
}
|
|
128
117
|
/**
|
|
129
118
|
* This endpoint is used to delete the user in the system. The user is identified by the userId parameter,
|
|
130
119
|
* previously provided by the CheshireCat API when the user was created.
|
|
131
|
-
* The endpoint can be used either for the agent identified by the agentId parameter (for multi-agent installations)
|
|
132
|
-
* or for the default agent (for single-agent installations).
|
|
133
120
|
*
|
|
134
121
|
* @param userId The ID of the user.
|
|
135
122
|
* @param agentId The ID of the agent.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.js","sourceRoot":"","s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