invenio-app-ils 4.0.0rc1__py2.py3-none-any.whl → 4.2.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.
Files changed (29) hide show
  1. invenio_app_ils/__init__.py +2 -2
  2. invenio_app_ils/circulation/config.py +1 -1
  3. invenio_app_ils/circulation/loaders/schemas/json/loan_request.py +2 -1
  4. invenio_app_ils/documents/jsonresolvers/document_stock.py +1 -1
  5. invenio_app_ils/documents/loaders/jsonschemas/document.py +1 -1
  6. invenio_app_ils/documents/mappings/os-v1/documents/document-v2.0.0.json +127 -39
  7. invenio_app_ils/documents/mappings/os-v2/documents/document-v2.0.0.json +127 -39
  8. invenio_app_ils/documents/mappings/v7/documents/document-v2.0.0.json +127 -39
  9. invenio_app_ils/eitems/loaders/jsonschemas/eitems.py +1 -1
  10. invenio_app_ils/items/api.py +13 -1
  11. invenio_app_ils/items/loaders/jsonschemas/items.py +1 -1
  12. invenio_app_ils/items/serializers/item.py +4 -4
  13. invenio_app_ils/permissions.py +43 -35
  14. invenio_app_ils/records/views.py +1 -1
  15. invenio_app_ils/records_relations/api.py +1 -0
  16. invenio_app_ils/relations/api.py +6 -1
  17. invenio_app_ils/series/loaders/jsonschemas/series.py +1 -1
  18. invenio_app_ils/series/mappings/os-v1/series/series-v2.0.0.json +46 -11
  19. invenio_app_ils/series/mappings/os-v2/series/series-v2.0.0.json +46 -11
  20. invenio_app_ils/series/mappings/v7/series/series-v2.0.0.json +46 -11
  21. {invenio_app_ils-4.0.0rc1.dist-info → invenio_app_ils-4.2.0.dist-info}/METADATA +69 -58
  22. {invenio_app_ils-4.0.0rc1.dist-info → invenio_app_ils-4.2.0.dist-info}/RECORD +28 -29
  23. {invenio_app_ils-4.0.0rc1.dist-info → invenio_app_ils-4.2.0.dist-info}/WHEEL +1 -1
  24. tests/api/ils/items/test_items_crud.py +46 -4
  25. tests/api/ils/items/test_items_update.py +0 -40
  26. {invenio_app_ils-4.0.0rc1.dist-info → invenio_app_ils-4.2.0.dist-info}/AUTHORS.rst +0 -0
  27. {invenio_app_ils-4.0.0rc1.dist-info → invenio_app_ils-4.2.0.dist-info}/LICENSE +0 -0
  28. {invenio_app_ils-4.0.0rc1.dist-info → invenio_app_ils-4.2.0.dist-info}/entry_points.txt +0 -0
  29. {invenio_app_ils-4.0.0rc1.dist-info → invenio_app_ils-4.2.0.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2018-2022 CERN.
3
+ # Copyright (C) 2018-2024 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
  """invenio-app-ils."""
9
9
 
10
- __version__ = "4.0.0rc1"
10
+ __version__ = "4.2.0"
11
11
 
12
12
  __all__ = ("__version__",)
@@ -44,10 +44,10 @@ from invenio_app_ils.permissions import (
44
44
  PatronOwnerPermission,
45
45
  authenticated_user_permission,
46
46
  backoffice_permission,
47
+ loan_checkout_permission,
47
48
  loan_extend_circulation_permission,
48
49
  patron_owner_permission,
49
50
  superuser_permission,
50
- loan_checkout_permission,
51
51
  )
52
52
 
53
53
  from .api import ILS_CIRCULATION_LOAN_FETCHER, ILS_CIRCULATION_LOAN_MINTER
@@ -12,7 +12,6 @@ from datetime import timedelta
12
12
  import arrow
13
13
  from flask import current_app
14
14
  from invenio_circulation.records.loaders.schemas.json import DateString
15
- from invenio_app_ils.proxies import current_app_ils
16
15
  from marshmallow import (
17
16
  Schema,
18
17
  ValidationError,
@@ -22,6 +21,8 @@ from marshmallow import (
22
21
  validates_schema,
23
22
  )
24
23
 
24
+ from invenio_app_ils.proxies import current_app_ils
25
+
25
26
  from .base import LoanBaseSchemaV1
26
27
 
27
28
 
@@ -10,8 +10,8 @@
10
10
  import jsonresolver
11
11
  from werkzeug.routing import Rule
12
12
 
13
- from invenio_app_ils.proxies import current_app_ils
14
13
  from invenio_app_ils.eitems.api import EItem
14
+ from invenio_app_ils.proxies import current_app_ils
15
15
 
16
16
  # Note: there must be only one resolver per file,
17
17
  # otherwise only the last one is registered
@@ -16,10 +16,10 @@ from invenio_app_ils.records.loaders.schemas.changed_by import (
16
16
  ChangedBySchema,
17
17
  set_changed_by,
18
18
  )
19
+ from invenio_app_ils.records.loaders.schemas.identifiers import IdentifierSchema
19
20
  from invenio_app_ils.records.loaders.schemas.preserve_cover_metadata import (
20
21
  preserve_cover_metadata,
21
22
  )
22
- from invenio_app_ils.records.loaders.schemas.identifiers import IdentifierSchema
23
23
 
24
24
 
25
25
  class AffiliationSchema(Schema):
@@ -16,7 +16,9 @@
16
16
  "analyzer": {
17
17
  "min_length_2": {
18
18
  "tokenizer": "standard",
19
- "filter": [ "min_length_2" ]
19
+ "filter": [
20
+ "min_length_2"
21
+ ]
20
22
  },
21
23
  "custom_analyzer": {
22
24
  "tokenizer": "standard",
@@ -70,10 +72,14 @@
70
72
  "type": "date"
71
73
  },
72
74
  "abstract": {
73
- "type": "text"
75
+ "type": "text",
76
+ "analyzer": "custom_analyzer",
77
+ "search_analyzer": "custom_analyzer"
74
78
  },
75
79
  "alternative_abstracts": {
76
- "type": "text"
80
+ "type": "text",
81
+ "analyzer": "custom_analyzer",
82
+ "search_analyzer": "custom_analyzer"
77
83
  },
78
84
  "alternative_identifiers": {
79
85
  "properties": {
@@ -98,7 +104,9 @@
98
104
  "type": "keyword"
99
105
  },
100
106
  "value": {
101
- "type": "text"
107
+ "type": "text",
108
+ "analyzer": "custom_analyzer",
109
+ "search_analyzer": "custom_analyzer"
102
110
  }
103
111
  },
104
112
  "type": "object"
@@ -120,6 +128,8 @@
120
128
  },
121
129
  "name": {
122
130
  "type": "text",
131
+ "analyzer": "custom_analyzer",
132
+ "search_analyzer": "custom_analyzer",
123
133
  "fields": {
124
134
  "keyword": {
125
135
  "type": "keyword"
@@ -131,6 +141,8 @@
131
141
  },
132
142
  "alternative_names": {
133
143
  "type": "text",
144
+ "analyzer": "custom_analyzer",
145
+ "search_analyzer": "custom_analyzer",
134
146
  "fields": {
135
147
  "keyword": {
136
148
  "type": "keyword"
@@ -145,12 +157,17 @@
145
157
  },
146
158
  "full_words": {
147
159
  "type": "text",
148
- "analyzer": "min_length_2",
149
- "search_analyzer": "min_length_2"
160
+ "analyzer": "custom_analyzer",
161
+ "search_analyzer": "custom_analyzer"
150
162
  },
151
163
  "normalized_keyword": {
152
164
  "type": "keyword",
153
165
  "normalizer": "custom_normalizer"
166
+ },
167
+ "min_length_2": {
168
+ "type": "text",
169
+ "analyzer": "min_length_2",
170
+ "search_analyzer": "min_length_2"
154
171
  }
155
172
  }
156
173
  },
@@ -228,10 +245,19 @@
228
245
  "type": "boolean"
229
246
  },
230
247
  "document_type": {
231
- "type": "keyword"
248
+ "type": "keyword",
249
+ "fields": {
250
+ "text": {
251
+ "type": "text",
252
+ "analyzer": "custom_analyzer",
253
+ "search_analyzer": "custom_analyzer"
254
+ }
255
+ }
232
256
  },
233
257
  "edition": {
234
- "type": "text"
258
+ "type": "text",
259
+ "analyzer": "custom_analyzer",
260
+ "search_analyzer": "custom_analyzer"
235
261
  },
236
262
  "eitems": {
237
263
  "properties": {
@@ -318,36 +344,56 @@
318
344
  "extensions_keywords": {
319
345
  "type": "object",
320
346
  "properties": {
321
- "key": { "type": "keyword" },
322
- "value": { "type": "keyword" }
347
+ "key": {
348
+ "type": "keyword"
349
+ },
350
+ "value": {
351
+ "type": "keyword"
352
+ }
323
353
  }
324
354
  },
325
355
  "extensions_texts": {
326
356
  "type": "object",
327
357
  "properties": {
328
- "key": { "type": "keyword" },
329
- "value": { "type": "text" }
358
+ "key": {
359
+ "type": "keyword"
360
+ },
361
+ "value": {
362
+ "type": "text"
363
+ }
330
364
  }
331
365
  },
332
366
  "extensions_longs": {
333
367
  "type": "object",
334
368
  "properties": {
335
- "key": { "type": "keyword" },
336
- "value": { "type": "long" }
369
+ "key": {
370
+ "type": "keyword"
371
+ },
372
+ "value": {
373
+ "type": "long"
374
+ }
337
375
  }
338
376
  },
339
377
  "extensions_dates": {
340
378
  "type": "object",
341
379
  "properties": {
342
- "key": { "type": "keyword" },
343
- "value": { "type": "date" }
380
+ "key": {
381
+ "type": "keyword"
382
+ },
383
+ "value": {
384
+ "type": "date"
385
+ }
344
386
  }
345
387
  },
346
388
  "extensions_booleans": {
347
389
  "type": "object",
348
390
  "properties": {
349
- "key": { "type": "keyword" },
350
- "value": { "type": "boolean" }
391
+ "key": {
392
+ "type": "keyword"
393
+ },
394
+ "value": {
395
+ "type": "boolean"
396
+ }
351
397
  }
352
398
  },
353
399
  "identifiers": {
@@ -361,10 +407,10 @@
361
407
  "value": {
362
408
  "type": "keyword",
363
409
  "fields": {
364
- "text": {
365
- "type": "text"
366
- }
410
+ "text": {
411
+ "type": "text"
367
412
  }
413
+ }
368
414
  }
369
415
  },
370
416
  "type": "object"
@@ -375,13 +421,22 @@
375
421
  "type": "text"
376
422
  },
377
423
  "place": {
378
- "type": "keyword"
424
+ "type": "keyword",
425
+ "fields": {
426
+ "text": {
427
+ "type": "text",
428
+ "analyzer": "custom_analyzer",
429
+ "search_analyzer": "custom_analyzer"
430
+ }
431
+ }
379
432
  },
380
433
  "publisher": {
381
434
  "type": "keyword",
382
435
  "fields": {
383
436
  "text": {
384
- "type": "text"
437
+ "type": "text",
438
+ "analyzer": "custom_analyzer",
439
+ "search_analyzer": "custom_analyzer"
385
440
  }
386
441
  }
387
442
  },
@@ -402,10 +457,12 @@
402
457
  "value": {
403
458
  "type": "keyword",
404
459
  "fields": {
405
- "text": {
406
- "type": "text"
407
- }
460
+ "text": {
461
+ "type": "text",
462
+ "analyzer": "custom_analyzer",
463
+ "search_analyzer": "custom_analyzer"
408
464
  }
465
+ }
409
466
  }
410
467
  },
411
468
  "type": "object"
@@ -492,6 +549,8 @@
492
549
  },
493
550
  "value": {
494
551
  "type": "text",
552
+ "analyzer": "custom_analyzer",
553
+ "search_analyzer": "custom_analyzer",
495
554
  "fields": {
496
555
  "keyword": {
497
556
  "type": "keyword"
@@ -521,7 +580,14 @@
521
580
  "type": "keyword"
522
581
  },
523
582
  "title": {
524
- "type": "keyword"
583
+ "type": "keyword",
584
+ "fields": {
585
+ "text": {
586
+ "type": "text",
587
+ "analyzer": "custom_analyzer",
588
+ "search_analyzer": "custom_analyzer"
589
+ }
590
+ }
525
591
  },
526
592
  "url": {
527
593
  "type": "keyword"
@@ -536,13 +602,15 @@
536
602
  "type": "object"
537
603
  },
538
604
  "note": {
539
- "type": "text"
605
+ "type": "text",
606
+ "analyzer": "custom_analyzer",
607
+ "search_analyzer": "custom_analyzer"
540
608
  },
541
609
  "number_of_pages": {
542
610
  "type": "keyword",
543
611
  "fields": {
544
612
  "text": {
545
- "type": "text"
613
+ "type": "text"
546
614
  }
547
615
  }
548
616
  },
@@ -563,9 +631,11 @@
563
631
  "journal_title": {
564
632
  "type": "keyword",
565
633
  "fields": {
566
- "text": {
567
- "type": "text"
568
- }
634
+ "text": {
635
+ "type": "text",
636
+ "analyzer": "custom_analyzer",
637
+ "search_analyzer": "custom_analyzer"
638
+ }
569
639
  }
570
640
  },
571
641
  "journal_volume": {
@@ -574,9 +644,9 @@
574
644
  "note": {
575
645
  "type": "keyword",
576
646
  "fields": {
577
- "text": {
578
- "type": "text"
579
- }
647
+ "text": {
648
+ "type": "text"
649
+ }
580
650
  }
581
651
  },
582
652
  "pages": {
@@ -589,7 +659,14 @@
589
659
  "type": "object"
590
660
  },
591
661
  "publication_year": {
592
- "type": "keyword"
662
+ "type": "keyword",
663
+ "fields": {
664
+ "text": {
665
+ "type": "text",
666
+ "analyzer": "custom_analyzer",
667
+ "search_analyzer": "custom_analyzer"
668
+ }
669
+ }
593
670
  },
594
671
  "relation_types": {
595
672
  "type": "keyword"
@@ -849,7 +926,14 @@
849
926
  "type": "keyword"
850
927
  },
851
928
  "value": {
852
- "type": "keyword"
929
+ "type": "keyword",
930
+ "fields": {
931
+ "text": {
932
+ "type": "text",
933
+ "analyzer": "custom_analyzer",
934
+ "search_analyzer": "custom_analyzer"
935
+ }
936
+ }
853
937
  }
854
938
  },
855
939
  "type": "object"
@@ -901,6 +985,8 @@
901
985
  },
902
986
  "volume": {
903
987
  "type": "text",
988
+ "analyzer": "custom_analyzer",
989
+ "search_analyzer": "custom_analyzer",
904
990
  "fields": {
905
991
  "keyword": {
906
992
  "type": "keyword"
@@ -971,8 +1057,10 @@
971
1057
  "type": "object"
972
1058
  },
973
1059
  "physical_description": {
974
- "type": "text"
1060
+ "type": "text",
1061
+ "analyzer": "custom_analyzer",
1062
+ "search_analyzer": "custom_analyzer"
975
1063
  }
976
1064
  }
977
1065
  }
978
- }
1066
+ }