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 | ✅ |
use CodebarAg\DocuWare\Requests\FileCabinets\Search\GetASpecificDocumentFromAFileCabinet;
$document = $connector->send(new GetASpecificDocumentFromAFileCabinet(
$fileCabinetId,
$documentId
))->dto();
use CodebarAg\DocuWare\Requests\FileCabinets\Search\GetDocumentsFromAFileCabinet;
$documents = $connector->send(new GetDocumentsFromAFileCabinet(
$fileCabinetId
))->dto();
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();
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();
Default: 1
$paginatorRequest = DocuWare::searchRequestBuilder()
->fileCabinet($id)
->page(2)
->get();
$paginator = $connector->send($paginatorRequest)->dto();
Default: 50
$paginatorRequest = DocuWare::searchRequestBuilder()
->fileCabinet($id)
->perPage(30)
->get();
$paginator = $connector->send($paginatorRequest)->dto();
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();
$paginatorRequest = DocuWare::searchRequestBuilder()
->fileCabinet($id)
->filterDate('DWSTOREDATETIME', '>=', Carbon::create(2021, 3, 1))
->get();
$paginator = $connector->send($paginatorRequest)->dto();
$paginatorRequest = DocuWare::searchRequestBuilder()
->fileCabinet($id)
->filterDate('DWSTOREDATETIME', '<', Carbon::create(2021, 4, 1))
->get();
$paginator = $connector->send($paginatorRequest)->dto();
Supported values: 'asc', 'desc'
$paginatorRequest = DocuWare::searchRequestBuilder()
->fileCabinet($id)
->orderBy('DWSTOREDATETIME', 'desc')
->get();
$paginator = $connector->send($paginatorRequest)->dto();
You can specify multiple filters.
$paginatorRequest = DocuWare::searchRequestBuilder()
->fileCabinet($id)
->filter('TYPE', 'Order')
->filter('OTHER_FIELD', 'other')
->get();
$paginator = $connector->send($paginatorRequest)->dto();
$paginatorRequest = DocuWare::searchRequestBuilder()
->fileCabinet($id)
->filterIn('TYPE', ['Order', 'Invoice'])
->get();
$paginator = $connector->send($paginatorRequest)->dto();
$dialogId = 'bb42c30a-89fc-4b81-9091-d7e326caba62';
$paginatorRequest = DocuWare::searchRequestBuilder()
->fileCabinet($id)
->dialog($dialogId)
->get();
$paginator = $connector->send($paginatorRequest)->dto();
$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();