@gls_spain/gps-common 28.0.0 → 28.0.1
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.
- package/.idea/workspace.xml +53 -15
- package/CHANGELOG.md +7 -0
- package/errors/DatabaseNotEmptyError.js +3 -1
- package/errors/DefaultsDoNotExistError.js +3 -1
- package/errors/ExpeditionAlreadyExistsError.js +3 -1
- package/errors/ExpeditionCannotBeDeletedError.js +3 -1
- package/errors/ExpeditionCannotBeUpdatedError.js +3 -1
- package/errors/ExpeditionDoesNotExistError.js +3 -1
- package/errors/NetworkAlreadyExistsError.js +3 -1
- package/errors/NetworkCannotBeDeletedError.js +3 -1
- package/errors/NetworkDoesNotExistError.js +3 -1
- package/errors/RepresentativeAlreadyExistsError.js +3 -1
- package/errors/RepresentativeCannotBeDeletedError.js +3 -1
- package/errors/RepresentativeDoesNotExistError.js +3 -1
- package/errors/ShopAlreadyExistsError.js +3 -1
- package/errors/ShopCannotBeDeletedError.js +3 -1
- package/errors/ShopDoesNotExistError.js +3 -1
- package/errors/ShopNotEnabledError.js +3 -1
- package/errors/UserAlreadyExistsError.js +3 -1
- package/errors/UserCannotBeDeletedError.js +3 -1
- package/errors/UserCannotBeUpdatedError.js +3 -1
- package/errors/UserDoesNotExistError.js +3 -1
- package/errors/WrongNetworkError.js +3 -1
- package/errors/WrongPasswordError.js +3 -1
- package/errors/WrongShopError.js +3 -1
- package/errors/ZoneAlreadyExistsError.js +3 -1
- package/errors/ZoneCannotBeDeletedError.js +3 -1
- package/errors/ZoneDoesNotExistError.js +3 -1
- package/errors/index.js +0 -3
- package/package.json +2 -1
- package/errors/JobDoesNotExistError.js +0 -9
package/.idea/workspace.xml
CHANGED
|
@@ -1,7 +1,38 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="ChangeListManager">
|
|
4
|
-
<list default="true" id="c2833e40-3178-44f3-9bc5-203849985c7f" name="Default Changelist" comment=""
|
|
4
|
+
<list default="true" id="c2833e40-3178-44f3-9bc5-203849985c7f" name="Default Changelist" comment="">
|
|
5
|
+
<change beforePath="$PROJECT_DIR$/errors/DatabaseNotEmptyError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/DatabaseNotEmptyError.js" afterDir="false" />
|
|
6
|
+
<change beforePath="$PROJECT_DIR$/errors/DefaultsDoNotExistError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/DefaultsDoNotExistError.js" afterDir="false" />
|
|
7
|
+
<change beforePath="$PROJECT_DIR$/errors/ExpeditionAlreadyExistsError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/ExpeditionAlreadyExistsError.js" afterDir="false" />
|
|
8
|
+
<change beforePath="$PROJECT_DIR$/errors/ExpeditionCannotBeDeletedError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/ExpeditionCannotBeDeletedError.js" afterDir="false" />
|
|
9
|
+
<change beforePath="$PROJECT_DIR$/errors/ExpeditionCannotBeUpdatedError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/ExpeditionCannotBeUpdatedError.js" afterDir="false" />
|
|
10
|
+
<change beforePath="$PROJECT_DIR$/errors/ExpeditionDoesNotExistError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/ExpeditionDoesNotExistError.js" afterDir="false" />
|
|
11
|
+
<change beforePath="$PROJECT_DIR$/errors/JobDoesNotExistError.js" beforeDir="false" />
|
|
12
|
+
<change beforePath="$PROJECT_DIR$/errors/NetworkAlreadyExistsError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/NetworkAlreadyExistsError.js" afterDir="false" />
|
|
13
|
+
<change beforePath="$PROJECT_DIR$/errors/NetworkCannotBeDeletedError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/NetworkCannotBeDeletedError.js" afterDir="false" />
|
|
14
|
+
<change beforePath="$PROJECT_DIR$/errors/NetworkDoesNotExistError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/NetworkDoesNotExistError.js" afterDir="false" />
|
|
15
|
+
<change beforePath="$PROJECT_DIR$/errors/RepresentativeAlreadyExistsError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/RepresentativeAlreadyExistsError.js" afterDir="false" />
|
|
16
|
+
<change beforePath="$PROJECT_DIR$/errors/RepresentativeCannotBeDeletedError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/RepresentativeCannotBeDeletedError.js" afterDir="false" />
|
|
17
|
+
<change beforePath="$PROJECT_DIR$/errors/RepresentativeDoesNotExistError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/RepresentativeDoesNotExistError.js" afterDir="false" />
|
|
18
|
+
<change beforePath="$PROJECT_DIR$/errors/ShopAlreadyExistsError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/ShopAlreadyExistsError.js" afterDir="false" />
|
|
19
|
+
<change beforePath="$PROJECT_DIR$/errors/ShopCannotBeDeletedError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/ShopCannotBeDeletedError.js" afterDir="false" />
|
|
20
|
+
<change beforePath="$PROJECT_DIR$/errors/ShopDoesNotExistError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/ShopDoesNotExistError.js" afterDir="false" />
|
|
21
|
+
<change beforePath="$PROJECT_DIR$/errors/ShopNotEnabledError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/ShopNotEnabledError.js" afterDir="false" />
|
|
22
|
+
<change beforePath="$PROJECT_DIR$/errors/UserAlreadyExistsError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/UserAlreadyExistsError.js" afterDir="false" />
|
|
23
|
+
<change beforePath="$PROJECT_DIR$/errors/UserCannotBeDeletedError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/UserCannotBeDeletedError.js" afterDir="false" />
|
|
24
|
+
<change beforePath="$PROJECT_DIR$/errors/UserCannotBeUpdatedError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/UserCannotBeUpdatedError.js" afterDir="false" />
|
|
25
|
+
<change beforePath="$PROJECT_DIR$/errors/UserDoesNotExistError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/UserDoesNotExistError.js" afterDir="false" />
|
|
26
|
+
<change beforePath="$PROJECT_DIR$/errors/WrongNetworkError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/WrongNetworkError.js" afterDir="false" />
|
|
27
|
+
<change beforePath="$PROJECT_DIR$/errors/WrongPasswordError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/WrongPasswordError.js" afterDir="false" />
|
|
28
|
+
<change beforePath="$PROJECT_DIR$/errors/WrongShopError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/WrongShopError.js" afterDir="false" />
|
|
29
|
+
<change beforePath="$PROJECT_DIR$/errors/ZoneAlreadyExistsError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/ZoneAlreadyExistsError.js" afterDir="false" />
|
|
30
|
+
<change beforePath="$PROJECT_DIR$/errors/ZoneCannotBeDeletedError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/ZoneCannotBeDeletedError.js" afterDir="false" />
|
|
31
|
+
<change beforePath="$PROJECT_DIR$/errors/ZoneDoesNotExistError.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/ZoneDoesNotExistError.js" afterDir="false" />
|
|
32
|
+
<change beforePath="$PROJECT_DIR$/errors/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/index.js" afterDir="false" />
|
|
33
|
+
<change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
|
|
34
|
+
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
35
|
+
</list>
|
|
5
36
|
<option name="SHOW_DIALOG" value="false" />
|
|
6
37
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
7
38
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
@@ -123,9 +154,9 @@
|
|
|
123
154
|
</configuration>
|
|
124
155
|
<recent_temporary>
|
|
125
156
|
<list>
|
|
126
|
-
<item itemvalue="npm.build-documentation" />
|
|
127
|
-
<item itemvalue="JavaScript Debug.documentation.html (1)" />
|
|
128
157
|
<item itemvalue="npm.test" />
|
|
158
|
+
<item itemvalue="JavaScript Debug.documentation.html (1)" />
|
|
159
|
+
<item itemvalue="npm.build-documentation" />
|
|
129
160
|
<item itemvalue="Jest.index.test.js" />
|
|
130
161
|
<item itemvalue="Jest.#errors" />
|
|
131
162
|
</list>
|
|
@@ -494,6 +525,9 @@
|
|
|
494
525
|
<workItem from="1584201225736" duration="2801000" />
|
|
495
526
|
<workItem from="1584260636797" duration="3021000" />
|
|
496
527
|
<workItem from="1584264807456" duration="5446000" />
|
|
528
|
+
<workItem from="1584276339691" duration="500000" />
|
|
529
|
+
<workItem from="1584279223548" duration="443000" />
|
|
530
|
+
<workItem from="1584283992678" duration="250000" />
|
|
497
531
|
</task>
|
|
498
532
|
<servers />
|
|
499
533
|
</component>
|
|
@@ -533,6 +567,10 @@
|
|
|
533
567
|
</option>
|
|
534
568
|
</component>
|
|
535
569
|
<component name="WindowStateProjectService">
|
|
570
|
+
<state x="762" y="341" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1584283363756">
|
|
571
|
+
<screen x="0" y="23" width="2048" height="1129" />
|
|
572
|
+
</state>
|
|
573
|
+
<state x="762" y="341" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.23.2048.1129@0.23.2048.1129" timestamp="1584283363756" />
|
|
536
574
|
<state x="100" y="123" width="1848" height="929" key="DiffContextDialog" timestamp="1579112408515">
|
|
537
575
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
538
576
|
</state>
|
|
@@ -541,33 +579,33 @@
|
|
|
541
579
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
542
580
|
</state>
|
|
543
581
|
<state x="606" y="280" key="EditFileWatcherDialog/0.23.2048.1129@0.23.2048.1129" timestamp="1580283934403" />
|
|
544
|
-
<state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="
|
|
582
|
+
<state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1584284240273">
|
|
545
583
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
546
584
|
</state>
|
|
547
|
-
<state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="
|
|
548
|
-
<state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="
|
|
585
|
+
<state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1584284240273" />
|
|
586
|
+
<state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1584284240273">
|
|
549
587
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
550
588
|
</state>
|
|
551
|
-
<state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="
|
|
552
|
-
<state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="
|
|
589
|
+
<state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1584284240273" />
|
|
590
|
+
<state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1584284240273">
|
|
553
591
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
554
592
|
</state>
|
|
555
|
-
<state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="
|
|
556
|
-
<state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="
|
|
593
|
+
<state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1584284240273" />
|
|
594
|
+
<state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1584284240273">
|
|
557
595
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
558
596
|
</state>
|
|
559
|
-
<state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="
|
|
597
|
+
<state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1584284240273" />
|
|
560
598
|
<state x="0" y="23" width="2048" height="1129" key="SettingsEditor" timestamp="1580283935326">
|
|
561
599
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
562
600
|
</state>
|
|
563
601
|
<state x="0" y="23" width="2048" height="1129" key="SettingsEditor/0.23.2048.1129@0.23.2048.1129" timestamp="1580283935326" />
|
|
564
|
-
<state x="1351" y="124" width="697" height="951" key="find.popup" timestamp="
|
|
602
|
+
<state x="1351" y="124" width="697" height="951" key="find.popup" timestamp="1584284225630">
|
|
565
603
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
566
604
|
</state>
|
|
567
|
-
<state x="1351" y="124" width="697" height="951" key="find.popup/0.23.2048.1129@0.23.2048.1129" timestamp="
|
|
568
|
-
<state x="689" y="276" width="670" height="676" key="search.everywhere.popup" timestamp="
|
|
605
|
+
<state x="1351" y="124" width="697" height="951" key="find.popup/0.23.2048.1129@0.23.2048.1129" timestamp="1584284225630" />
|
|
606
|
+
<state x="689" y="276" width="670" height="676" key="search.everywhere.popup" timestamp="1584284016106">
|
|
569
607
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
570
608
|
</state>
|
|
571
|
-
<state x="689" y="276" width="670" height="676" key="search.everywhere.popup/0.23.2048.1129@0.23.2048.1129" timestamp="
|
|
609
|
+
<state x="689" y="276" width="670" height="676" key="search.everywhere.popup/0.23.2048.1129@0.23.2048.1129" timestamp="1584284016106" />
|
|
572
610
|
</component>
|
|
573
611
|
</project>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [28.0.1](https://github.com/GLS-Spain/gps-common/compare/v28.0.0...v28.0.1) (2020-03-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* remove job error, change all errors to extend DatabaseError ([03bb9ae](https://github.com/GLS-Spain/gps-common/commit/03bb9aeb40c0a758cc09ad7cecc7bc674817d4f2))
|
|
7
|
+
|
|
1
8
|
# [28.0.0](https://github.com/GLS-Spain/gps-common/compare/v27.2.0...v28.0.0) (2020-03-15)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class DatabaseNotEmptyError extends DatabaseError {
|
|
2
4
|
constructor(message = 'The database cannot be initialized because it is not empty.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class DefaultsDoNotExistError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Defaults do not exist.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class ExpeditionAlreadyExistsError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Expedition already exists.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class ExpeditionCannotBeDeletedError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Expedition cannot be deleted.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class ExpeditionCannotBeUpdatedError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Expedition cannot be updated.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class ExpeditionDoesNotExistError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Expedition does not exist.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class NetworkAlreadyExistsError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Network already exists.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class NetworkCannotBeDeletedError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Network cannot be deleted.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class NetworkDoesNotExistError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Network does not exist.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class RepresentativeAlreadyExistsError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Representative already exists.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class RepresentativeCannotBeDeletedError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Representative cannot be deleted.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class RepresentativeDoesNotExistError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Representative does not exist.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class ShopAlreadyExistsError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Shop already exists.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class ShopCannotBeDeletedError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Shop cannot be deleted.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class ShopDoesNotExistError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Shop does not exist.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class UserAlreadyExistsError extends DatabaseError {
|
|
2
4
|
constructor(message = 'User already exists.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class UserCannotBeDeletedError extends DatabaseError {
|
|
2
4
|
constructor(message = 'User cannot be deleted.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class UserCannotBeUpdatedError extends DatabaseError {
|
|
2
4
|
constructor(message = 'User cannot be updated.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class UserDoesNotExistError extends DatabaseError {
|
|
2
4
|
constructor(message = 'User does not exist.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class WrongNetworkError extends DatabaseError {
|
|
2
4
|
constructor(message = 'The provided network is not the right one.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class WrongPasswordError extends DatabaseError {
|
|
2
4
|
constructor(message = 'The provided password is not the right one.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
package/errors/WrongShopError.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class WrongShopError extends DatabaseError {
|
|
2
4
|
constructor(message = 'The provided shop is not the right one.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class ZoneAlreadyExistsError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Zone already exists.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class ZoneCannotBeDeletedError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Zone cannot be deleted.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class ZoneDoesNotExistError extends DatabaseError {
|
|
2
4
|
constructor(message = 'Zone does not exist.') {
|
|
3
5
|
// noinspection JSCheckFunctionSignatures
|
|
4
6
|
super(message);
|
package/errors/index.js
CHANGED
|
@@ -18,7 +18,6 @@ const ExpeditionAlreadyExistsError = require('./ExpeditionAlreadyExistsError');
|
|
|
18
18
|
const ExpeditionCannotBeUpdatedError = require('./ExpeditionCannotBeUpdatedError');
|
|
19
19
|
const ExpeditionCannotBeDeletedError = require('./ExpeditionCannotBeDeletedError');
|
|
20
20
|
const DefaultsDoNotExistError = require('./DefaultsDoNotExistError');
|
|
21
|
-
const JobDoesNotExistError = require('./JobDoesNotExistError');
|
|
22
21
|
const RepresentativeDoesNotExistError = require('./RepresentativeDoesNotExistError');
|
|
23
22
|
const RepresentativeAlreadyExistsError = require('./RepresentativeAlreadyExistsError');
|
|
24
23
|
const RepresentativeCannotBeDeletedError = require('./RepresentativeCannotBeDeletedError');
|
|
@@ -47,7 +46,6 @@ const errorsNames = {
|
|
|
47
46
|
ExpeditionCannotBeUpdatedError: 'ExpeditionCannotBeUpdatedError',
|
|
48
47
|
ExpeditionCannotBeDeletedError: 'ExpeditionCannotBeDeletedError',
|
|
49
48
|
DefaultsDoNotExistError: 'DefaultsDoNotExistError',
|
|
50
|
-
JobDoesNotExistError: 'JobDoesNotExistError',
|
|
51
49
|
RepresentativeDoesNotExistError: 'RepresentativeDoesNotExistError',
|
|
52
50
|
RepresentativeAlreadyExistsError: 'RepresentativeAlreadyExistsError',
|
|
53
51
|
RepresentativeCannotBeDeletedError: 'RepresentativeCannotBeDeletedError',
|
|
@@ -77,7 +75,6 @@ module.exports = {
|
|
|
77
75
|
ExpeditionCannotBeUpdatedError,
|
|
78
76
|
ExpeditionCannotBeDeletedError,
|
|
79
77
|
DefaultsDoNotExistError,
|
|
80
|
-
JobDoesNotExistError,
|
|
81
78
|
RepresentativeDoesNotExistError,
|
|
82
79
|
RepresentativeAlreadyExistsError,
|
|
83
80
|
RepresentativeCannotBeDeletedError,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gls_spain/gps-common",
|
|
3
|
-
"version": "28.0.
|
|
3
|
+
"version": "28.0.1",
|
|
4
4
|
"description": "Errors, schemas and documentation for the Parcel Shops project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"@gls_spain/ajv-options": "^1.1.0",
|
|
50
50
|
"@gls_spain/common-errors": "^1.0.0",
|
|
51
51
|
"@gls_spain/common-json-schemas": "^1.1.0",
|
|
52
|
+
"@gls_spain/mongodb": "^1.0.3",
|
|
52
53
|
"@gls_spain/winston-transports": "^1.0.0",
|
|
53
54
|
"lodash": "^4.17.15",
|
|
54
55
|
"winston": "^3.2.1",
|