lua-cli 2.2.8-alpha.2 → 2.3.0-alpha.2
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.
- package/API_REFERENCE.md +1408 -0
- package/CLI_REFERENCE.md +818 -0
- package/GETTING_STARTED.md +1040 -0
- package/README.md +738 -424
- package/TEMPLATE_GUIDE.md +1398 -0
- package/dist/api/agent.api.service.d.ts +33 -6
- package/dist/api/agent.api.service.js +27 -0
- package/dist/api/auth.api.service.d.ts +31 -2
- package/dist/api/auth.api.service.js +29 -0
- package/dist/api/basket.api.service.d.ts +53 -11
- package/dist/api/basket.api.service.js +63 -14
- package/dist/api/chat.api.service.d.ts +15 -3
- package/dist/api/chat.api.service.js +12 -0
- package/dist/api/credentials.d.ts +24 -0
- package/dist/api/credentials.js +46 -0
- package/dist/api/custom.data.api.service.d.ts +45 -9
- package/dist/api/custom.data.api.service.js +43 -9
- package/dist/api/lazy-instances.d.ts +49 -0
- package/dist/api/lazy-instances.js +95 -0
- package/dist/api/order.api.service.d.ts +34 -4
- package/dist/api/order.api.service.js +41 -3
- package/dist/api/products.api.service.d.ts +39 -9
- package/dist/api/products.api.service.js +43 -5
- package/dist/api/skills.api.service.d.ts +49 -2
- package/dist/api/skills.api.service.js +47 -1
- package/dist/api/tool.api.service.d.ts +39 -1
- package/dist/api/tool.api.service.js +38 -0
- package/dist/api/user.data.api.service.d.ts +23 -1
- package/dist/api/user.data.api.service.js +22 -0
- package/dist/api-exports.d.ts +236 -5
- package/dist/api-exports.js +264 -81
- package/dist/cli/command-definitions.d.ts +30 -0
- package/dist/cli/command-definitions.js +71 -0
- package/dist/commands/agents.d.ts +20 -0
- package/dist/commands/agents.js +24 -2
- package/dist/commands/apiKey.d.ts +23 -0
- package/dist/commands/apiKey.js +23 -0
- package/dist/commands/compile.d.ts +24 -0
- package/dist/commands/compile.js +67 -759
- package/dist/commands/configure.d.ts +24 -0
- package/dist/commands/configure.js +31 -96
- package/dist/commands/deploy.d.ts +31 -19
- package/dist/commands/deploy.js +45 -74
- package/dist/commands/destroy.d.ts +27 -0
- package/dist/commands/destroy.js +27 -1
- package/dist/commands/dev.d.ts +25 -62
- package/dist/commands/dev.js +58 -878
- package/dist/commands/init.d.ts +27 -0
- package/dist/commands/init.js +98 -260
- package/dist/commands/push.d.ts +24 -21
- package/dist/commands/push.js +39 -92
- package/dist/commands/test.d.ts +26 -0
- package/dist/commands/test.js +41 -188
- package/dist/common/basket.instance.d.ts +54 -3
- package/dist/common/basket.instance.js +56 -3
- package/dist/common/data.entry.instance.d.ts +25 -2
- package/dist/common/data.entry.instance.js +24 -0
- package/dist/common/http.client.d.ts +51 -1
- package/dist/common/http.client.js +50 -0
- package/dist/common/order.instance.d.ts +22 -0
- package/dist/common/order.instance.js +31 -4
- package/dist/common/product.instance.d.ts +22 -1
- package/dist/common/product.instance.js +24 -6
- package/dist/common/product.pagination.instance.d.ts +22 -2
- package/dist/common/product.pagination.instance.js +22 -1
- package/dist/common/product.search.instance.d.ts +13 -3
- package/dist/common/product.search.instance.js +12 -1
- package/dist/common/user.instance.d.ts +27 -3
- package/dist/common/user.instance.js +28 -7
- package/dist/config/auth.constants.d.ts +11 -0
- package/dist/config/auth.constants.js +11 -0
- package/dist/config/compile.constants.d.ts +67 -0
- package/dist/config/compile.constants.js +99 -0
- package/dist/config/constants.d.ts +5 -0
- package/dist/config/constants.js +5 -0
- package/dist/config/dev.constants.d.ts +65 -0
- package/dist/config/dev.constants.js +79 -0
- package/dist/config/init.constants.d.ts +23 -0
- package/dist/config/init.constants.js +41 -0
- package/dist/index.d.ts +19 -3
- package/dist/index.js +28 -44
- package/dist/interfaces/admin.d.ts +56 -50
- package/dist/interfaces/admin.js +4 -0
- package/dist/interfaces/agent.d.ts +21 -0
- package/dist/interfaces/agent.js +4 -0
- package/dist/interfaces/baskets.d.ts +60 -0
- package/dist/interfaces/baskets.js +12 -0
- package/dist/interfaces/chat.d.ts +48 -4
- package/dist/interfaces/chat.js +4 -0
- package/dist/interfaces/common.d.ts +62 -0
- package/dist/interfaces/common.js +8 -0
- package/dist/interfaces/compile.d.ts +11 -0
- package/dist/interfaces/compile.js +4 -0
- package/dist/interfaces/custom.data.d.ts +49 -19
- package/dist/interfaces/custom.data.js +4 -0
- package/dist/interfaces/deploy.d.ts +29 -0
- package/dist/interfaces/deploy.js +4 -0
- package/dist/interfaces/dev.d.ts +53 -0
- package/dist/interfaces/dev.js +5 -0
- package/dist/interfaces/init.d.ts +60 -0
- package/dist/interfaces/init.js +4 -0
- package/dist/interfaces/orders.d.ts +37 -0
- package/dist/interfaces/orders.js +12 -0
- package/dist/interfaces/product.d.ts +38 -10
- package/dist/interfaces/product.js +4 -0
- package/dist/interfaces/push.d.ts +26 -0
- package/dist/interfaces/push.js +4 -0
- package/dist/interfaces/test.d.ts +36 -0
- package/dist/interfaces/test.js +4 -0
- package/dist/services/auth.d.ts +54 -99
- package/dist/services/auth.js +76 -12
- package/dist/types/api-contracts.d.ts +211 -0
- package/dist/types/api-contracts.js +8 -0
- package/dist/types/compile.types.d.ts +76 -0
- package/dist/types/compile.types.js +4 -0
- package/dist/types/index.d.ts +23 -121
- package/dist/types/index.js +25 -14
- package/dist/types/skill.d.ts +142 -0
- package/dist/{skill.js → types/skill.js} +66 -17
- package/dist/types/tool-validation.d.ts +34 -0
- package/dist/types/tool-validation.js +42 -0
- package/dist/utils/auth-flows.d.ts +26 -0
- package/dist/utils/auth-flows.js +141 -0
- package/dist/utils/bundling.d.ts +36 -0
- package/dist/utils/bundling.js +137 -0
- package/dist/utils/compile.d.ts +37 -0
- package/dist/utils/compile.js +242 -0
- package/dist/utils/deploy-api.d.ts +26 -0
- package/dist/utils/deploy-api.js +53 -0
- package/dist/utils/deploy-helpers.d.ts +46 -0
- package/dist/utils/deploy-helpers.js +86 -0
- package/dist/utils/deployment.d.ts +25 -0
- package/dist/utils/deployment.js +161 -0
- package/dist/utils/dev-api.d.ts +61 -0
- package/dist/utils/dev-api.js +262 -0
- package/dist/utils/dev-helpers.d.ts +46 -0
- package/dist/utils/dev-helpers.js +83 -0
- package/dist/utils/dev-server.d.ts +24 -0
- package/dist/utils/dev-server.js +555 -0
- package/dist/utils/dev-watcher.d.ts +31 -0
- package/dist/utils/dev-watcher.js +110 -0
- package/dist/utils/files.js +0 -5
- package/dist/utils/init-agent.d.ts +34 -0
- package/dist/utils/init-agent.js +129 -0
- package/dist/utils/init-helpers.d.ts +41 -0
- package/dist/utils/init-helpers.js +73 -0
- package/dist/utils/init-prompts.d.ts +47 -0
- package/dist/utils/init-prompts.js +168 -0
- package/dist/utils/push-api.d.ts +15 -0
- package/dist/utils/push-api.js +48 -0
- package/dist/utils/push-helpers.d.ts +38 -0
- package/dist/utils/push-helpers.js +84 -0
- package/dist/utils/sandbox-storage.d.ts +27 -0
- package/dist/utils/sandbox-storage.js +71 -0
- package/dist/utils/sandbox.js +78 -114
- package/dist/utils/skill-management.d.ts +14 -0
- package/dist/utils/skill-management.js +148 -0
- package/dist/utils/test-helpers.d.ts +40 -0
- package/dist/utils/test-helpers.js +92 -0
- package/dist/utils/test-prompts.d.ts +23 -0
- package/dist/utils/test-prompts.js +186 -0
- package/dist/utils/tool-detection.d.ts +18 -0
- package/dist/utils/tool-detection.js +110 -0
- package/dist/web/app.css +941 -17
- package/dist/web/app.js +174 -22
- package/dist/web/index.html +7 -1
- package/package.json +13 -4
- package/template/QUICKSTART.md +299 -144
- package/template/README.md +928 -349
- package/template/TOOL_EXAMPLES.md +655 -0
- package/template/package-lock.json +5 -5
- package/template/package.json +1 -1
- package/template/src/index.ts +147 -207
- package/template/src/tools/BasketTool.ts +128 -0
- package/template/src/tools/CustomDataTool.ts +7 -13
- package/template/src/tools/OrderTool.ts +54 -0
- package/template/src/tools/PaymentTool.ts +1 -1
- package/template/src/tools/ProductsTool.ts +56 -118
- package/template/src/tools/UserDataTool.ts +4 -26
- package/dist/common/config.d.ts +0 -5
- package/dist/common/config.js +0 -5
- package/dist/custom-data-api.d.ts +0 -72
- package/dist/custom-data-api.js +0 -174
- package/dist/product-api.d.ts +0 -189
- package/dist/product-api.js +0 -141
- package/dist/services/api.d.ts +0 -549
- package/dist/services/api.js +0 -596
- package/dist/skill.d.ts +0 -50
- package/dist/types.d.ts +0 -1
- package/dist/types.js +0 -2
- package/dist/user-data-api.d.ts +0 -39
- package/dist/user-data-api.js +0 -50
- package/template/API.md +0 -604
- package/template/DEVELOPER.md +0 -771
- package/template/lua.skill.yaml +0 -7
package/dist/services/api.d.ts
DELETED
|
@@ -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
|
-
};
|