diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e4f3fe2..04f8670f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- [#219](https://github.com/os2display/display-api-service/pull/219) + - Fixed psalm, test, coding standards and updated api spec. + ## [2.1.3] - 2024-10-25 - [#220](https://github.com/os2display/display-api-service/pull/220) diff --git a/composer.json b/composer.json index a9fdf8cd..f2425bda 100644 --- a/composer.json +++ b/composer.json @@ -128,9 +128,9 @@ ], "prepare-code": [ "bin/console doctrine:schema:validate", + "@coding-standards-apply", "vendor/bin/rector", "vendor/bin/psalm", - "@coding-standards-apply", "@test-setup", "@test" ], diff --git a/psalm-baseline.xml b/psalm-baseline.xml index d09ac5d0..3a079edf 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -177,48 +177,10 @@ - - regions]]> - screens]]> - - - - - - - - - - - - - - - - - - - - - - playlistScreenRegions]]> - - - - - - - - - - - - - @@ -226,83 +188,21 @@ - - - slides]]> - - - - - - - - - - - - - - - - - userRoleTenants]]> - - - - - - - - - - - - - - - feeds]]> - - - - - - - - - - - - - playlistScreenRegions]]> playlistSlides]]> - schedules]]> - screenCampaigns]]> - screenGroupCampaigns]]> - - - - ]]> ]]> - - - - - - - ]]> @@ -310,19 +210,6 @@ - - - - - - - - - - - - - @@ -340,29 +227,9 @@ - - playlistScreenRegions]]> - screenCampaigns]]> - - - - - - - - - - - - - - - - - @@ -373,20 +240,6 @@ - - - screenGroupCampaigns]]> - - - - - - - - - - - @@ -394,42 +247,14 @@ - - playlistSlides]]> - - - - - - - - - - - - - - slides]]> - - - - - - - - - - - - getTenant()]]> @@ -437,27 +262,12 @@ - - userRoleTenants]]> - - - - - - - userRoleTenants->first()->getTenant()]]> - - - - - - @@ -490,9 +300,6 @@ - - - @@ -555,22 +362,12 @@ - - toOutput($result)]]> - - - - - - - - @@ -663,14 +460,6 @@ getId()]]> - - - - - - - - getId()]]> @@ -678,38 +467,6 @@ iriConverter->getIriFromResource($layout)]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - getId()]]> @@ -722,20 +479,6 @@ getModifiedAt()]]> - - - - - - - - - - - - - - getId()]]> diff --git a/public/api-spec-v2.json b/public/api-spec-v2.json index c7425dcd..f35f1980 100644 --- a/public/api-spec-v2.json +++ b/public/api-spec-v2.json @@ -56,8 +56,7 @@ } } ] - }, - "parameters": [] + } }, "/v2/authentication/oidc/urls": { "get": { @@ -90,8 +89,7 @@ } } ] - }, - "parameters": [] + } }, "/v2/authentication/screen": { "post": { @@ -123,66 +121,7 @@ }, "required": false } - }, - "parameters": [] - }, - "/v2/authentication/token": { - "post": { - "operationId": "login_check_post", - "tags": [ - "Login Check" - ], - "responses": { - "200": { - "description": "User token created", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "token": { - "readOnly": true, - "type": "string", - "nullable": false - } - }, - "required": [ - "token" - ] - } - } - } - } - }, - "summary": "Creates a user token.", - "description": "Creates a user token.", - "requestBody": { - "description": "The login data", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "nullable": false - }, - "password": { - "type": "string", - "nullable": false - } - }, - "required": [ - "providerId", - "password" - ] - } - } - }, - "required": true - } - }, - "parameters": [] + } }, "/v2/authentication/token/refresh": { "post": { @@ -214,600 +153,247 @@ }, "required": false } - }, - "parameters": [] + } }, - "/v2/campaigns/{id}/screen-groups": { + "/v2/feed-sources": { "get": { - "operationId": "get-v2-campaign-id-screen-group", + "operationId": "get-v2-feed-sources", "tags": [ - "Playlists" + "FeedSources" ], "responses": { "200": { - "description": "ScreenGroupCampaign collection", + "description": "OK", "content": { "application/ld+json": { - "schema": { - "type": "object", - "properties": { - "hydra:member": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScreenGroupCampaign.jsonld-campaigns.screen-groups.read" - } - }, - "hydra:totalItems": { - "type": "integer", - "minimum": 0 - }, - "hydra:view": { - "type": "object", - "properties": { - "@id": { - "type": "string", - "format": "iri-reference" - }, - "@type": { - "type": "string" - }, - "hydra:first": { - "type": "string", - "format": "iri-reference" - }, - "hydra:last": { - "type": "string", - "format": "iri-reference" - }, - "hydra:previous": { - "type": "string", - "format": "iri-reference" - }, - "hydra:next": { - "type": "string", - "format": "iri-reference" - } - }, - "example": { - "@id": "string", - "type": "string", - "hydra:first": "string", - "hydra:last": "string", - "hydra:previous": "string", - "hydra:next": "string" - } - }, - "hydra:search": { - "type": "object", - "properties": { - "@type": { - "type": "string" - }, - "hydra:template": { - "type": "string" - }, - "hydra:variableRepresentation": { - "type": "string" - }, - "hydra:mapping": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string" - }, - "variable": { - "type": "string" - }, - "property": { - "type": [ - "string", - "null" - ] - }, - "required": { - "type": "boolean" - } - } - } - } - } - } - }, - "required": [ - "hydra:member" - ] - } - }, - "text/html": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScreenGroupCampaign-campaigns.screen-groups.read" - } - } - }, - "multipart/form-data": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScreenGroupCampaign-campaigns.screen-groups.read" - } - } + "examples": null } - } + }, + "headers": [] } }, - "summary": "Get Screen group resources on campaign.", - "description": "Get Screen group resources on campaign.", + "summary": "Retrieves a collection of FeedSource resources.", + "description": "Retrieves a collection of FeedSource resources.", "parameters": [ { - "name": "id", - "in": "path", + "name": "page", + "in": "query", "description": "", - "required": true, + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "integer", + "minimum": 0, + "format": "int32", + "default": 1 + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "itemsPerPage", + "in": "query", + "description": "The number of items per page", + "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$" + "default": "10" }, - "style": "simple", + "style": "form", "explode": false, "allowReserved": false }, { - "name": "page", + "name": "supportedFeedOutputType", + "in": "query", + "description": "", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string" + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "title", "in": "query", "description": "", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "integer", - "minimum": 0, - "format": "int32", - "default": 1 + "type": "string" }, "style": "form", "explode": false, "allowReserved": false }, { - "name": "itemsPerPage", + "name": "description", "in": "query", - "description": "The number of items per page", + "description": "", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "string", - "default": "10" + "type": "string" }, "style": "form", "explode": false, "allowReserved": false - } - ], - "deprecated": false - }, - "parameters": [] - }, - "/v2/campaigns/{id}/screens": { - "get": { - "operationId": "get-v2-campaign-id-screen", - "tags": [ - "Playlists" - ], - "responses": { - "200": { - "description": "ScreenCampaign collection", - "content": { - "application/ld+json": { - "schema": { - "type": "object", - "properties": { - "hydra:member": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScreenCampaign.jsonld-campaigns.screens.read" - } - }, - "hydra:totalItems": { - "type": "integer", - "minimum": 0 - }, - "hydra:view": { - "type": "object", - "properties": { - "@id": { - "type": "string", - "format": "iri-reference" - }, - "@type": { - "type": "string" - }, - "hydra:first": { - "type": "string", - "format": "iri-reference" - }, - "hydra:last": { - "type": "string", - "format": "iri-reference" - }, - "hydra:previous": { - "type": "string", - "format": "iri-reference" - }, - "hydra:next": { - "type": "string", - "format": "iri-reference" - } - }, - "example": { - "@id": "string", - "type": "string", - "hydra:first": "string", - "hydra:last": "string", - "hydra:previous": "string", - "hydra:next": "string" - } - }, - "hydra:search": { - "type": "object", - "properties": { - "@type": { - "type": "string" - }, - "hydra:template": { - "type": "string" - }, - "hydra:variableRepresentation": { - "type": "string" - }, - "hydra:mapping": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string" - }, - "variable": { - "type": "string" - }, - "property": { - "type": [ - "string", - "null" - ] - }, - "required": { - "type": "boolean" - } - } - } - } - } - } - }, - "required": [ - "hydra:member" - ] - } - }, - "text/html": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScreenCampaign-campaigns.screens.read" - } - } - }, - "multipart/form-data": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScreenCampaign-campaigns.screens.read" - } - } - } - } - } - }, - "summary": "Get screens connected to a campaign.", - "description": "Get screens connected to a campaign.", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$" - }, - "style": "simple", - "explode": false, - "allowReserved": false }, { - "name": "page", + "name": "createdBy", "in": "query", "description": "", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "integer", - "minimum": 0, - "format": "int32", - "default": 1 + "type": "string" }, "style": "form", "explode": false, "allowReserved": false }, { - "name": "itemsPerPage", + "name": "createdBy[]", "in": "query", - "description": "The number of items per page", + "description": "", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "string", - "default": "10" + "type": "array", + "items": { + "type": "string" + } }, "style": "form", - "explode": false, + "explode": true, "allowReserved": false - } - ], - "deprecated": false - }, - "parameters": [] - }, - "/v2/feed-sources": { - "get": { - "operationId": "get-v2-feed-sources", - "tags": [ - "FeedSources" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/ld+json": { - "examples": null - } - }, - "headers": [] - } - }, - "summary": "Retrieves a collection of FeedSource resources.", - "description": "Retrieves a collection of FeedSource resources.", - "parameters": [ + }, { - "name": "page", + "name": "modifiedBy", "in": "query", "description": "", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "integer", - "minimum": 0, - "format": "int32", - "default": 1 + "type": "string" }, "style": "form", "explode": false, "allowReserved": false }, { - "name": "itemsPerPage", + "name": "modifiedBy[]", "in": "query", - "description": "The number of items per page", + "description": "", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "string", - "default": "10" + "type": "array", + "items": { + "type": "string" + } }, "style": "form", - "explode": false, + "explode": true, "allowReserved": false }, { - "name": "supportedFeedOutputType", + "name": "order[title]", "in": "query", "description": "", - "required": true, + "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "string" + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ] }, "style": "form", "explode": false, "allowReserved": false }, { - "name": "title", + "name": "order[description]", "in": "query", "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { - "type": "string" + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ] }, "style": "form", "explode": false, "allowReserved": false }, { - "name": "description", + "name": "order[createdAt]", "in": "query", "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { - "type": "string" + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ] }, "style": "form", "explode": false, "allowReserved": false }, { - "name": "createdBy", + "name": "order[modifiedAt]", "in": "query", "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { - "type": "string" + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ] }, "style": "form", "explode": false, "allowReserved": false }, { - "name": "createdBy[]", + "name": "supportedFeedOutputType[]", "in": "query", "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "style": "form", - "explode": true, - "allowReserved": false - }, - { - "name": "modifiedBy", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "string" - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "modifiedBy[]", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "style": "form", - "explode": true, - "allowReserved": false - }, - { - "name": "order[title]", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "order[description]", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "order[createdAt]", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "order[modifiedAt]", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "supportedFeedOutputType[]", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -820,8 +406,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/feed-sources/{id}": { "get": { @@ -861,8 +446,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/feed_sources/{id}/config/{name}": { "get": { @@ -926,8 +510,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/feeds": { "get": { @@ -987,7 +570,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -1001,7 +584,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -1018,7 +601,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -1032,7 +615,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -1049,9 +632,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -1067,9 +651,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -1081,8 +666,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/feeds/{id}": { "get": { @@ -1122,8 +706,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/feeds/{id}/data": { "get": { @@ -1180,8 +763,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/layouts": { "get": { @@ -1239,8 +821,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/layouts/{id}": { "get": { @@ -1280,8 +861,64 @@ } ], "deprecated": false - }, - "parameters": [] + } + }, + "/v2/authentication/token": { + "post": { + "operationId": "login_check_post", + "tags": [ + "Login Check" + ], + "responses": { + "200": { + "description": "User token created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "readOnly": true, + "type": "string", + "nullable": false + } + }, + "required": [ + "token" + ] + } + } + } + } + }, + "summary": "Creates a user token.", + "description": "Creates a user token.", + "requestBody": { + "description": "The login data", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "nullable": false + }, + "password": { + "type": "string", + "nullable": false + } + }, + "required": [ + "providerId", + "password" + ] + } + } + }, + "required": true + } + } }, "/v2/media": { "get": { @@ -1341,7 +978,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -1355,7 +992,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -1369,7 +1006,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -1383,7 +1020,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -1400,7 +1037,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -1414,7 +1051,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -1431,9 +1068,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -1449,9 +1087,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -1467,9 +1106,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -1485,9 +1125,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -1570,8 +1211,7 @@ "required": false }, "deprecated": false - }, - "parameters": [] + } }, "/v2/media/{id}": { "get": { @@ -1646,56 +1286,409 @@ } ], "deprecated": false - }, - "parameters": [] + } }, - "/v2/playlists": { + "/v2/campaigns/{id}/screen-groups": { "get": { - "operationId": "get-v2-playlists", + "operationId": "get-v2-campaign-id-screen-group", "tags": [ "Playlists" ], "responses": { "200": { - "description": "OK", + "description": "ScreenGroupCampaign collection", "content": { "application/ld+json": { - "examples": null - } - }, - "headers": [] - } - }, - "summary": "Retrieve a collection of Playlist resources.", - "description": "Retrieves a collection of Playlist resources.", - "parameters": [ - { - "name": "page", - "in": "query", - "description": "", - "required": true, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "integer", - "minimum": 0, - "format": "int32", - "default": 1 - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "itemsPerPage", - "in": "query", - "description": "The number of items per page", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "integer", - "default": 10, + "schema": { + "type": "object", + "properties": { + "hydra:member": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScreenGroupCampaign.jsonld-campaigns.screen-groups.read" + } + }, + "hydra:totalItems": { + "type": "integer", + "minimum": 0 + }, + "hydra:view": { + "type": "object", + "properties": { + "@id": { + "type": "string", + "format": "iri-reference" + }, + "@type": { + "type": "string" + }, + "hydra:first": { + "type": "string", + "format": "iri-reference" + }, + "hydra:last": { + "type": "string", + "format": "iri-reference" + }, + "hydra:previous": { + "type": "string", + "format": "iri-reference" + }, + "hydra:next": { + "type": "string", + "format": "iri-reference" + } + }, + "example": { + "@id": "string", + "type": "string", + "hydra:first": "string", + "hydra:last": "string", + "hydra:previous": "string", + "hydra:next": "string" + } + }, + "hydra:search": { + "type": "object", + "properties": { + "@type": { + "type": "string" + }, + "hydra:template": { + "type": "string" + }, + "hydra:variableRepresentation": { + "type": "string" + }, + "hydra:mapping": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string" + }, + "variable": { + "type": "string" + }, + "property": { + "type": [ + "string", + "null" + ] + }, + "required": { + "type": "boolean" + } + } + } + } + } + } + }, + "required": [ + "hydra:member" + ] + } + }, + "text/html": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScreenGroupCampaign-campaigns.screen-groups.read" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScreenGroupCampaign-campaigns.screen-groups.read" + } + } + } + } + } + }, + "summary": "Get Screen group resources on campaign.", + "description": "Get Screen group resources on campaign.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$" + }, + "style": "simple", + "explode": false, + "allowReserved": false + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "integer", + "minimum": 0, + "format": "int32", + "default": 1 + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "itemsPerPage", + "in": "query", + "description": "The number of items per page", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "default": "10" + }, + "style": "form", + "explode": false, + "allowReserved": false + } + ], + "deprecated": false + } + }, + "/v2/campaigns/{id}/screens": { + "get": { + "operationId": "get-v2-campaign-id-screen", + "tags": [ + "Playlists" + ], + "responses": { + "200": { + "description": "ScreenCampaign collection", + "content": { + "application/ld+json": { + "schema": { + "type": "object", + "properties": { + "hydra:member": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScreenCampaign.jsonld-campaigns.screens.read" + } + }, + "hydra:totalItems": { + "type": "integer", + "minimum": 0 + }, + "hydra:view": { + "type": "object", + "properties": { + "@id": { + "type": "string", + "format": "iri-reference" + }, + "@type": { + "type": "string" + }, + "hydra:first": { + "type": "string", + "format": "iri-reference" + }, + "hydra:last": { + "type": "string", + "format": "iri-reference" + }, + "hydra:previous": { + "type": "string", + "format": "iri-reference" + }, + "hydra:next": { + "type": "string", + "format": "iri-reference" + } + }, + "example": { + "@id": "string", + "type": "string", + "hydra:first": "string", + "hydra:last": "string", + "hydra:previous": "string", + "hydra:next": "string" + } + }, + "hydra:search": { + "type": "object", + "properties": { + "@type": { + "type": "string" + }, + "hydra:template": { + "type": "string" + }, + "hydra:variableRepresentation": { + "type": "string" + }, + "hydra:mapping": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string" + }, + "variable": { + "type": "string" + }, + "property": { + "type": [ + "string", + "null" + ] + }, + "required": { + "type": "boolean" + } + } + } + } + } + } + }, + "required": [ + "hydra:member" + ] + } + }, + "text/html": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScreenCampaign-campaigns.screens.read" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScreenCampaign-campaigns.screens.read" + } + } + } + } + } + }, + "summary": "Get screens connected to a campaign.", + "description": "Get screens connected to a campaign.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$" + }, + "style": "simple", + "explode": false, + "allowReserved": false + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "integer", + "minimum": 0, + "format": "int32", + "default": 1 + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "itemsPerPage", + "in": "query", + "description": "The number of items per page", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "default": "10" + }, + "style": "form", + "explode": false, + "allowReserved": false + } + ], + "deprecated": false + } + }, + "/v2/playlists": { + "get": { + "operationId": "get-v2-playlists", + "tags": [ + "Playlists" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/ld+json": { + "examples": null + } + }, + "headers": [] + } + }, + "summary": "Retrieve a collection of Playlist resources.", + "description": "Retrieves a collection of Playlist resources.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "integer", + "minimum": 0, + "format": "int32", + "default": 1 + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "itemsPerPage", + "in": "query", + "description": "The number of items per page", + "required": false, + "deprecated": false, + "allowEmptyValue": true, + "schema": { + "type": "integer", + "default": 10, "minimum": 0, "maximum": 30 }, @@ -1709,7 +1702,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -1723,7 +1716,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -1737,7 +1730,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -1751,7 +1744,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -1768,7 +1761,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -1782,7 +1775,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -1799,7 +1792,7 @@ "description": "If true only published content will be shown", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "boolean" }, @@ -1813,7 +1806,7 @@ "description": "If true only campaigns will be shown", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "boolean" }, @@ -1827,9 +1820,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -1845,9 +1839,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -1863,9 +1858,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -1881,9 +1877,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -1899,7 +1896,7 @@ "description": "If true only entities that are shared with me will be shown", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "boolean" }, @@ -1969,8 +1966,7 @@ "required": true }, "deprecated": false - }, - "parameters": [] + } }, "/v2/playlists/{id}": { "get": { @@ -2087,25 +2083,224 @@ } } }, - "required": true + "required": true + }, + "deprecated": false + }, + "delete": { + "operationId": "delete-v2-playlist-id", + "tags": [ + "Playlists" + ], + "responses": { + "204": { + "description": "Playlist resource deleted" + }, + "404": { + "description": "Resource not found" + } + }, + "summary": "Delete a Playlist resource.", + "description": "Delete a Playlist resource.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$" + }, + "style": "simple", + "explode": false, + "allowReserved": false + } + ], + "deprecated": false + } + }, + "/v2/playlists/{id}/slides": { + "get": { + "operationId": "get-v2-playlist-slide-id", + "tags": [ + "Playlists" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/ld+json": { + "examples": null + } + }, + "headers": [] + } + }, + "summary": "Retrieves collection of weighted slide resources.", + "description": "Retrieves collection of weighted slide resources.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$" + }, + "style": "simple", + "explode": false, + "allowReserved": false + }, + { + "name": "page", + "in": "query", + "description": "", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "integer", + "minimum": 0, + "format": "int32", + "default": 1 + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "itemsPerPage", + "in": "query", + "description": "The number of items per page", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "default": "10" + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "published", + "in": "query", + "description": "If true only published content will be shown", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "boolean" + }, + "style": "form", + "explode": false, + "allowReserved": false + } + ], + "deprecated": false + }, + "put": { + "operationId": "put-v2-playlist-slide-id", + "tags": [ + "Playlists" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/ld+json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slide": { + "type": "string" + }, + "playlist": { + "type": "string" + }, + "weight": { + "type": "integer" + } + } + } + } + } + } + } + }, + "summary": "Update the collection of slide on a playlist.", + "description": "Update the collection of slide on a playlist.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "PlaylistSlide identifier", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string" + }, + "style": "simple", + "explode": false, + "allowReserved": false + } + ], + "requestBody": { + "description": "", + "content": { + "application/ld+json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slide": { + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$", + "description": "Slide ULID" + }, + "weight": { + "type": "integer" + } + } + } + } + } + }, + "required": false }, "deprecated": false - }, + } + }, + "/v2/playlists/{id}/slides/{slideId}": { "delete": { - "operationId": "delete-v2-playlist-id", + "operationId": "delete-v2-playlist-slide-id", "tags": [ "Playlists" ], "responses": { "204": { - "description": "Playlist resource deleted" + "description": "PlaylistSlide resource deleted" }, "404": { "description": "Resource not found" } }, - "summary": "Delete a Playlist resource.", - "description": "Delete a Playlist resource.", + "summary": "Delete a slide from a playlist.", + "description": "Delete a slide from a playlist.", "parameters": [ { "name": "id", @@ -2122,15 +2317,30 @@ "style": "simple", "explode": false, "allowReserved": false + }, + { + "name": "slideId", + "in": "path", + "description": "", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$" + }, + "style": "simple", + "explode": false, + "allowReserved": false } ], "deprecated": false - }, - "parameters": [] + } }, - "/v2/playlists/{id}/slides": { + "/v2/slides/{id}/playlists": { "get": { - "operationId": "get-v2-playlist-slide-id", + "operationId": "put-v2-slide-playlist-id", "tags": [ "Playlists" ], @@ -2145,8 +2355,8 @@ "headers": [] } }, - "summary": "Retrieves collection of weighted slide resources.", - "description": "Retrieves collection of weighted slide resources.", + "summary": "Get the collection of playlist connected to a slide.", + "description": "Get the collection of playlist connected to a slide.", "parameters": [ { "name": "id", @@ -2168,7 +2378,7 @@ "name": "page", "in": "query", "description": "", - "required": true, + "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { @@ -2202,7 +2412,7 @@ "description": "If true only published content will be shown", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "boolean" }, @@ -2214,48 +2424,56 @@ "deprecated": false }, "put": { - "operationId": "put-v2-playlist-slide-id", + "operationId": "get-v2-slide-playlist-id", "tags": [ "Playlists" ], "responses": { - "201": { - "description": "Created", + "200": { + "description": "PlaylistSlide resource updated", "content": { "application/ld+json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "slide": { - "type": "string" - }, - "playlist": { - "type": "string" - }, - "weight": { - "type": "integer" - } - } - } + "$ref": "#/components/schemas/PlaylistSlide.PlaylistSlide.jsonld" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/PlaylistSlide.PlaylistSlide" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/PlaylistSlide.PlaylistSlide" } } - } + }, + "links": {} + }, + "400": { + "description": "Invalid input" + }, + "422": { + "description": "Unprocessable entity" + }, + "404": { + "description": "Resource not found" } }, - "summary": "Update the collection of slide on a playlist.", - "description": "Update the collection of slide on a playlist.", + "summary": "Retrieves collection of playlistresources.", + "description": "Retrieves collection of playlist resources.", "parameters": [ { "name": "id", "in": "path", - "description": "PlaylistSlide identifier", + "description": "", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "string" + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$" }, "style": "simple", "explode": false, @@ -2271,14 +2489,11 @@ "items": { "type": "object", "properties": { - "slide": { + "playlist": { "type": "string", "format": "ulid", "pattern": "^[A-Za-z0-9]{26}$", - "description": "Slide ULID" - }, - "weight": { - "type": "integer" + "description": "Playlist ULID" } } } @@ -2288,53 +2503,51 @@ "required": false }, "deprecated": false - }, - "parameters": [] + } }, - "/v2/playlists/{id}/slides/{slideId}": { - "delete": { - "operationId": "delete-v2-playlist-slide-id", + "/v2/screen-groups-campaigns/{id}": { + "get": { + "operationId": "getScreenGroupCampaignItem", "tags": [ - "Playlists" + "ScreenGroupCampaign" ], "responses": { - "204": { - "description": "PlaylistSlide resource deleted" + "200": { + "description": "ScreenGroupCampaign resource", + "content": { + "application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ScreenGroupCampaign.jsonld" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ScreenGroupCampaign" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/ScreenGroupCampaign" + } + } + } }, "404": { "description": "Resource not found" } }, - "summary": "Delete a slide from a playlist.", - "description": "Delete a slide from a playlist.", + "summary": "Retrieves a ScreenGroupCampaign resource.", + "description": "Retrieves a ScreenGroupCampaign resource.", "parameters": [ { "name": "id", "in": "path", - "description": "", - "required": true, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$" - }, - "style": "simple", - "explode": false, - "allowReserved": false - }, - { - "name": "slideId", - "in": "path", - "description": "", + "description": "ScreenGroupCampaign identifier", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$" + "type": "string" }, "style": "simple", "explode": false, @@ -2342,8 +2555,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/screen-groups": { "get": { @@ -2403,7 +2615,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -2417,7 +2629,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -2431,7 +2643,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -2445,7 +2657,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -2462,7 +2674,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -2476,7 +2688,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -2493,9 +2705,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -2511,9 +2724,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -2529,9 +2743,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -2603,61 +2818,7 @@ "required": true }, "deprecated": false - }, - "parameters": [] - }, - "/v2/screen-groups-campaigns/{id}": { - "get": { - "operationId": "getScreenGroupCampaignItem", - "tags": [ - "ScreenGroupCampaign" - ], - "responses": { - "200": { - "description": "ScreenGroupCampaign resource", - "content": { - "application/ld+json": { - "schema": { - "$ref": "#/components/schemas/ScreenGroupCampaign.jsonld" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ScreenGroupCampaign" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/ScreenGroupCampaign" - } - } - } - }, - "404": { - "description": "Resource not found" - } - }, - "summary": "Retrieves a ScreenGroupCampaign resource.", - "description": "Retrieves a ScreenGroupCampaign resource.", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ScreenGroupCampaign identifier", - "required": true, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "string" - }, - "style": "simple", - "explode": false, - "allowReserved": false - } - ], - "deprecated": false - }, - "parameters": [] + } }, "/v2/screen-groups/{id}": { "get": { @@ -2812,8 +2973,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/screen-groups/{id}/campaigns": { "get": { @@ -2889,7 +3049,7 @@ "description": "If true only published content will be shown", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "boolean" }, @@ -2969,8 +3129,7 @@ "required": false }, "deprecated": false - }, - "parameters": [] + } }, "/v2/screen-groups/{id}/campaigns/{campaignId}": { "delete": { @@ -3023,8 +3182,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/screen-groups/{id}/screens": { "get": { @@ -3201,8 +3359,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/screens": { "get": { @@ -3262,7 +3419,7 @@ "description": "Search on both location and title", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -3276,7 +3433,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -3290,7 +3447,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -3307,7 +3464,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -3321,7 +3478,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -3338,9 +3495,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -3356,9 +3514,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -3374,9 +3533,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -3392,9 +3552,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -3466,8 +3627,7 @@ "required": true }, "deprecated": false - }, - "parameters": [] + } }, "/v2/screens/{id}": { "get": { @@ -3622,8 +3782,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/screens/{id}/bind": { "post": { @@ -3664,8 +3823,7 @@ }, "required": false } - }, - "parameters": [] + } }, "/v2/screens/{id}/campaigns": { "get": { @@ -3741,7 +3899,7 @@ "description": "If true only published content will be shown", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "boolean" }, @@ -3821,8 +3979,7 @@ "required": false }, "deprecated": false - }, - "parameters": [] + } }, "/v2/screens/{id}/campaigns/{campaignId}": { "delete": { @@ -3875,8 +4032,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/screens/{id}/regions/{regionId}/playlists": { "get": { @@ -4073,7 +4229,7 @@ "description": "If true only entities that are shared with me will be shown", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "boolean" }, @@ -4162,8 +4318,7 @@ "required": false }, "deprecated": false - }, - "parameters": [] + } }, "/v2/screens/{id}/regions/{regionId}/playlists/{playlistId}": { "delete": { @@ -4232,8 +4387,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/screens/{id}/screen-groups": { "get": { @@ -4414,9 +4568,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -4432,9 +4587,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -4497,8 +4653,7 @@ "required": false }, "deprecated": false - }, - "parameters": [] + } }, "/v2/screens/{id}/screen-groups/{screenGroupId}": { "delete": { @@ -4551,8 +4706,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/screens/{id}/unbind": { "post": { @@ -4587,8 +4741,7 @@ "content": {}, "required": false } - }, - "parameters": [] + } }, "/v2/slides": { "get": { @@ -4648,7 +4801,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -4662,7 +4815,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -4676,7 +4829,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -4690,7 +4843,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -4707,7 +4860,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -4721,7 +4874,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -4738,7 +4891,7 @@ "description": "If true only published content will be shown", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "boolean" }, @@ -4752,9 +4905,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -4770,9 +4924,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -4788,9 +4943,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -4806,9 +4962,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -4880,8 +5037,7 @@ "required": true }, "deprecated": false - }, - "parameters": [] + } }, "/v2/slides/{id}": { "get": { @@ -5036,8 +5192,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/slides/{id}/action": { "post": { @@ -5116,176 +5271,7 @@ "required": true }, "deprecated": false - }, - "parameters": [] - }, - "/v2/slides/{id}/playlists": { - "get": { - "operationId": "put-v2-slide-playlist-id", - "tags": [ - "Playlists" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/ld+json": { - "examples": null - } - }, - "headers": [] - } - }, - "summary": "Get the collection of playlist connected to a slide.", - "description": "Get the collection of playlist connected to a slide.", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$" - }, - "style": "simple", - "explode": false, - "allowReserved": false - }, - { - "name": "page", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "integer", - "minimum": 0, - "format": "int32", - "default": 1 - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "itemsPerPage", - "in": "query", - "description": "The number of items per page", - "required": false, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "string", - "default": "10" - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "published", - "in": "query", - "description": "If true only published content will be shown", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "boolean" - }, - "style": "form", - "explode": false, - "allowReserved": false - } - ], - "deprecated": false - }, - "put": { - "operationId": "get-v2-slide-playlist-id", - "tags": [ - "Playlists" - ], - "responses": { - "200": { - "description": "PlaylistSlide resource updated", - "content": { - "application/ld+json": { - "schema": { - "$ref": "#/components/schemas/PlaylistSlide.PlaylistSlide.jsonld" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/PlaylistSlide.PlaylistSlide" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/PlaylistSlide.PlaylistSlide" - } - } - }, - "links": {} - }, - "400": { - "description": "Invalid input" - }, - "422": { - "description": "Unprocessable entity" - }, - "404": { - "description": "Resource not found" - } - }, - "summary": "Retrieves collection of playlistresources.", - "description": "Retrieves collection of playlist resources.", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$" - }, - "style": "simple", - "explode": false, - "allowReserved": false - } - ], - "requestBody": { - "description": "", - "content": { - "application/ld+json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "playlist": { - "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$", - "description": "Playlist ULID" - } - } - } - } - } - }, - "required": false - }, - "deprecated": false - }, - "parameters": [] + } }, "/v2/templates": { "get": { @@ -5345,7 +5331,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5359,7 +5345,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5373,7 +5359,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5387,7 +5373,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -5404,7 +5390,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5418,7 +5404,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -5435,9 +5421,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -5453,9 +5440,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -5467,8 +5455,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/templates/{id}": { "get": { @@ -5508,8 +5495,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/tenants": { "get": { @@ -5569,7 +5555,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5583,7 +5569,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5597,7 +5583,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5611,7 +5597,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -5628,7 +5614,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5642,7 +5628,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -5655,8 +5641,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/tenants/{id}": { "get": { @@ -5696,8 +5681,7 @@ } ], "deprecated": false - }, - "parameters": [] + } }, "/v2/themes": { "get": { @@ -5757,7 +5741,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5771,7 +5755,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5785,7 +5769,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5799,7 +5783,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -5816,7 +5800,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string" }, @@ -5830,7 +5814,7 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "array", "items": { @@ -5847,9 +5831,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -5865,9 +5850,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -5883,9 +5869,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -5901,9 +5888,10 @@ "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { "type": "string", + "default": "asc", "enum": [ "asc", "desc" @@ -5975,8 +5963,7 @@ "required": true }, "deprecated": false - }, - "parameters": [] + } }, "/v2/themes/{id}": { "get": { @@ -6131,161 +6118,164 @@ } ], "deprecated": false - }, - "parameters": [] + } }, - "/v2/user-activation-codes": { + "/v2/users": { "get": { - "operationId": "api_v2user-activation-codes_get_collection", + "operationId": "get-v2-users", "tags": [ - "UserActivationCode" + "User" ], "responses": { "200": { - "description": "UserActivationCode collection", + "description": "OK", "content": { "application/ld+json": { - "schema": { - "type": "object", - "properties": { - "hydra:member": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode.jsonld" - } - }, - "hydra:totalItems": { - "type": "integer", - "minimum": 0 - }, - "hydra:view": { - "type": "object", - "properties": { - "@id": { - "type": "string", - "format": "iri-reference" - }, - "@type": { - "type": "string" - }, - "hydra:first": { - "type": "string", - "format": "iri-reference" - }, - "hydra:last": { - "type": "string", - "format": "iri-reference" - }, - "hydra:previous": { - "type": "string", - "format": "iri-reference" - }, - "hydra:next": { - "type": "string", - "format": "iri-reference" - } - }, - "example": { - "@id": "string", - "type": "string", - "hydra:first": "string", - "hydra:last": "string", - "hydra:previous": "string", - "hydra:next": "string" - } - }, - "hydra:search": { - "type": "object", - "properties": { - "@type": { - "type": "string" - }, - "hydra:template": { - "type": "string" - }, - "hydra:variableRepresentation": { - "type": "string" - }, - "hydra:mapping": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string" - }, - "variable": { - "type": "string" - }, - "property": { - "type": [ - "string", - "null" - ] - }, - "required": { - "type": "boolean" - } - } - } - } - } - } - }, - "required": [ - "hydra:member" - ] - } - }, - "text/html": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" - } - } - }, - "multipart/form-data": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" - } - } + "examples": null } - } + }, + "headers": [] } }, - "summary": "Retrieves the collection of UserActivationCode resources.", - "description": "Retrieves the collection of UserActivationCode resources.", + "summary": "Retrieve a collection of User resources.", + "description": "Retrieve a collection of User resources.", "parameters": [ { - "name": "page", + "name": "page", + "in": "query", + "description": "", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "integer", + "minimum": 0, + "format": "int32", + "default": 1 + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "itemsPerPage", + "in": "query", + "description": "The number of items per page", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "default": "10" + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "fullName", + "in": "query", + "description": "", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string" + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "email", + "in": "query", + "description": "", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string" + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "createdBy", + "in": "query", + "description": "", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string" + }, + "style": "form", + "explode": false, + "allowReserved": false + }, + { + "name": "createdBy[]", + "in": "query", + "description": "", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form", + "explode": true, + "allowReserved": false + }, + { + "name": "modifiedBy", "in": "query", - "description": "The collection page number", + "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { - "type": "integer", - "default": 1 + "type": "string" }, "style": "form", "explode": false, "allowReserved": false }, { - "name": "itemsPerPage", + "name": "modifiedBy[]", "in": "query", - "description": "The number of items per page", + "description": "", "required": false, "deprecated": false, - "allowEmptyValue": true, + "allowEmptyValue": false, "schema": { - "type": "integer", - "default": 10, - "minimum": 0, - "maximum": 30 + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form", + "explode": true, + "allowReserved": false + }, + { + "name": "order[createdAt]", + "in": "query", + "description": "", + "required": false, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ] }, "style": "form", "explode": false, @@ -6295,27 +6285,27 @@ "deprecated": false }, "post": { - "operationId": "post-v2-create-user-activation-code", + "operationId": "post-v2-user", "tags": [ - "UserActivationCode" + "User" ], "responses": { "201": { - "description": "UserActivationCode resource created", + "description": "User resource created", "content": { "application/ld+json": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode.jsonld" + "$ref": "#/components/schemas/User.User.jsonld" } }, "text/html": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" + "$ref": "#/components/schemas/User.User" } }, "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" + "$ref": "#/components/schemas/User.User" } } }, @@ -6328,120 +6318,111 @@ "description": "Unprocessable entity" } }, - "summary": "Create user activation code.", - "description": "Create user activation code", - "parameters": [], + "summary": "Create a User resource.", + "description": "Create a User resource.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$" + }, + "style": "simple", + "explode": false, + "allowReserved": false + } + ], "requestBody": { - "description": "The new UserActivationCode resource", + "description": "The new User resource", "content": { "application/ld+json": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCodeInput.jsonld" + "$ref": "#/components/schemas/User.UserInput.jsonld" } }, "text/html": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCodeInput" + "$ref": "#/components/schemas/User.UserInput" } }, "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCodeInput" + "$ref": "#/components/schemas/User.UserInput" } } }, "required": true }, "deprecated": false - }, - "parameters": [] + } }, - "/v2/user-activation-codes/activate": { - "post": { - "operationId": "post-v2-activate-user-activation-code", + "/v2/users/{id}": { + "get": { + "operationId": "get-v2-user-id", "tags": [ - "UserActivationCode" + "User" ], "responses": { - "201": { - "description": "UserActivationCode resource created", + "200": { + "description": "OK", "content": { "application/ld+json": { - "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode.jsonld" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" - } + "examples": null } }, - "links": {} - }, - "400": { - "description": "Invalid input" - }, - "422": { - "description": "Unprocessable entity" + "headers": [] } }, - "summary": "Use user activation code.", - "description": "Use user activation code.", - "parameters": [], - "requestBody": { - "description": "The new UserActivationCode resource", - "content": { - "application/ld+json": { - "schema": { - "$ref": "#/components/schemas/UserActivationCode.ActivationCode.jsonld" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/UserActivationCode.ActivationCode" - } + "summary": "Retrieve User resource.", + "description": "Retrieves User resource.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$" }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/UserActivationCode.ActivationCode" - } - } - }, - "required": true - }, + "style": "simple", + "explode": false, + "allowReserved": false + } + ], "deprecated": false }, - "parameters": [] - }, - "/v2/user-activation-codes/refresh": { - "post": { - "operationId": "post-v2-refresh-user-activation-code", + "put": { + "operationId": "put-v2-user-id", "tags": [ - "UserActivationCode" + "User" ], "responses": { - "201": { - "description": "UserActivationCode resource created", + "200": { + "description": "User resource updated", "content": { "application/ld+json": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode.jsonld" + "$ref": "#/components/schemas/User.User.jsonld" } }, "text/html": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" + "$ref": "#/components/schemas/User.User" } }, "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" + "$ref": "#/components/schemas/User.User" } } }, @@ -6452,27 +6433,47 @@ }, "422": { "description": "Unprocessable entity" + }, + "404": { + "description": "Resource not found" } }, - "summary": "Refresh user activation code.", - "description": "Refresh user activation code.", - "parameters": [], + "summary": "Update User resource.", + "description": "Update User resource.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "required": true, + "deprecated": false, + "allowEmptyValue": false, + "schema": { + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$" + }, + "style": "simple", + "explode": false, + "allowReserved": false + } + ], "requestBody": { - "description": "The new UserActivationCode resource", + "description": "The updated User resource", "content": { "application/ld+json": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.ActivationCode.jsonld" + "$ref": "#/components/schemas/User.UserInput.jsonld" } }, "text/html": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.ActivationCode" + "$ref": "#/components/schemas/User.UserInput" } }, "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/UserActivationCode.ActivationCode" + "$ref": "#/components/schemas/User.UserInput" } } }, @@ -6480,51 +6481,33 @@ }, "deprecated": false }, - "parameters": [] - }, - "/v2/user-activation-codes/{id}": { - "get": { - "operationId": "api_v2user-activation-codes_id_get", + "delete": { + "operationId": "delete-v2-user-id", "tags": [ - "UserActivationCode" + "User" ], "responses": { - "200": { - "description": "UserActivationCode resource", - "content": { - "application/ld+json": { - "schema": { - "$ref": "#/components/schemas/UserActivationCode.jsonld" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/UserActivationCode" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/UserActivationCode" - } - } - } + "204": { + "description": "User resource deleted" }, "404": { "description": "Resource not found" } }, - "summary": "Retrieves a UserActivationCode resource.", - "description": "Retrieves a UserActivationCode resource.", + "summary": "Delete an User resource.", + "description": "Delete an User resource.", "parameters": [ { "name": "id", "in": "path", - "description": "UserActivationCode identifier", + "description": "", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "string" + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$" }, "style": "simple", "explode": false, @@ -6532,32 +6515,33 @@ } ], "deprecated": false - }, + } + }, + "/v2/users/{id}/remove-from-tenant": { "delete": { - "operationId": "api_v2user-activation-codes_id_delete", + "operationId": "post-v2-remove-user-from-tenant", "tags": [ - "UserActivationCode" + "User" ], "responses": { "204": { - "description": "UserActivationCode resource deleted" - }, - "404": { - "description": "Resource not found" + "description": "User removed from tenant" } }, - "summary": "Removes the UserActivationCode resource.", - "description": "Removes the UserActivationCode resource.", + "summary": "Remove a User resource from the current tenant.", + "description": "Remove a User resource from the current tenant.", "parameters": [ { "name": "id", "in": "path", - "description": "UserActivationCode identifier", + "description": "", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "string" + "type": "string", + "format": "ulid", + "pattern": "^[A-Za-z0-9]{26}$" }, "style": "simple", "explode": false, @@ -6565,164 +6549,160 @@ } ], "deprecated": false - }, - "parameters": [] + } }, - "/v2/users": { + "/v2/user-activation-codes": { "get": { - "operationId": "get-v2-users", + "operationId": "api_v2user-activation-codes_get_collection", "tags": [ - "User" + "UserActivationCode" ], "responses": { "200": { - "description": "OK", + "description": "UserActivationCode collection", "content": { "application/ld+json": { - "examples": null + "schema": { + "type": "object", + "properties": { + "hydra:member": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode.jsonld" + } + }, + "hydra:totalItems": { + "type": "integer", + "minimum": 0 + }, + "hydra:view": { + "type": "object", + "properties": { + "@id": { + "type": "string", + "format": "iri-reference" + }, + "@type": { + "type": "string" + }, + "hydra:first": { + "type": "string", + "format": "iri-reference" + }, + "hydra:last": { + "type": "string", + "format": "iri-reference" + }, + "hydra:previous": { + "type": "string", + "format": "iri-reference" + }, + "hydra:next": { + "type": "string", + "format": "iri-reference" + } + }, + "example": { + "@id": "string", + "type": "string", + "hydra:first": "string", + "hydra:last": "string", + "hydra:previous": "string", + "hydra:next": "string" + } + }, + "hydra:search": { + "type": "object", + "properties": { + "@type": { + "type": "string" + }, + "hydra:template": { + "type": "string" + }, + "hydra:variableRepresentation": { + "type": "string" + }, + "hydra:mapping": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string" + }, + "variable": { + "type": "string" + }, + "property": { + "type": [ + "string", + "null" + ] + }, + "required": { + "type": "boolean" + } + } + } + } + } + } + }, + "required": [ + "hydra:member" + ] + } + }, + "text/html": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" + } + } } - }, - "headers": [] + } } }, - "summary": "Retrieve a collection of User resources.", - "description": "Retrieve a collection of User resources.", + "summary": "Retrieves the collection of UserActivationCode resources.", + "description": "Retrieves the collection of UserActivationCode resources.", "parameters": [ { "name": "page", "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "integer", - "minimum": 0, - "format": "int32", - "default": 1 - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "itemsPerPage", - "in": "query", - "description": "The number of items per page", - "required": false, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "string", - "default": "10" - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "fullName", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "string" - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "email", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "string" - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "createdBy", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "string" - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "createdBy[]", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "style": "form", - "explode": true, - "allowReserved": false - }, - { - "name": "modifiedBy", - "in": "query", - "description": "", - "required": false, - "deprecated": false, - "allowEmptyValue": true, - "schema": { - "type": "string" - }, - "style": "form", - "explode": false, - "allowReserved": false - }, - { - "name": "modifiedBy[]", - "in": "query", - "description": "", + "description": "The collection page number", "required": false, "deprecated": false, "allowEmptyValue": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "default": 1 }, "style": "form", - "explode": true, + "explode": false, "allowReserved": false }, { - "name": "order[createdAt]", + "name": "itemsPerPage", "in": "query", - "description": "", + "description": "The number of items per page", "required": false, "deprecated": false, "allowEmptyValue": true, "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ] + "type": "integer", + "default": 10, + "minimum": 0, + "maximum": 30 }, "style": "form", "explode": false, @@ -6732,27 +6712,27 @@ "deprecated": false }, "post": { - "operationId": "post-v2-user", + "operationId": "post-v2-create-user-activation-code", "tags": [ - "User" + "UserActivationCode" ], "responses": { "201": { - "description": "User resource created", + "description": "UserActivationCode resource created", "content": { "application/ld+json": { "schema": { - "$ref": "#/components/schemas/User.User.jsonld" + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode.jsonld" } }, "text/html": { "schema": { - "$ref": "#/components/schemas/User.User" + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" } }, "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/User.User" + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" } } }, @@ -6765,112 +6745,118 @@ "description": "Unprocessable entity" } }, - "summary": "Create a User resource.", - "description": "Create a User resource.", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$" - }, - "style": "simple", - "explode": false, - "allowReserved": false - } - ], + "summary": "Create user activation code.", + "description": "Create user activation code", + "parameters": [], "requestBody": { - "description": "The new User resource", + "description": "The new UserActivationCode resource", "content": { "application/ld+json": { "schema": { - "$ref": "#/components/schemas/User.UserInput.jsonld" + "$ref": "#/components/schemas/UserActivationCode.UserActivationCodeInput.jsonld" } }, "text/html": { "schema": { - "$ref": "#/components/schemas/User.UserInput" + "$ref": "#/components/schemas/UserActivationCode.UserActivationCodeInput" } }, "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/User.UserInput" + "$ref": "#/components/schemas/UserActivationCode.UserActivationCodeInput" } } }, "required": true }, "deprecated": false - }, - "parameters": [] + } }, - "/v2/users/{id}": { - "get": { - "operationId": "get-v2-user-id", + "/v2/user-activation-codes/activate": { + "post": { + "operationId": "post-v2-activate-user-activation-code", "tags": [ - "User" + "UserActivationCode" ], "responses": { - "200": { - "description": "OK", + "201": { + "description": "UserActivationCode resource created", "content": { "application/ld+json": { - "examples": null + "schema": { + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode.jsonld" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" + } } }, - "headers": [] + "links": {} + }, + "400": { + "description": "Invalid input" + }, + "422": { + "description": "Unprocessable entity" } }, - "summary": "Retrieve User resource.", - "description": "Retrieves User resource.", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$" + "summary": "Use user activation code.", + "description": "Use user activation code.", + "parameters": [], + "requestBody": { + "description": "The new UserActivationCode resource", + "content": { + "application/ld+json": { + "schema": { + "$ref": "#/components/schemas/UserActivationCode.ActivationCode.jsonld" + } }, - "style": "simple", - "explode": false, - "allowReserved": false - } - ], + "text/html": { + "schema": { + "$ref": "#/components/schemas/UserActivationCode.ActivationCode" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/UserActivationCode.ActivationCode" + } + } + }, + "required": true + }, "deprecated": false - }, - "put": { - "operationId": "put-v2-user-id", + } + }, + "/v2/user-activation-codes/refresh": { + "post": { + "operationId": "post-v2-refresh-user-activation-code", "tags": [ - "User" + "UserActivationCode" ], "responses": { - "200": { - "description": "User resource updated", + "201": { + "description": "UserActivationCode resource created", "content": { "application/ld+json": { "schema": { - "$ref": "#/components/schemas/User.User.jsonld" + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode.jsonld" } }, "text/html": { "schema": { - "$ref": "#/components/schemas/User.User" + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" } }, "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/User.User" + "$ref": "#/components/schemas/UserActivationCode.UserActivationCode" } } }, @@ -6881,81 +6867,78 @@ }, "422": { "description": "Unprocessable entity" - }, - "404": { - "description": "Resource not found" } }, - "summary": "Update User resource.", - "description": "Update User resource.", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "deprecated": false, - "allowEmptyValue": false, - "schema": { - "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$" - }, - "style": "simple", - "explode": false, - "allowReserved": false - } - ], + "summary": "Refresh user activation code.", + "description": "Refresh user activation code.", + "parameters": [], "requestBody": { - "description": "The updated User resource", + "description": "The new UserActivationCode resource", "content": { "application/ld+json": { "schema": { - "$ref": "#/components/schemas/User.UserInput.jsonld" + "$ref": "#/components/schemas/UserActivationCode.ActivationCode.jsonld" } }, "text/html": { "schema": { - "$ref": "#/components/schemas/User.UserInput" + "$ref": "#/components/schemas/UserActivationCode.ActivationCode" } }, "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/User.UserInput" + "$ref": "#/components/schemas/UserActivationCode.ActivationCode" } } }, "required": true }, "deprecated": false - }, - "delete": { - "operationId": "delete-v2-user-id", + } + }, + "/v2/user-activation-codes/{id}": { + "get": { + "operationId": "api_v2user-activation-codes_id_get", "tags": [ - "User" + "UserActivationCode" ], "responses": { - "204": { - "description": "User resource deleted" + "200": { + "description": "UserActivationCode resource", + "content": { + "application/ld+json": { + "schema": { + "$ref": "#/components/schemas/UserActivationCode.jsonld" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/UserActivationCode" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/UserActivationCode" + } + } + } }, "404": { "description": "Resource not found" } }, - "summary": "Delete an User resource.", - "description": "Delete an User resource.", + "summary": "Retrieves a UserActivationCode resource.", + "description": "Retrieves a UserActivationCode resource.", "parameters": [ { "name": "id", "in": "path", - "description": "", + "description": "UserActivationCode identifier", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$" + "type": "string" }, "style": "simple", "explode": false, @@ -6964,33 +6947,31 @@ ], "deprecated": false }, - "parameters": [] - }, - "/v2/users/{id}/remove-from-tenant": { "delete": { - "operationId": "post-v2-remove-user-from-tenant", + "operationId": "api_v2user-activation-codes_id_delete", "tags": [ - "User" + "UserActivationCode" ], "responses": { "204": { - "description": "User removed from tenant" + "description": "UserActivationCode resource deleted" + }, + "404": { + "description": "Resource not found" } }, - "summary": "Remove a User resource from the current tenant.", - "description": "Remove a User resource from the current tenant.", + "summary": "Removes the UserActivationCode resource.", + "description": "Removes the UserActivationCode resource.", "parameters": [ { "name": "id", "in": "path", - "description": "", + "description": "UserActivationCode identifier", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { - "type": "string", - "format": "ulid", - "pattern": "^[A-Za-z0-9]{26}$" + "type": "string" }, "style": "simple", "explode": false, @@ -6998,8 +6979,7 @@ } ], "deprecated": false - }, - "parameters": [] + } } }, "components": { @@ -15568,5 +15548,6 @@ "tenantHeader": [] } ], - "tags": [] + "tags": [], + "webhooks": {} } \ No newline at end of file diff --git a/public/api-spec-v2.yaml b/public/api-spec-v2.yaml index 65b52cea..88df1d6a 100644 --- a/public/api-spec-v2.yaml +++ b/public/api-spec-v2.yaml @@ -16,7 +16,7 @@ paths: tags: - Authentication responses: - 200: + '200': description: 'Get JWT token from OIDC code' content: application/json: @@ -40,14 +40,13 @@ paths: example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c schema: type: string - parameters: [] /v2/authentication/oidc/urls: get: operationId: getOidcAuthUrlsItem tags: - Authentication responses: - 200: + '200': description: 'Get authentication and end session endpoints' content: application/json: @@ -63,14 +62,13 @@ paths: example: foobar_oidc schema: type: string - parameters: [] /v2/authentication/screen: post: operationId: postLoginInfoScreen tags: - Authentication responses: - 200: + '200': description: 'Login with bindKey to get JWT token for screen' content: application/json: @@ -84,50 +82,13 @@ paths: schema: $ref: '#/components/schemas/ScreenLoginInput' required: false - parameters: [] - /v2/authentication/token: - post: - operationId: login_check_post - tags: - - 'Login Check' - responses: - 200: - description: 'User token created' - content: - application/json: - schema: - type: object - properties: - token: { readOnly: true, type: string, nullable: false } - required: - - token - summary: 'Creates a user token.' - description: 'Creates a user token.' - requestBody: - description: 'The login data' - content: - application/json: - schema: - type: object - properties: - providerId: - type: string - nullable: false - password: - type: string - nullable: false - required: - - providerId - - password - required: true - parameters: [] /v2/authentication/token/refresh: post: operationId: postRefreshTokenItem tags: - Authentication responses: - 200: + '200': description: 'Refresh JWT token' content: application/json: @@ -141,166 +102,13 @@ paths: schema: $ref: '#/components/schemas/RefreshTokenRequest' required: false - parameters: [] - '/v2/campaigns/{id}/screen-groups': - get: - operationId: get-v2-campaign-id-screen-group - tags: - - Playlists - responses: - 200: - description: 'ScreenGroupCampaign collection' - content: - application/ld+json: - schema: - type: object - properties: - 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ScreenGroupCampaign.jsonld-campaigns.screen-groups.read' } } - 'hydra:totalItems': { type: integer, minimum: 0 } - 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } - 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [string, 'null'] }, required: { type: boolean } } } } } } - required: - - 'hydra:member' - text/html: - schema: - type: array - items: - $ref: '#/components/schemas/ScreenGroupCampaign-campaigns.screen-groups.read' - multipart/form-data: - schema: - type: array - items: - $ref: '#/components/schemas/ScreenGroupCampaign-campaigns.screen-groups.read' - summary: 'Get Screen group resources on campaign.' - description: 'Get Screen group resources on campaign.' - parameters: - - - name: id - in: path - description: '' - required: true - deprecated: false - allowEmptyValue: false - schema: - type: string - format: ulid - pattern: '^[A-Za-z0-9]{26}$' - style: simple - explode: false - allowReserved: false - - - name: page - in: query - description: '' - required: false - deprecated: false - allowEmptyValue: false - schema: - type: integer - minimum: 0 - format: int32 - default: 1 - style: form - explode: false - allowReserved: false - - - name: itemsPerPage - in: query - description: 'The number of items per page' - required: false - deprecated: false - allowEmptyValue: false - schema: - type: string - default: '10' - style: form - explode: false - allowReserved: false - deprecated: false - parameters: [] - '/v2/campaigns/{id}/screens': - get: - operationId: get-v2-campaign-id-screen - tags: - - Playlists - responses: - 200: - description: 'ScreenCampaign collection' - content: - application/ld+json: - schema: - type: object - properties: - 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ScreenCampaign.jsonld-campaigns.screens.read' } } - 'hydra:totalItems': { type: integer, minimum: 0 } - 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } - 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [string, 'null'] }, required: { type: boolean } } } } } } - required: - - 'hydra:member' - text/html: - schema: - type: array - items: - $ref: '#/components/schemas/ScreenCampaign-campaigns.screens.read' - multipart/form-data: - schema: - type: array - items: - $ref: '#/components/schemas/ScreenCampaign-campaigns.screens.read' - summary: 'Get screens connected to a campaign.' - description: 'Get screens connected to a campaign.' - parameters: - - - name: id - in: path - description: '' - required: true - deprecated: false - allowEmptyValue: false - schema: - type: string - format: ulid - pattern: '^[A-Za-z0-9]{26}$' - style: simple - explode: false - allowReserved: false - - - name: page - in: query - description: '' - required: false - deprecated: false - allowEmptyValue: false - schema: - type: integer - minimum: 0 - format: int32 - default: 1 - style: form - explode: false - allowReserved: false - - - name: itemsPerPage - in: query - description: 'The number of items per page' - required: false - deprecated: false - allowEmptyValue: false - schema: - type: string - default: '10' - style: form - explode: false - allowReserved: false - deprecated: false - parameters: [] /v2/feed-sources: get: operationId: get-v2-feed-sources tags: - FeedSources responses: - 200: + '200': description: OK content: application/ld+json: @@ -355,7 +163,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -367,7 +175,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -379,7 +187,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -391,7 +199,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -405,7 +213,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -417,7 +225,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -431,9 +239,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -446,9 +255,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -461,9 +271,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -476,9 +287,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -491,7 +303,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -500,14 +312,13 @@ paths: explode: true allowReserved: false deprecated: false - parameters: [] '/v2/feed-sources/{id}': get: operationId: get-feed-source-id tags: - FeedSources responses: - 200: + '200': description: OK content: application/ld+json: @@ -531,14 +342,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/feed_sources/{id}/config/{name}': get: operationId: get-v2-feed-source-id-config-name tags: - FeedSources responses: - 200: + '200': content: application/ld+json: examples: @@ -576,14 +386,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] /v2/feeds: get: operationId: get-v2-feeds tags: - Feeds responses: - 200: + '200': description: OK content: application/ld+json: @@ -626,7 +435,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -638,7 +447,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -652,7 +461,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -664,7 +473,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -678,9 +487,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -693,9 +503,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -703,14 +514,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/feeds/{id}': get: operationId: get-feeds-id tags: - Feeds responses: - 200: + '200': description: OK content: application/ld+json: @@ -734,14 +544,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/feeds/{id}/data': get: operationId: get-v2-feed-id-data tags: - Feeds responses: - 200: + '200': content: application/json: examples: @@ -768,14 +577,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] /v2/layouts: get: operationId: get-v2-layouts tags: - Layouts responses: - 200: + '200': description: OK content: application/ld+json: @@ -815,14 +623,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/layouts/{id}': get: operationId: get-v2-layouts-id tags: - Layouts responses: - 200: + '200': description: OK content: application/ld+json: @@ -846,14 +653,48 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] + /v2/authentication/token: + post: + operationId: login_check_post + tags: + - 'Login Check' + responses: + '200': + description: 'User token created' + content: + application/json: + schema: + type: object + properties: + token: { readOnly: true, type: string, nullable: false } + required: + - token + summary: 'Creates a user token.' + description: 'Creates a user token.' + requestBody: + description: 'The login data' + content: + application/json: + schema: + type: object + properties: + providerId: + type: string + nullable: false + password: + type: string + nullable: false + required: + - providerId + - password + required: true /v2/media: get: operationId: get-v2-medias tags: - Media responses: - 200: + '200': description: OK content: application/ld+json: @@ -896,7 +737,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -908,7 +749,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -920,7 +761,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -932,7 +773,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -946,7 +787,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -958,7 +799,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -972,9 +813,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -987,9 +829,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -1002,9 +845,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -1017,9 +861,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -1032,7 +877,7 @@ paths: tags: - Media responses: - 201: + '201': description: 'Media resource created' content: application/ld+json: @@ -1045,9 +890,9 @@ paths: schema: $ref: '#/components/schemas/Media.Media' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' summary: 'Creates a Media resource.' description: 'Creates a Media resource.' @@ -1075,14 +920,13 @@ paths: format: binary required: false deprecated: false - parameters: [] '/v2/media/{id}': get: operationId: getv2MediaById tags: - Media responses: - 200: + '200': description: OK content: application/ld+json: @@ -1111,9 +955,9 @@ paths: tags: - Media responses: - 204: + '204': description: 'Media resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Delete a Media resource.' description: 'Delete a Media resource.' @@ -1133,14 +977,163 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] + '/v2/campaigns/{id}/screen-groups': + get: + operationId: get-v2-campaign-id-screen-group + tags: + - Playlists + responses: + '200': + description: 'ScreenGroupCampaign collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ScreenGroupCampaign.jsonld-campaigns.screen-groups.read' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [string, 'null'] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ScreenGroupCampaign-campaigns.screen-groups.read' + multipart/form-data: + schema: + type: array + items: + $ref: '#/components/schemas/ScreenGroupCampaign-campaigns.screen-groups.read' + summary: 'Get Screen group resources on campaign.' + description: 'Get Screen group resources on campaign.' + parameters: + - + name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + format: ulid + pattern: '^[A-Za-z0-9]{26}$' + style: simple + explode: false + allowReserved: false + - + name: page + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: integer + minimum: 0 + format: int32 + default: 1 + style: form + explode: false + allowReserved: false + - + name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + default: '10' + style: form + explode: false + allowReserved: false + deprecated: false + '/v2/campaigns/{id}/screens': + get: + operationId: get-v2-campaign-id-screen + tags: + - Playlists + responses: + '200': + description: 'ScreenCampaign collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/ScreenCampaign.jsonld-campaigns.screens.read' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [string, 'null'] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/ScreenCampaign-campaigns.screens.read' + multipart/form-data: + schema: + type: array + items: + $ref: '#/components/schemas/ScreenCampaign-campaigns.screens.read' + summary: 'Get screens connected to a campaign.' + description: 'Get screens connected to a campaign.' + parameters: + - + name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + format: ulid + pattern: '^[A-Za-z0-9]{26}$' + style: simple + explode: false + allowReserved: false + - + name: page + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: integer + minimum: 0 + format: int32 + default: 1 + style: form + explode: false + allowReserved: false + - + name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + default: '10' + style: form + explode: false + allowReserved: false + deprecated: false /v2/playlists: get: operationId: get-v2-playlists tags: - Playlists responses: - 200: + '200': description: OK content: application/ld+json: @@ -1185,7 +1178,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -1197,7 +1190,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -1209,7 +1202,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -1221,7 +1214,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -1235,7 +1228,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -1247,7 +1240,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -1261,7 +1254,7 @@ paths: description: 'If true only published content will be shown' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: boolean style: form @@ -1273,7 +1266,7 @@ paths: description: 'If true only campaigns will be shown' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: boolean style: form @@ -1285,9 +1278,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -1300,9 +1294,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -1315,9 +1310,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -1330,9 +1326,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -1345,7 +1342,7 @@ paths: description: 'If true only entities that are shared with me will be shown' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: boolean style: form @@ -1357,7 +1354,7 @@ paths: tags: - Playlists responses: - 201: + '201': description: 'Playlist resource created' content: application/ld+json: @@ -1370,9 +1367,9 @@ paths: schema: $ref: '#/components/schemas/Playlist.Playlist' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' summary: 'Creates a Playlist resource.' description: 'Creates a Playlist resource.' @@ -1391,14 +1388,13 @@ paths: $ref: '#/components/schemas/Playlist.PlaylistInput' required: true deprecated: false - parameters: [] '/v2/playlists/{id}': get: operationId: get-v2-playlist-id tags: - Playlists responses: - 200: + '200': description: OK content: application/ld+json: @@ -1427,7 +1423,7 @@ paths: tags: - Playlists responses: - 200: + '200': description: 'Playlist resource updated' content: application/ld+json: @@ -1440,11 +1436,11 @@ paths: schema: $ref: '#/components/schemas/Playlist.Playlist' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' - 404: + '404': description: 'Resource not found' summary: 'Update a Playlist resource.' description: 'Update a Playlist resource.' @@ -1482,9 +1478,9 @@ paths: tags: - Playlists responses: - 204: + '204': description: 'Playlist resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Delete a Playlist resource.' description: 'Delete a Playlist resource.' @@ -1504,14 +1500,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/playlists/{id}/slides': get: operationId: get-v2-playlist-slide-id tags: - Playlists responses: - 200: + '200': description: OK content: application/ld+json: @@ -1568,7 +1563,7 @@ paths: description: 'If true only published content will be shown' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: boolean style: form @@ -1580,7 +1575,7 @@ paths: tags: - Playlists responses: - 201: + '201': description: Created content: application/ld+json: @@ -1617,16 +1612,15 @@ paths: weight: { type: integer } required: false deprecated: false - parameters: [] '/v2/playlists/{id}/slides/{slideId}': delete: operationId: delete-v2-playlist-slide-id tags: - Playlists responses: - 204: + '204': description: 'PlaylistSlide resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Delete a slide from a playlist.' description: 'Delete a slide from a playlist.' @@ -1660,22 +1654,35 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] - /v2/screen-groups: + '/v2/slides/{id}/playlists': get: - operationId: get-v2-screen-groups + operationId: put-v2-slide-playlist-id tags: - - ScreenGroups + - Playlists responses: - 200: + '200': description: OK content: application/ld+json: examples: null headers: [] - summary: 'Retrieves a collection of Screen group resources.' - description: 'Retrieve a collection of Screen group resources.' + summary: 'Get the collection of playlist connected to a slide.' + description: 'Get the collection of playlist connected to a slide.' parameters: + - + name: id + in: path + description: '' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + format: ulid + pattern: '^[A-Za-z0-9]{26}$' + style: simple + explode: false + allowReserved: false - name: page in: query @@ -1705,28 +1712,173 @@ paths: explode: false allowReserved: false - - name: title + name: published in: query - description: '' + description: 'If true only published content will be shown' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: - type: string + type: boolean style: form explode: false allowReserved: false + deprecated: false + put: + operationId: get-v2-slide-playlist-id + tags: + - Playlists + responses: + '200': + description: 'PlaylistSlide resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/PlaylistSlide.PlaylistSlide.jsonld' + text/html: + schema: + $ref: '#/components/schemas/PlaylistSlide.PlaylistSlide' + multipart/form-data: + schema: + $ref: '#/components/schemas/PlaylistSlide.PlaylistSlide' + links: { } + '400': + description: 'Invalid input' + '422': + description: 'Unprocessable entity' + '404': + description: 'Resource not found' + summary: 'Retrieves collection of playlistresources.' + description: 'Retrieves collection of playlist resources.' + parameters: - - name: description - in: query + name: id + in: path description: '' - required: false + required: true deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string - style: form - explode: false + format: ulid + pattern: '^[A-Za-z0-9]{26}$' + style: simple + explode: false + allowReserved: false + requestBody: + description: '' + content: + application/ld+json: + schema: + type: array + items: + type: object + properties: + playlist: { type: string, format: ulid, pattern: '^[A-Za-z0-9]{26}$', description: 'Playlist ULID' } + required: false + deprecated: false + '/v2/screen-groups-campaigns/{id}': + get: + operationId: getScreenGroupCampaignItem + tags: + - ScreenGroupCampaign + responses: + '200': + description: 'ScreenGroupCampaign resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/ScreenGroupCampaign.jsonld' + text/html: + schema: + $ref: '#/components/schemas/ScreenGroupCampaign' + multipart/form-data: + schema: + $ref: '#/components/schemas/ScreenGroupCampaign' + '404': + description: 'Resource not found' + summary: 'Retrieves a ScreenGroupCampaign resource.' + description: 'Retrieves a ScreenGroupCampaign resource.' + parameters: + - + name: id + in: path + description: 'ScreenGroupCampaign identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + /v2/screen-groups: + get: + operationId: get-v2-screen-groups + tags: + - ScreenGroups + responses: + '200': + description: OK + content: + application/ld+json: + examples: null + headers: [] + summary: 'Retrieves a collection of Screen group resources.' + description: 'Retrieve a collection of Screen group resources.' + parameters: + - + name: page + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: integer + minimum: 0 + format: int32 + default: 1 + style: form + explode: false + allowReserved: false + - + name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + default: '10' + style: form + explode: false + allowReserved: false + - + name: title + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + - + name: description + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false allowReserved: false - name: createdBy @@ -1734,7 +1886,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -1746,7 +1898,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -1760,7 +1912,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -1772,7 +1924,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -1786,9 +1938,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -1801,9 +1954,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -1816,9 +1970,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -1831,7 +1986,7 @@ paths: tags: - ScreenGroups responses: - 201: + '201': description: 'ScreenGroup resource created' content: application/ld+json: @@ -1844,9 +1999,9 @@ paths: schema: $ref: '#/components/schemas/ScreenGroup.ScreenGroup' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' summary: 'Create Screen group resources.' description: 'Create Screen group resources.' @@ -1865,51 +2020,13 @@ paths: $ref: '#/components/schemas/ScreenGroup.ScreenGroupInput' required: true deprecated: false - parameters: [] - '/v2/screen-groups-campaigns/{id}': - get: - operationId: getScreenGroupCampaignItem - tags: - - ScreenGroupCampaign - responses: - 200: - description: 'ScreenGroupCampaign resource' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/ScreenGroupCampaign.jsonld' - text/html: - schema: - $ref: '#/components/schemas/ScreenGroupCampaign' - multipart/form-data: - schema: - $ref: '#/components/schemas/ScreenGroupCampaign' - 404: - description: 'Resource not found' - summary: 'Retrieves a ScreenGroupCampaign resource.' - description: 'Retrieves a ScreenGroupCampaign resource.' - parameters: - - - name: id - in: path - description: 'ScreenGroupCampaign identifier' - required: true - deprecated: false - allowEmptyValue: false - schema: - type: string - style: simple - explode: false - allowReserved: false - deprecated: false - parameters: [] '/v2/screen-groups/{id}': get: operationId: get-v2-screen-groups-id tags: - ScreenGroups responses: - 200: + '200': description: OK content: application/ld+json: @@ -1938,7 +2055,7 @@ paths: tags: - ScreenGroups responses: - 200: + '200': description: 'ScreenGroup resource updated' content: application/ld+json: @@ -1951,11 +2068,11 @@ paths: schema: $ref: '#/components/schemas/ScreenGroup.ScreenGroup' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' - 404: + '404': description: 'Resource not found' summary: 'Update a Screen group resource.' description: 'Update a Screen group resource.' @@ -1993,9 +2110,9 @@ paths: tags: - ScreenGroups responses: - 204: + '204': description: 'ScreenGroup resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Delete a Screen group resource.' description: 'Delete a Screen group resource.' @@ -2015,14 +2132,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/screen-groups/{id}/campaigns': get: operationId: get-v2-screen-groups-campaign-id tags: - ScreenGroups responses: - 200: + '200': description: OK content: application/ld+json: @@ -2079,7 +2195,7 @@ paths: description: 'If true only published content will be shown' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: boolean style: form @@ -2091,7 +2207,7 @@ paths: tags: - ScreenGroups responses: - 201: + '201': description: Created content: application/ld+json: @@ -2127,16 +2243,15 @@ paths: screenGroup: { type: string, format: ulid, pattern: '^[A-Za-z0-9]{26}$', description: 'Screen group ULID' } required: false deprecated: false - parameters: [] '/v2/screen-groups/{id}/campaigns/{campaignId}': delete: operationId: delete-v2-screen-groups-campaign-id tags: - ScreenGroups responses: - 204: + '204': description: 'ScreenGroupCampaign resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Delete a campaign from a screen group.' description: 'Delete a campaign from a screen group.' @@ -2170,14 +2285,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/screen-groups/{id}/screens': get: operationId: get-v2-screen-id-screen-group tags: - ScreenGroups responses: - 200: + '200': description: 'ScreenGroup collection' content: application/ld+json: @@ -2246,14 +2360,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] /v2/screens: get: operationId: get-v2-screens tags: - Screens responses: - 200: + '200': description: OK content: application/ld+json: @@ -2296,7 +2409,7 @@ paths: description: 'Search on both location and title' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -2308,7 +2421,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -2320,7 +2433,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -2334,7 +2447,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -2346,7 +2459,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -2360,9 +2473,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -2375,9 +2489,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -2390,9 +2505,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -2405,9 +2521,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -2420,7 +2537,7 @@ paths: tags: - Screens responses: - 201: + '201': description: 'Screen resource created' content: application/ld+json: @@ -2433,9 +2550,9 @@ paths: schema: $ref: '#/components/schemas/Screen.Screen' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' summary: 'Creates a Screen resource.' description: 'Creates a Screen resource.' @@ -2454,14 +2571,13 @@ paths: $ref: '#/components/schemas/Screen.ScreenInput' required: true deprecated: false - parameters: [] '/v2/screens/{id}': get: operationId: get-screens-id tags: - Screens responses: - 200: + '200': description: OK content: application/ld+json: @@ -2490,7 +2606,7 @@ paths: tags: - Screens responses: - 200: + '200': description: 'Screen resource updated' content: application/ld+json: @@ -2503,11 +2619,11 @@ paths: schema: $ref: '#/components/schemas/Screen.Screen' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' - 404: + '404': description: 'Resource not found' summary: 'Update a Screen resource.' description: 'Update a Screen resource.' @@ -2545,9 +2661,9 @@ paths: tags: - Screens responses: - 204: + '204': description: 'Screen resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Delete a Screen resource.' description: 'Delete a Screen resource.' @@ -2567,14 +2683,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/screens/{id}/bind': post: operationId: postScreenBindKey tags: - Screens responses: - 201: + '201': description: 'Bind screen to a logged in machine with bind key' summary: 'Bind screen with BindKey' parameters: @@ -2597,14 +2712,13 @@ paths: schema: $ref: '#/components/schemas/ScreenBindObject' required: false - parameters: [] '/v2/screens/{id}/campaigns': get: operationId: get-v2-screen-campaign-id tags: - Screens responses: - 200: + '200': description: OK content: application/ld+json: @@ -2661,7 +2775,7 @@ paths: description: 'If true only published content will be shown' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: boolean style: form @@ -2673,7 +2787,7 @@ paths: tags: - Screens responses: - 201: + '201': description: Created content: application/ld+json: @@ -2709,16 +2823,15 @@ paths: screen: { type: string, format: ulid, pattern: '^[A-Za-z0-9]{26}$', description: 'Screen ULID' } required: false deprecated: false - parameters: [] '/v2/screens/{id}/campaigns/{campaignId}': delete: operationId: delete-v2-screen-campaign-id tags: - Screens responses: - 204: + '204': description: 'ScreenCampaign resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Delete a campaign from a screen.' description: 'Delete a campaign from a screen.' @@ -2752,14 +2865,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/screens/{id}/regions/{regionId}/playlists': get: operationId: get-v2-playlist-screen-regions tags: - Screens responses: - 200: + '200': description: 'PlaylistScreenRegion collection' content: application/ld+json: @@ -2847,7 +2959,7 @@ paths: description: 'If true only entities that are shared with me will be shown' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: boolean style: form @@ -2859,11 +2971,11 @@ paths: tags: - Screens responses: - 200: + '200': description: 'Not used - remove the default 200 response' - 201: + '201': description: Created - 404: + '404': description: 'Not found' summary: 'Add Playlist resource from screen region.' description: 'Add Playlist resource from screen region.' @@ -2909,16 +3021,15 @@ paths: weight: { type: integer } required: false deprecated: false - parameters: [] '/v2/screens/{id}/regions/{regionId}/playlists/{playlistId}': delete: operationId: deletePlaylistScreenRegionItem tags: - Screens responses: - 204: + '204': description: 'PlaylistScreenRegion resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Remove Playlist resource from screen region.' description: 'Remove Playlist resource from screen region.' @@ -2966,14 +3077,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/screens/{id}/screen-groups': get: operationId: get-v2-screen-id-screen-groups tags: - Screens responses: - 200: + '200': description: 'ScreenGroup collection' content: application/ld+json: @@ -3047,9 +3157,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -3062,9 +3173,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -3077,7 +3189,7 @@ paths: tags: - Screens responses: - 200: + '200': description: OK content: application/ld+json: @@ -3109,16 +3221,15 @@ paths: type: string required: false deprecated: false - parameters: [] '/v2/screens/{id}/screen-groups/{screenGroupId}': delete: operationId: delete-v2-screen-group-screen-id tags: - Screens responses: - 204: + '204': description: 'ScreenGroup resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Delete a screen groups from a screen' description: 'Delete a screen groups from a screen.' @@ -3152,14 +3263,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/screens/{id}/unbind': post: operationId: postScreenUnbind tags: - Screens responses: - 201: + '201': description: 'Unbind screen from machine' summary: 'Unbind screen from machine' parameters: @@ -3179,14 +3289,13 @@ paths: description: 'Unbind from machine' content: { } required: false - parameters: [] /v2/slides: get: operationId: get-v2-slides tags: - Slides responses: - 200: + '200': description: OK content: application/ld+json: @@ -3229,7 +3338,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -3241,7 +3350,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -3253,7 +3362,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -3265,7 +3374,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -3279,7 +3388,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -3291,7 +3400,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -3305,7 +3414,7 @@ paths: description: 'If true only published content will be shown' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: boolean style: form @@ -3317,9 +3426,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -3332,9 +3442,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -3347,9 +3458,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -3362,9 +3474,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -3377,7 +3490,7 @@ paths: tags: - Slides responses: - 201: + '201': description: 'Slide resource created' content: application/ld+json: @@ -3390,9 +3503,9 @@ paths: schema: $ref: '#/components/schemas/Slide.Slide' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' summary: 'Creates a Slide resource.' description: 'Creates a Slide resource.' @@ -3411,14 +3524,13 @@ paths: $ref: '#/components/schemas/Slide.SlideInput' required: true deprecated: false - parameters: [] '/v2/slides/{id}': get: operationId: get-v2-slide-id tags: - Slides responses: - 200: + '200': description: OK content: application/ld+json: @@ -3447,7 +3559,7 @@ paths: tags: - Slides responses: - 200: + '200': description: 'Slide resource updated' content: application/ld+json: @@ -3460,11 +3572,11 @@ paths: schema: $ref: '#/components/schemas/Slide.Slide' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' - 404: + '404': description: 'Resource not found' summary: 'Update a Slide resource.' description: 'Update a Slide resource.' @@ -3502,9 +3614,9 @@ paths: tags: - Slides responses: - 204: + '204': description: 'Slide resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Delete a Slide resource.' description: 'Delete a Slide resource.' @@ -3524,14 +3636,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/slides/{id}/action': post: operationId: api_Slide_perform_action tags: - Slides responses: - 201: + '201': description: 'Slide resource created' content: application/ld+json: @@ -3544,9 +3655,9 @@ paths: schema: $ref: '#/components/schemas/Slide.Slide' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' summary: 'Performs an action for a slide.' description: 'Perform an action for a slide.' @@ -3579,36 +3690,21 @@ paths: $ref: '#/components/schemas/Slide.InteractiveSlideActionInput' required: true deprecated: false - parameters: [] - '/v2/slides/{id}/playlists': + /v2/templates: get: - operationId: put-v2-slide-playlist-id + operationId: get-v2-templates tags: - - Playlists + - Templates responses: - 200: + '200': description: OK content: application/ld+json: examples: null headers: [] - summary: 'Get the collection of playlist connected to a slide.' - description: 'Get the collection of playlist connected to a slide.' + summary: 'Retrieve a collection of Template resources.' + description: 'Retrieve a collection of Template resources.' parameters: - - - name: id - in: path - description: '' - required: true - deprecated: false - allowEmptyValue: false - schema: - type: string - format: ulid - pattern: '^[A-Za-z0-9]{26}$' - style: simple - explode: false - allowReserved: false - name: page in: query @@ -3638,124 +3734,14 @@ paths: explode: false allowReserved: false - - name: published + name: title in: query - description: 'If true only published content will be shown' + description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: - type: boolean - style: form - explode: false - allowReserved: false - deprecated: false - put: - operationId: get-v2-slide-playlist-id - tags: - - Playlists - responses: - 200: - description: 'PlaylistSlide resource updated' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/PlaylistSlide.PlaylistSlide.jsonld' - text/html: - schema: - $ref: '#/components/schemas/PlaylistSlide.PlaylistSlide' - multipart/form-data: - schema: - $ref: '#/components/schemas/PlaylistSlide.PlaylistSlide' - links: { } - 400: - description: 'Invalid input' - 422: - description: 'Unprocessable entity' - 404: - description: 'Resource not found' - summary: 'Retrieves collection of playlistresources.' - description: 'Retrieves collection of playlist resources.' - parameters: - - - name: id - in: path - description: '' - required: true - deprecated: false - allowEmptyValue: false - schema: - type: string - format: ulid - pattern: '^[A-Za-z0-9]{26}$' - style: simple - explode: false - allowReserved: false - requestBody: - description: '' - content: - application/ld+json: - schema: - type: array - items: - type: object - properties: - playlist: { type: string, format: ulid, pattern: '^[A-Za-z0-9]{26}$', description: 'Playlist ULID' } - required: false - deprecated: false - parameters: [] - /v2/templates: - get: - operationId: get-v2-templates - tags: - - Templates - responses: - 200: - description: OK - content: - application/ld+json: - examples: null - headers: [] - summary: 'Retrieve a collection of Template resources.' - description: 'Retrieve a collection of Template resources.' - parameters: - - - name: page - in: query - description: '' - required: false - deprecated: false - allowEmptyValue: false - schema: - type: integer - minimum: 0 - format: int32 - default: 1 - style: form - explode: false - allowReserved: false - - - name: itemsPerPage - in: query - description: 'The number of items per page' - required: false - deprecated: false - allowEmptyValue: false - schema: - type: string - default: '10' - style: form - explode: false - allowReserved: false - - - name: title - in: query - description: '' - required: false - deprecated: false - allowEmptyValue: true - schema: - type: string + type: string style: form explode: false allowReserved: false @@ -3765,7 +3751,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -3777,7 +3763,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -3789,7 +3775,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -3803,7 +3789,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -3815,7 +3801,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -3829,9 +3815,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -3844,9 +3831,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -3854,14 +3842,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/templates/{id}': get: operationId: get-v2-template-id tags: - Templates responses: - 200: + '200': description: OK content: application/ld+json: @@ -3885,14 +3872,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] /v2/tenants: get: operationId: get-v2-tenants tags: - Tenants responses: - 200: + '200': description: OK content: application/ld+json: @@ -3935,7 +3921,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -3947,7 +3933,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -3959,7 +3945,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -3971,7 +3957,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -3985,7 +3971,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -3997,7 +3983,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -4006,14 +3992,13 @@ paths: explode: true allowReserved: false deprecated: false - parameters: [] '/v2/tenants/{id}': get: operationId: get-v2-tenant-id tags: - Tenants responses: - 200: + '200': description: OK content: application/ld+json: @@ -4037,14 +4022,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] /v2/themes: get: operationId: get-v2-themes tags: - Themes responses: - 200: + '200': description: OK content: application/ld+json: @@ -4087,7 +4071,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -4099,7 +4083,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -4111,7 +4095,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -4123,7 +4107,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -4137,7 +4121,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -4149,7 +4133,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -4163,9 +4147,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -4178,9 +4163,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -4193,9 +4179,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -4208,9 +4195,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -4223,7 +4211,7 @@ paths: tags: - Themes responses: - 201: + '201': description: 'Theme resource created' content: application/ld+json: @@ -4236,9 +4224,9 @@ paths: schema: $ref: '#/components/schemas/Theme.Theme' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' summary: 'Creates a Theme resource.' description: 'Creates a Theme resource.' @@ -4257,14 +4245,13 @@ paths: $ref: '#/components/schemas/Theme.ThemeInput' required: true deprecated: false - parameters: [] '/v2/themes/{id}': get: operationId: get-v2-theme-id tags: - Themes responses: - 200: + '200': description: OK content: application/ld+json: @@ -4293,7 +4280,7 @@ paths: tags: - Themes responses: - 200: + '200': description: 'Theme resource updated' content: application/ld+json: @@ -4306,11 +4293,11 @@ paths: schema: $ref: '#/components/schemas/Theme.Theme' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' - 404: + '404': description: 'Resource not found' summary: 'Update a Theme resource.' description: 'Update a Theme resource.' @@ -4348,9 +4335,9 @@ paths: tags: - Themes responses: - 204: + '204': description: 'Theme resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Delete a Theme resource.' description: 'Delete a Theme resource.' @@ -4370,48 +4357,32 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] - /v2/user-activation-codes: + /v2/users: get: - operationId: api_v2user-activation-codes_get_collection + operationId: get-v2-users tags: - - UserActivationCode + - User responses: - 200: - description: 'UserActivationCode collection' + '200': + description: OK content: application/ld+json: - schema: - type: object - properties: - 'hydra:member': { type: array, items: { $ref: '#/components/schemas/UserActivationCode.UserActivationCode.jsonld' } } - 'hydra:totalItems': { type: integer, minimum: 0 } - 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } - 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [string, 'null'] }, required: { type: boolean } } } } } } - required: - - 'hydra:member' - text/html: - schema: - type: array - items: - $ref: '#/components/schemas/UserActivationCode.UserActivationCode' - multipart/form-data: - schema: - type: array - items: - $ref: '#/components/schemas/UserActivationCode.UserActivationCode' - summary: 'Retrieves the collection of UserActivationCode resources.' - description: 'Retrieves the collection of UserActivationCode resources.' + examples: null + headers: [] + summary: 'Retrieve a collection of User resources.' + description: 'Retrieve a collection of User resources.' parameters: - name: page in: query - description: 'The collection page number' + description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: integer + minimum: 0 + format: int32 default: 1 style: form explode: false @@ -4422,240 +4393,10 @@ paths: description: 'The number of items per page' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: - type: integer - default: 10 - minimum: 0 - maximum: 30 - style: form - explode: false - allowReserved: false - deprecated: false - post: - operationId: post-v2-create-user-activation-code - tags: - - UserActivationCode - responses: - 201: - description: 'UserActivationCode resource created' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCode.jsonld' - text/html: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCode' - multipart/form-data: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCode' - links: { } - 400: - description: 'Invalid input' - 422: - description: 'Unprocessable entity' - summary: 'Create user activation code.' - description: 'Create user activation code' - parameters: [] - requestBody: - description: 'The new UserActivationCode resource' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCodeInput.jsonld' - text/html: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCodeInput' - multipart/form-data: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCodeInput' - required: true - deprecated: false - parameters: [] - /v2/user-activation-codes/activate: - post: - operationId: post-v2-activate-user-activation-code - tags: - - UserActivationCode - responses: - 201: - description: 'UserActivationCode resource created' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCode.jsonld' - text/html: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCode' - multipart/form-data: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCode' - links: { } - 400: - description: 'Invalid input' - 422: - description: 'Unprocessable entity' - summary: 'Use user activation code.' - description: 'Use user activation code.' - parameters: [] - requestBody: - description: 'The new UserActivationCode resource' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserActivationCode.ActivationCode.jsonld' - text/html: - schema: - $ref: '#/components/schemas/UserActivationCode.ActivationCode' - multipart/form-data: - schema: - $ref: '#/components/schemas/UserActivationCode.ActivationCode' - required: true - deprecated: false - parameters: [] - /v2/user-activation-codes/refresh: - post: - operationId: post-v2-refresh-user-activation-code - tags: - - UserActivationCode - responses: - 201: - description: 'UserActivationCode resource created' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCode.jsonld' - text/html: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCode' - multipart/form-data: - schema: - $ref: '#/components/schemas/UserActivationCode.UserActivationCode' - links: { } - 400: - description: 'Invalid input' - 422: - description: 'Unprocessable entity' - summary: 'Refresh user activation code.' - description: 'Refresh user activation code.' - parameters: [] - requestBody: - description: 'The new UserActivationCode resource' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserActivationCode.ActivationCode.jsonld' - text/html: - schema: - $ref: '#/components/schemas/UserActivationCode.ActivationCode' - multipart/form-data: - schema: - $ref: '#/components/schemas/UserActivationCode.ActivationCode' - required: true - deprecated: false - parameters: [] - '/v2/user-activation-codes/{id}': - get: - operationId: api_v2user-activation-codes_id_get - tags: - - UserActivationCode - responses: - 200: - description: 'UserActivationCode resource' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserActivationCode.jsonld' - text/html: - schema: - $ref: '#/components/schemas/UserActivationCode' - multipart/form-data: - schema: - $ref: '#/components/schemas/UserActivationCode' - 404: - description: 'Resource not found' - summary: 'Retrieves a UserActivationCode resource.' - description: 'Retrieves a UserActivationCode resource.' - parameters: - - - name: id - in: path - description: 'UserActivationCode identifier' - required: true - deprecated: false - allowEmptyValue: false - schema: - type: string - style: simple - explode: false - allowReserved: false - deprecated: false - delete: - operationId: api_v2user-activation-codes_id_delete - tags: - - UserActivationCode - responses: - 204: - description: 'UserActivationCode resource deleted' - 404: - description: 'Resource not found' - summary: 'Removes the UserActivationCode resource.' - description: 'Removes the UserActivationCode resource.' - parameters: - - - name: id - in: path - description: 'UserActivationCode identifier' - required: true - deprecated: false - allowEmptyValue: false - schema: - type: string - style: simple - explode: false - allowReserved: false - deprecated: false - parameters: [] - /v2/users: - get: - operationId: get-v2-users - tags: - - User - responses: - 200: - description: OK - content: - application/ld+json: - examples: null - headers: [] - summary: 'Retrieve a collection of User resources.' - description: 'Retrieve a collection of User resources.' - parameters: - - - name: page - in: query - description: '' - required: false - deprecated: false - allowEmptyValue: false - schema: - type: integer - minimum: 0 - format: int32 - default: 1 - style: form - explode: false - allowReserved: false - - - name: itemsPerPage - in: query - description: 'The number of items per page' - required: false - deprecated: false - allowEmptyValue: false - schema: - type: string - default: '10' + type: string + default: '10' style: form explode: false allowReserved: false @@ -4665,7 +4406,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -4677,7 +4418,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -4689,7 +4430,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -4701,7 +4442,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -4715,7 +4456,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string style: form @@ -4727,7 +4468,7 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: array items: @@ -4741,9 +4482,10 @@ paths: description: '' required: false deprecated: false - allowEmptyValue: true + allowEmptyValue: false schema: type: string + default: asc enum: - asc - desc @@ -4756,7 +4498,7 @@ paths: tags: - User responses: - 201: + '201': description: 'User resource created' content: application/ld+json: @@ -4769,9 +4511,9 @@ paths: schema: $ref: '#/components/schemas/User.User' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' summary: 'Create a User resource.' description: 'Create a User resource.' @@ -4804,14 +4546,13 @@ paths: $ref: '#/components/schemas/User.UserInput' required: true deprecated: false - parameters: [] '/v2/users/{id}': get: operationId: get-v2-user-id tags: - User responses: - 200: + '200': description: OK content: application/ld+json: @@ -4840,7 +4581,7 @@ paths: tags: - User responses: - 200: + '200': description: 'User resource updated' content: application/ld+json: @@ -4853,11 +4594,11 @@ paths: schema: $ref: '#/components/schemas/User.User' links: { } - 400: + '400': description: 'Invalid input' - 422: + '422': description: 'Unprocessable entity' - 404: + '404': description: 'Resource not found' summary: 'Update User resource.' description: 'Update User resource.' @@ -4895,9 +4636,9 @@ paths: tags: - User responses: - 204: + '204': description: 'User resource deleted' - 404: + '404': description: 'Resource not found' summary: 'Delete an User resource.' description: 'Delete an User resource.' @@ -4917,14 +4658,13 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] '/v2/users/{id}/remove-from-tenant': delete: operationId: post-v2-remove-user-from-tenant tags: - User responses: - 204: + '204': description: 'User removed from tenant' summary: 'Remove a User resource from the current tenant.' description: 'Remove a User resource from the current tenant.' @@ -4944,7 +4684,247 @@ paths: explode: false allowReserved: false deprecated: false - parameters: [] + /v2/user-activation-codes: + get: + operationId: api_v2user-activation-codes_get_collection + tags: + - UserActivationCode + responses: + '200': + description: 'UserActivationCode collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/UserActivationCode.UserActivationCode.jsonld' } } + 'hydra:totalItems': { type: integer, minimum: 0 } + 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } + 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [string, 'null'] }, required: { type: boolean } } } } } } + required: + - 'hydra:member' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/UserActivationCode.UserActivationCode' + multipart/form-data: + schema: + type: array + items: + $ref: '#/components/schemas/UserActivationCode.UserActivationCode' + summary: 'Retrieves the collection of UserActivationCode resources.' + description: 'Retrieves the collection of UserActivationCode resources.' + parameters: + - + name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - + name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 10 + minimum: 0 + maximum: 30 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: post-v2-create-user-activation-code + tags: + - UserActivationCode + responses: + '201': + description: 'UserActivationCode resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCode.jsonld' + text/html: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCode' + multipart/form-data: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCode' + links: { } + '400': + description: 'Invalid input' + '422': + description: 'Unprocessable entity' + summary: 'Create user activation code.' + description: 'Create user activation code' + parameters: [] + requestBody: + description: 'The new UserActivationCode resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCodeInput.jsonld' + text/html: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCodeInput' + multipart/form-data: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCodeInput' + required: true + deprecated: false + /v2/user-activation-codes/activate: + post: + operationId: post-v2-activate-user-activation-code + tags: + - UserActivationCode + responses: + '201': + description: 'UserActivationCode resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCode.jsonld' + text/html: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCode' + multipart/form-data: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCode' + links: { } + '400': + description: 'Invalid input' + '422': + description: 'Unprocessable entity' + summary: 'Use user activation code.' + description: 'Use user activation code.' + parameters: [] + requestBody: + description: 'The new UserActivationCode resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/UserActivationCode.ActivationCode.jsonld' + text/html: + schema: + $ref: '#/components/schemas/UserActivationCode.ActivationCode' + multipart/form-data: + schema: + $ref: '#/components/schemas/UserActivationCode.ActivationCode' + required: true + deprecated: false + /v2/user-activation-codes/refresh: + post: + operationId: post-v2-refresh-user-activation-code + tags: + - UserActivationCode + responses: + '201': + description: 'UserActivationCode resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCode.jsonld' + text/html: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCode' + multipart/form-data: + schema: + $ref: '#/components/schemas/UserActivationCode.UserActivationCode' + links: { } + '400': + description: 'Invalid input' + '422': + description: 'Unprocessable entity' + summary: 'Refresh user activation code.' + description: 'Refresh user activation code.' + parameters: [] + requestBody: + description: 'The new UserActivationCode resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/UserActivationCode.ActivationCode.jsonld' + text/html: + schema: + $ref: '#/components/schemas/UserActivationCode.ActivationCode' + multipart/form-data: + schema: + $ref: '#/components/schemas/UserActivationCode.ActivationCode' + required: true + deprecated: false + '/v2/user-activation-codes/{id}': + get: + operationId: api_v2user-activation-codes_id_get + tags: + - UserActivationCode + responses: + '200': + description: 'UserActivationCode resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/UserActivationCode.jsonld' + text/html: + schema: + $ref: '#/components/schemas/UserActivationCode' + multipart/form-data: + schema: + $ref: '#/components/schemas/UserActivationCode' + '404': + description: 'Resource not found' + summary: 'Retrieves a UserActivationCode resource.' + description: 'Retrieves a UserActivationCode resource.' + parameters: + - + name: id + in: path + description: 'UserActivationCode identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + delete: + operationId: api_v2user-activation-codes_id_delete + tags: + - UserActivationCode + responses: + '204': + description: 'UserActivationCode resource deleted' + '404': + description: 'Resource not found' + summary: 'Removes the UserActivationCode resource.' + description: 'Removes the UserActivationCode resource.' + parameters: + - + name: id + in: path + description: 'UserActivationCode identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false components: schemas: Collection: @@ -10809,3 +10789,4 @@ security: bearerAuth: [] tenantHeader: [] tags: [] +webhooks: { } diff --git a/src/Command/Feed/CreateFeedSourceCommand.php b/src/Command/Feed/CreateFeedSourceCommand.php index 34dd709f..f3520258 100644 --- a/src/Command/Feed/CreateFeedSourceCommand.php +++ b/src/Command/Feed/CreateFeedSourceCommand.php @@ -28,7 +28,7 @@ public function __construct( private readonly EntityManagerInterface $entityManager, private readonly FeedService $feedService, private readonly FeedSourceRepository $feedSourceRepository, - private readonly TenantRepository $tenantRepository + private readonly TenantRepository $tenantRepository, ) { parent::__construct(); } diff --git a/src/Command/Feed/GetFeedTypesCommand.php b/src/Command/Feed/GetFeedTypesCommand.php index 325624fc..be1b589c 100644 --- a/src/Command/Feed/GetFeedTypesCommand.php +++ b/src/Command/Feed/GetFeedTypesCommand.php @@ -18,7 +18,7 @@ class GetFeedTypesCommand extends Command { public function __construct( - private readonly FeedService $feedService + private readonly FeedService $feedService, ) { parent::__construct(); } diff --git a/src/Command/Feed/RemoveFeedSourceCommand.php b/src/Command/Feed/RemoveFeedSourceCommand.php index 240bba2f..0c2f1f49 100644 --- a/src/Command/Feed/RemoveFeedSourceCommand.php +++ b/src/Command/Feed/RemoveFeedSourceCommand.php @@ -23,7 +23,7 @@ class RemoveFeedSourceCommand extends Command public function __construct( private readonly EntityManagerInterface $entityManager, private readonly FeedSourceRepository $feedSourceRepository, - private readonly FeedRepository $feedRepository + private readonly FeedRepository $feedRepository, ) { parent::__construct(); } diff --git a/src/Command/LoadTemplateCommand.php b/src/Command/LoadTemplateCommand.php index e97e1876..9eb249bc 100644 --- a/src/Command/LoadTemplateCommand.php +++ b/src/Command/LoadTemplateCommand.php @@ -25,7 +25,7 @@ class LoadTemplateCommand extends Command { public function __construct( - private readonly EntityManagerInterface $entityManager + private readonly EntityManagerInterface $entityManager, ) { parent::__construct(); } diff --git a/src/Command/Screen/RemoveScreenLayoutCommand.php b/src/Command/Screen/RemoveScreenLayoutCommand.php index d2d8667b..7c393b83 100644 --- a/src/Command/Screen/RemoveScreenLayoutCommand.php +++ b/src/Command/Screen/RemoveScreenLayoutCommand.php @@ -24,7 +24,7 @@ class RemoveScreenLayoutCommand extends Command public function __construct( private readonly EntityManagerInterface $entityManager, private readonly ScreenLayoutRepository $screenLayoutRepository, - private readonly ScreenRepository $screenRepository + private readonly ScreenRepository $screenRepository, ) { parent::__construct(); } diff --git a/src/Command/Tenant/AddTenantCommand.php b/src/Command/Tenant/AddTenantCommand.php index 7b095364..8dae662a 100644 --- a/src/Command/Tenant/AddTenantCommand.php +++ b/src/Command/Tenant/AddTenantCommand.php @@ -55,14 +55,14 @@ )] class AddTenantCommand extends Command { - private const TENANT_KEY_ARGUMENT = 'tenantKey'; - private const TITLE_ARGUMENT = 'title'; - private const DESCRIPTION_ARGUMENT = 'description'; + private const string TENANT_KEY_ARGUMENT = 'tenantKey'; + private const string TITLE_ARGUMENT = 'title'; + private const string DESCRIPTION_ARGUMENT = 'description'; public function __construct( private readonly EntityManagerInterface $entityManager, private readonly CommandInputValidator $validator, - private readonly TenantRepository $tenants + private readonly TenantRepository $tenants, ) { parent::__construct(); } diff --git a/src/Command/User/AddUserCommand.php b/src/Command/User/AddUserCommand.php index d0b5b89f..db68629f 100644 --- a/src/Command/User/AddUserCommand.php +++ b/src/Command/User/AddUserCommand.php @@ -62,18 +62,18 @@ )] class AddUserCommand extends Command { - private const EMAIL_ARGUMENT = 'email'; - private const PASSWORD_ARGUMENT = 'password'; - private const FULL_NAME_ARGUMENT = 'full-name'; - private const ROLE_ARGUMENT = 'role'; - private const TENANT_KEYS_ARGUMENT = 'tenant-keys'; + private const string EMAIL_ARGUMENT = 'email'; + private const string PASSWORD_ARGUMENT = 'password'; + private const string FULL_NAME_ARGUMENT = 'full-name'; + private const string ROLE_ARGUMENT = 'role'; + private const string TENANT_KEYS_ARGUMENT = 'tenant-keys'; public function __construct( private readonly EntityManagerInterface $entityManager, private readonly UserPasswordHasherInterface $passwordHasher, private readonly CommandInputValidator $validator, private readonly UserRepository $users, - private readonly TenantRepository $tenantRepository + private readonly TenantRepository $tenantRepository, ) { parent::__construct(); } diff --git a/src/Controller/AuthOidcController.php b/src/Controller/AuthOidcController.php index 2cdb31bb..e5a33789 100644 --- a/src/Controller/AuthOidcController.php +++ b/src/Controller/AuthOidcController.php @@ -28,7 +28,7 @@ public function __construct( private readonly OpenIdConfigurationProviderManager $configurationProviderManager, private readonly AzureOidcAuthenticator $oidcAuthenticator, private readonly AuthenticationSuccessHandler $successHandler, - private readonly AuthenticationFailureHandler $failureHandler + private readonly AuthenticationFailureHandler $failureHandler, ) {} #[Route('/v2/authentication/oidc/token', name: 'authentication_oidc_token', methods: ['GET'])] @@ -75,7 +75,7 @@ public function getUrls(Request $request, SessionInterface $session): Response // We allow end session endpoint to not be set. try { $endSessionUrl = $provider->getEndSessionUrl(); - } catch (ItkOpenIdConnectException $e) { + } catch (ItkOpenIdConnectException) { $endSessionUrl = null; } diff --git a/src/Controller/AuthScreenBindController.php b/src/Controller/AuthScreenBindController.php index fad854e6..ae470a85 100644 --- a/src/Controller/AuthScreenBindController.php +++ b/src/Controller/AuthScreenBindController.php @@ -21,7 +21,7 @@ class AuthScreenBindController extends AbstractController public function __construct( private readonly ScreenAuthenticator $authScreenService, private readonly ValidationUtils $validationUtils, - private readonly ScreenRepository $screenRepository + private readonly ScreenRepository $screenRepository, ) {} public function __invoke(Request $request, string $id): Response diff --git a/src/Controller/AuthScreenController.php b/src/Controller/AuthScreenController.php index 8a61d14a..237100ea 100644 --- a/src/Controller/AuthScreenController.php +++ b/src/Controller/AuthScreenController.php @@ -13,7 +13,7 @@ class AuthScreenController extends AbstractController { public function __construct( - private readonly ScreenAuthenticator $authScreenService + private readonly ScreenAuthenticator $authScreenService, ) {} public function __invoke(): JsonResponse diff --git a/src/Controller/AuthScreenUnbindController.php b/src/Controller/AuthScreenUnbindController.php index e7eb07e2..4fe9af01 100644 --- a/src/Controller/AuthScreenUnbindController.php +++ b/src/Controller/AuthScreenUnbindController.php @@ -18,7 +18,7 @@ class AuthScreenUnbindController extends AbstractController public function __construct( private readonly ScreenAuthenticator $authScreenService, private readonly ValidationUtils $validationUtils, - private readonly ScreenRepository $screenRepository + private readonly ScreenRepository $screenRepository, ) {} /** diff --git a/src/Controller/FeedGetDataController.php b/src/Controller/FeedGetDataController.php index fbe8a364..4f3cfb61 100644 --- a/src/Controller/FeedGetDataController.php +++ b/src/Controller/FeedGetDataController.php @@ -14,7 +14,7 @@ final class FeedGetDataController extends AbstractController { public function __construct( - private readonly FeedService $feedService + private readonly FeedService $feedService, ) {} public function __invoke(Feed $feed): JsonResponse diff --git a/src/Controller/PlaylistScreenRegionDeleteController.php b/src/Controller/PlaylistScreenRegionDeleteController.php index efbafb24..7bccd202 100644 --- a/src/Controller/PlaylistScreenRegionDeleteController.php +++ b/src/Controller/PlaylistScreenRegionDeleteController.php @@ -14,7 +14,7 @@ class PlaylistScreenRegionDeleteController extends AbstractTenantAwareController { public function __construct( private readonly PlaylistScreenRegionRepository $playlistScreenRegionRepository, - private readonly ValidationUtils $validationUtils + private readonly ValidationUtils $validationUtils, ) {} public function __invoke(string $id, string $regionId, string $playlistId): JsonResponse diff --git a/src/Controller/PlaylistScreenRegionPutController.php b/src/Controller/PlaylistScreenRegionPutController.php index 02a84abd..aaa739bb 100644 --- a/src/Controller/PlaylistScreenRegionPutController.php +++ b/src/Controller/PlaylistScreenRegionPutController.php @@ -17,7 +17,7 @@ class PlaylistScreenRegionPutController extends AbstractTenantAwareController { public function __construct( private readonly PlaylistScreenRegionRepository $playlistScreenRegionRepository, - private readonly ValidationUtils $validationUtils + private readonly ValidationUtils $validationUtils, ) {} public function __invoke(Request $request, string $id, string $regionId): JsonResponse diff --git a/src/Controller/PlaylistSlideDeleteController.php b/src/Controller/PlaylistSlideDeleteController.php index 02fc7ba5..f334a1ad 100644 --- a/src/Controller/PlaylistSlideDeleteController.php +++ b/src/Controller/PlaylistSlideDeleteController.php @@ -14,7 +14,7 @@ class PlaylistSlideDeleteController extends AbstractTenantAwareController { public function __construct( private readonly PlaylistSlideRepository $playlistSlideRepository, - private readonly ValidationUtils $validationUtils + private readonly ValidationUtils $validationUtils, ) {} public function __invoke(string $id, string $slideId): JsonResponse diff --git a/src/Controller/PlaylistSlidePutController.php b/src/Controller/PlaylistSlidePutController.php index 358b030c..9f47b7b7 100644 --- a/src/Controller/PlaylistSlidePutController.php +++ b/src/Controller/PlaylistSlidePutController.php @@ -17,7 +17,7 @@ class PlaylistSlidePutController extends AbstractTenantAwareController { public function __construct( private readonly PlaylistSlideRepository $playlistSlideRepository, - private readonly ValidationUtils $validationUtils + private readonly ValidationUtils $validationUtils, ) {} public function __invoke(Request $request, string $id): JsonResponse diff --git a/src/Controller/ScreenCampaignDeleteController.php b/src/Controller/ScreenCampaignDeleteController.php index 6002b65d..0a4d6088 100644 --- a/src/Controller/ScreenCampaignDeleteController.php +++ b/src/Controller/ScreenCampaignDeleteController.php @@ -14,7 +14,7 @@ class ScreenCampaignDeleteController extends AbstractTenantAwareController { public function __construct( private readonly ScreenCampaignRepository $screenCampaignRepository, - private readonly ValidationUtils $validationUtils + private readonly ValidationUtils $validationUtils, ) {} public function __invoke(string $id, string $campaignId): JsonResponse diff --git a/src/Controller/ScreenCampaignPutController.php b/src/Controller/ScreenCampaignPutController.php index c4a74181..0976017d 100644 --- a/src/Controller/ScreenCampaignPutController.php +++ b/src/Controller/ScreenCampaignPutController.php @@ -17,7 +17,7 @@ class ScreenCampaignPutController extends AbstractTenantAwareController { public function __construct( private readonly ScreenCampaignRepository $screenCampaignRepository, - private readonly ValidationUtils $validationUtils + private readonly ValidationUtils $validationUtils, ) {} public function __invoke(Request $request, string $id): JsonResponse diff --git a/src/Controller/ScreenGroupCampaignDeleteController.php b/src/Controller/ScreenGroupCampaignDeleteController.php index 678e74e5..5333683e 100644 --- a/src/Controller/ScreenGroupCampaignDeleteController.php +++ b/src/Controller/ScreenGroupCampaignDeleteController.php @@ -14,7 +14,7 @@ class ScreenGroupCampaignDeleteController extends AbstractTenantAwareController { public function __construct( private readonly ScreenGroupCampaignRepository $screenGroupCampaignRepository, - private readonly ValidationUtils $validationUtils + private readonly ValidationUtils $validationUtils, ) {} public function __invoke(string $id, string $campaignId): JsonResponse diff --git a/src/Controller/ScreenGroupCampaignPutController.php b/src/Controller/ScreenGroupCampaignPutController.php index ca5c622d..b4f59357 100644 --- a/src/Controller/ScreenGroupCampaignPutController.php +++ b/src/Controller/ScreenGroupCampaignPutController.php @@ -17,7 +17,7 @@ class ScreenGroupCampaignPutController extends AbstractTenantAwareController { public function __construct( private readonly ScreenGroupCampaignRepository $screenGroupCampaignRepository, - private readonly ValidationUtils $validationUtils + private readonly ValidationUtils $validationUtils, ) {} public function __invoke(Request $request, string $id): JsonResponse diff --git a/src/Controller/ScreenGroupsScreensDeleteController.php b/src/Controller/ScreenGroupsScreensDeleteController.php index bb90a54c..cd3d42e7 100644 --- a/src/Controller/ScreenGroupsScreensDeleteController.php +++ b/src/Controller/ScreenGroupsScreensDeleteController.php @@ -14,7 +14,7 @@ class ScreenGroupsScreensDeleteController extends AbstractTenantAwareController { public function __construct( private readonly ScreenGroupRepository $screenGroupRepository, - private readonly ValidationUtils $validationUtils + private readonly ValidationUtils $validationUtils, ) {} public function __invoke(string $id, string $screenGroupId): JsonResponse diff --git a/src/Controller/ScreenGroupsScreensPutController.php b/src/Controller/ScreenGroupsScreensPutController.php index d0eb2d3a..45fd1d2d 100644 --- a/src/Controller/ScreenGroupsScreensPutController.php +++ b/src/Controller/ScreenGroupsScreensPutController.php @@ -18,7 +18,7 @@ class ScreenGroupsScreensPutController extends AbstractTenantAwareController { public function __construct( private readonly ScreenGroupRepository $screenGroupRepository, - private readonly ValidationUtils $validationUtils + private readonly ValidationUtils $validationUtils, ) {} public function __invoke(Request $request, string $id): JsonResponse diff --git a/src/Controller/SlidePlaylistPutController.php b/src/Controller/SlidePlaylistPutController.php index 635658e2..9d8e69af 100644 --- a/src/Controller/SlidePlaylistPutController.php +++ b/src/Controller/SlidePlaylistPutController.php @@ -17,7 +17,7 @@ class SlidePlaylistPutController extends AbstractTenantAwareController { public function __construct( private readonly PlaylistSlideRepository $playlistSlideRepository, - private readonly ValidationUtils $validationUtils + private readonly ValidationUtils $validationUtils, ) {} public function __invoke(Request $request, string $id): JsonResponse diff --git a/src/DBAL/RRuleType.php b/src/DBAL/RRuleType.php index 6c4ef452..e5cb4bfb 100644 --- a/src/DBAL/RRuleType.php +++ b/src/DBAL/RRuleType.php @@ -10,7 +10,7 @@ class RRuleType extends Type { - final public const RRULE = 'rrule'; + final public const string RRULE = 'rrule'; /** * {@inheritDoc} diff --git a/src/DataFixtures/Faker/Provider/LicenseProvider.php b/src/DataFixtures/Faker/Provider/LicenseProvider.php index f087f0b7..1ab4f3fb 100644 --- a/src/DataFixtures/Faker/Provider/LicenseProvider.php +++ b/src/DataFixtures/Faker/Provider/LicenseProvider.php @@ -15,7 +15,7 @@ public function __construct(Generator $generator) parent::__construct($generator); } - private const IMAGE_LICENSES = [ + private const array IMAGE_LICENSES = [ 'Attribution License', 'Attribution-NoDerivs License', 'Attribution-NonCommercial-NoDerivs License', diff --git a/src/DataFixtures/Faker/Provider/RRuleProvider.php b/src/DataFixtures/Faker/Provider/RRuleProvider.php index 4442d896..88ad6d51 100644 --- a/src/DataFixtures/Faker/Provider/RRuleProvider.php +++ b/src/DataFixtures/Faker/Provider/RRuleProvider.php @@ -17,7 +17,7 @@ public function __construct(Generator $generator) $this->unique = $this->unique(); parent::__construct($generator); } - private const FREQ = [ + private const array FREQ = [ RRule::WEEKLY, RRule::DAILY, RRule::HOURLY, diff --git a/src/DataFixtures/Faker/Provider/ResourceProvider.php b/src/DataFixtures/Faker/Provider/ResourceProvider.php index 88658d31..fc719c4b 100644 --- a/src/DataFixtures/Faker/Provider/ResourceProvider.php +++ b/src/DataFixtures/Faker/Provider/ResourceProvider.php @@ -27,7 +27,7 @@ public static function templateResources(): array 'schema' => $faker->url(), 'component' => 'https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text.js', 'assets' => [ - 'type' => 'css', + 'type' => 'css', 'url' => $faker->url(), ], 'options' => [ diff --git a/src/DataFixtures/Faker/Provider/UlidProvider.php b/src/DataFixtures/Faker/Provider/UlidProvider.php index 5a1d40ee..7c96e14b 100644 --- a/src/DataFixtures/Faker/Provider/UlidProvider.php +++ b/src/DataFixtures/Faker/Provider/UlidProvider.php @@ -24,12 +24,12 @@ class UlidProvider extends Base * * @see https://github.com/symfony/uid/blob/5.3/Ulid.php */ - final public const BASE10 = [ + final public const array BASE10 = [ '' => '0123456789', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ]; - private const NIL = '00000000000000000000000000'; + private const string NIL = '00000000000000000000000000'; private static string $time = ''; private static array $rand = []; diff --git a/src/DataFixtures/Loader/DoctrineOrmLoaderDecorator.php b/src/DataFixtures/Loader/DoctrineOrmLoaderDecorator.php index 08d27b13..3ae0f3e8 100644 --- a/src/DataFixtures/Loader/DoctrineOrmLoaderDecorator.php +++ b/src/DataFixtures/Loader/DoctrineOrmLoaderDecorator.php @@ -27,7 +27,7 @@ class DoctrineOrmLoaderDecorator implements AliceBundleLoaderInterface, LoggerAwareInterface { public function __construct( - private readonly DoctrineOrmLoader $decorated + private readonly DoctrineOrmLoader $decorated, ) {} public function load(Application $application, EntityManagerInterface $manager, array $bundles, string $environment, bool $append, bool $purgeWithTruncate, bool $noBundles = false): array diff --git a/src/Doctrine/UserExtension.php b/src/Doctrine/UserExtension.php index 825e36e3..b9a548c3 100644 --- a/src/Doctrine/UserExtension.php +++ b/src/Doctrine/UserExtension.php @@ -18,7 +18,7 @@ final readonly class UserExtension implements QueryCollectionExtensionInterface, QueryItemExtensionInterface { public function __construct( - private Security $security + private Security $security, ) {} public function applyToCollection(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, ?Operation $operation = null, array $context = []): void diff --git a/src/Entity/ScreenLayout.php b/src/Entity/ScreenLayout.php index 193bec5c..73d034ba 100644 --- a/src/Entity/ScreenLayout.php +++ b/src/Entity/ScreenLayout.php @@ -31,13 +31,13 @@ class ScreenLayout extends AbstractBaseEntity implements MultiTenantInterface, R private int $gridColumns = 0; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\Screen[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(targetEntity: Screen::class, mappedBy: 'screenLayout')] private Collection $screens; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\ScreenLayoutRegions[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(targetEntity: ScreenLayoutRegions::class, mappedBy: 'screenLayout')] private Collection $regions; diff --git a/src/Entity/ScreenLayoutRegions.php b/src/Entity/ScreenLayoutRegions.php index ec8e00e9..12b98955 100644 --- a/src/Entity/ScreenLayoutRegions.php +++ b/src/Entity/ScreenLayoutRegions.php @@ -39,7 +39,7 @@ class ScreenLayoutRegions extends AbstractBaseEntity implements MultiTenantInter private ?ScreenLayout $screenLayout = null; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\PlaylistScreenRegion[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(targetEntity: PlaylistScreenRegion::class, cascade: ['persist', 'remove'], mappedBy: 'region', orphanRemoval: true)] private Collection $playlistScreenRegions; diff --git a/src/Entity/ScreenUser.php b/src/Entity/ScreenUser.php index 9c229fa6..43893a7b 100644 --- a/src/Entity/ScreenUser.php +++ b/src/Entity/ScreenUser.php @@ -18,7 +18,7 @@ #[ORM\Entity(repositoryClass: ScreenUserRepository::class)] class ScreenUser extends AbstractTenantScopedEntity implements UserInterface, TenantScopedUserInterface { - final public const ROLE_SCREEN = Roles::ROLE_SCREEN; + final public const string ROLE_SCREEN = Roles::ROLE_SCREEN; #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 180, unique: true)] private string $username; diff --git a/src/Entity/Template.php b/src/Entity/Template.php index 0b0afc97..ce257925 100644 --- a/src/Entity/Template.php +++ b/src/Entity/Template.php @@ -32,7 +32,7 @@ class Template extends AbstractBaseEntity implements MultiTenantInterface, Relat private array $resources = []; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\Slide[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(targetEntity: Slide::class, mappedBy: 'template')] private Collection $slides; diff --git a/src/Entity/Tenant.php b/src/Entity/Tenant.php index ccaff712..4a6ab4e6 100644 --- a/src/Entity/Tenant.php +++ b/src/Entity/Tenant.php @@ -20,7 +20,7 @@ class Tenant extends AbstractBaseEntity implements \JsonSerializable private string $tenantKey = ''; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\UserRoleTenant[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(targetEntity: UserRoleTenant::class, mappedBy: 'tenant', orphanRemoval: true)] private Collection $userRoleTenants; diff --git a/src/Entity/Tenant/FeedSource.php b/src/Entity/Tenant/FeedSource.php index de08ea99..f4dd4372 100644 --- a/src/Entity/Tenant/FeedSource.php +++ b/src/Entity/Tenant/FeedSource.php @@ -27,7 +27,7 @@ class FeedSource extends AbstractTenantScopedEntity implements RelationsChecksum private ?array $secrets = []; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\Feed[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(targetEntity: Feed::class, mappedBy: 'feedSource', orphanRemoval: true)] private Collection $feeds; diff --git a/src/Entity/Tenant/Playlist.php b/src/Entity/Tenant/Playlist.php index 6b88e165..9882e1de 100644 --- a/src/Entity/Tenant/Playlist.php +++ b/src/Entity/Tenant/Playlist.php @@ -29,32 +29,32 @@ class Playlist extends AbstractTenantScopedEntity implements MultiTenantInterfac private bool $isCampaign = false; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\ScreenCampaign[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(mappedBy: 'campaign', targetEntity: ScreenCampaign::class, orphanRemoval: true)] private Collection $screenCampaigns; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\ScreenGroupCampaign[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(mappedBy: 'campaign', targetEntity: ScreenGroupCampaign::class, orphanRemoval: true)] private Collection $screenGroupCampaigns; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\PlaylistScreenRegion[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(mappedBy: 'playlist', targetEntity: PlaylistScreenRegion::class, orphanRemoval: true)] private Collection $playlistScreenRegions; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\PlaylistSlide[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(mappedBy: 'playlist', targetEntity: PlaylistSlide::class, orphanRemoval: true)] #[ORM\OrderBy(['weight' => Order::Ascending->value])] private Collection $playlistSlides; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\Schedule[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(mappedBy: 'playlist', targetEntity: Schedule::class, cascade: ['persist'], orphanRemoval: true)] private Collection $schedules; diff --git a/src/Entity/Tenant/Screen.php b/src/Entity/Tenant/Screen.php index 74b57a49..ca4c54a4 100644 --- a/src/Entity/Tenant/Screen.php +++ b/src/Entity/Tenant/Screen.php @@ -44,13 +44,13 @@ class Screen extends AbstractTenantScopedEntity implements RelationsChecksumInte private ?ScreenUser $screenUser = null; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\ScreenCampaign[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(mappedBy: 'screen', targetEntity: ScreenCampaign::class, orphanRemoval: true)] private Collection $screenCampaigns; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\PlaylistScreenRegion[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(mappedBy: 'screen', targetEntity: PlaylistScreenRegion::class, cascade: ['persist', 'remove'], orphanRemoval: true)] #[ORM\OrderBy(['weight' => \Doctrine\Common\Collections\Order::Ascending->value])] diff --git a/src/Entity/Tenant/ScreenGroup.php b/src/Entity/Tenant/ScreenGroup.php index 6a2c8c46..bd404603 100644 --- a/src/Entity/Tenant/ScreenGroup.php +++ b/src/Entity/Tenant/ScreenGroup.php @@ -20,7 +20,7 @@ class ScreenGroup extends AbstractTenantScopedEntity implements RelationsChecksu use RelationsChecksumTrait; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\ScreenGroupCampaign[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(mappedBy: 'screenGroup', targetEntity: ScreenGroupCampaign::class, orphanRemoval: true)] private Collection $screenGroupCampaigns; diff --git a/src/Entity/Tenant/Slide.php b/src/Entity/Tenant/Slide.php index 226bf2dc..e8639dcd 100644 --- a/src/Entity/Tenant/Slide.php +++ b/src/Entity/Tenant/Slide.php @@ -46,7 +46,7 @@ class Slide extends AbstractTenantScopedEntity implements RelationsChecksumInter private Collection $media; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\PlaylistSlide[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(targetEntity: PlaylistSlide::class, mappedBy: 'slide', fetch: 'EXTRA_LAZY', cascade: ['remove'])] private Collection $playlistSlides; diff --git a/src/Entity/Tenant/Theme.php b/src/Entity/Tenant/Theme.php index 4f511ec7..5a25799a 100644 --- a/src/Entity/Tenant/Theme.php +++ b/src/Entity/Tenant/Theme.php @@ -27,7 +27,7 @@ class Theme extends AbstractTenantScopedEntity implements RelationsChecksumInter private ?Media $logo = null; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\Tenant\Slide[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(mappedBy: 'theme', targetEntity: Slide::class)] private Collection $slides; diff --git a/src/Entity/User.php b/src/Entity/User.php index 8e397470..c19a783c 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -40,7 +40,7 @@ class User extends AbstractBaseEntity implements UserInterface, PasswordAuthenti private string $password = ''; /** - * @var \Doctrine\Common\Collections\Collection|\App\Entity\UserRoleTenant[] + * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(targetEntity: UserRoleTenant::class, mappedBy: 'user', cascade: ['persist', 'remove'], orphanRemoval: true)] private Collection $userRoleTenants; diff --git a/src/EventListener/BlameableListener.php b/src/EventListener/BlameableListener.php index 2e5ee09b..6c820b54 100644 --- a/src/EventListener/BlameableListener.php +++ b/src/EventListener/BlameableListener.php @@ -16,7 +16,7 @@ class BlameableListener { public function __construct( - private readonly Security $security + private readonly Security $security, ) {} public function prePersist(LifecycleEventArgs $args): void diff --git a/src/EventListener/FeedDoctrineEventListener.php b/src/EventListener/FeedDoctrineEventListener.php index 09b89feb..36a8ce54 100644 --- a/src/EventListener/FeedDoctrineEventListener.php +++ b/src/EventListener/FeedDoctrineEventListener.php @@ -12,7 +12,7 @@ class FeedDoctrineEventListener { public function __construct( - private readonly CacheInterface $feedsCache + private readonly CacheInterface $feedsCache, ) {} public function preRemove(Feed $feed, LifecycleEventArgs $event): void diff --git a/src/EventListener/FeedSourceDoctrineEventListener.php b/src/EventListener/FeedSourceDoctrineEventListener.php index dbc8faa2..1fc7b909 100644 --- a/src/EventListener/FeedSourceDoctrineEventListener.php +++ b/src/EventListener/FeedSourceDoctrineEventListener.php @@ -11,7 +11,7 @@ class FeedSourceDoctrineEventListener { public function __construct( - private readonly CacheInterface $feedsCache + private readonly CacheInterface $feedsCache, ) {} public function preRemove(FeedSource $feedSource, LifecycleEventArgs $event): void diff --git a/src/EventListener/RelationsChecksumListener.php b/src/EventListener/RelationsChecksumListener.php index fa679e89..f822c810 100644 --- a/src/EventListener/RelationsChecksumListener.php +++ b/src/EventListener/RelationsChecksumListener.php @@ -56,9 +56,9 @@ #[AsDoctrineListener(event: Events::postFlush)] class RelationsChecksumListener { - private const CHECKSUM_TABLES = ['feed_source', 'feed', 'slide', 'media', 'theme', 'template', 'playlist_slide', - 'playlist', 'screen_campaign', 'screen', 'screen_group_campaign', 'screen_group', - 'playlist_screen_region', 'screen_layout_regions', 'screen_layout']; + private const array CHECKSUM_TABLES = ['feed_source', 'feed', 'slide', 'media', 'theme', 'template', 'playlist_slide', + 'playlist', 'screen_campaign', 'screen', 'screen_group_campaign', 'screen_group', + 'playlist_screen_region', 'screen_layout_regions', 'screen_layout']; /** * PrePersist listener. @@ -350,9 +350,9 @@ private static function getToOneQuery(string $jsonKey, string $parentTable, stri // - Use INNER JON to only select rows that have a match in both parent and child tables // - Use JSON_SET to only INSERT/UPDATE the relevant key in the json object, not the whole field. $queryFormat = ' - UPDATE %s p + UPDATE %s p INNER JOIN %s c ON p.%s = c.%s - SET p.changed = 1, + SET p.changed = 1, p.relations_checksum = JSON_SET(p.relations_checksum, "$.%s", SHA1(CONCAT(c.id, c.version, c.relations_checksum))) '; @@ -409,16 +409,16 @@ private static function getOneToManyQuery(string $jsonKey, string $parentTable, $parentTableId = $parentTable.'_id'; $queryFormat = ' - UPDATE + UPDATE %s p INNER JOIN ( - SELECT - c.%s, + SELECT + c.%s, CAST(GROUP_CONCAT(DISTINCT c.changed SEPARATOR "") > 0 AS UNSIGNED) changed, SHA1(GROUP_CONCAT(c.id, c.version, c.relations_checksum)) checksum - FROM - %s c - GROUP BY + FROM + %s c + GROUP BY c.%s ) temp ON p.id = temp.%s SET p.changed = 1, @@ -494,8 +494,8 @@ private static function getManyToManyQuery(string $jsonKey, string $parentTable, INNER JOIN %s c ON pivot.%s = c.id GROUP BY pivot.%s - ) temp ON p.id = temp.%s - SET p.changed = 1, + ) temp ON p.id = temp.%s + SET p.changed = 1, p.relations_checksum = JSON_SET(p.relations_checksum, "$.%s", temp.checksum) '; diff --git a/src/EventListener/ScreenLayoutDoctrineEventListener.php b/src/EventListener/ScreenLayoutDoctrineEventListener.php index edc70e25..55cc7222 100644 --- a/src/EventListener/ScreenLayoutDoctrineEventListener.php +++ b/src/EventListener/ScreenLayoutDoctrineEventListener.php @@ -12,7 +12,7 @@ class ScreenLayoutDoctrineEventListener { public function __construct( - private readonly EntityManagerInterface $entityManager + private readonly EntityManagerInterface $entityManager, ) {} public function prePersist(ScreenLayout $screenLayout, LifecycleEventArgs $event): void diff --git a/src/EventListener/ScreenLayoutRegionsDoctrineEventListener.php b/src/EventListener/ScreenLayoutRegionsDoctrineEventListener.php index 4ff75177..16166f5d 100644 --- a/src/EventListener/ScreenLayoutRegionsDoctrineEventListener.php +++ b/src/EventListener/ScreenLayoutRegionsDoctrineEventListener.php @@ -12,7 +12,7 @@ class ScreenLayoutRegionsDoctrineEventListener { public function __construct( - private readonly EntityManagerInterface $entityManager + private readonly EntityManagerInterface $entityManager, ) {} public function prePersist(ScreenLayoutRegions $screenLayoutRegions, LifecycleEventArgs $event): void diff --git a/src/EventListener/TemplateDoctrineEventListener.php b/src/EventListener/TemplateDoctrineEventListener.php index a4fc4ef7..88e7a6df 100644 --- a/src/EventListener/TemplateDoctrineEventListener.php +++ b/src/EventListener/TemplateDoctrineEventListener.php @@ -12,7 +12,7 @@ class TemplateDoctrineEventListener { public function __construct( - private readonly EntityManagerInterface $entityManager + private readonly EntityManagerInterface $entityManager, ) {} public function prePersist(Template $template, LifecycleEventArgs $event): void diff --git a/src/EventListener/TenantDoctrineEventListener.php b/src/EventListener/TenantDoctrineEventListener.php index 91860348..46aa3db8 100644 --- a/src/EventListener/TenantDoctrineEventListener.php +++ b/src/EventListener/TenantDoctrineEventListener.php @@ -10,7 +10,7 @@ class TenantDoctrineEventListener { public function __construct( - private readonly iterable $repositories + private readonly iterable $repositories, ) {} public function postPersist(Tenant $tenant, LifecycleEventArgs $event): void diff --git a/src/Feed/KobaFeedType.php b/src/Feed/KobaFeedType.php index 1b0dba18..573c2b65 100644 --- a/src/Feed/KobaFeedType.php +++ b/src/Feed/KobaFeedType.php @@ -20,7 +20,7 @@ class KobaFeedType implements FeedTypeInterface public function __construct( private readonly FeedService $feedService, private readonly HttpClientInterface $client, - private readonly LoggerInterface $logger + private readonly LoggerInterface $logger, ) {} /** diff --git a/src/Feed/NotifiedFeedType.php b/src/Feed/NotifiedFeedType.php index e66f1acf..e467a76b 100644 --- a/src/Feed/NotifiedFeedType.php +++ b/src/Feed/NotifiedFeedType.php @@ -25,7 +25,7 @@ class NotifiedFeedType implements FeedTypeInterface public function __construct( private readonly FeedService $feedService, private readonly HttpClientInterface $client, - private readonly LoggerInterface $logger + private readonly LoggerInterface $logger, ) {} public function getData(Feed $feed): array diff --git a/src/Feed/RssFeedType.php b/src/Feed/RssFeedType.php index 872fa18f..6dc6c61a 100644 --- a/src/Feed/RssFeedType.php +++ b/src/Feed/RssFeedType.php @@ -16,10 +16,11 @@ class RssFeedType implements FeedTypeInterface { final public const string SUPPORTED_FEED_TYPE = SupportedFeedOutputs::RSS_OUTPUT; + private readonly FeedIo $feedIo; public function __construct( - private readonly LoggerInterface $logger + private readonly LoggerInterface $logger, ) { $client = new Client(new HttplugClient()); $this->feedIo = new FeedIo($client, $this->logger); diff --git a/src/Feed/SparkleIOFeedType.php b/src/Feed/SparkleIOFeedType.php index 97cf1c26..7b0e3188 100644 --- a/src/Feed/SparkleIOFeedType.php +++ b/src/Feed/SparkleIOFeedType.php @@ -23,13 +23,14 @@ class SparkleIOFeedType implements FeedTypeInterface { final public const string SUPPORTED_FEED_TYPE = SupportedFeedOutputs::INSTAGRAM_OUTPUT; + final public const int REQUEST_TIMEOUT = 10; public function __construct( private readonly FeedService $feedService, private readonly HttpClientInterface $client, private readonly CacheInterface $feedsCache, - private readonly LoggerInterface $logger + private readonly LoggerInterface $logger, ) {} /** diff --git a/src/Filter/PublishedFilter.php b/src/Filter/PublishedFilter.php index 0993cce5..95d47d1b 100644 --- a/src/Filter/PublishedFilter.php +++ b/src/Filter/PublishedFilter.php @@ -13,8 +13,8 @@ class PublishedFilter extends AbstractFilter { - private const FROM = 'from'; - private const TO = 'to'; + private const string FROM = 'from'; + private const string TO = 'to'; /** * {@inheritDoc} diff --git a/src/Filter/SharedWithMe.php b/src/Filter/SharedWithMe.php index 70942988..a975c4ff 100644 --- a/src/Filter/SharedWithMe.php +++ b/src/Filter/SharedWithMe.php @@ -24,7 +24,7 @@ public function __construct( private readonly Security $security, ?LoggerInterface $logger = null, array $properties = [], - ?NameConverterInterface $nameConverter = null + ?NameConverterInterface $nameConverter = null, ) { parent::__construct($managerRegistry, $logger, $properties, $nameConverter); } diff --git a/src/Filter/TenantExtension.php b/src/Filter/TenantExtension.php index 36a3e10d..c519a58f 100644 --- a/src/Filter/TenantExtension.php +++ b/src/Filter/TenantExtension.php @@ -19,7 +19,7 @@ { public function __construct( private Security $security, - private EntityManagerInterface $entityManager + private EntityManagerInterface $entityManager, ) {} public function applyToCollection(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, ?Operation $operation = null, array $context = []): void diff --git a/src/InteractiveSlide/InteractionSlideRequest.php b/src/InteractiveSlide/InteractionSlideRequest.php index d30ea512..7189a158 100644 --- a/src/InteractiveSlide/InteractionSlideRequest.php +++ b/src/InteractiveSlide/InteractionSlideRequest.php @@ -9,6 +9,6 @@ public function __construct( public string $implementationClass, public string $action, - public array $data + public array $data, ) {} } diff --git a/src/OpenApi/OpenApiFactory.php b/src/OpenApi/OpenApiFactory.php index e3a5e56d..b596734f 100644 --- a/src/OpenApi/OpenApiFactory.php +++ b/src/OpenApi/OpenApiFactory.php @@ -14,7 +14,7 @@ class OpenApiFactory implements OpenApiFactoryInterface { public function __construct( private readonly OpenApiFactoryInterface $decorated, - private readonly PathUtils $utils + private readonly PathUtils $utils, ) {} public function __invoke(array $context = []): OpenApi diff --git a/src/Repository/PlaylistRepository.php b/src/Repository/PlaylistRepository.php index 2ebcd058..81ed8eac 100644 --- a/src/Repository/PlaylistRepository.php +++ b/src/Repository/PlaylistRepository.php @@ -19,8 +19,8 @@ class PlaylistRepository extends ServiceEntityRepository { private readonly EntityManagerInterface $entityManager; - final public const LINK = 'link'; - final public const UNLINK = 'unlink'; + final public const string LINK = 'link'; + final public const string UNLINK = 'unlink'; public function __construct(ManagerRegistry $registry) { diff --git a/src/Repository/TemplateRepository.php b/src/Repository/TemplateRepository.php index beef30db..ece9d71d 100644 --- a/src/Repository/TemplateRepository.php +++ b/src/Repository/TemplateRepository.php @@ -19,7 +19,7 @@ class TemplateRepository extends ServiceEntityRepository implements MultiTenantR use MultiTenantRepositoryTrait; public function __construct( - private readonly ManagerRegistry $registry + private readonly ManagerRegistry $registry, ) { parent::__construct($registry, Template::class); } diff --git a/src/Security/AzureOidcAuthenticator.php b/src/Security/AzureOidcAuthenticator.php index 1a15e486..f93be068 100644 --- a/src/Security/AzureOidcAuthenticator.php +++ b/src/Security/AzureOidcAuthenticator.php @@ -28,14 +28,14 @@ class AzureOidcAuthenticator extends OpenIdLoginAuthenticator implements LoggerAwareInterface { - final public const OIDC_PROVIDER_INTERNAL = 'internal'; - final public const OIDC_PROVIDER_EXTERNAL = 'external'; + final public const string OIDC_PROVIDER_INTERNAL = 'internal'; + final public const string OIDC_PROVIDER_EXTERNAL = 'external'; - final public const OIDC_POSTFIX_ADMIN_KEY = 'Admin'; - final public const OIDC_POSTFIX_EDITOR_KEY = 'Redaktoer'; + final public const string OIDC_POSTFIX_ADMIN_KEY = 'Admin'; + final public const string OIDC_POSTFIX_EDITOR_KEY = 'Redaktoer'; - final public const APP_ADMIN_ROLE = Roles::ROLE_ADMIN; - final public const APP_EDITOR_ROLE = Roles::ROLE_EDITOR; + final public const string APP_ADMIN_ROLE = Roles::ROLE_ADMIN; + final public const string APP_EDITOR_ROLE = Roles::ROLE_EDITOR; /** @psalm-suppress PropertyNotSetInConstructor */ private LoggerInterface $logger; diff --git a/src/Security/EventListener/JWTCreatedListener.php b/src/Security/EventListener/JWTCreatedListener.php index f19da70b..898dd6ec 100644 --- a/src/Security/EventListener/JWTCreatedListener.php +++ b/src/Security/EventListener/JWTCreatedListener.php @@ -20,7 +20,7 @@ class JWTCreatedListener { public function __construct( private readonly RequestStack $requestStack, - private readonly int $screenTokenTtl = 86400 + private readonly int $screenTokenTtl = 86400, ) {} /** diff --git a/src/Security/EventSubscriber/JwtTokenRefreshedSubscriber.php b/src/Security/EventSubscriber/JwtTokenRefreshedSubscriber.php index b0b311a5..e34e58ef 100644 --- a/src/Security/EventSubscriber/JwtTokenRefreshedSubscriber.php +++ b/src/Security/EventSubscriber/JwtTokenRefreshedSubscriber.php @@ -26,7 +26,7 @@ class JwtTokenRefreshedSubscriber implements EventSubscriberInterface public function __construct( private readonly int $jwtRefreshTokenTtl, private readonly int $jwtScreenRefreshTokenTtl, - private readonly RefreshTokenManagerInterface $refreshTokenManager + private readonly RefreshTokenManagerInterface $refreshTokenManager, ) {} public function onLexikJwtAuthenticationOnAuthenticationSuccess(AuthenticationSuccessEvent $event): void diff --git a/src/Security/ScreenAuthenticator.php b/src/Security/ScreenAuthenticator.php index ff591abb..cf6149d6 100644 --- a/src/Security/ScreenAuthenticator.php +++ b/src/Security/ScreenAuthenticator.php @@ -18,8 +18,8 @@ class ScreenAuthenticator { - final public const BIND_KEY_PREFIX = 'BindKey-'; - final public const AUTH_SCREEN_LOGIN_KEY = 'authScreenLoginKey'; + final public const string BIND_KEY_PREFIX = 'BindKey-'; + final public const string AUTH_SCREEN_LOGIN_KEY = 'authScreenLoginKey'; public function __construct( private readonly int $jwtScreenRefreshTokenTtl, @@ -28,7 +28,7 @@ public function __construct( private readonly EntityManagerInterface $entityManager, private readonly RequestStack $requestStack, private readonly RefreshTokenGeneratorInterface $refreshTokenGenerator, - private readonly RefreshTokenManagerInterface $refreshTokenManager + private readonly RefreshTokenManagerInterface $refreshTokenManager, ) {} /** diff --git a/src/Security/TenantScope/PrePersistListener.php b/src/Security/TenantScope/PrePersistListener.php index 92e7294a..299925b4 100644 --- a/src/Security/TenantScope/PrePersistListener.php +++ b/src/Security/TenantScope/PrePersistListener.php @@ -30,7 +30,7 @@ class PrePersistListener { public function __construct( - private readonly Security $security + private readonly Security $security, ) {} public function prePersist(PrePersistEventArgs $args): void diff --git a/src/Security/TenantScopedAuthenticator.php b/src/Security/TenantScopedAuthenticator.php index 944c409d..93bfebc0 100644 --- a/src/Security/TenantScopedAuthenticator.php +++ b/src/Security/TenantScopedAuthenticator.php @@ -18,7 +18,7 @@ */ class TenantScopedAuthenticator extends JWTAuthenticator { - final public const AUTH_TENANT_ID_HEADER = 'Authorization-Tenant-Key'; + final public const string AUTH_TENANT_ID_HEADER = 'Authorization-Tenant-Key'; /** {@inheritDoc} */ final public function doAuthenticate(Request $request): Passport diff --git a/src/Security/Voter/UserVoter.php b/src/Security/Voter/UserVoter.php index 4f5c10aa..9b846ed4 100644 --- a/src/Security/Voter/UserVoter.php +++ b/src/Security/Voter/UserVoter.php @@ -14,13 +14,13 @@ class UserVoter extends Voter { - final public const CREATE = 'CREATE'; - final public const EDIT = 'EDIT'; - final public const VIEW = 'VIEW'; - final public const DELETE = 'DELETE'; + final public const string CREATE = 'CREATE'; + final public const string EDIT = 'EDIT'; + final public const string VIEW = 'VIEW'; + final public const string DELETE = 'DELETE'; public function __construct( - private readonly Security $security + private readonly Security $security, ) {} protected function supports(string $attribute, mixed $subject): bool diff --git a/src/Service/FeedService.php b/src/Service/FeedService.php index 6fce49ae..fdd17039 100644 --- a/src/Service/FeedService.php +++ b/src/Service/FeedService.php @@ -18,7 +18,7 @@ class FeedService public function __construct( private readonly iterable $feedTypes, private readonly CacheItemPoolInterface $feedsCache, - private readonly UrlGeneratorInterface $urlGenerator + private readonly UrlGeneratorInterface $urlGenerator, ) {} /** diff --git a/src/Service/KeyVaultService.php b/src/Service/KeyVaultService.php index dcd4bd7f..cf3ee3a2 100644 --- a/src/Service/KeyVaultService.php +++ b/src/Service/KeyVaultService.php @@ -7,7 +7,7 @@ readonly class KeyVaultService { // APP_KEY_VAULT_SOURCE (set in environment/.env) options: - public const ENVIRONMENT = 'ENVIRONMENT'; + public const string ENVIRONMENT = 'ENVIRONMENT'; public function __construct( private string $keyVaultSource, diff --git a/src/Service/MediaUploadTenantDirectoryNamer.php b/src/Service/MediaUploadTenantDirectoryNamer.php index 7c25878e..d27c216c 100644 --- a/src/Service/MediaUploadTenantDirectoryNamer.php +++ b/src/Service/MediaUploadTenantDirectoryNamer.php @@ -11,11 +11,11 @@ class MediaUploadTenantDirectoryNamer implements DirectoryNamerInterface { - final public const DEFAULT = 'default'; - private const SEPARATOR = '-'; + final public const string DEFAULT = 'default'; + private const string SEPARATOR = '-'; public function __construct( - private readonly SluggerInterface $slugger + private readonly SluggerInterface $slugger, ) {} public function directoryName($object, PropertyMapping $mapping): string diff --git a/src/Service/TenantFactory.php b/src/Service/TenantFactory.php index 0d6ddd34..3c6267bc 100644 --- a/src/Service/TenantFactory.php +++ b/src/Service/TenantFactory.php @@ -13,7 +13,7 @@ class TenantFactory { public function __construct( private readonly EntityManagerInterface $entityManager, - private readonly TenantRepository $tenantRepository + private readonly TenantRepository $tenantRepository, ) {} /** diff --git a/src/Service/UserService.php b/src/Service/UserService.php index 5f16d24c..59f757d2 100644 --- a/src/Service/UserService.php +++ b/src/Service/UserService.php @@ -22,8 +22,8 @@ class UserService { - final public const EXTERNAL_USER_DEFAULT_NAME = 'EXTERNAL_NOT_SET'; - final public const CODE_ALPHABET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + final public const string EXTERNAL_USER_DEFAULT_NAME = 'EXTERNAL_NOT_SET'; + final public const string CODE_ALPHABET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; public function __construct( private readonly UserActivationCodeRepository $activationCodeRepository, diff --git a/src/State/AbstractProcessor.php b/src/State/AbstractProcessor.php index 460e39bf..584462ba 100644 --- a/src/State/AbstractProcessor.php +++ b/src/State/AbstractProcessor.php @@ -15,13 +15,11 @@ public function __construct( private readonly EntityManagerInterface $entityManager, private readonly ProcessorInterface $persistProcessor, private readonly ProcessorInterface $removeProcessor, - private readonly ?AbstractProvider $provider = null + private readonly ?AbstractProvider $provider = null, ) {} /** - * {@inheritdoc} - * - * @return T + * {@inheritDoc} */ public function process($data, Operation $operation, array $uriVariables = [], array $context = []) { @@ -35,10 +33,7 @@ public function process($data, Operation $operation, array $uriVariables = [], a return $this->toOutput($result); } - /** - * @return T - */ - protected function fromInput(mixed $object, Operation $operation, array $uriVariables, array $context): object + protected function fromInput(mixed $object, Operation $operation, array $uriVariables, array $context): mixed { return $object; } @@ -53,11 +48,14 @@ public function toOutput(object $object): object * * This is needed to get an object handled by entity manager. * - * @param \App\Entity\Tenant\Playlist|\App\Entity\Tenant\Screen|\App\Entity\Tenant\ScreenGroup|\App\Entity\Tenant\Slide|\App\Entity\Tenant\Theme $object + * @template T + * + * @param T $object + * @param array $context * - * @return mixed|object|null + * @return T|object|null */ - protected function loadPrevious(\App\Entity\Tenant\Playlist|\App\Entity\Tenant\ScreenGroup|\App\Entity\Tenant\Screen|\App\Entity\Tenant\Slide|\App\Entity\Tenant\Theme $object, array $context) + protected function loadPrevious(mixed $object, array $context): mixed { if ($previous = $context['previous_data'] ?? null) { $repository = $this->entityManager->getRepository($object::class); diff --git a/src/State/CampaignScreenGroupProvider.php b/src/State/CampaignScreenGroupProvider.php index 26976556..ecfb0165 100644 --- a/src/State/CampaignScreenGroupProvider.php +++ b/src/State/CampaignScreenGroupProvider.php @@ -25,7 +25,7 @@ public function __construct( private readonly ValidationUtils $validationUtils, private readonly iterable $collectionExtensions, ProviderInterface $collectionProvider, - private readonly ScreenGroupCampaignProvider $screenGroupCampaignProvider + private readonly ScreenGroupCampaignProvider $screenGroupCampaignProvider, ) { parent::__construct($collectionProvider, $this->screenGroupCampaignRepository); } diff --git a/src/State/CampaignScreenProvider.php b/src/State/CampaignScreenProvider.php index 83b4265b..22b2c809 100644 --- a/src/State/CampaignScreenProvider.php +++ b/src/State/CampaignScreenProvider.php @@ -33,7 +33,7 @@ public function __construct( private readonly ValidationUtils $validationUtils, private readonly iterable $collectionExtensions, ProviderInterface $collectionProvider, - private readonly ScreenCampaignProvider $screenCampaignProvider + private readonly ScreenCampaignProvider $screenCampaignProvider, ) { parent::__construct($collectionProvider, $this->screenCampaignRepository); } diff --git a/src/State/FeedProvider.php b/src/State/FeedProvider.php index 333cd1d0..367cf1f1 100644 --- a/src/State/FeedProvider.php +++ b/src/State/FeedProvider.php @@ -35,7 +35,7 @@ public function __construct( private readonly iterable $itemExtensions, private readonly SlideProvider $slideProvider, private readonly FeedSourceProvider $feedSourceProvider, - ProviderInterface $collectionProvider + ProviderInterface $collectionProvider, ) { parent::__construct($collectionProvider, $this->feedRepository); } diff --git a/src/State/FeedSourceProcessor.php b/src/State/FeedSourceProcessor.php index 881832d5..37e6222d 100644 --- a/src/State/FeedSourceProcessor.php +++ b/src/State/FeedSourceProcessor.php @@ -13,7 +13,7 @@ class FeedSourceProcessor implements ProcessorInterface { public function __construct( - private readonly EntityManagerInterface $entityManager + private readonly EntityManagerInterface $entityManager, ) {} /** diff --git a/src/State/MediaProcessor.php b/src/State/MediaProcessor.php index 17e22595..91c80571 100644 --- a/src/State/MediaProcessor.php +++ b/src/State/MediaProcessor.php @@ -13,7 +13,7 @@ public function __construct( EntityManagerInterface $entityManager, ProcessorInterface $persistProcessor, ProcessorInterface $removeProcessor, - MediaProvider $provider + MediaProvider $provider, ) { parent::__construct($entityManager, $persistProcessor, $removeProcessor, $provider); } diff --git a/src/State/MediaProvider.php b/src/State/MediaProvider.php index 4dbaf08c..b621a9fa 100644 --- a/src/State/MediaProvider.php +++ b/src/State/MediaProvider.php @@ -53,7 +53,7 @@ public function __construct( protected function provideCollection( Operation $operation, array $uriVariables = [], - array $context = [] + array $context = [], ): PaginatorInterface { $collection = parent::provideCollection($operation, $uriVariables, $context); diff --git a/src/State/PlaylistProcessor.php b/src/State/PlaylistProcessor.php index 20221408..64f8e283 100644 --- a/src/State/PlaylistProcessor.php +++ b/src/State/PlaylistProcessor.php @@ -25,7 +25,7 @@ public function __construct( EntityManagerInterface $entityManager, ProcessorInterface $persistProcessor, ProcessorInterface $removeProcessor, - PlaylistProvider $provider + PlaylistProvider $provider, ) { parent::__construct($entityManager, $persistProcessor, $removeProcessor, $provider); } diff --git a/src/State/PlaylistScreenRegionProvider.php b/src/State/PlaylistScreenRegionProvider.php index e5a39eed..e6608fcc 100644 --- a/src/State/PlaylistScreenRegionProvider.php +++ b/src/State/PlaylistScreenRegionProvider.php @@ -30,7 +30,7 @@ public function __construct( private readonly PlaylistScreenRegionRepository $playlistScreenRegionRepository, private readonly ValidationUtils $validationUtils, private readonly iterable $collectionExtensions, - private readonly PlaylistProvider $playlistProvider + private readonly PlaylistProvider $playlistProvider, ) {} protected function provideCollection(Operation $operation, array $uriVariables = [], array $context = []): PaginatorInterface diff --git a/src/State/PlaylistSlideProvider.php b/src/State/PlaylistSlideProvider.php index d722f4e6..911926fa 100644 --- a/src/State/PlaylistSlideProvider.php +++ b/src/State/PlaylistSlideProvider.php @@ -37,7 +37,7 @@ public function __construct( private readonly ValidationUtils $validationUtils, private readonly iterable $collectionExtensions, private readonly SlideProvider $slideProvider, - private readonly PlaylistProvider $playlistProvider + private readonly PlaylistProvider $playlistProvider, ) {} protected function provideCollection(Operation $operation, array $uriVariables = [], array $context = []): PaginatorInterface diff --git a/src/State/ScreenCampaignProvider.php b/src/State/ScreenCampaignProvider.php index b0783ac1..ecff7142 100644 --- a/src/State/ScreenCampaignProvider.php +++ b/src/State/ScreenCampaignProvider.php @@ -31,7 +31,7 @@ public function __construct( private readonly ValidationUtils $validationUtils, private readonly iterable $collectionExtensions, private readonly PlaylistProvider $playlistProvider, - private readonly ScreenProvider $screenProvider + private readonly ScreenProvider $screenProvider, ) {} protected function provideCollection(Operation $operation, array $uriVariables = [], array $context = []): PaginatorInterface diff --git a/src/State/ScreenGroupCampaignProvider.php b/src/State/ScreenGroupCampaignProvider.php index d3b7f9e1..09ff4b8b 100644 --- a/src/State/ScreenGroupCampaignProvider.php +++ b/src/State/ScreenGroupCampaignProvider.php @@ -24,7 +24,7 @@ public function __construct( private readonly ValidationUtils $validationUtils, private readonly iterable $collectionExtensions, private readonly PlaylistProvider $playlistProvider, - private readonly ScreenGroupProvider $screenGroupProvider + private readonly ScreenGroupProvider $screenGroupProvider, ) {} protected function provideCollection(Operation $operation, array $uriVariables = [], array $context = []): PaginatorInterface diff --git a/src/State/ScreenGroupProcessor.php b/src/State/ScreenGroupProcessor.php index 2d477fe8..d41b8bcc 100644 --- a/src/State/ScreenGroupProcessor.php +++ b/src/State/ScreenGroupProcessor.php @@ -16,7 +16,7 @@ public function __construct( EntityManagerInterface $entityManager, ProcessorInterface $persistProcessor, ProcessorInterface $removeProcessor, - ScreenGroupProvider $provider + ScreenGroupProvider $provider, ) { parent::__construct($entityManager, $persistProcessor, $removeProcessor, $provider); } diff --git a/src/State/ScreenGroupsScreensProvider.php b/src/State/ScreenGroupsScreensProvider.php index 49823c9c..7288e919 100644 --- a/src/State/ScreenGroupsScreensProvider.php +++ b/src/State/ScreenGroupsScreensProvider.php @@ -25,7 +25,7 @@ public function __construct( private readonly ValidationUtils $validationUtils, private readonly iterable $collectionExtensions, ProviderInterface $collectionProvider, - private readonly ScreenGroupProvider $screenGroupProvider + private readonly ScreenGroupProvider $screenGroupProvider, ) { parent::__construct($collectionProvider, $this->screenGroupRepository); } diff --git a/src/State/ScreenProcessor.php b/src/State/ScreenProcessor.php index 57f32e47..ed705177 100644 --- a/src/State/ScreenProcessor.php +++ b/src/State/ScreenProcessor.php @@ -42,7 +42,7 @@ protected function fromInput(mixed $object, Operation $operation, array $uriVari $screen = $this->loadPrevious(new Screen(), $context); if (!$screen instanceof Screen) { - throw new InvalidArgumentException('object must be of type Screen'); + throw new InvalidArgumentException('object must by of type Screen.'); } assert($object instanceof ScreenInput); @@ -174,7 +174,6 @@ private function validatePlaylist(array $playlist): void { if (!isset($playlist['id']) || !is_string($playlist['id'])) { throw new InvalidArgumentException('All playlists must specify a valid Ulid'); - } if (isset($playlist['weight']) && !is_integer($playlist['weight'])) { diff --git a/src/State/ScreenScreenGroupsProvider.php b/src/State/ScreenScreenGroupsProvider.php index 6dbe6e1f..84dc51f1 100644 --- a/src/State/ScreenScreenGroupsProvider.php +++ b/src/State/ScreenScreenGroupsProvider.php @@ -23,7 +23,7 @@ public function __construct( private readonly ScreenRepository $screenRepository, private readonly ValidationUtils $validationUtils, private readonly iterable $collectionExtensions, - private readonly ScreenProvider $screenProvider + private readonly ScreenProvider $screenProvider, ) {} protected function provideCollection(Operation $operation, array $uriVariables = [], array $context = []): PaginatorInterface diff --git a/src/State/SlidePlaylistProvider.php b/src/State/SlidePlaylistProvider.php index 92015dde..954984b0 100644 --- a/src/State/SlidePlaylistProvider.php +++ b/src/State/SlidePlaylistProvider.php @@ -25,7 +25,7 @@ public function __construct( private readonly ValidationUtils $validationUtils, private readonly iterable $collectionExtensions, ProviderInterface $collectionProvider, - private readonly PlaylistSlideProvider $playlistSlideProvider + private readonly PlaylistSlideProvider $playlistSlideProvider, ) { parent::__construct($collectionProvider, $this->playlistSlideRepository); } diff --git a/src/State/SlideProcessor.php b/src/State/SlideProcessor.php index b5f4eb7e..bd872f2b 100644 --- a/src/State/SlideProcessor.php +++ b/src/State/SlideProcessor.php @@ -31,7 +31,7 @@ public function __construct( EntityManagerInterface $entityManager, ProcessorInterface $persistProcessor, ProcessorInterface $removeProcessor, - SlideProvider $provider + SlideProvider $provider, ) { parent::__construct($entityManager, $persistProcessor, $removeProcessor, $provider); } @@ -41,6 +41,10 @@ protected function fromInput(mixed $object, Operation $operation, array $uriVari // FIXME Do we really have to do (something like) this to load an existing object into the entity manager? $slide = $this->loadPrevious(new Slide(), $context); + if (!$slide instanceof Slide) { + throw new \InvalidArgumentException('object must by of type Slide.'); + } + /* @var SlideInput $object */ empty($object->title) ?: $slide->setTitle($object->title); empty($object->description) ?: $slide->setDescription($object->description); @@ -70,7 +74,7 @@ protected function fromInput(mixed $object, Operation $operation, array $uriVari // Try loading layout entity. $template = $this->templateRepository->findOneBy(['id' => $ulid]); if (is_null($template)) { - throw new InvalidArgumentException('Unknown template resource'); + throw new \InvalidArgumentException('Unknown template resource'); } $slide->setTemplate($template); @@ -83,7 +87,7 @@ protected function fromInput(mixed $object, Operation $operation, array $uriVari // Try loading theme entity. $theme = $this->themeRepository->findOneBy(['id' => $ulid]); if (is_null($theme)) { - throw new InvalidArgumentException('Unknown theme resource'); + throw new \InvalidArgumentException('Unknown theme resource'); } $slide->setTheme($theme); @@ -97,7 +101,7 @@ protected function fromInput(mixed $object, Operation $operation, array $uriVari // Try loading media entity. $media = $this->mediaRepository->findOneBy(['id' => $ulid]); if (is_null($media)) { - throw new InvalidArgumentException('Unknown media resource'); + throw new \InvalidArgumentException('Unknown media resource'); } $slide->addMedium($media); @@ -122,7 +126,7 @@ protected function fromInput(mixed $object, Operation $operation, array $uriVari $feedSource = $this->feedSourceRepository->find($feedUlid); if (is_null($feedSource)) { - throw new InvalidArgumentException('Unknown feedSource resource'); + throw new \InvalidArgumentException('Unknown feedSource resource'); } $feed->setFeedSource($feedSource); diff --git a/src/State/SlideProvider.php b/src/State/SlideProvider.php index 61ceaa9a..486fd041 100644 --- a/src/State/SlideProvider.php +++ b/src/State/SlideProvider.php @@ -21,7 +21,7 @@ public function __construct( private readonly IriConverterInterface $iriConverter, private readonly ThemeProvider $themeProvider, private readonly FeedService $feedService, - ProviderInterface $collectionProvider + ProviderInterface $collectionProvider, ) { parent::__construct($collectionProvider, $this->slideRepository); } diff --git a/src/State/TemplateProvider.php b/src/State/TemplateProvider.php index ede79ed6..6a517877 100644 --- a/src/State/TemplateProvider.php +++ b/src/State/TemplateProvider.php @@ -13,7 +13,7 @@ class TemplateProvider extends AbstractProvider { public function __construct( private readonly ProviderInterface $collectionProvider, - private readonly TemplateRepository $entityRepository + private readonly TemplateRepository $entityRepository, ) { parent::__construct($collectionProvider, $entityRepository); } diff --git a/src/State/ThemeProcessor.php b/src/State/ThemeProcessor.php index fd454f9e..6a9d86c2 100644 --- a/src/State/ThemeProcessor.php +++ b/src/State/ThemeProcessor.php @@ -20,7 +20,7 @@ public function __construct( private readonly MediaRepository $mediaRepository, EntityManagerInterface $entityManager, ProcessorInterface $persistProcessor, - ProcessorInterface $removeProcessor + ProcessorInterface $removeProcessor, ) { parent::__construct($entityManager, $persistProcessor, $removeProcessor); } @@ -30,6 +30,10 @@ protected function fromInput(mixed $object, Operation $operation, array $uriVari // FIXME Do we really have to do (something like) this to load an existing object into the entity manager? $theme = $this->loadPrevious(new Theme(), $context); + if (!$theme instanceof Theme) { + throw new \InvalidArgumentException('object must by of type Theme.'); + } + /* @var ThemeInput $object */ empty($object->title) ?: $theme->setTitle($object->title); empty($object->description) ?: $theme->setDescription($object->description); diff --git a/src/State/ThemeProvider.php b/src/State/ThemeProvider.php index a6e41ed2..06afa4e5 100644 --- a/src/State/ThemeProvider.php +++ b/src/State/ThemeProvider.php @@ -35,7 +35,7 @@ public function __construct( private readonly MediaProvider $mediaProvider, private readonly ValidationUtils $validationUtils, private readonly iterable $itemExtensions, - ProviderInterface $collectionProvider + ProviderInterface $collectionProvider, ) { parent::__construct($collectionProvider, $this->themeRepository); } diff --git a/src/Utils/CommandInputValidator.php b/src/Utils/CommandInputValidator.php index 64ff0828..13611730 100644 --- a/src/Utils/CommandInputValidator.php +++ b/src/Utils/CommandInputValidator.php @@ -26,7 +26,7 @@ */ class CommandInputValidator { - final public const ALLOWED_USER_ROLES = ['editor', 'admin']; + final public const array ALLOWED_USER_ROLES = ['editor', 'admin']; public function __construct( private readonly TenantRepository $tenantRepository, diff --git a/src/Utils/PathUtils.php b/src/Utils/PathUtils.php index 1a91fa2c..2a3c3e2e 100644 --- a/src/Utils/PathUtils.php +++ b/src/Utils/PathUtils.php @@ -7,7 +7,7 @@ final class PathUtils { public function __construct( - private array $apiPlatformDefaults + private array $apiPlatformDefaults, ) {} /** diff --git a/src/Utils/Roles.php b/src/Utils/Roles.php index 0b235ae7..17a498bb 100644 --- a/src/Utils/Roles.php +++ b/src/Utils/Roles.php @@ -6,12 +6,12 @@ class Roles { - final public const ROLE_USER = 'ROLE_USER'; - final public const ROLE_SCREEN = 'ROLE_SCREEN'; - final public const ROLE_EDITOR = 'ROLE_EDITOR'; - final public const ROLE_EXTERNAL_USER = 'ROLE_EXTERNAL_USER'; - final public const ROLE_EXTERNAL_USER_ADMIN = 'ROLE_EXTERNAL_USER_ADMIN'; - final public const ROLE_USER_ADMIN = 'ROLE_USER_ADMIN'; - final public const ROLE_ADMIN = 'ROLE_ADMIN'; - final public const ROLE_SUPER_ADMIN = 'ROLE_SUPER_ADMIN'; + final public const string ROLE_USER = 'ROLE_USER'; + final public const string ROLE_SCREEN = 'ROLE_SCREEN'; + final public const string ROLE_EDITOR = 'ROLE_EDITOR'; + final public const string ROLE_EXTERNAL_USER = 'ROLE_EXTERNAL_USER'; + final public const string ROLE_EXTERNAL_USER_ADMIN = 'ROLE_EXTERNAL_USER_ADMIN'; + final public const string ROLE_USER_ADMIN = 'ROLE_USER_ADMIN'; + final public const string ROLE_ADMIN = 'ROLE_ADMIN'; + final public const string ROLE_SUPER_ADMIN = 'ROLE_SUPER_ADMIN'; } diff --git a/src/Utils/ValidationUtils.php b/src/Utils/ValidationUtils.php index 27f0a732..0eb87815 100644 --- a/src/Utils/ValidationUtils.php +++ b/src/Utils/ValidationUtils.php @@ -14,7 +14,7 @@ { public function __construct( private ValidatorInterface $validator, - private string $defaultDateFormat + private string $defaultDateFormat, ) {} public function validateRRule(string $rrule): RRule diff --git a/tests/Api/PlaylistSlideTest.php b/tests/Api/PlaylistSlideTest.php index a951b3d6..b63ce6fc 100644 --- a/tests/Api/PlaylistSlideTest.php +++ b/tests/Api/PlaylistSlideTest.php @@ -52,7 +52,7 @@ public function testLinkPlaylistToSlide(): void $client->request('PUT', '/v2/slides/'.$slideUlid.'/playlists', [ 'json' => [ (object) [ - 'playlist' => $playlistUlid1, + 'playlist' => $playlistUlid1, ], ], 'headers' => [ @@ -108,12 +108,12 @@ public function testLinkSlideToPlaylist(): void $client->request('PUT', '/v2/playlists/'.$playlistUlid.'/slides', [ 'json' => [ (object) [ - 'slide' => $slideUlid1, - 'weight' => 42, + 'slide' => $slideUlid1, + 'weight' => 42, ], (object) [ - 'slide' => $slideUlid2, - 'weight' => 84, + 'slide' => $slideUlid2, + 'weight' => 84, ], ], 'headers' => [ diff --git a/tests/Api/PlaylistsTest.php b/tests/Api/PlaylistsTest.php index d5b415ac..d0fabd23 100644 --- a/tests/Api/PlaylistsTest.php +++ b/tests/Api/PlaylistsTest.php @@ -43,7 +43,7 @@ public function testGetCampaigns(): void '@context' => '/contexts/Playlist', '@id' => '/v2/playlists', '@type' => 'hydra:Collection', - ]); + ]); } public function testGetItem(): void diff --git a/tests/Api/ScreenCampaignTest.php b/tests/Api/ScreenCampaignTest.php index 64f33731..b56fa904 100644 --- a/tests/Api/ScreenCampaignTest.php +++ b/tests/Api/ScreenCampaignTest.php @@ -28,10 +28,10 @@ public function testLinkPlaylistToScreen(): void $client->request('PUT', '/v2/screens/'.$playlistUlid.'/campaigns', [ 'json' => [ (object) [ - 'screen' => $screenUlid1, + 'screen' => $screenUlid1, ], (object) [ - 'screen' => $screenUlid2, + 'screen' => $screenUlid2, ], ], 'headers' => [ @@ -84,10 +84,10 @@ public function testUnlinkPlaylist(): void $client->request('PUT', '/v2/screens/'.$playlistUlid.'/campaigns', [ 'json' => [ (object) [ - 'screen' => $screenUlid1, + 'screen' => $screenUlid1, ], (object) [ - 'screen' => $screenUlid2, + 'screen' => $screenUlid2, ], ], 'headers' => [ diff --git a/tests/Api/ScreenGroupCampaignTest.php b/tests/Api/ScreenGroupCampaignTest.php index 8168f1ee..c64cc4bc 100644 --- a/tests/Api/ScreenGroupCampaignTest.php +++ b/tests/Api/ScreenGroupCampaignTest.php @@ -28,10 +28,10 @@ public function testLinkPlaylistToScreenGroup(): void $client->request('PUT', '/v2/screen-groups/'.$playlistUlid.'/campaigns', [ 'json' => [ (object) [ - 'screengroup' => $screenGroupUlid1, + 'screengroup' => $screenGroupUlid1, ], (object) [ - 'screengroup' => $screenGroupUlid2, + 'screengroup' => $screenGroupUlid2, ], ], 'headers' => [ @@ -84,10 +84,10 @@ public function testUnlinkPlaylist(): void $client->request('PUT', '/v2/screen-groups/'.$playlistUlid.'/campaigns', [ 'json' => [ (object) [ - 'screengroup' => $screenGroupUlid1, + 'screengroup' => $screenGroupUlid1, ], (object) [ - 'screengroup' => $screenGroupUlid2, + 'screengroup' => $screenGroupUlid2, ], ], 'headers' => [ diff --git a/tests/Api/ScreensTest.php b/tests/Api/ScreensTest.php index 65d5271b..08bc0d75 100644 --- a/tests/Api/ScreensTest.php +++ b/tests/Api/ScreensTest.php @@ -192,7 +192,7 @@ public function testUpdateScreen(): void $regionUlid = $this->iriHelperUtils->getUlidFromIRI($regionIri); $client = $this->getAuthenticatedClient('ROLE_ADMIN'); - $iri = $this->findIriBy(Screen::class, ['title' => 'screen_abc_1']); + $iri = $this->findIriBy(Screen::class, ['title' => 'screen_abc_3']); $response = $client->request('PUT', $iri, [ 'json' => [ @@ -213,6 +213,23 @@ public function testUpdateScreen(): void ]); $playlistScreenRegionCountAfter = $playlistScreenRegionRepository->count([]); $this->assertEquals($playlistScreenRegionCountBefore, $playlistScreenRegionCountAfter, 'PlaylistScreenRegion count should not change'); + + $response = $client->request('PUT', $iri, [ + 'json' => [ + 'title' => 'Updated title 2', + ], + 'headers' => [ + 'Content-Type' => 'application/ld+json', + ], + ]); + + $this->assertResponseIsSuccessful(); + $this->assertJsonContains([ + '@id' => $iri, + 'title' => 'Updated title 2', + ]); + $playlistScreenRegionCountAfter = $playlistScreenRegionRepository->count([]); + $this->assertEquals($playlistScreenRegionCountBefore, $playlistScreenRegionCountAfter, 'PlaylistScreenRegion count should not change'); } public function testDeleteScreen(): void diff --git a/tests/Api/SlidesTest.php b/tests/Api/SlidesTest.php index 9534461a..492ef980 100644 --- a/tests/Api/SlidesTest.php +++ b/tests/Api/SlidesTest.php @@ -24,10 +24,10 @@ public function testGetCollection(): void '@type' => 'hydra:Collection', 'hydra:totalItems' => 61, 'hydra:view' => [ - '@id' => '/v2/slides?itemsPerPage=10&page=1', - '@type' => 'hydra:PartialCollectionView', - 'hydra:first' => '/v2/slides?itemsPerPage=10&page=1', - 'hydra:last' => '/v2/slides?itemsPerPage=10&page=7', + '@id' => '/v2/slides?itemsPerPage=10&page=1', + '@type' => 'hydra:PartialCollectionView', + 'hydra:first' => '/v2/slides?itemsPerPage=10&page=1', + 'hydra:last' => '/v2/slides?itemsPerPage=10&page=7', ], ]); @@ -118,7 +118,7 @@ public function testCreateSlide(): void ], 'feed' => [ 'configuration' => [ - 'key1' => 'value1', + 'key1' => 'value1', ], 'feedSource' => $feedSource, ],