diff --git a/src/Requests/Document/DeleteDocumentRequest.php b/src/Requests/Document/DeleteDocumentRequest.php index f48ae9b..cb35906 100644 --- a/src/Requests/Document/DeleteDocumentRequest.php +++ b/src/Requests/Document/DeleteDocumentRequest.php @@ -22,7 +22,7 @@ public function resolveEndpoint(): string return '/FileCabinets/'.$this->fileCabinetId.'/Documents/'.$this->documentId; } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): Response { return DeleteDocumentResponse::fromResponse($response); } diff --git a/src/Requests/Document/GetDocumentCountRequest.php b/src/Requests/Document/GetDocumentCountRequest.php index 8e6598a..d33b6e0 100644 --- a/src/Requests/Document/GetDocumentCountRequest.php +++ b/src/Requests/Document/GetDocumentCountRequest.php @@ -45,7 +45,7 @@ public function defaultQuery(): array ]; } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): int { return GetDocumentCountResponse::fromResponse($response); } diff --git a/src/Requests/Document/GetDocumentDownloadRequest.php b/src/Requests/Document/GetDocumentDownloadRequest.php index f69f8c7..09c2a64 100644 --- a/src/Requests/Document/GetDocumentDownloadRequest.php +++ b/src/Requests/Document/GetDocumentDownloadRequest.php @@ -46,7 +46,7 @@ public function defaultQuery(): array ]; } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): string { return GetDocumentDownloadResponse::fromResponse($response); } diff --git a/src/Requests/Document/GetDocumentPreviewRequest.php b/src/Requests/Document/GetDocumentPreviewRequest.php index 88efcb8..2fc42e2 100644 --- a/src/Requests/Document/GetDocumentPreviewRequest.php +++ b/src/Requests/Document/GetDocumentPreviewRequest.php @@ -38,7 +38,7 @@ public function cacheExpiryInSeconds(): int return config('laravel-docuware.configurations.cache.lifetime_in_seconds', 3600); } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): string { return GetDocumentPreviewResponse::fromResponse($response); } diff --git a/src/Requests/Document/GetDocumentRequest.php b/src/Requests/Document/GetDocumentRequest.php index 4373067..9b11bc3 100644 --- a/src/Requests/Document/GetDocumentRequest.php +++ b/src/Requests/Document/GetDocumentRequest.php @@ -2,6 +2,7 @@ namespace CodebarAg\DocuWare\Requests\Document; +use CodebarAg\DocuWare\DTO\Document; use CodebarAg\DocuWare\Responses\Document\GetDocumentResponse; use Illuminate\Support\Facades\Cache; use Saloon\CachePlugin\Contracts\Cacheable; @@ -38,7 +39,7 @@ public function cacheExpiryInSeconds(): int return config('laravel-docuware.configurations.cache.lifetime_in_seconds', 3600); } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): Document { return GetDocumentResponse::fromResponse($response); } diff --git a/src/Requests/Document/GetDocumentsDownloadRequest.php b/src/Requests/Document/GetDocumentsDownloadRequest.php index a40c9d7..0653cd3 100644 --- a/src/Requests/Document/GetDocumentsDownloadRequest.php +++ b/src/Requests/Document/GetDocumentsDownloadRequest.php @@ -57,7 +57,7 @@ public function defaultQuery(): array ]; } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): string { return GetDocumentsDownloadResponse::fromResponse($response); } diff --git a/src/Requests/Document/GetDocumentsRequest.php b/src/Requests/Document/GetDocumentsRequest.php index 44d44e4..2a41c05 100644 --- a/src/Requests/Document/GetDocumentsRequest.php +++ b/src/Requests/Document/GetDocumentsRequest.php @@ -3,6 +3,7 @@ namespace CodebarAg\DocuWare\Requests\Document; use CodebarAg\DocuWare\Responses\Document\GetDocumentsResponse; +use Illuminate\Support\Collection; use Illuminate\Support\Facades\Cache; use Saloon\CachePlugin\Contracts\Cacheable; use Saloon\CachePlugin\Drivers\LaravelCacheDriver; @@ -37,7 +38,7 @@ public function cacheExpiryInSeconds(): int return config('laravel-docuware.configurations.cache.lifetime_in_seconds', 3600); } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): Collection { return GetDocumentsResponse::fromResponse($response); } diff --git a/src/Requests/Document/PostDocumentRequest.php b/src/Requests/Document/PostDocumentRequest.php index c8c49d3..9da153e 100644 --- a/src/Requests/Document/PostDocumentRequest.php +++ b/src/Requests/Document/PostDocumentRequest.php @@ -2,6 +2,7 @@ namespace CodebarAg\DocuWare\Requests\Document; +use CodebarAg\DocuWare\DTO\Document; use CodebarAg\DocuWare\DTO\DocumentIndex\PrepareDTO; use CodebarAg\DocuWare\Responses\Document\PostDocumentResponse; use Illuminate\Support\Collection; @@ -45,7 +46,7 @@ protected function defaultBody(): array return $body; } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): Document { return PostDocumentResponse::fromResponse($response); } diff --git a/src/Requests/Document/PostTransferDocumentRequest.php b/src/Requests/Document/PostTransferDocumentRequest.php index 171791a..c792858 100644 --- a/src/Requests/Document/PostTransferDocumentRequest.php +++ b/src/Requests/Document/PostTransferDocumentRequest.php @@ -54,7 +54,7 @@ protected function defaultBody(): array ]; } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): bool { return PostTransferDocumentResponse::fromResponse($response); } diff --git a/src/Requests/Document/PutDocumentFieldsRequest.php b/src/Requests/Document/PutDocumentFieldsRequest.php index 2189ad7..9b88165 100644 --- a/src/Requests/Document/PutDocumentFieldsRequest.php +++ b/src/Requests/Document/PutDocumentFieldsRequest.php @@ -48,7 +48,7 @@ public function defaultBody(): array } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): Collection { return PutDocumentFieldsResponse::fromResponse($response); } diff --git a/src/Requests/Fields/GetFieldsRequest.php b/src/Requests/Fields/GetFieldsRequest.php index 5e2e34f..3361f53 100644 --- a/src/Requests/Fields/GetFieldsRequest.php +++ b/src/Requests/Fields/GetFieldsRequest.php @@ -3,6 +3,8 @@ namespace CodebarAg\DocuWare\Requests\Fields; use CodebarAg\DocuWare\Responses\Fields\GetFieldsResponse; +use Illuminate\Support\Collection; +use Illuminate\Support\Enumerable; use Illuminate\Support\Facades\Cache; use Saloon\CachePlugin\Contracts\Cacheable; use Saloon\CachePlugin\Drivers\LaravelCacheDriver; @@ -37,7 +39,7 @@ public function cacheExpiryInSeconds(): int return config('laravel-docuware.configurations.cache.lifetime_in_seconds', 3600); } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): Collection|Enumerable { return GetFieldsResponse::fromResponse($response); } diff --git a/src/Requests/FileCabinets/GetFileCabinetsRequest.php b/src/Requests/FileCabinets/GetFileCabinetsRequest.php index 8c164d1..3fbef5a 100644 --- a/src/Requests/FileCabinets/GetFileCabinetsRequest.php +++ b/src/Requests/FileCabinets/GetFileCabinetsRequest.php @@ -3,6 +3,8 @@ namespace CodebarAg\DocuWare\Requests\FileCabinets; use CodebarAg\DocuWare\Responses\FileCabinets\GetFileCabinetsResponse; +use Illuminate\Support\Collection; +use Illuminate\Support\Enumerable; use Illuminate\Support\Facades\Cache; use Saloon\CachePlugin\Contracts\Cacheable; use Saloon\CachePlugin\Drivers\LaravelCacheDriver; @@ -32,7 +34,7 @@ public function cacheExpiryInSeconds(): int return config('laravel-docuware.configurations.cache.lifetime_in_seconds', 3600); } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): Collection|Enumerable { return GetFileCabinetsResponse::fromResponse($response); } diff --git a/src/Requests/Organization/GetOrganizationRequest.php b/src/Requests/Organization/GetOrganizationRequest.php index 475170f..e85b322 100644 --- a/src/Requests/Organization/GetOrganizationRequest.php +++ b/src/Requests/Organization/GetOrganizationRequest.php @@ -2,6 +2,7 @@ namespace CodebarAg\DocuWare\Requests\Organization; +use CodebarAg\DocuWare\DTO\Organization; use CodebarAg\DocuWare\Responses\Organization\GetOrganizationResponse; use Illuminate\Support\Facades\Cache; use Saloon\CachePlugin\Contracts\Cacheable; @@ -37,7 +38,7 @@ public function cacheExpiryInSeconds(): int return config('laravel-docuware.configurations.cache.lifetime_in_seconds', 3600); } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): Organization { return GetOrganizationResponse::fromResponse($response); } diff --git a/src/Requests/Organization/GetOrganizationsRequest.php b/src/Requests/Organization/GetOrganizationsRequest.php index 1cb7b6f..2187233 100644 --- a/src/Requests/Organization/GetOrganizationsRequest.php +++ b/src/Requests/Organization/GetOrganizationsRequest.php @@ -3,6 +3,8 @@ namespace CodebarAg\DocuWare\Requests\Organization; use CodebarAg\DocuWare\Responses\Organization\GetOrganizationsResponse; +use Illuminate\Support\Collection; +use Illuminate\Support\Enumerable; use Illuminate\Support\Facades\Cache; use Saloon\CachePlugin\Contracts\Cacheable; use Saloon\CachePlugin\Drivers\LaravelCacheDriver; @@ -32,7 +34,7 @@ public function cacheExpiryInSeconds(): int return config('laravel-docuware.configurations.cache.lifetime_in_seconds', 3600); } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): Collection|Enumerable { return GetOrganizationsResponse::fromResponse($response); } diff --git a/src/Requests/Search/GetSearchRequest.php b/src/Requests/Search/GetSearchRequest.php index 4e51f32..a06800e 100644 --- a/src/Requests/Search/GetSearchRequest.php +++ b/src/Requests/Search/GetSearchRequest.php @@ -2,6 +2,7 @@ namespace CodebarAg\DocuWare\Requests\Search; +use CodebarAg\DocuWare\DTO\DocumentPaginator; use CodebarAg\DocuWare\Responses\Search\GetSearchResponse; use Illuminate\Support\Facades\Cache; use Saloon\CachePlugin\Contracts\Cacheable; @@ -79,7 +80,7 @@ public function defaultBody(): array ]; } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): DocumentPaginator { return GetSearchResponse::fromResponse($response, $this->page, $this->perPage); } diff --git a/src/Requests/Sections/GetSectionsRequest.php b/src/Requests/Sections/GetSectionsRequest.php index eb961ee..7609933 100644 --- a/src/Requests/Sections/GetSectionsRequest.php +++ b/src/Requests/Sections/GetSectionsRequest.php @@ -3,6 +3,8 @@ namespace CodebarAg\DocuWare\Requests\Sections; use CodebarAg\DocuWare\Responses\Sections\GetSectionsResponse; +use Illuminate\Support\Collection; +use Illuminate\Support\Enumerable; use Illuminate\Support\Facades\Cache; use Saloon\CachePlugin\Contracts\Cacheable; use Saloon\CachePlugin\Drivers\LaravelCacheDriver; @@ -45,7 +47,7 @@ public function cacheExpiryInSeconds(): int return config('laravel-docuware.configurations.cache.lifetime_in_seconds', 3600); } - public function createDtoFromResponse(Response $response): mixed + public function createDtoFromResponse(Response $response): Collection|Enumerable { return GetSectionsResponse::fromResponse($response); }