Support automation script testing and manual running

This commit is contained in:
Denis Arh
2019-08-23 13:49:36 +02:00
parent f66a9ce766
commit 751317d544
8 changed files with 286 additions and 85 deletions
+19 -6
View File
@@ -1500,15 +1500,28 @@
{
"name": "run",
"method": "POST",
"title": "Run a specific script or code at the backend. For testing and manual execution",
"path": "/run",
"title": "Run a specific script or code at the backend. Used for running script manually",
"path": "/{scriptID}/run",
"parameters": {
"path": [
{"type": "uint64", "name": "scriptID", "required": true}
],
"post": [
{"name": "moduleID", "type": "uint64", "title": "ModuleID to be used"},
{"name": "recordID", "type": "uint64", "title": "RecordID to be used (instead of record payload)"},
{"name": "record", "type": "json.RawMessage", "title": "Record payload to be used (instead of specific record when using recordID)"}
]
}
},
{
"name": "test",
"method": "POST",
"title": "Run source code in corredor. Used for testing",
"path": "/test",
"parameters": {
"post": [
{"name": "scriptID", "type": "uint64", "title": "Script ID (scripts with manual triggers)"},
{"name": "source", "type": "string", "title": "Script's source code (overrides scriptID parameter)"},
{"name": "source", "type": "string", "title": "Script's source code"},
{"name": "moduleID", "type": "uint64", "title": "Preload module and pass it to the automation script"},
{"name": "recordID", "type": "uint64", "title": "Preload record and pass it to the automation script"},
{"name": "module", "type": "json.RawMessage", "title": "Module to pass to the automation script"},
{"name": "record", "type": "json.RawMessage", "title": "Record to pass to the automation script"}
]
}
+32 -15
View File
@@ -244,18 +244,45 @@
{
"Name": "run",
"Method": "POST",
"Title": "Run a specific script or code at the backend. For testing and manual execution",
"Path": "/run",
"Title": "Run a specific script or code at the backend. Used for running script manually",
"Path": "/{scriptID}/run",
"Parameters": {
"post": [
"path": [
{
"name": "scriptID",
"title": "Script ID (scripts with manual triggers)",
"required": true,
"type": "uint64"
}
],
"post": [
{
"name": "moduleID",
"title": "ModuleID to be used",
"type": "uint64"
},
{
"name": "recordID",
"title": "RecordID to be used",
"type": "uint64"
},
{
"name": "record",
"title": "Record payload to be used (instead of specific record when using recordID)",
"type": "json.RawMessage"
}
]
}
},
{
"Name": "test",
"Method": "POST",
"Title": "Run source code in corredor. Used for testing",
"Path": "/test",
"Parameters": {
"post": [
{
"name": "source",
"title": "Script's source code (overrides scriptID parameter)",
"title": "Script's source code",
"type": "string"
},
{
@@ -263,16 +290,6 @@
"title": "Preload module and pass it to the automation script",
"type": "uint64"
},
{
"name": "recordID",
"title": "Preload record and pass it to the automation script",
"type": "uint64"
},
{
"name": "module",
"title": "Module to pass to the automation script",
"type": "json.RawMessage"
},
{
"name": "record",
"title": "Record to pass to the automation script",