index.php 59.1 KB
Newer Older
1
<?php
Giovannoni Laurent's avatar
Giovannoni Laurent committed
2
3
4
5
6
7
8

/**
* Copyright Maarch since 2008 under licence GPLv3.
* See LICENCE.txt file at the root folder for more details.
* This file is part of Maarch software.
*
*/
Damien's avatar
Damien committed
9

Giovannoni Laurent's avatar
Giovannoni Laurent committed
10
/**
Damien's avatar
Damien committed
11
* @brief Rest Routes File
Giovannoni Laurent's avatar
Giovannoni Laurent committed
12
13
14
* @author dev@maarch.org
*/

15
16
require '../vendor/autoload.php';

Damien's avatar
Damien committed
17
18
//Root application position
chdir('..');
Damien's avatar
Damien committed
19
date_default_timezone_set(\SrcCore\models\CoreConfigModel::getTimezone());
Damien's avatar
Damien committed
20
21

$customId = \SrcCore\models\CoreConfigModel::getCustomId();
22
$language = \SrcCore\models\CoreConfigModel::getLanguage();
Damien's avatar
Damien committed
23
24
25
if (file_exists("custom/{$customId}/src/core/lang/lang-{$language}.php")) {
    require_once("custom/{$customId}/src/core/lang/lang-{$language}.php");
}
Damien's avatar
Damien committed
26
27
require_once("src/core/lang/lang-{$language}.php");

28
$app = new \Slim\App(['settings' => ['displayErrorDetails' => true, 'determineRouteBeforeAppMiddleware' => true, 'addContentLengthHeader' => true ]]);
29

30
31
//Authentication
$app->add(function (\Slim\Http\Request $request, \Slim\Http\Response $response, callable $next) {
Giovannoni Laurent's avatar
Giovannoni Laurent committed
32
    $route = $request->getAttribute('route');
Damien's avatar
Damien committed
33
    $currentMethod = empty($route) ? '' : $route->getMethods()[0];
Damien's avatar
Damien committed
34
    $currentRoute = empty($route) ? '' : $route->getPattern();
35
    if (!in_array($currentMethod.$currentRoute, \SrcCore\controllers\AuthenticationController::ROUTES_WITHOUT_AUTHENTICATION)) {
36
37
38
39
40
41
42
43
44
45
        if (!\SrcCore\controllers\AuthenticationController::canAccessInstallerWhitoutAuthentication(['route' => $currentMethod.$currentRoute])) {
            $authorizationHeaders = $request->getHeader('Authorization');
            $userId = \SrcCore\controllers\AuthenticationController::authentication($authorizationHeaders);
            if (!empty($userId)) {
                \SrcCore\controllers\CoreController::setGlobals(['userId' => $userId]);
                if (!empty($currentRoute)) {
                    $r = \SrcCore\controllers\AuthenticationController::isRouteAvailable(['userId' => $userId, 'currentRoute' => $currentRoute, 'currentMethod' => $currentMethod]);
                    if (!$r['isRouteAvailable']) {
                        return $response->withStatus(403)->withJson(['errors' => $r['errors']]);
                    }
Giovannoni Laurent's avatar
Giovannoni Laurent committed
46
                }
47
48
            } else {
                return $response->withStatus(401)->withJson(['errors' => 'Authentication Failed']);
49
50
            }
        }
51
    }
Damien's avatar
Damien committed
52
    $response = $next($request, $response);
53

Damien's avatar
Damien committed
54
    return $response;
55
56
});

57
//Authentication
58
$app->get('/authenticationInformations', \SrcCore\controllers\AuthenticationController::class . ':getInformations');
Damien's avatar
Damien committed
59
$app->get('/validUrl', \SrcCore\controllers\AuthenticationController::class . ':getValidUrl');
60
$app->post('/authenticate', \SrcCore\controllers\AuthenticationController::class . ':authenticate');
Damien's avatar
Damien committed
61
$app->get('/authenticate/logout', \SrcCore\controllers\AuthenticationController::class . ':logout');
62
63
$app->get('/authenticate/token', \SrcCore\controllers\AuthenticationController::class . ':getRefreshedToken');

Odran PHILIBERT's avatar
Odran PHILIBERT committed
64
//Initialize
65
$app->get('/images', \SrcCore\controllers\CoreController::class . ':getImages');
Odran PHILIBERT's avatar
Odran PHILIBERT committed
66

67
68
69
70
71
//Acknowledgement Receipt
$app->post('/acknowledgementReceipts', \AcknowledgementReceipt\controllers\AcknowledgementReceiptController::class . ':createPaperAcknowledgement');
$app->get('/acknowledgementReceipts/{id}', \AcknowledgementReceipt\controllers\AcknowledgementReceiptController::class . ':getById');
$app->get('/acknowledgementReceipts/{id}/content', \AcknowledgementReceipt\controllers\AcknowledgementReceiptController::class . ':getAcknowledgementReceipt');

72
73
74
75
76
77
78
79
//Actions
$app->get('/actions', \Action\controllers\ActionController::class . ':get');
$app->get('/initAction', \Action\controllers\ActionController::class . ':initAction');
$app->get('/actions/{id}', \Action\controllers\ActionController::class . ':getById');
$app->post('/actions', \Action\controllers\ActionController::class . ':create');
$app->put('/actions/{id}', \Action\controllers\ActionController::class . ':update');
$app->delete('/actions/{id}', \Action\controllers\ActionController::class . ':delete');

80
81
//Administration
$app->get('/administration/details', \Administration\controllers\AdministrationController::class . ':getDetails');
82

Damien's avatar
Damien committed
83
84
//Attachments
$app->post('/attachments', \Attachment\controllers\AttachmentController::class . ':create');
85
86
87
$app->get('/attachments/{id}', \Attachment\controllers\AttachmentController::class . ':getById');
$app->put('/attachments/{id}', \Attachment\controllers\AttachmentController::class . ':update');
$app->delete('/attachments/{id}', \Attachment\controllers\AttachmentController::class . ':delete');
88
89
90
$app->get('/attachments/{id}/content', \Attachment\controllers\AttachmentController::class . ':getFileContent');
$app->get('/attachments/{id}/originalContent', \Attachment\controllers\AttachmentController::class . ':getOriginalFileContent');
$app->get('/attachments/{id}/thumbnail', \Attachment\controllers\AttachmentController::class . ':getThumbnailContent');
91
$app->get('/attachments/{id}/thumbnail/{page}', \Attachment\controllers\AttachmentController::class . ':getThumbnailContentByPage');
92
$app->put('/attachments/{id}/inSendAttachment', \Attachment\controllers\AttachmentController::class . ':setInSendAttachment');
93
$app->put('/attachments/{id}/inSignatureBook', \Attachment\controllers\AttachmentController::class . ':setInSignatureBook');
94
$app->put('/attachments/{id}/sign', \SignatureBook\controllers\SignatureBookController::class . ':signAttachment');
95
$app->put('/attachments/{id}/unsign', \SignatureBook\controllers\SignatureBookController::class . ':unsignAttachment');
Damien's avatar
Damien committed
96
$app->post('/attachments/{id}/mailing', \Attachment\controllers\AttachmentController::class . ':getMailingById');
97
$app->get('/attachmentsInformations', \Attachment\controllers\AttachmentController::class . ':getByChrono');
98
99
100


//AttachmentsTypes
101
$app->get('/attachmentsTypes', \Attachment\controllers\AttachmentTypeController::class . ':get');
102
$app->post('/attachmentsTypes', \Attachment\controllers\AttachmentTypeController::class . ':create');
103
$app->get('/attachmentsTypes/{id}', \Attachment\controllers\AttachmentTypeController::class . ':getById');
104
105
106
107
$app->put('/attachmentsTypes/{id}', \Attachment\controllers\AttachmentTypeController::class . ':update');
$app->delete('/attachmentsTypes/{id}', \Attachment\controllers\AttachmentTypeController::class . ':delete');


Damien's avatar
Damien committed
108
109
//AutoComplete
$app->get('/autocomplete/users', \SrcCore\controllers\AutoCompleteController::class . ':getUsers');
110
$app->get('/autocomplete/maarchParapheurUsers', \SrcCore\controllers\AutoCompleteController::class . ':getMaarchParapheurUsers');
111
$app->get('/autocomplete/correspondents', \SrcCore\controllers\AutoCompleteController::class . ':getCorrespondents');
112
$app->get('/autocomplete/contacts', \SrcCore\controllers\AutoCompleteController::class . ':getContacts');
113
$app->get('/autocomplete/contacts/company', \SrcCore\controllers\AutoCompleteController::class . ':getContactsCompany');
114
$app->get('/autocomplete/users/administration', \SrcCore\controllers\AutoCompleteController::class . ':getUsersForAdministration');
115
$app->get('/autocomplete/users/circuit', \SrcCore\controllers\AutoCompleteController::class . ':getUsersForCircuit');
Damien's avatar
Damien committed
116
117
$app->get('/autocomplete/entities', \SrcCore\controllers\AutoCompleteController::class . ':getEntities');
$app->get('/autocomplete/statuses', \SrcCore\controllers\AutoCompleteController::class . ':getStatuses');
Damien's avatar
Damien committed
118
$app->get('/autocomplete/banAddresses', \SrcCore\controllers\AutoCompleteController::class . ':getBanAddresses');
119
$app->get('/autocomplete/folders', \SrcCore\controllers\AutoCompleteController::class . ':getFolders');
120
$app->get('/autocomplete/tags', \SrcCore\controllers\AutoCompleteController::class . ':getTags');
121
122
$app->get('/autocomplete/ouM2MAnnuary', \SrcCore\controllers\AutoCompleteController::class . ':getOuM2MAnnuary');
$app->get('/autocomplete/businessIdM2MAnnuary', \SrcCore\controllers\AutoCompleteController::class . ':getBusinessIdM2MAnnuary');
123
$app->get('/autocomplete/contacts/m2m', \SrcCore\controllers\AutoCompleteController::class . ':getAvailableContactsForM2M');
Damien's avatar
Damien committed
124

Damien's avatar
Damien committed
125
126
127
//Baskets
$app->get('/baskets', \Basket\controllers\BasketController::class . ':get');
$app->post('/baskets', \Basket\controllers\BasketController::class . ':create');
Damien's avatar
Damien committed
128
$app->get('/baskets/{id}', \Basket\controllers\BasketController::class . ':getById');
Damien's avatar
Damien committed
129
130
131
132
133
$app->put('/baskets/{id}', \Basket\controllers\BasketController::class . ':update');
$app->delete('/baskets/{id}', \Basket\controllers\BasketController::class . ':delete');
$app->get('/baskets/{id}/groups', \Basket\controllers\BasketController::class . ':getGroups');
$app->post('/baskets/{id}/groups', \Basket\controllers\BasketController::class . ':createGroup');
$app->put('/baskets/{id}/groups/{groupId}', \Basket\controllers\BasketController::class . ':updateGroup');
Damien's avatar
Damien committed
134
$app->put('/baskets/{id}/groups/{groupId}/actions', \Basket\controllers\BasketController::class . ':updateGroupActions');
Damien's avatar
Damien committed
135
$app->delete('/baskets/{id}/groups/{groupId}', \Basket\controllers\BasketController::class . ':deleteGroup');
Damien's avatar
Damien committed
136
$app->get('/sortedBaskets', \Basket\controllers\BasketController::class . ':getSorted');
137
$app->put('/sortedBaskets/{id}', \Basket\controllers\BasketController::class . ':updateSort');
Damien's avatar
Damien committed
138

Damien's avatar
Damien committed
139
//Configurations
140
141
$app->get('/configurations/{privilege}', \Configuration\controllers\ConfigurationController::class . ':getByPrivilege');
$app->put('/configurations/{privilege}', \Configuration\controllers\ConfigurationController::class . ':update');
Damien's avatar
Damien committed
142

143
144
145
146
147
$app->get('/m2m/configuration', \Configuration\controllers\ConfigurationController::class . ':getM2MConfiguration');
$app->put('/m2m/configuration', \Configuration\controllers\ConfigurationController::class . ':updateM2MConfiguration');
$app->get('/watermark/configuration', \Configuration\controllers\ConfigurationController::class . ':getWatermarkConfiguration');
$app->put('/watermark/configuration', \Configuration\controllers\ConfigurationController::class . ':updateWatermarkConfiguration');

148
//Contacts
Damien's avatar
Damien committed
149
$app->get('/contacts', \Contact\controllers\ContactController::class . ':get');
150
$app->post('/contacts', \Contact\controllers\ContactController::class . ':create');
Damien's avatar
Damien committed
151
$app->get('/contacts/{id}', \Contact\controllers\ContactController::class . ':getById');
152
$app->put('/contacts/export', \Contact\controllers\ContactController::class . ':exportContacts');
153
$app->put('/contacts/import', \Contact\controllers\ContactController::class . ':importContacts');
154
$app->put('/contacts/{id}', \Contact\controllers\ContactController::class . ':update');
Damien's avatar
Damien committed
155
$app->delete('/contacts/{id}', \Contact\controllers\ContactController::class . ':delete');
156
$app->put('/contacts/{id}/activation', \Contact\controllers\ContactController::class . ':updateActivation');
157
$app->get('/formattedContacts/{id}/types/{type}', \Contact\controllers\ContactController::class . ':getLightFormattedContact');
158
$app->get('/ban/availableDepartments', \Contact\controllers\ContactController::class . ':getAvailableDepartments');
159
$app->get('/duplicatedContacts', \Contact\controllers\ContactController::class . ':getDuplicatedContacts');
160
$app->put('/contacts/{id}/merge', \Contact\controllers\ContactController::class . ':mergeContacts');
161
162
$app->get('/contactsParameters', \Contact\controllers\ContactController::class . ':getContactsParameters');
$app->put('/contactsParameters', \Contact\controllers\ContactController::class . ':updateContactsParameters');
163
164
165
166
167
168
169

//ContactsCivilities
$app->get('/civilities', \Contact\controllers\ContactCivilityController::class . ':get');
$app->post('/civilities', \Contact\controllers\ContactCivilityController::class . ':create');
$app->get('/civilities/{id}', \Contact\controllers\ContactCivilityController::class . ':getById');
$app->put('/civilities/{id}', \Contact\controllers\ContactCivilityController::class . ':update');
$app->delete('/civilities/{id}', \Contact\controllers\ContactCivilityController::class . ':delete');
Damien's avatar
Damien committed
170

171
172
173
174
175
176
177
//ContactsCustomFields
$app->get('/contactsCustomFields', \Contact\controllers\ContactCustomFieldController::class . ':get');
$app->post('/contactsCustomFields', \Contact\controllers\ContactCustomFieldController::class . ':create');
$app->put('/contactsCustomFields/{id}', \Contact\controllers\ContactCustomFieldController::class . ':update');
$app->delete('/contactsCustomFields/{id}', \Contact\controllers\ContactCustomFieldController::class . ':delete');

//ContactsGroups
178
179
$app->get('/contactsGroups', \Contact\controllers\ContactGroupController::class . ':get');
$app->post('/contactsGroups', \Contact\controllers\ContactGroupController::class . ':create');
180
$app->put('/contactsGroups/merge', \Contact\controllers\ContactGroupController::class . ':merge');
181
182
183
$app->get('/contactsGroups/{id}', \Contact\controllers\ContactGroupController::class . ':getById');
$app->put('/contactsGroups/{id}', \Contact\controllers\ContactGroupController::class . ':update');
$app->delete('/contactsGroups/{id}', \Contact\controllers\ContactGroupController::class . ':delete');
184
$app->post('/contactsGroups/{id}/duplicate', \Contact\controllers\ContactGroupController::class . ':duplicate');
185
$app->get('/contactsGroups/{id}/correspondents', \Contact\controllers\ContactGroupController::class . ':getCorrespondentsById');
186
$app->post('/contactsGroups/{id}/correspondents', \Contact\controllers\ContactGroupController::class . ':addCorrespondents');
187
$app->delete('/contactsGroups/{id}/correspondents', \Contact\controllers\ContactGroupController::class . ':deleteCorrespondents');
188
$app->get('/contactsGroupsEntities', \Contact\controllers\ContactGroupController::class . ':getAllowedEntities');
189
$app->get('/contactsGroupsCorrespondents', \Contact\controllers\ContactGroupController::class . ':getCorrespondents');
Damien's avatar
Damien committed
190

191
192
//Convert
$app->post('/convertedFile', \Convert\controllers\ConvertPdfController::class . ':convertedFile');
193
$app->get('/convertedFile/{filename}', \Convert\controllers\ConvertPdfController::class . ':getConvertedFileByFilename');
194
$app->post('/convertedFile/encodedFile', \Convert\controllers\ConvertPdfController::class . ':getConvertedFileFromEncodedFile');
195

196
197
198
199
200
//ContentManagement
$app->post('/jnlp', \ContentManagement\controllers\JnlpController::class . ':generateJnlp');
$app->get('/jnlp/{jnlpUniqueId}', \ContentManagement\controllers\JnlpController::class . ':renderJnlp');
$app->post('/jnlp/{jnlpUniqueId}', \ContentManagement\controllers\JnlpController::class . ':processJnlp');
$app->get('/jnlp/lock/{jnlpUniqueId}', \ContentManagement\controllers\JnlpController::class . ':isLockFileExisting');
201
$app->get('/documentEditors', \ContentManagement\controllers\DocumentEditorController::class . ':get');
202
$app->get('/onlyOffice/configuration', \ContentManagement\controllers\OnlyOfficeController::class . ':getConfiguration');
203
$app->post('/onlyOffice/token', \ContentManagement\controllers\OnlyOfficeController::class . ':getToken');
204
205
206
$app->post('/onlyOffice/mergedFile', \ContentManagement\controllers\OnlyOfficeController::class . ':saveMergedFile');
$app->get('/onlyOffice/mergedFile', \ContentManagement\controllers\OnlyOfficeController::class . ':getMergedFile');
$app->get('/onlyOffice/encodedFile', \ContentManagement\controllers\OnlyOfficeController::class . ':getEncodedFileFromUrl');
207
$app->get('/onlyOffice/available', \ContentManagement\controllers\OnlyOfficeController::class . ':isAvailable');
208
$app->get('/onlyOffice/content', \ContentManagement\controllers\OnlyOfficeController::class . ':getTmpFile');
209
210
211
$app->post('/onlyOfficeCallback', function (\Slim\Http\Request $request, \Slim\Http\Response $response) {
    return $response->withJson(['error' => 0]);
});
212

213
//CustomFields
214
$app->get('/customFields', \CustomField\controllers\CustomFieldController::class . ':get');
215
216
$app->post('/customFields', \CustomField\controllers\CustomFieldController::class . ':create');
$app->put('/customFields/{id}', \CustomField\controllers\CustomFieldController::class . ':update');
217
$app->delete('/customFields/{id}', \CustomField\controllers\CustomFieldController::class . ':delete');
218
$app->get('/customFieldsWhiteList', \CustomField\controllers\CustomFieldController::class . ':getWhiteList');
219

Damien's avatar
Damien committed
220
221
222
//Departments
$app->get('/departments', \Resource\controllers\DepartmentController::class . ':getFrenchDepartments');

223
224
//Docservers
$app->get('/docservers', \Docserver\controllers\DocserverController::class . ':get');
225
$app->post('/docservers', \Docserver\controllers\DocserverController::class . ':create');
226
$app->get('/docservers/{id}', \Docserver\controllers\DocserverController::class . ':getById');
227
228
$app->put('/docservers/{id}', \Docserver\controllers\DocserverController::class . ':update');
$app->delete('/docservers/{id}', \Docserver\controllers\DocserverController::class . ':delete');
229
230
231
232
233
234
235
236
237
238
239
240
241
242

//DocserverTypes
$app->get('/docserverTypes', \Docserver\controllers\DocserverTypeController::class . ':get');

//doctypes
$app->get('/doctypes', \Doctype\controllers\FirstLevelController::class . ':getTree');
$app->post('/doctypes/firstLevel', \Doctype\controllers\FirstLevelController::class . ':create');
$app->get('/doctypes/firstLevel/{id}', \Doctype\controllers\FirstLevelController::class . ':getById');
$app->put('/doctypes/firstLevel/{id}', \Doctype\controllers\FirstLevelController::class . ':update');
$app->delete('/doctypes/firstLevel/{id}', \Doctype\controllers\FirstLevelController::class . ':delete');
$app->post('/doctypes/secondLevel', \Doctype\controllers\SecondLevelController::class . ':create');
$app->get('/doctypes/secondLevel/{id}', \Doctype\controllers\SecondLevelController::class . ':getById');
$app->put('/doctypes/secondLevel/{id}', \Doctype\controllers\SecondLevelController::class . ':update');
$app->delete('/doctypes/secondLevel/{id}', \Doctype\controllers\SecondLevelController::class . ':delete');
243
$app->get('/doctypes/types', \Doctype\controllers\DoctypeController::class . ':get');
244
245
246
247
248
249
250
$app->post('/doctypes/types', \Doctype\controllers\DoctypeController::class . ':create');
$app->get('/doctypes/types/{id}', \Doctype\controllers\DoctypeController::class . ':getById');
$app->put('/doctypes/types/{id}', \Doctype\controllers\DoctypeController::class . ':update');
$app->delete('/doctypes/types/{id}', \Doctype\controllers\DoctypeController::class . ':delete');
$app->put('/doctypes/types/{id}/redirect', \Doctype\controllers\DoctypeController::class . ':deleteRedirect');
$app->get('/administration/doctypes/new', \Doctype\controllers\FirstLevelController::class . ':initDoctypes');

Damien's avatar
Damien committed
251
//Emails
Damien's avatar
Damien committed
252
$app->post('/emails', \Email\controllers\EmailController::class . ':send');
253
254
$app->get('/emails/{id}', \Email\controllers\EmailController::class . ':getById');
$app->put('/emails/{id}', \Email\controllers\EmailController::class . ':update');
Vinciane's avatar
Vinciane committed
255
256
$app->delete('/emails/{id}', \Email\controllers\EmailController::class . ':delete');

257
258
//Entities
$app->get('/entities', \Entity\controllers\EntityController::class . ':get');
259
$app->put('/entities/export', \Entity\controllers\EntityController::class . ':export');
260
261
262
263
264
$app->post('/entities', \Entity\controllers\EntityController::class . ':create');
$app->get('/entities/{id}', \Entity\controllers\EntityController::class . ':getById');
$app->put('/entities/{id}', \Entity\controllers\EntityController::class . ':update');
$app->delete('/entities/{id}', \Entity\controllers\EntityController::class . ':delete');
$app->get('/entities/{id}/details', \Entity\controllers\EntityController::class . ':getDetailledById');
265
$app->get('/entities/{id}/users', \Entity\controllers\EntityController::class . ':getUsersById');
266
$app->get('/entities/{id}/parentAddress', \Entity\controllers\EntityController::class . ':getParentAddress');
267
268
$app->put('/entities/{id}/reassign/{newEntityId}', \Entity\controllers\EntityController::class . ':reassignEntity');
$app->put('/entities/{id}/status', \Entity\controllers\EntityController::class . ':updateStatus');
Damien's avatar
Damien committed
269
$app->put('/entities/{id}/annuaries', \MessageExchange\controllers\AnnuaryController::class . ':updateEntityToOrganization');
270
$app->get('/entityTypes', \Entity\controllers\EntityController::class . ':getTypes');
271
$app->post('/entitySeparators', \Entity\controllers\EntitySeparatorController::class . ':create');
Damien's avatar
Damien committed
272

273
274
275
276
277
278
279
280
281
282
283
284
//ExternalSignatoryBook
$app->get('/xParaphWorkflow', \ExternalSignatoryBook\controllers\XParaphController::class . ':getWorkflow');
$app->post('/xParaphAccount', \ExternalSignatoryBook\controllers\XParaphController::class . ':createXparaphAccount');
$app->delete('/xParaphAccount', \ExternalSignatoryBook\controllers\XParaphController::class . ':deleteXparaphAccount');

//Folders
$app->get('/folders', \Folder\controllers\FolderController::class . ':get');
$app->post('/folders', \Folder\controllers\FolderController::class . ':create');
$app->get('/folders/{id}', \Folder\controllers\FolderController::class . ':getById');
$app->put('/folders/{id}', \Folder\controllers\FolderController::class . ':update');
$app->delete('/folders/{id}', \Folder\controllers\FolderController::class . ':delete');
$app->get('/folders/{id}/resources', \Folder\controllers\FolderController::class . ':getResourcesById');
285
$app->post('/folders/{id}/resources', \Folder\controllers\FolderController::class . ':addResourcesById');
286
$app->delete('/folders/{id}/resources', \Folder\controllers\FolderController::class . ':removeResourcesById');
Damien's avatar
Damien committed
287
$app->get('/folders/{id}/filters', \Folder\controllers\FolderController::class . ':getFilters');
288
$app->put('/folders/{id}/sharing', \Folder\controllers\FolderController::class . ':sharing');
289
$app->get('/pinnedFolders', \Folder\controllers\FolderController::class . ':getPinnedFolders');
Guillaume Heurtier's avatar
Guillaume Heurtier committed
290
$app->post('/folders/{id}/pin', \Folder\controllers\FolderController::class . ':pinFolder');
291
292
$app->delete('/folders/{id}/unpin', \Folder\controllers\FolderController::class . ':unpinFolder');

293
// CommitInformation
294
295
$app->get('/commitInformation', \SrcCore\controllers\CoreController::class . ':getGitCommitInformation');

Damien's avatar
Damien committed
296
//Groups
Damien's avatar
Damien committed
297
298
299
300
301
302
$app->get('/groups', \Group\controllers\GroupController::class . ':get');
$app->post('/groups', \Group\controllers\GroupController::class . ':create');
$app->get('/groups/{id}', \Group\controllers\GroupController::class . ':getById');
$app->put('/groups/{id}', \Group\controllers\GroupController::class . ':update');
$app->delete('/groups/{id}', \Group\controllers\GroupController::class . ':delete');
$app->get('/groups/{id}/details', \Group\controllers\GroupController::class . ':getDetailledById');
303
304
$app->get('/groups/{id}/indexing', \Group\controllers\GroupController::class . ':getIndexingInformationsById');
$app->put('/groups/{id}/indexing', \Group\controllers\GroupController::class . ':updateIndexingInformations');
Damien's avatar
Damien committed
305
$app->put('/groups/{id}/reassign/{newGroupId}', \Group\controllers\GroupController::class . ':reassignUsers');
306
307
$app->post('/groups/{id}/privileges/{privilegeId}', \Group\controllers\PrivilegeController::class . ':addPrivilege');
$app->delete('/groups/{id}/privileges/{privilegeId}', \Group\controllers\PrivilegeController::class . ':removePrivilege');
Guillaume Heurtier's avatar
Guillaume Heurtier committed
308
$app->put('/groups/{id}/privileges/{privilegeId}/parameters', \Group\controllers\PrivilegeController::class . ':updateParameters');
309
$app->get('/groups/{id}/privileges/{privilegeId}/parameters', \Group\controllers\PrivilegeController::class . ':getParameters');
Damien's avatar
Damien committed
310

Damien's avatar
Damien committed
311
312
//History
$app->get('/history', \History\controllers\HistoryController::class . ':get');
313
$app->get('/history/availableFilters', \History\controllers\HistoryController::class . ':getAvailableFilters');
Damien's avatar
Damien committed
314
$app->get('/history/users/{userSerialId}', \History\controllers\HistoryController::class . ':getByUserId');
Damien's avatar
Damien committed
315

316
317
318
319
//BatchHistory
$app->get('/batchHistory', \History\controllers\BatchHistoryController::class . ':get');
$app->get('/batchHistory/availableFilters', \History\controllers\BatchHistoryController::class . ':getAvailableFilters');

Damien's avatar
Damien committed
320
321
322
//Header
$app->get('/header', \SrcCore\controllers\CoreController::class . ':getHeader');

Damien's avatar
Damien committed
323
324
//Home
$app->get('/home', \Home\controllers\HomeController::class . ':get');
325
$app->get('/home/maarchParapheurDocuments', \Home\controllers\HomeController::class . ':getMaarchParapheurDocuments');
Damien's avatar
Damien committed
326

327
//Indexing
328
329
$app->get('/indexing/groups/{groupId}/actions', \Resource\controllers\IndexingController::class . ':getIndexingActions');
$app->get('/indexing/groups/{groupId}/entities', \Resource\controllers\IndexingController::class . ':getIndexingEntities');
330
$app->get('/indexing/processLimitDate', \Resource\controllers\IndexingController::class . ':getProcessLimitDate');
331
$app->get('/indexing/fileInformations', \Resource\controllers\IndexingController::class . ':getFileInformations');
332
$app->get('/indexing/priority', \Resource\controllers\IndexingController::class . ':getPriorityWithProcessLimitDate');
333
$app->put('/indexing/groups/{groupId}/actions/{actionId}', \Resource\controllers\IndexingController::class . ':setAction');
334
335
336
337
338
339
340

//IndexingModels
$app->get('/indexingModels', \IndexingModel\controllers\IndexingModelController::class . ':get');
$app->get('/indexingModels/entities', \IndexingModel\controllers\IndexingModelController::class . ':getEntities');
$app->get('/indexingModels/{id}', \IndexingModel\controllers\IndexingModelController::class . ':getById');
$app->post('/indexingModels', \IndexingModel\controllers\IndexingModelController::class . ':create');
$app->put('/indexingModels/{id}', \IndexingModel\controllers\IndexingModelController::class . ':update');
341
342
$app->put('/indexingModels/{id}/disable', \IndexingModel\controllers\IndexingModelController::class . ':disable');
$app->put('/indexingModels/{id}/enable', \IndexingModel\controllers\IndexingModelController::class . ':enable');
343
344
$app->delete('/indexingModels/{id}', \IndexingModel\controllers\IndexingModelController::class . ':delete');

345
346
//Installer
$app->get('/installer/prerequisites', \SrcCore\controllers\InstallerController::class . ':getPrerequisites');
347
$app->get('/installer/databaseConnection', \SrcCore\controllers\InstallerController::class . ':checkDatabaseConnection');
348
$app->get('/installer/sqlDataFiles', \SrcCore\controllers\InstallerController::class . ':getSQLDataFiles');
349
$app->get('/installer/docservers', \SrcCore\controllers\InstallerController::class . ':checkDocservers');
350
$app->get('/installer/custom', \SrcCore\controllers\InstallerController::class . ':checkCustomName');
351
$app->get('/installer/customs', \SrcCore\controllers\InstallerController::class . ':getCustoms');
Damien's avatar
Damien committed
352
353
$app->post('/installer/custom', \SrcCore\controllers\InstallerController::class . ':createCustom');
$app->post('/installer/database', \SrcCore\controllers\InstallerController::class . ':createDatabase');
354
$app->post('/installer/docservers', \SrcCore\controllers\InstallerController::class . ':createDocservers');
355
$app->post('/installer/customization', \SrcCore\controllers\InstallerController::class . ':createCustomization');
356
357
$app->put('/installer/administrator', \SrcCore\controllers\InstallerController::class . ':updateAdministrator');
$app->delete('/installer/lock', \SrcCore\controllers\InstallerController::class . ':terminateInstaller');
358

359
360
$app->get('/languages', \SrcCore\controllers\CoreController::class . ':getAvailableCoreLanguages');
$app->put('/languages', \SrcCore\controllers\CoreController::class . ':generateLang');
361

362
363
364
//Languages
$app->get('/languages/{lang}', \SrcCore\controllers\LanguageController::class . ':getByLang');

365
//ListInstances
366
$app->put('/listinstances', \Entity\controllers\ListInstanceController::class . ':update');
367
368
369
370
371
372
373

//ListTemplates
$app->get('/listTemplates', \Entity\controllers\ListTemplateController::class . ':get');
$app->post('/listTemplates', \Entity\controllers\ListTemplateController::class . ':create');
$app->get('/listTemplates/{id}', \Entity\controllers\ListTemplateController::class . ':getById');
$app->put('/listTemplates/{id}', \Entity\controllers\ListTemplateController::class . ':update');
$app->delete('/listTemplates/{id}', \Entity\controllers\ListTemplateController::class . ':delete');
Damien's avatar
Damien committed
374
$app->get('/listTemplates/entities/{entityId}', \Entity\controllers\ListTemplateController::class . ':getByEntityId');
375
$app->put('/listTemplates/entityDest/itemId/{itemId}', \Entity\controllers\ListTemplateController::class . ':updateByUserWithEntityDest');
376
377
$app->get('/listTemplates/types/{typeId}/roles', \Entity\controllers\ListTemplateController::class . ':getTypeRoles');
$app->put('/listTemplates/types/{typeId}/roles', \Entity\controllers\ListTemplateController::class . ':updateTypeRoles');
378
$app->get('/roles', \Entity\controllers\ListTemplateController::class . ':getRoles');
379

380
381
382
383
//Circuits
$app->get('/availableCircuits', \Entity\controllers\ListTemplateController::class . ':getAvailableCircuits');
$app->put('/circuits/{type}', \Entity\controllers\ListInstanceController::class . ':updateCircuits');

384
//Notes
385
386
387
388
389
$app->post('/notes', \Note\controllers\NoteController::class . ':create');
$app->get('/notes/{id}', \Note\controllers\NoteController::class . ':getById');
$app->put('/notes/{id}', \Note\controllers\NoteController::class . ':update');
$app->delete('/notes/{id}', \Note\controllers\NoteController::class . ':delete');
$app->get('/notesTemplates', \Note\controllers\NoteController::class . ':getTemplates');
390

391
392
393
394
395
396
397
//Parameters
$app->get('/parameters', \Parameter\controllers\ParameterController::class . ':get');
$app->post('/parameters', \Parameter\controllers\ParameterController::class . ':create');
$app->get('/parameters/{id}', \Parameter\controllers\ParameterController::class . ':getById');
$app->put('/parameters/{id}', \Parameter\controllers\ParameterController::class . ':update');
$app->delete('/parameters/{id}', \Parameter\controllers\ParameterController::class . ':delete');

398
399
//PasswordRules
$app->get('/passwordRules', \SrcCore\controllers\PasswordController::class . ':getRules');
Damien's avatar
Damien committed
400
$app->put('/passwordRules', \SrcCore\controllers\PasswordController::class . ':updateRules');
401

402
403
404
405
406
407
//Priorities
$app->get('/priorities', \Priority\controllers\PriorityController::class . ':get');
$app->post('/priorities', \Priority\controllers\PriorityController::class . ':create');
$app->get('/priorities/{id}', \Priority\controllers\PriorityController::class . ':getById');
$app->put('/priorities/{id}', \Priority\controllers\PriorityController::class . ':update');
$app->delete('/priorities/{id}', \Priority\controllers\PriorityController::class . ':delete');
Damien's avatar
Damien committed
408
409
$app->get('/sortedPriorities', \Priority\controllers\PriorityController::class . ':getSorted');
$app->put('/sortedPriorities', \Priority\controllers\PriorityController::class . ':updateSort');
410

Damien's avatar
Damien committed
411
412
//Resources
$app->post('/resources', \Resource\controllers\ResController::class . ':create');
413
$app->put('/resources/external', \Resource\controllers\ResController::class . ':getByExternalId');
414
$app->get('/resources/{resId}', \Resource\controllers\ResController::class . ':getById');
Damien's avatar
Damien committed
415
$app->put('/resources/{resId}', \Resource\controllers\ResController::class . ':update');
Damien's avatar
Damien committed
416
$app->get('/resources/{resId}/content', \Resource\controllers\ResController::class . ':getFileContent');
417
418
$app->get('/resources/{resId}/versionsInformations', \Resource\controllers\ResController::class . ':getVersionsInformations');
$app->get('/resources/{resId}/content/{version}', \Resource\controllers\ResController::class . ':getVersionFileContent');
Damien's avatar
Damien committed
419
$app->get('/resources/{resId}/originalContent', \Resource\controllers\ResController::class . ':getOriginalFileContent');
420
$app->get('/resources/{resId}/thumbnail', \Resource\controllers\ResController::class . ':getThumbnailContent');
421
$app->get('/resources/{resId}/thumbnail/{page}', \Resource\controllers\ResController::class . ':getThumbnailContentByPage');
422
$app->get('/resources/{resId}/isAllowed', \Resource\controllers\ResController::class . ':isAllowedForCurrentUser');
423
$app->get('/resources/{resId}/items', \Resource\controllers\ResController::class . ':getItems');
424
$app->get('/resources/{resId}/attachments', \Attachment\controllers\AttachmentController::class . ':getByResId');
Damien's avatar
Damien committed
425
$app->get('/resources/{resId}/contacts', \Contact\controllers\ContactController::class . ':getByResId');
426
427
$app->get('/resources/{resId}/emails', \Email\controllers\EmailController::class . ':getByResId');
$app->get('/resources/{resId}/notes', \Note\controllers\NoteController::class . ':getByResId');
428
$app->get('/resources/{resId}/templates', \Template\controllers\TemplateController::class . ':getByResId');
429
$app->get('/resources/{resId}/emailTemplates', \Template\controllers\TemplateController::class . ':getEmailTemplatesByResId');
430
$app->get('/resources/{resId}/listInstance', \Entity\controllers\ListInstanceController::class . ':getByResId');
431
$app->get('/resources/{resId}/listInstanceHistory', \Entity\controllers\ListInstanceHistoryController::class . ':getDiffusionListByResId');
432
433
$app->get('/resources/{resId}/visaCircuit', \Entity\controllers\ListInstanceController::class . ':getVisaCircuitByResId');
$app->get('/resources/{resId}/opinionCircuit', \Entity\controllers\ListInstanceController::class . ':getOpinionCircuitByResId');
434
$app->get('/resources/{resId}/parallelOpinion', \Entity\controllers\ListInstanceController::class . ':getParallelOpinionByResId');
435
$app->get('/resources/{resId}/defaultCircuit', \Entity\controllers\ListTemplateController::class . ':getDefaultCircuitByResId');
436
$app->get('/resources/{resId}/circuitsHistory', \Entity\controllers\ListInstanceHistoryController::class . ':getCircuitByResId');
437
438
$app->get('/resources/{resId}/linkedResources', \Resource\controllers\LinkController::class . ':getLinkedResources');
$app->post('/resources/{resId}/linkedResources', \Resource\controllers\LinkController::class . ':linkResources');
Damien's avatar
Damien committed
439
$app->put('/resources/{resId}/sign', \SignatureBook\controllers\SignatureBookController::class . ':signResource');
440
$app->put('/resources/{resId}/unsign', \SignatureBook\controllers\SignatureBookController::class . ':unsignResource');
441
442
$app->get('/resources/{resId}/acknowledgementReceipts', \AcknowledgementReceipt\controllers\AcknowledgementReceiptController::class . ':getByResId');
$app->get('/resources/{resId}/shippings', \Shipping\controllers\ShippingController::class . ':getByResId');
443
$app->get('/resources/{resId}/messageExchanges', \MessageExchange\controllers\MessageExchangeController::class . ':getByResId');
444
$app->get('/resources/{resId}/emailsInitialization', \Email\controllers\EmailController::class . ':getInitializationByResId');
445
446
447
$app->get('/resources/{resId}/fields/{fieldId}', \Resource\controllers\ResController::class . ':getField');
$app->delete('/resources/{resId}/linkedResources/{id}', \Resource\controllers\LinkController::class . ':unlinkResources');
$app->delete('/resources/{resId}/circuits/{type}', \Entity\controllers\ListInstanceController::class . ':deleteCircuit');
448
$app->get('/resources/{resId}/fileInformation', \Resource\controllers\ResController::class . ':getResourceFileInformation');
449
$app->get('/resources/{resId}/baskets', \Resource\controllers\UserFollowedResourceController::class . ':getBaskets');
450

451
452
$app->put('/res/resource/status', \Resource\controllers\ResController::class . ':updateStatus');
$app->post('/res/list', \Resource\controllers\ResController::class . ':getList');
453
$app->put('/res/externalInfos', \Resource\controllers\ResController::class . ':updateExternalInfos');
Damien's avatar
Damien committed
454
$app->get('/categories', \Resource\controllers\ResController::class . ':getCategories');
455
$app->get('/resources/{resId}/users/{userId}/isDestinationChanging', \Action\controllers\PreProcessActionController::class . ':isDestinationChanging');
456
$app->get('/resources/{resId}/users/{userId}/groups/{groupId}/baskets/{basketId}/processingData', \Resource\controllers\ResController::class . ':getProcessingData');
457
$app->post('/resources/folderPrint', \Resource\controllers\FolderPrintController::class . ':generateFile');
458

Damien's avatar
Damien committed
459
//ResourcesList
Damien's avatar
Damien committed
460
$app->get('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}', \Resource\controllers\ResourceListController::class . ':get');
Damien's avatar
Damien committed
461
$app->get('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions', \Resource\controllers\ResourceListController::class . ':getActions');
Damien's avatar
Damien committed
462
$app->put('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/lock', \Resource\controllers\ResourceListController::class . ':lock');
Damien's avatar
Damien committed
463
$app->put('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/unlock', \Resource\controllers\ResourceListController::class . ':unlock');
Damien's avatar
Damien committed
464
$app->get('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/filters', \Resource\controllers\ResourceListController::class . ':getFilters');
Damien's avatar
Damien committed
465
$app->put('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}', \Resource\controllers\ResourceListController::class . ':setAction');
466
$app->put('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/locked', \Resource\controllers\ResourceListController::class . ':areLocked');
467
$app->put('/resourcesList/exports', \Resource\controllers\ExportController::class . ':updateExport');
468
$app->post('/resourcesList/summarySheets', \Resource\controllers\SummarySheetController::class . ':createList');
Damien's avatar
Damien committed
469
$app->get('/resourcesList/exportTemplate', \Resource\controllers\ExportController::class . ':getExportTemplates');
470
$app->put('/resourcesList/integrations', \Resource\controllers\ResController::class . ':setInIntegrations');
471

472
//PreProcess
473
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkAcknowledgementReceipt', \Action\controllers\PreProcessActionController::class . ':checkAcknowledgementReceipt');
474
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/checkExternalSignatoryBook', \Action\controllers\PreProcessActionController::class . ':checkExternalSignatoryBook');
475
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/checkExternalNoteBook', \Action\controllers\PreProcessActionController::class . ':checkExternalNoteBook');
476
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/checkInitiatorEntity', \Action\controllers\PreProcessActionController::class . ':checkInitiatorEntity');
477
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/checkAttachmentsAndNotes', \Action\controllers\PreProcessActionController::class . ':checkAttachmentsAndNotes');
Damien's avatar
Damien committed
478
$app->get('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/getRedirect', \Action\controllers\PreProcessActionController::class . ':getRedirectInformations');
479
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkShippings', \Action\controllers\PreProcessActionController::class . ':checkShippings');
480
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkSignatureBook', \Action\controllers\PreProcessActionController::class . ':checkSignatureBook');
481
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkContinueVisaCircuit', \Action\controllers\PreProcessActionController::class . ':checkContinueVisaCircuit');
482
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkValidateParallelOpinion', \Action\controllers\PreProcessActionController::class . ':checkValidateParallelOpinion');
483
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkContinueOpinionCircuit', \Action\controllers\PreProcessActionController::class . ':checkContinueOpinionCircuit');
484
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkGiveParallelOpinion', \Action\controllers\PreProcessActionController::class . ':checkGiveParallelOpinion');
485
486
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkRejectVisa', \Action\controllers\PreProcessActionController::class . ':checkRejectVisa');
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkInterruptResetVisa', \Action\controllers\PreProcessActionController::class . ':checkInterruptResetVisa');
487
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkCloseWithFieldsAction', \Action\controllers\PreProcessActionController::class . ':checkCloseWithFieldsAction');
488
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkReconcile', \Action\controllers\PreProcessActionController::class . ':checkReconcile');
Damien's avatar
Damien committed
489
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkSendAlfresco', \Action\controllers\PreProcessActionController::class . ':checkSendAlfresco');
490
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkPrintDepositList', \Action\controllers\PreProcessActionController::class . ':checkPrintDepositList');
491
492
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/checkAcknowledgementRecordManagement', \Action\controllers\PreProcessActionController::class . ':checkAcknowledgementRecordManagement');
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/checkReplyRecordManagement', \Action\controllers\PreProcessActionController::class . ':checkReplyRecordManagement');
493
$app->post('/resourcesList/users/{userId}/groups/{groupId}/baskets/{basketId}/actions/{actionId}/checkSendToRecordManagement', \Action\controllers\PreProcessActionController::class . ':checkSendToRecordManagement');
494

495
//Search
Damien's avatar
Damien committed
496
$app->post('/search', \Search\controllers\SearchController::class . ':get');
497
$app->get('/search/configuration', \Search\controllers\SearchController::class . ':getConfiguration');
498

499
500
501
502
$app->get('/searchTemplates', \Search\controllers\SearchTemplateController::class . ':get');
$app->post('/searchTemplates', \Search\controllers\SearchTemplateController::class . ':create');
$app->delete('/searchTemplates/{id}', \Search\controllers\SearchTemplateController::class . ':delete');

Florian Azizian's avatar
Florian Azizian committed
503
//shipping
Florian Azizian's avatar
Florian Azizian committed
504
505
506
507
508
509
$app->get('/administration/shippings', \Shipping\controllers\ShippingTemplateController::class . ':get');
$app->get('/administration/shippings/new', \Shipping\controllers\ShippingTemplateController::class . ':initShipping');
$app->get('/administration/shippings/{id}', \Shipping\controllers\ShippingTemplateController::class . ':getById');
$app->post('/administration/shippings', \Shipping\controllers\ShippingTemplateController::class . ':create');
$app->put('/administration/shippings/{id}', \Shipping\controllers\ShippingTemplateController::class . ':update');
$app->delete('/administration/shippings/{id}', \Shipping\controllers\ShippingTemplateController::class . ':delete');
Florian Azizian's avatar
Florian Azizian committed
510

Damien's avatar
Damien committed
511
//SignatureBook
Damien's avatar
Damien committed
512
513
$app->get('/signatureBook/users/{userId}/groups/{groupId}/baskets/{basketId}/resources', \SignatureBook\controllers\SignatureBookController::class . ':getResources');
$app->get('/signatureBook/users/{userId}/groups/{groupId}/baskets/{basketId}/resources/{resId}', \SignatureBook\controllers\SignatureBookController::class . ':getSignatureBook');
Damien's avatar
Damien committed
514
515
516
$app->get('/signatureBook/{resId}/attachments', \SignatureBook\controllers\SignatureBookController::class . ':getAttachmentsById');
$app->get('/signatureBook/{resId}/incomingMailAttachments', \SignatureBook\controllers\SignatureBookController::class . ':getIncomingMailAndAttachmentsById');

517
518
519
520
521
522
523
524
525
//statuses
$app->get('/statuses', \Status\controllers\StatusController::class . ':get');
$app->post('/statuses', \Status\controllers\StatusController::class . ':create');
$app->get('/statuses/{identifier}', \Status\controllers\StatusController::class . ':getByIdentifier');
$app->get('/status/{id}', \Status\controllers\StatusController::class . ':getById');
$app->put('/statuses/{identifier}', \Status\controllers\StatusController::class . ':update');
$app->delete('/statuses/{identifier}', \Status\controllers\StatusController::class . ':delete');
$app->get('/administration/statuses/new', \Status\controllers\StatusController::class . ':getNewInformations');

526
//Tags
527
$app->get('/tags', \Tag\controllers\TagController::class . ':get');
528
$app->post('/tags', \Tag\controllers\TagController::class . ':create');
529
$app->get('/tags/{id}', \Tag\controllers\TagController::class . ':getById');
530
$app->put('/tags/{id}', \Tag\controllers\TagController::class . ':update');
531
$app->put('/mergeTags', \Tag\controllers\TagController::class . ':merge');
532
$app->delete('/tags/{id}', \Tag\controllers\TagController::class . ':delete');
533

534
//Templates
Damien's avatar
Damien committed
535
$app->get('/templates', \Template\controllers\TemplateController::class . ':get');
536
$app->post('/templates', \Template\controllers\TemplateController::class . ':create');
Damien's avatar
Damien committed
537
$app->get('/templates/{id}/details', \Template\controllers\TemplateController::class . ':getDetailledById');
538
$app->get('/templates/{id}/content', \Template\controllers\TemplateController::class . ':getContentById');
539
540
$app->put('/templates/{id}', \Template\controllers\TemplateController::class . ':update');
$app->delete('/templates/{id}', \Template\controllers\TemplateController::class . ':delete');
541
$app->post('/templates/{id}/duplicate', \Template\controllers\TemplateController::class . ':duplicate');
Damien's avatar
Damien committed
542
$app->get('/administration/templates/new', \Template\controllers\TemplateController::class . ':initTemplates');
543
$app->post('/templates/{id}/mergeEmail', \Template\controllers\TemplateController::class . ':mergeEmailTemplate');
544

545
546
547
//Tiles
$app->get('/tiles', \Home\controllers\TileController::class . ':get');
$app->post('/tiles', \Home\controllers\TileController::class . ':create');
Damien's avatar
Damien committed
548
$app->get('/tiles/{id}', \Home\controllers\TileController::class . ':getById');
549
550
551
$app->put('/tiles/{id}', \Home\controllers\TileController::class . ':update');
$app->delete('/tiles/{id}', \Home\controllers\TileController::class . ':delete');
$app->put('/tilesPositions', \Home\controllers\TileController::class . ':updatePositions');
552

553
//Users
554
555
$app->put('/users/export', \User\controllers\UserController::class . ':getExport');
$app->put('/users/import', \User\controllers\UserController::class . ':setImport');
Damien's avatar
Damien committed
556
$app->get('/users', \User\controllers\UserController::class . ':get');
Damien's avatar
Damien committed
557
$app->post('/users', \User\controllers\UserController::class . ':create');
558
$app->get('/users/{id}', \User\controllers\UserController::class . ':getById');
Damien's avatar
Damien committed
559
$app->put('/users/{id}', \User\controllers\UserController::class . ':update');
Damien's avatar
Damien committed
560
$app->delete('/users/{id}', \User\controllers\UserController::class . ':delete');
Damien's avatar
Damien committed
561
$app->put('/users/{id}/suspend', \User\controllers\UserController::class . ':suspend');
Damien's avatar
Damien committed
562
563
$app->get('/users/{id}/isDeletable', \User\controllers\UserController::class . ':isDeletable');
$app->get('/users/{id}/details', \User\controllers\UserController::class . ':getDetailledById');
Damien's avatar
Damien committed
564
$app->put('/users/{id}/password', \User\controllers\UserController::class . ':updatePassword');
Damien's avatar
Damien committed
565
$app->get('/users/{userId}/status', \User\controllers\UserController::class . ':getStatusByUserId');
Damien's avatar
Damien committed
566
$app->put('/users/{id}/status', \User\controllers\UserController::class . ':updateStatus');
567
568
569
$app->put('/users/{id}/createInMaarchParapheur', \ExternalSignatoryBook\controllers\MaarchParapheurController::class . ':sendUserToMaarchParapheur');
$app->put('/users/{id}/linkToMaarchParapheur', \ExternalSignatoryBook\controllers\MaarchParapheurController::class . ':linkUserToMaarchParapheur');
$app->put('/users/{id}/unlinkToMaarchParapheur', \ExternalSignatoryBook\controllers\MaarchParapheurController::class . ':unlinkUserToMaarchParapheur');
570
$app->get('/users/{id}/statusInMaarchParapheur', \ExternalSignatoryBook\controllers\MaarchParapheurController::class . ':userStatusInMaarchParapheur');
571
$app->put('/users/{id}/externalSignatures', \ExternalSignatoryBook\controllers\MaarchParapheurController::class . ':sendSignaturesToMaarchParapheur');
Damien's avatar
Damien committed
572
573
574
$app->post('/users/{id}/groups', \User\controllers\UserController::class . ':addGroup');
$app->put('/users/{id}/groups/{groupId}', \User\controllers\UserController::class . ':updateGroup');
$app->delete('/users/{id}/groups/{groupId}', \User\controllers\UserController::class . ':deleteGroup');
575
$app->get('/users/{id}/entities', \User\controllers\UserController::class . ':getEntities');
Damien's avatar
Damien committed
576
577
578
$app->post('/users/{id}/entities', \User\controllers\UserController::class . ':addEntity');
$app->put('/users/{id}/entities/{entityId}', \User\controllers\UserController::class . ':updateEntity');
$app->put('/users/{id}/entities/{entityId}/primaryEntity', \User\controllers\UserController::class . ':updatePrimaryEntity');
579
$app->get('/users/{id}/entities/{entityId}', \User\controllers\UserController::class . ':isEntityDeletable');
Damien's avatar
Damien committed
580
581
$app->delete('/users/{id}/entities/{entityId}', \User\controllers\UserController::class . ':deleteEntity');
$app->post('/users/{id}/signatures', \User\controllers\UserController::class . ':addSignature');
582
$app->get('/users/{id}/signatures/{signatureId}/content', \User\controllers\UserController::class . ':getImageContent');
Damien's avatar
Damien committed
583
584
585
$app->put('/users/{id}/signatures/{signatureId}', \User\controllers\UserController::class . ':updateSignature');
$app->delete('/users/{id}/signatures/{signatureId}', \User\controllers\UserController::class . ':deleteSignature');
$app->post('/users/{id}/redirectedBaskets', \User\controllers\UserController::class . ':setRedirectedBaskets');
586
$app->delete('/users/{id}/redirectedBaskets', \User\controllers\UserController::class . ':deleteRedirectedBasket');
Damien's avatar
Damien committed
587
$app->put('/users/{id}/baskets', \User\controllers\UserController::class . ':updateBasketsDisplay');
588
$app->put('/users/{id}/accountActivationNotification', \User\controllers\UserController::class . ':sendAccountActivationNotification');
589
$app->put('/users/{id}/absence', \User\controllers\UserController::class . ':setAbsenceRange');
Damien's avatar
Damien committed
590

591
$app->post('/password', \User\controllers\UserController::class . ':forgotPassword');
Florian Azizian's avatar
Florian Azizian committed
592
$app->put('/password', \User\controllers\UserController::class . ':passwordInitialization');
593

594
595
596
597
598
599
//UserFollowedResources
$app->post('/resources/follow', \Resource\controllers\UserFollowedResourceController::class . ':follow');
$app->delete('/resources/unfollow', \Resource\controllers\UserFollowedResourceController::class . ':unFollow');
$app->get('/followedResources', \Resource\controllers\UserFollowedResourceController::class . ':getFollowedResources');
$app->get('/followedResources/filters', \Resource\controllers\UserFollowedResourceController::class . ':getFilters');

Damien's avatar
Damien committed
600
601
//VersionsUpdate
$app->get('/versionsUpdate', \VersionUpdate\controllers\VersionUpdateController::class . ':get');
Damien's avatar
Damien committed
602
$app->put('/versionsUpdate', \VersionUpdate\controllers\VersionUpdateController::class . ':update');
603
$app->put('/versionsUpdateSQL', \VersionUpdate\controllers\VersionUpdateController::class . ':updateSQLVersion');
Damien's avatar
Damien committed
604

605
//CurrentUser
Damien's avatar
Damien committed
606
607
$app->get('/currentUser/profile', \User\controllers\UserController::class . ':getProfile');
$app->put('/currentUser/profile', \User\controllers\UserController::class . ':updateProfile');
608
$app->put('/currentUser/profile/preferences', \User\controllers\UserController::class . ':updateCurrentUserPreferences');
609
$app->put('/currentUser/profile/featureTour', \User\controllers\UserController::class . ':updateCurrentUserFeatureTour');
610
$app->post('/currentUser/emailSignatures', \User\controllers\UserController::class . ':createCurrentUserEmailSignature');
Damien's avatar
Damien committed
611
612
$app->put('/currentUser/emailSignature/{id}', \User\controllers\UserController::class . ':updateCurrentUserEmailSignature');
$app->delete('/currentUser/emailSignature/{id}', \User\controllers\UserController::class . ':deleteCurrentUserEmailSignature');
613
$app->put('/currentUser/groups/{groupId}/baskets/{basketId}', \User\controllers\UserController::class . ':updateCurrentUserBasketPreferences');
614
$app->get('/currentUser/templates', \User\controllers\UserController::class . ':getTemplates');
615
$app->get('/currentUser/emailSignatures', \User\controllers\UserController::class . ':getCurrentUserEmailSignatures');
616
$app->get('/currentUser/emailSignaturesList', \User\controllers\UserController::class . ':getCurrentUserEmailSignaturesList');
617
$app->get('/currentUser/emailSignatures/{id}', \User\controllers\UserController::class . ':getCurrentUserEmailSignatureById');
618
$app->get('/currentUser/globalEmailSignatures/{id}', \User\controllers\UserController::class . ':getGlobalEmailSignatureById');
619
$app->get('/currentUser/availableEmails', \Email\controllers\EmailController::class . ':getAvailableEmails');
Odran PHILIBERT's avatar
Odran PHILIBERT committed
620

621
//Notifications
622
623
$app->get('/notifications', \Notification\controllers\NotificationController::class . ':get');
$app->post('/notifications', \Notification\controllers\NotificationController::class . ':create');
624
625
$app->get('/notifications/schedule', \Notification\controllers\NotificationScheduleController::class . ':get');
$app->post('/notifications/schedule', \Notification\controllers\NotificationScheduleController::class . ':create');
626
627
628
629
$app->put('/notifications/{id}', \Notification\controllers\NotificationController::class . ':update');
$app->delete('/notifications/{id}', \Notification\controllers\NotificationController::class . ':delete');
$app->get('/administration/notifications/new', \Notification\controllers\NotificationController::class . ':initNotification');
$app->get('/notifications/{id}', \Notification\controllers\NotificationController::class . ':getBySid');
Florian Azizian's avatar
Florian Azizian committed
630
631
$app->post('/scriptNotification', \Notification\controllers\NotificationScheduleController::class . ':createScriptNotification');

632
633
//External MessageExchanges
$app->get('/messageExchanges/{id}', \MessageExchange\controllers\MessageExchangeController::class . ':getById');
634
$app->delete('/messageExchanges/{id}', \MessageExchange\controllers\MessageExchangeController::class . ':delete');
635
$app->get('/messageExchanges/{id}/archiveContent', \MessageExchange\controllers\MessageExchangeController::class . ':getArchiveContentById');
636
637
638
639
$app->post('/saveNumericPackage', \MessageExchange\controllers\ReceiveMessageExchangeController::class . ':saveMessageExchange');
$app->post('/saveMessageExchangeReturn', \MessageExchange\controllers\ReceiveMessageExchangeController::class . ':saveMessageExchangeReturn');
$app->post('/saveMessageExchangeReview', \MessageExchange\controllers\MessageExchangeReviewController::class . ':saveMessageExchangeReview');
$app->post('/resources/{resId}/messageExchange', \MessageExchange\controllers\SendMessageExchangeController::class . ':createMessageExchange');
640
$app->get('/messageExchangesInitialization', \MessageExchange\controllers\SendMessageExchangeController::class . ':getInitialization');
641

642
//ExternalSignatoryBooks
643
$app->get('/documents/{id}/maarchParapheurWorkflow', \ExternalSignatoryBook\controllers\MaarchParapheurController::class . ':getWorkflow');
644
$app->get('/maarchParapheur/user/{id}/picture', \ExternalSignatoryBook\controllers\MaarchParapheurController::class . ':getUserPicture');
645
$app->get('/externalSignatureBooks/enabled', \ExternalSignatoryBook\controllers\ExternalSignatureBookController::class . ':getEnabledSignatureBook');
646
647
$app->get('/externalSummary/{resId}', \ExternalSummary\controllers\SummaryController::class . ':getByResId');

648
$app->get('/externalConnectionsEnabled', \SrcCore\controllers\CoreController::class . ':externalConnectionsEnabled');
649

Damien's avatar
Damien committed
650
//Alfresco
651
652
$app->get('/alfresco/configuration', \Alfresco\controllers\AlfrescoController::class . ':getConfiguration');
$app->put('/alfresco/configuration', \Alfresco\controllers\AlfrescoController::class . ':updateConfiguration');
653
$app->get('/alfresco/availableEntities', \Alfresco\controllers\AlfrescoController::class . ':getAvailableEntities');
654
$app->get('/alfresco/accounts', \Alfresco\controllers\AlfrescoController::class . ':getAccounts');
655
656
$app->post('/alfresco/accounts', \Alfresco\controllers\AlfrescoController::class . ':createAccount');
$app->get('/alfresco/accounts/{id}', \Alfresco\controllers\AlfrescoController::class . ':getAccountById');
657
658
$app->put('/alfresco/accounts/{id}', \Alfresco\controllers\AlfrescoController::class . ':updateAccount');
$app->delete('/alfresco/accounts/{id}', \Alfresco\controllers\AlfrescoController::class . ':deleteAccount');
659
$app->post('/alfresco/checkAccounts', \Alfresco\controllers\AlfrescoController::class . ':checkAccount');
Damien's avatar
Damien committed
660
661
662
663
$app->get('/alfresco/rootFolders', \Alfresco\controllers\AlfrescoController::class . ':getRootFolders');
$app->get('/alfresco/folders/{id}/children', \Alfresco\controllers\AlfrescoController::class . ':getChildrenFoldersById');
$app->get('/alfresco/autocomplete/folders', \Alfresco\controllers\AlfrescoController::class . ':getFolders');

664
665
666
// Collabora Online
$app->get('/wopi/files/{id}/contents', \ContentManagement\controllers\CollaboraOnlineController::class . ':getFileContent');
$app->get('/wopi/files/{id}', \ContentManagement\controllers\CollaboraOnlineController::class . ':getCheckFileInfo');
667
$app->post('/wopi/files/{id}/contents', \ContentManagement\controllers\CollaboraOnlineController::class . ':saveFile');
668
669
$app->post('/collaboraOnline/configuration', \ContentManagement\controllers\CollaboraOnlineController::class . ':getConfiguration');
$app->get('/collaboraOnline/available', \ContentManagement\controllers\CollaboraOnlineController::class . ':isAvailable');
670
$app->post('/collaboraOnline/file', \ContentManagement\controllers\CollaboraOnlineController::class . ':getTmpFile');
671
$app->delete('/collaboraOnline/file', \ContentManagement\controllers\CollaboraOnlineController::class . ':deleteTmpFile');
672
$app->post('/collaboraOnline/encodedFile', \ContentManagement\controllers\CollaboraOnlineController::class . ':saveTmpEncodedDocument');
673

674
// Archival
675
$app->get('/archival/retentionRules', \ExportSeda\controllers\SedaController::class . ':getRetentionRules');
676
677
$app->put('/archival/binding', \ExportSeda\controllers\SedaController::class . ':setBindingDocument');
$app->put('/archival/freezeRetentionRule', \ExportSeda\controllers\SedaController::class . ':freezeRetentionRule');
678

679
680
681
682
683
684
// Registered mail
$app->get('/registeredMail/sites', \RegisteredMail\controllers\IssuingSiteController::class . ':get');
$app->get('/registeredMail/sites/{id}', \RegisteredMail\controllers\IssuingSiteController::class . ':getById');
$app->post('/registeredMail/sites', \RegisteredMail\controllers\IssuingSiteController::class . ':create');
$app->put('/registeredMail/sites/{id}', \RegisteredMail\controllers\IssuingSiteController::class . ':update');
$app->delete('/registeredMail/sites/{id}', \RegisteredMail\controllers\IssuingSiteController::class . ':delete');
685