lua-cli 2.2.6 → 2.2.8-alpha.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.
@@ -171,7 +171,7 @@ export declare class ProductAPI {
171
171
  updateBasketStatus(basketId: string, status: BasketStatus): Promise<UpdateBasketStatusResponse>;
172
172
  createOrder(data: CreateOrderRequest): Promise<CreateOrderResponse>;
173
173
  updateOrderStatus(orderId: string, status: OrderStatus): Promise<UpdateOrderStatusResponse>;
174
- getUserOrders(userId: string): Promise<GetUserOrdersResponse>;
174
+ getUserOrders(): Promise<GetUserOrdersResponse>;
175
175
  }
176
176
  export declare const product: {
177
177
  create: (data: Record<string, any>) => Promise<CreateProductResponse>;
@@ -192,6 +192,6 @@ export declare const product: {
192
192
  order: {
193
193
  create: (data: CreateOrderRequest) => Promise<CreateOrderResponse>;
194
194
  updateStatus: (orderId: string, status: OrderStatus) => Promise<UpdateOrderStatusResponse>;
195
- get: (userId: string) => Promise<GetUserOrdersResponse>;
195
+ get: () => Promise<GetUserOrdersResponse>;
196
196
  };
197
197
  };
@@ -123,8 +123,8 @@ export class ProductAPI {
123
123
  }
124
124
  return { success: false, message: 'Order not found', data: null };
125
125
  }
126
- async getUserOrders(userId) {
127
- return { success: true, message: 'User orders fetched successfully', data: this.orders.filter((order) => order.userId === userId) };
126
+ async getUserOrders() {
127
+ return { success: true, message: 'User orders fetched successfully', data: this.orders };
128
128
  }
129
129
  }
130
130
  const productAPI = new ProductAPI();
@@ -489,7 +489,7 @@ export declare class ProductApi {
489
489
  /**
490
490
  * Get user orders with optional status filter
491
491
  */
492
- static getUserOrders(apiKey: string, agentId: string, userId: string, status?: OrderStatus): Promise<GetUserOrdersResponse | {
492
+ static getUserOrders(apiKey: string, agentId: string, status?: OrderStatus): Promise<GetUserOrdersResponse | {
493
493
  success: false;
494
494
  message: string;
495
495
  }>;
@@ -426,9 +426,9 @@ export class ProductApi {
426
426
  /**
427
427
  * Get user orders with optional status filter
428
428
  */
429
- static async getUserOrders(apiKey, agentId, userId, status) {
429
+ static async getUserOrders(apiKey, agentId, status) {
430
430
  const statusParam = status ? `?status=${status}` : '';
431
- const response = await httpClient.get(`${BASE_URLS.LOCAL}/developer/agents/${agentId}/order/user/${userId}${statusParam}`, {
431
+ const response = await httpClient.get(`${BASE_URLS.LOCAL}/developer/agents/${agentId}/order/user${statusParam}`, {
432
432
  Authorization: `Bearer ${apiKey}`,
433
433
  });
434
434
  if (response.success) {
@@ -484,13 +484,13 @@ export class UserDataApi {
484
484
  const response = await httpClient.put(`${BASE_URLS.LOCAL}/developer/user/data/agent/${agentId}`, data, {
485
485
  Authorization: `Bearer ${apiKey}`,
486
486
  });
487
- return response.data.data;
487
+ return response.data;
488
488
  }
489
489
  static async updateUserData(apiKey, agentId, data) {
490
490
  const response = await httpClient.put(`${BASE_URLS.LOCAL}/developer/user/data/agent/${agentId}`, data, {
491
491
  Authorization: `Bearer ${apiKey}`,
492
492
  });
493
- return response.data.data;
493
+ return response.data;
494
494
  }
495
495
  static async deleteUserData(apiKey, agentId) {
496
496
  const response = await httpClient.delete(`${BASE_URLS.LOCAL}/developer/user/data/agent/${agentId}`, {
@@ -109,8 +109,8 @@ export function createSandbox(options) {
109
109
  const updateOrderStatus = async (orderId, status) => {
110
110
  return await ProductApi.updateOrderStatus(apiKey, agentId, orderId, status);
111
111
  };
112
- const getUserOrders = async (userId) => {
113
- return await ProductApi.getUserOrders(apiKey, agentId, userId);
112
+ const getUserOrders = async () => {
113
+ return await ProductApi.getUserOrders(apiKey, agentId);
114
114
  };
115
115
  // Custom Data API functions
116
116
  const createCustomData = async (collectionName, data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lua-cli",
3
- "version": "2.2.6",
3
+ "version": "2.2.8-alpha.1",
4
4
  "description": "Command-line interface for Lua AI platform - develop, test, and deploy LuaSkills with custom tools",
5
5
  "readmeFilename": "README.md",
6
6
  "main": "dist/index.js",
@@ -65,7 +65,7 @@
65
65
  "inquirer": "^12.9.6",
66
66
  "js-yaml": "^4.1.0",
67
67
  "keytar": "^7.9.0",
68
- "lua-cli": "^2.2.6",
68
+ "lua-cli": "^2.2.8-alpha.1",
69
69
  "node-fetch": "^3.3.2",
70
70
  "open": "^10.1.0",
71
71
  "react": "^18.2.0",
@@ -19,7 +19,7 @@
19
19
  "axios": "^1.6.0",
20
20
  "inquirer": "^12.9.6",
21
21
  "js-yaml": "^4.1.0",
22
- "lua-cli": "2.2.6",
22
+ "lua-cli": "2.2.8-alpha.1",
23
23
  "openai": "^5.23.0",
24
24
  "uuid": "^13.0.0",
25
25
  "zod": "^3.24.1"