OAPI: Add generated JavaScript API client

This adds a JS client for the OAPI interface, and introduces the SocketIO
stuff into Flamenco Manager itself.

To build & run:
- in `web/manager-api` run `npm install`
- in `web/manager-api` run `npm link`
- in `web/app` run `npm install`
- in `web/app` run `npm link flamenco-manager`
- in `web/app` run `yarn serve`

This may not be a complete list, but at least some of those steps are
necessary.
This commit is contained in:
Sybren A. Stüvel 2022-04-01 16:40:54 +02:00
parent 80ffc7da5d
commit e990603311
98 changed files with 49923 additions and 8808 deletions

2
.gitignore vendored

@ -16,3 +16,5 @@ __pycache__
*.pyc
.mypy_cache/
.openapi-generator/
web/manager-api/dist/

@ -5,8 +5,9 @@ PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
LDFLAGS := -X ${PKG}/internal/appinfo.ApplicationVersion=${VERSION}
BUILD_FLAGS = -ldflags="${LDFLAGS}"
# Package name of the generated Python code for the Flamenco API.
# Package name of the generated Python/JavaScript code for the Flamenco API.
PY_API_PKG_NAME=flamenco.manager
JS_API_PKG_NAME=manager
# Prevent any dependency that requires a C compiler, i.e. only work with pure-Go libraries.
export CGO_ENABLED=0
@ -30,7 +31,7 @@ flamenco-worker:
socketio-poc:
go build -v ${BUILD_FLAGS} ${PKG}/cmd/socketio-poc
generate: generate-go generate-py
generate: generate-go generate-py generate-js
generate-go:
go generate ./pkg/api/...
@ -46,6 +47,7 @@ generate-py:
# remove no-longer-generated files.
rm -rf addon/flamenco/manager
# See https://openapi-generator.tech/docs/generators/python for the options.
java -jar addon/openapi-generator-cli.jar \
generate \
-i pkg/api/flamenco-manager.yaml \
@ -61,6 +63,32 @@ generate-py:
# though, so it's better to just remove those placeholders.
rm -rf addon/flamenco/manager/test
generate-js:
# The generator doesn't consistently overwrite existing files, nor does it
# remove no-longer-generated files.
rm -rf web/manager-api
# 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.
java -jar addon/openapi-generator-cli.jar \
generate \
-i pkg/api/flamenco-manager.yaml \
-g javascript \
-o web/manager-api \
--http-user-agent "Flamenco/${VERSION} / webbrowser" \
-p generateSourceCodeOnly=true \
-p projectName=flamenco-manager \
-p projectVersion="0.0.0" \
-p apiPackage="${JS_API_PKG_NAME}" \
-p disallowAdditionalPropertiesIfNotPresent=false \
-p usePromises=true \
-p moduleName=flamencoManager
# 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.
rm -rf web/manager-api/test
version:
@echo "OS : ${OS}"
@echo "Package: ${PKG}"

@ -31,6 +31,7 @@ import (
"git.blender.org/flamenco/internal/manager/swagger_ui"
"git.blender.org/flamenco/internal/manager/task_logs"
"git.blender.org/flamenco/internal/manager/task_state_machine"
"git.blender.org/flamenco/internal/manager/webupdates"
"git.blender.org/flamenco/internal/own_url"
"git.blender.org/flamenco/internal/upnp_ssdp"
"git.blender.org/flamenco/pkg/api"
@ -94,7 +95,8 @@ func main() {
// go persist.PeriodicMaintenanceLoop(mainCtx)
flamenco := buildFlamencoAPI(configService, persist)
e := buildWebService(flamenco, persist, ssdp)
webUpdater := webupdates.New()
e := buildWebService(flamenco, persist, ssdp, webUpdater)
installSignalHandler(mainCtxCancel)
@ -147,6 +149,7 @@ func buildWebService(
flamenco api.ServerInterface,
persist api_impl.PersistenceService,
ssdp *upnp_ssdp.Server,
webUpdater *webupdates.BiDirComms,
) *echo.Echo {
e := echo.New()
e.HideBanner = true
@ -171,6 +174,33 @@ func buildWebService(
// }
// e.Use(middleware.Gzip())
e.Use(middleware.CORSWithConfig(middleware.CORSConfig{
// Just some hard-coded URLs for now, just to get some tests going.
AllowOrigins: []string{"http://localhost:8080/", "http://localhost:8081/", "http://10.161.30.150:8081"},
// List taken from https://www.bacancytechnology.com/blog/real-time-chat-application-using-socketio-golang-vuejs/
AllowHeaders: []string{
echo.HeaderAccept,
echo.HeaderAcceptEncoding,
echo.HeaderAccessControlAllowOrigin,
echo.HeaderAccessControlRequestHeaders,
echo.HeaderAccessControlRequestMethod,
echo.HeaderAuthorization,
echo.HeaderContentLength,
echo.HeaderContentType,
echo.HeaderOrigin,
echo.HeaderXCSRFToken,
echo.HeaderXRequestedWith,
"Cache-Control",
"Connection",
"Host",
"Referer",
"User-Agent",
"X-header",
},
AllowMethods: []string{"POST", "GET", "OPTIONS", "PUT", "DELETE"},
}))
// Load the API definition and enable validation & authentication checks.
swagger, err := api.GetSwagger()
if err != nil {
@ -181,6 +211,7 @@ func buildWebService(
// Register routes.
api.RegisterHandlers(e, flamenco)
webUpdater.RegisterHandlers(e)
swagger_ui.RegisterSwaggerUIStaticFiles(e)
e.GET("/api/openapi3.json", func(c echo.Context) error {
return c.JSON(http.StatusOK, swagger)

@ -0,0 +1,62 @@
// package webupdates uses SocketIO to send updates to a web client.
// SPDX-License-Identifier: GPL-3.0-or-later
package webupdates
import (
gosocketio "github.com/graarh/golang-socketio"
"github.com/graarh/golang-socketio/transport"
"github.com/labstack/echo/v4"
"github.com/rs/zerolog/log"
)
type BiDirComms struct {
sockserv *gosocketio.Server
}
type Message struct {
Name string `json:"name"`
Text string `json:"text"`
}
func New() *BiDirComms {
return &BiDirComms{
sockserv: socketIOServer(),
}
}
func (b *BiDirComms) RegisterHandlers(router *echo.Echo) {
router.Any("/socket.io/", echo.WrapHandler(b.sockserv))
}
func socketIOServer() *gosocketio.Server {
sio := gosocketio.NewServer(transport.GetDefaultWebsocketTransport())
log.Info().Msg("initialising SocketIO")
// socket connection
sio.On(gosocketio.OnConnection, func(c *gosocketio.Channel) {
log.Info().Str("clientID", c.Id()).Msg("connected")
c.Join("Room")
})
// socket disconnection
sio.On(gosocketio.OnDisconnection, func(c *gosocketio.Channel) {
log.Info().Str("clientID", c.Id()).Msg("disconnected")
c.Leave("Room")
})
sio.On(gosocketio.OnError, func(c *gosocketio.Channel) {
log.Warn().Interface("c", c).Msg("socketio error")
})
// chat socket
sio.On("/chat", func(c *gosocketio.Channel, message Message) string {
log.Info().Str("clientID", c.Id()).
Str("text", message.Text).
Str("name", message.Name).
Msg("message received")
c.BroadcastTo("Room", "/message", message.Text)
return "message sent successfully."
})
return sio
}

1
web/app/.eslintignore Normal file

@ -0,0 +1 @@
node_modules/flamenco-manager/dist

27305
web/app/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

@ -18,7 +18,7 @@
}
],
"scripts": {
"serve": "vue-cli-service serve",
"serve": "vue-cli-service serve --port 8081",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
@ -43,7 +43,10 @@
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
"rules": {},
"ignorePatterns": [
"../manager-api/src/**"
]
},
"browserslist": [
"> 1%",

@ -23,7 +23,7 @@ export default {
data: () => {
return {
socket: null,
serverUrl: process.env.VUE_APP_SOCKET_URL || "ws://localhost:8081",
serverUrl: process.env.VUE_APP_SOCKET_URL || "ws://localhost:8080",
messages: [],
};
},

@ -13,6 +13,17 @@ import {
import "bootstrap/dist/css/bootstrap.css";
import "bootstrap-vue/dist/bootstrap-vue.css";
let flamencoManager = require('flamenco-manager');
let apiClient = new flamencoManager.ApiClient("http://localhost:8080/");
var api = new flamencoManager.JobsApi(apiClient);
var jobId = "07d134bc-0614-4477-9b1f-e238f0f0391a";
api.fetchJob(jobId).then(function(data) {
console.log('API called successfully. Returned data: ', data);
}, function(error) {
console.error(error);
});
Vue.config.productionTip = false
Vue.use(FormInputPlugin);

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

8926
web/app/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

33
web/manager-api/.babelrc Normal file

@ -0,0 +1,33 @@
{
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
[
"@babel/plugin-proposal-pipeline-operator",
{
"proposal": "minimal"
}
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
]
}

33
web/manager-api/.gitignore vendored Normal file

@ -0,0 +1,33 @@
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
node_modules
# Optional npm cache directory
.npm
# Optional REPL history
.node_repl_history

@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

@ -0,0 +1,5 @@
language: node_js
cache: npm
node_js:
- "6"
- "6.1"

182
web/manager-api/README.md Normal file

@ -0,0 +1,182 @@
# flamenco-manager
flamencoManager - JavaScript client for flamenco-manager
Render Farm manager API
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 1.0.0
- Package version: 0.0.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
For more information, please visit [https://flamenco.io/](https://flamenco.io/)
## Installation
### For [Node.js](https://nodejs.org/)
#### npm
To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
Then install it via:
```shell
npm install flamenco-manager --save
```
Finally, you need to build the module:
```shell
npm run build
```
##### Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
```shell
npm install
```
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
```shell
npm link
```
To use the link you just defined in your project, switch to the directory you want to use your flamenco-manager from, and run:
```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```
Finally, you need to build the module:
```shell
npm run build
```
#### git
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:
```shell
npm install GIT_USER_ID/GIT_REPO_ID --save
```
### For browser
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):
```shell
browserify main.js > bundle.js
```
Then include *bundle.js* in the HTML pages.
### Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:
```javascript
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
```
## Getting Started
Please follow the [installation](#installation) instruction and execute the following JS code:
```javascript
var flamencoManager = require('flamenco-manager');
var api = new flamencoManager.JobsApi()
var jobId = "jobId_example"; // {String}
api.fetchJob(jobId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
```
## Documentation for API Endpoints
All URIs are relative to *http://localhost*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*flamencoManager.JobsApi* | [**fetchJob**](docs/JobsApi.md#fetchJob) | **GET** /api/jobs/{job_id} | Fetch info about the job.
*flamencoManager.JobsApi* | [**getJobTypes**](docs/JobsApi.md#getJobTypes) | **GET** /api/jobs/types | Get list of job types and their parameters.
*flamencoManager.JobsApi* | [**submitJob**](docs/JobsApi.md#submitJob) | **POST** /api/jobs | Submit a new job for Flamenco Manager to execute.
*flamencoManager.MetaApi* | [**getConfiguration**](docs/MetaApi.md#getConfiguration) | **GET** /api/configuration | Get the configuration of this Manager.
*flamencoManager.MetaApi* | [**getVersion**](docs/MetaApi.md#getVersion) | **GET** /api/version | Get the Flamenco version of this Manager
*flamencoManager.ShamanApi* | [**shamanCheckout**](docs/ShamanApi.md#shamanCheckout) | **POST** /shaman/checkout/create | Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
*flamencoManager.ShamanApi* | [**shamanCheckoutRequirements**](docs/ShamanApi.md#shamanCheckoutRequirements) | **POST** /shaman/checkout/requirements | Checks a Shaman Requirements file, and reports which files are unknown.
*flamencoManager.ShamanApi* | [**shamanFileStore**](docs/ShamanApi.md#shamanFileStore) | **POST** /shaman/files/{checksum}/{filesize} | Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file&#39;s contents should be sent in the request body.
*flamencoManager.ShamanApi* | [**shamanFileStoreCheck**](docs/ShamanApi.md#shamanFileStoreCheck) | **GET** /shaman/files/{checksum}/{filesize} | Check the status of a file on the Shaman server.
*flamencoManager.WorkerApi* | [**registerWorker**](docs/WorkerApi.md#registerWorker) | **POST** /api/worker/register-worker | Register a new worker
*flamencoManager.WorkerApi* | [**scheduleTask**](docs/WorkerApi.md#scheduleTask) | **POST** /api/worker/task | Obtain a new task to execute
*flamencoManager.WorkerApi* | [**signOff**](docs/WorkerApi.md#signOff) | **POST** /api/worker/sign-off | Mark the worker as offline
*flamencoManager.WorkerApi* | [**signOn**](docs/WorkerApi.md#signOn) | **POST** /api/worker/sign-on | Authenticate &amp; sign in the worker.
*flamencoManager.WorkerApi* | [**taskUpdate**](docs/WorkerApi.md#taskUpdate) | **POST** /api/worker/task/{task_id} | Update the task, typically to indicate progress, completion, or failure.
*flamencoManager.WorkerApi* | [**workerState**](docs/WorkerApi.md#workerState) | **GET** /api/worker/state |
*flamencoManager.WorkerApi* | [**workerStateChanged**](docs/WorkerApi.md#workerStateChanged) | **POST** /api/worker/state-changed | Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
## Documentation for Models
- [flamencoManager.AssignedTask](docs/AssignedTask.md)
- [flamencoManager.AvailableJobSetting](docs/AvailableJobSetting.md)
- [flamencoManager.AvailableJobSettingSubtype](docs/AvailableJobSettingSubtype.md)
- [flamencoManager.AvailableJobSettingType](docs/AvailableJobSettingType.md)
- [flamencoManager.AvailableJobType](docs/AvailableJobType.md)
- [flamencoManager.AvailableJobTypes](docs/AvailableJobTypes.md)
- [flamencoManager.Command](docs/Command.md)
- [flamencoManager.Error](docs/Error.md)
- [flamencoManager.FlamencoVersion](docs/FlamencoVersion.md)
- [flamencoManager.Job](docs/Job.md)
- [flamencoManager.JobAllOf](docs/JobAllOf.md)
- [flamencoManager.JobStatus](docs/JobStatus.md)
- [flamencoManager.ManagerConfiguration](docs/ManagerConfiguration.md)
- [flamencoManager.RegisteredWorker](docs/RegisteredWorker.md)
- [flamencoManager.SecurityError](docs/SecurityError.md)
- [flamencoManager.ShamanCheckout](docs/ShamanCheckout.md)
- [flamencoManager.ShamanCheckoutResult](docs/ShamanCheckoutResult.md)
- [flamencoManager.ShamanFileSpec](docs/ShamanFileSpec.md)
- [flamencoManager.ShamanFileSpecWithStatus](docs/ShamanFileSpecWithStatus.md)
- [flamencoManager.ShamanFileStatus](docs/ShamanFileStatus.md)
- [flamencoManager.ShamanRequirementsRequest](docs/ShamanRequirementsRequest.md)
- [flamencoManager.ShamanRequirementsResponse](docs/ShamanRequirementsResponse.md)
- [flamencoManager.ShamanSingleFileStatus](docs/ShamanSingleFileStatus.md)
- [flamencoManager.SubmittedJob](docs/SubmittedJob.md)
- [flamencoManager.TaskStatus](docs/TaskStatus.md)
- [flamencoManager.TaskUpdate](docs/TaskUpdate.md)
- [flamencoManager.WorkerRegistration](docs/WorkerRegistration.md)
- [flamencoManager.WorkerSignOn](docs/WorkerSignOn.md)
- [flamencoManager.WorkerStateChange](docs/WorkerStateChange.md)
- [flamencoManager.WorkerStateChanged](docs/WorkerStateChanged.md)
- [flamencoManager.WorkerStatus](docs/WorkerStatus.md)
## Documentation for Authorization
### worker_auth
- **Type**: HTTP basic authentication

@ -0,0 +1,17 @@
# flamencoManager.AssignedTask
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **String** | |
**job** | **String** | |
**name** | **String** | |
**status** | [**TaskStatus**](TaskStatus.md) | |
**priority** | **Number** | |
**jobPriority** | **Number** | |
**jobType** | **String** | |
**taskType** | **String** | |
**commands** | [**[Command]**](Command.md) | |

@ -0,0 +1,19 @@
# flamencoManager.AvailableJobSetting
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**key** | **String** | Identifier for the setting, must be unique within the job type. |
**type** | [**AvailableJobSettingType**](AvailableJobSettingType.md) | |
**subtype** | [**AvailableJobSettingSubtype**](AvailableJobSettingSubtype.md) | | [optional]
**choices** | **[String]** | When given, limit the valid values to these choices. Only usable with string type. | [optional]
**propargs** | **Object** | Any extra arguments to the bpy.props.SomeProperty() call used to create this property. | [optional]
**description** | **Object** | The description/tooltip shown in the user interface. | [optional]
**_default** | **Object** | The default value shown to the user when determining this setting. | [optional]
**_eval** | **String** | Python expression to be evaluated in order to determine the default value for this setting. | [optional]
**visible** | **Boolean** | Whether to show this setting in the UI of a job submitter (like a Blender add-on). Set to &#x60;false&#x60; when it is an internal setting that shouldn&#39;t be shown to end users. | [optional] [default to true]
**required** | **Boolean** | Whether to immediately reject a job definition, of this type, without this particular setting. | [optional] [default to false]
**editable** | **Boolean** | Whether to allow editing this setting after the job has been submitted. Would imply deleting all existing tasks for this job, and recompiling it. | [optional] [default to false]

@ -0,0 +1,14 @@
# flamencoManager.AvailableJobSettingSubtype
## Enum
* `file_path` (value: `"file_path"`)
* `dir_path` (value: `"dir_path"`)
* `file_name` (value: `"file_name"`)
* `hashed_file_path` (value: `"hashed_file_path"`)

@ -0,0 +1,14 @@
# flamencoManager.AvailableJobSettingType
## Enum
* `string` (value: `"string"`)
* `int32` (value: `"int32"`)
* `float` (value: `"float"`)
* `bool` (value: `"bool"`)

@ -0,0 +1,11 @@
# flamencoManager.AvailableJobType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | |
**label** | **String** | |
**settings** | [**[AvailableJobSetting]**](AvailableJobSetting.md) | |

@ -0,0 +1,9 @@
# flamencoManager.AvailableJobTypes
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**jobTypes** | [**[AvailableJobType]**](AvailableJobType.md) | |

@ -0,0 +1,10 @@
# flamencoManager.Command
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | |
**parameters** | **Object** | |

@ -0,0 +1,10 @@
# flamencoManager.Error
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Number** | |
**message** | **String** | |

@ -0,0 +1,10 @@
# flamencoManager.FlamencoVersion
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**version** | **String** | |
**name** | **String** | |

@ -0,0 +1,17 @@
# flamencoManager.Job
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | |
**type** | **String** | |
**priority** | **Number** | | [default to 50]
**settings** | **{String: Object}** | | [optional]
**metadata** | **{String: String}** | Arbitrary metadata strings. More complex structures can be modeled by using &#x60;a.b.c&#x60; notation for the key. | [optional]
**id** | **String** | UUID of the Job |
**created** | **Date** | Creation timestamp |
**updated** | **Date** | Creation timestamp |
**status** | [**JobStatus**](JobStatus.md) | |

@ -0,0 +1,12 @@
# flamencoManager.JobAllOf
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | UUID of the Job |
**created** | **Date** | Creation timestamp |
**updated** | **Date** | Creation timestamp |
**status** | [**JobStatus**](JobStatus.md) | |

@ -0,0 +1,34 @@
# flamencoManager.JobStatus
## Enum
* `active` (value: `"active"`)
* `canceled` (value: `"canceled"`)
* `completed` (value: `"completed"`)
* `construction-failed` (value: `"construction-failed"`)
* `failed` (value: `"failed"`)
* `paused` (value: `"paused"`)
* `queued` (value: `"queued"`)
* `archived` (value: `"archived"`)
* `archiving` (value: `"archiving"`)
* `cancel-requested` (value: `"cancel-requested"`)
* `fail-requested` (value: `"fail-requested"`)
* `requeued` (value: `"requeued"`)
* `under-construction` (value: `"under-construction"`)
* `waiting-for-files` (value: `"waiting-for-files"`)

@ -0,0 +1,133 @@
# flamencoManager.JobsApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**fetchJob**](JobsApi.md#fetchJob) | **GET** /api/jobs/{job_id} | Fetch info about the job.
[**getJobTypes**](JobsApi.md#getJobTypes) | **GET** /api/jobs/types | Get list of job types and their parameters.
[**submitJob**](JobsApi.md#submitJob) | **POST** /api/jobs | Submit a new job for Flamenco Manager to execute.
## fetchJob
> Job fetchJob(jobId)
Fetch info about the job.
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let apiInstance = new flamencoManager.JobsApi();
let jobId = "jobId_example"; // String |
apiInstance.fetchJob(jobId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**jobId** | **String**| |
### Return type
[**Job**](Job.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## getJobTypes
> AvailableJobTypes getJobTypes()
Get list of job types and their parameters.
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let apiInstance = new flamencoManager.JobsApi();
apiInstance.getJobTypes().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**AvailableJobTypes**](AvailableJobTypes.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## submitJob
> Job submitJob(submittedJob)
Submit a new job for Flamenco Manager to execute.
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let apiInstance = new flamencoManager.JobsApi();
let submittedJob = new flamencoManager.SubmittedJob(); // SubmittedJob | Job to submit
apiInstance.submitJob(submittedJob).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**submittedJob** | [**SubmittedJob**](SubmittedJob.md)| Job to submit |
### Return type
[**Job**](Job.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json

@ -0,0 +1,10 @@
# flamencoManager.ManagerConfiguration
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**storageLocation** | **String** | Directory used for job file storage. |
**shamanEnabled** | **Boolean** | Whether the Shaman file transfer API is available. |

@ -0,0 +1,86 @@
# flamencoManager.MetaApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getConfiguration**](MetaApi.md#getConfiguration) | **GET** /api/configuration | Get the configuration of this Manager.
[**getVersion**](MetaApi.md#getVersion) | **GET** /api/version | Get the Flamenco version of this Manager
## getConfiguration
> ManagerConfiguration getConfiguration()
Get the configuration of this Manager.
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let apiInstance = new flamencoManager.MetaApi();
apiInstance.getConfiguration().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ManagerConfiguration**](ManagerConfiguration.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## getVersion
> FlamencoVersion getVersion()
Get the Flamenco version of this Manager
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let apiInstance = new flamencoManager.MetaApi();
apiInstance.getVersion().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**FlamencoVersion**](FlamencoVersion.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json

@ -0,0 +1,16 @@
# flamencoManager.RegisteredWorker
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **String** | |
**nickname** | **String** | |
**address** | **String** | |
**status** | [**WorkerStatus**](WorkerStatus.md) | |
**platform** | **String** | |
**lastActivity** | **String** | |
**software** | **String** | |
**supportedTaskTypes** | **[String]** | |

@ -0,0 +1,9 @@
# flamencoManager.SecurityError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **String** | |

@ -0,0 +1,192 @@
# flamencoManager.ShamanApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**shamanCheckout**](ShamanApi.md#shamanCheckout) | **POST** /shaman/checkout/create | Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
[**shamanCheckoutRequirements**](ShamanApi.md#shamanCheckoutRequirements) | **POST** /shaman/checkout/requirements | Checks a Shaman Requirements file, and reports which files are unknown.
[**shamanFileStore**](ShamanApi.md#shamanFileStore) | **POST** /shaman/files/{checksum}/{filesize} | Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file&#39;s contents should be sent in the request body.
[**shamanFileStoreCheck**](ShamanApi.md#shamanFileStoreCheck) | **GET** /shaman/files/{checksum}/{filesize} | Check the status of a file on the Shaman server.
## 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.
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let apiInstance = new flamencoManager.ShamanApi();
let shamanCheckout = new flamencoManager.ShamanCheckout(); // ShamanCheckout | Set of files to check out.
apiInstance.shamanCheckout(shamanCheckout).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**shamanCheckout** | [**ShamanCheckout**](ShamanCheckout.md)| Set of files to check out. |
### Return type
[**ShamanCheckoutResult**](ShamanCheckoutResult.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## shamanCheckoutRequirements
> ShamanRequirementsResponse shamanCheckoutRequirements(shamanRequirementsRequest)
Checks a Shaman Requirements file, and reports which files are unknown.
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let apiInstance = new flamencoManager.ShamanApi();
let shamanRequirementsRequest = new flamencoManager.ShamanRequirementsRequest(); // ShamanRequirementsRequest | Set of files to check
apiInstance.shamanCheckoutRequirements(shamanRequirementsRequest).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**shamanRequirementsRequest** | [**ShamanRequirementsRequest**](ShamanRequirementsRequest.md)| Set of files to check |
### Return type
[**ShamanRequirementsResponse**](ShamanRequirementsResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## shamanFileStore
> shamanFileStore(checksum, filesize, body, opts)
Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file&#39;s contents should be sent in the request body.
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let apiInstance = new flamencoManager.ShamanApi();
let checksum = "checksum_example"; // String | SHA256 checksum of the file.
let filesize = 56; // Number | Size of the file in bytes.
let body = "/path/to/file"; // File | Contents of the file
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.
'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.
};
apiInstance.shamanFileStore(checksum, filesize, body, opts).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**checksum** | **String**| SHA256 checksum of the file. |
**filesize** | **Number**| Size of the file in bytes. |
**body** | **File**| Contents of the file |
**xShamanCanDeferUpload** | **Boolean**| The client indicates that it can defer uploading this file. The \&quot;208\&quot; 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]
### Return type
null (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/octet-stream
- **Accept**: application/json
## shamanFileStoreCheck
> ShamanSingleFileStatus shamanFileStoreCheck(checksum, filesize)
Check the status of a file on the Shaman server.
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let apiInstance = new flamencoManager.ShamanApi();
let checksum = "checksum_example"; // String | SHA256 checksum of the file.
let filesize = 56; // Number | Size of the file in bytes.
apiInstance.shamanFileStoreCheck(checksum, filesize).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**checksum** | **String**| SHA256 checksum of the file. |
**filesize** | **Number**| Size of the file in bytes. |
### Return type
[**ShamanSingleFileStatus**](ShamanSingleFileStatus.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json

@ -0,0 +1,10 @@
# flamencoManager.ShamanCheckout
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**files** | [**[ShamanFileSpec]**](ShamanFileSpec.md) | |
**checkoutPath** | **String** | Path where the Manager should create this checkout. It is relative to the Shaman checkout path as configured on the Manager. In older versions of the Shaman this was just the \&quot;checkout ID\&quot;, but in this version it can be a path like &#x60;project-slug/scene-name/unique-ID&#x60;. |

@ -0,0 +1,9 @@
# flamencoManager.ShamanCheckoutResult
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**checkoutPath** | **String** | Path where the Manager created this checkout. This can be different than what was requested, as the Manager will ensure a unique directory. The path is relative to the Shaman checkout path as configured on the Manager. |

@ -0,0 +1,11 @@
# flamencoManager.ShamanFileSpec
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sha** | **String** | SHA256 checksum of the file |
**size** | **Number** | File size in bytes |
**path** | **String** | Location of the file in the checkout |

@ -0,0 +1,12 @@
# flamencoManager.ShamanFileSpecWithStatus
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sha** | **String** | SHA256 checksum of the file |
**size** | **Number** | File size in bytes |
**path** | **String** | Location of the file in the checkout |
**status** | [**ShamanFileStatus**](ShamanFileStatus.md) | |

@ -0,0 +1,12 @@
# flamencoManager.ShamanFileStatus
## Enum
* `unknown` (value: `"unknown"`)
* `uploading` (value: `"uploading"`)
* `stored` (value: `"stored"`)

@ -0,0 +1,9 @@
# flamencoManager.ShamanRequirementsRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**files** | [**[ShamanFileSpec]**](ShamanFileSpec.md) | |

@ -0,0 +1,9 @@
# flamencoManager.ShamanRequirementsResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**files** | [**[ShamanFileSpecWithStatus]**](ShamanFileSpecWithStatus.md) | |

@ -0,0 +1,9 @@
# flamencoManager.ShamanSingleFileStatus
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**status** | [**ShamanFileStatus**](ShamanFileStatus.md) | |

@ -0,0 +1,13 @@
# flamencoManager.SubmittedJob
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | |
**type** | **String** | |
**priority** | **Number** | | [default to 50]
**settings** | **{String: Object}** | | [optional]
**metadata** | **{String: String}** | Arbitrary metadata strings. More complex structures can be modeled by using &#x60;a.b.c&#x60; notation for the key. | [optional]

@ -0,0 +1,22 @@
# flamencoManager.TaskStatus
## Enum
* `active` (value: `"active"`)
* `canceled` (value: `"canceled"`)
* `completed` (value: `"completed"`)
* `failed` (value: `"failed"`)
* `queued` (value: `"queued"`)
* `soft-failed` (value: `"soft-failed"`)
* `cancel-requested` (value: `"cancel-requested"`)
* `paused` (value: `"paused"`)

@ -0,0 +1,11 @@
# flamencoManager.TaskUpdate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**taskStatus** | [**TaskStatus**](TaskStatus.md) | | [optional]
**activity** | **String** | One-liner to indicate what&#39;s currently happening with the task. Overwrites previously sent activity strings. | [optional]
**log** | **String** | Log lines for this task, will be appended to logs sent earlier. | [optional]

@ -0,0 +1,329 @@
# flamencoManager.WorkerApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**registerWorker**](WorkerApi.md#registerWorker) | **POST** /api/worker/register-worker | Register a new worker
[**scheduleTask**](WorkerApi.md#scheduleTask) | **POST** /api/worker/task | Obtain a new task to execute
[**signOff**](WorkerApi.md#signOff) | **POST** /api/worker/sign-off | Mark the worker as offline
[**signOn**](WorkerApi.md#signOn) | **POST** /api/worker/sign-on | Authenticate &amp; sign in the worker.
[**taskUpdate**](WorkerApi.md#taskUpdate) | **POST** /api/worker/task/{task_id} | Update the task, typically to indicate progress, completion, or failure.
[**workerState**](WorkerApi.md#workerState) | **GET** /api/worker/state |
[**workerStateChanged**](WorkerApi.md#workerStateChanged) | **POST** /api/worker/state-changed | Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
## registerWorker
> RegisteredWorker registerWorker(workerRegistration)
Register a new worker
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let apiInstance = new flamencoManager.WorkerApi();
let workerRegistration = new flamencoManager.WorkerRegistration(); // WorkerRegistration | Worker to register
apiInstance.registerWorker(workerRegistration).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workerRegistration** | [**WorkerRegistration**](WorkerRegistration.md)| Worker to register |
### Return type
[**RegisteredWorker**](RegisteredWorker.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## scheduleTask
> AssignedTask scheduleTask()
Obtain a new task to execute
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let defaultClient = flamencoManager.ApiClient.instance;
// Configure HTTP basic authorization: worker_auth
let worker_auth = defaultClient.authentications['worker_auth'];
worker_auth.username = 'YOUR USERNAME';
worker_auth.password = 'YOUR PASSWORD';
let apiInstance = new flamencoManager.WorkerApi();
apiInstance.scheduleTask().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**AssignedTask**](AssignedTask.md)
### Authorization
[worker_auth](../README.md#worker_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## signOff
> signOff()
Mark the worker as offline
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let defaultClient = flamencoManager.ApiClient.instance;
// Configure HTTP basic authorization: worker_auth
let worker_auth = defaultClient.authentications['worker_auth'];
worker_auth.username = 'YOUR USERNAME';
worker_auth.password = 'YOUR PASSWORD';
let apiInstance = new flamencoManager.WorkerApi();
apiInstance.signOff().then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
null (empty response body)
### Authorization
[worker_auth](../README.md#worker_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## signOn
> WorkerStateChange signOn(workerSignOn)
Authenticate &amp; sign in the worker.
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let defaultClient = flamencoManager.ApiClient.instance;
// Configure HTTP basic authorization: worker_auth
let worker_auth = defaultClient.authentications['worker_auth'];
worker_auth.username = 'YOUR USERNAME';
worker_auth.password = 'YOUR PASSWORD';
let apiInstance = new flamencoManager.WorkerApi();
let workerSignOn = new flamencoManager.WorkerSignOn(); // WorkerSignOn | Worker metadata
apiInstance.signOn(workerSignOn).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workerSignOn** | [**WorkerSignOn**](WorkerSignOn.md)| Worker metadata |
### Return type
[**WorkerStateChange**](WorkerStateChange.md)
### Authorization
[worker_auth](../README.md#worker_auth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## taskUpdate
> taskUpdate(taskId, taskUpdate)
Update the task, typically to indicate progress, completion, or failure.
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let defaultClient = flamencoManager.ApiClient.instance;
// Configure HTTP basic authorization: worker_auth
let worker_auth = defaultClient.authentications['worker_auth'];
worker_auth.username = 'YOUR USERNAME';
worker_auth.password = 'YOUR PASSWORD';
let apiInstance = new flamencoManager.WorkerApi();
let taskId = "taskId_example"; // String |
let taskUpdate = new flamencoManager.TaskUpdate(); // TaskUpdate | Task update information
apiInstance.taskUpdate(taskId, taskUpdate).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**taskId** | **String**| |
**taskUpdate** | [**TaskUpdate**](TaskUpdate.md)| Task update information |
### Return type
null (empty response body)
### Authorization
[worker_auth](../README.md#worker_auth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## workerState
> WorkerStateChange workerState()
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let defaultClient = flamencoManager.ApiClient.instance;
// Configure HTTP basic authorization: worker_auth
let worker_auth = defaultClient.authentications['worker_auth'];
worker_auth.username = 'YOUR USERNAME';
worker_auth.password = 'YOUR PASSWORD';
let apiInstance = new flamencoManager.WorkerApi();
apiInstance.workerState().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**WorkerStateChange**](WorkerStateChange.md)
### Authorization
[worker_auth](../README.md#worker_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## workerStateChanged
> workerStateChanged(workerStateChanged)
Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
### Example
```javascript
import flamencoManager from 'flamenco-manager';
let defaultClient = flamencoManager.ApiClient.instance;
// Configure HTTP basic authorization: worker_auth
let worker_auth = defaultClient.authentications['worker_auth'];
worker_auth.username = 'YOUR USERNAME';
worker_auth.password = 'YOUR PASSWORD';
let apiInstance = new flamencoManager.WorkerApi();
let workerStateChanged = new flamencoManager.WorkerStateChanged(); // WorkerStateChanged | New worker state
apiInstance.workerStateChanged(workerStateChanged).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workerStateChanged** | [**WorkerStateChanged**](WorkerStateChanged.md)| New worker state |
### Return type
null (empty response body)
### Authorization
[worker_auth](../README.md#worker_auth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json

@ -0,0 +1,12 @@
# flamencoManager.WorkerRegistration
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**secret** | **String** | |
**platform** | **String** | |
**supportedTaskTypes** | **[String]** | |
**nickname** | **String** | |

@ -0,0 +1,11 @@
# flamencoManager.WorkerSignOn
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**nickname** | **String** | |
**supportedTaskTypes** | **[String]** | |
**softwareVersion** | **String** | |

@ -0,0 +1,9 @@
# flamencoManager.WorkerStateChange
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**statusRequested** | [**WorkerStatus**](WorkerStatus.md) | |

@ -0,0 +1,9 @@
# flamencoManager.WorkerStateChanged
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**status** | [**WorkerStatus**](WorkerStatus.md) | |

@ -0,0 +1,20 @@
# flamencoManager.WorkerStatus
## Enum
* `starting` (value: `"starting"`)
* `awake` (value: `"awake"`)
* `asleep` (value: `"asleep"`)
* `error` (value: `"error"`)
* `shutdown` (value: `"shutdown"`)
* `testing` (value: `"testing"`)
* `offline` (value: `"offline"`)

@ -0,0 +1,57 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

@ -0,0 +1 @@
--timeout 10000

7175
web/manager-api/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

@ -0,0 +1,46 @@
{
"name": "flamenco-manager",
"version": "0.0.0",
"description": "Render_Farm_manager_API",
"license": "GPLv3",
"main": "dist/index.js",
"scripts": {
"build": "babel src -d dist",
"prepare": "npm run build",
"test": "mocha --require @babel/register --recursive"
},
"browser": {
"fs": false
},
"dependencies": {
"@babel/cli": "^7.0.0",
"superagent": "^5.3.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-bind": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/register": "^7.0.0",
"expect.js": "^0.3.1",
"mocha": "^8.0.1",
"sinon": "^7.2.0"
},
"files": [
"dist"
]
}

@ -0,0 +1,693 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import superagent from "superagent";
import querystring from "querystring";
/**
* @module ApiClient
* @version 0.0.0
*/
/**
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
* application to use this class directly - the *Api and model classes provide the public API for the service. The
* contents of this file should be regarded as internal but are documented for completeness.
* @alias module:ApiClient
* @class
*/
class ApiClient {
/**
* The base URL against which to resolve every API call's (relative) path.
* Overrides the default value set in spec file if present
* @param {String} basePath
*/
constructor(basePath = 'http://localhost') {
/**
* The base URL against which to resolve every API call's (relative) path.
* @type {String}
* @default http://localhost
*/
this.basePath = basePath.replace(/\/+$/, '');
/**
* The authentication methods to be included for all API calls.
* @type {Array.<String>}
*/
this.authentications = {
'worker_auth': {type: 'basic'}
}
/**
* The default HTTP headers to be included for all API calls.
* @type {Array.<String>}
* @default {}
*/
this.defaultHeaders = {
'User-Agent': 'Flamenco/80ffc7da-dirty / webbrowser'
};
/**
* The default HTTP timeout for all API calls.
* @type {Number}
* @default 60000
*/
this.timeout = 60000;
/**
* If set to false an additional timestamp parameter is added to all API GET calls to
* prevent browser caching
* @type {Boolean}
* @default true
*/
this.cache = true;
/**
* If set to true, the client will save the cookies from each server
* response, and return them in the next request.
* @default false
*/
this.enableCookies = false;
/*
* Used to save and return cookies in a node.js (non-browser) setting,
* if this.enableCookies is set to true.
*/
if (typeof window === 'undefined') {
this.agent = new superagent.agent();
}
/*
* Allow user to override superagent agent
*/
this.requestAgent = null;
/*
* Allow user to add superagent plugins
*/
this.plugins = null;
}
/**
* Returns a string representation for an actual parameter.
* @param param The actual parameter.
* @returns {String} The string representation of <code>param</code>.
*/
paramToString(param) {
if (param == undefined || param == null) {
return '';
}
if (param instanceof Date) {
return param.toJSON();
}
if (ApiClient.canBeJsonified(param)) {
return JSON.stringify(param);
}
return param.toString();
}
/**
* Returns a boolean indicating if the parameter could be JSON.stringified
* @param param The actual parameter
* @returns {Boolean} Flag indicating if <code>param</code> can be JSON.stringified
*/
static canBeJsonified(str) {
if (typeof str !== 'string' && typeof str !== 'object') return false;
try {
const type = str.toString();
return type === '[object Object]'
|| type === '[object Array]';
} catch (err) {
return false;
}
};
/**
* Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.
* NOTE: query parameters are not handled here.
* @param {String} path The path to append to the base URL.
* @param {Object} pathParams The parameter values to append.
* @param {String} apiBasePath Base path defined in the path, operation level to override the default one
* @returns {String} The encoded path with parameter values substituted.
*/
buildUrl(path, pathParams, apiBasePath) {
if (!path.match(/^\//)) {
path = '/' + path;
}
var url = this.basePath + path;
// use API (operation, path) base path if defined
if (apiBasePath !== null && apiBasePath !== undefined) {
url = apiBasePath + path;
}
url = url.replace(/\{([\w-\.]+)\}/g, (fullMatch, key) => {
var value;
if (pathParams.hasOwnProperty(key)) {
value = this.paramToString(pathParams[key]);
} else {
value = fullMatch;
}
return encodeURIComponent(value);
});
return url;
}
/**
* Checks whether the given content type represents JSON.<br>
* JSON content type examples:<br>
* <ul>
* <li>application/json</li>
* <li>application/json; charset=UTF8</li>
* <li>APPLICATION/JSON</li>
* </ul>
* @param {String} contentType The MIME content type to check.
* @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
*/
isJsonMime(contentType) {
return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
}
/**
* Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
* @param {Array.<String>} contentTypes
* @returns {String} The chosen content type, preferring JSON.
*/
jsonPreferredMime(contentTypes) {
for (var i = 0; i < contentTypes.length; i++) {
if (this.isJsonMime(contentTypes[i])) {
return contentTypes[i];
}
}
return contentTypes[0];
}
/**
* Checks whether the given parameter value represents file-like content.
* @param param The parameter to check.
* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
*/
isFileParam(param) {
// fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
if (typeof require === 'function') {
let fs;
try {
fs = require('fs');
} catch (err) {}
if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
return true;
}
}
// Buffer in Node.js
if (typeof Buffer === 'function' && param instanceof Buffer) {
return true;
}
// Blob in browser
if (typeof Blob === 'function' && param instanceof Blob) {
return true;
}
// File in browser (it seems File object is also instance of Blob, but keep this for safe)
if (typeof File === 'function' && param instanceof File) {
return true;
}
return false;
}
/**
* Normalizes parameter values:
* <ul>
* <li>remove nils</li>
* <li>keep files and arrays</li>
* <li>format to string with `paramToString` for other cases</li>
* </ul>
* @param {Object.<String, Object>} params The parameters as object properties.
* @returns {Object.<String, Object>} normalized parameters.
*/
normalizeParams(params) {
var newParams = {};
for (var key in params) {
if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {
var value = params[key];
if (this.isFileParam(value) || Array.isArray(value)) {
newParams[key] = value;
} else {
newParams[key] = this.paramToString(value);
}
}
}
return newParams;
}
/**
* Builds a string representation of an array-type actual parameter, according to the given collection format.
* @param {Array} param An array parameter.
* @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.
* @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns
* <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
*/
buildCollectionParam(param, collectionFormat) {
if (param == null) {
return null;
}
switch (collectionFormat) {
case 'csv':
return param.map(this.paramToString, this).join(',');
case 'ssv':
return param.map(this.paramToString, this).join(' ');
case 'tsv':
return param.map(this.paramToString, this).join('\t');
case 'pipes':
return param.map(this.paramToString, this).join('|');
case 'multi':
//return the array directly as SuperAgent will handle it as expected
return param.map(this.paramToString, this);
case 'passthrough':
return param;
default:
throw new Error('Unknown collection format: ' + collectionFormat);
}
}
/**
* Applies authentication headers to the request.
* @param {Object} request The request object created by a <code>superagent()</code> call.
* @param {Array.<String>} authNames An array of authentication method names.
*/
applyAuthToRequest(request, authNames) {
authNames.forEach((authName) => {
var auth = this.authentications[authName];
switch (auth.type) {
case 'basic':
if (auth.username || auth.password) {
request.auth(auth.username || '', auth.password || '');
}
break;
case 'bearer':
if (auth.accessToken) {
var localVarBearerToken = typeof auth.accessToken === 'function'
? auth.accessToken()
: auth.accessToken
request.set({'Authorization': 'Bearer ' + localVarBearerToken});
}
break;
case 'apiKey':
if (auth.apiKey) {
var data = {};
if (auth.apiKeyPrefix) {
data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;
} else {
data[auth.name] = auth.apiKey;
}
if (auth['in'] === 'header') {
request.set(data);
} else {
request.query(data);
}
}
break;
case 'oauth2':
if (auth.accessToken) {
request.set({'Authorization': 'Bearer ' + auth.accessToken});
}
break;
default:
throw new Error('Unknown authentication type: ' + auth.type);
}
});
}
/**
* Deserializes an HTTP response body into a value of the specified type.
* @param {Object} response A SuperAgent response object.
* @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
* all properties on <code>data<code> will be converted to this type.
* @returns A value of the specified type.
*/
deserialize(response, returnType) {
if (response == null || returnType == null || response.status == 204) {
return null;
}
// Rely on SuperAgent for parsing response body.
// See http://visionmedia.github.io/superagent/#parsing-response-bodies
var data = response.body;
if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {
// SuperAgent does not always produce a body; use the unparsed response as a fallback
data = response.text;
}
return ApiClient.convertToType(data, returnType);
}
/**
* Invokes the REST service using the supplied settings and parameters.
* @param {String} path The base URL to invoke.
* @param {String} httpMethod The HTTP method to use.
* @param {Object.<String, String>} pathParams A map of path parameters and their values.
* @param {Object.<String, Object>} queryParams A map of query parameters and their values.
* @param {Object.<String, Object>} headerParams A map of header parameters and their values.
* @param {Object.<String, Object>} formParams A map of form parameters and their values.
* @param {Object} bodyParam The value to pass as the request body.
* @param {Array.<String>} authNames An array of authentication type names.
* @param {Array.<String>} contentTypes An array of request MIME types.
* @param {Array.<String>} accepts An array of acceptable response MIME types.
* @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the
* constructor for a complex type.
* @param {String} apiBasePath base path defined in the operation/path level to override the default one
* @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.
*/
callApi(path, httpMethod, pathParams,
queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,
returnType, apiBasePath) {
var url = this.buildUrl(path, pathParams, apiBasePath);
var request = superagent(httpMethod, url);
if (this.plugins !== null) {
for (var index in this.plugins) {
if (this.plugins.hasOwnProperty(index)) {
request.use(this.plugins[index])
}
}
}
// apply authentications
this.applyAuthToRequest(request, authNames);
// set query parameters
if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {
queryParams['_'] = new Date().getTime();
}
request.query(this.normalizeParams(queryParams));
// set header parameters
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
// set requestAgent if it is set by user
if (this.requestAgent) {
request.agent(this.requestAgent);
}
// set request timeout
request.timeout(this.timeout);
var contentType = this.jsonPreferredMime(contentTypes);
if (contentType) {
// Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)
if(contentType != 'multipart/form-data') {
request.type(contentType);
}
}
if (contentType === 'application/x-www-form-urlencoded') {
request.send(querystring.stringify(this.normalizeParams(formParams)));
} else if (contentType == 'multipart/form-data') {
var _formParams = this.normalizeParams(formParams);
for (var key in _formParams) {
if (_formParams.hasOwnProperty(key)) {
let _formParamsValue = _formParams[key];
if (this.isFileParam(_formParamsValue)) {
// file field
request.attach(key, _formParamsValue);
} else if (Array.isArray(_formParamsValue) && _formParamsValue.length
&& this.isFileParam(_formParamsValue[0])) {
// multiple files
_formParamsValue.forEach(file => request.attach(key, file));
} else {
request.field(key, _formParamsValue);
}
}
}
} else if (bodyParam !== null && bodyParam !== undefined) {
if (!request.header['Content-Type']) {
request.type('application/json');
}
request.send(bodyParam);
}
var accept = this.jsonPreferredMime(accepts);
if (accept) {
request.accept(accept);
}
if (returnType === 'Blob') {
request.responseType('blob');
} else if (returnType === 'String') {
request.responseType('string');
}
// Attach previously saved cookies, if enabled
if (this.enableCookies){
if (typeof window === 'undefined') {
this.agent._attachCookies(request);
}
else {
request.withCredentials();
}
}
return new Promise((resolve, reject) => {
request.end((error, response) => {
if (error) {
var err = {};
if (response) {
err.status = response.status;
err.statusText = response.statusText;
err.body = response.body;
err.response = response;
}
err.error = error;
reject(err);
} else {
try {
var data = this.deserialize(response, returnType);
if (this.enableCookies && typeof window === 'undefined'){
this.agent._saveCookies(response);
}
resolve({data, response});
} catch (err) {
reject(err);
}
}
});
});
}
/**
* Parses an ISO-8601 string representation or epoch representation of a date value.
* @param {String} str The date value as a string.
* @returns {Date} The parsed date object.
*/
static parseDate(str) {
if (isNaN(str)) {
return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3'));
}
return new Date(+str);
}
/**
* Converts a value to the specified type.
* @param {(String|Object)} data The data to convert, as a string or object.
* @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
* all properties on <code>data<code> will be converted to this type.
* @returns An instance of the specified type or null or undefined if data is null or undefined.
*/
static convertToType(data, type) {
if (data === null || data === undefined)
return data
switch (type) {
case 'Boolean':
return Boolean(data);
case 'Integer':
return parseInt(data, 10);
case 'Number':
return parseFloat(data);
case 'String':
return String(data);
case 'Date':
return ApiClient.parseDate(String(data));
case 'Blob':
return data;
default:
if (type === Object) {
// generic object, return directly
return data;
} else if (typeof type.constructFromObject === 'function') {
// for model type like User and enum class
return type.constructFromObject(data);
} else if (Array.isArray(type)) {
// for array type like: ['String']
var itemType = type[0];
return data.map((item) => {
return ApiClient.convertToType(item, itemType);
});
} else if (typeof type === 'object') {
// for plain object type like: {'String': 'Integer'}
var keyType, valueType;
for (var k in type) {
if (type.hasOwnProperty(k)) {
keyType = k;
valueType = type[k];
break;
}
}
var result = {};
for (var k in data) {
if (data.hasOwnProperty(k)) {
var key = ApiClient.convertToType(k, keyType);
var value = ApiClient.convertToType(data[k], valueType);
result[key] = value;
}
}
return result;
} else {
// for unknown type, return the data directly
return data;
}
}
}
/**
* Gets an array of host settings
* @returns An array of host settings
*/
hostSettings() {
return [
{
'url': "",
'description': "No description provided",
}
];
}
getBasePathFromSettings(index, variables={}) {
var servers = this.hostSettings();
// check array index out of bound
if (index < 0 || index >= servers.length) {
throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length);
}
var server = servers[index];
var url = server['url'];
// go through variable and assign a value
for (var variable_name in server['variables']) {
if (variable_name in variables) {
let variable = server['variables'][variable_name];
if ( !('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name]) ) {
url = url.replace("{" + variable_name + "}", variables[variable_name]);
} else {
throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + ".");
}
} else {
// use default value
url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value'])
}
}
return url;
}
/**
* Constructs a new map or array model from REST data.
* @param data {Object|Array} The REST data.
* @param obj {Object|Array} The target object or array.
*/
static constructFromObject(data, obj, itemType) {
if (Array.isArray(data)) {
for (var i = 0; i < data.length; i++) {
if (data.hasOwnProperty(i))
obj[i] = ApiClient.convertToType(data[i], itemType);
}
} else {
for (var k in data) {
if (data.hasOwnProperty(k))
obj[k] = ApiClient.convertToType(data[k], itemType);
}
}
};
}
/**
* Enumeration of collection format separator strategies.
* @enum {String}
* @readonly
*/
ApiClient.CollectionFormatEnum = {
/**
* Comma-separated values. Value: <code>csv</code>
* @const
*/
CSV: ',',
/**
* Space-separated values. Value: <code>ssv</code>
* @const
*/
SSV: ' ',
/**
* Tab-separated values. Value: <code>tsv</code>
* @const
*/
TSV: '\t',
/**
* Pipe(|)-separated values. Value: <code>pipes</code>
* @const
*/
PIPES: '|',
/**
* Native array. Value: <code>multi</code>
* @const
*/
MULTI: 'multi'
};
/**
* The default API client implementation.
* @type {module:ApiClient}
*/
ApiClient.instance = new ApiClient();
export default ApiClient;

@ -0,0 +1,300 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from './ApiClient';
import AssignedTask from './model/AssignedTask';
import AvailableJobSetting from './model/AvailableJobSetting';
import AvailableJobSettingSubtype from './model/AvailableJobSettingSubtype';
import AvailableJobSettingType from './model/AvailableJobSettingType';
import AvailableJobType from './model/AvailableJobType';
import AvailableJobTypes from './model/AvailableJobTypes';
import Command from './model/Command';
import Error from './model/Error';
import FlamencoVersion from './model/FlamencoVersion';
import Job from './model/Job';
import JobAllOf from './model/JobAllOf';
import JobStatus from './model/JobStatus';
import ManagerConfiguration from './model/ManagerConfiguration';
import RegisteredWorker from './model/RegisteredWorker';
import SecurityError from './model/SecurityError';
import ShamanCheckout from './model/ShamanCheckout';
import ShamanCheckoutResult from './model/ShamanCheckoutResult';
import ShamanFileSpec from './model/ShamanFileSpec';
import ShamanFileSpecWithStatus from './model/ShamanFileSpecWithStatus';
import ShamanFileStatus from './model/ShamanFileStatus';
import ShamanRequirementsRequest from './model/ShamanRequirementsRequest';
import ShamanRequirementsResponse from './model/ShamanRequirementsResponse';
import ShamanSingleFileStatus from './model/ShamanSingleFileStatus';
import SubmittedJob from './model/SubmittedJob';
import TaskStatus from './model/TaskStatus';
import TaskUpdate from './model/TaskUpdate';
import WorkerRegistration from './model/WorkerRegistration';
import WorkerSignOn from './model/WorkerSignOn';
import WorkerStateChange from './model/WorkerStateChange';
import WorkerStateChanged from './model/WorkerStateChanged';
import WorkerStatus from './model/WorkerStatus';
import JobsApi from './manager/JobsApi';
import MetaApi from './manager/MetaApi';
import ShamanApi from './manager/ShamanApi';
import WorkerApi from './manager/WorkerApi';
/**
* Render_Farm_manager_API.<br>
* The <code>index</code> module provides access to constructors for all the classes which comprise the public API.
* <p>
* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
* <pre>
* var flamencoManager = require('index'); // See note below*.
* var xxxSvc = new flamencoManager.XxxApi(); // Allocate the API class we're going to use.
* var yyyModel = new flamencoManager.Yyy(); // Construct a model instance.
* yyyModel.someProperty = 'someValue';
* ...
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
* ...
* </pre>
* <em>*NOTE: For a top-level AMD script, use require(['index'], function(){...})
* and put the application logic within the callback function.</em>
* </p>
* <p>
* A non-AMD browser application (discouraged) might do something like this:
* <pre>
* var xxxSvc = new flamencoManager.XxxApi(); // Allocate the API class we're going to use.
* var yyy = new flamencoManager.Yyy(); // Construct a model instance.
* yyyModel.someProperty = 'someValue';
* ...
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
* ...
* </pre>
* </p>
* @module index
* @version 0.0.0
*/
export {
/**
* The ApiClient constructor.
* @property {module:ApiClient}
*/
ApiClient,
/**
* The AssignedTask model constructor.
* @property {module:model/AssignedTask}
*/
AssignedTask,
/**
* The AvailableJobSetting model constructor.
* @property {module:model/AvailableJobSetting}
*/
AvailableJobSetting,
/**
* The AvailableJobSettingSubtype model constructor.
* @property {module:model/AvailableJobSettingSubtype}
*/
AvailableJobSettingSubtype,
/**
* The AvailableJobSettingType model constructor.
* @property {module:model/AvailableJobSettingType}
*/
AvailableJobSettingType,
/**
* The AvailableJobType model constructor.
* @property {module:model/AvailableJobType}
*/
AvailableJobType,
/**
* The AvailableJobTypes model constructor.
* @property {module:model/AvailableJobTypes}
*/
AvailableJobTypes,
/**
* The Command model constructor.
* @property {module:model/Command}
*/
Command,
/**
* The Error model constructor.
* @property {module:model/Error}
*/
Error,
/**
* The FlamencoVersion model constructor.
* @property {module:model/FlamencoVersion}
*/
FlamencoVersion,
/**
* The Job model constructor.
* @property {module:model/Job}
*/
Job,
/**
* The JobAllOf model constructor.
* @property {module:model/JobAllOf}
*/
JobAllOf,
/**
* The JobStatus model constructor.
* @property {module:model/JobStatus}
*/
JobStatus,
/**
* The ManagerConfiguration model constructor.
* @property {module:model/ManagerConfiguration}
*/
ManagerConfiguration,
/**
* The RegisteredWorker model constructor.
* @property {module:model/RegisteredWorker}
*/
RegisteredWorker,
/**
* The SecurityError model constructor.
* @property {module:model/SecurityError}
*/
SecurityError,
/**
* The ShamanCheckout model constructor.
* @property {module:model/ShamanCheckout}
*/
ShamanCheckout,
/**
* The ShamanCheckoutResult model constructor.
* @property {module:model/ShamanCheckoutResult}
*/
ShamanCheckoutResult,
/**
* The ShamanFileSpec model constructor.
* @property {module:model/ShamanFileSpec}
*/
ShamanFileSpec,
/**
* The ShamanFileSpecWithStatus model constructor.
* @property {module:model/ShamanFileSpecWithStatus}
*/
ShamanFileSpecWithStatus,
/**
* The ShamanFileStatus model constructor.
* @property {module:model/ShamanFileStatus}
*/
ShamanFileStatus,
/**
* The ShamanRequirementsRequest model constructor.
* @property {module:model/ShamanRequirementsRequest}
*/
ShamanRequirementsRequest,
/**
* The ShamanRequirementsResponse model constructor.
* @property {module:model/ShamanRequirementsResponse}
*/
ShamanRequirementsResponse,
/**
* The ShamanSingleFileStatus model constructor.
* @property {module:model/ShamanSingleFileStatus}
*/
ShamanSingleFileStatus,
/**
* The SubmittedJob model constructor.
* @property {module:model/SubmittedJob}
*/
SubmittedJob,
/**
* The TaskStatus model constructor.
* @property {module:model/TaskStatus}
*/
TaskStatus,
/**
* The TaskUpdate model constructor.
* @property {module:model/TaskUpdate}
*/
TaskUpdate,
/**
* The WorkerRegistration model constructor.
* @property {module:model/WorkerRegistration}
*/
WorkerRegistration,
/**
* The WorkerSignOn model constructor.
* @property {module:model/WorkerSignOn}
*/
WorkerSignOn,
/**
* The WorkerStateChange model constructor.
* @property {module:model/WorkerStateChange}
*/
WorkerStateChange,
/**
* The WorkerStateChanged model constructor.
* @property {module:model/WorkerStateChanged}
*/
WorkerStateChanged,
/**
* The WorkerStatus model constructor.
* @property {module:model/WorkerStatus}
*/
WorkerStatus,
/**
* The JobsApi service constructor.
* @property {module:manager/JobsApi}
*/
JobsApi,
/**
* The MetaApi service constructor.
* @property {module:manager/MetaApi}
*/
MetaApi,
/**
* The ShamanApi service constructor.
* @property {module:manager/ShamanApi}
*/
ShamanApi,
/**
* The WorkerApi service constructor.
* @property {module:manager/WorkerApi}
*/
WorkerApi
};

@ -0,0 +1,171 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from "../ApiClient";
import AvailableJobTypes from '../model/AvailableJobTypes';
import Error from '../model/Error';
import Job from '../model/Job';
import SubmittedJob from '../model/SubmittedJob';
/**
* Jobs service.
* @module manager/JobsApi
* @version 0.0.0
*/
export default class JobsApi {
/**
* Constructs a new JobsApi.
* @alias module:manager/JobsApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Fetch info about the job.
* @param {String} jobId
* @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) {
let postBody = null;
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw new Error("Missing the required parameter 'jobId' when calling fetchJob");
}
let pathParams = {
'job_id': jobId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = Job;
return this.apiClient.callApi(
'/api/jobs/{job_id}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Fetch info about the job.
* @param {String} jobId
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job}
*/
fetchJob(jobId) {
return this.fetchJobWithHttpInfo(jobId)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Get list of job types and their parameters.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AvailableJobTypes} and HTTP response
*/
getJobTypesWithHttpInfo() {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = AvailableJobTypes;
return this.apiClient.callApi(
'/api/jobs/types', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Get list of job types and their parameters.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AvailableJobTypes}
*/
getJobTypes() {
return this.getJobTypesWithHttpInfo()
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Submit a new job for Flamenco Manager to execute.
* @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
*/
submitJobWithHttpInfo(submittedJob) {
let postBody = submittedJob;
// verify the required parameter 'submittedJob' is set
if (submittedJob === undefined || submittedJob === null) {
throw new Error("Missing the required parameter 'submittedJob' when calling submitJob");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = Job;
return this.apiClient.callApi(
'/api/jobs', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Submit a new job for Flamenco Manager to execute.
* @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}
*/
submitJob(submittedJob) {
return this.submitJobWithHttpInfo(submittedJob)
.then(function(response_and_data) {
return response_and_data.data;
});
}
}

@ -0,0 +1,117 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from "../ApiClient";
import FlamencoVersion from '../model/FlamencoVersion';
import ManagerConfiguration from '../model/ManagerConfiguration';
/**
* Meta service.
* @module manager/MetaApi
* @version 0.0.0
*/
export default class MetaApi {
/**
* Constructs a new MetaApi.
* @alias module:manager/MetaApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Get the configuration of this Manager.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ManagerConfiguration} and HTTP response
*/
getConfigurationWithHttpInfo() {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = ManagerConfiguration;
return this.apiClient.callApi(
'/api/configuration', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Get the configuration of this Manager.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ManagerConfiguration}
*/
getConfiguration() {
return this.getConfigurationWithHttpInfo()
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Get the Flamenco version of this Manager
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/FlamencoVersion} and HTTP response
*/
getVersionWithHttpInfo() {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = FlamencoVersion;
return this.apiClient.callApi(
'/api/version', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Get the Flamenco version of this Manager
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/FlamencoVersion}
*/
getVersion() {
return this.getVersionWithHttpInfo()
.then(function(response_and_data) {
return response_and_data.data;
});
}
}

@ -0,0 +1,254 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from "../ApiClient";
import Error from '../model/Error';
import ShamanCheckout from '../model/ShamanCheckout';
import ShamanCheckoutResult from '../model/ShamanCheckoutResult';
import ShamanRequirementsRequest from '../model/ShamanRequirementsRequest';
import ShamanRequirementsResponse from '../model/ShamanRequirementsResponse';
import ShamanSingleFileStatus from '../model/ShamanSingleFileStatus';
/**
* Shaman service.
* @module manager/ShamanApi
* @version 0.0.0
*/
export default class ShamanApi {
/**
* Constructs a new ShamanApi.
* @alias module:manager/ShamanApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* 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.
* @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) {
let postBody = shamanCheckout;
// verify the required parameter 'shamanCheckout' is set
if (shamanCheckout === undefined || shamanCheckout === null) {
throw new Error("Missing the required parameter 'shamanCheckout' when calling shamanCheckout");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = ShamanCheckoutResult;
return this.apiClient.callApi(
'/shaman/checkout/create', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* 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.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShamanCheckoutResult}
*/
shamanCheckout(shamanCheckout) {
return this.shamanCheckoutWithHttpInfo(shamanCheckout)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Checks a Shaman Requirements file, and reports which files are unknown.
* @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
*/
shamanCheckoutRequirementsWithHttpInfo(shamanRequirementsRequest) {
let postBody = shamanRequirementsRequest;
// verify the required parameter 'shamanRequirementsRequest' is set
if (shamanRequirementsRequest === undefined || shamanRequirementsRequest === null) {
throw new Error("Missing the required parameter 'shamanRequirementsRequest' when calling shamanCheckoutRequirements");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = ShamanRequirementsResponse;
return this.apiClient.callApi(
'/shaman/checkout/requirements', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Checks a Shaman Requirements file, and reports which files are unknown.
* @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}
*/
shamanCheckoutRequirements(shamanRequirementsRequest) {
return this.shamanCheckoutRequirementsWithHttpInfo(shamanRequirementsRequest)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file's contents should be sent in the request body.
* @param {String} checksum SHA256 checksum of the file.
* @param {Number} filesize Size of the file in bytes.
* @param {File} body Contents of the file
* @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 {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.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
shamanFileStoreWithHttpInfo(checksum, filesize, body, opts) {
opts = opts || {};
let postBody = body;
// verify the required parameter 'checksum' is set
if (checksum === undefined || checksum === null) {
throw new Error("Missing the required parameter 'checksum' when calling shamanFileStore");
}
// verify the required parameter 'filesize' is set
if (filesize === undefined || filesize === null) {
throw new Error("Missing the required parameter 'filesize' when calling shamanFileStore");
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling shamanFileStore");
}
let pathParams = {
'checksum': checksum,
'filesize': filesize
};
let queryParams = {
};
let headerParams = {
'X-Shaman-Can-Defer-Upload': opts['xShamanCanDeferUpload'],
'X-Shaman-Original-Filename': opts['xShamanOriginalFilename']
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/octet-stream'];
let accepts = ['application/json'];
let returnType = null;
return this.apiClient.callApi(
'/shaman/files/{checksum}/{filesize}', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file's contents should be sent in the request body.
* @param {String} checksum SHA256 checksum of the file.
* @param {Number} filesize Size of the file in bytes.
* @param {File} body Contents of the file
* @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 {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.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
shamanFileStore(checksum, filesize, body, opts) {
return this.shamanFileStoreWithHttpInfo(checksum, filesize, body, opts)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Check the status of a file on the Shaman server.
* @param {String} checksum SHA256 checksum of the file.
* @param {Number} filesize Size of the file in bytes.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShamanSingleFileStatus} and HTTP response
*/
shamanFileStoreCheckWithHttpInfo(checksum, filesize) {
let postBody = null;
// verify the required parameter 'checksum' is set
if (checksum === undefined || checksum === null) {
throw new Error("Missing the required parameter 'checksum' when calling shamanFileStoreCheck");
}
// verify the required parameter 'filesize' is set
if (filesize === undefined || filesize === null) {
throw new Error("Missing the required parameter 'filesize' when calling shamanFileStoreCheck");
}
let pathParams = {
'checksum': checksum,
'filesize': filesize
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = ShamanSingleFileStatus;
return this.apiClient.callApi(
'/shaman/files/{checksum}/{filesize}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Check the status of a file on the Shaman server.
* @param {String} checksum SHA256 checksum of the file.
* @param {Number} filesize Size of the file in bytes.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShamanSingleFileStatus}
*/
shamanFileStoreCheck(checksum, filesize) {
return this.shamanFileStoreCheckWithHttpInfo(checksum, filesize)
.then(function(response_and_data) {
return response_and_data.data;
});
}
}

@ -0,0 +1,348 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from "../ApiClient";
import AssignedTask from '../model/AssignedTask';
import Error from '../model/Error';
import RegisteredWorker from '../model/RegisteredWorker';
import SecurityError from '../model/SecurityError';
import TaskUpdate from '../model/TaskUpdate';
import WorkerRegistration from '../model/WorkerRegistration';
import WorkerSignOn from '../model/WorkerSignOn';
import WorkerStateChange from '../model/WorkerStateChange';
import WorkerStateChanged from '../model/WorkerStateChanged';
/**
* Worker service.
* @module manager/WorkerApi
* @version 0.0.0
*/
export default class WorkerApi {
/**
* Constructs a new WorkerApi.
* @alias module:manager/WorkerApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Register a new worker
* @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
*/
registerWorkerWithHttpInfo(workerRegistration) {
let postBody = workerRegistration;
// verify the required parameter 'workerRegistration' is set
if (workerRegistration === undefined || workerRegistration === null) {
throw new Error("Missing the required parameter 'workerRegistration' when calling registerWorker");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = RegisteredWorker;
return this.apiClient.callApi(
'/api/worker/register-worker', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Register a new worker
* @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}
*/
registerWorker(workerRegistration) {
return this.registerWorkerWithHttpInfo(workerRegistration)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Obtain a new task to execute
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AssignedTask} and HTTP response
*/
scheduleTaskWithHttpInfo() {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['worker_auth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = AssignedTask;
return this.apiClient.callApi(
'/api/worker/task', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Obtain a new task to execute
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AssignedTask}
*/
scheduleTask() {
return this.scheduleTaskWithHttpInfo()
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Mark the worker as offline
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
signOffWithHttpInfo() {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['worker_auth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = null;
return this.apiClient.callApi(
'/api/worker/sign-off', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Mark the worker as offline
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
signOff() {
return this.signOffWithHttpInfo()
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Authenticate & sign in the worker.
* @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
*/
signOnWithHttpInfo(workerSignOn) {
let postBody = workerSignOn;
// verify the required parameter 'workerSignOn' is set
if (workerSignOn === undefined || workerSignOn === null) {
throw new Error("Missing the required parameter 'workerSignOn' when calling signOn");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['worker_auth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = WorkerStateChange;
return this.apiClient.callApi(
'/api/worker/sign-on', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Authenticate & sign in the worker.
* @param {module:model/WorkerSignOn} workerSignOn Worker metadata
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WorkerStateChange}
*/
signOn(workerSignOn) {
return this.signOnWithHttpInfo(workerSignOn)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Update the task, typically to indicate progress, completion, or failure.
* @param {String} taskId
* @param {module:model/TaskUpdate} taskUpdate Task update information
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
taskUpdateWithHttpInfo(taskId, taskUpdate) {
let postBody = taskUpdate;
// verify the required parameter 'taskId' is set
if (taskId === undefined || taskId === null) {
throw new Error("Missing the required parameter 'taskId' when calling taskUpdate");
}
// verify the required parameter 'taskUpdate' is set
if (taskUpdate === undefined || taskUpdate === null) {
throw new Error("Missing the required parameter 'taskUpdate' when calling taskUpdate");
}
let pathParams = {
'task_id': taskId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['worker_auth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = null;
return this.apiClient.callApi(
'/api/worker/task/{task_id}', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Update the task, typically to indicate progress, completion, or failure.
* @param {String} taskId
* @param {module:model/TaskUpdate} taskUpdate Task update information
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
taskUpdate(taskId, taskUpdate) {
return this.taskUpdateWithHttpInfo(taskId, taskUpdate)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WorkerStateChange} and HTTP response
*/
workerStateWithHttpInfo() {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['worker_auth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = WorkerStateChange;
return this.apiClient.callApi(
'/api/worker/state', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WorkerStateChange}
*/
workerState() {
return this.workerStateWithHttpInfo()
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* 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
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
workerStateChangedWithHttpInfo(workerStateChanged) {
let postBody = workerStateChanged;
// verify the required parameter 'workerStateChanged' is set
if (workerStateChanged === undefined || workerStateChanged === null) {
throw new Error("Missing the required parameter 'workerStateChanged' when calling workerStateChanged");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['worker_auth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = null;
return this.apiClient.callApi(
'/api/worker/state-changed', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* 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
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
workerStateChanged(workerStateChanged) {
return this.workerStateChangedWithHttpInfo(workerStateChanged)
.then(function(response_and_data) {
return response_and_data.data;
});
}
}

@ -0,0 +1,156 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import Command from './Command';
import TaskStatus from './TaskStatus';
/**
* The AssignedTask model module.
* @module model/AssignedTask
* @version 0.0.0
*/
class AssignedTask {
/**
* Constructs a new <code>AssignedTask</code>.
* AssignedTask is a task as it is received by the Worker.
* @alias module:model/AssignedTask
* @param uuid {String}
* @param job {String}
* @param name {String}
* @param status {module:model/TaskStatus}
* @param priority {Number}
* @param jobPriority {Number}
* @param jobType {String}
* @param taskType {String}
* @param commands {Array.<module:model/Command>}
*/
constructor(uuid, job, name, status, priority, jobPriority, jobType, taskType, commands) {
AssignedTask.initialize(this, uuid, job, name, status, priority, jobPriority, jobType, taskType, commands);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, uuid, job, name, status, priority, jobPriority, jobType, taskType, commands) {
obj['uuid'] = uuid;
obj['job'] = job;
obj['name'] = name;
obj['status'] = status;
obj['priority'] = priority;
obj['job_priority'] = jobPriority;
obj['job_type'] = jobType;
obj['task_type'] = taskType;
obj['commands'] = commands;
}
/**
* Constructs a <code>AssignedTask</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/AssignedTask} obj Optional instance to populate.
* @return {module:model/AssignedTask} The populated <code>AssignedTask</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new AssignedTask();
if (data.hasOwnProperty('uuid')) {
obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String');
}
if (data.hasOwnProperty('job')) {
obj['job'] = ApiClient.convertToType(data['job'], 'String');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('status')) {
obj['status'] = TaskStatus.constructFromObject(data['status']);
}
if (data.hasOwnProperty('priority')) {
obj['priority'] = ApiClient.convertToType(data['priority'], 'Number');
}
if (data.hasOwnProperty('job_priority')) {
obj['job_priority'] = ApiClient.convertToType(data['job_priority'], 'Number');
}
if (data.hasOwnProperty('job_type')) {
obj['job_type'] = ApiClient.convertToType(data['job_type'], 'String');
}
if (data.hasOwnProperty('task_type')) {
obj['task_type'] = ApiClient.convertToType(data['task_type'], 'String');
}
if (data.hasOwnProperty('commands')) {
obj['commands'] = ApiClient.convertToType(data['commands'], [Command]);
}
}
return obj;
}
}
/**
* @member {String} uuid
*/
AssignedTask.prototype['uuid'] = undefined;
/**
* @member {String} job
*/
AssignedTask.prototype['job'] = undefined;
/**
* @member {String} name
*/
AssignedTask.prototype['name'] = undefined;
/**
* @member {module:model/TaskStatus} status
*/
AssignedTask.prototype['status'] = undefined;
/**
* @member {Number} priority
*/
AssignedTask.prototype['priority'] = undefined;
/**
* @member {Number} job_priority
*/
AssignedTask.prototype['job_priority'] = undefined;
/**
* @member {String} job_type
*/
AssignedTask.prototype['job_type'] = undefined;
/**
* @member {String} task_type
*/
AssignedTask.prototype['task_type'] = undefined;
/**
* @member {Array.<module:model/Command>} commands
*/
AssignedTask.prototype['commands'] = undefined;
export default AssignedTask;

@ -0,0 +1,170 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import AvailableJobSettingSubtype from './AvailableJobSettingSubtype';
import AvailableJobSettingType from './AvailableJobSettingType';
/**
* The AvailableJobSetting model module.
* @module model/AvailableJobSetting
* @version 0.0.0
*/
class AvailableJobSetting {
/**
* Constructs a new <code>AvailableJobSetting</code>.
* Single setting of a Job types.
* @alias module:model/AvailableJobSetting
* @param key {String} Identifier for the setting, must be unique within the job type.
* @param type {module:model/AvailableJobSettingType}
*/
constructor(key, type) {
AvailableJobSetting.initialize(this, key, type);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, key, type) {
obj['key'] = key;
obj['type'] = type;
}
/**
* Constructs a <code>AvailableJobSetting</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/AvailableJobSetting} obj Optional instance to populate.
* @return {module:model/AvailableJobSetting} The populated <code>AvailableJobSetting</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new AvailableJobSetting();
if (data.hasOwnProperty('key')) {
obj['key'] = ApiClient.convertToType(data['key'], 'String');
}
if (data.hasOwnProperty('type')) {
obj['type'] = AvailableJobSettingType.constructFromObject(data['type']);
}
if (data.hasOwnProperty('subtype')) {
obj['subtype'] = AvailableJobSettingSubtype.constructFromObject(data['subtype']);
}
if (data.hasOwnProperty('choices')) {
obj['choices'] = ApiClient.convertToType(data['choices'], ['String']);
}
if (data.hasOwnProperty('propargs')) {
obj['propargs'] = ApiClient.convertToType(data['propargs'], Object);
}
if (data.hasOwnProperty('description')) {
obj['description'] = ApiClient.convertToType(data['description'], Object);
}
if (data.hasOwnProperty('default')) {
obj['default'] = ApiClient.convertToType(data['default'], Object);
}
if (data.hasOwnProperty('eval')) {
obj['eval'] = ApiClient.convertToType(data['eval'], 'String');
}
if (data.hasOwnProperty('visible')) {
obj['visible'] = ApiClient.convertToType(data['visible'], 'Boolean');
}
if (data.hasOwnProperty('required')) {
obj['required'] = ApiClient.convertToType(data['required'], 'Boolean');
}
if (data.hasOwnProperty('editable')) {
obj['editable'] = ApiClient.convertToType(data['editable'], 'Boolean');
}
}
return obj;
}
}
/**
* Identifier for the setting, must be unique within the job type.
* @member {String} key
*/
AvailableJobSetting.prototype['key'] = undefined;
/**
* @member {module:model/AvailableJobSettingType} type
*/
AvailableJobSetting.prototype['type'] = undefined;
/**
* @member {module:model/AvailableJobSettingSubtype} subtype
*/
AvailableJobSetting.prototype['subtype'] = undefined;
/**
* When given, limit the valid values to these choices. Only usable with string type.
* @member {Array.<String>} choices
*/
AvailableJobSetting.prototype['choices'] = undefined;
/**
* Any extra arguments to the bpy.props.SomeProperty() call used to create this property.
* @member {Object} propargs
*/
AvailableJobSetting.prototype['propargs'] = undefined;
/**
* The description/tooltip shown in the user interface.
* @member {Object} description
*/
AvailableJobSetting.prototype['description'] = undefined;
/**
* The default value shown to the user when determining this setting.
* @member {Object} default
*/
AvailableJobSetting.prototype['default'] = undefined;
/**
* Python expression to be evaluated in order to determine the default value for this setting.
* @member {String} eval
*/
AvailableJobSetting.prototype['eval'] = undefined;
/**
* Whether to show this setting in the UI of a job submitter (like a Blender add-on). Set to `false` when it is an internal setting that shouldn't be shown to end users.
* @member {Boolean} visible
* @default true
*/
AvailableJobSetting.prototype['visible'] = true;
/**
* Whether to immediately reject a job definition, of this type, without this particular setting.
* @member {Boolean} required
* @default false
*/
AvailableJobSetting.prototype['required'] = false;
/**
* Whether to allow editing this setting after the job has been submitted. Would imply deleting all existing tasks for this job, and recompiling it.
* @member {Boolean} editable
* @default false
*/
AvailableJobSetting.prototype['editable'] = false;
export default AvailableJobSetting;

@ -0,0 +1,60 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* Enum class AvailableJobSettingSubtype.
* @enum {}
* @readonly
*/
export default class AvailableJobSettingSubtype {
/**
* value: "file_path"
* @const
*/
"file_path" = "file_path";
/**
* value: "dir_path"
* @const
*/
"dir_path" = "dir_path";
/**
* value: "file_name"
* @const
*/
"file_name" = "file_name";
/**
* value: "hashed_file_path"
* @const
*/
"hashed_file_path" = "hashed_file_path";
/**
* Returns a <code>AvailableJobSettingSubtype</code> enum value from a Javascript object name.
* @param {Object} data The plain JavaScript object containing the name of the enum value.
* @return {module:model/AvailableJobSettingSubtype} The enum <code>AvailableJobSettingSubtype</code> value.
*/
static constructFromObject(object) {
return object;
}
}

@ -0,0 +1,60 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* Enum class AvailableJobSettingType.
* @enum {}
* @readonly
*/
export default class AvailableJobSettingType {
/**
* value: "string"
* @const
*/
"string" = "string";
/**
* value: "int32"
* @const
*/
"int32" = "int32";
/**
* value: "float"
* @const
*/
"float" = "float";
/**
* value: "bool"
* @const
*/
"bool" = "bool";
/**
* Returns a <code>AvailableJobSettingType</code> enum value from a Javascript object name.
* @param {Object} data The plain JavaScript object containing the name of the enum value.
* @return {module:model/AvailableJobSettingType} The enum <code>AvailableJobSettingType</code> value.
*/
static constructFromObject(object) {
return object;
}
}

@ -0,0 +1,95 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import AvailableJobSetting from './AvailableJobSetting';
/**
* The AvailableJobType model module.
* @module model/AvailableJobType
* @version 0.0.0
*/
class AvailableJobType {
/**
* Constructs a new <code>AvailableJobType</code>.
* Job type supported by this Manager, and its parameters.
* @alias module:model/AvailableJobType
* @param name {String}
* @param label {String}
* @param settings {Array.<module:model/AvailableJobSetting>}
*/
constructor(name, label, settings) {
AvailableJobType.initialize(this, name, label, settings);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, name, label, settings) {
obj['name'] = name;
obj['label'] = label;
obj['settings'] = settings;
}
/**
* Constructs a <code>AvailableJobType</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/AvailableJobType} obj Optional instance to populate.
* @return {module:model/AvailableJobType} The populated <code>AvailableJobType</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new AvailableJobType();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('label')) {
obj['label'] = ApiClient.convertToType(data['label'], 'String');
}
if (data.hasOwnProperty('settings')) {
obj['settings'] = ApiClient.convertToType(data['settings'], [AvailableJobSetting]);
}
}
return obj;
}
}
/**
* @member {String} name
*/
AvailableJobType.prototype['name'] = undefined;
/**
* @member {String} label
*/
AvailableJobType.prototype['label'] = undefined;
/**
* @member {Array.<module:model/AvailableJobSetting>} settings
*/
AvailableJobType.prototype['settings'] = undefined;
export default AvailableJobType;

@ -0,0 +1,75 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import AvailableJobType from './AvailableJobType';
/**
* The AvailableJobTypes model module.
* @module model/AvailableJobTypes
* @version 0.0.0
*/
class AvailableJobTypes {
/**
* Constructs a new <code>AvailableJobTypes</code>.
* List of job types supported by this Manager.
* @alias module:model/AvailableJobTypes
* @param jobTypes {Array.<module:model/AvailableJobType>}
*/
constructor(jobTypes) {
AvailableJobTypes.initialize(this, jobTypes);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, jobTypes) {
obj['job_types'] = jobTypes;
}
/**
* Constructs a <code>AvailableJobTypes</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/AvailableJobTypes} obj Optional instance to populate.
* @return {module:model/AvailableJobTypes} The populated <code>AvailableJobTypes</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new AvailableJobTypes();
if (data.hasOwnProperty('job_types')) {
obj['job_types'] = ApiClient.convertToType(data['job_types'], [AvailableJobType]);
}
}
return obj;
}
}
/**
* @member {Array.<module:model/AvailableJobType>} job_types
*/
AvailableJobTypes.prototype['job_types'] = undefined;
export default AvailableJobTypes;

@ -0,0 +1,84 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The Command model module.
* @module model/Command
* @version 0.0.0
*/
class Command {
/**
* Constructs a new <code>Command</code>.
* Command represents a single command to execute by the Worker.
* @alias module:model/Command
* @param name {String}
* @param parameters {Object}
*/
constructor(name, parameters) {
Command.initialize(this, name, parameters);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, name, parameters) {
obj['name'] = name;
obj['parameters'] = parameters;
}
/**
* Constructs a <code>Command</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Command} obj Optional instance to populate.
* @return {module:model/Command} The populated <code>Command</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Command();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('parameters')) {
obj['parameters'] = ApiClient.convertToType(data['parameters'], Object);
}
}
return obj;
}
}
/**
* @member {String} name
*/
Command.prototype['name'] = undefined;
/**
* @member {Object} parameters
*/
Command.prototype['parameters'] = undefined;
export default Command;

@ -0,0 +1,83 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The Error model module.
* @module model/Error
* @version 0.0.0
*/
class Error {
/**
* Constructs a new <code>Error</code>.
* @alias module:model/Error
* @param code {Number}
* @param message {String}
*/
constructor(code, message) {
Error.initialize(this, code, message);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, code, message) {
obj['code'] = code;
obj['message'] = message;
}
/**
* Constructs a <code>Error</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Error} obj Optional instance to populate.
* @return {module:model/Error} The populated <code>Error</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Error();
if (data.hasOwnProperty('code')) {
obj['code'] = ApiClient.convertToType(data['code'], 'Number');
}
if (data.hasOwnProperty('message')) {
obj['message'] = ApiClient.convertToType(data['message'], 'String');
}
}
return obj;
}
}
/**
* @member {Number} code
*/
Error.prototype['code'] = undefined;
/**
* @member {String} message
*/
Error.prototype['message'] = undefined;
export default Error;

@ -0,0 +1,83 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The FlamencoVersion model module.
* @module model/FlamencoVersion
* @version 0.0.0
*/
class FlamencoVersion {
/**
* Constructs a new <code>FlamencoVersion</code>.
* @alias module:model/FlamencoVersion
* @param version {String}
* @param name {String}
*/
constructor(version, name) {
FlamencoVersion.initialize(this, version, name);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, version, name) {
obj['version'] = version;
obj['name'] = name;
}
/**
* Constructs a <code>FlamencoVersion</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/FlamencoVersion} obj Optional instance to populate.
* @return {module:model/FlamencoVersion} The populated <code>FlamencoVersion</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new FlamencoVersion();
if (data.hasOwnProperty('version')) {
obj['version'] = ApiClient.convertToType(data['version'], 'String');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
}
return obj;
}
}
/**
* @member {String} version
*/
FlamencoVersion.prototype['version'] = undefined;
/**
* @member {String} name
*/
FlamencoVersion.prototype['name'] = undefined;
export default FlamencoVersion;

@ -0,0 +1,204 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import JobAllOf from './JobAllOf';
import JobStatus from './JobStatus';
import SubmittedJob from './SubmittedJob';
/**
* The Job model module.
* @module model/Job
* @version 0.0.0
*/
class Job {
/**
* Constructs a new <code>Job</code>.
* @alias module:model/Job
* @implements module:model/SubmittedJob
* @implements module:model/JobAllOf
* @param name {String}
* @param type {String}
* @param priority {Number}
* @param id {String} UUID of the Job
* @param created {Date} Creation timestamp
* @param updated {Date} Creation timestamp
* @param status {module:model/JobStatus}
*/
constructor(name, type, priority, id, created, updated, status) {
SubmittedJob.initialize(this, name, type, priority);JobAllOf.initialize(this, id, created, updated, status);
Job.initialize(this, name, type, priority, id, created, updated, status);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, name, type, priority, id, created, updated, status) {
obj['name'] = name;
obj['type'] = type;
obj['priority'] = priority || 50;
obj['id'] = id;
obj['created'] = created;
obj['updated'] = updated;
obj['status'] = status;
}
/**
* Constructs a <code>Job</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Job} obj Optional instance to populate.
* @return {module:model/Job} The populated <code>Job</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Job();
SubmittedJob.constructFromObject(data, obj);
JobAllOf.constructFromObject(data, obj);
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('type')) {
obj['type'] = ApiClient.convertToType(data['type'], 'String');
}
if (data.hasOwnProperty('priority')) {
obj['priority'] = ApiClient.convertToType(data['priority'], 'Number');
}
if (data.hasOwnProperty('settings')) {
obj['settings'] = ApiClient.convertToType(data['settings'], {'String': Object});
}
if (data.hasOwnProperty('metadata')) {
obj['metadata'] = ApiClient.convertToType(data['metadata'], {'String': 'String'});
}
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('created')) {
obj['created'] = ApiClient.convertToType(data['created'], 'Date');
}
if (data.hasOwnProperty('updated')) {
obj['updated'] = ApiClient.convertToType(data['updated'], 'Date');
}
if (data.hasOwnProperty('status')) {
obj['status'] = JobStatus.constructFromObject(data['status']);
}
}
return obj;
}
}
/**
* @member {String} name
*/
Job.prototype['name'] = undefined;
/**
* @member {String} type
*/
Job.prototype['type'] = undefined;
/**
* @member {Number} priority
* @default 50
*/
Job.prototype['priority'] = 50;
/**
* @member {Object.<String, Object>} settings
*/
Job.prototype['settings'] = undefined;
/**
* Arbitrary metadata strings. More complex structures can be modeled by using `a.b.c` notation for the key.
* @member {Object.<String, String>} metadata
*/
Job.prototype['metadata'] = undefined;
/**
* UUID of the Job
* @member {String} id
*/
Job.prototype['id'] = undefined;
/**
* Creation timestamp
* @member {Date} created
*/
Job.prototype['created'] = undefined;
/**
* Creation timestamp
* @member {Date} updated
*/
Job.prototype['updated'] = undefined;
/**
* @member {module:model/JobStatus} status
*/
Job.prototype['status'] = undefined;
// Implement SubmittedJob interface:
/**
* @member {String} name
*/
SubmittedJob.prototype['name'] = undefined;
/**
* @member {String} type
*/
SubmittedJob.prototype['type'] = undefined;
/**
* @member {Number} priority
* @default 50
*/
SubmittedJob.prototype['priority'] = 50;
/**
* @member {Object.<String, Object>} settings
*/
SubmittedJob.prototype['settings'] = undefined;
/**
* Arbitrary metadata strings. More complex structures can be modeled by using `a.b.c` notation for the key.
* @member {Object.<String, String>} metadata
*/
SubmittedJob.prototype['metadata'] = undefined;
// Implement JobAllOf interface:
/**
* UUID of the Job
* @member {String} id
*/
JobAllOf.prototype['id'] = undefined;
/**
* Creation timestamp
* @member {Date} created
*/
JobAllOf.prototype['created'] = undefined;
/**
* Creation timestamp
* @member {Date} updated
*/
JobAllOf.prototype['updated'] = undefined;
/**
* @member {module:model/JobStatus} status
*/
JobAllOf.prototype['status'] = undefined;
export default Job;

@ -0,0 +1,107 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import JobStatus from './JobStatus';
/**
* The JobAllOf model module.
* @module model/JobAllOf
* @version 0.0.0
*/
class JobAllOf {
/**
* Constructs a new <code>JobAllOf</code>.
* @alias module:model/JobAllOf
* @param id {String} UUID of the Job
* @param created {Date} Creation timestamp
* @param updated {Date} Creation timestamp
* @param status {module:model/JobStatus}
*/
constructor(id, created, updated, status) {
JobAllOf.initialize(this, id, created, updated, status);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, id, created, updated, status) {
obj['id'] = id;
obj['created'] = created;
obj['updated'] = updated;
obj['status'] = status;
}
/**
* Constructs a <code>JobAllOf</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/JobAllOf} obj Optional instance to populate.
* @return {module:model/JobAllOf} The populated <code>JobAllOf</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new JobAllOf();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('created')) {
obj['created'] = ApiClient.convertToType(data['created'], 'Date');
}
if (data.hasOwnProperty('updated')) {
obj['updated'] = ApiClient.convertToType(data['updated'], 'Date');
}
if (data.hasOwnProperty('status')) {
obj['status'] = JobStatus.constructFromObject(data['status']);
}
}
return obj;
}
}
/**
* UUID of the Job
* @member {String} id
*/
JobAllOf.prototype['id'] = undefined;
/**
* Creation timestamp
* @member {Date} created
*/
JobAllOf.prototype['created'] = undefined;
/**
* Creation timestamp
* @member {Date} updated
*/
JobAllOf.prototype['updated'] = undefined;
/**
* @member {module:model/JobStatus} status
*/
JobAllOf.prototype['status'] = undefined;
export default JobAllOf;

@ -0,0 +1,130 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* Enum class JobStatus.
* @enum {}
* @readonly
*/
export default class JobStatus {
/**
* value: "active"
* @const
*/
"active" = "active";
/**
* value: "canceled"
* @const
*/
"canceled" = "canceled";
/**
* value: "completed"
* @const
*/
"completed" = "completed";
/**
* value: "construction-failed"
* @const
*/
"construction-failed" = "construction-failed";
/**
* value: "failed"
* @const
*/
"failed" = "failed";
/**
* value: "paused"
* @const
*/
"paused" = "paused";
/**
* value: "queued"
* @const
*/
"queued" = "queued";
/**
* value: "archived"
* @const
*/
"archived" = "archived";
/**
* value: "archiving"
* @const
*/
"archiving" = "archiving";
/**
* value: "cancel-requested"
* @const
*/
"cancel-requested" = "cancel-requested";
/**
* value: "fail-requested"
* @const
*/
"fail-requested" = "fail-requested";
/**
* value: "requeued"
* @const
*/
"requeued" = "requeued";
/**
* value: "under-construction"
* @const
*/
"under-construction" = "under-construction";
/**
* value: "waiting-for-files"
* @const
*/
"waiting-for-files" = "waiting-for-files";
/**
* Returns a <code>JobStatus</code> enum value from a Javascript object name.
* @param {Object} data The plain JavaScript object containing the name of the enum value.
* @return {module:model/JobStatus} The enum <code>JobStatus</code> value.
*/
static constructFromObject(object) {
return object;
}
}

@ -0,0 +1,85 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The ManagerConfiguration model module.
* @module model/ManagerConfiguration
* @version 0.0.0
*/
class ManagerConfiguration {
/**
* Constructs a new <code>ManagerConfiguration</code>.
* @alias module:model/ManagerConfiguration
* @param storageLocation {String} Directory used for job file storage.
* @param shamanEnabled {Boolean} Whether the Shaman file transfer API is available.
*/
constructor(storageLocation, shamanEnabled) {
ManagerConfiguration.initialize(this, storageLocation, shamanEnabled);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, storageLocation, shamanEnabled) {
obj['storageLocation'] = storageLocation;
obj['shamanEnabled'] = shamanEnabled;
}
/**
* Constructs a <code>ManagerConfiguration</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ManagerConfiguration} obj Optional instance to populate.
* @return {module:model/ManagerConfiguration} The populated <code>ManagerConfiguration</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ManagerConfiguration();
if (data.hasOwnProperty('storageLocation')) {
obj['storageLocation'] = ApiClient.convertToType(data['storageLocation'], 'String');
}
if (data.hasOwnProperty('shamanEnabled')) {
obj['shamanEnabled'] = ApiClient.convertToType(data['shamanEnabled'], 'Boolean');
}
}
return obj;
}
}
/**
* Directory used for job file storage.
* @member {String} storageLocation
*/
ManagerConfiguration.prototype['storageLocation'] = undefined;
/**
* Whether the Shaman file transfer API is available.
* @member {Boolean} shamanEnabled
*/
ManagerConfiguration.prototype['shamanEnabled'] = undefined;
export default ManagerConfiguration;

@ -0,0 +1,144 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import WorkerStatus from './WorkerStatus';
/**
* The RegisteredWorker model module.
* @module model/RegisteredWorker
* @version 0.0.0
*/
class RegisteredWorker {
/**
* Constructs a new <code>RegisteredWorker</code>.
* @alias module:model/RegisteredWorker
* @param uuid {String}
* @param nickname {String}
* @param address {String}
* @param status {module:model/WorkerStatus}
* @param platform {String}
* @param lastActivity {String}
* @param software {String}
* @param supportedTaskTypes {Array.<String>}
*/
constructor(uuid, nickname, address, status, platform, lastActivity, software, supportedTaskTypes) {
RegisteredWorker.initialize(this, uuid, nickname, address, status, platform, lastActivity, software, supportedTaskTypes);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, uuid, nickname, address, status, platform, lastActivity, software, supportedTaskTypes) {
obj['uuid'] = uuid;
obj['nickname'] = nickname;
obj['address'] = address;
obj['status'] = status;
obj['platform'] = platform;
obj['last_activity'] = lastActivity;
obj['software'] = software;
obj['supported_task_types'] = supportedTaskTypes;
}
/**
* Constructs a <code>RegisteredWorker</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/RegisteredWorker} obj Optional instance to populate.
* @return {module:model/RegisteredWorker} The populated <code>RegisteredWorker</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new RegisteredWorker();
if (data.hasOwnProperty('uuid')) {
obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String');
}
if (data.hasOwnProperty('nickname')) {
obj['nickname'] = ApiClient.convertToType(data['nickname'], 'String');
}
if (data.hasOwnProperty('address')) {
obj['address'] = ApiClient.convertToType(data['address'], 'String');
}
if (data.hasOwnProperty('status')) {
obj['status'] = WorkerStatus.constructFromObject(data['status']);
}
if (data.hasOwnProperty('platform')) {
obj['platform'] = ApiClient.convertToType(data['platform'], 'String');
}
if (data.hasOwnProperty('last_activity')) {
obj['last_activity'] = ApiClient.convertToType(data['last_activity'], 'String');
}
if (data.hasOwnProperty('software')) {
obj['software'] = ApiClient.convertToType(data['software'], 'String');
}
if (data.hasOwnProperty('supported_task_types')) {
obj['supported_task_types'] = ApiClient.convertToType(data['supported_task_types'], ['String']);
}
}
return obj;
}
}
/**
* @member {String} uuid
*/
RegisteredWorker.prototype['uuid'] = undefined;
/**
* @member {String} nickname
*/
RegisteredWorker.prototype['nickname'] = undefined;
/**
* @member {String} address
*/
RegisteredWorker.prototype['address'] = undefined;
/**
* @member {module:model/WorkerStatus} status
*/
RegisteredWorker.prototype['status'] = undefined;
/**
* @member {String} platform
*/
RegisteredWorker.prototype['platform'] = undefined;
/**
* @member {String} last_activity
*/
RegisteredWorker.prototype['last_activity'] = undefined;
/**
* @member {String} software
*/
RegisteredWorker.prototype['software'] = undefined;
/**
* @member {Array.<String>} supported_task_types
*/
RegisteredWorker.prototype['supported_task_types'] = undefined;
export default RegisteredWorker;

@ -0,0 +1,73 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The SecurityError model module.
* @module model/SecurityError
* @version 0.0.0
*/
class SecurityError {
/**
* Constructs a new <code>SecurityError</code>.
* @alias module:model/SecurityError
* @param message {String}
*/
constructor(message) {
SecurityError.initialize(this, message);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, message) {
obj['message'] = message;
}
/**
* Constructs a <code>SecurityError</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/SecurityError} obj Optional instance to populate.
* @return {module:model/SecurityError} The populated <code>SecurityError</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new SecurityError();
if (data.hasOwnProperty('message')) {
obj['message'] = ApiClient.convertToType(data['message'], 'String');
}
}
return obj;
}
}
/**
* @member {String} message
*/
SecurityError.prototype['message'] = undefined;
export default SecurityError;

@ -0,0 +1,86 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import ShamanFileSpec from './ShamanFileSpec';
/**
* The ShamanCheckout model module.
* @module model/ShamanCheckout
* @version 0.0.0
*/
class ShamanCheckout {
/**
* Constructs a new <code>ShamanCheckout</code>.
* Set of files with their SHA256 checksum, size in bytes, and desired location in the checkout directory.
* @alias module:model/ShamanCheckout
* @param files {Array.<module:model/ShamanFileSpec>}
* @param checkoutPath {String} Path where the Manager should create this checkout. It is relative to the Shaman checkout path as configured on the Manager. In older versions of the Shaman this was just the \"checkout ID\", but in this version it can be a path like `project-slug/scene-name/unique-ID`.
*/
constructor(files, checkoutPath) {
ShamanCheckout.initialize(this, files, checkoutPath);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, files, checkoutPath) {
obj['files'] = files;
obj['checkoutPath'] = checkoutPath;
}
/**
* Constructs a <code>ShamanCheckout</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ShamanCheckout} obj Optional instance to populate.
* @return {module:model/ShamanCheckout} The populated <code>ShamanCheckout</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ShamanCheckout();
if (data.hasOwnProperty('files')) {
obj['files'] = ApiClient.convertToType(data['files'], [ShamanFileSpec]);
}
if (data.hasOwnProperty('checkoutPath')) {
obj['checkoutPath'] = ApiClient.convertToType(data['checkoutPath'], 'String');
}
}
return obj;
}
}
/**
* @member {Array.<module:model/ShamanFileSpec>} files
*/
ShamanCheckout.prototype['files'] = undefined;
/**
* Path where the Manager should create this checkout. It is relative to the Shaman checkout path as configured on the Manager. In older versions of the Shaman this was just the \"checkout ID\", but in this version it can be a path like `project-slug/scene-name/unique-ID`.
* @member {String} checkoutPath
*/
ShamanCheckout.prototype['checkoutPath'] = undefined;
export default ShamanCheckout;

@ -0,0 +1,75 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The ShamanCheckoutResult model module.
* @module model/ShamanCheckoutResult
* @version 0.0.0
*/
class ShamanCheckoutResult {
/**
* Constructs a new <code>ShamanCheckoutResult</code>.
* The result of a Shaman checkout.
* @alias module:model/ShamanCheckoutResult
* @param checkoutPath {String} Path where the Manager created this checkout. This can be different than what was requested, as the Manager will ensure a unique directory. The path is relative to the Shaman checkout path as configured on the Manager.
*/
constructor(checkoutPath) {
ShamanCheckoutResult.initialize(this, checkoutPath);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, checkoutPath) {
obj['checkoutPath'] = checkoutPath;
}
/**
* Constructs a <code>ShamanCheckoutResult</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ShamanCheckoutResult} obj Optional instance to populate.
* @return {module:model/ShamanCheckoutResult} The populated <code>ShamanCheckoutResult</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ShamanCheckoutResult();
if (data.hasOwnProperty('checkoutPath')) {
obj['checkoutPath'] = ApiClient.convertToType(data['checkoutPath'], 'String');
}
}
return obj;
}
}
/**
* Path where the Manager created this checkout. This can be different than what was requested, as the Manager will ensure a unique directory. The path is relative to the Shaman checkout path as configured on the Manager.
* @member {String} checkoutPath
*/
ShamanCheckoutResult.prototype['checkoutPath'] = undefined;
export default ShamanCheckoutResult;

@ -0,0 +1,97 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The ShamanFileSpec model module.
* @module model/ShamanFileSpec
* @version 0.0.0
*/
class ShamanFileSpec {
/**
* Constructs a new <code>ShamanFileSpec</code>.
* Specification of a file in the Shaman storage.
* @alias module:model/ShamanFileSpec
* @param sha {String} SHA256 checksum of the file
* @param size {Number} File size in bytes
* @param path {String} Location of the file in the checkout
*/
constructor(sha, size, path) {
ShamanFileSpec.initialize(this, sha, size, path);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, sha, size, path) {
obj['sha'] = sha;
obj['size'] = size;
obj['path'] = path;
}
/**
* Constructs a <code>ShamanFileSpec</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ShamanFileSpec} obj Optional instance to populate.
* @return {module:model/ShamanFileSpec} The populated <code>ShamanFileSpec</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ShamanFileSpec();
if (data.hasOwnProperty('sha')) {
obj['sha'] = ApiClient.convertToType(data['sha'], 'String');
}
if (data.hasOwnProperty('size')) {
obj['size'] = ApiClient.convertToType(data['size'], 'Number');
}
if (data.hasOwnProperty('path')) {
obj['path'] = ApiClient.convertToType(data['path'], 'String');
}
}
return obj;
}
}
/**
* SHA256 checksum of the file
* @member {String} sha
*/
ShamanFileSpec.prototype['sha'] = undefined;
/**
* File size in bytes
* @member {Number} size
*/
ShamanFileSpec.prototype['size'] = undefined;
/**
* Location of the file in the checkout
* @member {String} path
*/
ShamanFileSpec.prototype['path'] = undefined;
export default ShamanFileSpec;

@ -0,0 +1,108 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import ShamanFileStatus from './ShamanFileStatus';
/**
* The ShamanFileSpecWithStatus model module.
* @module model/ShamanFileSpecWithStatus
* @version 0.0.0
*/
class ShamanFileSpecWithStatus {
/**
* Constructs a new <code>ShamanFileSpecWithStatus</code>.
* Specification of a file, which could be in the Shaman storage, or not, depending on its status.
* @alias module:model/ShamanFileSpecWithStatus
* @param sha {String} SHA256 checksum of the file
* @param size {Number} File size in bytes
* @param path {String} Location of the file in the checkout
* @param status {module:model/ShamanFileStatus}
*/
constructor(sha, size, path, status) {
ShamanFileSpecWithStatus.initialize(this, sha, size, path, status);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, sha, size, path, status) {
obj['sha'] = sha;
obj['size'] = size;
obj['path'] = path;
obj['status'] = status;
}
/**
* Constructs a <code>ShamanFileSpecWithStatus</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ShamanFileSpecWithStatus} obj Optional instance to populate.
* @return {module:model/ShamanFileSpecWithStatus} The populated <code>ShamanFileSpecWithStatus</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ShamanFileSpecWithStatus();
if (data.hasOwnProperty('sha')) {
obj['sha'] = ApiClient.convertToType(data['sha'], 'String');
}
if (data.hasOwnProperty('size')) {
obj['size'] = ApiClient.convertToType(data['size'], 'Number');
}
if (data.hasOwnProperty('path')) {
obj['path'] = ApiClient.convertToType(data['path'], 'String');
}
if (data.hasOwnProperty('status')) {
obj['status'] = ShamanFileStatus.constructFromObject(data['status']);
}
}
return obj;
}
}
/**
* SHA256 checksum of the file
* @member {String} sha
*/
ShamanFileSpecWithStatus.prototype['sha'] = undefined;
/**
* File size in bytes
* @member {Number} size
*/
ShamanFileSpecWithStatus.prototype['size'] = undefined;
/**
* Location of the file in the checkout
* @member {String} path
*/
ShamanFileSpecWithStatus.prototype['path'] = undefined;
/**
* @member {module:model/ShamanFileStatus} status
*/
ShamanFileSpecWithStatus.prototype['status'] = undefined;
export default ShamanFileSpecWithStatus;

@ -0,0 +1,53 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* Enum class ShamanFileStatus.
* @enum {}
* @readonly
*/
export default class ShamanFileStatus {
/**
* value: "unknown"
* @const
*/
"unknown" = "unknown";
/**
* value: "uploading"
* @const
*/
"uploading" = "uploading";
/**
* value: "stored"
* @const
*/
"stored" = "stored";
/**
* Returns a <code>ShamanFileStatus</code> enum value from a Javascript object name.
* @param {Object} data The plain JavaScript object containing the name of the enum value.
* @return {module:model/ShamanFileStatus} The enum <code>ShamanFileStatus</code> value.
*/
static constructFromObject(object) {
return object;
}
}

@ -0,0 +1,75 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import ShamanFileSpec from './ShamanFileSpec';
/**
* The ShamanRequirementsRequest model module.
* @module model/ShamanRequirementsRequest
* @version 0.0.0
*/
class ShamanRequirementsRequest {
/**
* Constructs a new <code>ShamanRequirementsRequest</code>.
* Set of files with their SHA256 checksum and size in bytes.
* @alias module:model/ShamanRequirementsRequest
* @param files {Array.<module:model/ShamanFileSpec>}
*/
constructor(files) {
ShamanRequirementsRequest.initialize(this, files);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, files) {
obj['files'] = files;
}
/**
* Constructs a <code>ShamanRequirementsRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ShamanRequirementsRequest} obj Optional instance to populate.
* @return {module:model/ShamanRequirementsRequest} The populated <code>ShamanRequirementsRequest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ShamanRequirementsRequest();
if (data.hasOwnProperty('files')) {
obj['files'] = ApiClient.convertToType(data['files'], [ShamanFileSpec]);
}
}
return obj;
}
}
/**
* @member {Array.<module:model/ShamanFileSpec>} files
*/
ShamanRequirementsRequest.prototype['files'] = undefined;
export default ShamanRequirementsRequest;

@ -0,0 +1,75 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import ShamanFileSpecWithStatus from './ShamanFileSpecWithStatus';
/**
* The ShamanRequirementsResponse model module.
* @module model/ShamanRequirementsResponse
* @version 0.0.0
*/
class ShamanRequirementsResponse {
/**
* Constructs a new <code>ShamanRequirementsResponse</code>.
* The files from a requirements request, with their status on the Shaman server. Files that are known to Shaman are excluded from the response.
* @alias module:model/ShamanRequirementsResponse
* @param files {Array.<module:model/ShamanFileSpecWithStatus>}
*/
constructor(files) {
ShamanRequirementsResponse.initialize(this, files);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, files) {
obj['files'] = files;
}
/**
* Constructs a <code>ShamanRequirementsResponse</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ShamanRequirementsResponse} obj Optional instance to populate.
* @return {module:model/ShamanRequirementsResponse} The populated <code>ShamanRequirementsResponse</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ShamanRequirementsResponse();
if (data.hasOwnProperty('files')) {
obj['files'] = ApiClient.convertToType(data['files'], [ShamanFileSpecWithStatus]);
}
}
return obj;
}
}
/**
* @member {Array.<module:model/ShamanFileSpecWithStatus>} files
*/
ShamanRequirementsResponse.prototype['files'] = undefined;
export default ShamanRequirementsResponse;

@ -0,0 +1,75 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import ShamanFileStatus from './ShamanFileStatus';
/**
* The ShamanSingleFileStatus model module.
* @module model/ShamanSingleFileStatus
* @version 0.0.0
*/
class ShamanSingleFileStatus {
/**
* Constructs a new <code>ShamanSingleFileStatus</code>.
* Status of a file in the Shaman storage.
* @alias module:model/ShamanSingleFileStatus
* @param status {module:model/ShamanFileStatus}
*/
constructor(status) {
ShamanSingleFileStatus.initialize(this, status);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, status) {
obj['status'] = status;
}
/**
* Constructs a <code>ShamanSingleFileStatus</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ShamanSingleFileStatus} obj Optional instance to populate.
* @return {module:model/ShamanSingleFileStatus} The populated <code>ShamanSingleFileStatus</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ShamanSingleFileStatus();
if (data.hasOwnProperty('status')) {
obj['status'] = ShamanFileStatus.constructFromObject(data['status']);
}
}
return obj;
}
}
/**
* @member {module:model/ShamanFileStatus} status
*/
ShamanSingleFileStatus.prototype['status'] = undefined;
export default ShamanSingleFileStatus;

@ -0,0 +1,112 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The SubmittedJob model module.
* @module model/SubmittedJob
* @version 0.0.0
*/
class SubmittedJob {
/**
* Constructs a new <code>SubmittedJob</code>.
* Job definition submitted to Flamenco.
* @alias module:model/SubmittedJob
* @param name {String}
* @param type {String}
* @param priority {Number}
*/
constructor(name, type, priority) {
SubmittedJob.initialize(this, name, type, priority);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, name, type, priority) {
obj['name'] = name;
obj['type'] = type;
obj['priority'] = priority || 50;
}
/**
* Constructs a <code>SubmittedJob</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/SubmittedJob} obj Optional instance to populate.
* @return {module:model/SubmittedJob} The populated <code>SubmittedJob</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new SubmittedJob();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('type')) {
obj['type'] = ApiClient.convertToType(data['type'], 'String');
}
if (data.hasOwnProperty('priority')) {
obj['priority'] = ApiClient.convertToType(data['priority'], 'Number');
}
if (data.hasOwnProperty('settings')) {
obj['settings'] = ApiClient.convertToType(data['settings'], {'String': Object});
}
if (data.hasOwnProperty('metadata')) {
obj['metadata'] = ApiClient.convertToType(data['metadata'], {'String': 'String'});
}
}
return obj;
}
}
/**
* @member {String} name
*/
SubmittedJob.prototype['name'] = undefined;
/**
* @member {String} type
*/
SubmittedJob.prototype['type'] = undefined;
/**
* @member {Number} priority
* @default 50
*/
SubmittedJob.prototype['priority'] = 50;
/**
* @member {Object.<String, Object>} settings
*/
SubmittedJob.prototype['settings'] = undefined;
/**
* Arbitrary metadata strings. More complex structures can be modeled by using `a.b.c` notation for the key.
* @member {Object.<String, String>} metadata
*/
SubmittedJob.prototype['metadata'] = undefined;
export default SubmittedJob;

@ -0,0 +1,88 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* Enum class TaskStatus.
* @enum {}
* @readonly
*/
export default class TaskStatus {
/**
* value: "active"
* @const
*/
"active" = "active";
/**
* value: "canceled"
* @const
*/
"canceled" = "canceled";
/**
* value: "completed"
* @const
*/
"completed" = "completed";
/**
* value: "failed"
* @const
*/
"failed" = "failed";
/**
* value: "queued"
* @const
*/
"queued" = "queued";
/**
* value: "soft-failed"
* @const
*/
"soft-failed" = "soft-failed";
/**
* value: "cancel-requested"
* @const
*/
"cancel-requested" = "cancel-requested";
/**
* value: "paused"
* @const
*/
"paused" = "paused";
/**
* Returns a <code>TaskStatus</code> enum value from a Javascript object name.
* @param {Object} data The plain JavaScript object containing the name of the enum value.
* @return {module:model/TaskStatus} The enum <code>TaskStatus</code> value.
*/
static constructFromObject(object) {
return object;
}
}

@ -0,0 +1,91 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import TaskStatus from './TaskStatus';
/**
* The TaskUpdate model module.
* @module model/TaskUpdate
* @version 0.0.0
*/
class TaskUpdate {
/**
* Constructs a new <code>TaskUpdate</code>.
* TaskUpdate is sent by a Worker to update the status &amp; logs of a task it&#39;s executing.
* @alias module:model/TaskUpdate
*/
constructor() {
TaskUpdate.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>TaskUpdate</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/TaskUpdate} obj Optional instance to populate.
* @return {module:model/TaskUpdate} The populated <code>TaskUpdate</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new TaskUpdate();
if (data.hasOwnProperty('taskStatus')) {
obj['taskStatus'] = TaskStatus.constructFromObject(data['taskStatus']);
}
if (data.hasOwnProperty('activity')) {
obj['activity'] = ApiClient.convertToType(data['activity'], 'String');
}
if (data.hasOwnProperty('log')) {
obj['log'] = ApiClient.convertToType(data['log'], 'String');
}
}
return obj;
}
}
/**
* @member {module:model/TaskStatus} taskStatus
*/
TaskUpdate.prototype['taskStatus'] = undefined;
/**
* One-liner to indicate what's currently happening with the task. Overwrites previously sent activity strings.
* @member {String} activity
*/
TaskUpdate.prototype['activity'] = undefined;
/**
* Log lines for this task, will be appended to logs sent earlier.
* @member {String} log
*/
TaskUpdate.prototype['log'] = undefined;
export default TaskUpdate;

@ -0,0 +1,103 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The WorkerRegistration model module.
* @module model/WorkerRegistration
* @version 0.0.0
*/
class WorkerRegistration {
/**
* Constructs a new <code>WorkerRegistration</code>.
* @alias module:model/WorkerRegistration
* @param secret {String}
* @param platform {String}
* @param supportedTaskTypes {Array.<String>}
* @param nickname {String}
*/
constructor(secret, platform, supportedTaskTypes, nickname) {
WorkerRegistration.initialize(this, secret, platform, supportedTaskTypes, nickname);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, secret, platform, supportedTaskTypes, nickname) {
obj['secret'] = secret;
obj['platform'] = platform;
obj['supported_task_types'] = supportedTaskTypes;
obj['nickname'] = nickname;
}
/**
* Constructs a <code>WorkerRegistration</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/WorkerRegistration} obj Optional instance to populate.
* @return {module:model/WorkerRegistration} The populated <code>WorkerRegistration</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new WorkerRegistration();
if (data.hasOwnProperty('secret')) {
obj['secret'] = ApiClient.convertToType(data['secret'], 'String');
}
if (data.hasOwnProperty('platform')) {
obj['platform'] = ApiClient.convertToType(data['platform'], 'String');
}
if (data.hasOwnProperty('supported_task_types')) {
obj['supported_task_types'] = ApiClient.convertToType(data['supported_task_types'], ['String']);
}
if (data.hasOwnProperty('nickname')) {
obj['nickname'] = ApiClient.convertToType(data['nickname'], 'String');
}
}
return obj;
}
}
/**
* @member {String} secret
*/
WorkerRegistration.prototype['secret'] = undefined;
/**
* @member {String} platform
*/
WorkerRegistration.prototype['platform'] = undefined;
/**
* @member {Array.<String>} supported_task_types
*/
WorkerRegistration.prototype['supported_task_types'] = undefined;
/**
* @member {String} nickname
*/
WorkerRegistration.prototype['nickname'] = undefined;
export default WorkerRegistration;

@ -0,0 +1,93 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The WorkerSignOn model module.
* @module model/WorkerSignOn
* @version 0.0.0
*/
class WorkerSignOn {
/**
* Constructs a new <code>WorkerSignOn</code>.
* @alias module:model/WorkerSignOn
* @param nickname {String}
* @param supportedTaskTypes {Array.<String>}
* @param softwareVersion {String}
*/
constructor(nickname, supportedTaskTypes, softwareVersion) {
WorkerSignOn.initialize(this, nickname, supportedTaskTypes, softwareVersion);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, nickname, supportedTaskTypes, softwareVersion) {
obj['nickname'] = nickname;
obj['supported_task_types'] = supportedTaskTypes;
obj['software_version'] = softwareVersion;
}
/**
* Constructs a <code>WorkerSignOn</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/WorkerSignOn} obj Optional instance to populate.
* @return {module:model/WorkerSignOn} The populated <code>WorkerSignOn</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new WorkerSignOn();
if (data.hasOwnProperty('nickname')) {
obj['nickname'] = ApiClient.convertToType(data['nickname'], 'String');
}
if (data.hasOwnProperty('supported_task_types')) {
obj['supported_task_types'] = ApiClient.convertToType(data['supported_task_types'], ['String']);
}
if (data.hasOwnProperty('software_version')) {
obj['software_version'] = ApiClient.convertToType(data['software_version'], 'String');
}
}
return obj;
}
}
/**
* @member {String} nickname
*/
WorkerSignOn.prototype['nickname'] = undefined;
/**
* @member {Array.<String>} supported_task_types
*/
WorkerSignOn.prototype['supported_task_types'] = undefined;
/**
* @member {String} software_version
*/
WorkerSignOn.prototype['software_version'] = undefined;
export default WorkerSignOn;

@ -0,0 +1,74 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import WorkerStatus from './WorkerStatus';
/**
* The WorkerStateChange model module.
* @module model/WorkerStateChange
* @version 0.0.0
*/
class WorkerStateChange {
/**
* Constructs a new <code>WorkerStateChange</code>.
* @alias module:model/WorkerStateChange
* @param statusRequested {module:model/WorkerStatus}
*/
constructor(statusRequested) {
WorkerStateChange.initialize(this, statusRequested);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, statusRequested) {
obj['status_requested'] = statusRequested;
}
/**
* Constructs a <code>WorkerStateChange</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/WorkerStateChange} obj Optional instance to populate.
* @return {module:model/WorkerStateChange} The populated <code>WorkerStateChange</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new WorkerStateChange();
if (data.hasOwnProperty('status_requested')) {
obj['status_requested'] = WorkerStatus.constructFromObject(data['status_requested']);
}
}
return obj;
}
}
/**
* @member {module:model/WorkerStatus} status_requested
*/
WorkerStateChange.prototype['status_requested'] = undefined;
export default WorkerStateChange;

@ -0,0 +1,74 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import WorkerStatus from './WorkerStatus';
/**
* The WorkerStateChanged model module.
* @module model/WorkerStateChanged
* @version 0.0.0
*/
class WorkerStateChanged {
/**
* Constructs a new <code>WorkerStateChanged</code>.
* @alias module:model/WorkerStateChanged
* @param status {module:model/WorkerStatus}
*/
constructor(status) {
WorkerStateChanged.initialize(this, status);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, status) {
obj['status'] = status;
}
/**
* Constructs a <code>WorkerStateChanged</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/WorkerStateChanged} obj Optional instance to populate.
* @return {module:model/WorkerStateChanged} The populated <code>WorkerStateChanged</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new WorkerStateChanged();
if (data.hasOwnProperty('status')) {
obj['status'] = WorkerStatus.constructFromObject(data['status']);
}
}
return obj;
}
}
/**
* @member {module:model/WorkerStatus} status
*/
WorkerStateChanged.prototype['status'] = undefined;
export default WorkerStateChanged;

@ -0,0 +1,81 @@
/**
* Flamenco manager
* Render Farm manager API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* Enum class WorkerStatus.
* @enum {}
* @readonly
*/
export default class WorkerStatus {
/**
* value: "starting"
* @const
*/
"starting" = "starting";
/**
* value: "awake"
* @const
*/
"awake" = "awake";
/**
* value: "asleep"
* @const
*/
"asleep" = "asleep";
/**
* value: "error"
* @const
*/
"error" = "error";
/**
* value: "shutdown"
* @const
*/
"shutdown" = "shutdown";
/**
* value: "testing"
* @const
*/
"testing" = "testing";
/**
* value: "offline"
* @const
*/
"offline" = "offline";
/**
* Returns a <code>WorkerStatus</code> enum value from a Javascript object name.
* @param {Object} data The plain JavaScript object containing the name of the enum value.
* @return {module:model/WorkerStatus} The enum <code>WorkerStatus</code> value.
*/
static constructFromObject(object) {
return object;
}
}

File diff suppressed because it is too large Load Diff