Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

- Refactored InteractiveController to use a typed `InteractiveSlideActionInput` DTO; regenerated API spec and RTK types.
- Fixed multiple InstantBook bugs: interval boundary overlap, busy-interval timezone, per-resource spam-protect
throttling, duration validation, error responses (409/4xx), resource cache TTL, and assorted
typos/string-interpolation issues.
- Added `getBusyIntervals` cache (PT15M) with a shared `validateResourceAccess()` helper, eliminating per-poll Graph
calls at the cost of up to 15-minute-stale availability in `quickBookOptions`.

## [3.0.0-rc3] - 2026-05-11

- Made the Admin login sidebar text configurable via the new `ADMIN_LOGIN_SCREEN_TEXT`
Expand Down
3 changes: 2 additions & 1 deletion assets/shared/redux/generated-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2475,8 +2475,9 @@ export type SlideSlideInputJsonld = {
content?: string[];
};
export type SlideInteractiveSlideActionInputJsonld = {
implementationClass?: string | null;
action?: string | null;
data?: string[];
data?: string[] | null;
};
export type ThemeThemeJsonld = {
title?: string;
Expand Down
6 changes: 0 additions & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2892,12 +2892,6 @@ parameters:
count: 1
path: src/Service/InteractiveSlideService.php

-
message: '#^Method App\\Service\\InteractiveSlideService\:\:parseRequestBody\(\) has parameter \$requestBody with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: src/Service/InteractiveSlideService.php

-
message: '#^Method App\\Service\\InteractiveSlideService\:\:performAction\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down
22 changes: 20 additions & 2 deletions public/api-spec-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -14274,14 +14274,23 @@
"description": "",
"deprecated": false,
"properties": {
"implementationClass": {
"type": [
"string",
"null"
]
},
"action": {
"type": [
"string",
"null"
]
},
"data": {
"type": "array",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
Expand All @@ -14293,14 +14302,23 @@
"description": "",
"deprecated": false,
"properties": {
"implementationClass": {
"type": [
"string",
"null"
]
},
"action": {
"type": [
"string",
"null"
]
},
"data": {
"type": "array",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
Expand Down
16 changes: 14 additions & 2 deletions public/api-spec-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9948,25 +9948,37 @@ components:
description: ''
deprecated: false
properties:
implementationClass:
type:
- string
- 'null'
action:
type:
- string
- 'null'
data:
type: array
type:
- array
- 'null'
items:
type: string
Slide.InteractiveSlideActionInput.jsonld:
type: object
description: ''
deprecated: false
properties:
implementationClass:
type:
- string
- 'null'
action:
type:
- string
- 'null'
data:
type: array
type:
- array
- 'null'
items:
type: string
Slide.Slide:
Expand Down
6 changes: 4 additions & 2 deletions src/Controller/Api/InteractiveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace App\Controller\Api;

use App\Dto\InteractiveSlideActionInput;
use App\Entity\ScreenUser;
use App\Entity\Tenant\Slide;
use App\Exceptions\BadRequestException;
Expand Down Expand Up @@ -41,9 +42,10 @@ public function __invoke(Request $request, Slide $slide): JsonResponse

$tenant = $user->getActiveTenant();

$requestBody = $request->toArray();
/** @var InteractiveSlideActionInput $input */
$input = $request->attributes->get('data');

$interactionRequest = $this->interactiveSlideService->parseRequestBody($requestBody);
$interactionRequest = $this->interactiveSlideService->parseInteractiveSlideActionInput($input);

$actionResult = $this->interactiveSlideService->performAction($tenant, $slide, $interactionRequest);

Expand Down
3 changes: 2 additions & 1 deletion src/Dto/InteractiveSlideActionInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

class InteractiveSlideActionInput
{
public ?string $implementationClass = null;
public ?string $action = null;
public array $data = [];
public ?array $data = null;
}
Loading
Loading