diff --git a/ErsatzTV/wwwroot/openapi/v1.json b/ErsatzTV/wwwroot/openapi/v1.json index 4908aaada..2af953f90 100644 --- a/ErsatzTV/wwwroot/openapi/v1.json +++ b/ErsatzTV/wwwroot/openapi/v1.json @@ -14382,6 +14382,115 @@ ] } }, + "/api/v1/playouts/{id}/reshuffle": { + "post": { + "tags": [ + "Playouts" + ], + "summary": "Reshuffle a playout", + "description": "Rolls a new random play order for a Classic, Block, Sequential, or Scripted playout by reseeding it and rebuilding from scratch (clears rerun history). Only valid for those kinds; other kinds return 422.", + "operationId": "ReshufflePlayout", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "202": { + "description": "Accepted" + }, + "404": { + "description": "Not Found", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "API key missing or invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "400": { + "description": "Request validation failed (model binding or FluentValidation).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + } + }, + "security": [ + { } + ] + } + }, "/api/v1/playouts/items/{id}/scheduling-context": { "get": { "tags": [ @@ -28256,7 +28365,8 @@ "dailyRebuildTime", "buildStatus", "playoutMode", - "isLocked" + "isLocked", + "seed" ], "type": "object", "properties": { @@ -28298,6 +28408,10 @@ }, "isLocked": { "type": "boolean" + }, + "seed": { + "type": "integer", + "format": "int32" } } }, @@ -28323,7 +28437,8 @@ "buildStatus", "decoId", "decoName", - "isLocked" + "isLocked", + "seed" ], "type": "object", "properties": { @@ -28384,6 +28499,10 @@ }, "isLocked": { "type": "boolean" + }, + "seed": { + "type": "integer", + "format": "int32" } } }, diff --git a/docs/endpoint-index.md b/docs/endpoint-index.md index 2166412be..3c3d2610c 100644 --- a/docs/endpoint-index.md +++ b/docs/endpoint-index.md @@ -2,7 +2,7 @@ *Generated by `scripts/generate-endpoint-index.py` from `ErsatzTV/wwwroot/openapi/v1.json`. Do not edit by hand -- regenerated by `scripts/update-openapi.sh`.* -163 endpoints, 246 operations. +164 endpoints, 247 operations. ## Artists @@ -286,6 +286,7 @@ | POST | `/api/v1/playouts/{id}/erase-items` | ErasePlayoutItems | Erase a playout's items | | POST | `/api/v1/playouts/{id}/erase-items-and-history` | ErasePlayoutItemsAndHistory | Erase a playout's items and history | | GET | `/api/v1/playouts/{id}/items` | GetPlayoutItems | Get upcoming items (and unscheduled gaps) for a playout | +| POST | `/api/v1/playouts/{id}/reshuffle` | ReshufflePlayout | Reshuffle a playout | | GET | `/api/v1/playouts/{id}/templates` | GetPlayoutTemplates | Get a block playout's templates | | PUT | `/api/v1/playouts/{id}/templates` | PlayoutReplaceTemplates | Replace a block playout's templates | diff --git a/web/src/api/generated/v1.d.ts b/web/src/api/generated/v1.d.ts index 0673ca366..377b15581 100644 --- a/web/src/api/generated/v1.d.ts +++ b/web/src/api/generated/v1.d.ts @@ -1116,6 +1116,7 @@ export interface components { "buildStatus": null | components["schemas"]["PlayoutBuildStatusResponseModel"]; "playoutMode": components["schemas"]["ChannelPlayoutMode"]; "isLocked": boolean; + "seed": number; }; "PlayoutMode": "Flood" | "One" | "Multiple" | "Duration"; "PlayoutResponseModel": { @@ -1131,6 +1132,7 @@ export interface components { "decoId": null | number; "decoName": null | string; "isLocked": boolean; + "seed": number; }; "PlayoutScheduleKind": "None" | "Classic" | "Block" | "Sequential" | "Scripted" | "ExternalJson"; "PlayoutSettingsResponseModel": {