OAPI: tweak the JS generator to do more what we want
This commit is contained in:
parent
2b1e6c54a8
commit
5e5fa57fa4
13
Makefile
13
Makefile
@ -67,25 +67,32 @@ generate-js:
|
|||||||
|
|
||||||
# See https://openapi-generator.tech/docs/generators/javascript for the options.
|
# See https://openapi-generator.tech/docs/generators/javascript for the options.
|
||||||
# Version '0.0.0' is used as NPM doesn't like Git hashes as versions.
|
# Version '0.0.0' is used as NPM doesn't like Git hashes as versions.
|
||||||
|
#
|
||||||
|
# -p modelPropertyNaming=original is needed because otherwise the generator will
|
||||||
|
# use original naming internally, but generate docs with camelCase, and then
|
||||||
|
# things don't work properly.
|
||||||
java -jar addon/openapi-generator-cli.jar \
|
java -jar addon/openapi-generator-cli.jar \
|
||||||
generate \
|
generate \
|
||||||
-i pkg/api/flamenco-manager.yaml \
|
-i pkg/api/flamenco-manager.yaml \
|
||||||
-g javascript \
|
-g javascript \
|
||||||
-o web/manager-api \
|
-o web/manager-api \
|
||||||
--http-user-agent "Flamenco/${VERSION} / webbrowser" \
|
--http-user-agent "Flamenco/${VERSION} / webbrowser" \
|
||||||
-p generateSourceCodeOnly=true \
|
|
||||||
-p projectName=flamenco-manager \
|
-p projectName=flamenco-manager \
|
||||||
-p projectVersion="0.0.0" \
|
-p projectVersion="0.0.0" \
|
||||||
-p apiPackage="${JS_API_PKG_NAME}" \
|
-p apiPackage="${JS_API_PKG_NAME}" \
|
||||||
-p disallowAdditionalPropertiesIfNotPresent=false \
|
-p disallowAdditionalPropertiesIfNotPresent=false \
|
||||||
-p usePromises=true \
|
-p usePromises=true \
|
||||||
-p moduleName=flamencoManager
|
-p moduleName=flamencoManager \
|
||||||
|
-p modelPropertyNaming=original
|
||||||
|
|
||||||
# The generator outputs files so that we can write our own tests. We don't,
|
# The generator outputs files so that we can write our own tests. We don't,
|
||||||
# though, so it's better to just remove those placeholders.
|
# though, so it's better to just remove those placeholders.
|
||||||
rm -rf web/manager-api/test
|
rm -rf web/manager-api/test
|
||||||
|
|
||||||
|
# Ensure that the API package can actually be imported by the webapp (if
|
||||||
|
# symlinks are in place).
|
||||||
|
cd web/manager-api && npm install && npm run build
|
||||||
|
|
||||||
version:
|
version:
|
||||||
@echo "OS : ${OS}"
|
@echo "OS : ${OS}"
|
||||||
@echo "Package: ${PKG}"
|
@echo "Package: ${PKG}"
|
||||||
|
@ -22,12 +22,16 @@ console.log("Flamenco API:", flamencoAPIURL);
|
|||||||
console.log("Websocket :", websocketURL);
|
console.log("Websocket :", websocketURL);
|
||||||
|
|
||||||
let flamencoManager = require('flamenco-manager');
|
let flamencoManager = require('flamenco-manager');
|
||||||
|
|
||||||
let apiClient = new flamencoManager.ApiClient(flamencoAPIURL);
|
let apiClient = new flamencoManager.ApiClient(flamencoAPIURL);
|
||||||
var api = new flamencoManager.JobsApi(apiClient);
|
|
||||||
var jobId = "07d134bc-0614-4477-9b1f-e238f0f0391a";
|
let query = new flamencoManager.JobsQuery();
|
||||||
api.fetchJob(jobId).then(function(data) {
|
// query.status_in = ["active"];
|
||||||
console.log('API called successfully. Returned data: ', data);
|
query.metadata = {project: "Heist"};
|
||||||
|
|
||||||
|
let JobsApi = new flamencoManager.JobsApi(apiClient);
|
||||||
|
JobsApi.queryJobs(query).then(function(data) {
|
||||||
|
console.log('API called successfully.');
|
||||||
|
console.log(data);
|
||||||
}, function(error) {
|
}, function(error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
|
@ -103,8 +103,8 @@ var flamencoManager = require('flamenco-manager');
|
|||||||
|
|
||||||
|
|
||||||
var api = new flamencoManager.JobsApi()
|
var api = new flamencoManager.JobsApi()
|
||||||
var jobId = "jobId_example"; // {String}
|
var job_id = "job_id_example"; // {String}
|
||||||
api.fetchJob(jobId).then(function(data) {
|
api.fetchJob(job_id).then(function(data) {
|
||||||
console.log('API called successfully. Returned data: ' + data);
|
console.log('API called successfully. Returned data: ' + data);
|
||||||
}, function(error) {
|
}, function(error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
@ -9,9 +9,9 @@ Name | Type | Description | Notes
|
|||||||
**name** | **String** | |
|
**name** | **String** | |
|
||||||
**status** | [**TaskStatus**](TaskStatus.md) | |
|
**status** | [**TaskStatus**](TaskStatus.md) | |
|
||||||
**priority** | **Number** | |
|
**priority** | **Number** | |
|
||||||
**jobPriority** | **Number** | |
|
**job_priority** | **Number** | |
|
||||||
**jobType** | **String** | |
|
**job_type** | **String** | |
|
||||||
**taskType** | **String** | |
|
**task_type** | **String** | |
|
||||||
**commands** | [**[Command]**](Command.md) | |
|
**commands** | [**[Command]**](Command.md) | |
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**jobTypes** | [**[AvailableJobType]**](AvailableJobType.md) | |
|
**job_types** | [**[AvailableJobType]**](AvailableJobType.md) | |
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
## fetchJob
|
## fetchJob
|
||||||
|
|
||||||
> Job fetchJob(jobId)
|
> Job fetchJob(job_id)
|
||||||
|
|
||||||
Fetch info about the job.
|
Fetch info about the job.
|
||||||
|
|
||||||
@ -23,8 +23,8 @@ Fetch info about the job.
|
|||||||
import flamencoManager from 'flamenco-manager';
|
import flamencoManager from 'flamenco-manager';
|
||||||
|
|
||||||
let apiInstance = new flamencoManager.JobsApi();
|
let apiInstance = new flamencoManager.JobsApi();
|
||||||
let jobId = "jobId_example"; // String |
|
let job_id = "job_id_example"; // String |
|
||||||
apiInstance.fetchJob(jobId).then((data) => {
|
apiInstance.fetchJob(job_id).then((data) => {
|
||||||
console.log('API called successfully. Returned data: ' + data);
|
console.log('API called successfully. Returned data: ' + data);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -37,7 +37,7 @@ apiInstance.fetchJob(jobId).then((data) => {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**jobId** | **String**| |
|
**job_id** | **String**| |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ No authorization required
|
|||||||
|
|
||||||
## queryJobs
|
## queryJobs
|
||||||
|
|
||||||
> JobsQueryResult queryJobs(jobsQuery)
|
> JobsQueryResult queryJobs(JobsQuery)
|
||||||
|
|
||||||
Fetch list of jobs.
|
Fetch list of jobs.
|
||||||
|
|
||||||
@ -103,8 +103,8 @@ Fetch list of jobs.
|
|||||||
import flamencoManager from 'flamenco-manager';
|
import flamencoManager from 'flamenco-manager';
|
||||||
|
|
||||||
let apiInstance = new flamencoManager.JobsApi();
|
let apiInstance = new flamencoManager.JobsApi();
|
||||||
let jobsQuery = new flamencoManager.JobsQuery(); // JobsQuery | Specification of which jobs to get.
|
let JobsQuery = new flamencoManager.JobsQuery(); // JobsQuery | Specification of which jobs to get.
|
||||||
apiInstance.queryJobs(jobsQuery).then((data) => {
|
apiInstance.queryJobs(JobsQuery).then((data) => {
|
||||||
console.log('API called successfully. Returned data: ' + data);
|
console.log('API called successfully. Returned data: ' + data);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -117,7 +117,7 @@ apiInstance.queryJobs(jobsQuery).then((data) => {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**jobsQuery** | [**JobsQuery**](JobsQuery.md)| Specification of which jobs to get. |
|
**JobsQuery** | [**JobsQuery**](JobsQuery.md)| Specification of which jobs to get. |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ No authorization required
|
|||||||
|
|
||||||
## submitJob
|
## submitJob
|
||||||
|
|
||||||
> Job submitJob(submittedJob)
|
> Job submitJob(SubmittedJob)
|
||||||
|
|
||||||
Submit a new job for Flamenco Manager to execute.
|
Submit a new job for Flamenco Manager to execute.
|
||||||
|
|
||||||
@ -145,8 +145,8 @@ Submit a new job for Flamenco Manager to execute.
|
|||||||
import flamencoManager from 'flamenco-manager';
|
import flamencoManager from 'flamenco-manager';
|
||||||
|
|
||||||
let apiInstance = new flamencoManager.JobsApi();
|
let apiInstance = new flamencoManager.JobsApi();
|
||||||
let submittedJob = new flamencoManager.SubmittedJob(); // SubmittedJob | Job to submit
|
let SubmittedJob = new flamencoManager.SubmittedJob(); // SubmittedJob | Job to submit
|
||||||
apiInstance.submitJob(submittedJob).then((data) => {
|
apiInstance.submitJob(SubmittedJob).then((data) => {
|
||||||
console.log('API called successfully. Returned data: ' + data);
|
console.log('API called successfully. Returned data: ' + data);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -159,7 +159,7 @@ apiInstance.submitJob(submittedJob).then((data) => {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**submittedJob** | [**SubmittedJob**](SubmittedJob.md)| Job to submit |
|
**SubmittedJob** | [**SubmittedJob**](SubmittedJob.md)| Job to submit |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**offset** | **Number** | | [optional]
|
**offset** | **Number** | | [optional]
|
||||||
**limit** | **Number** | | [optional]
|
**limit** | **Number** | | [optional]
|
||||||
**orderBy** | **[String]** | | [optional]
|
**order_by** | **[String]** | | [optional]
|
||||||
**statusIn** | [**[JobStatus]**](JobStatus.md) | Return only jobs with a status in this array. | [optional]
|
**status_in** | [**[JobStatus]**](JobStatus.md) | Return only jobs with a status in this array. | [optional]
|
||||||
**metadata** | **{String: String}** | Filter by metadata, using `LIKE` notation. | [optional]
|
**metadata** | **{String: String}** | Filter by metadata, using `LIKE` notation. | [optional]
|
||||||
**settings** | **{String: Object}** | Filter by job settings, using `LIKE` notation. | [optional]
|
**settings** | **{String: Object}** | Filter by job settings, using `LIKE` notation. | [optional]
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ Name | Type | Description | Notes
|
|||||||
**address** | **String** | |
|
**address** | **String** | |
|
||||||
**status** | [**WorkerStatus**](WorkerStatus.md) | |
|
**status** | [**WorkerStatus**](WorkerStatus.md) | |
|
||||||
**platform** | **String** | |
|
**platform** | **String** | |
|
||||||
**lastActivity** | **String** | |
|
**last_activity** | **String** | |
|
||||||
**software** | **String** | |
|
**software** | **String** | |
|
||||||
**supportedTaskTypes** | **[String]** | |
|
**supported_task_types** | **[String]** | |
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
## shamanCheckout
|
## shamanCheckout
|
||||||
|
|
||||||
> ShamanCheckoutResult shamanCheckout(shamanCheckout)
|
> ShamanCheckoutResult shamanCheckout(ShamanCheckout)
|
||||||
|
|
||||||
Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
|
Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
|
||||||
|
|
||||||
@ -23,8 +23,8 @@ Create a directory, and symlink the required files into it. The files must all h
|
|||||||
import flamencoManager from 'flamenco-manager';
|
import flamencoManager from 'flamenco-manager';
|
||||||
|
|
||||||
let apiInstance = new flamencoManager.ShamanApi();
|
let apiInstance = new flamencoManager.ShamanApi();
|
||||||
let shamanCheckout = new flamencoManager.ShamanCheckout(); // ShamanCheckout | Set of files to check out.
|
let ShamanCheckout = new flamencoManager.ShamanCheckout(); // ShamanCheckout | Set of files to check out.
|
||||||
apiInstance.shamanCheckout(shamanCheckout).then((data) => {
|
apiInstance.shamanCheckout(ShamanCheckout).then((data) => {
|
||||||
console.log('API called successfully. Returned data: ' + data);
|
console.log('API called successfully. Returned data: ' + data);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -37,7 +37,7 @@ apiInstance.shamanCheckout(shamanCheckout).then((data) => {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**shamanCheckout** | [**ShamanCheckout**](ShamanCheckout.md)| Set of files to check out. |
|
**ShamanCheckout** | [**ShamanCheckout**](ShamanCheckout.md)| Set of files to check out. |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ No authorization required
|
|||||||
|
|
||||||
## shamanCheckoutRequirements
|
## shamanCheckoutRequirements
|
||||||
|
|
||||||
> ShamanRequirementsResponse shamanCheckoutRequirements(shamanRequirementsRequest)
|
> ShamanRequirementsResponse shamanCheckoutRequirements(ShamanRequirementsRequest)
|
||||||
|
|
||||||
Checks a Shaman Requirements file, and reports which files are unknown.
|
Checks a Shaman Requirements file, and reports which files are unknown.
|
||||||
|
|
||||||
@ -65,8 +65,8 @@ Checks a Shaman Requirements file, and reports which files are unknown.
|
|||||||
import flamencoManager from 'flamenco-manager';
|
import flamencoManager from 'flamenco-manager';
|
||||||
|
|
||||||
let apiInstance = new flamencoManager.ShamanApi();
|
let apiInstance = new flamencoManager.ShamanApi();
|
||||||
let shamanRequirementsRequest = new flamencoManager.ShamanRequirementsRequest(); // ShamanRequirementsRequest | Set of files to check
|
let ShamanRequirementsRequest = new flamencoManager.ShamanRequirementsRequest(); // ShamanRequirementsRequest | Set of files to check
|
||||||
apiInstance.shamanCheckoutRequirements(shamanRequirementsRequest).then((data) => {
|
apiInstance.shamanCheckoutRequirements(ShamanRequirementsRequest).then((data) => {
|
||||||
console.log('API called successfully. Returned data: ' + data);
|
console.log('API called successfully. Returned data: ' + data);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -79,7 +79,7 @@ apiInstance.shamanCheckoutRequirements(shamanRequirementsRequest).then((data) =>
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**shamanRequirementsRequest** | [**ShamanRequirementsRequest**](ShamanRequirementsRequest.md)| Set of files to check |
|
**ShamanRequirementsRequest** | [**ShamanRequirementsRequest**](ShamanRequirementsRequest.md)| Set of files to check |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -111,8 +111,8 @@ let checksum = "checksum_example"; // String | SHA256 checksum of the file.
|
|||||||
let filesize = 56; // Number | Size of the file in bytes.
|
let filesize = 56; // Number | Size of the file in bytes.
|
||||||
let body = "/path/to/file"; // File | Contents of the file
|
let body = "/path/to/file"; // File | Contents of the file
|
||||||
let opts = {
|
let opts = {
|
||||||
'xShamanCanDeferUpload': true, // Boolean | The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file.
|
'X_Shaman_Can_Defer_Upload': true, // Boolean | The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file.
|
||||||
'xShamanOriginalFilename': "xShamanOriginalFilename_example" // String | The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging.
|
'X_Shaman_Original_Filename': "X_Shaman_Original_Filename_example" // String | The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging.
|
||||||
};
|
};
|
||||||
apiInstance.shamanFileStore(checksum, filesize, body, opts).then(() => {
|
apiInstance.shamanFileStore(checksum, filesize, body, opts).then(() => {
|
||||||
console.log('API called successfully.');
|
console.log('API called successfully.');
|
||||||
@ -130,8 +130,8 @@ Name | Type | Description | Notes
|
|||||||
**checksum** | **String**| SHA256 checksum of the file. |
|
**checksum** | **String**| SHA256 checksum of the file. |
|
||||||
**filesize** | **Number**| Size of the file in bytes. |
|
**filesize** | **Number**| Size of the file in bytes. |
|
||||||
**body** | **File**| Contents of the file |
|
**body** | **File**| Contents of the file |
|
||||||
**xShamanCanDeferUpload** | **Boolean**| The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file. | [optional]
|
**X_Shaman_Can_Defer_Upload** | **Boolean**| The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file. | [optional]
|
||||||
**xShamanOriginalFilename** | **String**| The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging. | [optional]
|
**X_Shaman_Original_Filename** | **String**| The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging. | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
## registerWorker
|
## registerWorker
|
||||||
|
|
||||||
> RegisteredWorker registerWorker(workerRegistration)
|
> RegisteredWorker registerWorker(WorkerRegistration)
|
||||||
|
|
||||||
Register a new worker
|
Register a new worker
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ Register a new worker
|
|||||||
import flamencoManager from 'flamenco-manager';
|
import flamencoManager from 'flamenco-manager';
|
||||||
|
|
||||||
let apiInstance = new flamencoManager.WorkerApi();
|
let apiInstance = new flamencoManager.WorkerApi();
|
||||||
let workerRegistration = new flamencoManager.WorkerRegistration(); // WorkerRegistration | Worker to register
|
let WorkerRegistration = new flamencoManager.WorkerRegistration(); // WorkerRegistration | Worker to register
|
||||||
apiInstance.registerWorker(workerRegistration).then((data) => {
|
apiInstance.registerWorker(WorkerRegistration).then((data) => {
|
||||||
console.log('API called successfully. Returned data: ' + data);
|
console.log('API called successfully. Returned data: ' + data);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -40,7 +40,7 @@ apiInstance.registerWorker(workerRegistration).then((data) => {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**workerRegistration** | [**WorkerRegistration**](WorkerRegistration.md)| Worker to register |
|
**WorkerRegistration** | [**WorkerRegistration**](WorkerRegistration.md)| Worker to register |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ null (empty response body)
|
|||||||
|
|
||||||
## signOn
|
## signOn
|
||||||
|
|
||||||
> WorkerStateChange signOn(workerSignOn)
|
> WorkerStateChange signOn(WorkerSignOn)
|
||||||
|
|
||||||
Authenticate & sign in the worker.
|
Authenticate & sign in the worker.
|
||||||
|
|
||||||
@ -159,8 +159,8 @@ worker_auth.username = 'YOUR USERNAME';
|
|||||||
worker_auth.password = 'YOUR PASSWORD';
|
worker_auth.password = 'YOUR PASSWORD';
|
||||||
|
|
||||||
let apiInstance = new flamencoManager.WorkerApi();
|
let apiInstance = new flamencoManager.WorkerApi();
|
||||||
let workerSignOn = new flamencoManager.WorkerSignOn(); // WorkerSignOn | Worker metadata
|
let WorkerSignOn = new flamencoManager.WorkerSignOn(); // WorkerSignOn | Worker metadata
|
||||||
apiInstance.signOn(workerSignOn).then((data) => {
|
apiInstance.signOn(WorkerSignOn).then((data) => {
|
||||||
console.log('API called successfully. Returned data: ' + data);
|
console.log('API called successfully. Returned data: ' + data);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -173,7 +173,7 @@ apiInstance.signOn(workerSignOn).then((data) => {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**workerSignOn** | [**WorkerSignOn**](WorkerSignOn.md)| Worker metadata |
|
**WorkerSignOn** | [**WorkerSignOn**](WorkerSignOn.md)| Worker metadata |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
## taskUpdate
|
## taskUpdate
|
||||||
|
|
||||||
> taskUpdate(taskId, taskUpdate)
|
> taskUpdate(task_id, TaskUpdate)
|
||||||
|
|
||||||
Update the task, typically to indicate progress, completion, or failure.
|
Update the task, typically to indicate progress, completion, or failure.
|
||||||
|
|
||||||
@ -206,9 +206,9 @@ worker_auth.username = 'YOUR USERNAME';
|
|||||||
worker_auth.password = 'YOUR PASSWORD';
|
worker_auth.password = 'YOUR PASSWORD';
|
||||||
|
|
||||||
let apiInstance = new flamencoManager.WorkerApi();
|
let apiInstance = new flamencoManager.WorkerApi();
|
||||||
let taskId = "taskId_example"; // String |
|
let task_id = "task_id_example"; // String |
|
||||||
let taskUpdate = new flamencoManager.TaskUpdate(); // TaskUpdate | Task update information
|
let TaskUpdate = new flamencoManager.TaskUpdate(); // TaskUpdate | Task update information
|
||||||
apiInstance.taskUpdate(taskId, taskUpdate).then(() => {
|
apiInstance.taskUpdate(task_id, TaskUpdate).then(() => {
|
||||||
console.log('API called successfully.');
|
console.log('API called successfully.');
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -221,8 +221,8 @@ apiInstance.taskUpdate(taskId, taskUpdate).then(() => {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**taskId** | **String**| |
|
**task_id** | **String**| |
|
||||||
**taskUpdate** | [**TaskUpdate**](TaskUpdate.md)| Task update information |
|
**TaskUpdate** | [**TaskUpdate**](TaskUpdate.md)| Task update information |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ This endpoint does not need any parameter.
|
|||||||
|
|
||||||
## workerStateChanged
|
## workerStateChanged
|
||||||
|
|
||||||
> workerStateChanged(workerStateChanged)
|
> workerStateChanged(WorkerStateChanged)
|
||||||
|
|
||||||
Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
|
Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
|
||||||
|
|
||||||
@ -298,8 +298,8 @@ worker_auth.username = 'YOUR USERNAME';
|
|||||||
worker_auth.password = 'YOUR PASSWORD';
|
worker_auth.password = 'YOUR PASSWORD';
|
||||||
|
|
||||||
let apiInstance = new flamencoManager.WorkerApi();
|
let apiInstance = new flamencoManager.WorkerApi();
|
||||||
let workerStateChanged = new flamencoManager.WorkerStateChanged(); // WorkerStateChanged | New worker state
|
let WorkerStateChanged = new flamencoManager.WorkerStateChanged(); // WorkerStateChanged | New worker state
|
||||||
apiInstance.workerStateChanged(workerStateChanged).then(() => {
|
apiInstance.workerStateChanged(WorkerStateChanged).then(() => {
|
||||||
console.log('API called successfully.');
|
console.log('API called successfully.');
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -312,7 +312,7 @@ apiInstance.workerStateChanged(workerStateChanged).then(() => {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**workerStateChanged** | [**WorkerStateChanged**](WorkerStateChanged.md)| New worker state |
|
**WorkerStateChanged** | [**WorkerStateChanged**](WorkerStateChanged.md)| New worker state |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**secret** | **String** | |
|
**secret** | **String** | |
|
||||||
**platform** | **String** | |
|
**platform** | **String** | |
|
||||||
**supportedTaskTypes** | **[String]** | |
|
**supported_task_types** | **[String]** | |
|
||||||
**nickname** | **String** | |
|
**nickname** | **String** | |
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**nickname** | **String** | |
|
**nickname** | **String** | |
|
||||||
**supportedTaskTypes** | **[String]** | |
|
**supported_task_types** | **[String]** | |
|
||||||
**softwareVersion** | **String** | |
|
**software_version** | **String** | |
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**statusRequested** | [**WorkerStatus**](WorkerStatus.md) | |
|
**status_requested** | [**WorkerStatus**](WorkerStatus.md) | |
|
||||||
|
|
||||||
|
|
||||||
|
7175
web/manager-api/package-lock.json
generated
Normal file
7175
web/manager-api/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,7 @@ class ApiClient {
|
|||||||
* @default {}
|
* @default {}
|
||||||
*/
|
*/
|
||||||
this.defaultHeaders = {
|
this.defaultHeaders = {
|
||||||
'User-Agent': 'Flamenco/781f1d93-dirty / webbrowser'
|
'User-Agent': 'Flamenco/c00cf8b0-dirty / webbrowser'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,18 +42,18 @@ export default class JobsApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch info about the job.
|
* Fetch info about the job.
|
||||||
* @param {String} jobId
|
* @param {String} job_id
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Job} and HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Job} and HTTP response
|
||||||
*/
|
*/
|
||||||
fetchJobWithHttpInfo(jobId) {
|
fetchJobWithHttpInfo(job_id) {
|
||||||
let postBody = null;
|
let postBody = null;
|
||||||
// verify the required parameter 'jobId' is set
|
// verify the required parameter 'job_id' is set
|
||||||
if (jobId === undefined || jobId === null) {
|
if (job_id === undefined || job_id === null) {
|
||||||
throw new Error("Missing the required parameter 'jobId' when calling fetchJob");
|
throw new Error("Missing the required parameter 'job_id' when calling fetchJob");
|
||||||
}
|
}
|
||||||
|
|
||||||
let pathParams = {
|
let pathParams = {
|
||||||
'job_id': jobId
|
'job_id': job_id
|
||||||
};
|
};
|
||||||
let queryParams = {
|
let queryParams = {
|
||||||
};
|
};
|
||||||
@ -75,11 +75,11 @@ export default class JobsApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch info about the job.
|
* Fetch info about the job.
|
||||||
* @param {String} jobId
|
* @param {String} job_id
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job}
|
||||||
*/
|
*/
|
||||||
fetchJob(jobId) {
|
fetchJob(job_id) {
|
||||||
return this.fetchJobWithHttpInfo(jobId)
|
return this.fetchJobWithHttpInfo(job_id)
|
||||||
.then(function(response_and_data) {
|
.then(function(response_and_data) {
|
||||||
return response_and_data.data;
|
return response_and_data.data;
|
||||||
});
|
});
|
||||||
@ -127,14 +127,14 @@ export default class JobsApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch list of jobs.
|
* Fetch list of jobs.
|
||||||
* @param {module:model/JobsQuery} jobsQuery Specification of which jobs to get.
|
* @param {module:model/JobsQuery} JobsQuery Specification of which jobs to get.
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/JobsQueryResult} and HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/JobsQueryResult} and HTTP response
|
||||||
*/
|
*/
|
||||||
queryJobsWithHttpInfo(jobsQuery) {
|
queryJobsWithHttpInfo(JobsQuery) {
|
||||||
let postBody = jobsQuery;
|
let postBody = JobsQuery;
|
||||||
// verify the required parameter 'jobsQuery' is set
|
// verify the required parameter 'JobsQuery' is set
|
||||||
if (jobsQuery === undefined || jobsQuery === null) {
|
if (JobsQuery === undefined || JobsQuery === null) {
|
||||||
throw new Error("Missing the required parameter 'jobsQuery' when calling queryJobs");
|
throw new Error("Missing the required parameter 'JobsQuery' when calling queryJobs");
|
||||||
}
|
}
|
||||||
|
|
||||||
let pathParams = {
|
let pathParams = {
|
||||||
@ -159,11 +159,11 @@ export default class JobsApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch list of jobs.
|
* Fetch list of jobs.
|
||||||
* @param {module:model/JobsQuery} jobsQuery Specification of which jobs to get.
|
* @param {module:model/JobsQuery} JobsQuery Specification of which jobs to get.
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/JobsQueryResult}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/JobsQueryResult}
|
||||||
*/
|
*/
|
||||||
queryJobs(jobsQuery) {
|
queryJobs(JobsQuery) {
|
||||||
return this.queryJobsWithHttpInfo(jobsQuery)
|
return this.queryJobsWithHttpInfo(JobsQuery)
|
||||||
.then(function(response_and_data) {
|
.then(function(response_and_data) {
|
||||||
return response_and_data.data;
|
return response_and_data.data;
|
||||||
});
|
});
|
||||||
@ -172,14 +172,14 @@ export default class JobsApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Submit a new job for Flamenco Manager to execute.
|
* Submit a new job for Flamenco Manager to execute.
|
||||||
* @param {module:model/SubmittedJob} submittedJob Job to submit
|
* @param {module:model/SubmittedJob} SubmittedJob Job to submit
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Job} and HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Job} and HTTP response
|
||||||
*/
|
*/
|
||||||
submitJobWithHttpInfo(submittedJob) {
|
submitJobWithHttpInfo(SubmittedJob) {
|
||||||
let postBody = submittedJob;
|
let postBody = SubmittedJob;
|
||||||
// verify the required parameter 'submittedJob' is set
|
// verify the required parameter 'SubmittedJob' is set
|
||||||
if (submittedJob === undefined || submittedJob === null) {
|
if (SubmittedJob === undefined || SubmittedJob === null) {
|
||||||
throw new Error("Missing the required parameter 'submittedJob' when calling submitJob");
|
throw new Error("Missing the required parameter 'SubmittedJob' when calling submitJob");
|
||||||
}
|
}
|
||||||
|
|
||||||
let pathParams = {
|
let pathParams = {
|
||||||
@ -204,11 +204,11 @@ export default class JobsApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Submit a new job for Flamenco Manager to execute.
|
* Submit a new job for Flamenco Manager to execute.
|
||||||
* @param {module:model/SubmittedJob} submittedJob Job to submit
|
* @param {module:model/SubmittedJob} SubmittedJob Job to submit
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job}
|
||||||
*/
|
*/
|
||||||
submitJob(submittedJob) {
|
submitJob(SubmittedJob) {
|
||||||
return this.submitJobWithHttpInfo(submittedJob)
|
return this.submitJobWithHttpInfo(SubmittedJob)
|
||||||
.then(function(response_and_data) {
|
.then(function(response_and_data) {
|
||||||
return response_and_data.data;
|
return response_and_data.data;
|
||||||
});
|
});
|
||||||
|
@ -42,14 +42,14 @@ export default class ShamanApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
|
* Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
|
||||||
* @param {module:model/ShamanCheckout} shamanCheckout Set of files to check out.
|
* @param {module:model/ShamanCheckout} ShamanCheckout Set of files to check out.
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShamanCheckoutResult} and HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShamanCheckoutResult} and HTTP response
|
||||||
*/
|
*/
|
||||||
shamanCheckoutWithHttpInfo(shamanCheckout) {
|
shamanCheckoutWithHttpInfo(ShamanCheckout) {
|
||||||
let postBody = shamanCheckout;
|
let postBody = ShamanCheckout;
|
||||||
// verify the required parameter 'shamanCheckout' is set
|
// verify the required parameter 'ShamanCheckout' is set
|
||||||
if (shamanCheckout === undefined || shamanCheckout === null) {
|
if (ShamanCheckout === undefined || ShamanCheckout === null) {
|
||||||
throw new Error("Missing the required parameter 'shamanCheckout' when calling shamanCheckout");
|
throw new Error("Missing the required parameter 'ShamanCheckout' when calling shamanCheckout");
|
||||||
}
|
}
|
||||||
|
|
||||||
let pathParams = {
|
let pathParams = {
|
||||||
@ -74,11 +74,11 @@ export default class ShamanApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
|
* Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
|
||||||
* @param {module:model/ShamanCheckout} shamanCheckout Set of files to check out.
|
* @param {module:model/ShamanCheckout} ShamanCheckout Set of files to check out.
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShamanCheckoutResult}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShamanCheckoutResult}
|
||||||
*/
|
*/
|
||||||
shamanCheckout(shamanCheckout) {
|
shamanCheckout(ShamanCheckout) {
|
||||||
return this.shamanCheckoutWithHttpInfo(shamanCheckout)
|
return this.shamanCheckoutWithHttpInfo(ShamanCheckout)
|
||||||
.then(function(response_and_data) {
|
.then(function(response_and_data) {
|
||||||
return response_and_data.data;
|
return response_and_data.data;
|
||||||
});
|
});
|
||||||
@ -87,14 +87,14 @@ export default class ShamanApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks a Shaman Requirements file, and reports which files are unknown.
|
* Checks a Shaman Requirements file, and reports which files are unknown.
|
||||||
* @param {module:model/ShamanRequirementsRequest} shamanRequirementsRequest Set of files to check
|
* @param {module:model/ShamanRequirementsRequest} ShamanRequirementsRequest Set of files to check
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShamanRequirementsResponse} and HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShamanRequirementsResponse} and HTTP response
|
||||||
*/
|
*/
|
||||||
shamanCheckoutRequirementsWithHttpInfo(shamanRequirementsRequest) {
|
shamanCheckoutRequirementsWithHttpInfo(ShamanRequirementsRequest) {
|
||||||
let postBody = shamanRequirementsRequest;
|
let postBody = ShamanRequirementsRequest;
|
||||||
// verify the required parameter 'shamanRequirementsRequest' is set
|
// verify the required parameter 'ShamanRequirementsRequest' is set
|
||||||
if (shamanRequirementsRequest === undefined || shamanRequirementsRequest === null) {
|
if (ShamanRequirementsRequest === undefined || ShamanRequirementsRequest === null) {
|
||||||
throw new Error("Missing the required parameter 'shamanRequirementsRequest' when calling shamanCheckoutRequirements");
|
throw new Error("Missing the required parameter 'ShamanRequirementsRequest' when calling shamanCheckoutRequirements");
|
||||||
}
|
}
|
||||||
|
|
||||||
let pathParams = {
|
let pathParams = {
|
||||||
@ -119,11 +119,11 @@ export default class ShamanApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks a Shaman Requirements file, and reports which files are unknown.
|
* Checks a Shaman Requirements file, and reports which files are unknown.
|
||||||
* @param {module:model/ShamanRequirementsRequest} shamanRequirementsRequest Set of files to check
|
* @param {module:model/ShamanRequirementsRequest} ShamanRequirementsRequest Set of files to check
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShamanRequirementsResponse}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShamanRequirementsResponse}
|
||||||
*/
|
*/
|
||||||
shamanCheckoutRequirements(shamanRequirementsRequest) {
|
shamanCheckoutRequirements(ShamanRequirementsRequest) {
|
||||||
return this.shamanCheckoutRequirementsWithHttpInfo(shamanRequirementsRequest)
|
return this.shamanCheckoutRequirementsWithHttpInfo(ShamanRequirementsRequest)
|
||||||
.then(function(response_and_data) {
|
.then(function(response_and_data) {
|
||||||
return response_and_data.data;
|
return response_and_data.data;
|
||||||
});
|
});
|
||||||
@ -136,8 +136,8 @@ export default class ShamanApi {
|
|||||||
* @param {Number} filesize Size of the file in bytes.
|
* @param {Number} filesize Size of the file in bytes.
|
||||||
* @param {File} body Contents of the file
|
* @param {File} body Contents of the file
|
||||||
* @param {Object} opts Optional parameters
|
* @param {Object} opts Optional parameters
|
||||||
* @param {Boolean} opts.xShamanCanDeferUpload The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file.
|
* @param {Boolean} opts.X_Shaman_Can_Defer_Upload The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file.
|
||||||
* @param {String} opts.xShamanOriginalFilename The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging.
|
* @param {String} opts.X_Shaman_Original_Filename The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging.
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||||
*/
|
*/
|
||||||
shamanFileStoreWithHttpInfo(checksum, filesize, body, opts) {
|
shamanFileStoreWithHttpInfo(checksum, filesize, body, opts) {
|
||||||
@ -163,8 +163,8 @@ export default class ShamanApi {
|
|||||||
let queryParams = {
|
let queryParams = {
|
||||||
};
|
};
|
||||||
let headerParams = {
|
let headerParams = {
|
||||||
'X-Shaman-Can-Defer-Upload': opts['xShamanCanDeferUpload'],
|
'X-Shaman-Can-Defer-Upload': opts['X_Shaman_Can_Defer_Upload'],
|
||||||
'X-Shaman-Original-Filename': opts['xShamanOriginalFilename']
|
'X-Shaman-Original-Filename': opts['X_Shaman_Original_Filename']
|
||||||
};
|
};
|
||||||
let formParams = {
|
let formParams = {
|
||||||
};
|
};
|
||||||
@ -186,8 +186,8 @@ export default class ShamanApi {
|
|||||||
* @param {Number} filesize Size of the file in bytes.
|
* @param {Number} filesize Size of the file in bytes.
|
||||||
* @param {File} body Contents of the file
|
* @param {File} body Contents of the file
|
||||||
* @param {Object} opts Optional parameters
|
* @param {Object} opts Optional parameters
|
||||||
* @param {Boolean} opts.xShamanCanDeferUpload The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file.
|
* @param {Boolean} opts.X_Shaman_Can_Defer_Upload The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file.
|
||||||
* @param {String} opts.xShamanOriginalFilename The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging.
|
* @param {String} opts.X_Shaman_Original_Filename The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging.
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||||
*/
|
*/
|
||||||
shamanFileStore(checksum, filesize, body, opts) {
|
shamanFileStore(checksum, filesize, body, opts) {
|
||||||
|
@ -45,14 +45,14 @@ export default class WorkerApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a new worker
|
* Register a new worker
|
||||||
* @param {module:model/WorkerRegistration} workerRegistration Worker to register
|
* @param {module:model/WorkerRegistration} WorkerRegistration Worker to register
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RegisteredWorker} and HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RegisteredWorker} and HTTP response
|
||||||
*/
|
*/
|
||||||
registerWorkerWithHttpInfo(workerRegistration) {
|
registerWorkerWithHttpInfo(WorkerRegistration) {
|
||||||
let postBody = workerRegistration;
|
let postBody = WorkerRegistration;
|
||||||
// verify the required parameter 'workerRegistration' is set
|
// verify the required parameter 'WorkerRegistration' is set
|
||||||
if (workerRegistration === undefined || workerRegistration === null) {
|
if (WorkerRegistration === undefined || WorkerRegistration === null) {
|
||||||
throw new Error("Missing the required parameter 'workerRegistration' when calling registerWorker");
|
throw new Error("Missing the required parameter 'WorkerRegistration' when calling registerWorker");
|
||||||
}
|
}
|
||||||
|
|
||||||
let pathParams = {
|
let pathParams = {
|
||||||
@ -77,11 +77,11 @@ export default class WorkerApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a new worker
|
* Register a new worker
|
||||||
* @param {module:model/WorkerRegistration} workerRegistration Worker to register
|
* @param {module:model/WorkerRegistration} WorkerRegistration Worker to register
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RegisteredWorker}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RegisteredWorker}
|
||||||
*/
|
*/
|
||||||
registerWorker(workerRegistration) {
|
registerWorker(WorkerRegistration) {
|
||||||
return this.registerWorkerWithHttpInfo(workerRegistration)
|
return this.registerWorkerWithHttpInfo(WorkerRegistration)
|
||||||
.then(function(response_and_data) {
|
.then(function(response_and_data) {
|
||||||
return response_and_data.data;
|
return response_and_data.data;
|
||||||
});
|
});
|
||||||
@ -168,14 +168,14 @@ export default class WorkerApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Authenticate & sign in the worker.
|
* Authenticate & sign in the worker.
|
||||||
* @param {module:model/WorkerSignOn} workerSignOn Worker metadata
|
* @param {module:model/WorkerSignOn} WorkerSignOn Worker metadata
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WorkerStateChange} and HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WorkerStateChange} and HTTP response
|
||||||
*/
|
*/
|
||||||
signOnWithHttpInfo(workerSignOn) {
|
signOnWithHttpInfo(WorkerSignOn) {
|
||||||
let postBody = workerSignOn;
|
let postBody = WorkerSignOn;
|
||||||
// verify the required parameter 'workerSignOn' is set
|
// verify the required parameter 'WorkerSignOn' is set
|
||||||
if (workerSignOn === undefined || workerSignOn === null) {
|
if (WorkerSignOn === undefined || WorkerSignOn === null) {
|
||||||
throw new Error("Missing the required parameter 'workerSignOn' when calling signOn");
|
throw new Error("Missing the required parameter 'WorkerSignOn' when calling signOn");
|
||||||
}
|
}
|
||||||
|
|
||||||
let pathParams = {
|
let pathParams = {
|
||||||
@ -200,11 +200,11 @@ export default class WorkerApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Authenticate & sign in the worker.
|
* Authenticate & sign in the worker.
|
||||||
* @param {module:model/WorkerSignOn} workerSignOn Worker metadata
|
* @param {module:model/WorkerSignOn} WorkerSignOn Worker metadata
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WorkerStateChange}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WorkerStateChange}
|
||||||
*/
|
*/
|
||||||
signOn(workerSignOn) {
|
signOn(WorkerSignOn) {
|
||||||
return this.signOnWithHttpInfo(workerSignOn)
|
return this.signOnWithHttpInfo(WorkerSignOn)
|
||||||
.then(function(response_and_data) {
|
.then(function(response_and_data) {
|
||||||
return response_and_data.data;
|
return response_and_data.data;
|
||||||
});
|
});
|
||||||
@ -213,23 +213,23 @@ export default class WorkerApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the task, typically to indicate progress, completion, or failure.
|
* Update the task, typically to indicate progress, completion, or failure.
|
||||||
* @param {String} taskId
|
* @param {String} task_id
|
||||||
* @param {module:model/TaskUpdate} taskUpdate Task update information
|
* @param {module:model/TaskUpdate} TaskUpdate Task update information
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||||
*/
|
*/
|
||||||
taskUpdateWithHttpInfo(taskId, taskUpdate) {
|
taskUpdateWithHttpInfo(task_id, TaskUpdate) {
|
||||||
let postBody = taskUpdate;
|
let postBody = TaskUpdate;
|
||||||
// verify the required parameter 'taskId' is set
|
// verify the required parameter 'task_id' is set
|
||||||
if (taskId === undefined || taskId === null) {
|
if (task_id === undefined || task_id === null) {
|
||||||
throw new Error("Missing the required parameter 'taskId' when calling taskUpdate");
|
throw new Error("Missing the required parameter 'task_id' when calling taskUpdate");
|
||||||
}
|
}
|
||||||
// verify the required parameter 'taskUpdate' is set
|
// verify the required parameter 'TaskUpdate' is set
|
||||||
if (taskUpdate === undefined || taskUpdate === null) {
|
if (TaskUpdate === undefined || TaskUpdate === null) {
|
||||||
throw new Error("Missing the required parameter 'taskUpdate' when calling taskUpdate");
|
throw new Error("Missing the required parameter 'TaskUpdate' when calling taskUpdate");
|
||||||
}
|
}
|
||||||
|
|
||||||
let pathParams = {
|
let pathParams = {
|
||||||
'task_id': taskId
|
'task_id': task_id
|
||||||
};
|
};
|
||||||
let queryParams = {
|
let queryParams = {
|
||||||
};
|
};
|
||||||
@ -251,12 +251,12 @@ export default class WorkerApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the task, typically to indicate progress, completion, or failure.
|
* Update the task, typically to indicate progress, completion, or failure.
|
||||||
* @param {String} taskId
|
* @param {String} task_id
|
||||||
* @param {module:model/TaskUpdate} taskUpdate Task update information
|
* @param {module:model/TaskUpdate} TaskUpdate Task update information
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||||
*/
|
*/
|
||||||
taskUpdate(taskId, taskUpdate) {
|
taskUpdate(task_id, TaskUpdate) {
|
||||||
return this.taskUpdateWithHttpInfo(taskId, taskUpdate)
|
return this.taskUpdateWithHttpInfo(task_id, TaskUpdate)
|
||||||
.then(function(response_and_data) {
|
.then(function(response_and_data) {
|
||||||
return response_and_data.data;
|
return response_and_data.data;
|
||||||
});
|
});
|
||||||
@ -302,14 +302,14 @@ export default class WorkerApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
|
* Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
|
||||||
* @param {module:model/WorkerStateChanged} workerStateChanged New worker state
|
* @param {module:model/WorkerStateChanged} WorkerStateChanged New worker state
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||||
*/
|
*/
|
||||||
workerStateChangedWithHttpInfo(workerStateChanged) {
|
workerStateChangedWithHttpInfo(WorkerStateChanged) {
|
||||||
let postBody = workerStateChanged;
|
let postBody = WorkerStateChanged;
|
||||||
// verify the required parameter 'workerStateChanged' is set
|
// verify the required parameter 'WorkerStateChanged' is set
|
||||||
if (workerStateChanged === undefined || workerStateChanged === null) {
|
if (WorkerStateChanged === undefined || WorkerStateChanged === null) {
|
||||||
throw new Error("Missing the required parameter 'workerStateChanged' when calling workerStateChanged");
|
throw new Error("Missing the required parameter 'WorkerStateChanged' when calling workerStateChanged");
|
||||||
}
|
}
|
||||||
|
|
||||||
let pathParams = {
|
let pathParams = {
|
||||||
@ -334,11 +334,11 @@ export default class WorkerApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
|
* Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
|
||||||
* @param {module:model/WorkerStateChanged} workerStateChanged New worker state
|
* @param {module:model/WorkerStateChanged} WorkerStateChanged New worker state
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||||
*/
|
*/
|
||||||
workerStateChanged(workerStateChanged) {
|
workerStateChanged(WorkerStateChanged) {
|
||||||
return this.workerStateChangedWithHttpInfo(workerStateChanged)
|
return this.workerStateChangedWithHttpInfo(WorkerStateChanged)
|
||||||
.then(function(response_and_data) {
|
.then(function(response_and_data) {
|
||||||
return response_and_data.data;
|
return response_and_data.data;
|
||||||
});
|
});
|
||||||
|
@ -30,14 +30,14 @@ class AssignedTask {
|
|||||||
* @param name {String}
|
* @param name {String}
|
||||||
* @param status {module:model/TaskStatus}
|
* @param status {module:model/TaskStatus}
|
||||||
* @param priority {Number}
|
* @param priority {Number}
|
||||||
* @param jobPriority {Number}
|
* @param job_priority {Number}
|
||||||
* @param jobType {String}
|
* @param job_type {String}
|
||||||
* @param taskType {String}
|
* @param task_type {String}
|
||||||
* @param commands {Array.<module:model/Command>}
|
* @param commands {Array.<module:model/Command>}
|
||||||
*/
|
*/
|
||||||
constructor(uuid, job, name, status, priority, jobPriority, jobType, taskType, commands) {
|
constructor(uuid, job, name, status, priority, job_priority, job_type, task_type, commands) {
|
||||||
|
|
||||||
AssignedTask.initialize(this, uuid, job, name, status, priority, jobPriority, jobType, taskType, commands);
|
AssignedTask.initialize(this, uuid, job, name, status, priority, job_priority, job_type, task_type, commands);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,15 +45,15 @@ class AssignedTask {
|
|||||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||||
* Only for internal use.
|
* Only for internal use.
|
||||||
*/
|
*/
|
||||||
static initialize(obj, uuid, job, name, status, priority, jobPriority, jobType, taskType, commands) {
|
static initialize(obj, uuid, job, name, status, priority, job_priority, job_type, task_type, commands) {
|
||||||
obj['uuid'] = uuid;
|
obj['uuid'] = uuid;
|
||||||
obj['job'] = job;
|
obj['job'] = job;
|
||||||
obj['name'] = name;
|
obj['name'] = name;
|
||||||
obj['status'] = status;
|
obj['status'] = status;
|
||||||
obj['priority'] = priority;
|
obj['priority'] = priority;
|
||||||
obj['job_priority'] = jobPriority;
|
obj['job_priority'] = job_priority;
|
||||||
obj['job_type'] = jobType;
|
obj['job_type'] = job_type;
|
||||||
obj['task_type'] = taskType;
|
obj['task_type'] = task_type;
|
||||||
obj['commands'] = commands;
|
obj['commands'] = commands;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,11 +24,11 @@ class AvailableJobTypes {
|
|||||||
* Constructs a new <code>AvailableJobTypes</code>.
|
* Constructs a new <code>AvailableJobTypes</code>.
|
||||||
* List of job types supported by this Manager.
|
* List of job types supported by this Manager.
|
||||||
* @alias module:model/AvailableJobTypes
|
* @alias module:model/AvailableJobTypes
|
||||||
* @param jobTypes {Array.<module:model/AvailableJobType>}
|
* @param job_types {Array.<module:model/AvailableJobType>}
|
||||||
*/
|
*/
|
||||||
constructor(jobTypes) {
|
constructor(job_types) {
|
||||||
|
|
||||||
AvailableJobTypes.initialize(this, jobTypes);
|
AvailableJobTypes.initialize(this, job_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,8 +36,8 @@ class AvailableJobTypes {
|
|||||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||||
* Only for internal use.
|
* Only for internal use.
|
||||||
*/
|
*/
|
||||||
static initialize(obj, jobTypes) {
|
static initialize(obj, job_types) {
|
||||||
obj['job_types'] = jobTypes;
|
obj['job_types'] = job_types;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,13 +28,13 @@ class RegisteredWorker {
|
|||||||
* @param address {String}
|
* @param address {String}
|
||||||
* @param status {module:model/WorkerStatus}
|
* @param status {module:model/WorkerStatus}
|
||||||
* @param platform {String}
|
* @param platform {String}
|
||||||
* @param lastActivity {String}
|
* @param last_activity {String}
|
||||||
* @param software {String}
|
* @param software {String}
|
||||||
* @param supportedTaskTypes {Array.<String>}
|
* @param supported_task_types {Array.<String>}
|
||||||
*/
|
*/
|
||||||
constructor(uuid, nickname, address, status, platform, lastActivity, software, supportedTaskTypes) {
|
constructor(uuid, nickname, address, status, platform, last_activity, software, supported_task_types) {
|
||||||
|
|
||||||
RegisteredWorker.initialize(this, uuid, nickname, address, status, platform, lastActivity, software, supportedTaskTypes);
|
RegisteredWorker.initialize(this, uuid, nickname, address, status, platform, last_activity, software, supported_task_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,15 +42,15 @@ class RegisteredWorker {
|
|||||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||||
* Only for internal use.
|
* Only for internal use.
|
||||||
*/
|
*/
|
||||||
static initialize(obj, uuid, nickname, address, status, platform, lastActivity, software, supportedTaskTypes) {
|
static initialize(obj, uuid, nickname, address, status, platform, last_activity, software, supported_task_types) {
|
||||||
obj['uuid'] = uuid;
|
obj['uuid'] = uuid;
|
||||||
obj['nickname'] = nickname;
|
obj['nickname'] = nickname;
|
||||||
obj['address'] = address;
|
obj['address'] = address;
|
||||||
obj['status'] = status;
|
obj['status'] = status;
|
||||||
obj['platform'] = platform;
|
obj['platform'] = platform;
|
||||||
obj['last_activity'] = lastActivity;
|
obj['last_activity'] = last_activity;
|
||||||
obj['software'] = software;
|
obj['software'] = software;
|
||||||
obj['supported_task_types'] = supportedTaskTypes;
|
obj['supported_task_types'] = supported_task_types;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,12 +24,12 @@ class WorkerRegistration {
|
|||||||
* @alias module:model/WorkerRegistration
|
* @alias module:model/WorkerRegistration
|
||||||
* @param secret {String}
|
* @param secret {String}
|
||||||
* @param platform {String}
|
* @param platform {String}
|
||||||
* @param supportedTaskTypes {Array.<String>}
|
* @param supported_task_types {Array.<String>}
|
||||||
* @param nickname {String}
|
* @param nickname {String}
|
||||||
*/
|
*/
|
||||||
constructor(secret, platform, supportedTaskTypes, nickname) {
|
constructor(secret, platform, supported_task_types, nickname) {
|
||||||
|
|
||||||
WorkerRegistration.initialize(this, secret, platform, supportedTaskTypes, nickname);
|
WorkerRegistration.initialize(this, secret, platform, supported_task_types, nickname);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,10 +37,10 @@ class WorkerRegistration {
|
|||||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||||
* Only for internal use.
|
* Only for internal use.
|
||||||
*/
|
*/
|
||||||
static initialize(obj, secret, platform, supportedTaskTypes, nickname) {
|
static initialize(obj, secret, platform, supported_task_types, nickname) {
|
||||||
obj['secret'] = secret;
|
obj['secret'] = secret;
|
||||||
obj['platform'] = platform;
|
obj['platform'] = platform;
|
||||||
obj['supported_task_types'] = supportedTaskTypes;
|
obj['supported_task_types'] = supported_task_types;
|
||||||
obj['nickname'] = nickname;
|
obj['nickname'] = nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,12 +23,12 @@ class WorkerSignOn {
|
|||||||
* Constructs a new <code>WorkerSignOn</code>.
|
* Constructs a new <code>WorkerSignOn</code>.
|
||||||
* @alias module:model/WorkerSignOn
|
* @alias module:model/WorkerSignOn
|
||||||
* @param nickname {String}
|
* @param nickname {String}
|
||||||
* @param supportedTaskTypes {Array.<String>}
|
* @param supported_task_types {Array.<String>}
|
||||||
* @param softwareVersion {String}
|
* @param software_version {String}
|
||||||
*/
|
*/
|
||||||
constructor(nickname, supportedTaskTypes, softwareVersion) {
|
constructor(nickname, supported_task_types, software_version) {
|
||||||
|
|
||||||
WorkerSignOn.initialize(this, nickname, supportedTaskTypes, softwareVersion);
|
WorkerSignOn.initialize(this, nickname, supported_task_types, software_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,10 +36,10 @@ class WorkerSignOn {
|
|||||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||||
* Only for internal use.
|
* Only for internal use.
|
||||||
*/
|
*/
|
||||||
static initialize(obj, nickname, supportedTaskTypes, softwareVersion) {
|
static initialize(obj, nickname, supported_task_types, software_version) {
|
||||||
obj['nickname'] = nickname;
|
obj['nickname'] = nickname;
|
||||||
obj['supported_task_types'] = supportedTaskTypes;
|
obj['supported_task_types'] = supported_task_types;
|
||||||
obj['software_version'] = softwareVersion;
|
obj['software_version'] = software_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,11 +23,11 @@ class WorkerStateChange {
|
|||||||
/**
|
/**
|
||||||
* Constructs a new <code>WorkerStateChange</code>.
|
* Constructs a new <code>WorkerStateChange</code>.
|
||||||
* @alias module:model/WorkerStateChange
|
* @alias module:model/WorkerStateChange
|
||||||
* @param statusRequested {module:model/WorkerStatus}
|
* @param status_requested {module:model/WorkerStatus}
|
||||||
*/
|
*/
|
||||||
constructor(statusRequested) {
|
constructor(status_requested) {
|
||||||
|
|
||||||
WorkerStateChange.initialize(this, statusRequested);
|
WorkerStateChange.initialize(this, status_requested);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,8 +35,8 @@ class WorkerStateChange {
|
|||||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||||
* Only for internal use.
|
* Only for internal use.
|
||||||
*/
|
*/
|
||||||
static initialize(obj, statusRequested) {
|
static initialize(obj, status_requested) {
|
||||||
obj['status_requested'] = statusRequested;
|
obj['status_requested'] = status_requested;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user