From fcadceb00925372720ea697c3bb7e50e2d58efbe Mon Sep 17 00:00:00 2001 From: benbierens Date: Wed, 11 Sep 2024 14:24:12 +0200 Subject: [PATCH] References autoclientcenter from autoclient --- Tools/AutoClient/AutoClient.csproj | 16 ++ Tools/AutoClientCenter/swagger.json | 311 ++++++++++++++++++++++++++++ 2 files changed, 327 insertions(+) create mode 100644 Tools/AutoClientCenter/swagger.json diff --git a/Tools/AutoClient/AutoClient.csproj b/Tools/AutoClient/AutoClient.csproj index 9340dc9..07a0250 100644 --- a/Tools/AutoClient/AutoClient.csproj +++ b/Tools/AutoClient/AutoClient.csproj @@ -7,6 +7,22 @@ enable + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/Tools/AutoClientCenter/swagger.json b/Tools/AutoClientCenter/swagger.json new file mode 100644 index 0000000..ea2a3e3 --- /dev/null +++ b/Tools/AutoClientCenter/swagger.json @@ -0,0 +1,311 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "AutoClientCenter", + "version": "1.0" + }, + "paths": { + "/Config/Stats": { + "get": { + "tags": [ + "Config" + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/AcStats" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcStats" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AcStats" + } + } + } + } + } + } + }, + "/Config/Set": { + "post": { + "tags": [ + "Config" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcTasks" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AcTasks" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AcTasks" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + } + } + } + }, + "/Tasks": { + "get": { + "tags": [ + "Tasks" + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/AcTasks" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcTasks" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AcTasks" + } + } + } + } + } + } + }, + "/Tasks/Results": { + "post": { + "tags": [ + "Tasks" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AcTaskStep" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AcTaskStep" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AcTaskStep" + } + } + } + } + }, + "responses": { + "200": { + "description": "Success" + } + } + } + } + }, + "components": { + "schemas": { + "AcDownloadStep": { + "type": "object", + "properties": { + "cid": { + "type": "string", + "nullable": true + }, + "resultDownloadTimeMilliseconds": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "AcStats": { + "type": "object", + "properties": { + "serviceStartUtc": { + "type": "string", + "format": "date-time" + }, + "totalUploads": { + "type": "integer", + "format": "int32" + }, + "totalUploadsFailed": { + "type": "integer", + "format": "int32" + }, + "totalDownloads": { + "type": "integer", + "format": "int32" + }, + "downloadTimesMillisecondsPerKb": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "nullable": true + }, + "totalDownloadsFailed": { + "type": "integer", + "format": "int32" + }, + "totalContractsStarted": { + "type": "integer", + "format": "int32" + }, + "totalContractStartsFailed": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "AcStoreStep": { + "type": "object", + "properties": { + "contractDurationMinutes": { + "type": "integer", + "format": "int32" + }, + "contractExpiryMinutes": { + "type": "integer", + "format": "int32" + }, + "numHosts": { + "type": "integer", + "format": "int32" + }, + "hostTolerance": { + "type": "integer", + "format": "int32" + }, + "price": { + "type": "integer", + "format": "int32" + }, + "requiredCollateral": { + "type": "integer", + "format": "int32" + }, + "resultPurchaseId": { + "type": "string", + "nullable": true + }, + "resultOriginalCid": { + "type": "string", + "nullable": true + }, + "resultEncodedCid": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AcTask": { + "type": "object", + "properties": { + "chanceWeight": { + "type": "integer", + "format": "int32" + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AcTaskStep" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AcTaskStep": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "uploadStep": { + "$ref": "#/components/schemas/AcUploadStep" + }, + "storeStep": { + "$ref": "#/components/schemas/AcStoreStep" + }, + "downloadStep": { + "$ref": "#/components/schemas/AcDownloadStep" + }, + "resultErrorMsg": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AcTasks": { + "type": "object", + "properties": { + "startTaskEverySeconds": { + "type": "integer", + "format": "int32" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AcTask" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AcUploadStep": { + "type": "object", + "properties": { + "sizeInBytes": { + "type": "integer", + "format": "int64" + }, + "resultCid": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + } + } + } +} \ No newline at end of file