{
  "openapi": "3.1.1",
  "info": {
    "title": "Viswoo API",
    "description": "Müşteri dış API'si (ADR 0011). Authorization: Bearer vzk_…",
    "version": "v1"
  },
  "paths": {
    "/api/ext/v1/me": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Anahtarın müşterisi, adı ve izinleri",
        "operationId": "ExtGetMe",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtMe"
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/locations": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Şubeler",
        "operationId": "ExtListLocations",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtPageOfExtLocation"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "screens:read"
      }
    },
    "/api/ext/v1/screens": {
      "get": {
        "tags": [
          "Screens"
        ],
        "summary": "Ekranlar, cihazları ve canlı durumları; şubeye, etikete ve çevrimiçi olmaya göre süzülür",
        "operationId": "ExtListScreens",
        "parameters": [
          {
            "name": "locationId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "online",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtPageOfExtScreen"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "screens:read"
      }
    },
    "/api/ext/v1/screens/{id}": {
      "get": {
        "tags": [
          "Screens"
        ],
        "operationId": "ExtGetScreen",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtScreen"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "screens:read"
      },
      "put": {
        "tags": [
          "Screens"
        ],
        "summary": "Ekran ayarlarının tamamını yazar (ad, şube, varsayılan playlist, yön, etiketler, yayın saatleri)",
        "operationId": "ExtUpdateScreen",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtScreenSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtScreen"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "screens:write"
      }
    },
    "/api/ext/v1/screens/{id}/commands": {
      "post": {
        "tags": [
          "Screens"
        ],
        "summary": "Uzaktan komut; sonuç komut kaydından okunur",
        "operationId": "ExtCreateScreenCommand",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtCommandRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtCommand"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "screens:write"
      }
    },
    "/api/ext/v1/screens/{id}/commands/{commandId}": {
      "get": {
        "tags": [
          "Screens"
        ],
        "operationId": "ExtGetScreenCommand",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commandId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtCommand"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "screens:read"
      }
    },
    "/api/ext/v1/screens/{id}/screenshot": {
      "get": {
        "tags": [
          "Screens"
        ],
        "summary": "Son uygulama görüntüsü (önce screenshot komutu gönderilir)",
        "operationId": "ExtGetScreenScreenshot",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtScreenshot"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "screens:read"
      }
    },
    "/api/ext/v1/media": {
      "get": {
        "tags": [
          "Media"
        ],
        "summary": "Medya kütüphanesi (yeniden eskiye); klasöre, türe ve duruma göre süzülür",
        "operationId": "ExtListMedia",
        "parameters": [
          {
            "name": "folderId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtPageOfExtMedia"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:read"
      }
    },
    "/api/ext/v1/media/{id}": {
      "get": {
        "tags": [
          "Media"
        ],
        "operationId": "ExtGetMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtMedia"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:read"
      },
      "put": {
        "tags": [
          "Media"
        ],
        "summary": "Ad ve klasör",
        "operationId": "ExtUpdateMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtMediaUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtMedia"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:write"
      },
      "delete": {
        "tags": [
          "Media"
        ],
        "summary": "Çöp kutusuna taşır (30 gün); playlistte kullanılan medya silinmez",
        "operationId": "ExtDeleteMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        },
        "x-viswoo-scope": "content:write"
      }
    },
    "/api/ext/v1/media/uploads": {
      "post": {
        "tags": [
          "Media"
        ],
        "summary": "Yükleme adresi (30 dk); dosya bu adrese PUT edilir, sonra complete çağrılır",
        "operationId": "ExtCreateMediaUpload",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtUpload"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:write"
      }
    },
    "/api/ext/v1/media/{id}/complete": {
      "post": {
        "tags": [
          "Media"
        ],
        "summary": "Yükleme bitti: dosya sunucuda doğrulanır ve işlenmeye alınır; durum ready olunca kullanılır",
        "operationId": "ExtCompleteMediaUpload",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtMedia"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:write"
      }
    },
    "/api/ext/v1/folders": {
      "get": {
        "tags": [
          "Media"
        ],
        "operationId": "ExtListFolders",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtPageOfExtFolder"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:read"
      },
      "post": {
        "tags": [
          "Media"
        ],
        "operationId": "ExtCreateFolder",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtFolderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtFolder"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:write"
      }
    },
    "/api/ext/v1/folders/{id}": {
      "put": {
        "tags": [
          "Media"
        ],
        "operationId": "ExtRenameFolder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtFolderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtFolder"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:write"
      },
      "delete": {
        "tags": [
          "Media"
        ],
        "summary": "Yalnız boş klasör silinir",
        "operationId": "ExtDeleteFolder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        },
        "x-viswoo-scope": "content:write"
      }
    },
    "/api/ext/v1/playlists": {
      "get": {
        "tags": [
          "Playlists"
        ],
        "operationId": "ExtListPlaylists",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtPageOfExtPlaylistSummary"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:read"
      },
      "post": {
        "tags": [
          "Playlists"
        ],
        "summary": "Playlist ve öğeleri tek istekte",
        "operationId": "ExtCreatePlaylist",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtPlaylistRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtPlaylist"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:write"
      }
    },
    "/api/ext/v1/playlists/{id}": {
      "get": {
        "tags": [
          "Playlists"
        ],
        "operationId": "ExtGetPlaylist",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtPlaylist"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:read"
      },
      "put": {
        "tags": [
          "Playlists"
        ],
        "summary": "Playlistin tamamını yazar; ekranlar hemen güncellenir",
        "operationId": "ExtUpdatePlaylist",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtPlaylistRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtPlaylist"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:write"
      },
      "delete": {
        "tags": [
          "Playlists"
        ],
        "summary": "Çöp kutusuna taşır; ekranlardan ve kurallardan çıkar",
        "operationId": "ExtDeletePlaylist",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        },
        "x-viswoo-scope": "content:write"
      }
    },
    "/api/ext/v1/schedule": {
      "get": {
        "tags": [
          "Schedule"
        ],
        "summary": "Kurallar, öncelik sırasıyla",
        "operationId": "ExtListScheduleRules",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExtScheduleRule"
                  }
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:read"
      },
      "put": {
        "tags": [
          "Schedule"
        ],
        "summary": "Bütün kuralları sırasıyla yazar (ilk kural en yüksek öncelik)",
        "operationId": "ExtReplaceScheduleRules",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExtScheduleRule"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:write"
      }
    },
    "/api/ext/v1/schedule/impact": {
      "post": {
        "tags": [
          "Schedule"
        ],
        "summary": "Kaydetmeden dener: bu kural listesinin önümüzdeki 7 güne etkisi ve boş kalan yayın saatleri",
        "operationId": "ExtScheduleImpact",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtScheduleImpact"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:read"
      }
    },
    "/api/ext/v1/alerts": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "Etkin ve son gönderilen duyurular",
        "operationId": "ExtListAlerts",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExtAlert"
                  }
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:read"
      },
      "post": {
        "tags": [
          "Alerts"
        ],
        "summary": "Seçilen ekranlarda hemen tam ekran duyuru",
        "operationId": "ExtCreateAlert",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtAlertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtAlert"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:write"
      }
    },
    "/api/ext/v1/alerts/{id}/end": {
      "post": {
        "tags": [
          "Alerts"
        ],
        "operationId": "ExtEndAlert",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtAlert"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "content:write"
      }
    },
    "/api/ext/v1/reports/plays": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Oynatma raporu (from, to: yyyy-MM-dd; isteğe bağlı screenId)",
        "operationId": "ExtGetPlayReport",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "screenId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtPlayReport"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "reports:read"
      }
    },
    "/api/ext/v1/reports/plays.csv": {
      "get": {
        "tags": [
          "Reports"
        ],
        "operationId": "ExtGetPlayReportCsv",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "screenId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "x-viswoo-scope": "reports:read"
      }
    },
    "/api/ext/v1/reports/uptime": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Çalışma süresi raporu",
        "operationId": "ExtGetUptimeReport",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "screenId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtUptimeReport"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "reports:read"
      }
    },
    "/api/ext/v1/reports/uptime.csv": {
      "get": {
        "tags": [
          "Reports"
        ],
        "operationId": "ExtGetUptimeReportCsv",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "screenId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "x-viswoo-scope": "reports:read"
      }
    },
    "/api/ext/v1/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Webhook adresleri",
        "operationId": "ExtListWebhooks",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookResponse"
                  }
                }
              }
            }
          }
        },
        "x-viswoo-scope": "webhooks:manage"
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Yeni adres (en çok 5); imza sırrı yalnız bu cevapta döner",
        "operationId": "ExtCreateWebhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSecretResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "webhooks:manage"
      }
    },
    "/api/ext/v1/webhooks/{id}": {
      "put": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Adres, olaylar ve açık/kapalı; durdurulan adres açılınca sayaç sıfırlanır",
        "operationId": "ExtUpdateWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "webhooks:manage"
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "ExtDeleteWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        },
        "x-viswoo-scope": "webhooks:manage"
      }
    },
    "/api/ext/v1/webhooks/{id}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Yeni imza sırrı; eskisi hemen geçersiz",
        "operationId": "ExtRotateWebhookSecret",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSecretResponse"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "webhooks:manage"
      }
    },
    "/api/ext/v1/webhooks/{id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "webhook.test olayını kuyruğa alır",
        "operationId": "ExtTestWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryResponse"
                }
              }
            }
          }
        },
        "x-viswoo-scope": "webhooks:manage"
      }
    },
    "/api/ext/v1/webhooks/{id}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Son 7 günün teslimleri",
        "operationId": "ExtListWebhookDeliveries",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookDeliveryResponse"
                  }
                }
              }
            }
          }
        },
        "x-viswoo-scope": "webhooks:manage"
      }
    }
  },
  "components": {
    "schemas": {
      "AlertTarget": {
        "enum": [
          "all",
          "locations",
          "tags",
          "screens"
        ]
      },
      "AlertTone": {
        "enum": [
          "danger",
          "info"
        ]
      },
      "DeviceCommandStatus": {
        "enum": [
          "pending",
          "delivered",
          "succeeded",
          "failed",
          "unsupported",
          "expired"
        ]
      },
      "DevicePlatform": {
        "enum": [
          "android",
          "web",
          "webos",
          "tizen",
          "windows"
        ]
      },
      "ExtAlert": {
        "required": [
          "id",
          "title",
          "message",
          "tone",
          "target",
          "targetIds",
          "tags",
          "startsAt",
          "endsAt",
          "endedAt",
          "active"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "tone": {
            "$ref": "#/components/schemas/AlertTone"
          },
          "target": {
            "$ref": "#/components/schemas/AlertTarget"
          },
          "targetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "endsAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "endedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "ExtAlertRequest": {
        "required": [
          "title",
          "message",
          "tone",
          "target"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "tone": {
            "$ref": "#/components/schemas/AlertTone"
          },
          "target": {
            "$ref": "#/components/schemas/AlertTarget"
          },
          "targetIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "tags": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "endsAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ExtApiKey": {
        "required": [
          "id",
          "name",
          "scopes",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ExtCommand": {
        "required": [
          "id",
          "screenId",
          "type",
          "status",
          "createdAt",
          "expiresAt",
          "finishedAt",
          "message"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "screenId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DeviceCommandStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ExtCommandRequest": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "volume": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          }
        }
      },
      "ExtDevice": {
        "required": [
          "platform",
          "manufacturer",
          "model",
          "osVersion",
          "playerVersion",
          "online",
          "lastSeenAt",
          "displayWidth",
          "displayHeight",
          "nowPlaying",
          "availableCommands"
        ],
        "type": "object",
        "properties": {
          "platform": {
            "$ref": "#/components/schemas/DevicePlatform"
          },
          "manufacturer": {
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "type": [
              "null",
              "string"
            ]
          },
          "osVersion": {
            "type": [
              "null",
              "string"
            ]
          },
          "playerVersion": {
            "type": "string"
          },
          "online": {
            "type": "boolean"
          },
          "lastSeenAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "displayWidth": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "displayHeight": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "nowPlaying": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ExtNowPlaying"
              }
            ]
          },
          "availableCommands": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ExtFolder": {
        "required": [
          "id",
          "name",
          "mediaCount"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "mediaCount": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ExtFolderRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "ExtLocation": {
        "required": [
          "id",
          "name",
          "address",
          "city",
          "timeZone",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "address": {
            "type": [
              "null",
              "string"
            ]
          },
          "city": {
            "type": [
              "null",
              "string"
            ]
          },
          "timeZone": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ExtMe": {
        "required": [
          "tenant",
          "key"
        ],
        "type": "object",
        "properties": {
          "tenant": {
            "$ref": "#/components/schemas/ExtRef"
          },
          "key": {
            "$ref": "#/components/schemas/ExtApiKey"
          }
        }
      },
      "ExtMedia": {
        "required": [
          "id",
          "name",
          "type",
          "status",
          "folderId",
          "contentType",
          "sizeBytes",
          "width",
          "height",
          "durationMs",
          "url",
          "thumbnailUrl",
          "failureCode",
          "source",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/MediaType"
          },
          "status": {
            "$ref": "#/components/schemas/MediaStatus"
          },
          "folderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "width": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "height": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "durationMs": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          },
          "thumbnailUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "failureCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/MediaSource"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ExtMediaUpdate": {
        "required": [
          "name",
          "folderId"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "folderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ExtNowPlaying": {
        "required": [
          "mediaId",
          "name"
        ],
        "type": "object",
        "properties": {
          "mediaId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ExtOpenHours": {
        "required": [
          "days",
          "open",
          "close"
        ],
        "type": "object",
        "properties": {
          "days": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "open": {
            "type": "string"
          },
          "close": {
            "type": "string"
          }
        }
      },
      "ExtPageOfExtFolder": {
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtFolder"
            }
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ExtPageOfExtLocation": {
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtLocation"
            }
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ExtPageOfExtMedia": {
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtMedia"
            }
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ExtPageOfExtPlaylistSummary": {
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtPlaylistSummary"
            }
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ExtPageOfExtScreen": {
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtScreen"
            }
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ExtPlayContent": {
        "required": [
          "kind",
          "contentId",
          "name",
          "plays",
          "seconds",
          "screens"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/PlayContentKind"
          },
          "contentId": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "plays": {
            "type": "integer",
            "format": "int32"
          },
          "seconds": {
            "type": "integer",
            "format": "int64"
          },
          "screens": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ExtPlaylist": {
        "required": [
          "id",
          "name",
          "shuffle",
          "items",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "shuffle": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtPlaylistItem"
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ExtPlaylistItem": {
        "required": [
          "id",
          "kind",
          "durationSeconds",
          "validFrom",
          "validTo",
          "mediaId",
          "designId",
          "widget",
          "pluginCode"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/PlaylistItemKind"
          },
          "durationSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "validFrom": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "validTo": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "mediaId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "designId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "widget": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WidgetConfig"
              }
            ]
          },
          "pluginCode": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ExtPlaylistItemRequest": {
        "required": [
          "durationSeconds"
        ],
        "type": "object",
        "properties": {
          "durationSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "mediaId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "designId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "widget": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WidgetConfig"
              }
            ]
          },
          "pluginCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "validFrom": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "validTo": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ExtPlaylistRequest": {
        "required": [
          "name",
          "shuffle",
          "items"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "shuffle": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtPlaylistItemRequest"
            }
          }
        }
      },
      "ExtPlaylistSummary": {
        "required": [
          "id",
          "name",
          "shuffle",
          "itemCount",
          "totalSeconds",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "shuffle": {
            "type": "boolean"
          },
          "itemCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ExtPlayReport": {
        "required": [
          "from",
          "to",
          "plays",
          "seconds",
          "contents",
          "screens"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "plays": {
            "type": "integer",
            "format": "int32"
          },
          "seconds": {
            "type": "integer",
            "format": "int64"
          },
          "contents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtPlayContent"
            }
          },
          "screens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtPlayScreen"
            }
          }
        }
      },
      "ExtPlayScreen": {
        "required": [
          "screenId",
          "name",
          "plays",
          "seconds"
        ],
        "type": "object",
        "properties": {
          "screenId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "plays": {
            "type": "integer",
            "format": "int32"
          },
          "seconds": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ExtRef": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ExtScheduleGap": {
        "required": [
          "screenId",
          "screen",
          "day",
          "at",
          "hours",
          "isNew"
        ],
        "type": "object",
        "properties": {
          "screenId": {
            "type": "string",
            "format": "uuid"
          },
          "screen": {
            "type": "string"
          },
          "day": {
            "type": "integer",
            "format": "int32"
          },
          "at": {
            "type": "string"
          },
          "hours": {
            "type": "number",
            "format": "double"
          },
          "isNew": {
            "type": "boolean"
          }
        }
      },
      "ExtScheduleImpact": {
        "required": [
          "affectedScreens",
          "changedHours",
          "gaps"
        ],
        "type": "object",
        "properties": {
          "affectedScreens": {
            "type": "integer",
            "format": "int32"
          },
          "changedHours": {
            "type": "number",
            "format": "double"
          },
          "gaps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtScheduleGap"
            }
          }
        }
      },
      "ExtScheduleRequest": {
        "required": [
          "rules"
        ],
        "type": "object",
        "properties": {
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtScheduleRuleRequest"
            }
          }
        }
      },
      "ExtScheduleRule": {
        "required": [
          "id",
          "name",
          "playlist",
          "days",
          "start",
          "end",
          "validFrom",
          "validTo",
          "target",
          "screenIds",
          "tag",
          "priority"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "playlist": {
            "$ref": "#/components/schemas/ExtRef"
          },
          "days": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "start": {
            "type": [
              "null",
              "string"
            ]
          },
          "end": {
            "type": [
              "null",
              "string"
            ]
          },
          "validFrom": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "validTo": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "target": {
            "$ref": "#/components/schemas/ScheduleTarget"
          },
          "screenIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "tag": {
            "type": [
              "null",
              "string"
            ]
          },
          "priority": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ExtScheduleRuleRequest": {
        "required": [
          "name",
          "playlistId",
          "days"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "playlistId": {
            "type": "string",
            "format": "uuid"
          },
          "days": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "start": {
            "type": [
              "null",
              "string"
            ]
          },
          "end": {
            "type": [
              "null",
              "string"
            ]
          },
          "validFrom": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "validTo": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "target": {
            "$ref": "#/components/schemas/ScheduleTarget"
          },
          "screenIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "tag": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ExtScreen": {
        "required": [
          "id",
          "name",
          "location",
          "defaultPlaylist",
          "orientation",
          "rotation",
          "fit",
          "muted",
          "kiosk",
          "tags",
          "openHours",
          "device",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "location": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ExtRef"
              }
            ]
          },
          "defaultPlaylist": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ExtRef"
              }
            ]
          },
          "orientation": {
            "$ref": "#/components/schemas/ScreenOrientation"
          },
          "rotation": {
            "type": "integer",
            "format": "int32"
          },
          "fit": {
            "$ref": "#/components/schemas/ScreenFit"
          },
          "muted": {
            "type": "boolean"
          },
          "kiosk": {
            "type": "boolean"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "openHours": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ExtOpenHours"
            }
          },
          "device": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ExtDevice"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ExtScreenSettings": {
        "required": [
          "name",
          "locationId",
          "defaultPlaylistId",
          "orientation",
          "rotation",
          "fit",
          "muted",
          "kiosk",
          "tags",
          "openHours"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "locationId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "defaultPlaylistId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "orientation": {
            "$ref": "#/components/schemas/ScreenOrientation"
          },
          "rotation": {
            "type": "integer",
            "format": "int32"
          },
          "fit": {
            "$ref": "#/components/schemas/ScreenFit"
          },
          "muted": {
            "type": "boolean"
          },
          "kiosk": {
            "type": "boolean"
          },
          "tags": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "openHours": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ExtOpenHours"
            }
          }
        }
      },
      "ExtScreenshot": {
        "required": [
          "url",
          "takenAt"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "takenAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ExtUpload": {
        "required": [
          "media",
          "uploadUrl",
          "headers",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "media": {
            "$ref": "#/components/schemas/ExtMedia"
          },
          "uploadUrl": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ExtUploadRequest": {
        "required": [
          "fileName",
          "contentType",
          "sizeBytes",
          "folderId"
        ],
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "folderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ExtUptimeDay": {
        "required": [
          "date",
          "onlineSeconds",
          "openSeconds"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "onlineSeconds": {
            "type": "integer",
            "format": "int64"
          },
          "openSeconds": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ExtUptimeReport": {
        "required": [
          "from",
          "to",
          "onlineSeconds",
          "openSeconds",
          "screens"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "onlineSeconds": {
            "type": "integer",
            "format": "int64"
          },
          "openSeconds": {
            "type": "integer",
            "format": "int64"
          },
          "screens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtUptimeScreen"
            }
          }
        }
      },
      "ExtUptimeScreen": {
        "required": [
          "screenId",
          "name",
          "onlineSeconds",
          "openSeconds",
          "days"
        ],
        "type": "object",
        "properties": {
          "screenId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "onlineSeconds": {
            "type": "integer",
            "format": "int64"
          },
          "openSeconds": {
            "type": "integer",
            "format": "int64"
          },
          "days": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtUptimeDay"
            }
          }
        }
      },
      "HttpValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "MediaSource": {
        "enum": [
          "upload",
          "ai"
        ]
      },
      "MediaStatus": {
        "enum": [
          "uploading",
          "processing",
          "ready",
          "failed"
        ]
      },
      "MediaType": {
        "enum": [
          "image",
          "video"
        ]
      },
      "PlayContentKind": {
        "enum": [
          "media",
          "template",
          "widget"
        ]
      },
      "PlaylistItemKind": {
        "enum": [
          "media",
          "design",
          "widget",
          "plugin"
        ]
      },
      "ScheduleTarget": {
        "enum": [
          "all",
          "screens",
          "tag"
        ]
      },
      "ScreenFit": {
        "enum": [
          "contain",
          "cover",
          "fill",
          "auto"
        ]
      },
      "ScreenOrientation": {
        "enum": [
          "landscape",
          "portrait"
        ]
      },
      "WebhookDeliveryResponse": {
        "required": [
          "id",
          "event",
          "status",
          "attempts",
          "lastStatusCode",
          "lastError",
          "createdAt",
          "deliveredAt",
          "nextAttemptAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "event": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/WebhookDeliveryStatus"
          },
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "lastStatusCode": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "lastError": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "deliveredAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "nextAttemptAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "WebhookDeliveryStatus": {
        "enum": [
          "pending",
          "succeeded",
          "failed"
        ]
      },
      "WebhookRequest": {
        "required": [
          "url",
          "description",
          "events"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "enabled": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "WebhookResponse": {
        "required": [
          "id",
          "url",
          "description",
          "events",
          "enabled",
          "disabledAt",
          "consecutiveFailures",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "disabledAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "consecutiveFailures": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WebhookSecretResponse": {
        "required": [
          "webhook",
          "secret"
        ],
        "type": "object",
        "properties": {
          "webhook": {
            "$ref": "#/components/schemas/WebhookResponse"
          },
          "secret": {
            "type": "string"
          }
        }
      },
      "WidgetConfig": {
        "required": [
          "kind"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/WidgetKind"
          },
          "placeId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "WidgetKind": {
        "enum": [
          "clock",
          "weather",
          "rates"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "Locations"
    },
    {
      "name": "Screens"
    },
    {
      "name": "Media"
    },
    {
      "name": "Playlists"
    },
    {
      "name": "Schedule"
    },
    {
      "name": "Alerts"
    },
    {
      "name": "Reports"
    },
    {
      "name": "Webhooks"
    }
  ]
}
