lua-cli 2.5.1 → 2.5.3
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/CHANGELOG.md +29 -0
- package/CLI_REFERENCE.md +90 -0
- package/INSTANCE_TYPES.md +1158 -0
- package/README.md +6 -0
- package/dist/api/agent.api.service.d.ts +52 -0
- package/dist/api/agent.api.service.js +63 -0
- package/dist/api/logs.api.service.d.ts +35 -0
- package/dist/api/logs.api.service.js +43 -0
- package/dist/api/products.api.service.js +2 -0
- package/dist/cli/command-definitions.js +17 -1
- package/dist/commands/admin.d.ts +23 -0
- package/dist/commands/admin.js +62 -0
- package/dist/commands/channels.d.ts +17 -0
- package/dist/commands/channels.js +676 -0
- package/dist/commands/docs.d.ts +19 -0
- package/dist/commands/docs.js +30 -0
- package/dist/commands/index.d.ts +4 -0
- package/dist/commands/index.js +4 -0
- package/dist/commands/logs.d.ts +17 -0
- package/dist/commands/logs.js +271 -0
- package/dist/common/basket.instance.d.ts +4 -1
- package/dist/common/basket.instance.js +76 -1
- package/dist/common/data.entry.instance.d.ts +4 -1
- package/dist/common/data.entry.instance.js +57 -1
- package/dist/common/http.client.js +11 -1
- package/dist/common/order.instance.d.ts +4 -1
- package/dist/common/order.instance.js +76 -1
- package/dist/common/product.instance.d.ts +4 -1
- package/dist/common/product.instance.js +57 -1
- package/dist/common/product.pagination.instance.d.ts +58 -0
- package/dist/common/product.pagination.instance.js +78 -0
- package/dist/common/product.search.instance.d.ts +58 -0
- package/dist/common/product.search.instance.js +78 -0
- package/dist/common/user.instance.d.ts +4 -12
- package/dist/common/user.instance.js +5 -24
- package/dist/index.js +3 -0
- package/dist/interfaces/agent.d.ts +218 -0
- package/dist/interfaces/logs.d.ts +40 -0
- package/dist/interfaces/logs.js +5 -0
- package/package.json +2 -1
- package/template/package.json +1 -1
|
@@ -89,3 +89,221 @@ export interface AgentDetailsResponse {
|
|
|
89
89
|
};
|
|
90
90
|
skills: any[];
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Agent channel configuration.
|
|
94
|
+
* Represents a communication channel connected to an agent.
|
|
95
|
+
*/
|
|
96
|
+
export interface AgentChannel {
|
|
97
|
+
type: string;
|
|
98
|
+
identifier: string;
|
|
99
|
+
createdAt: number;
|
|
100
|
+
whatsapp?: string;
|
|
101
|
+
facebook?: string;
|
|
102
|
+
instagram?: string;
|
|
103
|
+
data: Record<string, any>;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Channel link configuration for connecting new channels.
|
|
107
|
+
*/
|
|
108
|
+
export interface ChannelLink {
|
|
109
|
+
type: string;
|
|
110
|
+
method: string;
|
|
111
|
+
link: string;
|
|
112
|
+
data: string[];
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Response from get agent channels API.
|
|
116
|
+
*/
|
|
117
|
+
export interface AgentChannelsResponse {
|
|
118
|
+
channels: AgentChannel[];
|
|
119
|
+
links: ChannelLink[];
|
|
120
|
+
status: string;
|
|
121
|
+
message: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Request payload for creating a WhatsApp channel.
|
|
125
|
+
*/
|
|
126
|
+
export interface CreateWhatsAppChannelRequest {
|
|
127
|
+
type: "whatsapp";
|
|
128
|
+
whatsapp: {
|
|
129
|
+
phoneNumberId: string;
|
|
130
|
+
wabaId: string;
|
|
131
|
+
accessToken: string;
|
|
132
|
+
};
|
|
133
|
+
isManual: boolean;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Response from creating a WhatsApp channel.
|
|
137
|
+
*/
|
|
138
|
+
export interface CreateWhatsAppChannelResponse {
|
|
139
|
+
type: string;
|
|
140
|
+
identifier: string;
|
|
141
|
+
agentId: string;
|
|
142
|
+
userId: string;
|
|
143
|
+
whatsapp: {
|
|
144
|
+
number: string;
|
|
145
|
+
global: boolean;
|
|
146
|
+
phoneId: string;
|
|
147
|
+
accessToken: string;
|
|
148
|
+
metadata: {
|
|
149
|
+
id: string;
|
|
150
|
+
display_phone_number: string;
|
|
151
|
+
verified_name: string;
|
|
152
|
+
quality_rating: string;
|
|
153
|
+
status: string;
|
|
154
|
+
code_verification_status: string;
|
|
155
|
+
search_visibility: string;
|
|
156
|
+
platform_type: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
webhookUrl: string;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Request payload for creating a Facebook Messenger channel.
|
|
163
|
+
*/
|
|
164
|
+
export interface CreateFacebookChannelRequest {
|
|
165
|
+
type: "facebook";
|
|
166
|
+
facebook: {
|
|
167
|
+
accessToken: string;
|
|
168
|
+
pageId: string;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Response from creating a Facebook Messenger channel.
|
|
173
|
+
*/
|
|
174
|
+
export interface CreateFacebookChannelResponse {
|
|
175
|
+
type: string;
|
|
176
|
+
identifier: string;
|
|
177
|
+
agentId: string;
|
|
178
|
+
userId: string;
|
|
179
|
+
facebook: {
|
|
180
|
+
pageId: string;
|
|
181
|
+
id: string;
|
|
182
|
+
name: string;
|
|
183
|
+
category: string;
|
|
184
|
+
};
|
|
185
|
+
webhookUrl: string;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Request payload for creating a private Slack channel.
|
|
189
|
+
*/
|
|
190
|
+
export interface CreateSlackPrivateChannelRequest {
|
|
191
|
+
type: "slack";
|
|
192
|
+
slack: {
|
|
193
|
+
type: "private";
|
|
194
|
+
accessToken: string;
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Request payload for creating a public Slack channel.
|
|
199
|
+
*/
|
|
200
|
+
export interface CreateSlackPublicChannelRequest {
|
|
201
|
+
type: "slack";
|
|
202
|
+
slack: {
|
|
203
|
+
type: "public";
|
|
204
|
+
appId: string;
|
|
205
|
+
clientId: string;
|
|
206
|
+
clientSecret: string;
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Union type for creating any Slack channel (private or public).
|
|
211
|
+
*/
|
|
212
|
+
export type CreateSlackChannelRequest = CreateSlackPrivateChannelRequest | CreateSlackPublicChannelRequest;
|
|
213
|
+
/**
|
|
214
|
+
* Slack app manifest configuration (shared between private and public channels).
|
|
215
|
+
*/
|
|
216
|
+
export interface SlackManifest {
|
|
217
|
+
display_information: {
|
|
218
|
+
name: string;
|
|
219
|
+
description: string;
|
|
220
|
+
background_color: string;
|
|
221
|
+
long_description: string;
|
|
222
|
+
};
|
|
223
|
+
features: {
|
|
224
|
+
app_home: {
|
|
225
|
+
home_tab_enabled: boolean;
|
|
226
|
+
messages_tab_enabled: boolean;
|
|
227
|
+
messages_tab_read_only_enabled: boolean;
|
|
228
|
+
};
|
|
229
|
+
bot_user: {
|
|
230
|
+
display_name: string;
|
|
231
|
+
always_online: boolean;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
oauth_config: {
|
|
235
|
+
redirect_urls: string[];
|
|
236
|
+
scopes: {
|
|
237
|
+
bot: string[];
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
settings: {
|
|
241
|
+
event_subscriptions: {
|
|
242
|
+
request_url: string;
|
|
243
|
+
bot_events: string[];
|
|
244
|
+
};
|
|
245
|
+
interactivity: {
|
|
246
|
+
is_enabled: boolean;
|
|
247
|
+
request_url: string;
|
|
248
|
+
};
|
|
249
|
+
org_deploy_enabled: boolean;
|
|
250
|
+
socket_mode_enabled: boolean;
|
|
251
|
+
token_rotation_enabled: boolean;
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Response from creating a private Slack channel.
|
|
256
|
+
*/
|
|
257
|
+
export interface CreateSlackPrivateChannelResponse {
|
|
258
|
+
type: string;
|
|
259
|
+
agentId: string;
|
|
260
|
+
userId: string;
|
|
261
|
+
slack: {
|
|
262
|
+
type: string;
|
|
263
|
+
appId: string;
|
|
264
|
+
teamId: string;
|
|
265
|
+
accessToken: string;
|
|
266
|
+
replyTo: string[];
|
|
267
|
+
botId: string;
|
|
268
|
+
url: string;
|
|
269
|
+
botUserId: string;
|
|
270
|
+
botName: string;
|
|
271
|
+
botIcon: string;
|
|
272
|
+
manifest: SlackManifest;
|
|
273
|
+
};
|
|
274
|
+
webhookUrl: string;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Response from creating a public Slack channel.
|
|
278
|
+
*/
|
|
279
|
+
export interface CreateSlackPublicChannelResponse {
|
|
280
|
+
appId: string;
|
|
281
|
+
clientId: string;
|
|
282
|
+
clientSecret: string;
|
|
283
|
+
agentId: string;
|
|
284
|
+
userId: string;
|
|
285
|
+
redirectUri: string;
|
|
286
|
+
manifest: SlackManifest;
|
|
287
|
+
webhookUrl: string;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Union type for Slack channel creation responses (private or public).
|
|
291
|
+
*/
|
|
292
|
+
export type CreateSlackChannelResponse = CreateSlackPrivateChannelResponse | CreateSlackPublicChannelResponse;
|
|
293
|
+
/**
|
|
294
|
+
* Request payload for creating an Email channel.
|
|
295
|
+
*/
|
|
296
|
+
export interface CreateEmailChannelRequest {
|
|
297
|
+
type: "email";
|
|
298
|
+
email: {
|
|
299
|
+
name: string;
|
|
300
|
+
email: string;
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Response from creating an Email channel.
|
|
305
|
+
*/
|
|
306
|
+
export interface CreateEmailChannelResponse {
|
|
307
|
+
forwardTo: string;
|
|
308
|
+
status: string;
|
|
309
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs Interfaces
|
|
3
|
+
* Log viewing and pagination
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Log entry from the API
|
|
7
|
+
*/
|
|
8
|
+
export interface LogEntry {
|
|
9
|
+
_id: string;
|
|
10
|
+
id: string;
|
|
11
|
+
timestamp: string;
|
|
12
|
+
type: 'log' | 'metric';
|
|
13
|
+
subType: 'error' | 'debug' | 'info' | 'warn' | 'start' | 'complete';
|
|
14
|
+
message: string;
|
|
15
|
+
duration?: number;
|
|
16
|
+
metadata: {
|
|
17
|
+
toolId?: string;
|
|
18
|
+
userId?: string;
|
|
19
|
+
agentId?: string;
|
|
20
|
+
skillName?: string;
|
|
21
|
+
skillId?: string;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Logs API response
|
|
27
|
+
*/
|
|
28
|
+
export interface LogsResponse {
|
|
29
|
+
logs: LogEntry[];
|
|
30
|
+
pagination: {
|
|
31
|
+
currentPage: number;
|
|
32
|
+
totalPages: number;
|
|
33
|
+
totalCount: number;
|
|
34
|
+
limit: number;
|
|
35
|
+
hasNextPage: boolean;
|
|
36
|
+
hasPrevPage: boolean;
|
|
37
|
+
nextPage: number | null;
|
|
38
|
+
prevPage: number | null;
|
|
39
|
+
};
|
|
40
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lua-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"description": "Command-line interface for Lua AI platform - develop, test, and deploy LuaSkills with custom tools",
|
|
5
5
|
"readmeFilename": "README.md",
|
|
6
6
|
"main": "dist/api-exports.js",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"API_REFERENCE.md",
|
|
59
59
|
"TEMPLATE_GUIDE.md",
|
|
60
60
|
"USER_DATA_INSTANCE.md",
|
|
61
|
+
"INSTANCE_TYPES.md",
|
|
61
62
|
"CHANGELOG.md",
|
|
62
63
|
"LICENSE"
|
|
63
64
|
],
|