Browse Source

Update docs

Leszek Wiesner 3 years ago
parent
commit
968ab458ae
46 changed files with 703 additions and 546 deletions
  1. 3 1
      distributor-node/README.md
  2. 0 1
      distributor-node/config/docker/config.docker.yml
  3. 375 0
      distributor-node/docs/api/operator/index.md
  4. 5 27
      distributor-node/docs/api/public/index.md
  5. 120 0
      distributor-node/docs/commands/node.md
  6. 20 5
      distributor-node/docs/node/index.md
  7. 0 0
      distributor-node/docs/schema/definition-properties-bucket-ids-items.md
  8. 9 0
      distributor-node/docs/schema/definition-properties-bucket-ids.md
  9. 0 11
      distributor-node/docs/schema/definition-properties-buckets-oneof-all-buckets.md
  10. 0 7
      distributor-node/docs/schema/definition-properties-buckets-oneof-bucket-ids.md
  11. 0 9
      distributor-node/docs/schema/definition-properties-buckets.md
  12. 5 5
      distributor-node/docs/schema/definition-properties-logs-properties-console-logging-options.md
  13. 0 11
      distributor-node/docs/schema/definition-properties-logs-properties-console-oneof-1.md
  14. 0 41
      distributor-node/docs/schema/definition-properties-logs-properties-console-oneof-console-logging-options.md
  15. 0 9
      distributor-node/docs/schema/definition-properties-logs-properties-console.md
  16. 0 11
      distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-1.md
  17. 0 3
      distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options-properties-endpoint.md
  18. 0 60
      distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options.md
  19. 0 9
      distributor-node/docs/schema/definition-properties-logs-properties-elastic.md
  20. 0 0
      distributor-node/docs/schema/definition-properties-logs-properties-elasticsearch-logging-options-properties-endpoint.md
  21. 9 9
      distributor-node/docs/schema/definition-properties-logs-properties-elasticsearch-logging-options.md
  22. 0 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-archive.md
  23. 0 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-frequency.md
  24. 0 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-level.md
  25. 0 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-maxfiles.md
  26. 0 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-maxsize.md
  27. 0 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-path.md
  28. 15 15
      distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options.md
  29. 0 11
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-1.md
  30. 0 3
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-archive.md
  31. 0 22
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-frequency.md
  32. 0 17
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md
  33. 0 7
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxsize.md
  34. 0 3
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-path.md
  35. 0 163
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options.md
  36. 0 11
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-switch-off.md
  37. 0 9
      distributor-node/docs/schema/definition-properties-logs-properties-file.md
  38. 14 32
      distributor-node/docs/schema/definition-properties-logs.md
  39. 3 0
      distributor-node/docs/schema/definition-properties-operatorapi-properties-hmacsecret.md
  40. 0 0
      distributor-node/docs/schema/definition-properties-operatorapi-properties-port.md
  41. 50 0
      distributor-node/docs/schema/definition-properties-operatorapi.md
  42. 3 3
      distributor-node/docs/schema/definition-properties-publicapi-properties-port.md
  43. 31 0
      distributor-node/docs/schema/definition-properties-publicapi.md
  44. 38 23
      distributor-node/docs/schema/definition.md
  45. 3 1
      distributor-node/package.json
  46. 0 7
      distributor-node/src/api-spec/public.yml

+ 3 - 1
distributor-node/README.md

@@ -27,7 +27,9 @@ To determine environment variable name based on a config key, for example `inter
 - replace all dots with `__`: `INTERVALS.CACHE_CLEANUP` => `INTERVALS__CACHE_CLEANUP`
 - add `JOYSTREAM_DISTRIBUTOR__` prefix: `INTERVALS__CACHE_CLEANUP` => `JOYSTREAM_DISTRIBUTOR__INTERVALS__CACHE_CLEANUP`
 
-In case of arrays, the values must be provided as json string, for example `JOYSTREAM_DISTRIBUTOR__KEYS="[{\"suri\":\"//Bob\"}]"`.
+In case of arrays or `oneOf` objects (ie. `keys`), the values must be provided as json string, for example `JOYSTREAM_DISTRIBUTOR__KEYS="[{\"suri\":\"//Bob\"}]"`.
+
+In order to unset a value you can use one of the following strings as env variable value: `"off"` `"null"`, `"undefined"`, for example: `JOYSTREAM_DISTRIBUTOR__LOGS__FILE="off"`.
 
 For more envirnoment variable examples see the `distributor-node` service configuration in [docker-compose.yml](../docker-compose.yml).
 

+ 0 - 1
distributor-node/config/docker/config.docker.yml

@@ -22,5 +22,4 @@ intervals:
 port: 3334
 keys:
   - suri: //Alice
-buckets: 'all'
 workerId: 0

+ 375 - 0
distributor-node/docs/api/operator/index.md

@@ -0,0 +1,375 @@
+---
+title: Distributor node operator API v0.1.0
+language_tabs:
+  - javascript: JavaScript
+  - shell: Shell
+language_clients:
+  - javascript: ""
+  - shell: ""
+toc_footers: []
+includes: []
+search: true
+highlight_theme: darkula
+headingLevel: 2
+
+---
+
+<!-- AUTO-GENERATED-CONTENT:START (TOC) -->
+<!-- AUTO-GENERATED-CONTENT:END -->
+
+<h1 id="distributor-node-operator-api">Distributor node operator API v0.1.0</h1>
+
+> Scroll down for code samples, example requests and responses.
+
+Distributor node operator API
+
+Base URLs:
+
+* <a href="http://localhost:3335/api/v1/">http://localhost:3335/api/v1/</a>
+
+Email: <a href="mailto:info@joystream.org">Support</a> 
+License: <a href="https://spdx.org/licenses/GPL-3.0-only.html">GPL-3.0-only</a>
+
+undefined
+
+<h1 id="distributor-node-operator-api-default">Default</h1>
+
+## operator.stopApi
+
+<a id="opIdoperator.stopApi"></a>
+
+> Code samples
+
+```javascript
+
+const headers = {
+  'Authorization':'Bearer {access-token}'
+};
+
+fetch('http://localhost:3335/api/v1/stop-api',
+{
+  method: 'POST',
+
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+```
+
+```shell
+# You can also use wget
+curl -X POST http://localhost:3335/api/v1/stop-api \
+  -H 'Authorization: Bearer {access-token}'
+
+```
+
+`POST /stop-api`
+
+Turns off the public api.
+
+<h3 id="operator.stopapi-responses">Responses</h3>
+
+|Status|Meaning|Description|Schema|
+|---|---|---|---|
+|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|OK|None|
+|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Not authorized|None|
+|409|[Conflict](https://tools.ietf.org/html/rfc7231#section-6.5.8)|Already stopped|None|
+|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Unexpected server error|None|
+
+<aside class="warning">
+To perform this operation, you must be authenticated by means of one of the following methods:
+OperatorAuth
+</aside>
+
+## operator.startApi
+
+<a id="opIdoperator.startApi"></a>
+
+> Code samples
+
+```javascript
+
+const headers = {
+  'Authorization':'Bearer {access-token}'
+};
+
+fetch('http://localhost:3335/api/v1/start-api',
+{
+  method: 'POST',
+
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+```
+
+```shell
+# You can also use wget
+curl -X POST http://localhost:3335/api/v1/start-api \
+  -H 'Authorization: Bearer {access-token}'
+
+```
+
+`POST /start-api`
+
+Turns on the public api.
+
+<h3 id="operator.startapi-responses">Responses</h3>
+
+|Status|Meaning|Description|Schema|
+|---|---|---|---|
+|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|OK|None|
+|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Not authorized|None|
+|409|[Conflict](https://tools.ietf.org/html/rfc7231#section-6.5.8)|Already started|None|
+|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Unexpected server error|None|
+
+<aside class="warning">
+To perform this operation, you must be authenticated by means of one of the following methods:
+OperatorAuth
+</aside>
+
+## operator.shutdown
+
+<a id="opIdoperator.shutdown"></a>
+
+> Code samples
+
+```javascript
+
+const headers = {
+  'Authorization':'Bearer {access-token}'
+};
+
+fetch('http://localhost:3335/api/v1/shutdown',
+{
+  method: 'POST',
+
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+```
+
+```shell
+# You can also use wget
+curl -X POST http://localhost:3335/api/v1/shutdown \
+  -H 'Authorization: Bearer {access-token}'
+
+```
+
+`POST /shutdown`
+
+Shuts down the node.
+
+<h3 id="operator.shutdown-responses">Responses</h3>
+
+|Status|Meaning|Description|Schema|
+|---|---|---|---|
+|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|OK|None|
+|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Not authorized|None|
+|409|[Conflict](https://tools.ietf.org/html/rfc7231#section-6.5.8)|Already shutting down|None|
+|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Unexpected server error|None|
+
+<aside class="warning">
+To perform this operation, you must be authenticated by means of one of the following methods:
+OperatorAuth
+</aside>
+
+## operator.setWorker
+
+<a id="opIdoperator.setWorker"></a>
+
+> Code samples
+
+```javascript
+const inputBody = '{
+  "workerId": 0
+}';
+const headers = {
+  'Content-Type':'application/json',
+  'Authorization':'Bearer {access-token}'
+};
+
+fetch('http://localhost:3335/api/v1/set-worker',
+{
+  method: 'POST',
+  body: inputBody,
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+```
+
+```shell
+# You can also use wget
+curl -X POST http://localhost:3335/api/v1/set-worker \
+  -H 'Content-Type: application/json' \
+  -H 'Authorization: Bearer {access-token}'
+
+```
+
+`POST /set-worker`
+
+Updates the operator worker id.
+
+> Body parameter
+
+```json
+{
+  "workerId": 0
+}
+```
+
+<h3 id="operator.setworker-parameters">Parameters</h3>
+
+|Name|In|Type|Required|Description|
+|---|---|---|---|---|
+|body|body|[SetWorkerOperation](#schemasetworkeroperation)|false|none|
+
+<h3 id="operator.setworker-responses">Responses</h3>
+
+|Status|Meaning|Description|Schema|
+|---|---|---|---|
+|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|OK|None|
+|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Not authorized|None|
+|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Unexpected server error|None|
+
+<aside class="warning">
+To perform this operation, you must be authenticated by means of one of the following methods:
+OperatorAuth
+</aside>
+
+## operator.setBuckets
+
+<a id="opIdoperator.setBuckets"></a>
+
+> Code samples
+
+```javascript
+const inputBody = '{
+  "buckets": [
+    0
+  ]
+}';
+const headers = {
+  'Content-Type':'application/json',
+  'Authorization':'Bearer {access-token}'
+};
+
+fetch('http://localhost:3335/api/v1/set-buckets',
+{
+  method: 'POST',
+  body: inputBody,
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+```
+
+```shell
+# You can also use wget
+curl -X POST http://localhost:3335/api/v1/set-buckets \
+  -H 'Content-Type: application/json' \
+  -H 'Authorization: Bearer {access-token}'
+
+```
+
+`POST /set-buckets`
+
+Updates buckets supported by the node.
+
+> Body parameter
+
+```json
+{
+  "buckets": [
+    0
+  ]
+}
+```
+
+<h3 id="operator.setbuckets-parameters">Parameters</h3>
+
+|Name|In|Type|Required|Description|
+|---|---|---|---|---|
+|body|body|[SetBucketsOperation](#schemasetbucketsoperation)|false|none|
+
+<h3 id="operator.setbuckets-responses">Responses</h3>
+
+|Status|Meaning|Description|Schema|
+|---|---|---|---|
+|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|OK|None|
+|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Not authorized|None|
+|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Unexpected server error|None|
+
+<aside class="warning">
+To perform this operation, you must be authenticated by means of one of the following methods:
+OperatorAuth
+</aside>
+
+# Schemas
+
+<h2 id="tocS_SetWorkerOperation">SetWorkerOperation</h2>
+
+<a id="schemasetworkeroperation"></a>
+<a id="schema_SetWorkerOperation"></a>
+<a id="tocSsetworkeroperation"></a>
+<a id="tocssetworkeroperation"></a>
+
+```json
+{
+  "workerId": 0
+}
+
+```
+
+### Properties
+
+|Name|Type|Required|Restrictions|Description|
+|---|---|---|---|---|
+|workerId|integer|true|none|none|
+
+<h2 id="tocS_SetBucketsOperation">SetBucketsOperation</h2>
+
+<a id="schemasetbucketsoperation"></a>
+<a id="schema_SetBucketsOperation"></a>
+<a id="tocSsetbucketsoperation"></a>
+<a id="tocssetbucketsoperation"></a>
+
+```json
+{
+  "buckets": [
+    0
+  ]
+}
+
+```
+
+### Properties
+
+|Name|Type|Required|Restrictions|Description|
+|---|---|---|---|---|
+|buckets|[integer]|false|none|Set of bucket ids to be distributed by the node. If not provided - all buckets assigned to currently configured worker will be distributed.|
+
+undefined
+

+ 5 - 27
distributor-node/docs/api/index.md → distributor-node/docs/api/public/index.md

@@ -1,5 +1,5 @@
 ---
-title: Distributor node API v0.1.0
+title: Distributor node public API v0.1.0
 language_tabs:
   - javascript: JavaScript
   - shell: Shell
@@ -8,7 +8,7 @@ language_clients:
   - shell: ""
 toc_footers:
   - <a href="https://github.com/Joystream/joystream/issues/2224">Distributor
-    node API</a>
+    node public API</a>
 includes: []
 search: true
 highlight_theme: darkula
@@ -17,33 +17,13 @@ headingLevel: 2
 ---
 
 <!-- AUTO-GENERATED-CONTENT:START (TOC) -->
-- [public](#public)
-- [public.status](#publicstatus)
-  - [Responses](#responses)
-  - [Responses](#responses-1)
-- [public.buckets](#publicbuckets)
-- [public.assetHead](#publicassethead)
-  - [Parameters](#parameters)
-  - [Responses](#responses-2)
-  - [Response Headers](#response-headers)
-- [public.asset](#publicasset)
-  - [Parameters](#parameters-1)
-  - [Responses](#responses-3)
-- [ErrorResponse](#errorresponse)
-  - [Response Headers](#response-headers-1)
-- [Schemas](#schemas)
-  - [Properties](#properties)
-- [StatusResponse](#statusresponse)
-  - [Properties](#properties-1)
-- [BucketsResponse](#bucketsresponse)
-  - [Properties](#properties-2)
 <!-- AUTO-GENERATED-CONTENT:END -->
 
-<h1 id="distributor-node-api">Distributor node API v0.1.0</h1>
+<h1 id="distributor-node-public-api">Distributor node public API v0.1.0</h1>
 
 > Scroll down for code samples, example requests and responses.
 
-Distributor node API
+Distributor node public API
 
 Base URLs:
 
@@ -52,9 +32,7 @@ Base URLs:
 Email: <a href="mailto:info@joystream.org">Support</a> 
 License: <a href="https://spdx.org/licenses/GPL-3.0-only.html">GPL-3.0-only</a>
 
-<h1 id="distributor-node-api-public">public</h1>
-
-Public distributor node API
+<h1 id="distributor-node-public-api-default">Default</h1>
 
 ## public.status
 

+ 120 - 0
distributor-node/docs/commands/node.md

@@ -0,0 +1,120 @@
+`joystream-distributor node`
+============================
+
+Commands for interacting with a running distributor node through OperatorApi
+
+* [`joystream-distributor node:set-buckets`](#joystream-distributor-nodeset-buckets)
+* [`joystream-distributor node:set-worker`](#joystream-distributor-nodeset-worker)
+* [`joystream-distributor node:shutdown`](#joystream-distributor-nodeshutdown)
+* [`joystream-distributor node:start-public-api`](#joystream-distributor-nodestart-public-api)
+* [`joystream-distributor node:stop-public-api`](#joystream-distributor-nodestop-public-api)
+
+## `joystream-distributor node:set-buckets`
+
+Send an api request to change the set of buckets distributed by given distributor node.
+
+```
+USAGE
+  $ joystream-distributor node:set-buckets
+
+OPTIONS
+  -B, --bucketIds=bucketIds    Set of bucket ids to distribute
+  -a, --all                    Distribute all buckets belonging to configured worker
+
+  -c, --configPath=configPath  [default: ./config.yml] Path to config JSON/YAML file (relative to current working
+                               directory)
+
+  -s, --secret=secret          HMAC secret key to use (will default to config.operatorApi.hmacSecret if present)
+
+  -u, --url=url                (required) Distributor node operator api base url (ie. http://localhost:3335)
+
+  -y, --yes                    Answer "yes" to any prompt, skipping any manual confirmations
+```
+
+_See code: [src/commands/node/set-buckets.ts](https://github.com/Joystream/joystream/blob/v0.1.0/src/commands/node/set-buckets.ts)_
+
+## `joystream-distributor node:set-worker`
+
+Send an api request to change workerId assigned to given distributor node instance.
+
+```
+USAGE
+  $ joystream-distributor node:set-worker
+
+OPTIONS
+  -c, --configPath=configPath  [default: ./config.yml] Path to config JSON/YAML file (relative to current working
+                               directory)
+
+  -s, --secret=secret          HMAC secret key to use (will default to config.operatorApi.hmacSecret if present)
+
+  -u, --url=url                (required) Distributor node operator api base url (ie. http://localhost:3335)
+
+  -w, --workerId=workerId      (required) New workerId to set
+
+  -y, --yes                    Answer "yes" to any prompt, skipping any manual confirmations
+```
+
+_See code: [src/commands/node/set-worker.ts](https://github.com/Joystream/joystream/blob/v0.1.0/src/commands/node/set-worker.ts)_
+
+## `joystream-distributor node:shutdown`
+
+Send an api request to shutdown given distributor node.
+
+```
+USAGE
+  $ joystream-distributor node:shutdown
+
+OPTIONS
+  -c, --configPath=configPath  [default: ./config.yml] Path to config JSON/YAML file (relative to current working
+                               directory)
+
+  -s, --secret=secret          HMAC secret key to use (will default to config.operatorApi.hmacSecret if present)
+
+  -u, --url=url                (required) Distributor node operator api base url (ie. http://localhost:3335)
+
+  -y, --yes                    Answer "yes" to any prompt, skipping any manual confirmations
+```
+
+_See code: [src/commands/node/shutdown.ts](https://github.com/Joystream/joystream/blob/v0.1.0/src/commands/node/shutdown.ts)_
+
+## `joystream-distributor node:start-public-api`
+
+Send an api request to start public api of given distributor node.
+
+```
+USAGE
+  $ joystream-distributor node:start-public-api
+
+OPTIONS
+  -c, --configPath=configPath  [default: ./config.yml] Path to config JSON/YAML file (relative to current working
+                               directory)
+
+  -s, --secret=secret          HMAC secret key to use (will default to config.operatorApi.hmacSecret if present)
+
+  -u, --url=url                (required) Distributor node operator api base url (ie. http://localhost:3335)
+
+  -y, --yes                    Answer "yes" to any prompt, skipping any manual confirmations
+```
+
+_See code: [src/commands/node/start-public-api.ts](https://github.com/Joystream/joystream/blob/v0.1.0/src/commands/node/start-public-api.ts)_
+
+## `joystream-distributor node:stop-public-api`
+
+Send an api request to stop public api of given distributor node.
+
+```
+USAGE
+  $ joystream-distributor node:stop-public-api
+
+OPTIONS
+  -c, --configPath=configPath  [default: ./config.yml] Path to config JSON/YAML file (relative to current working
+                               directory)
+
+  -s, --secret=secret          HMAC secret key to use (will default to config.operatorApi.hmacSecret if present)
+
+  -u, --url=url                (required) Distributor node operator api base url (ie. http://localhost:3335)
+
+  -y, --yes                    Answer "yes" to any prompt, skipping any manual confirmations
+```
+
+_See code: [src/commands/node/stop-public-api.ts](https://github.com/Joystream/joystream/blob/v0.1.0/src/commands/node/stop-public-api.ts)_

+ 20 - 5
distributor-node/docs/node/index.md

@@ -1,5 +1,7 @@
 <!-- AUTO-GENERATED-CONTENT:START (TOC:firsth1=true) -->
-- [The API](#the-api)
+- [API](#api)
+  - [Public API](#public-api)
+  - [Operator API](#operator-api)
   - [Requesting assets](#requesting-assets)
     - [Scenario 1 (cache hit)](#scenario-1-cache-hit)
     - [Scenario 2 (pending)](#scenario-2-pending)
@@ -32,13 +34,26 @@
 
 <a name="the-api"></a>
 
-# The API
+# API
 
-The Distributor Node exposes an HTTP api implemented with [ExpressJS](https://expressjs.com/).
+The Distributor Node, depending on the configuration, can expose either one or two HTTP APIs, both implemented with [ExpressJS](https://expressjs.com/).
 
-The api is described by an [OpenAPI](https://swagger.io/specification/) schema located at _[src/api-spec/openapi.yml](../../src/api-spec/openapi.yml)_
+## Public API
 
-**Current, detailed api documentation can be found [here](../api/index.md)**
+Public API is enabled by default and can be used to retrieve assets from the node as well as some basic information about its current status.
+
+Public API is described by an [OpenAPI](https://swagger.io/specification/) schema located at _[src/api-spec/public.yml](../../src/api-spec/public.yml)_
+
+**Full public API documentation can be found [here](../api/public/index.md)**
+
+## Operator API
+
+Secured operator API can be enabled with [`config.operatorApi`](../schema/definition-properties-operatorapi.md).
+Operator API makes it possible to remotely execute some operations on a running node (ie. changing supported buckets).
+
+Operator API is described by an [OpenAPI](https://swagger.io/specification/) schema located at _[src/api-spec/operator.yml](../../src/api-spec/operator.yml)_
+
+**Full operator API documentation can be found [here](../api/operator/index.md)**
 
 <a name="requesting-assets"></a>
 

+ 0 - 0
distributor-node/docs/schema/definition-properties-buckets-oneof-bucket-ids-items.md → distributor-node/docs/schema/definition-properties-bucket-ids-items.md


+ 9 - 0
distributor-node/docs/schema/definition-properties-bucket-ids.md

@@ -0,0 +1,9 @@
+## buckets Type
+
+`integer[]`
+
+## buckets Constraints
+
+**minimum number of items**: the minimum number of items for this array is: `1`
+
+**unique items**: all items in this array must be unique. Duplicates are not allowed.

+ 0 - 11
distributor-node/docs/schema/definition-properties-buckets-oneof-all-buckets.md

@@ -1,11 +0,0 @@
-## 1 Type
-
-`string` ([All buckets](definition-properties-buckets-oneof-all-buckets.md))
-
-## 1 Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value   | Explanation |
-| :------ | :---------- |
-| `"all"` |             |

+ 0 - 7
distributor-node/docs/schema/definition-properties-buckets-oneof-bucket-ids.md

@@ -1,7 +0,0 @@
-## 0 Type
-
-`integer[]`
-
-## 0 Constraints
-
-**minimum number of items**: the minimum number of items for this array is: `1`

+ 0 - 9
distributor-node/docs/schema/definition-properties-buckets.md

@@ -1,9 +0,0 @@
-## buckets Type
-
-merged type ([Details](definition-properties-buckets.md))
-
-one (and only one) of
-
-*   [Bucket ids](definition-properties-buckets-oneof-bucket-ids.md "check type definition")
-
-*   [All buckets](definition-properties-buckets-oneof-all-buckets.md "check type definition")

+ 5 - 5
distributor-node/docs/schema/definition-properties-logs-properties-console-oneof-0.md → distributor-node/docs/schema/definition-properties-logs-properties-console-logging-options.md

@@ -1,12 +1,12 @@
-## 0 Type
+## console Type
 
-`object` ([Details](definition-properties-logs-properties-console-oneof-0.md))
+`object` ([Console logging options](definition-properties-logs-properties-console-logging-options.md))
 
-# 0 Properties
+# console Properties
 
 | Property        | Type     | Required | Nullable       | Defined by                                                                                                                                                                                                         |
 | :-------------- | :------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [level](#level) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console/oneOf/0/properties/level") |
+| [level](#level) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console/properties/level") |
 
 ## level
 
@@ -20,7 +20,7 @@ Minimum level of logs sent to this output
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console/oneOf/0/properties/level")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console/properties/level")
 
 ### level Type
 

+ 0 - 11
distributor-node/docs/schema/definition-properties-logs-properties-console-oneof-1.md

@@ -1,11 +0,0 @@
-## 1 Type
-
-`string`
-
-## 1 Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value   | Explanation |
-| :------ | :---------- |
-| `"off"` |             |

+ 0 - 41
distributor-node/docs/schema/definition-properties-logs-properties-console-oneof-console-logging-options.md

@@ -1,41 +0,0 @@
-## 0 Type
-
-`object` ([Console logging options](definition-properties-logs-properties-console-oneof-console-logging-options.md))
-
-# 0 Properties
-
-| Property        | Type     | Required | Nullable       | Defined by                                                                                                                                                                                                                            |
-| :-------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| [level](#level) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console/oneOf/0/properties/level") |
-
-## level
-
-Minimum level of logs sent to this output
-
-`level`
-
-*   is required
-
-*   Type: `string`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console/oneOf/0/properties/level")
-
-### level Type
-
-`string`
-
-### level Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value       | Explanation |
-| :---------- | :---------- |
-| `"error"`   |             |
-| `"warn"`    |             |
-| `"info"`    |             |
-| `"http"`    |             |
-| `"verbose"` |             |
-| `"debug"`   |             |
-| `"silly"`   |             |

+ 0 - 9
distributor-node/docs/schema/definition-properties-logs-properties-console.md

@@ -1,9 +0,0 @@
-## console Type
-
-merged type ([Details](definition-properties-logs-properties-console.md))
-
-one (and only one) of
-
-*   [Console logging options](definition-properties-logs-properties-console-oneof-console-logging-options.md "check type definition")
-
-*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")

+ 0 - 11
distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-1.md

@@ -1,11 +0,0 @@
-## 1 Type
-
-`string`
-
-## 1 Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value   | Explanation |
-| :------ | :---------- |
-| `"off"` |             |

+ 0 - 3
distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options-properties-endpoint.md

@@ -1,3 +0,0 @@
-## endpoint Type
-
-`string`

+ 0 - 60
distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options.md

@@ -1,60 +0,0 @@
-## 0 Type
-
-`object` ([Elasticsearch logging options](definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options.md))
-
-# 0 Properties
-
-| Property              | Type     | Required | Nullable       | Defined by                                                                                                                                                                                                                                              |
-| :-------------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| [level](#level)       | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/level")                   |
-| [endpoint](#endpoint) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options-properties-endpoint.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/endpoint") |
-
-## level
-
-Minimum level of logs sent to this output
-
-`level`
-
-*   is required
-
-*   Type: `string`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/level")
-
-### level Type
-
-`string`
-
-### level Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value       | Explanation |
-| :---------- | :---------- |
-| `"error"`   |             |
-| `"warn"`    |             |
-| `"info"`    |             |
-| `"http"`    |             |
-| `"verbose"` |             |
-| `"debug"`   |             |
-| `"silly"`   |             |
-
-## endpoint
-
-Elastichsearch endpoint to push the logs to (for example: <http://localhost:9200>)
-
-`endpoint`
-
-*   is required
-
-*   Type: `string`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options-properties-endpoint.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/endpoint")
-
-### endpoint Type
-
-`string`

+ 0 - 9
distributor-node/docs/schema/definition-properties-logs-properties-elastic.md

@@ -1,9 +0,0 @@
-## elastic Type
-
-merged type ([Details](definition-properties-logs-properties-elastic.md))
-
-one (and only one) of
-
-*   [Elasticsearch logging options](definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options.md "check type definition")
-
-*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")

+ 0 - 0
distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-0-properties-endpoint.md → distributor-node/docs/schema/definition-properties-logs-properties-elasticsearch-logging-options-properties-endpoint.md


+ 9 - 9
distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-0.md → distributor-node/docs/schema/definition-properties-logs-properties-elasticsearch-logging-options.md

@@ -1,13 +1,13 @@
-## 0 Type
+## elastic Type
 
-`object` ([Details](definition-properties-logs-properties-elastic-oneof-0.md))
+`object` ([Elasticsearch logging options](definition-properties-logs-properties-elasticsearch-logging-options.md))
 
-# 0 Properties
+# elastic Properties
 
-| Property              | Type     | Required | Nullable       | Defined by                                                                                                                                                                                                                  |
-| :-------------------- | :------- | :------- | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [level](#level)       | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/level")          |
-| [endpoint](#endpoint) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-elastic-oneof-0-properties-endpoint.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/endpoint") |
+| Property              | Type     | Required | Nullable       | Defined by                                                                                                                                                                                                                        |
+| :-------------------- | :------- | :------- | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [level](#level)       | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/properties/level")                |
+| [endpoint](#endpoint) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-elasticsearch-logging-options-properties-endpoint.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/properties/endpoint") |
 
 ## level
 
@@ -21,7 +21,7 @@ Minimum level of logs sent to this output
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/level")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/properties/level")
 
 ### level Type
 
@@ -53,7 +53,7 @@ Elastichsearch endpoint to push the logs to (for example: <http://localhost:9200
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-elastic-oneof-0-properties-endpoint.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/endpoint")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-elasticsearch-logging-options-properties-endpoint.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/properties/endpoint")
 
 ### endpoint Type
 

+ 0 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-archive.md → distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-archive.md


+ 0 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-frequency.md → distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-frequency.md


+ 0 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-level.md → distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-level.md


+ 0 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-maxfiles.md → distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-maxfiles.md


+ 0 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-maxsize.md → distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-maxsize.md


+ 0 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-path.md → distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options-properties-path.md


+ 15 - 15
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0.md → distributor-node/docs/schema/definition-properties-logs-properties-file-logging-options.md

@@ -1,17 +1,17 @@
-## 0 Type
+## file Type
 
-`object` ([Details](definition-properties-logs-properties-file-oneof-0.md))
+`object` ([File logging options](definition-properties-logs-properties-file-logging-options.md))
 
-# 0 Properties
+# file Properties
 
 | Property                | Type      | Required | Nullable       | Defined by                                                                                                                                                                                                              |
 | :---------------------- | :-------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [level](#level)         | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/level")         |
-| [path](#path)           | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-path.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/path")           |
-| [maxFiles](#maxfiles)   | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-maxfiles.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxFiles")   |
-| [maxSize](#maxsize)     | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-maxsize.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxSize")     |
-| [frequency](#frequency) | `string`  | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-frequency.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/frequency") |
-| [archive](#archive)     | `boolean` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-archive.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/archive")     |
+| [level](#level)         | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/level")         |
+| [path](#path)           | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-path.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/path")           |
+| [maxFiles](#maxfiles)   | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-maxfiles.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/maxFiles")   |
+| [maxSize](#maxsize)     | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-maxsize.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/maxSize")     |
+| [frequency](#frequency) | `string`  | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-frequency.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/frequency") |
+| [archive](#archive)     | `boolean` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-archive.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/archive")     |
 
 ## level
 
@@ -25,7 +25,7 @@ Minimum level of logs sent to this output
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/level")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/level")
 
 ### level Type
 
@@ -57,7 +57,7 @@ Path where the logs will be stored (absolute or relative to config file)
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-path.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/path")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-path.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/path")
 
 ### path Type
 
@@ -75,7 +75,7 @@ Maximum number of log files to store
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-maxfiles.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxFiles")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-maxfiles.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/maxFiles")
 
 ### maxFiles Type
 
@@ -97,7 +97,7 @@ Maximum size of a single log file in bytes
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-maxsize.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxSize")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-maxsize.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/maxSize")
 
 ### maxSize Type
 
@@ -119,7 +119,7 @@ The frequency of creating new log files (regardless of maxSize)
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-frequency.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/frequency")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-frequency.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/frequency")
 
 ### frequency Type
 
@@ -156,7 +156,7 @@ Whether to archive old logs
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-archive.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/archive")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-logging-options-properties-archive.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/properties/archive")
 
 ### archive Type
 

+ 0 - 11
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-1.md

@@ -1,11 +0,0 @@
-## 1 Type
-
-`string`
-
-## 1 Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value   | Explanation |
-| :------ | :---------- |
-| `"off"` |             |

+ 0 - 3
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-archive.md

@@ -1,3 +0,0 @@
-## archive Type
-
-`boolean`

+ 0 - 22
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-frequency.md

@@ -1,22 +0,0 @@
-## frequency Type
-
-`string`
-
-## frequency Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value       | Explanation |
-| :---------- | :---------- |
-| `"yearly"`  |             |
-| `"monthly"` |             |
-| `"daily"`   |             |
-| `"hourly"`  |             |
-
-## frequency Default Value
-
-The default value is:
-
-```json
-"daily"
-```

+ 0 - 17
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md

@@ -1,17 +0,0 @@
-## level Type
-
-`string`
-
-## level Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value       | Explanation |
-| :---------- | :---------- |
-| `"error"`   |             |
-| `"warn"`    |             |
-| `"info"`    |             |
-| `"http"`    |             |
-| `"verbose"` |             |
-| `"debug"`   |             |
-| `"silly"`   |             |

+ 0 - 7
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxsize.md

@@ -1,7 +0,0 @@
-## maxSize Type
-
-`integer`
-
-## maxSize Constraints
-
-**minimum**: the value of this number must greater than or equal to: `1024`

+ 0 - 3
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-path.md

@@ -1,3 +0,0 @@
-## path Type
-
-`string`

+ 0 - 163
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options.md

@@ -1,163 +0,0 @@
-## 0 Type
-
-`object` ([File logging options](definition-properties-logs-properties-file-oneof-file-logging-options.md))
-
-# 0 Properties
-
-| Property                | Type      | Required | Nullable       | Defined by                                                                                                                                                                                                                                 |
-| :---------------------- | :-------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [level](#level)         | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/level")         |
-| [path](#path)           | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-path.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/path")           |
-| [maxFiles](#maxfiles)   | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxfiles.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxFiles")   |
-| [maxSize](#maxsize)     | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxsize.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxSize")     |
-| [frequency](#frequency) | `string`  | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-frequency.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/frequency") |
-| [archive](#archive)     | `boolean` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-archive.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/archive")     |
-
-## level
-
-Minimum level of logs sent to this output
-
-`level`
-
-*   is required
-
-*   Type: `string`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/level")
-
-### level Type
-
-`string`
-
-### level Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value       | Explanation |
-| :---------- | :---------- |
-| `"error"`   |             |
-| `"warn"`    |             |
-| `"info"`    |             |
-| `"http"`    |             |
-| `"verbose"` |             |
-| `"debug"`   |             |
-| `"silly"`   |             |
-
-## path
-
-Path where the logs will be stored (absolute or relative to config file)
-
-`path`
-
-*   is required
-
-*   Type: `string`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-path.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/path")
-
-### path Type
-
-`string`
-
-## maxFiles
-
-Maximum number of log files to store
-
-`maxFiles`
-
-*   is optional
-
-*   Type: `integer`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxfiles.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxFiles")
-
-### maxFiles Type
-
-`integer`
-
-### maxFiles Constraints
-
-**minimum**: the value of this number must greater than or equal to: `1`
-
-## maxSize
-
-Maximum size of a single log file in bytes
-
-`maxSize`
-
-*   is optional
-
-*   Type: `integer`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxsize.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxSize")
-
-### maxSize Type
-
-`integer`
-
-### maxSize Constraints
-
-**minimum**: the value of this number must greater than or equal to: `1024`
-
-## frequency
-
-The frequency of creating new log files (regardless of maxSize)
-
-`frequency`
-
-*   is optional
-
-*   Type: `string`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-frequency.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/frequency")
-
-### frequency Type
-
-`string`
-
-### frequency Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value       | Explanation |
-| :---------- | :---------- |
-| `"yearly"`  |             |
-| `"monthly"` |             |
-| `"daily"`   |             |
-| `"hourly"`  |             |
-
-### frequency Default Value
-
-The default value is:
-
-```json
-"daily"
-```
-
-## archive
-
-Whether to archive old logs
-
-`archive`
-
-*   is optional
-
-*   Type: `boolean`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-archive.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/archive")
-
-### archive Type
-
-`boolean`

+ 0 - 11
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-switch-off.md

@@ -1,11 +0,0 @@
-## 1 Type
-
-`string` ([Switch off](definition-properties-logs-properties-file-oneof-switch-off.md))
-
-## 1 Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value   | Explanation |
-| :------ | :---------- |
-| `"off"` |             |

+ 0 - 9
distributor-node/docs/schema/definition-properties-logs-properties-file.md

@@ -1,9 +0,0 @@
-## file Type
-
-merged type ([Details](definition-properties-logs-properties-file.md))
-
-one (and only one) of
-
-*   [File logging options](definition-properties-logs-properties-file-oneof-file-logging-options.md "check type definition")
-
-*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")

+ 14 - 32
distributor-node/docs/schema/definition-properties-logs.md

@@ -4,11 +4,11 @@
 
 # logs Properties
 
-| Property            | Type   | Required | Nullable       | Defined by                                                                                                                                                          |
-| :------------------ | :----- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| [file](#file)       | Merged | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file")       |
-| [console](#console) | Merged | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-console.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console") |
-| [elastic](#elastic) | Merged | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-elastic.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic") |
+| Property            | Type     | Required | Nullable       | Defined by                                                                                                                                                                                |
+| :------------------ | :------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [file](#file)       | `object` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-logging-options.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file")             |
+| [console](#console) | `object` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-console-logging-options.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console")       |
+| [elastic](#elastic) | `object` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-elasticsearch-logging-options.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic") |
 
 ## file
 
@@ -18,21 +18,15 @@
 
 *   is optional
 
-*   Type: merged type ([Details](definition-properties-logs-properties-file.md))
+*   Type: `object` ([File logging options](definition-properties-logs-properties-file-logging-options.md))
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-file.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-logging-options.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file")
 
 ### file Type
 
-merged type ([Details](definition-properties-logs-properties-file.md))
-
-one (and only one) of
-
-*   [File logging options](definition-properties-logs-properties-file-oneof-file-logging-options.md "check type definition")
-
-*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")
+`object` ([File logging options](definition-properties-logs-properties-file-logging-options.md))
 
 ## console
 
@@ -42,21 +36,15 @@ one (and only one) of
 
 *   is optional
 
-*   Type: merged type ([Details](definition-properties-logs-properties-console.md))
+*   Type: `object` ([Console logging options](definition-properties-logs-properties-console-logging-options.md))
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-console.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-console-logging-options.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console")
 
 ### console Type
 
-merged type ([Details](definition-properties-logs-properties-console.md))
-
-one (and only one) of
-
-*   [Console logging options](definition-properties-logs-properties-console-oneof-console-logging-options.md "check type definition")
-
-*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")
+`object` ([Console logging options](definition-properties-logs-properties-console-logging-options.md))
 
 ## elastic
 
@@ -66,18 +54,12 @@ one (and only one) of
 
 *   is optional
 
-*   Type: merged type ([Details](definition-properties-logs-properties-elastic.md))
+*   Type: `object` ([Elasticsearch logging options](definition-properties-logs-properties-elasticsearch-logging-options.md))
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-logs-properties-elastic.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic")
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-elasticsearch-logging-options.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic")
 
 ### elastic Type
 
-merged type ([Details](definition-properties-logs-properties-elastic.md))
-
-one (and only one) of
-
-*   [Elasticsearch logging options](definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options.md "check type definition")
-
-*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")
+`object` ([Elasticsearch logging options](definition-properties-logs-properties-elasticsearch-logging-options.md))

+ 3 - 0
distributor-node/docs/schema/definition-properties-operatorapi-properties-hmacsecret.md

@@ -0,0 +1,3 @@
+## hmacSecret Type
+
+`string`

+ 0 - 0
distributor-node/docs/schema/definition-properties-port.md → distributor-node/docs/schema/definition-properties-operatorapi-properties-port.md


+ 50 - 0
distributor-node/docs/schema/definition-properties-operatorapi.md

@@ -0,0 +1,50 @@
+## operatorApi Type
+
+`object` ([Details](definition-properties-operatorapi.md))
+
+# operatorApi Properties
+
+| Property                  | Type      | Required | Nullable       | Defined by                                                                                                                                                                              |
+| :------------------------ | :-------- | :------- | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [port](#port)             | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-operatorapi-properties-port.md "https://joystream.org/schemas/argus/config#/properties/operatorApi/properties/port")             |
+| [hmacSecret](#hmacsecret) | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-operatorapi-properties-hmacsecret.md "https://joystream.org/schemas/argus/config#/properties/operatorApi/properties/hmacSecret") |
+
+## port
+
+Distributor node operator api port
+
+`port`
+
+*   is required
+
+*   Type: `integer`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-operatorapi-properties-port.md "https://joystream.org/schemas/argus/config#/properties/operatorApi/properties/port")
+
+### port Type
+
+`integer`
+
+### port Constraints
+
+**minimum**: the value of this number must greater than or equal to: `0`
+
+## hmacSecret
+
+HMAC (HS256) secret key used for JWT authorization
+
+`hmacSecret`
+
+*   is required
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-operatorapi-properties-hmacsecret.md "https://joystream.org/schemas/argus/config#/properties/operatorApi/properties/hmacSecret")
+
+### hmacSecret Type
+
+`string`

+ 3 - 3
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxfiles.md → distributor-node/docs/schema/definition-properties-publicapi-properties-port.md

@@ -1,7 +1,7 @@
-## maxFiles Type
+## port Type
 
 `integer`
 
-## maxFiles Constraints
+## port Constraints
 
-**minimum**: the value of this number must greater than or equal to: `1`
+**minimum**: the value of this number must greater than or equal to: `0`

+ 31 - 0
distributor-node/docs/schema/definition-properties-publicapi.md

@@ -0,0 +1,31 @@
+## publicApi Type
+
+`object` ([Details](definition-properties-publicapi.md))
+
+# publicApi Properties
+
+| Property      | Type      | Required | Nullable       | Defined by                                                                                                                                                              |
+| :------------ | :-------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [port](#port) | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-publicapi-properties-port.md "https://joystream.org/schemas/argus/config#/properties/publicApi/properties/port") |
+
+## port
+
+Distributor node public api port
+
+`port`
+
+*   is required
+
+*   Type: `integer`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-publicapi-properties-port.md "https://joystream.org/schemas/argus/config#/properties/publicApi/properties/port")
+
+### port Type
+
+`integer`
+
+### port Constraints
+
+**minimum**: the value of this number must greater than or equal to: `0`

+ 38 - 23
distributor-node/docs/schema/definition.md

@@ -12,10 +12,11 @@
 | [logs](#logs)               | `object`  | Optional | cannot be null | [Distributor node configuration](definition-properties-logs.md "https://joystream.org/schemas/argus/config#/properties/logs")               |
 | [limits](#limits)           | `object`  | Required | cannot be null | [Distributor node configuration](definition-properties-limits.md "https://joystream.org/schemas/argus/config#/properties/limits")           |
 | [intervals](#intervals)     | `object`  | Required | cannot be null | [Distributor node configuration](definition-properties-intervals.md "https://joystream.org/schemas/argus/config#/properties/intervals")     |
-| [port](#port)               | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-port.md "https://joystream.org/schemas/argus/config#/properties/port")               |
-| [keys](#keys)               | `array`   | Required | cannot be null | [Distributor node configuration](definition-properties-keys.md "https://joystream.org/schemas/argus/config#/properties/keys")               |
-| [buckets](#buckets)         | Merged    | Required | cannot be null | [Distributor node configuration](definition-properties-buckets.md "https://joystream.org/schemas/argus/config#/properties/buckets")         |
-| [workerId](#workerid)       | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-workerid.md "https://joystream.org/schemas/argus/config#/properties/workerId")       |
+| [publicApi](#publicapi)     | `object`  | Required | cannot be null | [Distributor node configuration](definition-properties-publicapi.md "https://joystream.org/schemas/argus/config#/properties/publicApi")     |
+| [operatorApi](#operatorapi) | `object`  | Optional | cannot be null | [Distributor node configuration](definition-properties-operatorapi.md "https://joystream.org/schemas/argus/config#/properties/operatorApi") |
+| [keys](#keys)               | `array`   | Optional | cannot be null | [Distributor node configuration](definition-properties-keys.md "https://joystream.org/schemas/argus/config#/properties/keys")               |
+| [buckets](#buckets)         | `array`   | Optional | cannot be null | [Distributor node configuration](definition-properties-bucket-ids.md "https://joystream.org/schemas/argus/config#/properties/buckets")      |
+| [workerId](#workerid)       | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-workerid.md "https://joystream.org/schemas/argus/config#/properties/workerId")       |
 
 ## id
 
@@ -129,27 +130,41 @@ Specifies how often periodic tasks (for example cache cleanup) are executed by t
 
 `object` ([Details](definition-properties-intervals.md))
 
-## port
+## publicApi
 
-Distributor node http api port
+Public api configuration
 
-`port`
+`publicApi`
 
 *   is required
 
-*   Type: `integer`
+*   Type: `object` ([Details](definition-properties-publicapi.md))
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-port.md "https://joystream.org/schemas/argus/config#/properties/port")
+*   defined in: [Distributor node configuration](definition-properties-publicapi.md "https://joystream.org/schemas/argus/config#/properties/publicApi")
 
-### port Type
+### publicApi Type
 
-`integer`
+`object` ([Details](definition-properties-publicapi.md))
 
-### port Constraints
+## operatorApi
 
-**minimum**: the value of this number must greater than or equal to: `0`
+Operator api configuration
+
+`operatorApi`
+
+*   is optional
+
+*   Type: `object` ([Details](definition-properties-operatorapi.md))
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-operatorapi.md "https://joystream.org/schemas/argus/config#/properties/operatorApi")
+
+### operatorApi Type
+
+`object` ([Details](definition-properties-operatorapi.md))
 
 ## keys
 
@@ -157,7 +172,7 @@ Specifies the keys available within distributor node CLI.
 
 `keys`
 
-*   is required
+*   is optional
 
 *   Type: an array of merged types ([Details](definition-properties-keys-items.md))
 
@@ -175,27 +190,27 @@ an array of merged types ([Details](definition-properties-keys-items.md))
 
 ## buckets
 
-Specifies the buckets distributed by the node
+Set of bucket ids distributed by the node. If not specified, all buckets currently assigned to worker specified in `config.workerId` will be distributed.
 
 `buckets`
 
-*   is required
+*   is optional
 
-*   Type: merged type ([Details](definition-properties-buckets.md))
+*   Type: `integer[]`
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-buckets.md "https://joystream.org/schemas/argus/config#/properties/buckets")
+*   defined in: [Distributor node configuration](definition-properties-bucket-ids.md "https://joystream.org/schemas/argus/config#/properties/buckets")
 
 ### buckets Type
 
-merged type ([Details](definition-properties-buckets.md))
+`integer[]`
 
-one (and only one) of
+### buckets Constraints
 
-*   [Bucket ids](definition-properties-buckets-oneof-bucket-ids.md "check type definition")
+**minimum number of items**: the minimum number of items for this array is: `1`
 
-*   [All buckets](definition-properties-buckets-oneof-all-buckets.md "check type definition")
+**unique items**: all items in this array must be unique. Duplicates are not allowed.
 
 ## workerId
 
@@ -203,7 +218,7 @@ ID of the node operator (distribution working group worker)
 
 `workerId`
 
-*   is required
+*   is optional
 
 *   Type: `integer`
 

+ 3 - 1
distributor-node/package.json

@@ -137,7 +137,9 @@
     "generate:api:all": "yarn generate:api:storage-node",
     "generate:docs:cli": "yarn oclif-dev readme --multi --dir ./docs/commands",
     "generate:docs:config": "yarn ts-node --transpile-only ./src/schemas/scripts/generateConfigDoc.ts",
-    "generate:docs:public-api": "yarn widdershins ./src/api-spec/public.yml --language_tabs javascript:JavaScript shell:Shell -o ./docs/api/index.md -u ./docs/api/templates",
+    "generate:docs:public-api": "yarn widdershins ./src/api-spec/public.yml --language_tabs javascript:JavaScript shell:Shell -o ./docs/api/public/index.md -u ./docs/api/templates",
+    "generate:docs:operator-api": "yarn widdershins ./src/api-spec/operator.yml --language_tabs javascript:JavaScript shell:Shell -o ./docs/api/operator/index.md -u ./docs/api/templates",
+    "generate:docs:api": "yarn generate:docs:public-api && yarn generate:docs:operator-api",
     "generate:docs:toc": "yarn md-magic --path ./docs/**/*.md",
     "generate:docs:all": "yarn generate:docs:cli && yarn generate:docs:config && yarn generate:docs:api && yarn generate:docs:toc",
     "generate:all": "yarn generate:types:all && yarn generate:api:all && yarn generate:docs:all",

+ 0 - 7
distributor-node/src/api-spec/public.yml

@@ -147,13 +147,6 @@ components:
         type: string
         enum: ['external', 'local']
   schemas:
-    SetConfigBody:
-      type: object
-      properties:
-        path:
-          description: Config setting path (ie. limits.storage)
-          type: string
-
     ErrorResponse:
       type: object
       required: