lua-cli 3.0.2-alpha.5 → 3.0.3
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.
|
@@ -18,7 +18,7 @@ export default class UserDataApi extends HttpClient implements UserDataAPI {
|
|
|
18
18
|
* @returns Promise resolving to a UserDataInstance containing the user's data
|
|
19
19
|
* @throws Error if the user data cannot be retrieved or the request fails
|
|
20
20
|
*/
|
|
21
|
-
get(): Promise<UserDataInstance>;
|
|
21
|
+
get(userId?: string): Promise<UserDataInstance>;
|
|
22
22
|
/**
|
|
23
23
|
* Updates the current user's data for the specific agent
|
|
24
24
|
* @param data - The data object containing fields to update or add to user data
|
|
@@ -18,8 +18,12 @@ export default class UserDataApi extends HttpClient {
|
|
|
18
18
|
* @returns Promise resolving to a UserDataInstance containing the user's data
|
|
19
19
|
* @throws Error if the user data cannot be retrieved or the request fails
|
|
20
20
|
*/
|
|
21
|
-
async get() {
|
|
22
|
-
|
|
21
|
+
async get(userId) {
|
|
22
|
+
let url = `/developer/user/data/agent/${this.agentId}`;
|
|
23
|
+
if (userId) {
|
|
24
|
+
url += `/user/${userId}`;
|
|
25
|
+
}
|
|
26
|
+
const response = await this.httpGet(url, {
|
|
23
27
|
Authorization: `Bearer ${this.apiKey}`,
|
|
24
28
|
});
|
|
25
29
|
if (!response.success) {
|
package/dist/api-exports.d.ts
CHANGED
package/dist/api-exports.js
CHANGED
|
@@ -42,9 +42,9 @@ export const User = {
|
|
|
42
42
|
*
|
|
43
43
|
* @returns Promise resolving to user data
|
|
44
44
|
*/
|
|
45
|
-
async get() {
|
|
45
|
+
async get(userId) {
|
|
46
46
|
const instance = await getUserInstance();
|
|
47
|
-
return instance.get();
|
|
47
|
+
return instance.get(userId);
|
|
48
48
|
},
|
|
49
49
|
/**
|
|
50
50
|
* Gets the chat history for the current user.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lua-cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "Build, test, and deploy AI agents with custom tools, webhooks, and scheduled jobs. Features LuaAgent unified configuration, streaming chat, and batch deployment.",
|
|
5
5
|
"readmeFilename": "README.md",
|
|
6
6
|
"main": "dist/api-exports.js",
|