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
@@ -1,569 +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
- metadata?: any;
176
- items: BasketItem[];
177
- createdAt: string;
178
- };
179
- common: {
180
- status: 'active' | 'checked_out' | 'abandoned' | 'expired';
181
- totalAmount: string | number;
182
- itemCount: number;
183
- };
184
- createdAt: string;
185
- updatedAt: string;
186
- __v: number;
187
- }
188
- export interface CreateBasketRequest {
189
- currency: string;
190
- metadata?: any;
191
- }
192
- export interface CreateBasketResponse {
193
- success: boolean;
194
- message: string;
195
- data: Basket;
196
- }
197
- export interface GetBasketsResponse {
198
- success: boolean;
199
- message: string;
200
- data: Basket[];
201
- }
202
- export interface AddItemToBasketRequest {
203
- id: string;
204
- price: number;
205
- quantity: number;
206
- [key: string]: any;
207
- }
208
- export interface AddItemToBasketResponse {
209
- success: boolean;
210
- message: string;
211
- data: Basket;
212
- }
213
- export interface RemoveItemFromBasketResponse {
214
- success: boolean;
215
- message: string;
216
- data: Basket;
217
- }
218
- export interface ClearBasketResponse {
219
- success: boolean;
220
- message: string;
221
- data: Basket;
222
- }
223
- export interface UpdateBasketStatusResponse {
224
- success: boolean;
225
- message: string;
226
- data: Basket;
227
- }
228
- export interface Order {
229
- id: string;
230
- userId: string;
231
- agentId: string;
232
- orderId: string;
233
- data: {
234
- currency: string;
235
- items: BasketItem[];
236
- createdAt: string;
237
- basketId: string;
238
- orderDate: string;
239
- orderId: string;
240
- [key: string]: any;
241
- };
242
- common: {
243
- status: 'pending' | 'confirmed' | 'fulfilled' | 'cancelled';
244
- totalAmount: string | number;
245
- currency: string;
246
- itemCount: number;
247
- };
248
- createdAt: string;
249
- updatedAt: string;
250
- __v: number;
251
- }
252
- export interface CreateOrderRequest {
253
- basketId: string;
254
- data: {
255
- [key: string]: any;
256
- };
257
- }
258
- export interface CreateOrderResponse {
259
- success: boolean;
260
- message: string;
261
- data: Order;
262
- }
263
- export interface UpdateOrderStatusResponse {
264
- success: boolean;
265
- message: string;
266
- data: Order;
267
- }
268
- export interface GetUserOrdersResponse {
269
- success: boolean;
270
- message: string;
271
- data: Order[];
272
- }
273
- export declare enum BasketStatus {
274
- ACTIVE = "active",
275
- CHECKED_OUT = "checked_out",
276
- ABANDONED = "abandoned",
277
- EXPIRED = "expired"
278
- }
279
- export declare enum OrderStatus {
280
- PENDING = "pending",
281
- CONFIRMED = "confirmed",
282
- FULFILLED = "fulfilled",
283
- CANCELLED = "cancelled"
284
- }
285
- export interface CustomDataEntry {
286
- id: string;
287
- data: any;
288
- createdAt: number;
289
- updatedAt: number;
290
- searchText?: string;
291
- }
292
- export interface CreateCustomDataRequest {
293
- data: any;
294
- searchText?: string;
295
- }
296
- export interface CreateCustomDataResponse {
297
- id: string;
298
- data: any;
299
- createdAt: number;
300
- updatedAt: number;
301
- searchText?: string;
302
- }
303
- export interface GetCustomDataResponse {
304
- data: CustomDataEntry[];
305
- pagination: {
306
- currentPage: number;
307
- totalPages: number;
308
- totalCount: number;
309
- limit: number;
310
- hasNextPage: boolean;
311
- hasPrevPage: boolean;
312
- };
313
- }
314
- export interface UpdateCustomDataRequest {
315
- data: any;
316
- searchText?: string;
317
- }
318
- export interface UpdateCustomDataResponse {
319
- status: string;
320
- message: string;
321
- }
322
- export interface SearchCustomDataResponse {
323
- data: Array<CustomDataEntry & {
324
- score: number;
325
- }>;
326
- count: number;
327
- }
328
- export interface DeleteCustomDataResponse {
329
- status: string;
330
- message: string;
331
- }
332
- export interface UpdateBasketMetadataResponse {
333
- status: string;
334
- message: string;
335
- }
336
- /**
337
- * Authentication API calls
338
- */
339
- export declare class AuthApi {
340
- static checkApiKey(apiKey: string): Promise<ApiResponse<UserData>>;
341
- static sendOtp(email: string): Promise<ApiResponse<{
342
- message: string;
343
- }>>;
344
- static verifyOtp(email: string, otp: string): Promise<ApiResponse<{
345
- signInToken: string;
346
- }>>;
347
- static getApiKey(signInToken: string): Promise<ApiResponse<{
348
- apiKey: string;
349
- }>>;
350
- }
351
- /**
352
- * Agent API calls
353
- */
354
- export declare class AgentApi {
355
- static getOrganizations(apiKey: string): Promise<ApiResponse<Organization[]>>;
356
- static getAgentTypes(apiKey: string): Promise<ApiResponse<AgentType[]>>;
357
- static createAgent(apiKey: string, agentData: CreateAgentRequest): Promise<ApiResponse<CreateAgentResponse>>;
358
- static getAgent(apiKey: string, agentId: string): Promise<ApiResponse<Agent>>;
359
- }
360
- /**
361
- * Skill API calls
362
- */
363
- export declare class SkillApi {
364
- static createSkill(apiKey: string, agentId: string, skillData: any): Promise<ApiResponse<{
365
- id: string;
366
- name: string;
367
- description?: string;
368
- agentId: string;
369
- context?: string;
370
- }>>;
371
- static pushSkill(apiKey: string, agentId: string, skillId: string, versionData: any): Promise<ApiResponse<DevVersionResponse>>;
372
- static pushDevSkill(apiKey: string, agentId: string, skillId: string, versionData: any): Promise<ApiResponse<DevVersionResponse>>;
373
- static updateDevSkill(apiKey: string, agentId: string, skillId: string, sandboxVersionId: string, versionData: any): Promise<ApiResponse<UpdateDevVersionResponse>>;
374
- static getSkillVersions(apiKey: string, agentId: string, skillId: string): Promise<ApiResponse<{
375
- versions: any[];
376
- }>>;
377
- static publishSkillVersion(apiKey: string, agentId: string, skillId: string, version: string): Promise<ApiResponse<{
378
- message: string;
379
- skillId: string;
380
- activeVersionId: string;
381
- publishedAt: string;
382
- }>>;
383
- }
384
- /**
385
- * Chat API calls
386
- */
387
- export declare class ChatApi {
388
- static sendMessage(agentId: string, chatData: ChatRequest, apiKey: string): Promise<ApiResponse<ChatResponse>>;
389
- }
390
- /**
391
- * Product API calls
392
- */
393
- export declare class ProductApi {
394
- /**
395
- * Get all products for an agent with pagination
396
- */
397
- static getProducts(apiKey: string, agentId: string, page?: number, limit?: number): Promise<ProductsResponse | {
398
- success: false;
399
- message: string;
400
- }>;
401
- /**
402
- * Create a new product
403
- */
404
- static createProduct(apiKey: string, agentId: string, productData: Product): Promise<CreateProductResponse | {
405
- success: false;
406
- message: string;
407
- }>;
408
- /**
409
- * Update an existing product
410
- */
411
- static updateProduct(apiKey: string, agentId: string, productData: Product): Promise<UpdateProductResponse | {
412
- success: false;
413
- message: string;
414
- }>;
415
- /**
416
- * Delete a product
417
- */
418
- static deleteProduct(apiKey: string, agentId: string, productId: string): Promise<DeleteProductResponse | {
419
- success: false;
420
- message: string;
421
- }>;
422
- /**
423
- * Search products by text query
424
- */
425
- static searchProducts(apiKey: string, agentId: string, searchQuery: string): Promise<SearchProductsResponse | {
426
- success: false;
427
- message: string;
428
- }>;
429
- /**
430
- * Create a new user basket
431
- */
432
- static createBasket(apiKey: string, agentId: string, basketData: CreateBasketRequest): Promise<CreateBasketResponse | {
433
- success: false;
434
- message: string;
435
- }>;
436
- /**
437
- * Get all user baskets with optional status filter
438
- */
439
- static getUserBaskets(apiKey: string, agentId: string, status?: BasketStatus): Promise<GetBasketsResponse | {
440
- success: false;
441
- message: string;
442
- }>;
443
- /**
444
- * Add item to basket
445
- */
446
- static addItemToBasket(apiKey: string, agentId: string, basketId: string, itemData: AddItemToBasketRequest): Promise<AddItemToBasketResponse | {
447
- success: false;
448
- message: string;
449
- }>;
450
- /**
451
- * Remove item from basket
452
- */
453
- static removeItemFromBasket(apiKey: string, agentId: string, basketId: string, itemId: string): Promise<RemoveItemFromBasketResponse | {
454
- success: false;
455
- message: string;
456
- }>;
457
- /**
458
- * Clear basket (remove all items)
459
- */
460
- static clearBasket(apiKey: string, agentId: string, basketId: string): Promise<ClearBasketResponse | {
461
- success: false;
462
- message: string;
463
- }>;
464
- /**
465
- * Update basket status
466
- */
467
- static updateBasketStatus(apiKey: string, agentId: string, basketId: string, status: BasketStatus): Promise<UpdateBasketStatusResponse | {
468
- success: false;
469
- message: string;
470
- }>;
471
- static updateBasketMetadata(apiKey: string, agentId: string, basketId: string, metadata: any): Promise<UpdateBasketMetadataResponse | {
472
- success: false;
473
- message: string;
474
- }>;
475
- /**
476
- * Create order from basket
477
- */
478
- static createOrder(apiKey: string, agentId: string, orderData: CreateOrderRequest): Promise<CreateOrderResponse | {
479
- success: false;
480
- message: string;
481
- }>;
482
- /**
483
- * Update order status
484
- */
485
- static updateOrderStatus(apiKey: string, agentId: string, orderId: string, status: OrderStatus): Promise<UpdateOrderStatusResponse | {
486
- success: false;
487
- message: string;
488
- }>;
489
- /**
490
- * Get user orders with optional status filter
491
- */
492
- static getUserOrders(apiKey: string, agentId: string, status?: OrderStatus): Promise<GetUserOrdersResponse | {
493
- success: false;
494
- message: string;
495
- }>;
496
- }
497
- /**
498
- * Tool API calls (for compile command)
499
- */
500
- export declare class ToolApi {
501
- static getTool(url: string, apiKey: string): Promise<ApiResponse<any>>;
502
- static postTool(url: string, data: any, apiKey: string): Promise<ApiResponse<any>>;
503
- static putTool(url: string, data: any, apiKey: string): Promise<ApiResponse<any>>;
504
- static deleteTool(url: string, apiKey: string): Promise<ApiResponse<any>>;
505
- static patchTool(url: string, data: any, apiKey: string): Promise<ApiResponse<any>>;
506
- }
507
- export declare class UserDataApi {
508
- static getUserData(apiKey: string, agentId: string): Promise<any>;
509
- static createUserData(apiKey: string, agentId: string, data: any): Promise<any>;
510
- static updateUserData(apiKey: string, agentId: string, data: any): Promise<ApiResponse<any>>;
511
- static deleteUserData(apiKey: string, agentId: string): Promise<ApiResponse<any>>;
512
- }
513
- export declare class CustomDataApi {
514
- /**
515
- * Create a new custom data entry
516
- */
517
- static createCustomData(apiKey: string, agentId: string, collectionName: string, data: CreateCustomDataRequest): Promise<CreateCustomDataResponse | {
518
- success: false;
519
- message: string;
520
- }>;
521
- /**
522
- * Get custom data entries with optional filtering and pagination
523
- */
524
- static getCustomData(apiKey: string, agentId: string, collectionName: string, filter?: any, page?: number, limit?: number): Promise<GetCustomDataResponse | {
525
- success: false;
526
- message: string;
527
- }>;
528
- /**
529
- * Get a single custom data entry by ID
530
- */
531
- static getCustomDataEntry(apiKey: string, agentId: string, collectionName: string, entryId: string): Promise<CustomDataEntry | {
532
- success: false;
533
- message: string;
534
- }>;
535
- /**
536
- * Update a custom data entry
537
- */
538
- static updateCustomData(apiKey: string, agentId: string, collectionName: string, entryId: string, data: UpdateCustomDataRequest): Promise<UpdateCustomDataResponse | {
539
- success: false;
540
- message: string;
541
- }>;
542
- /**
543
- * Search custom data entries by text
544
- */
545
- static searchCustomData(apiKey: string, agentId: string, collectionName: string, searchText: string, limit?: number, scoreThreshold?: number): Promise<SearchCustomDataResponse | {
546
- success: false;
547
- message: string;
548
- }>;
549
- /**
550
- * Delete a custom data entry
551
- */
552
- static deleteCustomData(apiKey: string, agentId: string, collectionName: string, entryId: string): Promise<DeleteCustomDataResponse | {
553
- success: false;
554
- message: string;
555
- }>;
556
- }
557
- /**
558
- * Main API service that exports all API classes
559
- */
560
- export declare const ApiService: {
561
- Auth: typeof AuthApi;
562
- Agent: typeof AgentApi;
563
- Skill: typeof SkillApi;
564
- Chat: typeof ChatApi;
565
- Product: typeof ProductApi;
566
- Tool: typeof ToolApi;
567
- UserData: typeof UserDataApi;
568
- CustomData: typeof CustomDataApi;
569
- };