-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathservice.yml
414 lines (401 loc) · 13.1 KB
/
service.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
schema: kata.ai/schema/merapi/1.0
name: ${package.name}
version: ${package.version}
components:
# main
main: Main
# bot management
bot: bots/Bot
channel: bots/Channel
deployment: bots/Deployment
environment: bots/Environment
session: bots/Session
# Project managements
project: projects/Project
# user management
user: users/User
team: users/Team
# nlu management
nlu: nlus/Nlu
# helper
compile: scripts/Compile
helper: scripts/Helper
tester: scripts/Tester
# command deprecated
deprecated: deprecated/Deprecated
# api
api: api/Api
zaun: api/Zaun
config:
trackingId: "UA-131926842-1"
channels:
type:
- line
- slack
- generic
- fbmessenger
- telegram
- qiscus
- twitter
url:
line: https://api.line.me
telegram: https://api.telegram.org
fbmessenger: https://graph.facebook.com/v2.6/me/messages
slack: https://slack.com/api
qiscus: https://<appId>.qiscus.com
twitter: https://api.twitter.com
commands:
bot:
type: group
desc: Commands for bot management
subcommands:
init:
desc: Initialize new bot.yml file
args: "<name>"
params:
config:
type: string
desc: Parameter string
handler: bot.init
alias: init
revisions:
desc: Get list bot revision
handler: bot.revisions
alias: revisions
push:
desc: Push and update reversion bot
params:
tag:
type: string
desc: Tag version for deployment
handler: bot.push
alias: push
pull:
desc: Pull bot with specific revision
args: "[revision]"
handler: bot.pull
alias: pull
discard:
desc: Discard bot
params:
draft:
type: string
handler: bot.discard
alias: discard
console:
desc: Interactive command
params:
session:
type: string
desc: Session id to use in console
short: s
handler: bot.console
alias: console
errors:
desc: Get list error log
handler: bot.errors
alias: errors
deployment:
type: group
desc: Commands for deployment bot
subcommands:
create:
desc: Create a Deployment of the selected project
args: "[versionType]"
handler: deployment.create
alias: create-deployment
list:
desc: Get List deployment
handler: deployment.list
alias: list-deployment
rollback:
desc: Rollback deployment by bot version
args: "<version>"
handler: deployment.rollback
alias: rollback-deployment
environment:
type: group
desc: Commands for environment bot
subcommands:
create:
desc: Create an environment on the selected project
args: "<slug>"
handler: environment.create
alias: create-environment
list:
desc: List environments of the selected project
handler: environment.list
alias: list-environment
update:
desc: Update an environment of the selected project
args: "[newDeploymentVersion]"
handler: environment.update
alias: update-environment
channels:
type: group
desc: Commands for channel
subcommands:
create:
args: "<channelName>"
desc: Create a channel on the selected environment
params:
data:
type: json
desc: Channel json data
short: d
handler: channel.addChannel
alias: create-channel
list:
desc: Get list channels of the selected environment
handler: channel.list
alias: list-channel
delete:
desc: Delete a channel from the selected environment
args: "<channelName>"
handler: channel.removeChannel
alias: delete-channel
update:
desc: Update a channel from selected environment
args: "<channelName>"
params:
data:
type: json
desc: Channel json data
short: d
handler: channel.updateChannel
alias: update-channel
project:
type: group
desc: Commands for bot projects
subcommands:
create:
desc: Create a project
handler: project.create
alias: create-project
select:
desc: Select a project
handler: project.select
alias: select-project
list:
desc: Get list project
handler: project.list
alias: list-project
delete:
desc: Delete project by project id
args: "[projectName]"
handler: project.delete
alias: delete-project
update:
desc: Update project by project id
args: "[projectName]"
handler: project.update
alias: update-project
config:
type: group
desc: Command for config management
subcommands:
view:
desc: View config stored in .katajson file
handler: helper.viewConfig
alias: view-config
set:
type: command
desc: Command for set property value
args: "<prop> <value>"
handler: helper.setProp
user:
type: group
desc: Commands for user management
subcommands:
createUser:
desc: Create new user
args: "<username>"
params:
admin:
type: boolean
desc: Label admin
short: a
internal:
type: boolean
desc: Label internal
short: i
handler: user.createUser
alias: create-user
switch:
desc: Switch between team and user
args: "<type> [name]"
handler: user.switch
alias: switch
login:
desc: Login to kata
params:
user:
type: string
desc: Username login
short: u
password:
type: string
desc: Password login
short: p
token:
type: string
desc: Token login
short: t
handler: user.login
alias: login
logout:
desc: Logout from kata
handler: user.logout
alias: logout
forgotpassword:
desc: Forgot password
args: "<username>"
handler: user.forgot
alias: forgot-password
whoami:
desc: Identify current user
handler: user.whoami
alias: whoami
changePassword:
desc: Change current user password
handler: user.changePassword
alias: change-password
listTeam:
desc: Get list all team
handler: user.listTeam
alias: list-team
listTeamUser:
desc: Get list all team user
args: "[teamName]"
handler: user.listTeamUser
alias: list-team-user
createTeam:
desc: Create team
args: "<name>"
handler: user.createTeam
alias: create-team
inviteMember:
desc: Invite member to team
args: "<username>"
handler: team.addMember
params:
admin:
type: boolean
desc: Admin label for new member
short: a
alias: invite-member
impersonate:
desc: Impersonate as certain user
args: "<username>"
handler: user.impersonate
alias: impersonate
unimpersonate:
desc: Unimpersonate current user, set back to admin
handler: user.unimpersonate
alias: unimpersonate
nlu:
type: group
desc: Command for nlu management
subcommands:
pull:
desc: Pull nlu from server
handler: nlu.pull
alias: nl-pull
push:
desc: Create or update nlu
handler: nlu.push
alias: nl-push
init:
desc: Init nlu file
handler: nlu.pull
alias: nl-init
train:
desc: Train nlu
handler: nlu.train
params:
file:
type: string
desc: File path contain data training
short: f
sentence:
type: string
desc: String to train
short: s
alias: nl-train
predict:
desc: Predict NL
handler: nlu.predict
params:
file:
type: string
desc: File path contain data to predict
short: f
sentence:
type: string
desc: String to predict
short: s
nlu:
type: string
desc: NLU to use
short: nlu
alias: nl-predict
listProfiles:
desc: Get list default profiles
handler: nlu.listProfiles
alias: list-profiles
snapshot:
desc: Snapshot profiles
handler: nlu.snapshot
alias: nl-snapshot
listTraining:
desc: Get list training
handler: nlu.listTraining
params:
page:
type: number
desc: Number page
short: p
alias: nl-list-training
listPrediction:
desc: Get list prediction log
handler: nlu.listPrediction
params:
page:
type: number
desc: Number page
short: p
alias: nl-list-prediction
listRevision:
desc: Get list revision
handler: nlu.listRevision
alias: nl-list-revision
issueToken:
desc: Issue token
handler: nlu.issueToken
alias: nl-issue-token
detail:
desc: Get NL detail
handler: nlu.detail
alias: nl-detail
deprecated:
type: group
desc: Command for deprecated management
subcommands:
addChannel:
desc: This command is deprecated, please use create-channel
handler: deprecated.addChannel
alias: add-channel
removeChannel:
desc: This command is deprecated, please use delete-channel
handler: deprecated.removeChannel
alias: remove-channel
configView:
desc: This command is deprecated, please use view-config
handler: deprecated.configView
alias: config-view
addMember:
desc: This command is deprecated, please use invite-member
handler: deprecated.addMember
alias: add-member
# entry point
main: main