stable
Clone or download
Read-only
For better consistency of searching for items via REST API, the docman_search/:id route is rewritten to accept the following format: ``` { "global_search": "lorem*", "properties": [ {"name": "status", "value": "draft"}, {"name": "field_3", "value": "lorem*"}, {"name": "create_date", "value_date": { "date": "2022-01-30", operator: ">" } }, ], "limit": 50, "offset": 150 } ``` The added bonus is that it is now easier to define in TypeScript the expected format for the request body (no moar soup of Record<>). No functional changes is expected. Part of story #24197: search for Documents with criteria Change-Id: Ia49275574ef11811d740ca4701fd24378c45e7eb
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/docman/include/REST/v1/Folders/SearchReportBuilder.php | +53 | −90 | Go to diff View file |
M | plugins/docman/include/REST/v1/Search/PostSearchRepresentation.php | +2 | −43 | Go to diff View file |
R | plugins/docman/include/REST/v1/Search/CustomPropertyRepresentation.php | Go to diff View file | ||
M | plugins/docman/include/REST/v1/SearchResource.php | +52 | −43 | Go to diff View file |
M | plugins/docman/tests/unit/REST/v1/Folders/SearchReportBuilderTest.php | +145 | −113 | Go to diff View file |
M | plugins/document/scripts/document/api/rest-querier.test.ts | +42 | −18 | Go to diff View file |
M | plugins/document/scripts/document/helpers/get-rest-body-from-search-params.test.ts | +29 | −27 | Go to diff View file |
M | plugins/document/scripts/document/helpers/get-rest-body-from-search-params.ts | +25 | −58 | Go to diff View file |
M | plugins/document/scripts/document/type.ts | +35 | −0 | Go to diff View file |