invenio-app-ils 1.0.0a54__py2.py3-none-any.whl → 6.1.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- invenio_app_ils/__init__.py +2 -2
- invenio_app_ils/acquisition/api.py +3 -1
- invenio_app_ils/acquisition/config.py +10 -21
- invenio_app_ils/acquisition/jsonresolvers/order_order_lines.py +1 -0
- invenio_app_ils/acquisition/mappings/os-v1/acq_orders/order-v1.0.0.json +364 -0
- invenio_app_ils/acquisition/mappings/os-v2/__init__.py +0 -0
- invenio_app_ils/acquisition/mappings/os-v2/acq_orders/order-v1.0.0.json +364 -0
- invenio_app_ils/acquisition/mappings/v7/acq_orders/order-v1.0.0.json +14 -0
- invenio_app_ils/acquisition/search.py +5 -15
- invenio_app_ils/assets/semantic-ui/less/theme.config +103 -0
- invenio_app_ils/assets/semantic-ui/templates/.gitkeep +0 -0
- invenio_app_ils/circulation/api.py +153 -67
- invenio_app_ils/circulation/config.py +29 -25
- invenio_app_ils/circulation/indexer.py +14 -19
- invenio_app_ils/circulation/loaders/__init__.py +2 -0
- invenio_app_ils/circulation/loaders/schemas/json/loan_checkout.py +2 -3
- invenio_app_ils/circulation/loaders/schemas/json/loan_request.py +82 -16
- invenio_app_ils/circulation/loaders/schemas/json/loan_self_checkout.py +19 -0
- invenio_app_ils/circulation/notifications/api.py +23 -19
- invenio_app_ils/circulation/notifications/messages.py +6 -6
- invenio_app_ils/circulation/notifications/tasks.py +1 -2
- invenio_app_ils/circulation/receivers.py +2 -5
- invenio_app_ils/circulation/search.py +23 -22
- invenio_app_ils/circulation/serializers/__init__.py +2 -2
- invenio_app_ils/circulation/serializers/csv.py +1 -3
- invenio_app_ils/circulation/serializers/custom_fields.py +5 -9
- invenio_app_ils/circulation/serializers/json.py +2 -6
- invenio_app_ils/circulation/serializers/response.py +12 -12
- invenio_app_ils/circulation/stats/views.py +5 -15
- invenio_app_ils/circulation/tasks.py +2 -6
- invenio_app_ils/circulation/templates/invenio_app_ils_circulation/notifications/self_checkout.html +19 -0
- invenio_app_ils/circulation/templates/invenio_app_ils_circulation/notifications/update_dates.html +19 -0
- invenio_app_ils/circulation/utils.py +23 -17
- invenio_app_ils/circulation/views.py +103 -39
- invenio_app_ils/cli.py +220 -260
- invenio_app_ils/closures/api.py +72 -7
- invenio_app_ils/closures/serializers/__init__.py +16 -0
- invenio_app_ils/closures/serializers/response.py +35 -0
- invenio_app_ils/closures/serializers/schema.py +28 -0
- invenio_app_ils/closures/tasks.py +4 -11
- invenio_app_ils/closures/views.py +66 -0
- invenio_app_ils/config.py +207 -150
- invenio_app_ils/document_requests/api.py +6 -21
- invenio_app_ils/document_requests/loaders/__init__.py +4 -12
- invenio_app_ils/document_requests/mappings/{v6 → os-v1}/__init__.py +2 -2
- invenio_app_ils/document_requests/mappings/os-v1/document_requests/document_request-v1.0.0.json +196 -0
- invenio_app_ils/document_requests/mappings/os-v2/__init__.py +8 -0
- invenio_app_ils/document_requests/mappings/os-v2/document_requests/document_request-v1.0.0.json +196 -0
- invenio_app_ils/document_requests/notifications/api.py +2 -7
- invenio_app_ils/document_requests/notifications/messages.py +3 -7
- invenio_app_ils/document_requests/search.py +2 -6
- invenio_app_ils/document_requests/views.py +4 -10
- invenio_app_ils/documents/api.py +19 -25
- invenio_app_ils/documents/indexer.py +13 -20
- invenio_app_ils/documents/jsonresolvers/document_circulation.py +11 -33
- invenio_app_ils/documents/jsonresolvers/document_eitem.py +1 -0
- invenio_app_ils/documents/jsonresolvers/document_item.py +8 -9
- invenio_app_ils/documents/jsonresolvers/document_stock.py +7 -7
- invenio_app_ils/documents/loaders/jsonschemas/document.py +3 -14
- invenio_app_ils/documents/mappings/{v6 → os-v1}/__init__.py +1 -1
- invenio_app_ils/documents/mappings/os-v1/documents/document-v1.0.0.json +932 -0
- invenio_app_ils/documents/mappings/os-v1/documents/document-v2.0.0.json +1066 -0
- invenio_app_ils/documents/mappings/os-v2/__init__.py +8 -0
- invenio_app_ils/documents/mappings/os-v2/documents/document-v1.0.0.json +932 -0
- invenio_app_ils/documents/mappings/os-v2/documents/document-v2.0.0.json +1066 -0
- invenio_app_ils/documents/mappings/v7/documents/document-v1.0.0.json +102 -11
- invenio_app_ils/documents/mappings/v7/documents/document-v2.0.0.json +1066 -0
- invenio_app_ils/documents/schemas/documents/document-v2.0.0.json +732 -0
- invenio_app_ils/eitems/api.py +41 -7
- invenio_app_ils/eitems/loaders/jsonschemas/eitems.py +6 -6
- invenio_app_ils/eitems/mappings/{v6 → os-v1}/__init__.py +1 -1
- invenio_app_ils/eitems/mappings/os-v1/eitems/eitem-v1.0.0.json +139 -0
- invenio_app_ils/eitems/mappings/os-v1/eitems/eitem-v2.0.0.json +142 -0
- invenio_app_ils/eitems/mappings/os-v1/eitems/eitem-v3.0.0.json +179 -0
- invenio_app_ils/{series/mappings/v6 → eitems/mappings/os-v2}/__init__.py +1 -1
- invenio_app_ils/eitems/mappings/os-v2/eitems/eitem-v1.0.0.json +139 -0
- invenio_app_ils/eitems/mappings/os-v2/eitems/eitem-v2.0.0.json +142 -0
- invenio_app_ils/eitems/mappings/os-v2/eitems/eitem-v3.0.0.json +179 -0
- invenio_app_ils/eitems/mappings/v7/eitems/eitem-v1.0.0.json +12 -2
- invenio_app_ils/eitems/mappings/v7/eitems/eitem-v2.0.0.json +142 -0
- invenio_app_ils/eitems/mappings/v7/eitems/eitem-v3.0.0.json +179 -0
- invenio_app_ils/eitems/schemas/eitems/eitem-v2.0.0.json +120 -0
- invenio_app_ils/eitems/schemas/eitems/eitem-v3.0.0.json +120 -0
- invenio_app_ils/eitems/search.py +3 -9
- invenio_app_ils/errors.py +119 -6
- invenio_app_ils/ext.py +15 -18
- invenio_app_ils/facets.py +13 -15
- invenio_app_ils/files/receivers.py +1 -1
- invenio_app_ils/files/views.py +1 -2
- invenio_app_ils/ill/api.py +1 -2
- invenio_app_ils/ill/config.py +10 -16
- invenio_app_ils/ill/jsonresolvers/borrowing_request_document.py +2 -3
- invenio_app_ils/ill/jsonresolvers/borrowing_request_patron.py +1 -3
- invenio_app_ils/ill/jsonresolvers/borrowing_request_provider.py +1 -3
- invenio_app_ils/ill/loaders/__init__.py +3 -9
- invenio_app_ils/ill/loaders/jsonschemas/patron_loan_actions.py +1 -8
- invenio_app_ils/ill/loaders/jsonschemas/patron_loan_extension_actions.py +3 -8
- invenio_app_ils/ill/mappings/{v6 → os-v1}/__init__.py +1 -1
- invenio_app_ils/ill/mappings/os-v1/ill_borrowing_requests/borrowing_request-v1.0.0.json +254 -0
- invenio_app_ils/{acquisition/mappings/v6 → ill/mappings/os-v2}/__init__.py +1 -1
- invenio_app_ils/ill/mappings/os-v2/ill_borrowing_requests/borrowing_request-v1.0.0.json +254 -0
- invenio_app_ils/ill/mappings/v7/ill_borrowing_requests/borrowing_request-v1.0.0.json +14 -0
- invenio_app_ils/ill/notifications/api.py +1 -4
- invenio_app_ils/ill/search.py +3 -9
- invenio_app_ils/ill/serializers/__init__.py +1 -3
- invenio_app_ils/ill/views.py +2 -4
- invenio_app_ils/internal_locations/api.py +1 -4
- invenio_app_ils/internal_locations/mappings/{v6 → os-v1}/__init__.py +1 -1
- invenio_app_ils/internal_locations/mappings/os-v1/internal_locations/internal_location-v1.0.0.json +108 -0
- invenio_app_ils/internal_locations/mappings/os-v2/__init__.py +8 -0
- invenio_app_ils/internal_locations/mappings/os-v2/internal_locations/internal_location-v1.0.0.json +108 -0
- invenio_app_ils/internal_locations/search.py +1 -3
- invenio_app_ils/items/api.py +18 -15
- invenio_app_ils/items/indexer.py +1 -3
- invenio_app_ils/items/jsonresolvers/item_document.py +1 -1
- invenio_app_ils/items/jsonresolvers/item_internal_location.py +2 -6
- invenio_app_ils/items/loaders/jsonschemas/items.py +2 -0
- {tests/api/circulation → invenio_app_ils/items/mappings/os-v1}/__init__.py +1 -1
- invenio_app_ils/items/mappings/os-v1/items/item-v1.0.0.json +285 -0
- invenio_app_ils/items/mappings/os-v1/items/item-v2.0.0.json +326 -0
- {tests/api/ill → invenio_app_ils/items/mappings/os-v2}/__init__.py +1 -1
- invenio_app_ils/items/mappings/os-v2/items/item-v1.0.0.json +285 -0
- invenio_app_ils/items/mappings/os-v2/items/item-v2.0.0.json +326 -0
- invenio_app_ils/items/mappings/v7/items/item-v1.0.0.json +11 -0
- invenio_app_ils/items/mappings/v7/items/item-v2.0.0.json +326 -0
- invenio_app_ils/items/schemas/items/item-v1.0.0.json +22 -0
- invenio_app_ils/items/schemas/items/item-v2.0.0.json +172 -0
- invenio_app_ils/items/search.py +18 -11
- invenio_app_ils/items/serializers/item.py +7 -6
- invenio_app_ils/literature/api.py +1 -3
- invenio_app_ils/literature/search.py +3 -5
- invenio_app_ils/literature/serializers/csv.py +1 -3
- invenio_app_ils/literature/serializers/json.py +1 -3
- invenio_app_ils/locations/api.py +2 -4
- invenio_app_ils/locations/indexer.py +3 -9
- invenio_app_ils/locations/loaders/__init__.py +1 -3
- invenio_app_ils/locations/loaders/jsonschemas/location.py +4 -11
- invenio_app_ils/locations/mappings/{v6 → os-v1}/__init__.py +1 -1
- invenio_app_ils/locations/mappings/os-v1/locations/location-v1.0.0.json +90 -0
- invenio_app_ils/locations/mappings/os-v2/__init__.py +8 -0
- invenio_app_ils/locations/mappings/os-v2/locations/location-v1.0.0.json +90 -0
- invenio_app_ils/notifications/messages.py +4 -3
- invenio_app_ils/notifications/tasks.py +1 -3
- invenio_app_ils/notifications/views.py +2 -2
- invenio_app_ils/patrons/anonymization.py +53 -32
- invenio_app_ils/patrons/api.py +3 -5
- invenio_app_ils/patrons/cli.py +1 -2
- invenio_app_ils/patrons/indexer.py +4 -13
- invenio_app_ils/patrons/mappings/os-v1/__init__.py +8 -0
- invenio_app_ils/patrons/mappings/os-v1/patrons/patron-v1.0.0.json +42 -0
- invenio_app_ils/patrons/mappings/os-v2/__init__.py +8 -0
- invenio_app_ils/patrons/mappings/os-v2/patrons/patron-v1.0.0.json +42 -0
- invenio_app_ils/patrons/views.py +4 -14
- invenio_app_ils/permissions.py +93 -35
- invenio_app_ils/providers/api.py +2 -6
- invenio_app_ils/providers/config.py +11 -19
- invenio_app_ils/providers/indexer.py +2 -6
- invenio_app_ils/providers/mappings/{v6 → os-v1}/__init__.py +1 -1
- invenio_app_ils/providers/mappings/os-v1/providers/provider-v1.0.0.json +57 -0
- invenio_app_ils/providers/mappings/os-v2/__init__.py +8 -0
- invenio_app_ils/providers/mappings/os-v2/providers/provider-v1.0.0.json +57 -0
- invenio_app_ils/providers/mappings/v7/__init__.py +1 -1
- invenio_app_ils/providers/proxies.py +1 -3
- invenio_app_ils/records/api.py +3 -9
- invenio_app_ils/records/loaders/schemas/changed_by.py +1 -3
- invenio_app_ils/records/loaders/schemas/identifiers.py +23 -0
- invenio_app_ils/records/metadata_extensions.py +1 -4
- invenio_app_ils/records/permissions.py +8 -2
- invenio_app_ils/records/serializers/__init__.py +1 -4
- invenio_app_ils/records/views.py +4 -7
- invenio_app_ils/records_relations/api.py +11 -34
- invenio_app_ils/records_relations/indexer.py +1 -3
- invenio_app_ils/records_relations/retriever.py +14 -9
- invenio_app_ils/records_relations/views.py +16 -50
- invenio_app_ils/relations/api.py +17 -16
- invenio_app_ils/search_permissions.py +24 -24
- invenio_app_ils/series/api.py +10 -12
- invenio_app_ils/series/loaders/jsonschemas/series.py +3 -2
- invenio_app_ils/{items/mappings/v6 → series/mappings/os-v1}/__init__.py +1 -1
- invenio_app_ils/series/mappings/os-v1/series/series-v1.0.0.json +324 -0
- invenio_app_ils/series/mappings/os-v1/series/series-v2.0.0.json +396 -0
- {tests/api/acquisition → invenio_app_ils/series/mappings/os-v2}/__init__.py +1 -1
- invenio_app_ils/series/mappings/os-v2/series/series-v1.0.0.json +324 -0
- invenio_app_ils/series/mappings/os-v2/series/series-v2.0.0.json +396 -0
- invenio_app_ils/series/mappings/v7/series/series-v1.0.0.json +35 -3
- invenio_app_ils/series/mappings/v7/series/series-v2.0.0.json +396 -0
- invenio_app_ils/series/schemas/series/series-v2.0.0.json +354 -0
- invenio_app_ils/stats/aggregations/aggr_file_download/os-v1/aggr-file-download-v1.json +60 -0
- invenio_app_ils/stats/aggregations/aggr_file_download/os-v2/__init__.py +9 -0
- invenio_app_ils/stats/aggregations/aggr_file_download/os-v2/aggr-file-download-v1.json +60 -0
- invenio_app_ils/stats/event_builders.py +73 -0
- invenio_app_ils/stats/file_download/os-v1/file-download-v1.json +72 -0
- invenio_app_ils/stats/file_download/os-v2/__init__.py +9 -0
- invenio_app_ils/stats/file_download/os-v2/file-download-v1.json +72 -0
- invenio_app_ils/stats/processors.py +30 -0
- invenio_app_ils/stats/templates/aggregations/__init__.py +8 -0
- invenio_app_ils/stats/templates/aggregations/ils_record_changes/__init__.py +8 -0
- invenio_app_ils/stats/templates/aggregations/ils_record_changes/os-v2/__init__.py +8 -0
- invenio_app_ils/stats/templates/aggregations/ils_record_changes/os-v2/aggr-ils-record-changes-v1.json +41 -0
- {tests → invenio_app_ils/stats/templates/events}/__init__.py +2 -2
- invenio_app_ils/stats/templates/events/ils_record_changes/__init__.py +8 -0
- invenio_app_ils/stats/templates/events/ils_record_changes/os-v2/__init__.py +8 -0
- invenio_app_ils/stats/templates/events/ils_record_changes/os-v2/ils-record-changes-v1.json +41 -0
- invenio_app_ils/templates/logged_out.html +12 -0
- invenio_app_ils/views.py +18 -4
- invenio_app_ils/vocabularies/api.py +1 -1
- invenio_app_ils/vocabularies/cli.py +6 -18
- invenio_app_ils/vocabularies/data/acq_order_line_payment_modes.json +5 -0
- invenio_app_ils/vocabularies/data/identifier_schemes.json +5 -0
- invenio_app_ils/vocabularies/indexer.py +1 -4
- invenio_app_ils/vocabularies/jsonresolvers/licenses.py +2 -11
- invenio_app_ils/vocabularies/mappings/os-v1/__init__.py +8 -0
- invenio_app_ils/vocabularies/mappings/os-v1/vocabularies/vocabulary-v1.0.0.json +23 -0
- invenio_app_ils/vocabularies/mappings/os-v2/__init__.py +8 -0
- invenio_app_ils/vocabularies/mappings/os-v2/vocabularies/vocabulary-v1.0.0.json +23 -0
- invenio_app_ils/vocabularies/sources/base.py +1 -3
- invenio_app_ils/webpack.py +27 -0
- invenio_app_ils-6.1.0.dist-info/METADATA +627 -0
- {invenio_app_ils-1.0.0a54.dist-info → invenio_app_ils-6.1.0.dist-info}/RECORD +227 -249
- {invenio_app_ils-1.0.0a54.dist-info → invenio_app_ils-6.1.0.dist-info}/WHEEL +1 -1
- {invenio_app_ils-1.0.0a54.dist-info → invenio_app_ils-6.1.0.dist-info}/entry_points.txt +9 -5
- {invenio_app_ils-1.0.0a54.dist-info → invenio_app_ils-6.1.0.dist-info}/top_level.txt +0 -1
- invenio_app_ils/acquisition/mappings/v6/acq_orders/order-v1.0.0.json +0 -352
- invenio_app_ils/document_requests/mappings/v6/document_requests/document_request-v1.0.0.json +0 -199
- invenio_app_ils/documents/mappings/v6/documents/document-v1.0.0.json +0 -843
- invenio_app_ils/eitems/mappings/v6/eitems/eitem-v1.0.0.json +0 -131
- invenio_app_ils/ill/mappings/v6/ill_borrowing_requests/borrowing_request-v1.0.0.json +0 -242
- invenio_app_ils/internal_locations/mappings/v6/internal_locations/internal_location-v1.0.0.json +0 -110
- invenio_app_ils/items/mappings/v6/items/item-v1.0.0.json +0 -276
- invenio_app_ils/locations/mappings/v6/locations/location-v1.0.0.json +0 -92
- invenio_app_ils/notifications/admin.py +0 -57
- invenio_app_ils/patrons/mappings/v6/__init__.py +0 -8
- invenio_app_ils/patrons/mappings/v6/patrons/patron-v1.0.0.json +0 -44
- invenio_app_ils/providers/mappings/v6/providers/provider-v1.0.0.json +0 -59
- invenio_app_ils/series/mappings/v6/series/series-v1.0.0.json +0 -298
- invenio_app_ils/stats/aggregations/aggr_file_download/v6/aggr-file-download-v1.json +0 -59
- invenio_app_ils/stats/file_download/v6/file-download-v1.json +0 -74
- invenio_app_ils/version.py +0 -14
- invenio_app_ils/vocabularies/mappings/v6/__init__.py +0 -8
- invenio_app_ils/vocabularies/mappings/v6/vocabularies/vocabulary-v1.0.0.json +0 -25
- invenio_app_ils-1.0.0a54.dist-info/METADATA +0 -95
- tests/api/__init__.py +0 -8
- tests/api/acquisition/test_acq_orders_crud.py +0 -102
- tests/api/acquisition/test_acq_orders_permissions.py +0 -104
- tests/api/acquisition/test_acq_providers_permissions.py +0 -83
- tests/api/circulation/test_expired_loans.py +0 -88
- tests/api/circulation/test_loan_checkout.py +0 -216
- tests/api/circulation/test_loan_default_durations.py +0 -57
- tests/api/circulation/test_loan_document_resolver.py +0 -18
- tests/api/circulation/test_loan_extend.py +0 -132
- tests/api/circulation/test_loan_item_permissions.py +0 -139
- tests/api/circulation/test_loan_item_resolver.py +0 -26
- tests/api/circulation/test_loan_list_permissions.py +0 -104
- tests/api/circulation/test_loan_patron_resolver.py +0 -38
- tests/api/circulation/test_loan_request.py +0 -234
- tests/api/circulation/test_loan_update.py +0 -150
- tests/api/circulation/test_notifications.py +0 -229
- tests/api/conftest.py +0 -236
- tests/api/document_requests/__init__.py +0 -8
- tests/api/document_requests/test_document_requests.py +0 -131
- tests/api/document_requests/test_document_requests_permissions.py +0 -177
- tests/api/document_requests/test_notifications_filter.py +0 -36
- tests/api/ill/test_ill_brw_crud.py +0 -84
- tests/api/ill/test_ill_brw_reqs_patron_loan_create_action.py +0 -207
- tests/api/ill/test_ill_brw_reqs_patron_loan_extension_actions.py +0 -298
- tests/api/ill/test_ill_brw_reqs_permissions.py +0 -169
- tests/api/ill/test_ill_providers_permissions.py +0 -82
- tests/api/ils/__init__.py +0 -8
- tests/api/ils/documents/__init__.py +0 -8
- tests/api/ils/documents/test_document_crud.py +0 -57
- tests/api/ils/documents/test_document_permissions.py +0 -106
- tests/api/ils/documents/test_document_resolvers.py +0 -35
- tests/api/ils/eitems/__init__.py +0 -8
- tests/api/ils/eitems/test_eitems_crud.py +0 -41
- tests/api/ils/eitems/test_eitems_permissions.py +0 -84
- tests/api/ils/eitems/test_files.py +0 -172
- tests/api/ils/items/__init__.py +0 -8
- tests/api/ils/items/test_apis.py +0 -43
- tests/api/ils/items/test_items_crud.py +0 -60
- tests/api/ils/items/test_items_permissions.py +0 -107
- tests/api/ils/items/test_items_update.py +0 -47
- tests/api/ils/records_relations/__init__.py +0 -8
- tests/api/ils/records_relations/helpers.py +0 -115
- tests/api/ils/records_relations/test_records_relations_parentchild.py +0 -560
- tests/api/ils/records_relations/test_records_relations_sequence.py +0 -302
- tests/api/ils/records_relations/test_records_relations_siblings.py +0 -678
- tests/api/ils/series/__init__.py +0 -8
- tests/api/ils/series/test_series_permissions.py +0 -95
- tests/api/ils/test_anonymization.py +0 -189
- tests/api/ils/test_apis.py +0 -76
- tests/api/ils/test_closures.py +0 -324
- tests/api/ils/test_errors.py +0 -126
- tests/api/ils/test_facets.py +0 -84
- tests/api/ils/test_internal_locations.py +0 -96
- tests/api/ils/test_loaders.py +0 -55
- tests/api/ils/test_metadata_extensions.py +0 -205
- tests/api/ils/test_notifications.py +0 -183
- tests/api/ils/test_notifications_mails.py +0 -39
- tests/api/ils/test_notifications_permissions.py +0 -55
- tests/api/ils/test_patrons.py +0 -106
- tests/api/ils/test_record_delete.py +0 -46
- tests/api/ils/test_record_permissions.py +0 -135
- tests/api/ils/test_resolvers.py +0 -207
- tests/api/ils/test_stats.py +0 -160
- tests/api/ils/test_tasks.py +0 -211
- tests/api/ils/test_vocabularies.py +0 -35
- tests/conftest.py +0 -123
- tests/data/acq_orders.json +0 -89
- tests/data/acq_providers.json +0 -12
- tests/data/document_requests.json +0 -77
- tests/data/documents.json +0 -237
- tests/data/eitems.json +0 -66
- tests/data/ill_borrowing_requests.json +0 -77
- tests/data/ill_providers.json +0 -12
- tests/data/internal_locations.json +0 -22
- tests/data/items.json +0 -271
- tests/data/loans.json +0 -133
- tests/data/loans_most_loaned.json +0 -128
- tests/data/locations.json +0 -20
- tests/data/series.json +0 -33
- tests/helpers.py +0 -104
- tests/templates/notifications/title_body.html +0 -8
- tests/templates/notifications/title_body_html.html +0 -13
- tests/templates/notifications/title_body_html_ctx.html +0 -13
- tests/templates/notifications/title_only.html +0 -3
- tests/test_version.py +0 -17
- /tests/templates/notifications/blank.html → /invenio_app_ils/acquisition/mappings/os-v1/__init__.py +0 -0
- /invenio_app_ils/stats/aggregations/aggr_file_download/{v6 → os-v1}/__init__.py +0 -0
- /invenio_app_ils/stats/file_download/{v6 → os-v1}/__init__.py +0 -0
- {invenio_app_ils-1.0.0a54.dist-info → invenio_app_ils-6.1.0.dist-info/licenses}/AUTHORS.rst +0 -0
- {invenio_app_ils-1.0.0a54.dist-info → invenio_app_ils-6.1.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"index_patterns": ["__SEARCH_INDEX_PREFIX__events-stats-file-download-*"],
|
|
3
|
+
"settings": {
|
|
4
|
+
"index": {
|
|
5
|
+
"refresh_interval": "5s"
|
|
6
|
+
}
|
|
7
|
+
},
|
|
8
|
+
"mappings": {
|
|
9
|
+
"date_detection": false,
|
|
10
|
+
"dynamic": false,
|
|
11
|
+
"dynamic_templates": [
|
|
12
|
+
{
|
|
13
|
+
"date_fields": {
|
|
14
|
+
"match_mapping_type": "date",
|
|
15
|
+
"mapping": {
|
|
16
|
+
"type": "date",
|
|
17
|
+
"format": "strict_date_hour_minute_second"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"numeric_detection": false,
|
|
23
|
+
"properties": {
|
|
24
|
+
"bucket_id": {
|
|
25
|
+
"type": "keyword"
|
|
26
|
+
},
|
|
27
|
+
"collection": {
|
|
28
|
+
"type": "keyword"
|
|
29
|
+
},
|
|
30
|
+
"country": {
|
|
31
|
+
"type": "keyword"
|
|
32
|
+
},
|
|
33
|
+
"document_pid": {
|
|
34
|
+
"type": "keyword"
|
|
35
|
+
},
|
|
36
|
+
"eitem_pid": {
|
|
37
|
+
"type": "keyword"
|
|
38
|
+
},
|
|
39
|
+
"file_id": {
|
|
40
|
+
"type": "keyword"
|
|
41
|
+
},
|
|
42
|
+
"file_key": {
|
|
43
|
+
"type": "keyword"
|
|
44
|
+
},
|
|
45
|
+
"is_robot": {
|
|
46
|
+
"type": "boolean"
|
|
47
|
+
},
|
|
48
|
+
"size": {
|
|
49
|
+
"type": "double"
|
|
50
|
+
},
|
|
51
|
+
"timestamp": {
|
|
52
|
+
"type": "date",
|
|
53
|
+
"format": "strict_date_hour_minute_second"
|
|
54
|
+
},
|
|
55
|
+
"updated_timestamp": {
|
|
56
|
+
"type": "date"
|
|
57
|
+
},
|
|
58
|
+
"unique_id": {
|
|
59
|
+
"type": "keyword"
|
|
60
|
+
},
|
|
61
|
+
"unique_session_id": {
|
|
62
|
+
"type": "keyword"
|
|
63
|
+
},
|
|
64
|
+
"visitor_id": {
|
|
65
|
+
"type": "keyword"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"aliases": {
|
|
70
|
+
"__SEARCH_INDEX_PREFIX__events-stats-file-download": {}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# This file is part of Invenio.
|
|
4
|
+
# Copyright (C) 2025 CERN.
|
|
5
|
+
#
|
|
6
|
+
# Invenio is free software; you can redistribute it and/or modify it
|
|
7
|
+
# under the terms of the MIT License; see LICENSE file for more details
|
|
8
|
+
|
|
9
|
+
"""ILS stats preprocessors."""
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def add_record_change_ids(doc):
|
|
13
|
+
"""Add unique_id and aggregation_id to the doc."""
|
|
14
|
+
|
|
15
|
+
# We use this field to group by during aggregation.
|
|
16
|
+
# e.g. the count of created eitems by a user with id 7 is tracked under eitmid__insert__7.
|
|
17
|
+
doc["aggregation_id"] = f"{doc['pid_type']}__{doc['method']}"
|
|
18
|
+
|
|
19
|
+
# unique_id identifies each individual event and is used by invenio-stats.
|
|
20
|
+
# It automatically deduplicates events from the same second that have the same unique_id.
|
|
21
|
+
# Including the pid_value ensures distinctness between events,
|
|
22
|
+
# even when multiple records are updated within the same second.
|
|
23
|
+
# e.g. during the importer in cds-ils where many eitems are created in bulk.
|
|
24
|
+
doc["unique_id"] = f"{doc['pid_value']}__{doc['pid_type']}__{doc['method']}"
|
|
25
|
+
|
|
26
|
+
if doc["user_id"]:
|
|
27
|
+
doc["aggregation_id"] += f"__{doc['user_id']}"
|
|
28
|
+
doc["unique_id"] += f"__{doc['user_id']}"
|
|
29
|
+
|
|
30
|
+
return doc
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2025 CERN.
|
|
4
|
+
#
|
|
5
|
+
# invenio-app-ils is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""ILS record changes aggregations templates"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2025 CERN.
|
|
4
|
+
#
|
|
5
|
+
# invenio-app-ils is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""ILS record changes aggregations templates"""
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"index_patterns": [
|
|
3
|
+
"__SEARCH_INDEX_PREFIX__stats-ils-record-changes-*"
|
|
4
|
+
],
|
|
5
|
+
"settings": {
|
|
6
|
+
"index": {
|
|
7
|
+
"refresh_interval": "5s"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"mappings": {
|
|
11
|
+
"date_detection": false,
|
|
12
|
+
"dynamic": false,
|
|
13
|
+
"numeric_detection": false,
|
|
14
|
+
"properties": {
|
|
15
|
+
"timestamp": {
|
|
16
|
+
"type": "date"
|
|
17
|
+
},
|
|
18
|
+
"updated_timestamp": {
|
|
19
|
+
"type": "date"
|
|
20
|
+
},
|
|
21
|
+
"pid_type": {
|
|
22
|
+
"type": "keyword"
|
|
23
|
+
},
|
|
24
|
+
"method": {
|
|
25
|
+
"type": "keyword"
|
|
26
|
+
},
|
|
27
|
+
"user_id": {
|
|
28
|
+
"type": "keyword"
|
|
29
|
+
},
|
|
30
|
+
"aggregation_id": {
|
|
31
|
+
"type": "keyword"
|
|
32
|
+
},
|
|
33
|
+
"count": {
|
|
34
|
+
"type": "integer"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"aliases": {
|
|
39
|
+
"__SEARCH_INDEX_PREFIX__stats-ils-record-changes": {}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C)
|
|
3
|
+
# Copyright (C) 2025 CERN.
|
|
4
4
|
#
|
|
5
5
|
# invenio-app-ils is free software; you can redistribute it and/or modify it
|
|
6
6
|
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
7
|
|
|
8
|
-
"""
|
|
8
|
+
"""Stats events templates."""
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"index_patterns": [
|
|
3
|
+
"__SEARCH_INDEX_PREFIX__events-stats-ils-record-changes-*"
|
|
4
|
+
],
|
|
5
|
+
"settings": {
|
|
6
|
+
"index": {
|
|
7
|
+
"refresh_interval": "5s"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"mappings": {
|
|
11
|
+
"date_detection": false,
|
|
12
|
+
"dynamic": false,
|
|
13
|
+
"numeric_detection": false,
|
|
14
|
+
"properties": {
|
|
15
|
+
"timestamp": {
|
|
16
|
+
"type": "date"
|
|
17
|
+
},
|
|
18
|
+
"updated_timestamp": {
|
|
19
|
+
"type": "date"
|
|
20
|
+
},
|
|
21
|
+
"pid_type": {
|
|
22
|
+
"type": "keyword"
|
|
23
|
+
},
|
|
24
|
+
"method": {
|
|
25
|
+
"type": "keyword"
|
|
26
|
+
},
|
|
27
|
+
"user_id": {
|
|
28
|
+
"type": "keyword"
|
|
29
|
+
},
|
|
30
|
+
"unique_id": {
|
|
31
|
+
"type": "keyword"
|
|
32
|
+
},
|
|
33
|
+
"aggregation_id": {
|
|
34
|
+
"type": "keyword"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"aliases": {
|
|
39
|
+
"__SEARCH_INDEX_PREFIX__events-stats-ils-record-changes": {}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{% extends config.THEME_BASE_TEMPLATE %}
|
|
2
|
+
|
|
3
|
+
{% block page_body %}
|
|
4
|
+
<div class="container error-page">
|
|
5
|
+
<div class="row">
|
|
6
|
+
<div class="col-sm-12">
|
|
7
|
+
You were successfully logged out. This is a development-mode page.
|
|
8
|
+
If you want to return to the home page click <a href="https://127.0.0.1:3000">here</a>.
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
{% endblock %}
|
invenio_app_ils/views.py
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
"""Invenio App ILS views."""
|
|
9
9
|
|
|
10
|
-
from flask import g, jsonify
|
|
10
|
+
from flask import Blueprint, g, jsonify, render_template
|
|
11
11
|
from invenio_accounts.views.rest import UserInfoView, default_user_payload
|
|
12
12
|
from invenio_userprofiles import UserProfile
|
|
13
13
|
|
|
@@ -17,9 +17,7 @@ class UserInfoResource(UserInfoView):
|
|
|
17
17
|
|
|
18
18
|
def get_user_roles(self):
|
|
19
19
|
"""Get all user roles."""
|
|
20
|
-
return [
|
|
21
|
-
need.value for need in g.identity.provides if need.method == "role"
|
|
22
|
-
]
|
|
20
|
+
return [need.value for need in g.identity.provides if need.method == "role"]
|
|
23
21
|
|
|
24
22
|
def success_response(self, user):
|
|
25
23
|
"""Return response with current user's information."""
|
|
@@ -39,3 +37,19 @@ class UserInfoResource(UserInfoView):
|
|
|
39
37
|
)
|
|
40
38
|
)
|
|
41
39
|
return jsonify(user_payload), 200
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def create_logged_out_blueprint(app):
|
|
43
|
+
"""Create logged_out blueprint."""
|
|
44
|
+
blueprint = Blueprint("logged_out", __name__)
|
|
45
|
+
if app.config["DEBUG"]:
|
|
46
|
+
blueprint.add_url_rule(
|
|
47
|
+
"/logged-out",
|
|
48
|
+
view_func=logged_out_view,
|
|
49
|
+
)
|
|
50
|
+
return blueprint
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def logged_out_view():
|
|
54
|
+
"""Render logged_out view."""
|
|
55
|
+
return render_template("logged_out.html")
|
|
@@ -42,7 +42,7 @@ class Vocabulary(dict):
|
|
|
42
42
|
"""Vocabulary record class."""
|
|
43
43
|
|
|
44
44
|
_index = "vocabularies-vocabulary-v1.0.0"
|
|
45
|
-
_doc_type =
|
|
45
|
+
_doc_type = None
|
|
46
46
|
_schema = "vocabularies/vocabulary-v1.0.0.json"
|
|
47
47
|
|
|
48
48
|
def __init__(self, type, key, text, data=None):
|
|
@@ -40,9 +40,7 @@ def index():
|
|
|
40
40
|
def index_json(filenames, force):
|
|
41
41
|
"""Index JSON-based vocabularies in Elasticsearch."""
|
|
42
42
|
if not force:
|
|
43
|
-
click.confirm(
|
|
44
|
-
"Are you sure you want to index the vocabularies?", abort=True
|
|
45
|
-
)
|
|
43
|
+
click.confirm("Are you sure you want to index the vocabularies?", abort=True)
|
|
46
44
|
source = "json"
|
|
47
45
|
index_count = 0
|
|
48
46
|
for filename in filenames:
|
|
@@ -64,9 +62,7 @@ def index_languages(force):
|
|
|
64
62
|
import pycountry
|
|
65
63
|
|
|
66
64
|
if not force:
|
|
67
|
-
click.confirm(
|
|
68
|
-
"Are you sure you want to index the languages?", abort=True
|
|
69
|
-
)
|
|
65
|
+
click.confirm("Are you sure you want to index the languages?", abort=True)
|
|
70
66
|
index_count = 0
|
|
71
67
|
click.echo("indexing languages...")
|
|
72
68
|
|
|
@@ -100,18 +96,12 @@ def index_languages(force):
|
|
|
100
96
|
def index_opendefinition(loader, path, whitelist_status, force):
|
|
101
97
|
"""Index JSON-based vocabularies in Elasticsearch."""
|
|
102
98
|
if not force:
|
|
103
|
-
click.confirm(
|
|
104
|
-
"Are you sure you want to index the vocabularies?", abort=True
|
|
105
|
-
)
|
|
99
|
+
click.confirm("Are you sure you want to index the vocabularies?", abort=True)
|
|
106
100
|
index_count = 0
|
|
107
|
-
click.echo(
|
|
108
|
-
"indexing licenses from loader {} and path {}...".format(loader, path)
|
|
109
|
-
)
|
|
101
|
+
click.echo("indexing licenses from loader {} and path {}...".format(loader, path))
|
|
110
102
|
if whitelist_status:
|
|
111
103
|
whitelist_status = whitelist_status.split(",")
|
|
112
|
-
vocabularies = load_vocabularies(
|
|
113
|
-
"opendefinition", loader, path, whitelist_status
|
|
114
|
-
)
|
|
104
|
+
vocabularies = load_vocabularies("opendefinition", loader, path, whitelist_status)
|
|
115
105
|
indexer = current_app_ils.vocabulary_indexer
|
|
116
106
|
with click.progressbar(vocabularies) as bar:
|
|
117
107
|
for vocabulary in bar:
|
|
@@ -164,8 +154,6 @@ def delete(type, force, key):
|
|
|
164
154
|
"Do you want to continue?".format(count, type),
|
|
165
155
|
abort=True,
|
|
166
156
|
):
|
|
167
|
-
count = delete_vocabulary_from_index(
|
|
168
|
-
type=type, force=True, key=key
|
|
169
|
-
)
|
|
157
|
+
count = delete_vocabulary_from_index(type=type, force=True, key=key)
|
|
170
158
|
|
|
171
159
|
click.echo("deleted {} vocabularies".format(count))
|
|
@@ -7,11 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
"""Vocabulary indexer APIs."""
|
|
9
9
|
|
|
10
|
-
from elasticsearch import VERSION as ES_VERSION
|
|
11
10
|
from invenio_indexer.api import RecordIndexer
|
|
12
11
|
|
|
13
|
-
lt_es7 = ES_VERSION[0] < 7
|
|
14
|
-
|
|
15
12
|
|
|
16
13
|
class VocabularyIndexer(RecordIndexer):
|
|
17
14
|
"""Indexer class for `Vocabulary`."""
|
|
@@ -34,5 +31,5 @@ class VocabularyIndexer(RecordIndexer):
|
|
|
34
31
|
:param record: The record where to look for the information.
|
|
35
32
|
:returns: A tuple (index, doc_type).
|
|
36
33
|
"""
|
|
37
|
-
doc_type =
|
|
34
|
+
doc_type = None
|
|
38
35
|
return (record._index, doc_type)
|
|
@@ -10,20 +10,15 @@
|
|
|
10
10
|
from urllib.parse import unquote_plus
|
|
11
11
|
|
|
12
12
|
import jsonresolver
|
|
13
|
-
from elasticsearch import VERSION as ES_VERSION
|
|
14
13
|
from werkzeug.routing import Rule
|
|
15
14
|
|
|
16
15
|
from invenio_app_ils.proxies import current_app_ils
|
|
17
16
|
from invenio_app_ils.vocabularies.api import VOCABULARY_TYPE_LICENSE
|
|
18
17
|
|
|
19
|
-
lt_es7 = ES_VERSION[0] < 7
|
|
20
|
-
|
|
21
18
|
# Note: there must be only one resolver per file,
|
|
22
19
|
# otherwise only the last one is registered
|
|
23
20
|
|
|
24
|
-
REF_LICENSE_URL_ABSOLUTE_PATH =
|
|
25
|
-
"{scheme}://{host}/api/resolver/licenses/{license_id}"
|
|
26
|
-
)
|
|
21
|
+
REF_LICENSE_URL_ABSOLUTE_PATH = "{scheme}://{host}/api/resolver/licenses/{license_id}"
|
|
27
22
|
REF_LICENSE_URL_RELATIVE_PATH = "/api/resolver/licenses/<license_id>"
|
|
28
23
|
|
|
29
24
|
|
|
@@ -41,11 +36,7 @@ def jsonresolver_loader(url_map):
|
|
|
41
36
|
type=VOCABULARY_TYPE_LICENSE, key=unquote_plus(_id)
|
|
42
37
|
)
|
|
43
38
|
search_result = search.execute()
|
|
44
|
-
total =
|
|
45
|
-
search_result.hits.total
|
|
46
|
-
if lt_es7
|
|
47
|
-
else search_result.hits.total.value
|
|
48
|
-
)
|
|
39
|
+
total = search_result.hits.total.value
|
|
49
40
|
|
|
50
41
|
_license = dict()
|
|
51
42
|
if total == 1:
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": {
|
|
3
|
+
"date_detection": false,
|
|
4
|
+
"numeric_detection": false,
|
|
5
|
+
"properties": {
|
|
6
|
+
"data": {
|
|
7
|
+
"type": "object"
|
|
8
|
+
},
|
|
9
|
+
"id": {
|
|
10
|
+
"type": "keyword"
|
|
11
|
+
},
|
|
12
|
+
"key": {
|
|
13
|
+
"type": "keyword"
|
|
14
|
+
},
|
|
15
|
+
"text": {
|
|
16
|
+
"type": "text"
|
|
17
|
+
},
|
|
18
|
+
"type": {
|
|
19
|
+
"type": "keyword"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": {
|
|
3
|
+
"date_detection": false,
|
|
4
|
+
"numeric_detection": false,
|
|
5
|
+
"properties": {
|
|
6
|
+
"data": {
|
|
7
|
+
"type": "object"
|
|
8
|
+
},
|
|
9
|
+
"id": {
|
|
10
|
+
"type": "keyword"
|
|
11
|
+
},
|
|
12
|
+
"key": {
|
|
13
|
+
"type": "keyword"
|
|
14
|
+
},
|
|
15
|
+
"text": {
|
|
16
|
+
"type": "text"
|
|
17
|
+
},
|
|
18
|
+
"type": {
|
|
19
|
+
"type": "keyword"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -33,9 +33,7 @@ class VocabularySource(metaclass=ABCMeta):
|
|
|
33
33
|
|
|
34
34
|
# Validate vocabulary type
|
|
35
35
|
if vocabulary.type not in current_app.config["ILS_VOCABULARIES"]:
|
|
36
|
-
raise VocabularyError(
|
|
37
|
-
"Invalid vocabulary type: {}".format(vocabulary.type)
|
|
38
|
-
)
|
|
36
|
+
raise VocabularyError("Invalid vocabulary type: {}".format(vocabulary.type))
|
|
39
37
|
|
|
40
38
|
# JSONSchema validation
|
|
41
39
|
schema = current_jsonschemas.get_schema(vocabulary._schema)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2025 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""JS/CSS Webpack bundles for theme."""
|
|
9
|
+
|
|
10
|
+
from invenio_assets.webpack import WebpackThemeBundle
|
|
11
|
+
|
|
12
|
+
theme = WebpackThemeBundle(
|
|
13
|
+
__name__,
|
|
14
|
+
"assets",
|
|
15
|
+
default="semantic-ui",
|
|
16
|
+
themes={
|
|
17
|
+
"semantic-ui": dict(
|
|
18
|
+
aliases={
|
|
19
|
+
# Define Semantic-UI theme configuration needed by
|
|
20
|
+
# Invenio-Theme in order to build Semantic UI (in theme.js
|
|
21
|
+
# entry point)
|
|
22
|
+
# This is a workaround for invenio-app-ils until a better solution is found
|
|
23
|
+
"../../theme.config$": "less/theme.config",
|
|
24
|
+
},
|
|
25
|
+
),
|
|
26
|
+
},
|
|
27
|
+
)
|