diff --git a/package.json b/package.json index eaa1fb705..765606be1 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "deploy": "docusaurus deploy", "clear": "docusaurus clear", "serve": "docusaurus serve", - "format": "prettier --write . && node src/sortOpenAPI.js", + "format": "prettier --write . && npm run sort", + "sort": "node src/sortOpenAPI.js", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids" }, diff --git a/static/rest-api.yaml b/static/rest-api.yaml index f0c8ecdf0..6b508dabb 100644 --- a/static/rest-api.yaml +++ b/static/rest-api.yaml @@ -147,6 +147,26 @@ paths: responses: "200": $ref: "#/components/responses/NumberResult" + /batterymode: + delete: + summary: TODO + description: TODO + tags: + - Home Battery + responses: + "200": + $ref: "#/components/responses/BatteryModeResult" + /batterymode/{batteryMode}: + post: + summary: TODO + description: TODO + tags: + - Home Battery + parameters: + - $ref: "#/components/parameters/batteryMode" + responses: + "200": + $ref: "#/components/responses/BatteryModeResult" /buffersoc/{soc}: post: summary: Set battery buffer SoC @@ -825,6 +845,22 @@ paths: $ref: "#/components/schemas/LogAreas" "401": $ref: "#/components/responses/Unauthorized" + /system/reset: + post: + summary: TODO + description: TODO + security: + - cookieAuth: [] + tags: + - System + responses: + "200": + description: Success + content: + text/plain: + schema: + type: string + example: OK /system/shutdown: post: summary: Shutdown evcc @@ -966,6 +1002,15 @@ paths: $ref: "#/components/schemas/StaticSocPlan" components: schemas: + BatteryMode: + description: TODO + type: string + example: normal + enum: + - unknown + - normal + - hold + - charge ChangePassword: type: object properties: @@ -1335,6 +1380,13 @@ components: required: true schema: $ref: "#/components/schemas/Power" + batteryMode: + name: batteryMode + description: TODO + in: path + required: true + schema: + $ref: "#/components/schemas/BatteryMode" costLimit: name: cost description: Cost limit in configured currency (default EUR) or CO2 limit in g/kWh @@ -1445,6 +1497,19 @@ components: type: string enum: - Unauthorized + BatteryModeResult: + description: TODO + content: + application/json: + schema: + type: object + properties: + result: + type: integer + description: | + Battery mode. 0: unknown, 1: normal, 2: hold, 3: charge + minimum: 0 + maximum: 3 securitySchemes: cookieAuth: type: apiKey