lua-cli 2.2.8-alpha.2 → 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 (193) 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 +33 -6
  7. package/dist/api/agent.api.service.js +27 -0
  8. package/dist/api/auth.api.service.d.ts +31 -2
  9. package/dist/api/auth.api.service.js +29 -0
  10. package/dist/api/basket.api.service.d.ts +53 -11
  11. package/dist/api/basket.api.service.js +63 -14
  12. package/dist/api/chat.api.service.d.ts +15 -3
  13. package/dist/api/chat.api.service.js +12 -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 +45 -9
  17. package/dist/api/custom.data.api.service.js +43 -9
  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 +34 -4
  21. package/dist/api/order.api.service.js +41 -3
  22. package/dist/api/products.api.service.d.ts +39 -9
  23. package/dist/api/products.api.service.js +43 -5
  24. package/dist/api/skills.api.service.d.ts +49 -2
  25. package/dist/api/skills.api.service.js +47 -1
  26. package/dist/api/tool.api.service.d.ts +39 -1
  27. package/dist/api/tool.api.service.js +38 -0
  28. package/dist/api/user.data.api.service.d.ts +23 -1
  29. package/dist/api/user.data.api.service.js +22 -0
  30. package/dist/api-exports.d.ts +236 -5
  31. package/dist/api-exports.js +264 -81
  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 -878
  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 +54 -3
  55. package/dist/common/basket.instance.js +56 -3
  56. package/dist/common/data.entry.instance.d.ts +25 -2
  57. package/dist/common/data.entry.instance.js +24 -0
  58. package/dist/common/http.client.d.ts +51 -1
  59. package/dist/common/http.client.js +50 -0
  60. package/dist/common/order.instance.d.ts +22 -0
  61. package/dist/common/order.instance.js +31 -4
  62. package/dist/common/product.instance.d.ts +22 -1
  63. package/dist/common/product.instance.js +24 -6
  64. package/dist/common/product.pagination.instance.d.ts +22 -2
  65. package/dist/common/product.pagination.instance.js +22 -1
  66. package/dist/common/product.search.instance.d.ts +13 -3
  67. package/dist/common/product.search.instance.js +12 -1
  68. package/dist/common/user.instance.d.ts +27 -3
  69. package/dist/common/user.instance.js +28 -7
  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 +56 -50
  83. package/dist/interfaces/admin.js +4 -0
  84. package/dist/interfaces/agent.d.ts +21 -0
  85. package/dist/interfaces/agent.js +4 -0
  86. package/dist/interfaces/baskets.d.ts +60 -0
  87. package/dist/interfaces/baskets.js +12 -0
  88. package/dist/interfaces/chat.d.ts +48 -4
  89. package/dist/interfaces/chat.js +4 -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 +49 -19
  95. package/dist/interfaces/custom.data.js +4 -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 +37 -0
  103. package/dist/interfaces/orders.js +12 -0
  104. package/dist/interfaces/product.d.ts +38 -10
  105. package/dist/interfaces/product.js +4 -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 -121
  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 -17
  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 -114
  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 +7 -4
  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 +5 -5
  170. package/template/package.json +1 -1
  171. package/template/src/index.ts +147 -207
  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 -26
  178. package/dist/common/config.d.ts +0 -5
  179. package/dist/common/config.js +0 -5
  180. package/dist/custom-data-api.d.ts +0 -72
  181. package/dist/custom-data-api.js +0 -174
  182. package/dist/product-api.d.ts +0 -189
  183. package/dist/product-api.js +0 -141
  184. package/dist/services/api.d.ts +0 -549
  185. package/dist/services/api.js +0 -596
  186. package/dist/skill.d.ts +0 -50
  187. package/dist/types.d.ts +0 -1
  188. package/dist/types.js +0 -2
  189. package/dist/user-data-api.d.ts +0 -39
  190. package/dist/user-data-api.js +0 -50
  191. package/template/API.md +0 -604
  192. package/template/DEVELOPER.md +0 -771
  193. package/template/lua.skill.yaml +0 -7
@@ -1,549 +0,0 @@
1
- /**
2
- * Centralized API service for all Lua CLI API calls
3
- * This service handles all HTTP requests to various Lua endpoints
4
- */
5
- export interface ApiResponse<T = any> {
6
- success: boolean;
7
- data?: T;
8
- error?: {
9
- message: string;
10
- statusCode?: number;
11
- };
12
- }
13
- export interface UserData {
14
- uid: string;
15
- email: string;
16
- emailVerified: boolean;
17
- fullName: string;
18
- mobileNumbers: any[];
19
- emailAddresses: any[];
20
- country: any;
21
- admin: any;
22
- channels: Record<string, any>;
23
- rights: Record<string, any>;
24
- setupPersona: Record<string, any>;
25
- notifications: Record<string, any>;
26
- }
27
- export interface Organization {
28
- id: string;
29
- name: string;
30
- agents: string[];
31
- }
32
- export interface Agent {
33
- id: string;
34
- name: string;
35
- persona?: string;
36
- welcomeMessage?: string;
37
- featuresOverride?: Record<string, any>;
38
- }
39
- export interface SkillVersion {
40
- version: string;
41
- createdAt: string;
42
- status: string;
43
- }
44
- export interface DevVersionResponse {
45
- success: boolean;
46
- data?: {
47
- message: string;
48
- skillId: string;
49
- version: string;
50
- };
51
- error?: {
52
- message: string;
53
- statusCode: number;
54
- };
55
- }
56
- export interface UpdateDevVersionResponse {
57
- success: boolean;
58
- data?: {
59
- message: string;
60
- version: string;
61
- };
62
- error?: {
63
- message: string;
64
- statusCode: number;
65
- };
66
- }
67
- export interface AgentType {
68
- id: string;
69
- name: string;
70
- features: Record<string, any>;
71
- requiredSubAgentMetadata?: string[];
72
- }
73
- export interface CreateAgentRequest {
74
- id: string;
75
- type: string;
76
- metadata: Record<string, any>;
77
- persona: {
78
- agentName: string;
79
- businessType: string;
80
- brandPersonality: string;
81
- brandTraits: string;
82
- };
83
- features: Record<string, boolean>;
84
- channels: any[];
85
- org: {
86
- registeredName: string;
87
- };
88
- }
89
- export interface CreateAgentResponse {
90
- agentId: string;
91
- name: string;
92
- baseAgentId: string;
93
- persona: string;
94
- createdAt: string;
95
- welcomeMessage: string;
96
- featuresOverride: Record<string, any>;
97
- org: {
98
- registeredName: string;
99
- type: string;
100
- agents: string[];
101
- paymentMethods: any[];
102
- _id: string;
103
- id: string;
104
- createdAt: number;
105
- __v: number;
106
- };
107
- }
108
- export interface ChatMessage {
109
- type: 'text';
110
- text: string;
111
- }
112
- export interface ChatRequest {
113
- messages: ChatMessage[];
114
- navigate: boolean;
115
- skillOverride: Array<{
116
- skillId: string;
117
- sandboxId: string;
118
- }>;
119
- }
120
- export interface ChatResponse {
121
- success: boolean;
122
- text?: string;
123
- error?: string;
124
- }
125
- export interface Product {
126
- id: string;
127
- [key: string]: any;
128
- }
129
- export interface ProductsResponse {
130
- success: boolean;
131
- data: Product[];
132
- pagination: {
133
- currentPage: number;
134
- totalPages: number;
135
- totalCount: number;
136
- limit: number;
137
- hasNextPage: boolean;
138
- hasPrevPage: boolean;
139
- nextPage: number | null;
140
- prevPage: number | null;
141
- };
142
- }
143
- export interface CreateProductResponse {
144
- updated: boolean;
145
- isNew: boolean;
146
- product: Product;
147
- }
148
- export interface UpdateProductResponse {
149
- updated: boolean;
150
- isNew: boolean;
151
- product: Product;
152
- }
153
- export interface DeleteProductResponse {
154
- deleted: boolean;
155
- }
156
- export interface SearchProductsResponse {
157
- success: boolean;
158
- message: string;
159
- data: Product[];
160
- }
161
- export interface BasketItem {
162
- id: string;
163
- price: number;
164
- quantity: number;
165
- SKU?: string;
166
- addedAt?: string;
167
- [key: string]: any;
168
- }
169
- export interface Basket {
170
- id: string;
171
- userId: string;
172
- agentId: string;
173
- data: {
174
- currency: string;
175
- items: BasketItem[];
176
- createdAt: string;
177
- };
178
- common: {
179
- status: 'active' | 'checked_out' | 'abandoned' | 'expired';
180
- totalAmount: string | number;
181
- itemCount: number;
182
- };
183
- createdAt: string;
184
- updatedAt: string;
185
- __v: number;
186
- }
187
- export interface CreateBasketRequest {
188
- currency: string;
189
- }
190
- export interface CreateBasketResponse {
191
- success: boolean;
192
- message: string;
193
- data: Basket;
194
- }
195
- export interface GetBasketsResponse {
196
- success: boolean;
197
- message: string;
198
- data: Basket[];
199
- }
200
- export interface AddItemToBasketRequest {
201
- id: string;
202
- price: number;
203
- quantity: number;
204
- [key: string]: any;
205
- }
206
- export interface AddItemToBasketResponse {
207
- success: boolean;
208
- message: string;
209
- data: Basket;
210
- }
211
- export interface RemoveItemFromBasketResponse {
212
- success: boolean;
213
- message: string;
214
- data: Basket;
215
- }
216
- export interface ClearBasketResponse {
217
- success: boolean;
218
- message: string;
219
- data: Basket;
220
- }
221
- export interface UpdateBasketStatusResponse {
222
- success: boolean;
223
- message: string;
224
- data: Basket;
225
- }
226
- export interface Order {
227
- id: string;
228
- userId: string;
229
- agentId: string;
230
- orderId: string;
231
- data: {
232
- currency: string;
233
- items: BasketItem[];
234
- createdAt: string;
235
- basketId: string;
236
- orderDate: string;
237
- orderId: string;
238
- [key: string]: any;
239
- };
240
- common: {
241
- status: 'pending' | 'confirmed' | 'fulfilled' | 'cancelled';
242
- totalAmount: string | number;
243
- currency: string;
244
- itemCount: number;
245
- };
246
- createdAt: string;
247
- updatedAt: string;
248
- __v: number;
249
- }
250
- export interface CreateOrderRequest {
251
- basketId: string;
252
- data: {
253
- [key: string]: any;
254
- };
255
- }
256
- export interface CreateOrderResponse {
257
- success: boolean;
258
- message: string;
259
- data: Order;
260
- }
261
- export interface UpdateOrderStatusResponse {
262
- success: boolean;
263
- message: string;
264
- data: Order;
265
- }
266
- export interface GetUserOrdersResponse {
267
- success: boolean;
268
- message: string;
269
- data: Order[];
270
- }
271
- export type BasketStatus = 'active' | 'checked_out' | 'abandoned' | 'expired';
272
- export type OrderStatus = 'pending' | 'confirmed' | 'fulfilled' | 'cancelled';
273
- export interface CustomDataEntry {
274
- id: string;
275
- data: any;
276
- createdAt: number;
277
- updatedAt: number;
278
- searchText?: string;
279
- }
280
- export interface CreateCustomDataRequest {
281
- data: any;
282
- searchText?: string;
283
- }
284
- export interface CreateCustomDataResponse {
285
- id: string;
286
- data: any;
287
- createdAt: number;
288
- updatedAt: number;
289
- searchText?: string;
290
- }
291
- export interface GetCustomDataResponse {
292
- data: CustomDataEntry[];
293
- pagination: {
294
- currentPage: number;
295
- totalPages: number;
296
- totalCount: number;
297
- limit: number;
298
- hasNextPage: boolean;
299
- hasPrevPage: boolean;
300
- };
301
- }
302
- export interface UpdateCustomDataRequest {
303
- data: any;
304
- searchText?: string;
305
- }
306
- export interface UpdateCustomDataResponse {
307
- status: string;
308
- message: string;
309
- }
310
- export interface SearchCustomDataResponse {
311
- data: Array<CustomDataEntry & {
312
- score: number;
313
- }>;
314
- count: number;
315
- }
316
- export interface DeleteCustomDataResponse {
317
- status: string;
318
- message: string;
319
- }
320
- /**
321
- * Authentication API calls
322
- */
323
- export declare class AuthApi {
324
- static checkApiKey(apiKey: string): Promise<ApiResponse<UserData>>;
325
- static sendOtp(email: string): Promise<ApiResponse<{
326
- message: string;
327
- }>>;
328
- static verifyOtp(email: string, otp: string): Promise<ApiResponse<{
329
- signInToken: string;
330
- }>>;
331
- static getApiKey(signInToken: string): Promise<ApiResponse<{
332
- apiKey: string;
333
- }>>;
334
- }
335
- /**
336
- * Agent API calls
337
- */
338
- export declare class AgentApi {
339
- static getOrganizations(apiKey: string): Promise<ApiResponse<Organization[]>>;
340
- static getAgentTypes(apiKey: string): Promise<ApiResponse<AgentType[]>>;
341
- static createAgent(apiKey: string, agentData: CreateAgentRequest): Promise<ApiResponse<CreateAgentResponse>>;
342
- static getAgent(apiKey: string, agentId: string): Promise<ApiResponse<Agent>>;
343
- }
344
- /**
345
- * Skill API calls
346
- */
347
- export declare class SkillApi {
348
- static createSkill(apiKey: string, agentId: string, skillData: any): Promise<ApiResponse<{
349
- id: string;
350
- name: string;
351
- description?: string;
352
- agentId: string;
353
- context?: string;
354
- }>>;
355
- static pushSkill(apiKey: string, agentId: string, skillId: string, versionData: any): Promise<ApiResponse<DevVersionResponse>>;
356
- static pushDevSkill(apiKey: string, agentId: string, skillId: string, versionData: any): Promise<ApiResponse<DevVersionResponse>>;
357
- static updateDevSkill(apiKey: string, agentId: string, skillId: string, sandboxVersionId: string, versionData: any): Promise<ApiResponse<UpdateDevVersionResponse>>;
358
- static getSkillVersions(apiKey: string, agentId: string, skillId: string): Promise<ApiResponse<{
359
- versions: any[];
360
- }>>;
361
- static publishSkillVersion(apiKey: string, agentId: string, skillId: string, version: string): Promise<ApiResponse<{
362
- message: string;
363
- skillId: string;
364
- activeVersionId: string;
365
- publishedAt: string;
366
- }>>;
367
- }
368
- /**
369
- * Chat API calls
370
- */
371
- export declare class ChatApi {
372
- static sendMessage(agentId: string, chatData: ChatRequest, apiKey: string): Promise<ApiResponse<ChatResponse>>;
373
- }
374
- /**
375
- * Product API calls
376
- */
377
- export declare class ProductApi {
378
- /**
379
- * Get all products for an agent with pagination
380
- */
381
- static getProducts(apiKey: string, agentId: string, page?: number, limit?: number): Promise<ProductsResponse | {
382
- success: false;
383
- message: string;
384
- }>;
385
- /**
386
- * Create a new product
387
- */
388
- static createProduct(apiKey: string, agentId: string, productData: Product): Promise<CreateProductResponse | {
389
- success: false;
390
- message: string;
391
- }>;
392
- /**
393
- * Update an existing product
394
- */
395
- static updateProduct(apiKey: string, agentId: string, productData: Product): Promise<UpdateProductResponse | {
396
- success: false;
397
- message: string;
398
- }>;
399
- /**
400
- * Delete a product
401
- */
402
- static deleteProduct(apiKey: string, agentId: string, productId: string): Promise<DeleteProductResponse | {
403
- success: false;
404
- message: string;
405
- }>;
406
- /**
407
- * Search products by text query
408
- */
409
- static searchProducts(apiKey: string, agentId: string, searchQuery: string): Promise<SearchProductsResponse | {
410
- success: false;
411
- message: string;
412
- }>;
413
- /**
414
- * Create a new user basket
415
- */
416
- static createBasket(apiKey: string, agentId: string, basketData: CreateBasketRequest): Promise<CreateBasketResponse | {
417
- success: false;
418
- message: string;
419
- }>;
420
- /**
421
- * Get all user baskets with optional status filter
422
- */
423
- static getUserBaskets(apiKey: string, agentId: string, status?: BasketStatus): Promise<GetBasketsResponse | {
424
- success: false;
425
- message: string;
426
- }>;
427
- /**
428
- * Add item to basket
429
- */
430
- static addItemToBasket(apiKey: string, agentId: string, basketId: string, itemData: AddItemToBasketRequest): Promise<AddItemToBasketResponse | {
431
- success: false;
432
- message: string;
433
- }>;
434
- /**
435
- * Remove item from basket
436
- */
437
- static removeItemFromBasket(apiKey: string, agentId: string, basketId: string, itemId: string): Promise<RemoveItemFromBasketResponse | {
438
- success: false;
439
- message: string;
440
- }>;
441
- /**
442
- * Clear basket (remove all items)
443
- */
444
- static clearBasket(apiKey: string, agentId: string, basketId: string): Promise<ClearBasketResponse | {
445
- success: false;
446
- message: string;
447
- }>;
448
- /**
449
- * Update basket status
450
- */
451
- static updateBasketStatus(apiKey: string, agentId: string, basketId: string, status: BasketStatus): Promise<UpdateBasketStatusResponse | {
452
- success: false;
453
- message: string;
454
- }>;
455
- /**
456
- * Create order from basket
457
- */
458
- static createOrder(apiKey: string, agentId: string, orderData: CreateOrderRequest): Promise<CreateOrderResponse | {
459
- success: false;
460
- message: string;
461
- }>;
462
- /**
463
- * Update order status
464
- */
465
- static updateOrderStatus(apiKey: string, agentId: string, orderId: string, status: OrderStatus): Promise<UpdateOrderStatusResponse | {
466
- success: false;
467
- message: string;
468
- }>;
469
- /**
470
- * Get user orders with optional status filter
471
- */
472
- static getUserOrders(apiKey: string, agentId: string, userId: string, status?: OrderStatus): Promise<GetUserOrdersResponse | {
473
- success: false;
474
- message: string;
475
- }>;
476
- }
477
- /**
478
- * Tool API calls (for compile command)
479
- */
480
- export declare class ToolApi {
481
- static getTool(url: string, apiKey: string): Promise<ApiResponse<any>>;
482
- static postTool(url: string, data: any, apiKey: string): Promise<ApiResponse<any>>;
483
- static putTool(url: string, data: any, apiKey: string): Promise<ApiResponse<any>>;
484
- static deleteTool(url: string, apiKey: string): Promise<ApiResponse<any>>;
485
- static patchTool(url: string, data: any, apiKey: string): Promise<ApiResponse<any>>;
486
- }
487
- export declare class UserDataApi {
488
- static getUserData(apiKey: string, agentId: string): Promise<any>;
489
- static createUserData(apiKey: string, agentId: string, data: any): Promise<any>;
490
- static updateUserData(apiKey: string, agentId: string, data: any): Promise<ApiResponse<any>>;
491
- static deleteUserData(apiKey: string, agentId: string): Promise<ApiResponse<any>>;
492
- }
493
- export declare class CustomDataApi {
494
- /**
495
- * Create a new custom data entry
496
- */
497
- static createCustomData(apiKey: string, agentId: string, collectionName: string, data: CreateCustomDataRequest): Promise<CreateCustomDataResponse | {
498
- success: false;
499
- message: string;
500
- }>;
501
- /**
502
- * Get custom data entries with optional filtering and pagination
503
- */
504
- static getCustomData(apiKey: string, agentId: string, collectionName: string, filter?: any, page?: number, limit?: number): Promise<GetCustomDataResponse | {
505
- success: false;
506
- message: string;
507
- }>;
508
- /**
509
- * Get a single custom data entry by ID
510
- */
511
- static getCustomDataEntry(apiKey: string, agentId: string, collectionName: string, entryId: string): Promise<CustomDataEntry | {
512
- success: false;
513
- message: string;
514
- }>;
515
- /**
516
- * Update a custom data entry
517
- */
518
- static updateCustomData(apiKey: string, agentId: string, collectionName: string, entryId: string, data: UpdateCustomDataRequest): Promise<UpdateCustomDataResponse | {
519
- success: false;
520
- message: string;
521
- }>;
522
- /**
523
- * Search custom data entries by text
524
- */
525
- static searchCustomData(apiKey: string, agentId: string, collectionName: string, searchText: string, limit?: number, scoreThreshold?: number): Promise<SearchCustomDataResponse | {
526
- success: false;
527
- message: string;
528
- }>;
529
- /**
530
- * Delete a custom data entry
531
- */
532
- static deleteCustomData(apiKey: string, agentId: string, collectionName: string, entryId: string): Promise<DeleteCustomDataResponse | {
533
- success: false;
534
- message: string;
535
- }>;
536
- }
537
- /**
538
- * Main API service that exports all API classes
539
- */
540
- export declare const ApiService: {
541
- Auth: typeof AuthApi;
542
- Agent: typeof AgentApi;
543
- Skill: typeof SkillApi;
544
- Chat: typeof ChatApi;
545
- Product: typeof ProductApi;
546
- Tool: typeof ToolApi;
547
- UserData: typeof UserDataApi;
548
- CustomData: typeof CustomDataApi;
549
- };