lua-cli 2.2.8-alpha.1 → 2.3.0-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.
Files changed (191) hide show
  1. package/API_REFERENCE.md +1408 -0
  2. package/CLI_REFERENCE.md +818 -0
  3. package/GETTING_STARTED.md +1040 -0
  4. package/README.md +738 -424
  5. package/TEMPLATE_GUIDE.md +1398 -0
  6. package/dist/api/agent.api.service.d.ts +45 -0
  7. package/dist/api/agent.api.service.js +57 -0
  8. package/dist/api/auth.api.service.d.ts +48 -0
  9. package/dist/api/auth.api.service.js +54 -0
  10. package/dist/api/basket.api.service.d.ts +85 -0
  11. package/dist/api/basket.api.service.js +164 -0
  12. package/dist/api/chat.api.service.d.ts +21 -0
  13. package/dist/api/chat.api.service.js +24 -0
  14. package/dist/api/credentials.d.ts +24 -0
  15. package/dist/api/credentials.js +46 -0
  16. package/dist/api/custom.data.api.service.d.ts +69 -0
  17. package/dist/api/custom.data.api.service.js +125 -0
  18. package/dist/api/lazy-instances.d.ts +49 -0
  19. package/dist/api/lazy-instances.js +95 -0
  20. package/dist/api/order.api.service.d.ts +53 -0
  21. package/dist/api/order.api.service.js +95 -0
  22. package/dist/api/products.api.service.d.ts +66 -0
  23. package/dist/api/products.api.service.js +112 -0
  24. package/dist/api/skills.api.service.d.ts +77 -0
  25. package/dist/api/skills.api.service.js +88 -0
  26. package/dist/api/tool.api.service.d.ts +52 -0
  27. package/dist/api/tool.api.service.js +73 -0
  28. package/dist/api/user.data.api.service.d.ts +33 -0
  29. package/dist/api/user.data.api.service.js +59 -0
  30. package/dist/api-exports.d.ts +271 -0
  31. package/dist/api-exports.js +372 -0
  32. package/dist/cli/command-definitions.d.ts +30 -0
  33. package/dist/cli/command-definitions.js +71 -0
  34. package/dist/commands/agents.d.ts +20 -0
  35. package/dist/commands/agents.js +24 -2
  36. package/dist/commands/apiKey.d.ts +23 -0
  37. package/dist/commands/apiKey.js +23 -0
  38. package/dist/commands/compile.d.ts +24 -0
  39. package/dist/commands/compile.js +67 -759
  40. package/dist/commands/configure.d.ts +24 -0
  41. package/dist/commands/configure.js +31 -96
  42. package/dist/commands/deploy.d.ts +31 -19
  43. package/dist/commands/deploy.js +45 -74
  44. package/dist/commands/destroy.d.ts +27 -0
  45. package/dist/commands/destroy.js +27 -1
  46. package/dist/commands/dev.d.ts +25 -62
  47. package/dist/commands/dev.js +58 -873
  48. package/dist/commands/init.d.ts +27 -0
  49. package/dist/commands/init.js +98 -260
  50. package/dist/commands/push.d.ts +24 -21
  51. package/dist/commands/push.js +39 -92
  52. package/dist/commands/test.d.ts +26 -0
  53. package/dist/commands/test.js +41 -188
  54. package/dist/common/basket.instance.d.ts +78 -0
  55. package/dist/common/basket.instance.js +132 -0
  56. package/dist/common/data.entry.instance.d.ts +39 -0
  57. package/dist/common/data.entry.instance.js +76 -0
  58. package/dist/common/http.client.d.ts +64 -0
  59. package/dist/common/http.client.js +133 -0
  60. package/dist/common/order.instance.d.ts +40 -0
  61. package/dist/common/order.instance.js +79 -0
  62. package/dist/common/product.instance.d.ts +33 -0
  63. package/dist/common/product.instance.js +63 -0
  64. package/dist/common/product.pagination.instance.d.ts +43 -0
  65. package/dist/common/product.pagination.instance.js +74 -0
  66. package/dist/common/product.search.instance.d.ts +22 -0
  67. package/dist/common/product.search.instance.js +40 -0
  68. package/dist/common/user.instance.d.ts +41 -0
  69. package/dist/common/user.instance.js +84 -0
  70. package/dist/config/auth.constants.d.ts +11 -0
  71. package/dist/config/auth.constants.js +11 -0
  72. package/dist/config/compile.constants.d.ts +67 -0
  73. package/dist/config/compile.constants.js +99 -0
  74. package/dist/config/constants.d.ts +5 -0
  75. package/dist/config/constants.js +5 -0
  76. package/dist/config/dev.constants.d.ts +65 -0
  77. package/dist/config/dev.constants.js +79 -0
  78. package/dist/config/init.constants.d.ts +23 -0
  79. package/dist/config/init.constants.js +41 -0
  80. package/dist/index.d.ts +19 -3
  81. package/dist/index.js +28 -44
  82. package/dist/interfaces/admin.d.ts +101 -0
  83. package/dist/interfaces/admin.js +5 -0
  84. package/dist/interfaces/agent.d.ts +107 -0
  85. package/dist/interfaces/agent.js +5 -0
  86. package/dist/interfaces/baskets.d.ts +135 -0
  87. package/dist/interfaces/baskets.js +19 -0
  88. package/dist/interfaces/chat.d.ts +61 -0
  89. package/dist/interfaces/chat.js +5 -0
  90. package/dist/interfaces/common.d.ts +62 -0
  91. package/dist/interfaces/common.js +8 -0
  92. package/dist/interfaces/compile.d.ts +11 -0
  93. package/dist/interfaces/compile.js +4 -0
  94. package/dist/interfaces/custom.data.d.ts +82 -0
  95. package/dist/interfaces/custom.data.js +5 -0
  96. package/dist/interfaces/deploy.d.ts +29 -0
  97. package/dist/interfaces/deploy.js +4 -0
  98. package/dist/interfaces/dev.d.ts +53 -0
  99. package/dist/interfaces/dev.js +5 -0
  100. package/dist/interfaces/init.d.ts +60 -0
  101. package/dist/interfaces/init.js +4 -0
  102. package/dist/interfaces/orders.d.ts +91 -0
  103. package/dist/interfaces/orders.js +19 -0
  104. package/dist/interfaces/product.d.ts +65 -0
  105. package/dist/interfaces/product.js +5 -0
  106. package/dist/interfaces/push.d.ts +26 -0
  107. package/dist/interfaces/push.js +4 -0
  108. package/dist/interfaces/test.d.ts +36 -0
  109. package/dist/interfaces/test.js +4 -0
  110. package/dist/services/auth.d.ts +54 -99
  111. package/dist/services/auth.js +76 -12
  112. package/dist/types/api-contracts.d.ts +211 -0
  113. package/dist/types/api-contracts.js +8 -0
  114. package/dist/types/compile.types.d.ts +76 -0
  115. package/dist/types/compile.types.js +4 -0
  116. package/dist/types/index.d.ts +23 -85
  117. package/dist/types/index.js +25 -14
  118. package/dist/types/skill.d.ts +142 -0
  119. package/dist/{skill.js → types/skill.js} +66 -19
  120. package/dist/types/tool-validation.d.ts +34 -0
  121. package/dist/types/tool-validation.js +42 -0
  122. package/dist/utils/auth-flows.d.ts +26 -0
  123. package/dist/utils/auth-flows.js +141 -0
  124. package/dist/utils/bundling.d.ts +36 -0
  125. package/dist/utils/bundling.js +137 -0
  126. package/dist/utils/compile.d.ts +37 -0
  127. package/dist/utils/compile.js +242 -0
  128. package/dist/utils/deploy-api.d.ts +26 -0
  129. package/dist/utils/deploy-api.js +53 -0
  130. package/dist/utils/deploy-helpers.d.ts +46 -0
  131. package/dist/utils/deploy-helpers.js +86 -0
  132. package/dist/utils/deployment.d.ts +25 -0
  133. package/dist/utils/deployment.js +161 -0
  134. package/dist/utils/dev-api.d.ts +61 -0
  135. package/dist/utils/dev-api.js +262 -0
  136. package/dist/utils/dev-helpers.d.ts +46 -0
  137. package/dist/utils/dev-helpers.js +83 -0
  138. package/dist/utils/dev-server.d.ts +24 -0
  139. package/dist/utils/dev-server.js +555 -0
  140. package/dist/utils/dev-watcher.d.ts +31 -0
  141. package/dist/utils/dev-watcher.js +110 -0
  142. package/dist/utils/files.js +0 -5
  143. package/dist/utils/init-agent.d.ts +34 -0
  144. package/dist/utils/init-agent.js +129 -0
  145. package/dist/utils/init-helpers.d.ts +41 -0
  146. package/dist/utils/init-helpers.js +73 -0
  147. package/dist/utils/init-prompts.d.ts +47 -0
  148. package/dist/utils/init-prompts.js +168 -0
  149. package/dist/utils/push-api.d.ts +15 -0
  150. package/dist/utils/push-api.js +48 -0
  151. package/dist/utils/push-helpers.d.ts +38 -0
  152. package/dist/utils/push-helpers.js +84 -0
  153. package/dist/utils/sandbox-storage.d.ts +27 -0
  154. package/dist/utils/sandbox-storage.js +71 -0
  155. package/dist/utils/sandbox.js +78 -118
  156. package/dist/utils/skill-management.d.ts +14 -0
  157. package/dist/utils/skill-management.js +148 -0
  158. package/dist/utils/test-helpers.d.ts +40 -0
  159. package/dist/utils/test-helpers.js +92 -0
  160. package/dist/utils/test-prompts.d.ts +23 -0
  161. package/dist/utils/test-prompts.js +186 -0
  162. package/dist/utils/tool-detection.d.ts +18 -0
  163. package/dist/utils/tool-detection.js +110 -0
  164. package/dist/web/app.css +14 -9
  165. package/package.json +11 -12
  166. package/template/QUICKSTART.md +299 -144
  167. package/template/README.md +928 -349
  168. package/template/TOOL_EXAMPLES.md +655 -0
  169. package/template/package-lock.json +3781 -0
  170. package/template/package.json +1 -1
  171. package/template/src/index.ts +81 -40
  172. package/template/src/tools/BasketTool.ts +128 -0
  173. package/template/src/tools/CustomDataTool.ts +7 -13
  174. package/template/src/tools/OrderTool.ts +54 -0
  175. package/template/src/tools/PaymentTool.ts +1 -1
  176. package/template/src/tools/ProductsTool.ts +56 -118
  177. package/template/src/tools/UserDataTool.ts +4 -27
  178. package/dist/custom-data-api.d.ts +0 -72
  179. package/dist/custom-data-api.js +0 -174
  180. package/dist/product-api.d.ts +0 -197
  181. package/dist/product-api.js +0 -152
  182. package/dist/services/api.d.ts +0 -569
  183. package/dist/services/api.js +0 -625
  184. package/dist/skill.d.ts +0 -50
  185. package/dist/types.d.ts +0 -1
  186. package/dist/types.js +0 -2
  187. package/dist/user-data-api.d.ts +0 -39
  188. package/dist/user-data-api.js +0 -50
  189. package/template/API.md +0 -604
  190. package/template/DEVELOPER.md +0 -771
  191. package/template/lua.skill.yaml +0 -16
@@ -0,0 +1,88 @@
1
+ import { HttpClient } from "../common/http.client.js";
2
+ /**
3
+ * Skill API calls
4
+ */
5
+ export default class SkillApi extends HttpClient {
6
+ /**
7
+ * Creates an instance of SkillApi
8
+ * @param baseUrl - The base URL for the API
9
+ * @param apiKey - The API key for authentication
10
+ * @param agentId - The unique identifier of the agent
11
+ */
12
+ constructor(baseUrl, apiKey, agentId) {
13
+ super(baseUrl);
14
+ this.apiKey = apiKey;
15
+ this.agentId = agentId;
16
+ }
17
+ /**
18
+ * Creates a new skill for the agent
19
+ * @param skillData - The skill data including name, description, and optional context
20
+ * @returns Promise resolving to an ApiResponse containing the created skill details
21
+ * @throws Error if the skill creation fails or validation errors occur
22
+ */
23
+ async createSkill(skillData) {
24
+ return this.httpPost(`/developer/skills/${this.agentId}`, skillData, {
25
+ Authorization: `Bearer ${this.apiKey}`,
26
+ });
27
+ }
28
+ /**
29
+ * Pushes a new version of a skill to production
30
+ * @param skillId - The unique identifier of the skill
31
+ * @param versionData - The version data including code, configuration, and metadata
32
+ * @returns Promise resolving to an ApiResponse containing the created version details
33
+ * @throws Error if the skill is not found or the push operation fails
34
+ */
35
+ async pushSkill(skillId, versionData) {
36
+ return this.httpPost(`/developer/skills/${this.agentId}/${skillId}/version`, versionData, {
37
+ Authorization: `Bearer ${this.apiKey}`,
38
+ });
39
+ }
40
+ /**
41
+ * Pushes a new development/sandbox version of a skill for testing
42
+ * @param skillId - The unique identifier of the skill
43
+ * @param versionData - The version data including code, configuration, and metadata
44
+ * @returns Promise resolving to an ApiResponse containing the development version details
45
+ * @throws Error if the skill is not found or the push operation fails
46
+ */
47
+ async pushDevSkill(skillId, versionData) {
48
+ return this.httpPost(`/developer/skills/${this.agentId}/${skillId}/version/sandbox`, versionData, {
49
+ Authorization: `Bearer ${this.apiKey}`,
50
+ });
51
+ }
52
+ /**
53
+ * Updates an existing development/sandbox version of a skill
54
+ * @param skillId - The unique identifier of the skill
55
+ * @param sandboxVersionId - The unique identifier of the sandbox version to update
56
+ * @param versionData - The updated version data including code, configuration, and metadata
57
+ * @returns Promise resolving to an ApiResponse containing the updated version details
58
+ * @throws Error if the skill or version is not found or the update fails
59
+ */
60
+ async updateDevSkill(skillId, sandboxVersionId, versionData) {
61
+ return this.httpPut(`/developer/skills/${this.agentId}/${skillId}/version/sandbox/${sandboxVersionId}`, versionData, {
62
+ Authorization: `Bearer ${this.apiKey}`,
63
+ });
64
+ }
65
+ /**
66
+ * Retrieves all versions of a specific skill
67
+ * @param skillId - The unique identifier of the skill
68
+ * @returns Promise resolving to an ApiResponse containing an array of skill versions
69
+ * @throws Error if the skill is not found or the request fails
70
+ */
71
+ async getSkillVersions(skillId) {
72
+ return this.httpGet(`/developer/skills/${this.agentId}/${skillId}/versions`, {
73
+ Authorization: `Bearer ${this.apiKey}`,
74
+ });
75
+ }
76
+ /**
77
+ * Publishes a specific version of a skill to production
78
+ * @param skillId - The unique identifier of the skill
79
+ * @param version - The version identifier to publish
80
+ * @returns Promise resolving to an ApiResponse containing publication confirmation details
81
+ * @throws Error if the skill or version is not found or the publish operation fails
82
+ */
83
+ async publishSkillVersion(skillId, version) {
84
+ return this.httpPut(`/developer/skills/${this.agentId}/${skillId}/${version}/publish`, undefined, {
85
+ Authorization: `Bearer ${this.apiKey}`,
86
+ });
87
+ }
88
+ }
@@ -0,0 +1,52 @@
1
+ import { HttpClient } from "../common/http.client.js";
2
+ import { ApiResponse } from "../interfaces/common.js";
3
+ /**
4
+ * Tool API calls (for compile command)
5
+ */
6
+ export default class ToolApi extends HttpClient {
7
+ private apiKey;
8
+ /**
9
+ * Creates an instance of ToolApi
10
+ * @param baseUrl - The base URL for the API
11
+ * @param apiKey - The API key for authentication
12
+ */
13
+ constructor(baseUrl: string, apiKey: string);
14
+ /**
15
+ * Performs a GET request to a tool endpoint
16
+ * @param url - The full or relative URL to request
17
+ * @returns Promise resolving to an ApiResponse with the tool's response data
18
+ * @throws Error if the request fails
19
+ */
20
+ getTool(url: string): Promise<ApiResponse<any>>;
21
+ /**
22
+ * Performs a POST request to a tool endpoint
23
+ * @param url - The full or relative URL to request
24
+ * @param data - The data to send in the request body
25
+ * @returns Promise resolving to an ApiResponse with the tool's response data
26
+ * @throws Error if the request fails
27
+ */
28
+ postTool(url: string, data: any): Promise<ApiResponse<any>>;
29
+ /**
30
+ * Performs a PUT request to a tool endpoint
31
+ * @param url - The full or relative URL to request
32
+ * @param data - The data to send in the request body
33
+ * @returns Promise resolving to an ApiResponse with the tool's response data
34
+ * @throws Error if the request fails
35
+ */
36
+ putTool(url: string, data: any): Promise<ApiResponse<any>>;
37
+ /**
38
+ * Performs a DELETE request to a tool endpoint
39
+ * @param url - The full or relative URL to request
40
+ * @returns Promise resolving to an ApiResponse with the tool's response data
41
+ * @throws Error if the request fails
42
+ */
43
+ deleteTool(url: string): Promise<ApiResponse<any>>;
44
+ /**
45
+ * Performs a PATCH request to a tool endpoint
46
+ * @param url - The full or relative URL to request
47
+ * @param data - The data to send in the request body
48
+ * @returns Promise resolving to an ApiResponse with the tool's response data
49
+ * @throws Error if the request fails
50
+ */
51
+ patchTool(url: string, data: any): Promise<ApiResponse<any>>;
52
+ }
@@ -0,0 +1,73 @@
1
+ import { HttpClient } from "../common/http.client.js";
2
+ /**
3
+ * Tool API calls (for compile command)
4
+ */
5
+ export default class ToolApi extends HttpClient {
6
+ /**
7
+ * Creates an instance of ToolApi
8
+ * @param baseUrl - The base URL for the API
9
+ * @param apiKey - The API key for authentication
10
+ */
11
+ constructor(baseUrl, apiKey) {
12
+ super(baseUrl);
13
+ this.apiKey = apiKey;
14
+ }
15
+ /**
16
+ * Performs a GET request to a tool endpoint
17
+ * @param url - The full or relative URL to request
18
+ * @returns Promise resolving to an ApiResponse with the tool's response data
19
+ * @throws Error if the request fails
20
+ */
21
+ async getTool(url) {
22
+ return this.httpGet(url, {
23
+ Authorization: `Bearer ${this.apiKey}`,
24
+ });
25
+ }
26
+ /**
27
+ * Performs a POST request to a tool endpoint
28
+ * @param url - The full or relative URL to request
29
+ * @param data - The data to send in the request body
30
+ * @returns Promise resolving to an ApiResponse with the tool's response data
31
+ * @throws Error if the request fails
32
+ */
33
+ async postTool(url, data) {
34
+ return this.httpPost(url, data, {
35
+ Authorization: `Bearer ${this.apiKey}`,
36
+ });
37
+ }
38
+ /**
39
+ * Performs a PUT request to a tool endpoint
40
+ * @param url - The full or relative URL to request
41
+ * @param data - The data to send in the request body
42
+ * @returns Promise resolving to an ApiResponse with the tool's response data
43
+ * @throws Error if the request fails
44
+ */
45
+ async putTool(url, data) {
46
+ return this.httpPut(url, data, {
47
+ Authorization: `Bearer ${this.apiKey}`,
48
+ });
49
+ }
50
+ /**
51
+ * Performs a DELETE request to a tool endpoint
52
+ * @param url - The full or relative URL to request
53
+ * @returns Promise resolving to an ApiResponse with the tool's response data
54
+ * @throws Error if the request fails
55
+ */
56
+ async deleteTool(url) {
57
+ return this.httpDelete(url, {
58
+ Authorization: `Bearer ${this.apiKey}`,
59
+ });
60
+ }
61
+ /**
62
+ * Performs a PATCH request to a tool endpoint
63
+ * @param url - The full or relative URL to request
64
+ * @param data - The data to send in the request body
65
+ * @returns Promise resolving to an ApiResponse with the tool's response data
66
+ * @throws Error if the request fails
67
+ */
68
+ async patchTool(url, data) {
69
+ return this.httpPatch(url, data, {
70
+ Authorization: `Bearer ${this.apiKey}`,
71
+ });
72
+ }
73
+ }
@@ -0,0 +1,33 @@
1
+ import { HttpClient } from "../common/http.client.js";
2
+ import UserDataInstance from "../common/user.instance.js";
3
+ import { UserDataAPI } from "../types/index.js";
4
+ export default class UserDataApi extends HttpClient implements UserDataAPI {
5
+ private apiKey;
6
+ private agentId;
7
+ /**
8
+ * Creates an instance of UserDataApi
9
+ * @param baseUrl - The base URL for the API
10
+ * @param apiKey - The API key for authentication
11
+ * @param agentId - The unique identifier of the agent
12
+ */
13
+ constructor(baseUrl: string, apiKey: string, agentId: string);
14
+ /**
15
+ * Retrieves the current user's data for the specific agent
16
+ * @returns Promise resolving to a UserDataInstance containing the user's data
17
+ * @throws Error if the user data cannot be retrieved or the request fails
18
+ */
19
+ get(): Promise<UserDataInstance>;
20
+ /**
21
+ * Updates the current user's data for the specific agent
22
+ * @param data - The data object containing fields to update or add to user data
23
+ * @returns Promise resolving to the updated user data
24
+ * @throws Error if the update fails or the request is unsuccessful
25
+ */
26
+ update(data: Record<string, any>): Promise<any>;
27
+ /**
28
+ * Clears all user data for the current user and specific agent
29
+ * @returns Promise resolving to an empty object upon successful deletion
30
+ * @throws Error if the clear operation fails or the request is unsuccessful
31
+ */
32
+ clear(): Promise<any>;
33
+ }
@@ -0,0 +1,59 @@
1
+ import { HttpClient } from "../common/http.client.js";
2
+ import UserDataInstance from "../common/user.instance.js";
3
+ // User Data API calls
4
+ export default class UserDataApi extends HttpClient {
5
+ /**
6
+ * Creates an instance of UserDataApi
7
+ * @param baseUrl - The base URL for the API
8
+ * @param apiKey - The API key for authentication
9
+ * @param agentId - The unique identifier of the agent
10
+ */
11
+ constructor(baseUrl, apiKey, agentId) {
12
+ super(baseUrl);
13
+ this.apiKey = apiKey;
14
+ this.agentId = agentId;
15
+ }
16
+ /**
17
+ * Retrieves the current user's data for the specific agent
18
+ * @returns Promise resolving to a UserDataInstance containing the user's data
19
+ * @throws Error if the user data cannot be retrieved or the request fails
20
+ */
21
+ async get() {
22
+ const response = await this.httpGet(`/developer/user/data/agent/${this.agentId}`, {
23
+ Authorization: `Bearer ${this.apiKey}`,
24
+ });
25
+ if (!response.success) {
26
+ throw new Error(response.error?.message || 'Failed to get user data');
27
+ }
28
+ return new UserDataInstance(this, response.data);
29
+ }
30
+ /**
31
+ * Updates the current user's data for the specific agent
32
+ * @param data - The data object containing fields to update or add to user data
33
+ * @returns Promise resolving to the updated user data
34
+ * @throws Error if the update fails or the request is unsuccessful
35
+ */
36
+ async update(data) {
37
+ const response = await this.httpPut(`/developer/user/data/agent/${this.agentId}`, data, {
38
+ Authorization: `Bearer ${this.apiKey}`,
39
+ });
40
+ if (!response.success) {
41
+ throw new Error(response.error?.message || 'Failed to update user data');
42
+ }
43
+ return response.data;
44
+ }
45
+ /**
46
+ * Clears all user data for the current user and specific agent
47
+ * @returns Promise resolving to an empty object upon successful deletion
48
+ * @throws Error if the clear operation fails or the request is unsuccessful
49
+ */
50
+ async clear() {
51
+ const response = await this.httpDelete(`/developer/user/data/agent/${this.agentId}`, {
52
+ Authorization: `Bearer ${this.apiKey}`,
53
+ });
54
+ if (!response.success) {
55
+ throw new Error(response.error?.message || 'Failed to clear user data');
56
+ }
57
+ return {};
58
+ }
59
+ }
@@ -0,0 +1,271 @@
1
+ /**
2
+ * Lua Skill API Exports
3
+ *
4
+ * Public API surface for LuaSkill tools.
5
+ * This module provides simplified interfaces to Lua platform APIs
6
+ * for use within skill implementations.
7
+ *
8
+ * Available APIs:
9
+ * - User: User data management
10
+ * - Data: Custom data collections (vector search, CRUD)
11
+ * - Products: Product catalog management
12
+ * - Baskets: Shopping basket operations
13
+ * - Orders: Order management
14
+ *
15
+ * Usage in skills:
16
+ * ```typescript
17
+ * import { User, Data, Products, Baskets, Orders } from 'lua-cli';
18
+ *
19
+ * // Get user data
20
+ * const user = await User.get();
21
+ *
22
+ * // Create custom data entry
23
+ * await Data.create('customers', { name: 'John' });
24
+ *
25
+ * // Search products
26
+ * const products = await Products.search('laptop');
27
+ * ```
28
+ */
29
+ import { LuaSkill, LuaTool, env } from "./types/skill.js";
30
+ import { BasketStatus } from "./interfaces/baskets.js";
31
+ import { OrderStatus } from "./interfaces/orders.js";
32
+ /**
33
+ * User Data API
34
+ * Access user information and preferences
35
+ */
36
+ export declare const User: {
37
+ /**
38
+ * Retrieves current user data.
39
+ *
40
+ * @returns Promise resolving to user data
41
+ */
42
+ get(): Promise<import("./common/user.instance.js").default>;
43
+ };
44
+ /**
45
+ * Custom Data API
46
+ * Store and retrieve custom data with vector search capabilities
47
+ */
48
+ export declare const Data: {
49
+ /**
50
+ * Creates a new entry in a custom data collection.
51
+ *
52
+ * @param collectionName - Name of the collection
53
+ * @param data - Data to store
54
+ * @param searchText - Optional text for vector search indexing
55
+ * @returns Promise resolving to created entry
56
+ */
57
+ create(collectionName: string, data: any, searchText?: string): Promise<import("./common/data.entry.instance.js").default>;
58
+ /**
59
+ * Retrieves entries from a collection with optional filtering and pagination.
60
+ *
61
+ * @param collectionName - Name of the collection
62
+ * @param filter - Optional filter criteria
63
+ * @param page - Page number (default: 1)
64
+ * @param limit - Items per page (default: 10)
65
+ * @returns Promise resolving to array of entries
66
+ */
67
+ get(collectionName: string, filter?: any, page?: number, limit?: number): Promise<import("./interfaces/custom.data.js").GetCustomDataResponse>;
68
+ /**
69
+ * Retrieves a specific entry by ID.
70
+ *
71
+ * @param collectionName - Name of the collection
72
+ * @param entryId - ID of the entry
73
+ * @returns Promise resolving to entry data
74
+ */
75
+ getEntry(collectionName: string, entryId: string): Promise<import("./common/data.entry.instance.js").default>;
76
+ /**
77
+ * Updates an existing entry.
78
+ *
79
+ * @param collectionName - Name of the collection
80
+ * @param entryId - ID of the entry to update
81
+ * @param data - Updated data
82
+ * @returns Promise resolving to updated entry
83
+ */
84
+ update(collectionName: string, entryId: string, data: any): Promise<import("./interfaces/custom.data.js").UpdateCustomDataResponse>;
85
+ /**
86
+ * Performs vector search on a collection.
87
+ *
88
+ * @param collectionName - Name of the collection
89
+ * @param searchText - Text to search for
90
+ * @param limit - Maximum results to return
91
+ * @param scoreThreshold - Minimum similarity score (0-1)
92
+ * @returns Promise resolving to search results
93
+ */
94
+ search(collectionName: string, searchText: string, limit?: number, scoreThreshold?: number): Promise<import("./common/data.entry.instance.js").default[]>;
95
+ /**
96
+ * Deletes an entry from a collection.
97
+ *
98
+ * @param collectionName - Name of the collection
99
+ * @param entryId - ID of the entry to delete
100
+ * @returns Promise resolving when deletion is complete
101
+ */
102
+ delete(collectionName: string, entryId: string): Promise<import("./interfaces/custom.data.js").DeleteCustomDataResponse>;
103
+ };
104
+ /**
105
+ * Products API
106
+ * Manage product catalog
107
+ */
108
+ export declare const Products: {
109
+ /**
110
+ * Retrieves products with pagination.
111
+ *
112
+ * @param limit - Items per page
113
+ * @param page - Page number
114
+ * @returns Promise resolving to product list
115
+ */
116
+ get(limit?: number, page?: number): Promise<import("./common/product.pagination.instance.js").default>;
117
+ /**
118
+ * Creates a new product.
119
+ *
120
+ * @param product - Product data
121
+ * @returns Promise resolving to created product
122
+ */
123
+ create(product: any): Promise<import("./common/product.instance.js").default>;
124
+ /**
125
+ * Updates an existing product.
126
+ *
127
+ * @param data - Updated product data
128
+ * @param id - Product ID
129
+ * @returns Promise resolving to updated product
130
+ */
131
+ update(data: any, id: string): Promise<import("./interfaces/product.js").UpdateProductResponse>;
132
+ /**
133
+ * Deletes a product.
134
+ *
135
+ * @param id - Product ID
136
+ * @returns Promise resolving when deletion is complete
137
+ */
138
+ delete(id: string): Promise<import("./interfaces/product.js").DeleteProductResponse>;
139
+ /**
140
+ * Searches products by query string.
141
+ *
142
+ * @param query - Search query
143
+ * @returns Promise resolving to search results
144
+ */
145
+ search(query: string): Promise<import("./common/product.search.instance.js").default>;
146
+ /**
147
+ * Retrieves a specific product by ID.
148
+ *
149
+ * @param id - Product ID
150
+ * @returns Promise resolving to product data
151
+ */
152
+ getById(id: string): Promise<import("./common/product.instance.js").default>;
153
+ };
154
+ /**
155
+ * Baskets API
156
+ * Manage shopping baskets
157
+ */
158
+ export declare const Baskets: {
159
+ /**
160
+ * Creates a new basket.
161
+ *
162
+ * @param basketData - Basket initialization data
163
+ * @returns Promise resolving to created basket
164
+ */
165
+ create(basketData: any): Promise<import("./common/basket.instance.js").default>;
166
+ /**
167
+ * Retrieves baskets, optionally filtered by status.
168
+ *
169
+ * @param status - Optional basket status filter
170
+ * @returns Promise resolving to basket list
171
+ */
172
+ get(status?: any): Promise<import("./common/basket.instance.js").default[]>;
173
+ /**
174
+ * Adds an item to a basket.
175
+ *
176
+ * @param basketId - Basket ID
177
+ * @param itemData - Item data to add
178
+ * @returns Promise resolving to updated basket
179
+ */
180
+ addItem(basketId: string, itemData: any): Promise<import("./interfaces/baskets.js").Basket>;
181
+ /**
182
+ * Removes an item from a basket.
183
+ *
184
+ * @param basketId - Basket ID
185
+ * @param itemId - Item ID to remove
186
+ * @returns Promise resolving to updated basket
187
+ */
188
+ removeItem(basketId: string, itemId: string): Promise<import("./interfaces/baskets.js").Basket>;
189
+ /**
190
+ * Clears all items from a basket.
191
+ *
192
+ * @param basketId - Basket ID
193
+ * @returns Promise resolving to cleared basket
194
+ */
195
+ clear(basketId: string): Promise<import("./interfaces/baskets.js").Basket>;
196
+ /**
197
+ * Updates basket status.
198
+ *
199
+ * @param basketId - Basket ID
200
+ * @param status - New basket status
201
+ * @returns Promise resolving to updated basket
202
+ */
203
+ updateStatus(basketId: string, status: any): Promise<BasketStatus>;
204
+ /**
205
+ * Updates basket metadata.
206
+ *
207
+ * @param basketId - Basket ID
208
+ * @param metadata - Metadata to update
209
+ * @returns Promise resolving to updated basket
210
+ */
211
+ updateMetadata(basketId: string, metadata: any): Promise<import("./interfaces/baskets.js").UpdateBasketMetadataResponse>;
212
+ /**
213
+ * Converts basket to order.
214
+ *
215
+ * @param data - Order data
216
+ * @param basketId - Basket ID to convert
217
+ * @returns Promise resolving to created order
218
+ */
219
+ placeOrder(data: Record<string, any>, basketId: string): Promise<import("./common/order.instance.js").default>;
220
+ /**
221
+ * Retrieves a specific basket by ID.
222
+ *
223
+ * @param basketId - Basket ID
224
+ * @returns Promise resolving to basket data
225
+ */
226
+ getById(basketId: string): Promise<import("./common/basket.instance.js").default>;
227
+ };
228
+ /**
229
+ * Orders API
230
+ * Manage orders
231
+ */
232
+ export declare const Orders: {
233
+ /**
234
+ * Creates a new order.
235
+ *
236
+ * @param orderData - Order data
237
+ * @returns Promise resolving to created order
238
+ */
239
+ create(orderData: any): Promise<import("./common/order.instance.js").default>;
240
+ /**
241
+ * Updates order status.
242
+ *
243
+ * @param status - New order status
244
+ * @param orderId - Order ID
245
+ * @returns Promise resolving to updated order
246
+ */
247
+ updateStatus(status: any, orderId: string): Promise<import("./interfaces/orders.js").OrderResponse>;
248
+ /**
249
+ * Updates order data.
250
+ *
251
+ * @param data - Data to update
252
+ * @param orderId - Order ID
253
+ * @returns Promise resolving to updated order
254
+ */
255
+ updateData(data: Record<string, any>, orderId: string): Promise<import("./interfaces/orders.js").OrderResponse>;
256
+ /**
257
+ * Retrieves orders, optionally filtered by status.
258
+ *
259
+ * @param status - Optional order status filter
260
+ * @returns Promise resolving to order list
261
+ */
262
+ get(status?: any): Promise<import("./common/order.instance.js").default[]>;
263
+ /**
264
+ * Retrieves a specific order by ID.
265
+ *
266
+ * @param orderId - Order ID
267
+ * @returns Promise resolving to order data
268
+ */
269
+ getById(orderId: string): Promise<import("./common/order.instance.js").default>;
270
+ };
271
+ export { LuaSkill, LuaTool, BasketStatus, OrderStatus, env };