From 2752ff2dbdc590eec80562d8c6c3953e25a6c0d7 Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 10:35:40 +0100 Subject: [PATCH 01/13] WIP --- src/DocuWare.php | 8 +++++--- src/DocuWareUrl.php | 14 ++++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/DocuWare.php b/src/DocuWare.php index 59914ecd..a96ff223 100644 --- a/src/DocuWare.php +++ b/src/DocuWare.php @@ -3,6 +3,8 @@ namespace CodebarAg\DocuWare; use CodebarAg\DocuWare\DTO\Authentication\OAuth\RequestToken as RequestTokenDto; +use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentials; +use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentialsTrustedUser; use CodebarAg\DocuWare\Requests\Authentication\OAuth\GetIdentityServiceConfiguration; use CodebarAg\DocuWare\Requests\Authentication\OAuth\GetResponsibleIdentityService; use CodebarAg\DocuWare\Requests\Authentication\OAuth\RequestTokenWithCredentials; @@ -23,9 +25,9 @@ public function getNewAuthenticationOAuthToken( $requestTokenResponse = (new RequestTokenWithCredentials( tokenEndpoint: $identityServiceConfigurationResponse->dto()->tokenEndpoint, + clientId: $clientId, username: $username, password: $password, - clientId: $clientId, ))->send(); return $requestTokenResponse->dto(); @@ -36,8 +38,8 @@ public function searchRequestBuilder(): DocuWareSearchRequestBuilder return new DocuWareSearchRequestBuilder; } - public function url(): DocuWareUrl + public function url(null|ConfigWithCredentials|ConfigWithCredentialsTrustedUser $configuration = null): DocuWareUrl { - return new DocuWareUrl; + return new DocuWareUrl($configuration); } } diff --git a/src/DocuWareUrl.php b/src/DocuWareUrl.php index 8030fe15..2a0c69f0 100644 --- a/src/DocuWareUrl.php +++ b/src/DocuWareUrl.php @@ -3,6 +3,8 @@ namespace CodebarAg\DocuWare; use Carbon\Carbon; +use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentials; +use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentialsTrustedUser; use CodebarAg\DocuWare\Exceptions\UnableToMakeUrl; use CodebarAg\DocuWare\Support\EnsureValidCredentials; use CodebarAg\DocuWare\Support\EnsureValidPassphrase; @@ -18,6 +20,10 @@ class DocuWareUrl protected ?Carbon $validUntil = null; + public function __construct( + public null|ConfigWithCredentials|ConfigWithCredentialsTrustedUser $configuration = null + ) {} + public function fileCabinet(string $fileCabinetId): self { $this->fileCabinetId = $fileCabinetId; @@ -52,8 +58,8 @@ public function make(): string $credentials = sprintf( 'User=%s\nPwd=%s', - config('laravel-docuware.credentials.username'), - config('laravel-docuware.credentials.password'), + $this->configuration->username ?? config('laravel-docuware.credentials.username'), + $this->configuration->password ?? config('laravel-docuware.credentials.password'), ); $lc = URL::formatWithBase64($credentials); @@ -79,7 +85,7 @@ public function make(): string } // Source: https://support.docuware.com/en-US/forums/help-with-technical-problems/ea9618df-c491-e911-80e7-0003ff59a7c6 - $key = utf8_encode(config('laravel-docuware.passphrase')); + $key = utf8_encode($this->configuration->passphrase ?? config('laravel-docuware.passphrase')); $passphrase = hash('sha512', $key, true); $encryption_key = substr($passphrase, 0, 32); $iv = substr($passphrase, 32, 16); @@ -93,7 +99,7 @@ public function make(): string return sprintf( '%s/DocuWare/Platform/WebClient/Integration?ep=%s', - config('laravel-docuware.credentials.url'), + $this->configuration->url ?? config('laravel-docuware.credentials.url'), URL::format($encrypted), ); } From 7795995116479a44d3af558ecebcb8cd350e1c49 Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 10:48:14 +0100 Subject: [PATCH 02/13] WIP --- .../Authentication/OAuth/GetResponsibleIdentityService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Requests/Authentication/OAuth/GetResponsibleIdentityService.php b/src/Requests/Authentication/OAuth/GetResponsibleIdentityService.php index f7c0fb8e..e82fcb0a 100644 --- a/src/Requests/Authentication/OAuth/GetResponsibleIdentityService.php +++ b/src/Requests/Authentication/OAuth/GetResponsibleIdentityService.php @@ -24,7 +24,8 @@ public function __construct( public function resolveEndpoint(): string { - $base = config('laravel-docuware.credentials.url').'/DocuWare/Platform'; + $url = $this->url ?? config('laravel-docuware.credentials.url'); + $base = $url.'/DocuWare/Platform'; return $base.'/Home/IdentityServiceInfo'; } From 9b49fe62195a879ff433cc5ba70ae4c7110e355b Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:03:48 +0100 Subject: [PATCH 03/13] WIP --- src/Facades/DocuWare.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Facades/DocuWare.php b/src/Facades/DocuWare.php index 3d882b15..e9188edc 100644 --- a/src/Facades/DocuWare.php +++ b/src/Facades/DocuWare.php @@ -5,6 +5,8 @@ use Carbon\Carbon; use CodebarAg\DocuWare\DocuWareSearchRequestBuilder; use CodebarAg\DocuWare\DocuWareUrl; +use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentials; +use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentialsTrustedUser; use CodebarAg\DocuWare\DTO\Cookie; use CodebarAg\DocuWare\DTO\Documents\Document; use CodebarAg\DocuWare\DTO\Documents\DocumentThumbnail; @@ -39,7 +41,7 @@ * @method static int documentCount(string $fileCabinetId, string $dialogId) * @method static void deleteDocument(string $fileCabinetId, int $documentId) * @method static DocuWareSearchRequestBuilder search() - * @method static DocuWareUrl url() + * @method static DocuWareUrl url(null|ConfigWithCredentials|ConfigWithCredentialsTrustedUser $configuration) */ class DocuWare extends Facade { From a84a7d8c1f15577ce1612f7ddf2d79b5f51fb78f Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:12:35 +0100 Subject: [PATCH 04/13] WIP --- src/Facades/DocuWare.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Facades/DocuWare.php b/src/Facades/DocuWare.php index e9188edc..d517c8e5 100644 --- a/src/Facades/DocuWare.php +++ b/src/Facades/DocuWare.php @@ -41,7 +41,7 @@ * @method static int documentCount(string $fileCabinetId, string $dialogId) * @method static void deleteDocument(string $fileCabinetId, int $documentId) * @method static DocuWareSearchRequestBuilder search() - * @method static DocuWareUrl url(null|ConfigWithCredentials|ConfigWithCredentialsTrustedUser $configuration) + * @method static DocuWareUrl url(null|ConfigWithCredentials|ConfigWithCredentialsTrustedUser $configuration = null) */ class DocuWare extends Facade { From 3922cd66e4f8aaf3fb9ac638e8957d0b63b8c55f Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 18:04:16 +0100 Subject: [PATCH 05/13] WIP --- README.md | 1258 ++++------------------------------------------------- 1 file changed, 75 insertions(+), 1183 deletions(-) diff --git a/README.md b/README.md index a9e75783..a03d5978 100644 --- a/README.md +++ b/README.md @@ -18,46 +18,45 @@ DocuWare provides cloud document management and workflow automation software that enables you to digitize, secure and work with business documents, then optimize the processes that power the core of your business. + + * [💡 What is DocuWare?](#-what-is-docuware) + * [🛠 Requirements](#-requirements) + * [⚙️ Installation](#-installation) + * [🏗 Usage](#-usage) + * [Getting Started with OAuth](#getting-started-with-oauth) + * [Getting a new token via Username & Password:](#getting-a-new-token-via-username--password) + * [Getting a new token via Username & Password (Trusted User):](#getting-a-new-token-via-username--password-trusted-user) + * [Available Requests](#available-requests) + * [Extending the connector (EXAMPLE)](#extending-the-connector-example) + * [Create a new connector](#create-a-new-connector) + * [Use the new connector](#use-the-new-connector) + * [🖼 Make encrypted URLs](#-make-encrypted-urls) + * [🏋️ Document Index Fields DTO showcase](#-document-index-fields-dto-showcase) + * [📦 Caching requests](#-caching-requests) + * [💥 Exceptions explained](#-exceptions-explained) + * [✨ Events](#-events) + * [🔧 Configuration file](#-configuration-file) + * [🚧 Testing](#-testing) + * [📝 Changelog](#-changelog) + * [✏️ Contributing](#-contributing) + * [🧑‍💻 Security Vulnerabilities](#-security-vulnerabilities) + * [🙏 Credits](#-credits) + * [🎭 License](#-license) + + ## 🛠 Requirements
Version Support -### \> = v11.0 (alpha) - -- PHP: `^8.2`` - - Laravel: `^11.*` - - DocuWare Cloud Access - -### \> = v4.0 (alpha) - -- PHP: `^8.2`` -- Laravel: `^11.*` -- DocuWare Cloud Access - -### \> = v3.0 - -- PHP: `^8.2`` -- Laravel: `^10.*` -- DocuWare Cloud Access - -### \> = v2.0 - -- PHP: `^8.1` |`^8.2` -- Laravel: `^9.*` | `^10.*` -- DocuWare Cloud Access - -### \> = v1.2 - -- PHP: `^8.1` -- Laravel: `^9.*` -- DocuWare Cloud Access - -### \< v1.2 - -- PHP: `^8.0` -- Laravel: `^8.*` -- DocuWare Cloud Access +| Version | PHP Version | Laravel Version | DocuWare Cloud Access | +|-----------------|-------------|-----------------|-----------------------| +| > v11.0 (alpha) | ^8.2 | ^11.* | ✅ | +| > v4.0 | ^8.2 | ^11.* | ✅ | +| > v3.0 | ^8.2 | ^10.* | ✅ | +| > v2.0 | ^8.1 | ^9.* | ✅ | +| > v1.2 | ^8.1 | ^9.* | ✅ | +| < v1.2 | ^8.0 | ^8.* | ✅ |
@@ -180,9 +179,6 @@ DOCUWARE_PASSPHRASE="a#bcd>2~C1'abc\\#" ## 🏗 Usage ### Getting Started with OAuth -
- Getting Started with OAuth - > This package automatically handles the generation of OAuth token for you and stores them in cache. ### Getting a new token via Username & Password: @@ -214,11 +210,41 @@ $connector = new DocuWareConnector( ); ``` -### Extending the connector (EXAMPLE) - -We understand it may be repetitive to pass the configuration every time you create a new connector. +### Available Requests -You can extend the connector and set the configuration once. +- [General](docs/General) + - [Organisation](docs/General/organization.md) + - [User Management](docs/General/User%20Management) + - [Get Users](docs/General/User%20Management/get_users.md) + - [Create/Update Users](docs/General/User%20Management/create-update_users.md) + - [Get/Modify Groups](docs/General/User%20Management/get-modify_groups.md) + - [Get/Modify Roles](docs/General/User%20Management/get-modify_roles.md) +- [File Cabinets](docs/File%20Cabinets) + - [General](docs/File%20Cabinets/general.md) + - [Dialogs](docs/File%20Cabinets/dialogs.md) + - [Search](docs/File%20Cabinets/search.md) + - [Check/In & Check/Out](docs/File%20Cabinets/check-in_check-out.md) + - [Select Lists](docs/File%20Cabinets/select_lists.md) + - [Upload](docs/File%20Cabinets/upload.md) + - [Batch Index Fields Update](docs/File%20Cabinets/batch_index_fields_update.md) +- [Documents](docs/Documents) + - [Update Index Values](docs/Documents/update_index_values.md) + - [Modify Documents](docs/Documents/modify_documents.md) + - [Clip/Unclip & Staple/Unstaple](docs/Documents/clip-unclicp_and_staple-unstaple.md) + - [Annotations & Stamps](docs/Documents/annotations-stamps.md) + - [Documents Trash Bin](docs/Documents/documents-trash-bin.md) + - [Application Properties](docs/Documents/application_properties.md) + - [Sections](docs/Documents/sections.md) + - [Download](docs/Documents/download.md) +- [Workflow](docs/workflow.md) + + + +## Extending the connector (EXAMPLE) + +> We understand it may be repetitive to pass the configuration every time you create a new connector. +> +> You can extend the connector and set the configuration once. #### Create a new connector @@ -246,1140 +272,32 @@ class YourOwnDocuWareConnector extends DocuWareConnector #### Use the new connector ```php -use App\Connectors\CustomDocuWareConnector; +use App\Connectors\YourOwnDocuWareConnector; use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentials; $connector = new YourOwnDocuWareConnector(); ``` +## 🖼 Make encrypted URLs -
- -### Available Requests - -
- Documents - -#### Add Application Properties -```php -use CodebarAg\DocuWare\Requests\Documents\ApplicationProperties\AddApplicationProperties; - -$addProperties = $connector->send(new AddApplicationProperties( - $fileCabinetId, - $documentId, - [ - [ - 'Name' => 'Key1', - 'Value' => 'Key1 Value', - ], - [ - 'Name' => 'Key2', - 'Value' => 'Key2 Value', - ], - ], -))->dto(); -``` - -#### Update Application Properties -```php -use CodebarAg\DocuWare\Requests\Documents\ApplicationProperties\UpdateApplicationProperties; - -$updateProperties = $connector->send(new UpdateApplicationProperties( - $fileCabinetId, - $documentId, - [ - [ - 'Name' => 'Key1', - 'Value' => 'Key1 Value Updated', - ], - ], -))->dto()->sortBy('Name'); -``` - -#### Delete Application Properties -```php -use CodebarAg\DocuWare\Requests\Documents\ApplicationProperties\DeleteApplicationProperties; - -$deleteProperties = $connector->send(new DeleteApplicationProperties( - $fileCabinetId, - $document->id, - [ - 'Key1', - ], -))->dto(); -``` - -#### Get Application Properties -```php -use CodebarAg\DocuWare\Requests\Documents\ApplicationProperties\GetApplicationProperties; - -$properties = $connector->send(new GetApplicationProperties( - $fileCabinetId, - $document->id, -))->dto(); -``` - - -#### Clip -```php -use CodebarAg\DocuWare\Requests\Documents\ClipUnclipStapleUnstaple\Clip; - -$clip = $connector->send(new Clip( - $fileCabinetId, - [ - $documentId, - $document2Id, - ] -))->dto(); -``` - -#### Unclip -```php -use CodebarAg\DocuWare\Requests\Documents\ClipUnclipStapleUnstaple\Unclip; - -$unclip = $connector->send(new Unclip( - $fileCabinetId, - $clipId -))->dto(); -``` - -#### Staple -```php -use CodebarAg\DocuWare\Requests\Documents\ClipUnclipStapleUnstaple\Staple; - -$staple = $connector->send(new Staple( - $fileCabinetId, - [ - $documentId, - $document2Id, - ] -))->dto(); -``` - -#### Unstaple -```php -use CodebarAg\DocuWare\Requests\Documents\ClipUnclipStapleUnstaple\Unstaple; - -$unclip = $connector->send(new Unstaple( - $fileCabinetId, - $stapleId -))->dto(); -``` - -#### Delete Documents -```php -use CodebarAg\DocuWare\Requests\Documents\DocumentsTrashBin\DeleteDocuments; - -$delete = $connector->send(new DeleteDocuments([$documentID, $document2ID]))->dto(); -``` - -#### Restore Documents -```php -use CodebarAg\DocuWare\Requests\Documents\DocumentsTrashBin\RestoreDocuments; - -$delete = $connector->send(new RestoreDocuments([$documentID, $document2ID]))->dto(); -``` - -#### Download Document -```php -use CodebarAg\DocuWare\Requests\Documents\Download\DownloadDocument; - -$contents = $connector->send(new DownloadDocument( - $fileCabinetId, - $documentId -))->dto(); -``` - -#### Download Section -```php -use CodebarAg\DocuWare\Requests\Documents\Download\DownloadSection; - -$contents = $connector->send(new DownloadSection( - $fileCabinetId, - $sectionId -))->dto(); -``` - -#### Download Thumbnail -```php -use CodebarAg\DocuWare\Requests\Documents\Download\DownloadThumbnail; - -$contents = $connector->send(new DownloadThumbnail( - $fileCabinetId, - $sectionId -))->dto(); -``` - -#### Delete Section -```php -use CodebarAg\DocuWare\Requests\Documents\Sections\DeleteSection; - -$deleted = $connector->send(new DeleteSection( - $fileCabinetId, - $sectionId -))->dto(); -``` - -#### Get All Section -```php -use CodebarAg\DocuWare\Requests\Documents\Sections\GetAllSectionsFromADocument; - -$sections = $connector->send(new GetAllSectionsFromADocument( - $fileCabinetId, - $documentId -))->dto(); -``` - -#### Get Specific Section -```php -use CodebarAg\DocuWare\Requests\Documents\Sections\GetASpecificSection; - -$section = $connector->send(new GetASpecificSection( - $fileCabinetId, - $sectionsId -))->dto(); -``` - - -#### Get Total Number Of Documents -```php -use CodebarAg\DocuWare\Requests\FileCabinets\General\GetTotalNumberOfDocuments; - -$count = $connector->send(new GetTotalNumberOfDocuments( - $fileCabinetId, - $dialogId -))->dto(); -``` - -#### Get Document Preview -```php -use CodebarAg\DocuWare\Requests\Documents\GetDocumentPreviewRequest; - -$image = $connector->send(new GetDocumentPreviewRequest($fileCabinetId, $documentId))->dto(); -``` - -#### Create Data Record -```php -use CodebarAg\DocuWare\Requests\FileCabinets\Upload\CreateDataRecord; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO; - -$document = $connector->send(new CreateDataRecord( - $fileCabinetId, - null, - null, - collect([ - IndexTextDTO::make('DOCUMENT_LABEL', '::data-entry::'), - ]), -))->dto(); -``` - -#### Create Table Data Record -```php -use CodebarAg\DocuWare\Requests\FileCabinets\Upload\CreateDataRecord; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateTimeDTO; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDecimalDTO; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexNumericDTO; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTableDTO; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO; - -$tableRows = collect([ - collect([ - IndexTextDTO::make('TEXT', 'project_1'), - IndexNumericDTO::make('INT', 1), - IndexDecimalDTO::make('DECIMAL', 1.1), - IndexDateDTO::make('DATE', $now), - IndexDateTimeDTO::make('DATETIME', $now), - ]), - collect([ - IndexTextDTO::make('TEXT', 'project_2'), - IndexNumericDTO::make('INT', 2), - IndexDecimalDTO::make('DECIMAL', 2.2), - IndexDateDTO::make('DATE', $now), - IndexDateTimeDTO::make('DATETIME', $now), - ]), -]); - - -$document = $connector->send(new CreateDataRecord( - $fileCabinetId, - null, - null, - collect([ - IndexTableDTO::make('TABLE_NAME', $tableRows) - ]), -))->dto(); -``` - -#### Update Index Values -```php -use CodebarAg\DocuWare\Requests\Documents\UpdateIndexValues\UpdateIndexValues; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO; - -$response = $connector->send(new UpdateIndexValues( - $fileCabinetId, - $documentId, - collect([ - IndexTextDTO::make('DOCUMENT_LABEL', '::new-data-entry::'), - ]) -))->dto(); -``` - -#### Update Table Data Record -```php -use CodebarAg\DocuWare\Requests\Documents\UpdateIndexValues\UpdateIndexValues; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateTimeDTO; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDecimalDTO; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexNumericDTO; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTableDTO; -use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO; - -$tableRows = collect([ - collect([ - IndexTextDTO::make('TEXT', 'project_1'), - IndexNumericDTO::make('INT', 1), - IndexDecimalDTO::make('DECIMAL', 1.1), - IndexDateDTO::make('DATE', $now), - IndexDateTimeDTO::make('DATETIME', $now), - ]), - collect([ - IndexTextDTO::make('TEXT', 'project_2'), - IndexNumericDTO::make('INT', 2), - IndexDecimalDTO::make('DECIMAL', 2.2), - IndexDateDTO::make('DATE', $now), - IndexDateTimeDTO::make('DATETIME', $now), - ]), -]); - - -$document = $connector->send(new UpdateIndexValues( - $fileCabinetId, - null, - null, - collect([ - IndexTableDTO::make('TABLE_NAME', $tableRows) - ]), -))->dto(); -``` -
- - -
- Fields - -#### Get Fields -```php -use CodebarAg\DocuWare\Requests\Fields\GetFieldsRequest; - -$fields = $connector->send(new GetFieldsRequest($fileCabinetId))->dto(); -``` - -
- -
- File Cabinets - -#### Get All Dialogs -```php -use CodebarAg\DocuWare\Requests\FileCabinets\Dialogs\GetAllDialogs; - -$dialogs = $connector->send(new GetAllDialogs($fileCabinetId))->dto(); -``` - -#### Get Dialogs of a Specific Type -```php -use CodebarAg\DocuWare\Requests\FileCabinets\Dialogs\GetASpecificDialog; - -$dialog = $connector->send(new GetASpecificDialog($fileCabinetId, $dialogId))->dto(); -``` - -#### Get Dialogs Of A Specific Type -```php -use CodebarAg\DocuWare\Enums\DialogType; -use CodebarAg\DocuWare\Requests\FileCabinets\Dialogs\GetDialogsOfASpecificType; - -$dialogs = $connector->send(new GetDialogsOfASpecificType($fileCabinetId, DialogType::SEARCH))->dto(); -``` - -#### Get File Cabinet Information -```php -use CodebarAg\DocuWare\Requests\FileCabinets\General\GetFileCabinetInformation; - -$fileCabinet = $connector->send(new GetFileCabinetInformation($fileCabinetId))->dto(); -``` - -#### Get A Specific Document From A File Cabinet -```php -use CodebarAg\DocuWare\Requests\FileCabinets\Search\GetASpecificDocumentFromAFileCabinet; - -$document = $connector->send(new GetASpecificDocumentFromAFileCabinet($fileCabinetId, $documentId))->dto(); -``` - -#### Get Documents From A File Cabinet -```php -use CodebarAg\DocuWare\Requests\FileCabinets\Search\GetDocumentsFromAFileCabinet; - -$documents = $connector->send(new GetDocumentsFromAFileCabinet( - config('laravel-docuware.tests.file_cabinet_id') -))->dto(); -``` - -#### Append Files To A Data Record -```php -use CodebarAg\DocuWare\Requests\FileCabinets\Upload\AppendFilesToADataRecord; - -$response = $connector->send( - new AppendFilesToADataRecord( - fileCabinetId: $fileCabinetId, - dataRecordId: $document->id, - files: collect([ - new MultipartValue( - name: 'File[]', - value: file_get_contents(__DIR__.'/../../../../Fixtures/files/test-2.pdf'), - filename: 'test-2.pdf', - ), - new MultipartValue( - name: 'File[]', - value: file_get_contents(__DIR__.'/../../../../Fixtures/files/test-3.pdf'), - filename: 'test-3.pdf', - ), - ]) - ) -)->dto(); -``` -
- -
- General - -#### Create User -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\CreateUpdateUsers\CreateUser; - -$user = $connector->send(new CreateUser(new User( - name: $timestamp.' - Test User', - dbName: $timestamp, - email: $timestamp.'-test@example.test', - password: 'TESTPASSWORD', -)))->dto(); -``` - -#### Update User -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\CreateUpdateUsers\UpdateUser; - -$user->name .= ' - Updated'; -$user->active = false; - -$user = $connector->send(new UpdateUser($user))->dto(); -``` - -#### Add User To A Group -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyGroups\AddUserToAGroup; - -$response = $connector->send(new AddUserToAGroup( - userId: $userId, - ids: [$groupId], -))->dto(); -``` - -#### Remove User From A Group -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyGroups\RemoveUserFromAGroup; - -$response = $connector->send(new RemoveUserFromAGroup( - userId: $userId, - ids: [$groupId], -))->dto(); -``` - -#### Get All Groups For A Specific User -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyGroups\GetAllGroupsForASpecificUser; - -$groups = $connector->send(new GetAllGroupsForASpecificUser($userId))->dto(); -``` - -#### Get Groups -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyGroups\GetGroups; - -$groups = $connector->send(new GetGroups())->dto(); -``` - -#### Add User To A Role -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyRoles\AddUserToARole; - -$response = $connector->send(new AddUserToARole( - userId: $userId, - ids: [$roleId], -))->dto(); -``` - -#### Remove User From A Role -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyRoles\RemoveUserFromARole; - -$response = $connector->send(new RemoveUserFromARole( - userId: $userId, - ids: [$roleId], -))->dto(); -``` - -#### Get All Roles For A Specific User -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyRoles\GetAllRolesForASpecificUser; - -$roles = $connector->send(new GetAllRolesForASpecificUser($userId))->dto(); -``` - -#### Get Roles -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyRoles\GetRoles; - -$roles = $this->connector->send(new GetRoles())->dto(); -``` - -#### Get User By Id -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetUsers\GetUserById; - -$user = $this->connector->send(new GetUserById($userId))->dto(); -``` - -#### Get Users Of A Group -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetUsers\GetUsersOfAGroup; - -$users = $this->connector->send(new GetUsersOfAGroup($groupId))->dto(); -``` - -#### Get Users Of A Role -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetUsers\GetUsersOfARole; - -$users = $this->connector->send(new GetUsersOfARole($roleId))->dto(); -``` - -### Get Users -```php -use CodebarAg\DocuWare\Requests\General\UserManagement\GetUsers\GetUsers; - -$users = $this->connector->send(new GetUsers())->dto(); -``` - -
- -
- Organization - -#### Get Organization -```php -use CodebarAg\DocuWare\Requests\General\Organization\GetOrganization; - -$organizations = $this->connector->send(new GetOrganization())->dto(); -``` - -
- -
- Select List - -#### Get Select Lists -```php -use CodebarAg\DocuWare\Requests\FileCabinets\SelectLists\GetSelectLists; - -$types = $this->connector->send(new GetSelectLists( - $fileCabinetId, - $dialogId, - $fieldName, -))->dto(); -``` - -
- -
- Workflow - -#### Get Document Workflow History -```php -use CodebarAg\DocuWare\Requests\Workflow\GetDocumentWorkflowHistory; - -$history = $this->connector->send(new GetDocumentWorkflowHistory( - $fileCabinetId, - $documentId -))->dto(); -``` - -#### Get Document Workflow History Steps -```php -use CodebarAg\DocuWare\Requests\Workflow\GetDocumentWorkflowHistorySteps; - -$historySteps = $this->connector->send(new GetDocumentWorkflowHistorySteps( - $workflowId, - $historyId, -))->dto(); -``` - -
- -## 🔍 Search usage -
- Search Usage - -```php -use CodebarAg\DocuWare\Facades\DocuWare; -use CodebarAg\DocuWare\Connectors\DocuWareConnector; - -$connector = new DocuWareConnector(); -``` - -```php -/** - * Most basic example to search for documents. You only need to provide a valid - * file cabinet id. - */ - -$fileCabinetId = '87356f8d-e50c-450b-909c-4eaccd318fbf'; - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinet($fileCabinetId) - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` - -```php -/** - * Search in multiple file cabinets. Provide an array of file cabinet ids. - */ - -$fileCabinetIds = [ - '0ee72de3-4258-4353-8020-6a3ff6dd650f', - '3f9cb4ff-82f2-44dc-b439-dd648269064f', -]; - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinets($fileCabinetIds) - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` - -```php -/** - * Find results on the next page. - * - * Default: 1 - */ - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinet($id) - ->page(2) - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` - -```php -/** - * Define the number of results which should be shown per page. - * - * Default: 50 - */ - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinet($id) - ->perPage(30) - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` - -```php -/** - * Use the full-text search. You have to activate full-text search in your file - * cabinet before you can use this feature. - */ - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinet($id) - ->fulltext('My secret document') - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` - -```php -/** - * Search documents which are created from the first of march. - */ - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinet($id) - ->filterDate('DWSTOREDATETIME', '>=', Carbon::create(2021, 3, 1)) - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` - -```php -/** - * Search documents which are created until the first of april. - */ - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinet($id) - ->filterDate('DWSTOREDATETIME', '<', Carbon::create(2021, 4, 1)) - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` - -```php -/** - * Order the results by field name. Supported values: 'asc', 'desc' - */ - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinet($id) - ->orderBy('DWSTOREDATETIME', 'desc') - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` - -```php -/** - * Search documents filtered to the value. You can specify multiple filters. - */ - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinet($id) - ->filter('TYPE', 'Order') - ->filter('OTHER_FIELD', 'other') - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` - -```php -/** - * Search documents filtered to multiple values. - */ - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinet($id) - ->filterIn('TYPE', ['Order', 'Invoice']) - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` - -```php -/** - * You can specify the dialog which should be used. - */ - -$dialogId = 'bb42c30a-89fc-4b81-9091-d7e326caba62'; - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinet($id) - ->dialog($dialogId) - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` - -```php -/** - * You can also combine everything. - */ - -$paginatorRequest = DocuWare::searchRequestBuilder() - ->fileCabinet($id) - ->page(2) - ->perPage(30) - ->fulltext('My secret document') - ->filterDate('DWSTOREDATETIME', '>=', Carbon::create(2021, 3, 1)) - ->filterDate('DWSTOREDATETIME','<',Carbon::create(2021, 4, 1)) - ->filter('TYPE', 'Order') - ->filter('OTHER_FIELD', 'other') - ->orderBy('DWSTOREDATETIME', 'desc') - ->dialog($dialogId) - ->get(); - -$paginator = $connector->send($paginatorRequest)->dto(); -``` -
- -## 🔍 Search usage TrashBin -
- Search Usage - -> You can use the same methods as in the search usage. The only difference is that you have to use the `trashBin` method after the `searchRequestBuilder` method. - -```php -use CodebarAg\DocuWare\DocuWare; - -$paginatorRequest = (new DocuWare()) - ->searchRequestBuilder() - ->trashBin() -``` - -## 🖼 Make encrypted URL - -
- Make encrypted URL - -```php -use CodebarAg\DocuWare\Facades\DocuWare; -``` - -```php -/** - * Make encrypted URL for a document in a file cabinet. - */ - -$fileCabinetId = '87356f8d-e50c-450b-909c-4eaccd318fbf'; -$documentId = 42; - -$url = DocuWare::url() - ->fileCabinet($fileCabinetId) - ->document($documentId) - ->make(); -``` - -```php -/** - * Make encrypted URL for a document in a basket. - */ - -$basketId = 'b_87356f8d-e50c-450b-909c-4eaccd318fbf'; - -$url = DocuWare::url() - ->basket($basketId) - ->document($documentId) - ->make(); -``` - -```php -/** - * Make encrypted URL valid for a specific amount of time. In the example below - * the URL is valid for one week. Afterwards the URL is no longer working. - */ - -$url = DocuWare::url() - ->fileCabinet($fileCabinetId) - ->document($documentId) - ->validUntil(now()->addWeek()) - ->make(); -``` - -
+- [Encrypted URLs](docs/encrypted_urls.md) ## 🏋️ Document Index Fields DTO showcase -
- Document Index Fields DTO showcase - -```php -CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO { - +name: "FIELD_TEXT" // string - +value: "Value" // null|string -} -``` - -```php -CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexNumericDTO { - +name: "FIELD_NUMERIC" // string - +value: 1 // null|int -} -``` - -```php -CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDecimalDTO { - +name: "FIELD_DECIMAL" // string - +value: 1.00 // null|int|float -} -``` - -```php -CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO { - +name: "FIELD_DATE" // string - +value: now(), // null|Carbon -} -``` - -```php -CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateTimeDTO { - +name: "FIELD_DATETIME" // string - +value: now(), // null|Carbon -} -``` - -```php -CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexKeywordDTO { - +name: "FIELD_KEYWORD" // string - +value: "Value" // null|string -} -``` - -```php -CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexMemoDTO { - +name: "FIELD_MEMO" // string - +value: "Value" // null|string -} -``` - -
- -## 🏋️ DTO Showcase -
- DTO Showcase - -```php -CodebarAg\DocuWare\DTO\OrganizationIndex { - +id: "2f071481-095d-4363-abd9-29ef845a8b05" // string - +name: "Fake File Cabinet" // string - +guid: "1334c006-f095-4ae7-892b-fe59282c8bed" // string|null -} -``` - -```php -CodebarAg\DocuWare\DTO\Organization { - +id: "2f071481-095d-4363-abd9-29ef845a8b05" // string - +name: "Fake File Cabinet" // string - +guid: "1334c006-f095-4ae7-892b-fe59282c8bed" // string|null - +additionalInfo: [] // array - +configurationRights: [] // array -} -``` - -```php -CodebarAg\DocuWare\DTO\FileCabinet { - +id: "2f071481-095d-4363-abd9-29ef845a8b05" // string - +name: "Fake File Cabinet" // string - +color: "Yellow" // string - +isBasket: true // bool - +assignedCabinet: "889c13cc-c636-4759-a704-1e6500d2d70f" // string -} -``` - -```php -CodebarAg\DocuWare\DTO\Dialog { - +id: "fae3b667-53e9-48dd-9004-34647a26112e" // string - +type: "ResultList" // string - +label: "Fake Dialog" // string - +isDefault: true // boolean - +fileCabinetId: "1334c006-f095-4ae7-892b-fe59282c8bed" // string -} -``` - -```php -CodebarAg\DocuWare\DTO\Field { - +name: "FAKE_FIELD" // string - +label: "Fake Field" // string - +type: "Memo" // string - +scope: "User" // string -``` - -```php -CodebarAg\DocuWare\DTO\Field { - +name: "FAKE_FIELD" // string - +label: "Fake Field" // string - +type: "Memo" // string - +scope: "User" // string -``` - -```php -CodebarAg\DocuWare\DTO\Document { - +id: 659732 // integer - +file_size: 765336 // integer - +total_pages: 100 // integer - +title: "Fake Title" // string - +extension: ".pdf" // string - +content_type: "application/pdf" // string - +file_cabinet_id: "a233b03d-dc63-42dd-b774-25b3ff77548f" // string - +created_at: Illuminate\Support\Carbon // Carbon - +updated_at: Illuminate\Support\Carbon // Carbon - +fields: Illuminate\Support\Collection { // Collection|DocumentField[] - #items: array:2 [ - 0 => CodebarAg\DocuWare\DTO\DocumentField // DocumentField - 1 => CodebarAg\DocuWare\DTO\DocumentField // DocumentField - ] - } -} -``` - -```php -CodebarAg\DocuWare\DTO\Section {#23784▶ - +id: "5589-5525" - +contentType: "text/plain" - +haveMorePages: true - +pageCount: 1 - +fileSize: 32 - +originalFileName: "example.txt" - +contentModified: "/Date(1702395557000)/" - +annotationsPreview: false - +hasTextAnnotations: null -} -``` - -```php -CodebarAg\DocuWare\DTO\DocumentThumbnail { - +mime: "image/png" // string - +data: "somedata" // string - +base64: "data:image/png;base64,WXpJNWRGcFhVbWhrUjBVOQ==" // string -} -``` - -```php -CodebarAg\DocuWare\DTO\TableRow { - +fields: Illuminate\Support\Collection { // Collection|DocumentField[] - #items: array:2 [ - 0 => CodebarAg\DocuWare\DTO\DocumentField // DocumentField - 1 => CodebarAg\DocuWare\DTO\DocumentField // DocumentField - ] -} -``` - -```php -CodebarAg\DocuWare\DTO\DocumentPaginator - +total: 39 // integer - +per_page: 10 // integer - +current_page: 9 // integer - +last_page: 15 // integer - +from: 1 // integer - +to: 10 // integer - +documents: Illuminate\Support\Collection { // Collection|Document[] - #items: array:2 [ - 0 => CodebarAg\DocuWare\DTO\Document // Document - 1 => CodebarAg\DocuWare\DTO\Document // Document - ] - } - +error: CodebarAg\DocuWare\DTO\ErrorBag { // ErrorBag|null - +code: 422 // int - +message: "'000' is not valid cabinet id" // string - } -} -``` - -
- +- [Document Index Fields DTO](docs/dto.md) ## 📦 Caching requests -
- Caching requests - -All Get Requests are cachable and will be cached by default. - -To determine if the response is cached you can use the following method: - -```php -$connector = new DocuWareConnector(); - -$response = $connector->send(new GetDocumentRequest($fileCabinetId, $documentId)); -$response->isCached(); // false - -// Next time the request is sent - -$response = $connector->send(new GetDocumentRequest($fileCabinetId, $documentId)); -$response->isCached(); // true -``` - -To invalidate the cache for a specific request you can use the following method: - -```php -$connector = new DocuWareConnector(); - -$request = new GetDocumentRequest($fileCabinetId, $documentId); -$request->invalidateCache(); - -$response = $connector->send($request); -``` - -To temporarily disable caching for a specific request you can use the following method: - -```php -$connector = new DocuWareConnector(); - -$request = new GetDocumentRequest($fileCabinetId, $documentId); -$request->disableCaching(); - -$response = $connector->send($request); -``` - -
+- [Caching Requests](docs/caching.md) ## 💥 Exceptions explained -
- Exceptions explained - -- `CodebarAg\DocuWare\Exceptions\UnableToMakeRequest` - -This is thrown if you are not authorized to make the request. - ---- - -- `CodebarAg\DocuWare\Exceptions\UnableToProcessRequest` - -This is thrown if you passed wrong attributes. For example a file cabinet ID -which does not exist. - ---- +- [Exceptions](docs/exceptions.md) -- `CodebarAg\DocuWare\Exceptions\UnableToLogin` - -This exception can only be thrown during the login if the credentials did not -match. - ---- - -- `CodebarAg\DocuWare\Exceptions\UnableToLoginNoCookies` - -This exception can only be thrown during the login if there was no cookies in -the response from the api. - ---- - -- `CodebarAg\DocuWare\Exceptions\UnableToFindPassphrase` - -This exception can only be thrown during the url making if the passphrase -could not be found. - ---- - -- `CodebarAg\DocuWare\Exceptions\UnableToMakeUrl` - -Something is wrong during the URL making. - ---- - -- `CodebarAg\DocuWare\Exceptions\UnableToUpdateFields` - -No fields were supplied. - ---- - -- `CodebarAg\DocuWare\Exceptions\UnableToGetDocumentCount` - -Something is wrong with the response from getting the document count. - ---- - -- `Illuminate\Http\Client\RequestException` - -All other cases if the response is not successfully. ## ✨ Events -Following events will be fired: +> The Following events will be fired: ```php use CodebarAg\DocuWare\Events\DocuWareResponseLog; @@ -1390,8 +308,6 @@ DocuWareResponseLog::class => [ ], ``` -
- ## 🔧 Configuration file You can publish the config file with: @@ -1482,30 +398,6 @@ return [ 'lifetime_in_seconds' => env('DOCUWARE_CACHE_LIFETIME_IN_SECONDS', 60), ], ], - - /* - |-------------------------------------------------------------------------- - | Tests - |-------------------------------------------------------------------------- - | - */ - 'tests' => [ - 'file_cabinet_id' => env('DOCUWARE_TESTS_FILE_CABINET_ID'), - 'dialog_id' => env('DOCUWARE_TESTS_DIALOG_ID'), - 'basket_id' => env('DOCUWARE_TESTS_BASKET_ID'), - 'section' => (int) env('DOCUWARE_TESTS_SECTION'), - 'organization_id' => env('DOCUWARE_TESTS_ORGANIZATION_ID'), - 'document_id' => (int) env('DOCUWARE_TESTS_DOCUMENT_ID'), - 'document_file_size_preview' => (int) env('DOCUWARE_TESTS_DOCUMENT_FILE_SIZE_PREVIEW'), - 'document_file_size' => (int) env('DOCUWARE_TESTS_DOCUMENT_FILE_SIZE'), - 'document_count' => (int) env('DOCUWARE_TESTS_DOCUMENT_COUNT'), - 'document_thumbnail_mime_type' => env('DOCUWARE_TESTS_DOCUMENT_THUMBNAIL_MIME_TYPE'), - 'document_thumbnail_file_size' => (int) env('DOCUWARE_TESTS_DOCUMENT_THUMBNAIL_FILE_SIZE'), - 'document_ids' => json_decode(env('DOCUWARE_TESTS_DOCUMENTS_IDS', '[]')), - 'documents_file_size' => (int) env('DOCUWARE_TESTS_DOCUMENTS_FILE_SIZE'), - 'field_name' => env('DOCUWARE_TESTS_FIELD_NAME'), - 'field_name_2' => env('DOCUWARE_TESTS_FIELD_NAME_2'), - ], ]; ``` From 991a1020bf9a0a19573a1e451711f733930bdc0e Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 18:06:12 +0100 Subject: [PATCH 06/13] WIP --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a03d5978..1b4dd11f 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,7 @@ DocuWare REST API. It is used to query the most common endpoints. [DocuWare REST API](https://developer.docuware.com/rest/index.html). See the documentation if you need further functionality. ⚠️ -## 💡 What is DocuWare? - -DocuWare provides cloud document management and workflow automation software -that enables you to digitize, secure and work with business documents, -then optimize the processes that power the core of your business. - +## Navigation * [💡 What is DocuWare?](#-what-is-docuware) * [🛠 Requirements](#-requirements) @@ -44,6 +39,12 @@ then optimize the processes that power the core of your business. * [🎭 License](#-license) +## 💡 What is DocuWare? + +DocuWare provides cloud document management and workflow automation software +that enables you to digitize, secure and work with business documents, +then optimize the processes that power the core of your business. + ## 🛠 Requirements
From 3e631c95d5892298dc24798a14c9fbc1579b3cab Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 20:49:14 +0100 Subject: [PATCH 07/13] WIP --- src/DocuWare.php | 14 ++++++++++++-- src/DocuWareUrl.php | 13 ++++++++----- src/Facades/DocuWare.php | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/DocuWare.php b/src/DocuWare.php index a96ff223..b4625b2e 100644 --- a/src/DocuWare.php +++ b/src/DocuWare.php @@ -38,8 +38,18 @@ public function searchRequestBuilder(): DocuWareSearchRequestBuilder return new DocuWareSearchRequestBuilder; } - public function url(null|ConfigWithCredentials|ConfigWithCredentialsTrustedUser $configuration = null): DocuWareUrl + public function url( + string $url, + string $username, + string $password, + string $passphrase + ): DocuWareUrl { - return new DocuWareUrl($configuration); + return new DocuWareUrl( + url: $url, + username: $username, + password: $password, + passphrase: $passphrase, + ); } } diff --git a/src/DocuWareUrl.php b/src/DocuWareUrl.php index 2a0c69f0..9350230b 100644 --- a/src/DocuWareUrl.php +++ b/src/DocuWareUrl.php @@ -21,7 +21,10 @@ class DocuWareUrl protected ?Carbon $validUntil = null; public function __construct( - public null|ConfigWithCredentials|ConfigWithCredentialsTrustedUser $configuration = null + public string $url, + public string $username, + public string $password, + public string $passphrase, ) {} public function fileCabinet(string $fileCabinetId): self @@ -58,8 +61,8 @@ public function make(): string $credentials = sprintf( 'User=%s\nPwd=%s', - $this->configuration->username ?? config('laravel-docuware.credentials.username'), - $this->configuration->password ?? config('laravel-docuware.credentials.password'), + $this->username, + $this->password, ); $lc = URL::formatWithBase64($credentials); @@ -85,7 +88,7 @@ public function make(): string } // Source: https://support.docuware.com/en-US/forums/help-with-technical-problems/ea9618df-c491-e911-80e7-0003ff59a7c6 - $key = utf8_encode($this->configuration->passphrase ?? config('laravel-docuware.passphrase')); + $key = utf8_encode($this->passphrase); $passphrase = hash('sha512', $key, true); $encryption_key = substr($passphrase, 0, 32); $iv = substr($passphrase, 32, 16); @@ -99,7 +102,7 @@ public function make(): string return sprintf( '%s/DocuWare/Platform/WebClient/Integration?ep=%s', - $this->configuration->url ?? config('laravel-docuware.credentials.url'), + $this->url, URL::format($encrypted), ); } diff --git a/src/Facades/DocuWare.php b/src/Facades/DocuWare.php index d517c8e5..425c696c 100644 --- a/src/Facades/DocuWare.php +++ b/src/Facades/DocuWare.php @@ -41,7 +41,7 @@ * @method static int documentCount(string $fileCabinetId, string $dialogId) * @method static void deleteDocument(string $fileCabinetId, int $documentId) * @method static DocuWareSearchRequestBuilder search() - * @method static DocuWareUrl url(null|ConfigWithCredentials|ConfigWithCredentialsTrustedUser $configuration = null) + * @method static DocuWareUrl url(string $url, string $username, string $password, string $passphrase) */ class DocuWare extends Facade { From fb90922fd28a14b6b260255426787d6882a4de58 Mon Sep 17 00:00:00 2001 From: RhysLees Date: Thu, 1 Aug 2024 19:49:36 +0000 Subject: [PATCH 08/13] Fix styling --- src/DocuWare.php | 5 +---- src/DocuWareUrl.php | 2 -- src/Facades/DocuWare.php | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/DocuWare.php b/src/DocuWare.php index b4625b2e..a50c6aa0 100644 --- a/src/DocuWare.php +++ b/src/DocuWare.php @@ -3,8 +3,6 @@ namespace CodebarAg\DocuWare; use CodebarAg\DocuWare\DTO\Authentication\OAuth\RequestToken as RequestTokenDto; -use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentials; -use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentialsTrustedUser; use CodebarAg\DocuWare\Requests\Authentication\OAuth\GetIdentityServiceConfiguration; use CodebarAg\DocuWare\Requests\Authentication\OAuth\GetResponsibleIdentityService; use CodebarAg\DocuWare\Requests\Authentication\OAuth\RequestTokenWithCredentials; @@ -43,8 +41,7 @@ public function url( string $username, string $password, string $passphrase - ): DocuWareUrl - { + ): DocuWareUrl { return new DocuWareUrl( url: $url, username: $username, diff --git a/src/DocuWareUrl.php b/src/DocuWareUrl.php index 9350230b..18dc6347 100644 --- a/src/DocuWareUrl.php +++ b/src/DocuWareUrl.php @@ -3,8 +3,6 @@ namespace CodebarAg\DocuWare; use Carbon\Carbon; -use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentials; -use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentialsTrustedUser; use CodebarAg\DocuWare\Exceptions\UnableToMakeUrl; use CodebarAg\DocuWare\Support\EnsureValidCredentials; use CodebarAg\DocuWare\Support\EnsureValidPassphrase; diff --git a/src/Facades/DocuWare.php b/src/Facades/DocuWare.php index 425c696c..6955c4a2 100644 --- a/src/Facades/DocuWare.php +++ b/src/Facades/DocuWare.php @@ -5,8 +5,6 @@ use Carbon\Carbon; use CodebarAg\DocuWare\DocuWareSearchRequestBuilder; use CodebarAg\DocuWare\DocuWareUrl; -use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentials; -use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentialsTrustedUser; use CodebarAg\DocuWare\DTO\Cookie; use CodebarAg\DocuWare\DTO\Documents\Document; use CodebarAg\DocuWare\DTO\Documents\DocumentThumbnail; From eb3c3feaa31ca1f3a0b3099f351228ab92bd5e16 Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 20:53:51 +0100 Subject: [PATCH 09/13] WIP --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2a6a14c4..329956e9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ build composer.lock coverage -docs phpunit.xml phpstan.neon testbench.yaml From 714c81e82f20d2dedeaa02c74bbc431185801d04 Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 20:53:57 +0100 Subject: [PATCH 10/13] WIP --- docs/Documents/annotations-stamps.md | 14 ++ docs/Documents/application_properties.md | 67 +++++++ .../clip-unclicp_and_staple-unstaple.md | 53 ++++++ docs/Documents/documents-trash-bin.md | 34 ++++ docs/Documents/download.md | 37 ++++ docs/Documents/modify_documents.md | 29 +++ docs/Documents/sections.md | 37 ++++ docs/Documents/update_index_values.md | 59 ++++++ .../batch_index_fields_update.md | 15 ++ docs/File Cabinets/check-in_check-out.md | 8 + docs/File Cabinets/dialogs.md | 30 +++ docs/File Cabinets/general.md | 23 +++ docs/File Cabinets/search.md | 170 +++++++++++++++++ docs/File Cabinets/select_lists.md | 15 ++ docs/File Cabinets/upload.md | 89 +++++++++ .../User Management/create-update_users.md | 28 +++ .../User Management/get-modify_groups.md | 42 +++++ .../User Management/get-modify_roles.md | 42 +++++ docs/General/User Management/get_users.md | 36 ++++ docs/General/organization.md | 22 +++ docs/caching.md | 39 ++++ docs/dto.md | 177 ++++++++++++++++++ docs/encrypted_urls.md | 36 ++++ docs/exceptions.md | 57 ++++++ docs/workflow.md | 25 +++ 25 files changed, 1184 insertions(+) create mode 100644 docs/Documents/annotations-stamps.md create mode 100644 docs/Documents/application_properties.md create mode 100644 docs/Documents/clip-unclicp_and_staple-unstaple.md create mode 100644 docs/Documents/documents-trash-bin.md create mode 100644 docs/Documents/download.md create mode 100644 docs/Documents/modify_documents.md create mode 100644 docs/Documents/sections.md create mode 100644 docs/Documents/update_index_values.md create mode 100644 docs/File Cabinets/batch_index_fields_update.md create mode 100644 docs/File Cabinets/check-in_check-out.md create mode 100644 docs/File Cabinets/dialogs.md create mode 100644 docs/File Cabinets/general.md create mode 100644 docs/File Cabinets/search.md create mode 100644 docs/File Cabinets/select_lists.md create mode 100644 docs/File Cabinets/upload.md create mode 100644 docs/General/User Management/create-update_users.md create mode 100644 docs/General/User Management/get-modify_groups.md create mode 100644 docs/General/User Management/get-modify_roles.md create mode 100644 docs/General/User Management/get_users.md create mode 100644 docs/General/organization.md create mode 100644 docs/caching.md create mode 100644 docs/dto.md create mode 100644 docs/encrypted_urls.md create mode 100644 docs/exceptions.md create mode 100644 docs/workflow.md diff --git a/docs/Documents/annotations-stamps.md b/docs/Documents/annotations-stamps.md new file mode 100644 index 00000000..c4c65412 --- /dev/null +++ b/docs/Documents/annotations-stamps.md @@ -0,0 +1,14 @@ +# Annotations/Stamps +| Request | Supported | +|----------------------------|-----------| +| AddStampWithPosition | 🕣 | +| AddStampWithBestPosition | 🕣 | +| AddTextAnnotation | 🕣 | +| AddRectEntryAnnotation | 🕣 | +| AddLineEntryAnnotation | 🕣 | +| AddPolyLineEntryAnnotation | ❌ | +| DeleteAnnotation | ❌ | +| UpdateTextAnnotation | 🕣 | +| Get Stamps | ❌ | + +> Not Currently Supported diff --git a/docs/Documents/application_properties.md b/docs/Documents/application_properties.md new file mode 100644 index 00000000..4e3932b3 --- /dev/null +++ b/docs/Documents/application_properties.md @@ -0,0 +1,67 @@ +# Application Properties +| Request | Supported | +|-------------------------------|-----------| +| Get Application Properties | ✅ | +| Add Application Properties | ✅ | +| Delete Application Properties | ✅ | +| Update Application Properties | ✅ | + + +### Add Application Properties +```php +use CodebarAg\DocuWare\Requests\Documents\ApplicationProperties\AddApplicationProperties; + +$addProperties = $connector->send(new AddApplicationProperties( + $fileCabinetId, + $documentId, + [ + [ + 'Name' => 'Key1', + 'Value' => 'Key1 Value', + ], + [ + 'Name' => 'Key2', + 'Value' => 'Key2 Value', + ], + ], +))->dto(); +``` + +### Update Application Properties +```php +use CodebarAg\DocuWare\Requests\Documents\ApplicationProperties\UpdateApplicationProperties; + +$updateProperties = $connector->send(new UpdateApplicationProperties( + $fileCabinetId, + $documentId, + [ + [ + 'Name' => 'Key1', + 'Value' => 'Key1 Value Updated', + ], + ], +))->dto()->sortBy('Name'); +``` + +### Delete Application Properties +```php +use CodebarAg\DocuWare\Requests\Documents\ApplicationProperties\DeleteApplicationProperties; + +$deleteProperties = $connector->send(new DeleteApplicationProperties( + $fileCabinetId, + $document->id, + [ + 'Key1', + ], +))->dto(); +``` + +### Get Application Properties +```php +use CodebarAg\DocuWare\Requests\Documents\ApplicationProperties\GetApplicationProperties; + +$properties = $connector->send(new GetApplicationProperties( + $fileCabinetId, + $document->id, +))->dto(); +``` diff --git a/docs/Documents/clip-unclicp_and_staple-unstaple.md b/docs/Documents/clip-unclicp_and_staple-unstaple.md new file mode 100644 index 00000000..35f6c72b --- /dev/null +++ b/docs/Documents/clip-unclicp_and_staple-unstaple.md @@ -0,0 +1,53 @@ +# Clip/Unclip & Staple/Unstaple +| Request | Supported | +|----------|-----------| +| Clip | ✅ | +| Unclip | ✅ | +| Staple | ✅ | +| Unstaple | ✅ | + +### Clip +```php +use CodebarAg\DocuWare\Requests\Documents\ClipUnclipStapleUnstaple\Clip; + +$clip = $connector->send(new Clip( + $fileCabinetId, + [ + $documentId, + $document2Id, + ] +))->dto(); +``` + +### Unclip +```php +use CodebarAg\DocuWare\Requests\Documents\ClipUnclipStapleUnstaple\Unclip; + +$unclip = $connector->send(new Unclip( + $fileCabinetId, + $clipId +))->dto(); +``` + +### Staple +```php +use CodebarAg\DocuWare\Requests\Documents\ClipUnclipStapleUnstaple\Staple; + +$staple = $connector->send(new Staple( + $fileCabinetId, + [ + $documentId, + $document2Id, + ] +))->dto(); +``` + +### Unstaple +```php +use CodebarAg\DocuWare\Requests\Documents\ClipUnclipStapleUnstaple\Unstaple; + +$unclip = $connector->send(new Unstaple( + $fileCabinetId, + $stapleId +))->dto(); +``` diff --git a/docs/Documents/documents-trash-bin.md b/docs/Documents/documents-trash-bin.md new file mode 100644 index 00000000..6da7ded8 --- /dev/null +++ b/docs/Documents/documents-trash-bin.md @@ -0,0 +1,34 @@ +# Documents Trash Bin +| Request | Supported | +|-------------------|-----------| +| Get Documents | ✅ | +| Delete Documents | ✅ | +| Restore Documents | ✅ | + + +### Get Documents +> You can use the same methods as in the search usage. The only difference is that you have to use the `trashBin` method after the `searchRequestBuilder` method. +```php + + +```php +use CodebarAg\DocuWare\DocuWare; + +$paginatorRequest = (new DocuWare()) + ->searchRequestBuilder() + ->trashBin() +``` + +#### Delete Documents +```php +use CodebarAg\DocuWare\Requests\Documents\DocumentsTrashBin\DeleteDocuments; + +$delete = $connector->send(new DeleteDocuments([$documentID, $document2ID]))->dto(); +``` + +#### Restore Documents +```php +use CodebarAg\DocuWare\Requests\Documents\DocumentsTrashBin\RestoreDocuments; + +$delete = $connector->send(new RestoreDocuments([$documentID, $document2ID]))->dto(); +``` diff --git a/docs/Documents/download.md b/docs/Documents/download.md new file mode 100644 index 00000000..0aa8d5a5 --- /dev/null +++ b/docs/Documents/download.md @@ -0,0 +1,37 @@ +# Download +| Request | Supported | +|--------------------|-----------| +| Download Document | ✅ | +| Download Section | ✅ | +| Download Thumbnail | ✅ | + + +### Download Document +```php +use CodebarAg\DocuWare\Requests\Documents\Download\DownloadDocument; + +$contents = $connector->send(new DownloadDocument( + $fileCabinetId, + $documentId +))->dto(); +``` + +### Download Section +```php +use CodebarAg\DocuWare\Requests\Documents\Download\DownloadSection; + +$contents = $connector->send(new DownloadSection( + $fileCabinetId, + $sectionId +))->dto(); +``` + +### Download Thumbnail +```php +use CodebarAg\DocuWare\Requests\Documents\Download\DownloadThumbnail; + +$contents = $connector->send(new DownloadThumbnail( + $fileCabinetId, + $sectionId +))->dto(); +``` diff --git a/docs/Documents/modify_documents.md b/docs/Documents/modify_documents.md new file mode 100644 index 00000000..9a97c8e4 --- /dev/null +++ b/docs/Documents/modify_documents.md @@ -0,0 +1,29 @@ +# Modify Documents +| Request | Supported | +|-------------------|-----------| +| Transfer Document | ✅ | +| Delete Document | ✅ | + + +### Transfer Document +```php +use CodebarAg\DocuWare\Requests\Documents\ModifyDocuments\TransferDocument; + +$response = $connector->send(new TransferDocument( + $fileCabinetId, + $destinationFileCabinetId, + $storeDialogId, + $documentId, + $fields, +))->dto(); +``` + +### Delete Documents +```php +use CodebarAg\DocuWare\Requests\Documents\ModifyDocuments\DeleteDocument; + +$connector->send(new DeleteDocument( + $fileCabinetId + $documentId, +))->dto(); +``` diff --git a/docs/Documents/sections.md b/docs/Documents/sections.md new file mode 100644 index 00000000..52ca679f --- /dev/null +++ b/docs/Documents/sections.md @@ -0,0 +1,37 @@ +# Sections +| Request | Supported | +|----------------------------------|-----------| +| Get All Sections from a Document | ✅ | +| Get a Specific Section | ✅ | +| Delete Section | ✅ | + + +### Get All Sections +```php +use CodebarAg\DocuWare\Requests\Documents\Sections\GetAllSectionsFromADocument; + +$sections = $connector->send(new GetAllSectionsFromADocument( + $fileCabinetId, + $documentId +))->dto(); +``` + +### Get Specific Section +```php +use CodebarAg\DocuWare\Requests\Documents\Sections\GetASpecificSection; + +$section = $connector->send(new GetASpecificSection( + $fileCabinetId, + $sectionsId +))->dto(); +``` + +### Delete Section +```php +use CodebarAg\DocuWare\Requests\Documents\Sections\DeleteSection; + +$deleted = $connector->send(new DeleteSection( + $fileCabinetId, + $sectionId +))->dto(); +``` diff --git a/docs/Documents/update_index_values.md b/docs/Documents/update_index_values.md new file mode 100644 index 00000000..1e4b2e04 --- /dev/null +++ b/docs/Documents/update_index_values.md @@ -0,0 +1,59 @@ +# Update Index Values +| Request | Supported | +|---------------------------|-----------| +| Update Index Values | ✅ | +| Update Table Index Values | ✅ | +| Update Table Field Values | ❌ | + + +### Update Index Values +```php +use CodebarAg\DocuWare\Requests\Documents\UpdateIndexValues\UpdateIndexValues; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO; + +$response = $connector->send(new UpdateIndexValues( + $fileCabinetId, + $documentId, + collect([ + IndexTextDTO::make('DOCUMENT_LABEL', '::new-data-entry::'), + ]) +))->dto(); +``` + +### Update Table Data Record +```php +use CodebarAg\DocuWare\Requests\Documents\UpdateIndexValues\UpdateIndexValues; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateTimeDTO; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDecimalDTO; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexNumericDTO; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTableDTO; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO; + +$tableRows = collect([ + collect([ + IndexTextDTO::make('TEXT', 'project_1'), + IndexNumericDTO::make('INT', 1), + IndexDecimalDTO::make('DECIMAL', 1.1), + IndexDateDTO::make('DATE', $now), + IndexDateTimeDTO::make('DATETIME', $now), + ]), + collect([ + IndexTextDTO::make('TEXT', 'project_2'), + IndexNumericDTO::make('INT', 2), + IndexDecimalDTO::make('DECIMAL', 2.2), + IndexDateDTO::make('DATE', $now), + IndexDateTimeDTO::make('DATETIME', $now), + ]), +]); + + +$document = $connector->send(new UpdateIndexValues( + $fileCabinetId, + null, + null, + collect([ + IndexTableDTO::make('TABLE_NAME', $tableRows) + ]), +))->dto(); +``` diff --git a/docs/File Cabinets/batch_index_fields_update.md b/docs/File Cabinets/batch_index_fields_update.md new file mode 100644 index 00000000..3bad9bb3 --- /dev/null +++ b/docs/File Cabinets/batch_index_fields_update.md @@ -0,0 +1,15 @@ +# General +| Request | Supported | +|------------------------------------------|-----------| +| Batch Update Index Fields By Id | ❌ | +| Batch Update Index Fields By Search | ❌ | +| Batch Append/Update Keyword Fields By Id | ❌ | + +> Not Currently Supported + +#### Get Fields +```php +use CodebarAg\DocuWare\Requests\Fields\GetFieldsRequest; + +$fields = $connector->send(new GetFieldsRequest($fileCabinetId))->dto(); +``` diff --git a/docs/File Cabinets/check-in_check-out.md b/docs/File Cabinets/check-in_check-out.md new file mode 100644 index 00000000..0ecfcf52 --- /dev/null +++ b/docs/File Cabinets/check-in_check-out.md @@ -0,0 +1,8 @@ +# General +| Request | Supported | +|-------------------------------------------------------------|-----------| +| Check-out & Download a Document | 🕣 | +| Check-in a Document from the File System | 🕣 | +| Undo Check-out | 🕣 | + +> Not Currently Supported diff --git a/docs/File Cabinets/dialogs.md b/docs/File Cabinets/dialogs.md new file mode 100644 index 00000000..e187242b --- /dev/null +++ b/docs/File Cabinets/dialogs.md @@ -0,0 +1,30 @@ +# Dialogs + +| Request | Supported | +|--------------------------------|-----------| +| Get All Dialogs | ✅ | +| Get a Specific Dialog | ✅ | +| Get Dialogs of a Specific Type | ✅ | + +### Get All Dialogs +```php +use CodebarAg\DocuWare\Requests\FileCabinets\Dialogs\GetAllDialogs; + +$dialogs = $connector->send(new GetAllDialogs($fileCabinetId))->dto(); +``` + +### Get Dialogs of a Specific Type +```php +use CodebarAg\DocuWare\Requests\FileCabinets\Dialogs\GetASpecificDialog; + +$dialog = $connector->send(new GetASpecificDialog($fileCabinetId, $dialogId))->dto(); +``` + +### Get Dialogs Of A Specific Type +```php +use CodebarAg\DocuWare\Enums\DialogType; +use CodebarAg\DocuWare\Requests\FileCabinets\Dialogs\GetDialogsOfASpecificType; + +$dialogs = $connector->send(new GetDialogsOfASpecificType($fileCabinetId, DialogType::SEARCH))->dto(); +``` + diff --git a/docs/File Cabinets/general.md b/docs/File Cabinets/general.md new file mode 100644 index 00000000..0e0dd07b --- /dev/null +++ b/docs/File Cabinets/general.md @@ -0,0 +1,23 @@ +# General + +| Request | Supported | +|-------------------------------|-----------| +| Get File Cabinet Information | ✅ | +| Get Total Number of Documents | ✅ | + +### Get File Cabinet Information +```php +use CodebarAg\DocuWare\Requests\FileCabinets\General\GetFileCabinetInformation; + +$fileCabinet = $connector->send(new GetFileCabinetInformation($fileCabinetId))->dto(); +``` + +### Get Total Number Of Documents +```php +use CodebarAg\DocuWare\Requests\FileCabinets\General\GetTotalNumberOfDocuments; + +$count = $connector->send(new GetTotalNumberOfDocuments( + $fileCabinetId, + $dialogId +))->dto(); +``` diff --git a/docs/File Cabinets/search.md b/docs/File Cabinets/search.md new file mode 100644 index 00000000..8f4e8e08 --- /dev/null +++ b/docs/File Cabinets/search.md @@ -0,0 +1,170 @@ +# Search + +| Description | Implemented | +|------------------------------------------------|-------------| +| Get Documents from a File Cabinet | ✅ | +| Get a Specific Document From a File Cabinet | ✅ | +| Search for Documents in a Single File Cabinet | ✅ | +| Search for Documents in Multiple File Cabinets | ✅ | + +#### Get A Specific Document From A File Cabinet +```php +use CodebarAg\DocuWare\Requests\FileCabinets\Search\GetASpecificDocumentFromAFileCabinet; + +$document = $connector->send(new GetASpecificDocumentFromAFileCabinet( + $fileCabinetId, + $documentId +))->dto(); +``` + +#### Get Documents From A File Cabinet +```php +use CodebarAg\DocuWare\Requests\FileCabinets\Search\GetDocumentsFromAFileCabinet; + +$documents = $connector->send(new GetDocumentsFromAFileCabinet( + $fileCabinetId +))->dto(); +``` + +### Most basic example to search for documents. +> You only need to provide a valid file cabinet id. +```php +$fileCabinetId = '87356f8d-e50c-450b-909c-4eaccd318fbf'; + +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinet($fileCabinetId) + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` + +### Search in multiple file cabinets +> Provide an array of file cabinet ids. +```php +$fileCabinetIds = [ + '0ee72de3-4258-4353-8020-6a3ff6dd650f', + '3f9cb4ff-82f2-44dc-b439-dd648269064f', +]; + +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinets($fileCabinetIds) + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` + +### Find results on the next page +> Default: 1 +```php +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinet($id) + ->page(2) + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` + +### Define the number of results which should be shown per page +> Default: 50 +```php +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinet($id) + ->perPage(30) + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` + +### Use the full-text search +> You have to activate full-text search in your file cabinet before you can use this feature. +```php +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinet($id) + ->fulltext('My secret document') + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` + +### Search documents which are created from the first of march. +```php +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinet($id) + ->filterDate('DWSTOREDATETIME', '>=', Carbon::create(2021, 3, 1)) + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` + +### Search documents which are created until the first of april. +```php +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinet($id) + ->filterDate('DWSTOREDATETIME', '<', Carbon::create(2021, 4, 1)) + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` + +### Order the results by field name. +> Supported values: 'asc', 'desc' +```php +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinet($id) + ->orderBy('DWSTOREDATETIME', 'desc') + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` + +### Search documents filtered to the value. +> You can specify multiple filters. +```php +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinet($id) + ->filter('TYPE', 'Order') + ->filter('OTHER_FIELD', 'other') + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` + +### Search documents filtered to multiple values. +```php +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinet($id) + ->filterIn('TYPE', ['Order', 'Invoice']) + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` + +### You can specify the dialog which should be used. +```php +$dialogId = 'bb42c30a-89fc-4b81-9091-d7e326caba62'; + +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinet($id) + ->dialog($dialogId) + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` + +### You can also combine everything. +```php +$paginatorRequest = DocuWare::searchRequestBuilder() + ->fileCabinet($id) + ->page(2) + ->perPage(30) + ->fulltext('My secret document') + ->filterDate('DWSTOREDATETIME', '>=', Carbon::create(2021, 3, 1)) + ->filterDate('DWSTOREDATETIME','<',Carbon::create(2021, 4, 1)) + ->filter('TYPE', 'Order') + ->filter('OTHER_FIELD', 'other') + ->orderBy('DWSTOREDATETIME', 'desc') + ->dialog($dialogId) + ->get(); + +$paginator = $connector->send($paginatorRequest)->dto(); +``` diff --git a/docs/File Cabinets/select_lists.md b/docs/File Cabinets/select_lists.md new file mode 100644 index 00000000..7be7749f --- /dev/null +++ b/docs/File Cabinets/select_lists.md @@ -0,0 +1,15 @@ +# General +| Request | Supported | +|----------------------------------------------|-----------| +| Get Select Lists & Get Filtered Select Lists | ✅ | + +### Get Select Lists +```php +use CodebarAg\DocuWare\Requests\FileCabinets\SelectLists\GetSelectLists; + +$types = $this->connector->send(new GetSelectLists( + $fileCabinetId, + $dialogId, + $fieldName, +))->dto(); +``` diff --git a/docs/File Cabinets/upload.md b/docs/File Cabinets/upload.md new file mode 100644 index 00000000..29c9e570 --- /dev/null +++ b/docs/File Cabinets/upload.md @@ -0,0 +1,89 @@ +# General +| Request | Supported | +|-----------------------------------------------------|-----------| +| Create Data Record | ✅ | +| Append File(s) to a Data Record | ✅ | +| Upload a Single File for a Data Record | ❌ | +| Create a Data Record & Upload File | ❌ | +| Create Data Record & Upload File Using Store Dialog | ❌ | +| Append a Single PDF to a Document | ❌ | +| Replace a PDF Document Section | ❌ | + +### Create Data Record + +#### Create Data Record +```php +use CodebarAg\DocuWare\Requests\FileCabinets\Upload\CreateDataRecord; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO; + +$document = $connector->send(new CreateDataRecord( + $fileCabinetId, + null, + null, + collect([ + IndexTextDTO::make('DOCUMENT_LABEL', '::data-entry::'), + ]), +))->dto(); +``` + +#### Create Table Data Record +```php +use CodebarAg\DocuWare\Requests\FileCabinets\Upload\CreateDataRecord; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateTimeDTO; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDecimalDTO; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexNumericDTO; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTableDTO; +use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO; + +$tableRows = collect([ + collect([ + IndexTextDTO::make('TEXT', 'project_1'), + IndexNumericDTO::make('INT', 1), + IndexDecimalDTO::make('DECIMAL', 1.1), + IndexDateDTO::make('DATE', $now), + IndexDateTimeDTO::make('DATETIME', $now), + ]), + collect([ + IndexTextDTO::make('TEXT', 'project_2'), + IndexNumericDTO::make('INT', 2), + IndexDecimalDTO::make('DECIMAL', 2.2), + IndexDateDTO::make('DATE', $now), + IndexDateTimeDTO::make('DATETIME', $now), + ]), +]); + + +$document = $connector->send(new CreateDataRecord( + $fileCabinetId, + null, + null, + collect([ + IndexTableDTO::make('TABLE_NAME', $tableRows) + ]), +))->dto(); +``` + +#### Append File(s) To A Data Record +```php +use CodebarAg\DocuWare\Requests\FileCabinets\Upload\AppendFilesToADataRecord; + +$response = $connector->send( + new AppendFilesToADataRecord( + fileCabinetId: $fileCabinetId, + dataRecordId: $document->id, + files: collect([ + new MultipartValue( + name: 'File[]', + value: file_get_contents(__DIR__.'/../../../../Fixtures/files/test-2.pdf'), + filename: 'test-2.pdf', + ), + new MultipartValue( + name: 'File[]', + value: file_get_contents(__DIR__.'/../../../../Fixtures/files/test-3.pdf'), + filename: 'test-3.pdf', + ), + ]) + ) +)->dto(); +``` diff --git a/docs/General/User Management/create-update_users.md b/docs/General/User Management/create-update_users.md new file mode 100644 index 00000000..082ca02b --- /dev/null +++ b/docs/General/User Management/create-update_users.md @@ -0,0 +1,28 @@ +# Create/Update Users + +| Request | Supported | +|-------------|-----------| +| Create User | ✅ | +| Update User | ✅ | + +### Create User +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\CreateUpdateUsers\CreateUser; + +$user = $connector->send(new CreateUser(new User( + name: $timestamp.' - Test User', + dbName: $timestamp, + email: $timestamp.'-test@example.test', + password: 'TESTPASSWORD', +)))->dto(); +``` + +### Update User +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\CreateUpdateUsers\UpdateUser; + +$user->name .= ' - Updated'; +$user->active = false; + +$user = $connector->send(new UpdateUser($user))->dto(); +``` diff --git a/docs/General/User Management/get-modify_groups.md b/docs/General/User Management/get-modify_groups.md new file mode 100644 index 00000000..6d1f108b --- /dev/null +++ b/docs/General/User Management/get-modify_groups.md @@ -0,0 +1,42 @@ +# Get/Modify Groups + +| Request | Supported | +|------------------------------------|-----------| +| Get Groups | ✅ | +| Get All Groups for a Specific User | ✅ | +| Add User to a Group | ✅ | +| Remove User from a Group | ✅ | + +### Get Groups +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyGroups\GetGroups; + +$groups = $connector->send(new GetGroups())->dto(); +``` + +### Get All Groups For A Specific User +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyGroups\GetAllGroupsForASpecificUser; + +$groups = $connector->send(new GetAllGroupsForASpecificUser($userId))->dto(); +``` + +### Add User To A Group +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyGroups\AddUserToAGroup; + +$response = $connector->send(new AddUserToAGroup( + userId: $userId, + ids: [$groupId], +))->dto(); +``` + +### Remove User From A Group +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyGroups\RemoveUserFromAGroup; + +$response = $connector->send(new RemoveUserFromAGroup( + userId: $userId, + ids: [$groupId], +))->dto(); +``` diff --git a/docs/General/User Management/get-modify_roles.md b/docs/General/User Management/get-modify_roles.md new file mode 100644 index 00000000..6802cafd --- /dev/null +++ b/docs/General/User Management/get-modify_roles.md @@ -0,0 +1,42 @@ +# Get/Modify Roles + +| Request | Supported | +|-----------------------------------|-----------| +| Get Roles | ✅ | +| Get All Roles for a Specific User | ✅ | +| Add User to a Role | ✅ | +| Remove User from a Role | ✅ | + +### Get Roles +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyRoles\GetRoles; + +$roles = $this->connector->send(new GetRoles())->dto(); +``` + +### Get All Roles For A Specific User +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyRoles\GetAllRolesForASpecificUser; + +$roles = $connector->send(new GetAllRolesForASpecificUser($userId))->dto(); +``` + +### Add User To A Role +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyRoles\AddUserToARole; + +$response = $connector->send(new AddUserToARole( + userId: $userId, + ids: [$roleId], +))->dto(); +``` + +### Remove User From A Role +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetModifyRoles\RemoveUserFromARole; + +$response = $connector->send(new RemoveUserFromARole( + userId: $userId, + ids: [$roleId], +))->dto(); +``` diff --git a/docs/General/User Management/get_users.md b/docs/General/User Management/get_users.md new file mode 100644 index 00000000..ba2771d6 --- /dev/null +++ b/docs/General/User Management/get_users.md @@ -0,0 +1,36 @@ +# Get Users + +| Request | Supported | +|----------------------|-----------| +| Get Users | ✅ | +| Get Users by ID | ✅ | +| Get Users of a Role | ✅ | +| Get Users of a Group | ✅ | + +### Get Users +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetUsers\GetUsers; + +$users = $this->connector->send(new GetUsers())->dto(); +``` + +### Get User By Id +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetUsers\GetUserById; + +$user = $this->connector->send(new GetUserById($userId))->dto(); +``` + +### Get Users Of A Role +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetUsers\GetUsersOfARole; + +$users = $this->connector->send(new GetUsersOfARole($roleId))->dto(); +``` + +### Get Users Of A Group +```php +use CodebarAg\DocuWare\Requests\General\UserManagement\GetUsers\GetUsersOfAGroup; + +$users = $this->connector->send(new GetUsersOfAGroup($groupId))->dto(); +``` diff --git a/docs/General/organization.md b/docs/General/organization.md new file mode 100644 index 00000000..e4b11b9c --- /dev/null +++ b/docs/General/organization.md @@ -0,0 +1,22 @@ +# Organization + +| Request | Supported | +|-------------------------------------------------------------|-----------| +| Get Login Token | ✅ | +| Get Organization | ✅ | +| Get All File Cabinets and Document Trays | ✅ | + + +### Get Organization +```php +use CodebarAg\DocuWare\Requests\General\Organization\GetOrganization; + +$organizations = $this->connector->send(new GetOrganization())->dto(); +``` + +### Get All File Cabinets And Document Trays +```php +use CodebarAg\DocuWare\Requests\General\Organization\GetAllFileCabinetsAndDocumentTrays; + +$cabinetsAndTrays = $this->connector->send(new GetAllFileCabinetsAndDocumentTrays())->dto(); +``` diff --git a/docs/caching.md b/docs/caching.md new file mode 100644 index 00000000..a40aca24 --- /dev/null +++ b/docs/caching.md @@ -0,0 +1,39 @@ +# Caching + +> All Get Requests are cachable and will be cached by default. To determine if the response is cached you can use the following method: + +### Is Cached +```php +$connector = new DocuWareConnector(); + +$response = $connector->send(new GetDocumentRequest($fileCabinetId, $documentId)); +$response->isCached(); // false + +// Next time the request is sent + +$response = $connector->send(new GetDocumentRequest($fileCabinetId, $documentId)); +$response->isCached(); // true +``` + + +### Invalidate Cache +> To invalidate the cache for a specific request you can use the following method: +```php +$connector = new DocuWareConnector(); + +$request = new GetDocumentRequest($fileCabinetId, $documentId); +$request->invalidateCache(); + +$response = $connector->send($request); +``` + +### Disable Caching +> To temporarily disable caching for a specific request you can use the following method: +```php +$connector = new DocuWareConnector(); + +$request = new GetDocumentRequest($fileCabinetId, $documentId); +$request->disableCaching(); + +$response = $connector->send($request); +``` diff --git a/docs/dto.md b/docs/dto.md new file mode 100644 index 00000000..49eb1902 --- /dev/null +++ b/docs/dto.md @@ -0,0 +1,177 @@ +# DTO + +```php +CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO { + +name: "FIELD_TEXT" // string + +value: "Value" // null|string +} +``` + +```php +CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexNumericDTO { + +name: "FIELD_NUMERIC" // string + +value: 1 // null|int +} +``` + +```php +CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDecimalDTO { + +name: "FIELD_DECIMAL" // string + +value: 1.00 // null|int|float +} +``` + +```php +CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO { + +name: "FIELD_DATE" // string + +value: now(), // null|Carbon +} +``` + +```php +CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateTimeDTO { + +name: "FIELD_DATETIME" // string + +value: now(), // null|Carbon +} +``` + +```php +CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexKeywordDTO { + +name: "FIELD_KEYWORD" // string + +value: "Value" // null|string +} +``` + +```php +CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexMemoDTO { + +name: "FIELD_MEMO" // string + +value: "Value" // null|string +} +``` + +```php +CodebarAg\DocuWare\DTO\OrganizationIndex { + +id: "2f071481-095d-4363-abd9-29ef845a8b05" // string + +name: "Fake File Cabinet" // string + +guid: "1334c006-f095-4ae7-892b-fe59282c8bed" // string|null +} +``` + +```php +CodebarAg\DocuWare\DTO\Organization { + +id: "2f071481-095d-4363-abd9-29ef845a8b05" // string + +name: "Fake File Cabinet" // string + +guid: "1334c006-f095-4ae7-892b-fe59282c8bed" // string|null + +additionalInfo: [] // array + +configurationRights: [] // array +} +``` + +```php +CodebarAg\DocuWare\DTO\FileCabinet { + +id: "2f071481-095d-4363-abd9-29ef845a8b05" // string + +name: "Fake File Cabinet" // string + +color: "Yellow" // string + +isBasket: true // bool + +assignedCabinet: "889c13cc-c636-4759-a704-1e6500d2d70f" // string +} +``` + +```php +CodebarAg\DocuWare\DTO\Dialog { + +id: "fae3b667-53e9-48dd-9004-34647a26112e" // string + +type: "ResultList" // string + +label: "Fake Dialog" // string + +isDefault: true // boolean + +fileCabinetId: "1334c006-f095-4ae7-892b-fe59282c8bed" // string +} +``` + +```php +CodebarAg\DocuWare\DTO\Field { + +name: "FAKE_FIELD" // string + +label: "Fake Field" // string + +type: "Memo" // string + +scope: "User" // string +``` + +```php +CodebarAg\DocuWare\DTO\Field { + +name: "FAKE_FIELD" // string + +label: "Fake Field" // string + +type: "Memo" // string + +scope: "User" // string +``` + +```php +CodebarAg\DocuWare\DTO\Document { + +id: 659732 // integer + +file_size: 765336 // integer + +total_pages: 100 // integer + +title: "Fake Title" // string + +extension: ".pdf" // string + +content_type: "application/pdf" // string + +file_cabinet_id: "a233b03d-dc63-42dd-b774-25b3ff77548f" // string + +created_at: Illuminate\Support\Carbon // Carbon + +updated_at: Illuminate\Support\Carbon // Carbon + +fields: Illuminate\Support\Collection { // Collection|DocumentField[] + #items: array:2 [ + 0 => CodebarAg\DocuWare\DTO\DocumentField // DocumentField + 1 => CodebarAg\DocuWare\DTO\DocumentField // DocumentField + ] + } +} +``` + +```php +CodebarAg\DocuWare\DTO\Section {#23784▶ + +id: "5589-5525" + +contentType: "text/plain" + +haveMorePages: true + +pageCount: 1 + +fileSize: 32 + +originalFileName: "example.txt" + +contentModified: "/Date(1702395557000)/" + +annotationsPreview: false + +hasTextAnnotations: null +} +``` + +```php +CodebarAg\DocuWare\DTO\DocumentThumbnail { + +mime: "image/png" // string + +data: "somedata" // string + +base64: "data:image/png;base64,WXpJNWRGcFhVbWhrUjBVOQ==" // string +} +``` + +```php +CodebarAg\DocuWare\DTO\TableRow { + +fields: Illuminate\Support\Collection { // Collection|DocumentField[] + #items: array:2 [ + 0 => CodebarAg\DocuWare\DTO\DocumentField // DocumentField + 1 => CodebarAg\DocuWare\DTO\DocumentField // DocumentField + ] +} +``` + +```php +CodebarAg\DocuWare\DTO\DocumentPaginator + +total: 39 // integer + +per_page: 10 // integer + +current_page: 9 // integer + +last_page: 15 // integer + +from: 1 // integer + +to: 10 // integer + +documents: Illuminate\Support\Collection { // Collection|Document[] + #items: array:2 [ + 0 => CodebarAg\DocuWare\DTO\Document // Document + 1 => CodebarAg\DocuWare\DTO\Document // Document + ] + } + +error: CodebarAg\DocuWare\DTO\ErrorBag { // ErrorBag|null + +code: 422 // int + +message: "'000' is not valid cabinet id" // string + } +} +``` diff --git a/docs/encrypted_urls.md b/docs/encrypted_urls.md new file mode 100644 index 00000000..096fb327 --- /dev/null +++ b/docs/encrypted_urls.md @@ -0,0 +1,36 @@ +# Encrypted URLs + +```php +use CodebarAg\DocuWare\Facades\DocuWare; +``` + +### Make encrypted URL for a document in a file cabinet. +```php +$fileCabinetId = '87356f8d-e50c-450b-909c-4eaccd318fbf'; +$documentId = 42; + +$url = DocuWare::url() + ->fileCabinet($fileCabinetId) + ->document($documentId) + ->make(); +``` + +### Make encrypted URL for a document in a basket. +```php +$basketId = 'b_87356f8d-e50c-450b-909c-4eaccd318fbf'; + +$url = DocuWare::url() + ->basket($basketId) + ->document($documentId) + ->make(); +``` + +### Make encrypted URL valid for a specific amount of time. +> In the example below the URL is valid for one week, afterward the URL is no longer working. +```php +$url = DocuWare::url() + ->fileCabinet($fileCabinetId) + ->document($documentId) + ->validUntil(now()->addWeek()) + ->make(); +``` diff --git a/docs/exceptions.md b/docs/exceptions.md new file mode 100644 index 00000000..faef3c0f --- /dev/null +++ b/docs/exceptions.md @@ -0,0 +1,57 @@ +# Exceptions + +- `CodebarAg\DocuWare\Exceptions\UnableToMakeRequest` + +This is thrown if you are not authorized to make the request. + +--- + +- `CodebarAg\DocuWare\Exceptions\UnableToProcessRequest` + +This is thrown if you passed wrong attributes. For example a file cabinet ID +which does not exist. + +--- + +- `CodebarAg\DocuWare\Exceptions\UnableToLogin` + +This exception can only be thrown during the login if the credentials did not +match. + +--- + +- `CodebarAg\DocuWare\Exceptions\UnableToLoginNoCookies` + +This exception can only be thrown during the login if there was no cookies in +the response from the api. + +--- + +- `CodebarAg\DocuWare\Exceptions\UnableToFindPassphrase` + +This exception can only be thrown during the url making if the passphrase +could not be found. + +--- + +- `CodebarAg\DocuWare\Exceptions\UnableToMakeUrl` + +Something is wrong during the URL making. + +--- + +- `CodebarAg\DocuWare\Exceptions\UnableToUpdateFields` + +No fields were supplied. + +--- + +- `CodebarAg\DocuWare\Exceptions\UnableToGetDocumentCount` + +Something is wrong with the response from getting the document count. + +--- + +- `Illuminate\Http\Client\RequestException` + +All other cases if the response is not successfully. diff --git a/docs/workflow.md b/docs/workflow.md new file mode 100644 index 00000000..da58ef2e --- /dev/null +++ b/docs/workflow.md @@ -0,0 +1,25 @@ +# Workflow +| Request | Supported | +|-------------------------------------|-----------| +| Get Document Workflow History | ✅ | +| Get Document Workflow History Steps | ✅ | + +#### Get Document Workflow History +```php +use CodebarAg\DocuWare\Requests\Workflow\GetDocumentWorkflowHistory; + +$history = $this->connector->send(new GetDocumentWorkflowHistory( + $fileCabinetId, + $documentId +))->dto(); +``` + +#### Get Document Workflow History Steps +```php +use CodebarAg\DocuWare\Requests\Workflow\GetDocumentWorkflowHistorySteps; + +$historySteps = $this->connector->send(new GetDocumentWorkflowHistorySteps( + $workflowId, + $historyId, +))->dto(); +``` From a7b3b497925f4628059af18b4c92f9cfea6405ad Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:03:57 +0100 Subject: [PATCH 11/13] WIP --- .phpunit.cache/test-results | 2 +- src/DocuWare.php | 2 +- src/DocuWareUrl.php | 2 +- src/Facades/DocuWare.php | 2 +- tests/Feature/DocuWareTest.php | 9 +++++++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results index f383ffcf..94c1f26b 100644 --- a/.phpunit.cache/test-results +++ b/.phpunit.cache/test-results @@ -1 +1 @@ -{"version":"pest_2.34.9","defects":{"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexTableDTOTest::__pest_evaluable_it_create_prepare_index_text_dto":8},"times":{"P\\Tests\\Feature\\Requests\\FileCabinets\\Upload\\AppendFilesToADataRecordTest::__pest_evaluable_it_can_attach_files_to_a_data_record":0.393,"P\\Tests\\Feature\\Requests\\Documents\\ClipUnclipStapleUnstaple\\ClipTest::__pest_evaluable_it_can_clip_2_documents":6.632,"P\\Tests\\Feature\\Requests\\FileCabinets\\Dialogs\\GetDialogsOfASpecificTypeTest::__pest_evaluable_it_can_list_dialogs_for_a_file_cabinet":0.528,"P\\Tests\\Feature\\Requests\\FileCabinets\\Upload\\AppendFilesToADataRecordTest::__pest_evaluable_it_can_attach_a_file_to_a_data_record":1.01,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexDateTimeDTOTest::__pest_evaluable_it_create_index_date_time_dto":0.016,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexTextDTOTest::__pest_evaluable_it_create_prepare_index_text_dto":0.001,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetUsers\\GetUsersOfAGroupTest::__pest_evaluable_it_can_list_users_of_a_group":0.877,"P\\Tests\\Feature\\Requests\\Documents\\Sections\\GetASpecificSectionTest::__pest_evaluable_it_can_get_a_specific_section":0.833,"P\\Tests\\Core\\ArchTest::__pest_evaluable_it_will_not_use_any_debug_function":0.198,"P\\Tests\\Feature\\Requests\\FileCabinets\\Search\\GetDocumentsFromAFileCabinetTest::__pest_evaluable_it_can_get_all_documents":1.099,"P\\Tests\\Feature\\Requests\\Documents\\ApplicationProperties\\ApplicationPropertiesTest::__pest_evaluable_it_can_add_get_update_delete_application_properties_to_a_document":0.926,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyRoles\\AddRemoveUserToARoleTest::__pest_evaluable_it_can_add_roles_to_a_user":6.612,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyRoles\\AddRemoveUserToARoleTest::__pest_evaluable_it_can_remove_roles_to_a_user":6.217,"P\\Tests\\Feature\\Requests\\Documents\\PutDocumentFieldsRequestTest::__pest_evaluable_it_can_update_multiple_document_values":0.68,"P\\Tests\\Feature\\Requests\\Documents\\PutDocumentFieldsRequestTest::__pest_evaluable_it_can_update_a_document_value":0.934,"P\\Tests\\Feature\\Requests\\Documents\\Download\\DownloadSectionTest::__pest_evaluable_it_can_download_a_section":0.746,"P\\Tests\\Feature\\Requests\\Documents\\ClipUnclipStapleUnstaple\\StapleTest::__pest_evaluable_it_can_staple_2_documents":12.563,"P\\Tests\\Feature\\Requests\\Documents\\ClipUnclipStapleUnstaple\\UnclipTest::__pest_evaluable_it_can_unclip_2_documents":12.891,"P\\Tests\\Feature\\DocuWareAuthenticationTest::__pest_evaluable_it_can_get_oath_responsible_identity_service":0.547,"P\\Tests\\Feature\\DocuWareAuthenticationTest::__pest_evaluable_it_can_authenticate_with_DocuWare_Credentials":0.474,"P\\Tests\\Feature\\DocuWareAuthenticationTest::__pest_evaluable_it_can_get_oath_identity_service_configuration":1.719,"P\\Tests\\Feature\\Requests\\FileCabinets\\Search\\GetASpecificDocumentFromAFileCabinetTest::__pest_evaluable_it_can_show_a_document":0.725,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyGroups\\GetGroupsTest::__pest_evaluable_it_can_list_groups":0.529,"P\\Tests\\Feature\\Requests\\Documents\\Thumbnail\\GetDocumentDownloadThumbnailRequestTest::__pest_evaluable_it_can_download_a_document_thumbnail":0.863,"P\\Tests\\Feature\\Requests\\Documents\\Download\\DownloadDocumentTest::__pest_evaluable_it_can_download_a_document":0.833,"P\\Tests\\Feature\\Requests\\Organization\\GetOrganizationsRequestTest::__pest_evaluable_it_can_list_organizations":0.546,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyGroups\\GetAllGroupsForASpecificUserTest::__pest_evaluable_it_can_list_groups_for_a_specific_user":0.685,"P\\Tests\\Feature\\Requests\\Fields\\GetFieldsRequestTest::__pest_evaluable_it_can_list_fields_for_a_file_cabinet":0.52,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetUsers\\GetUserByIdTest::__pest_evaluable_it_can_get_user_by_id":0.679,"P\\Tests\\Feature\\Requests\\Documents\\Download\\DownloadThumbnailTest::__pest_evaluable_it_can_download_a_thumbnail":0.781,"P\\Tests\\Feature\\SleepTest::__pest_evaluable_sleep":0.404,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetUsers\\GetUsersTest::__pest_evaluable_it_can_list_users":0.655,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexDecimalDTOTest::__pest_evaluable_it_create_index_numeric_dto":0,"P\\Tests\\Feature\\Requests\\Documents\\PostDocumentRequestTest::__pest_evaluable_it_can_upload_document_with_index_values_and_delete_it":0.962,"P\\Tests\\Feature\\Requests\\Documents\\PostDocumentRequestTest::__pest_evaluable_it_can_upload_document_without_file_name_and_file_content_and_delete_it":0.614,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_override_search_documents_dates_filter_by_using_equal_operator":0.641,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_search_documents_with_null_values":0.697,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_override_search_documents_dates_filter_by_using_same_operator":0.616,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_t_search_documents_by_more_than_two_dates":0.414,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_t_search_documents_by_diverged_date_range":0.574,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_search_documents_dates_filter_in_future":0.557,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_search_documents_dates_filter_in_past":0.55,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_search_documents":0.569,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_search_documents_with_multiple_values":1.213,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyGroups\\AddRemoveUserToAGroupTest::__pest_evaluable_it_can_add_groups_to_a_user":7.061,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyGroups\\AddRemoveUserToAGroupTest::__pest_evaluable_it_can_remove_groups_to_a_user":5.914,"P\\Tests\\Feature\\Requests\\Documents\\Sections\\DeleteSectionTest::__pest_evaluable_it_can_delete_a_specific_section":0.863,"P\\Tests\\Feature\\Requests\\FileCabinets\\Dialogs\\GetASpecificDialogTest::__pest_evaluable_it_can_get_a_dialog":0.578,"P\\Tests\\Feature\\Requests\\Workflow\\GetDocumentWorkflowHistoryTest::__pest_evaluable_it_can_get_document_workflow_history":5.775,"P\\Tests\\Feature\\Requests\\Documents\\GetDocumentPreviewRequestTest::__pest_evaluable_it_can_preview_a_document_image":0.921,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexDateDTOTest::__pest_evaluable_it_create_index_date_dto":0,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\DeleteDocumentsFromTrashBinTest::__pest_evaluable_it_can_delete_documents_in_trash":0.882,"P\\Tests\\Unit\\DTO\\DocumentIndex\\PrepareTableDTOTest::__pest_evaluable_it_create_prepare_index_table_dto":0.002,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyRoles\\GetAllRolesForASpecificUserTest::__pest_evaluable_it_can_list_groups":0.726,"P\\Tests\\Feature\\Requests\\Documents\\Sections\\GetAllSectionsFromADocumentTest::__pest_evaluable_it_can_get_all_sections_from_a_document":0.73,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetUsers\\GetUsersOfARoleTest::__pest_evaluable_it_can_list_users_of_a_role":0.574,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\RestoreDocumentsFromTrashBinTest::__pest_evaluable_it_can_restore_documents_in_trash":0.933,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_document_paginator":0.419,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_dialog":0.471,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_field":0.411,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_organization":0.401,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_table_row":0.417,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_document":0.397,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_organization_index":0.434,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_suggestion_field":0.425,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_file_cabinet":0.406,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_document_field":0.411,"P\\Tests\\Unit\\DTO\\DocumentIndex\\PrepareDTOTest::__pest_evaluable_it_create_prepare_makeContent_dto":0.001,"P\\Tests\\Unit\\DTO\\DocumentIndex\\PrepareDTOTest::__pest_evaluable_it_create_prepare_index_dto":0.001,"P\\Tests\\Feature\\Requests\\FileCabinets\\General\\GetFileCabinetInformationTest::__pest_evaluable_it_can_get_file_cabinet_information":0.559,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\CreateUpdateUsers\\CreateUpdateUserTest::__pest_evaluable_it_can_create_users":1.282,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\CreateUpdateUsers\\CreateUpdateUserTest::__pest_evaluable_it_can_update_users":5.917,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexNumericDTOTest::__pest_evaluable_it_create_index_numeric_dto":0.001,"P\\Tests\\Feature\\DocuWareTest::__pest_evaluable_it_can_create_encrypted_url_for_a_document_in_a_basket":0.527,"P\\Tests\\Feature\\DocuWareTest::__pest_evaluable_it_can_create_encrypted_url_for_a_document_in_a_file_cabinet":0.405,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexTableDTOTest::__pest_evaluable_it_create_prepare_index_text_dto":0.002,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_search_documents_with_null_values_in_trash":0.652,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_t_search_documents_by_diverged_date_range":0.393,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_override_search_documents_dates_filter_by_using_same_operator_in_trash":0.496,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_search_documents_dates_filter_in_future_in_trash":0.555,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_search_documents_dates_filter_in_past_in_trash":0.541,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_search_documents_in_trash":0.515,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_override_search_documents_dates_filter_by_using_equal_operator_in_trash":0.542,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_t_search_documents_by_more_than_two_dates_in_trash":0.401,"P\\Tests\\Feature\\Requests\\Workflow\\GetDocumentWorkflowHistoryStepsTest::__pest_evaluable_it_can_get_document_workflow_history":6.945,"P\\Tests\\Feature\\Requests\\Documents\\ClipUnclipStapleUnstaple\\UnstapleTest::__pest_evaluable_it_can_unstaple_a_document":13.004,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyRoles\\GetRolesTest::__pest_evaluable_it_can_list_groups":0.647,"P\\Tests\\Feature\\Requests\\Documents\\GetDocumentCountRequestTest::__pest_evaluable_it_can_get_a_total_count_of_documents":0.73,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexTableDTOTest::__pest_evaluable_it_create_prepare_index_text_dto_using_dto":0.001,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexKeywordDTOTest::__pest_evaluable_it_create_prepare_index_keyword_dto":0.001,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexMemoDTOTest::__pest_evaluable_it_create_prepare_index_memo_dto":0.001}} \ No newline at end of file +{"version":"pest_2.34.9","defects":{"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexTableDTOTest::__pest_evaluable_it_create_prepare_index_text_dto":8},"times":{"P\\Tests\\Feature\\Requests\\FileCabinets\\Upload\\AppendFilesToADataRecordTest::__pest_evaluable_it_can_attach_files_to_a_data_record":0.393,"P\\Tests\\Feature\\Requests\\Documents\\ClipUnclipStapleUnstaple\\ClipTest::__pest_evaluable_it_can_clip_2_documents":6.632,"P\\Tests\\Feature\\Requests\\FileCabinets\\Dialogs\\GetDialogsOfASpecificTypeTest::__pest_evaluable_it_can_list_dialogs_for_a_file_cabinet":0.528,"P\\Tests\\Feature\\Requests\\FileCabinets\\Upload\\AppendFilesToADataRecordTest::__pest_evaluable_it_can_attach_a_file_to_a_data_record":1.01,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexDateTimeDTOTest::__pest_evaluable_it_create_index_date_time_dto":0.016,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexTextDTOTest::__pest_evaluable_it_create_prepare_index_text_dto":0.001,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetUsers\\GetUsersOfAGroupTest::__pest_evaluable_it_can_list_users_of_a_group":0.877,"P\\Tests\\Feature\\Requests\\Documents\\Sections\\GetASpecificSectionTest::__pest_evaluable_it_can_get_a_specific_section":0.833,"P\\Tests\\Core\\ArchTest::__pest_evaluable_it_will_not_use_any_debug_function":0.198,"P\\Tests\\Feature\\Requests\\FileCabinets\\Search\\GetDocumentsFromAFileCabinetTest::__pest_evaluable_it_can_get_all_documents":1.099,"P\\Tests\\Feature\\Requests\\Documents\\ApplicationProperties\\ApplicationPropertiesTest::__pest_evaluable_it_can_add_get_update_delete_application_properties_to_a_document":0.926,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyRoles\\AddRemoveUserToARoleTest::__pest_evaluable_it_can_add_roles_to_a_user":6.612,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyRoles\\AddRemoveUserToARoleTest::__pest_evaluable_it_can_remove_roles_to_a_user":6.217,"P\\Tests\\Feature\\Requests\\Documents\\PutDocumentFieldsRequestTest::__pest_evaluable_it_can_update_multiple_document_values":0.68,"P\\Tests\\Feature\\Requests\\Documents\\PutDocumentFieldsRequestTest::__pest_evaluable_it_can_update_a_document_value":0.934,"P\\Tests\\Feature\\Requests\\Documents\\Download\\DownloadSectionTest::__pest_evaluable_it_can_download_a_section":0.746,"P\\Tests\\Feature\\Requests\\Documents\\ClipUnclipStapleUnstaple\\StapleTest::__pest_evaluable_it_can_staple_2_documents":12.563,"P\\Tests\\Feature\\Requests\\Documents\\ClipUnclipStapleUnstaple\\UnclipTest::__pest_evaluable_it_can_unclip_2_documents":12.891,"P\\Tests\\Feature\\DocuWareAuthenticationTest::__pest_evaluable_it_can_get_oath_responsible_identity_service":0.547,"P\\Tests\\Feature\\DocuWareAuthenticationTest::__pest_evaluable_it_can_authenticate_with_DocuWare_Credentials":0.474,"P\\Tests\\Feature\\DocuWareAuthenticationTest::__pest_evaluable_it_can_get_oath_identity_service_configuration":1.719,"P\\Tests\\Feature\\Requests\\FileCabinets\\Search\\GetASpecificDocumentFromAFileCabinetTest::__pest_evaluable_it_can_show_a_document":0.725,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyGroups\\GetGroupsTest::__pest_evaluable_it_can_list_groups":0.529,"P\\Tests\\Feature\\Requests\\Documents\\Thumbnail\\GetDocumentDownloadThumbnailRequestTest::__pest_evaluable_it_can_download_a_document_thumbnail":0.863,"P\\Tests\\Feature\\Requests\\Documents\\Download\\DownloadDocumentTest::__pest_evaluable_it_can_download_a_document":0.833,"P\\Tests\\Feature\\Requests\\Organization\\GetOrganizationsRequestTest::__pest_evaluable_it_can_list_organizations":0.546,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyGroups\\GetAllGroupsForASpecificUserTest::__pest_evaluable_it_can_list_groups_for_a_specific_user":0.685,"P\\Tests\\Feature\\Requests\\Fields\\GetFieldsRequestTest::__pest_evaluable_it_can_list_fields_for_a_file_cabinet":0.52,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetUsers\\GetUserByIdTest::__pest_evaluable_it_can_get_user_by_id":0.679,"P\\Tests\\Feature\\Requests\\Documents\\Download\\DownloadThumbnailTest::__pest_evaluable_it_can_download_a_thumbnail":0.781,"P\\Tests\\Feature\\SleepTest::__pest_evaluable_sleep":0.404,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetUsers\\GetUsersTest::__pest_evaluable_it_can_list_users":0.655,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexDecimalDTOTest::__pest_evaluable_it_create_index_numeric_dto":0,"P\\Tests\\Feature\\Requests\\Documents\\PostDocumentRequestTest::__pest_evaluable_it_can_upload_document_with_index_values_and_delete_it":0.962,"P\\Tests\\Feature\\Requests\\Documents\\PostDocumentRequestTest::__pest_evaluable_it_can_upload_document_without_file_name_and_file_content_and_delete_it":0.614,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_override_search_documents_dates_filter_by_using_equal_operator":0.641,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_search_documents_with_null_values":0.697,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_override_search_documents_dates_filter_by_using_same_operator":0.616,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_t_search_documents_by_more_than_two_dates":0.414,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_t_search_documents_by_diverged_date_range":0.574,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_search_documents_dates_filter_in_future":0.557,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_search_documents_dates_filter_in_past":0.55,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_search_documents":0.569,"P\\Tests\\Feature\\Requests\\Search\\GetSearchRequestTest::__pest_evaluable_it_can_search_documents_with_multiple_values":1.213,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyGroups\\AddRemoveUserToAGroupTest::__pest_evaluable_it_can_add_groups_to_a_user":7.061,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyGroups\\AddRemoveUserToAGroupTest::__pest_evaluable_it_can_remove_groups_to_a_user":5.914,"P\\Tests\\Feature\\Requests\\Documents\\Sections\\DeleteSectionTest::__pest_evaluable_it_can_delete_a_specific_section":0.863,"P\\Tests\\Feature\\Requests\\FileCabinets\\Dialogs\\GetASpecificDialogTest::__pest_evaluable_it_can_get_a_dialog":0.578,"P\\Tests\\Feature\\Requests\\Workflow\\GetDocumentWorkflowHistoryTest::__pest_evaluable_it_can_get_document_workflow_history":5.775,"P\\Tests\\Feature\\Requests\\Documents\\GetDocumentPreviewRequestTest::__pest_evaluable_it_can_preview_a_document_image":0.921,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexDateDTOTest::__pest_evaluable_it_create_index_date_dto":0,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\DeleteDocumentsFromTrashBinTest::__pest_evaluable_it_can_delete_documents_in_trash":0.882,"P\\Tests\\Unit\\DTO\\DocumentIndex\\PrepareTableDTOTest::__pest_evaluable_it_create_prepare_index_table_dto":0.002,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyRoles\\GetAllRolesForASpecificUserTest::__pest_evaluable_it_can_list_groups":0.726,"P\\Tests\\Feature\\Requests\\Documents\\Sections\\GetAllSectionsFromADocumentTest::__pest_evaluable_it_can_get_all_sections_from_a_document":0.73,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetUsers\\GetUsersOfARoleTest::__pest_evaluable_it_can_list_users_of_a_role":0.574,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\RestoreDocumentsFromTrashBinTest::__pest_evaluable_it_can_restore_documents_in_trash":0.933,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_document_paginator":0.419,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_dialog":0.471,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_field":0.411,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_organization":0.401,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_table_row":0.417,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_document":0.397,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_organization_index":0.434,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_suggestion_field":0.425,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_file_cabinet":0.406,"P\\Tests\\Feature\\DTOTest::__pest_evaluable_it_create_a_fake_document_field":0.411,"P\\Tests\\Unit\\DTO\\DocumentIndex\\PrepareDTOTest::__pest_evaluable_it_create_prepare_makeContent_dto":0.001,"P\\Tests\\Unit\\DTO\\DocumentIndex\\PrepareDTOTest::__pest_evaluable_it_create_prepare_index_dto":0.001,"P\\Tests\\Feature\\Requests\\FileCabinets\\General\\GetFileCabinetInformationTest::__pest_evaluable_it_can_get_file_cabinet_information":0.559,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\CreateUpdateUsers\\CreateUpdateUserTest::__pest_evaluable_it_can_create_users":1.282,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\CreateUpdateUsers\\CreateUpdateUserTest::__pest_evaluable_it_can_update_users":5.917,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexNumericDTOTest::__pest_evaluable_it_create_index_numeric_dto":0.001,"P\\Tests\\Feature\\DocuWareTest::__pest_evaluable_it_can_create_encrypted_url_for_a_document_in_a_basket":0.658,"P\\Tests\\Feature\\DocuWareTest::__pest_evaluable_it_can_create_encrypted_url_for_a_document_in_a_file_cabinet":0.405,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexTableDTOTest::__pest_evaluable_it_create_prepare_index_text_dto":0.002,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_search_documents_with_null_values_in_trash":0.652,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_t_search_documents_by_diverged_date_range":0.393,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_override_search_documents_dates_filter_by_using_same_operator_in_trash":0.496,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_search_documents_dates_filter_in_future_in_trash":0.555,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_search_documents_dates_filter_in_past_in_trash":0.541,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_search_documents_in_trash":0.515,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_override_search_documents_dates_filter_by_using_equal_operator_in_trash":0.542,"P\\Tests\\Feature\\Requests\\Documents\\DocumentsTrashBin\\GetDocumentsFromTrashBinTest::__pest_evaluable_it_can_t_search_documents_by_more_than_two_dates_in_trash":0.401,"P\\Tests\\Feature\\Requests\\Workflow\\GetDocumentWorkflowHistoryStepsTest::__pest_evaluable_it_can_get_document_workflow_history":6.945,"P\\Tests\\Feature\\Requests\\Documents\\ClipUnclipStapleUnstaple\\UnstapleTest::__pest_evaluable_it_can_unstaple_a_document":13.004,"P\\Tests\\Feature\\Requests\\General\\UserManagement\\GetModifyRoles\\GetRolesTest::__pest_evaluable_it_can_list_groups":0.647,"P\\Tests\\Feature\\Requests\\Documents\\GetDocumentCountRequestTest::__pest_evaluable_it_can_get_a_total_count_of_documents":0.73,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexTableDTOTest::__pest_evaluable_it_create_prepare_index_text_dto_using_dto":0.001,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexKeywordDTOTest::__pest_evaluable_it_create_prepare_index_keyword_dto":0.001,"P\\Tests\\Unit\\DTO\\DocumentIndex\\IndexMemoDTOTest::__pest_evaluable_it_create_prepare_index_memo_dto":0.001}} \ No newline at end of file diff --git a/src/DocuWare.php b/src/DocuWare.php index a50c6aa0..cb7b385c 100644 --- a/src/DocuWare.php +++ b/src/DocuWare.php @@ -40,7 +40,7 @@ public function url( string $url, string $username, string $password, - string $passphrase + ?string $passphrase = null ): DocuWareUrl { return new DocuWareUrl( url: $url, diff --git a/src/DocuWareUrl.php b/src/DocuWareUrl.php index 18dc6347..e7da21c1 100644 --- a/src/DocuWareUrl.php +++ b/src/DocuWareUrl.php @@ -22,7 +22,7 @@ public function __construct( public string $url, public string $username, public string $password, - public string $passphrase, + public ?string $passphrase, ) {} public function fileCabinet(string $fileCabinetId): self diff --git a/src/Facades/DocuWare.php b/src/Facades/DocuWare.php index 6955c4a2..e1f9ef09 100644 --- a/src/Facades/DocuWare.php +++ b/src/Facades/DocuWare.php @@ -39,7 +39,7 @@ * @method static int documentCount(string $fileCabinetId, string $dialogId) * @method static void deleteDocument(string $fileCabinetId, int $documentId) * @method static DocuWareSearchRequestBuilder search() - * @method static DocuWareUrl url(string $url, string $username, string $password, string $passphrase) + * @method static DocuWareUrl url(string $url, string $username, string $password, null|string $passphrase = null) */ class DocuWare extends Facade { diff --git a/tests/Feature/DocuWareTest.php b/tests/Feature/DocuWareTest.php index 34c9be43..008f8653 100644 --- a/tests/Feature/DocuWareTest.php +++ b/tests/Feature/DocuWareTest.php @@ -36,7 +36,12 @@ $documentId = config('laravel-docuware.tests.document_id'); $url = (new DocuWare) - ->url() + ->url( + url: config('laravel-docuware.credentials.url'), + username: config('laravel-docuware.credentials.username'), + password: config('laravel-docuware.credentials.password'), + passphrase: config('laravel-docuware.credentials.passphrase'), + ) ->basket($basketId) ->document($documentId) ->validUntil(now()->addMinute()) @@ -51,4 +56,4 @@ $endpoint, $url, ); -}); +})->only(); From d4c10c4e2568d709653c983d2d50615b3a5d81e8 Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:05:23 +0100 Subject: [PATCH 12/13] WIP --- tests/Feature/DocuWareTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Feature/DocuWareTest.php b/tests/Feature/DocuWareTest.php index 008f8653..fd858646 100644 --- a/tests/Feature/DocuWareTest.php +++ b/tests/Feature/DocuWareTest.php @@ -56,4 +56,4 @@ $endpoint, $url, ); -})->only(); +}); From dc1fa1d1a71c66e3443dba9ea83cd9af4671f423 Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:35:33 +0100 Subject: [PATCH 13/13] WIP --- tests/Feature/DocuWareTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/Feature/DocuWareTest.php b/tests/Feature/DocuWareTest.php index fd858646..db4ea661 100644 --- a/tests/Feature/DocuWareTest.php +++ b/tests/Feature/DocuWareTest.php @@ -12,7 +12,12 @@ $documentId = config('laravel-docuware.tests.document_id'); $url = (new DocuWare) - ->url() + ->url( + url: config('laravel-docuware.credentials.url'), + username: config('laravel-docuware.credentials.username'), + password: config('laravel-docuware.credentials.password'), + passphrase: config('laravel-docuware.credentials.passphrase'), + ) ->fileCabinet($fileCabinetId) ->document($documentId) ->validUntil(now()->addMinute())