@gls_spain/gps-common 32.4.0 → 33.0.0
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 +51 -21
- package/CHANGELOG.md +25 -0
- package/errors/InconsistentSalesSettingsError.js +11 -0
- package/errors/InvalidSaleDestinationError.js +11 -0
- package/errors/NetworkCannotBeUpdatedError.js +11 -0
- package/errors/SaleAlreadyExistsError.js +11 -0
- package/errors/ShopCannotBeUpdatedError.js +11 -0
- package/errors/index.js +15 -0
- package/open-api-spec/index.js +486 -308
- package/package.json +1 -1
- package/schemas/definitions/common.js +259 -1
- package/schemas/definitions/defaults.js +88 -2
- package/schemas/definitions/expeditions.js +4 -1
- package/schemas/definitions/gls-spain-integration-events.js +10 -0
- package/schemas/definitions/historic-records.js +5 -2
- package/schemas/definitions/networks.js +26 -4
- package/schemas/definitions/sales.js +163 -0
- package/schemas/definitions/shops.js +3 -1
- package/schemas/index.js +28 -5
- package/schemas/definitions/init.js +0 -50
package/.idea/workspace.xml
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="ChangeListManager">
|
|
4
4
|
<list default="true" id="c2833e40-3178-44f3-9bc5-203849985c7f" name="Default Changelist" comment="">
|
|
5
|
-
<change afterPath="$PROJECT_DIR$/errors/CountersDoNotExistError.js" afterDir="false" />
|
|
6
|
-
<change afterPath="$PROJECT_DIR$/schemas/definitions/counters.js" afterDir="false" />
|
|
7
|
-
<change beforePath="$PROJECT_DIR$/errors/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/index.js" afterDir="false" />
|
|
8
5
|
<change beforePath="$PROJECT_DIR$/open-api-spec/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/open-api-spec/index.js" afterDir="false" />
|
|
9
|
-
<change beforePath="$PROJECT_DIR$/schemas/definitions/
|
|
6
|
+
<change beforePath="$PROJECT_DIR$/schemas/definitions/defaults.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/defaults.js" afterDir="false" />
|
|
7
|
+
<change beforePath="$PROJECT_DIR$/schemas/definitions/gls-spain-integration-events.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/gls-spain-integration-events.js" afterDir="false" />
|
|
8
|
+
<change beforePath="$PROJECT_DIR$/schemas/definitions/historic-records.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/historic-records.js" afterDir="false" />
|
|
9
|
+
<change beforePath="$PROJECT_DIR$/schemas/definitions/init.js" beforeDir="false" />
|
|
10
|
+
<change beforePath="$PROJECT_DIR$/schemas/definitions/networks.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/networks.js" afterDir="false" />
|
|
11
|
+
<change beforePath="$PROJECT_DIR$/schemas/definitions/sales.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/sales.js" afterDir="false" />
|
|
10
12
|
<change beforePath="$PROJECT_DIR$/schemas/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/index.js" afterDir="false" />
|
|
11
13
|
</list>
|
|
12
14
|
<option name="SHOW_DIALOG" value="false" />
|
|
@@ -39,6 +41,7 @@
|
|
|
39
41
|
<option name="showLibraryContents" value="true" />
|
|
40
42
|
</component>
|
|
41
43
|
<component name="PropertiesComponent">
|
|
44
|
+
<property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
|
|
42
45
|
<property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
|
43
46
|
<property name="NewWatcherDialog.advanced.open" value="true" />
|
|
44
47
|
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
|
@@ -46,7 +49,7 @@
|
|
|
46
49
|
<property name="TERMINAL_CUSTOM_COMMANDS_GOT_IT" value="true" />
|
|
47
50
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
48
51
|
<property name="javascript.nodejs.core.library.configured.version" value="10.15.3" />
|
|
49
|
-
<property name="last_opened_file_path" value="$PROJECT_DIR
|
|
52
|
+
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
|
50
53
|
<property name="node.js.detected.package.eslint" value="true" />
|
|
51
54
|
<property name="node.js.detected.package.standard" value="true" />
|
|
52
55
|
<property name="node.js.path.for.package.eslint" value="project" />
|
|
@@ -63,13 +66,6 @@
|
|
|
63
66
|
<property name="ts.external.directory.path" value="$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external" />
|
|
64
67
|
</component>
|
|
65
68
|
<component name="RecentsManager">
|
|
66
|
-
<key name="CopyFile.RECENT_KEYS">
|
|
67
|
-
<recent name="$PROJECT_DIR$/errors" />
|
|
68
|
-
<recent name="$PROJECT_DIR$/schemas/definitions" />
|
|
69
|
-
<recent name="$PROJECT_DIR$" />
|
|
70
|
-
<recent name="$PROJECT_DIR$/schemas" />
|
|
71
|
-
<recent name="$PROJECT_DIR$/lib/scripts" />
|
|
72
|
-
</key>
|
|
73
69
|
<key name="MoveFile.RECENT_KEYS">
|
|
74
70
|
<recent name="$PROJECT_DIR$/open-api" />
|
|
75
71
|
<recent name="$PROJECT_DIR$" />
|
|
@@ -77,6 +73,13 @@
|
|
|
77
73
|
<recent name="$PROJECT_DIR$/open-api-spec" />
|
|
78
74
|
<recent name="$PROJECT_DIR$/errors" />
|
|
79
75
|
</key>
|
|
76
|
+
<key name="CopyFile.RECENT_KEYS">
|
|
77
|
+
<recent name="$PROJECT_DIR$/errors" />
|
|
78
|
+
<recent name="$PROJECT_DIR$/schemas/definitions" />
|
|
79
|
+
<recent name="$PROJECT_DIR$" />
|
|
80
|
+
<recent name="$PROJECT_DIR$/schemas" />
|
|
81
|
+
<recent name="$PROJECT_DIR$/lib/scripts" />
|
|
82
|
+
</key>
|
|
80
83
|
</component>
|
|
81
84
|
<component name="RunManager" selected="JavaScript Debug.documentation.html (1)">
|
|
82
85
|
<configuration name="#errors" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
|
|
@@ -568,7 +571,26 @@
|
|
|
568
571
|
<workItem from="1591864959459" duration="63000" />
|
|
569
572
|
<workItem from="1591865082734" duration="29000" />
|
|
570
573
|
<workItem from="1594828405112" duration="147000" />
|
|
571
|
-
<workItem from="1594885748220" duration="
|
|
574
|
+
<workItem from="1594885748220" duration="6957000" />
|
|
575
|
+
<workItem from="1594925133162" duration="691000" />
|
|
576
|
+
<workItem from="1594970859158" duration="231000" />
|
|
577
|
+
<workItem from="1594991230403" duration="1319000" />
|
|
578
|
+
<workItem from="1595066783978" duration="398000" />
|
|
579
|
+
<workItem from="1595086122575" duration="439000" />
|
|
580
|
+
<workItem from="1595147433019" duration="997000" />
|
|
581
|
+
<workItem from="1595166660006" duration="1020000" />
|
|
582
|
+
<workItem from="1595228568194" duration="1068000" />
|
|
583
|
+
<workItem from="1595315571333" duration="4250000" />
|
|
584
|
+
<workItem from="1595399515075" duration="8658000" />
|
|
585
|
+
<workItem from="1595415093002" duration="230000" />
|
|
586
|
+
<workItem from="1595499698311" duration="586000" />
|
|
587
|
+
<workItem from="1595514903787" duration="534000" />
|
|
588
|
+
<workItem from="1595518362300" duration="94000" />
|
|
589
|
+
<workItem from="1595519042896" duration="228000" />
|
|
590
|
+
<workItem from="1595531893690" duration="4660000" />
|
|
591
|
+
<workItem from="1595572792857" duration="2475000" />
|
|
592
|
+
<workItem from="1595668967544" duration="116000" />
|
|
593
|
+
<workItem from="1595832239784" duration="10600000" />
|
|
572
594
|
</task>
|
|
573
595
|
<servers />
|
|
574
596
|
</component>
|
|
@@ -607,21 +629,29 @@
|
|
|
607
629
|
<option name="oldMeFiltersMigrated" value="true" />
|
|
608
630
|
</component>
|
|
609
631
|
<component name="WindowStateProjectService">
|
|
610
|
-
<state
|
|
632
|
+
<state x="762" y="341" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1595577705727">
|
|
633
|
+
<screen x="0" y="23" width="2048" height="1129" />
|
|
634
|
+
</state>
|
|
635
|
+
<state x="762" y="341" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.23.2048.1129@0.23.2048.1129" timestamp="1595577705727" />
|
|
636
|
+
<state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1595847055405">
|
|
637
|
+
<screen x="0" y="23" width="2048" height="1129" />
|
|
638
|
+
</state>
|
|
639
|
+
<state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1595847055405" />
|
|
640
|
+
<state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1595847055405">
|
|
611
641
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
612
642
|
</state>
|
|
613
|
-
<state width="2006" height="269" key="GridCell.Tab.0.
|
|
614
|
-
<state width="2006" height="269" key="GridCell.Tab.0.
|
|
643
|
+
<state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1595847055405" />
|
|
644
|
+
<state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1595847055404">
|
|
615
645
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
616
646
|
</state>
|
|
617
|
-
<state width="2006" height="269" key="GridCell.Tab.0.
|
|
618
|
-
<state width="2006" height="269" key="GridCell.Tab.0.
|
|
647
|
+
<state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1595847055404" />
|
|
648
|
+
<state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1595847055405">
|
|
619
649
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
620
650
|
</state>
|
|
621
|
-
<state width="2006" height="269" key="GridCell.Tab.0.
|
|
622
|
-
<state width="
|
|
651
|
+
<state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1595847055405" />
|
|
652
|
+
<state x="689" y="276" width="670" height="676" key="search.everywhere.popup" timestamp="1595579270021">
|
|
623
653
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
624
654
|
</state>
|
|
625
|
-
<state width="
|
|
655
|
+
<state x="689" y="276" width="670" height="676" key="search.everywhere.popup/0.23.2048.1129@0.23.2048.1129" timestamp="1595579270021" />
|
|
626
656
|
</component>
|
|
627
657
|
</project>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
# [33.0.0](https://github.com/GLS-Spain/gps-common/compare/v32.5.0...v33.0.0) (2020-07-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add sale to expedition ([ed0b4ac](https://github.com/GLS-Spain/gps-common/commit/ed0b4ace008e2580c67f4f1d7c700965bf342d24))
|
|
7
|
+
* remove required from sale.sender.fiscal ([9b34e55](https://github.com/GLS-Spain/gps-common/commit/9b34e55509f1ff393ccb52cebee60fd0c1e65bfd))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add sales ([d26b235](https://github.com/GLS-Spain/gps-common/commit/d26b235170972e5b4992d3d5add0b18b046d59eb))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### BREAKING CHANGES
|
|
16
|
+
|
|
17
|
+
* defaults and networks have new salesSettings fields, init has been removed
|
|
18
|
+
|
|
19
|
+
# [32.5.0](https://github.com/GLS-Spain/gps-common/compare/v32.4.0...v32.5.0) (2020-07-16)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* add readonly to networks and shops, and network and shop cannot be updated errors ([8ba03cc](https://github.com/GLS-Spain/gps-common/commit/8ba03cce1e8495a7540e2726c44ddf1af7427dd5))
|
|
25
|
+
|
|
1
26
|
# [32.4.0](https://github.com/GLS-Spain/gps-common/compare/v32.3.0...v32.4.0) (2020-07-16)
|
|
2
27
|
|
|
3
28
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class InconsistentSalesSettingsError extends DatabaseError {
|
|
4
|
+
constructor(message = 'Sale settings are inconsistent.') {
|
|
5
|
+
// noinspection JSCheckFunctionSignatures
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'InconsistentSalesSettingsError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = InconsistentSalesSettingsError;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class InvalidSaleDestinationError extends DatabaseError {
|
|
4
|
+
constructor(message = 'Sale destination is invalid.') {
|
|
5
|
+
// noinspection JSCheckFunctionSignatures
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'InvalidSaleDestinationError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = InvalidSaleDestinationError;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class NetworkCannotBeUpdatedError extends DatabaseError {
|
|
4
|
+
constructor(message = 'Network cannot be updated.') {
|
|
5
|
+
// noinspection JSCheckFunctionSignatures
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'NetworkCannotBeUpdatedError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = NetworkCannotBeUpdatedError;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class SaleAlreadyExistsError extends DatabaseError {
|
|
4
|
+
constructor(message = 'Sale already exists.') {
|
|
5
|
+
// noinspection JSCheckFunctionSignatures
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'SaleAlreadyExistsError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = SaleAlreadyExistsError;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class ShopCannotBeUpdatedError extends DatabaseError {
|
|
4
|
+
constructor(message = 'Shop cannot be updated.') {
|
|
5
|
+
// noinspection JSCheckFunctionSignatures
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'ShopCannotBeUpdatedError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = ShopCannotBeUpdatedError;
|
package/errors/index.js
CHANGED
|
@@ -5,10 +5,12 @@ const UserCannotBeUpdatedError = require('./UserCannotBeUpdatedError');
|
|
|
5
5
|
const UserCannotBeDeletedError = require('./UserCannotBeDeletedError');
|
|
6
6
|
const NetworkDoesNotExistError = require('./NetworkDoesNotExistError');
|
|
7
7
|
const NetworkAlreadyExistsError = require('./NetworkAlreadyExistsError');
|
|
8
|
+
const NetworkCannotBeUpdatedError = require('./NetworkCannotBeUpdatedError');
|
|
8
9
|
const NetworkCannotBeDeletedError = require('./NetworkCannotBeDeletedError');
|
|
9
10
|
const WrongNetworkError = require('./WrongNetworkError');
|
|
10
11
|
const ShopDoesNotExistError = require('./ShopDoesNotExistError');
|
|
11
12
|
const ShopAlreadyExistsError = require('./ShopAlreadyExistsError');
|
|
13
|
+
const ShopCannotBeUpdatedError = require('./ShopCannotBeUpdatedError');
|
|
12
14
|
const ShopCannotBeDeletedError = require('./ShopCannotBeDeletedError');
|
|
13
15
|
const ShopNotEnabledError = require('./ShopNotEnabledError');
|
|
14
16
|
const WrongShopError = require('./WrongShopError');
|
|
@@ -25,6 +27,9 @@ const RepresentativeCannotBeDeletedError = require('./RepresentativeCannotBeDele
|
|
|
25
27
|
const ZoneDoesNotExistError = require('./ZoneDoesNotExistError');
|
|
26
28
|
const ZoneAlreadyExistsError = require('./ZoneAlreadyExistsError');
|
|
27
29
|
const ZoneCannotBeDeletedError = require('./ZoneCannotBeDeletedError');
|
|
30
|
+
const SaleAlreadyExistsError = require('./SaleAlreadyExistsError');
|
|
31
|
+
const InconsistentSalesSettingsError = require('./InconsistentSalesSettingsError');
|
|
32
|
+
const InvalidSaleDestinationError = require('./InvalidSaleDestinationError');
|
|
28
33
|
|
|
29
34
|
const errorsNames = {
|
|
30
35
|
DatabaseNotEmptyError: 'DatabaseNotEmptyError',
|
|
@@ -34,10 +39,12 @@ const errorsNames = {
|
|
|
34
39
|
UserCannotBeDeletedError: 'UserCannotBeDeletedError',
|
|
35
40
|
NetworkDoesNotExistError: 'NetworkDoesNotExistError',
|
|
36
41
|
NetworkAlreadyExistsError: 'NetworkAlreadyExistsError',
|
|
42
|
+
NetworkCannotBeUpdatedError: 'NetworkCannotBeUpdatedError',
|
|
37
43
|
NetworkCannotBeDeletedError: 'NetworkCannotBeDeletedError',
|
|
38
44
|
WrongNetworkError: 'WrongNetworkError',
|
|
39
45
|
ShopDoesNotExistError: 'ShopDoesNotExistError',
|
|
40
46
|
ShopAlreadyExistsError: 'ShopAlreadyExistsError',
|
|
47
|
+
ShopCannotBeUpdatedError: 'ShopCannotBeUpdatedError',
|
|
41
48
|
ShopCannotBeDeletedError: 'ShopCannotBeDeletedError',
|
|
42
49
|
ShopNotEnabledError: 'ShopNotEnabledError',
|
|
43
50
|
WrongShopError: 'WrongShopError',
|
|
@@ -54,6 +61,9 @@ const errorsNames = {
|
|
|
54
61
|
ZoneDoesNotExistError: 'ZoneDoesNotExistError',
|
|
55
62
|
ZoneAlreadyExistsError: 'ZoneAlreadyExistsError',
|
|
56
63
|
ZoneCannotBeDeletedError: 'ZoneCannotBeDeletedError',
|
|
64
|
+
SaleAlreadyExistsError: 'SaleAlreadyExistsError',
|
|
65
|
+
InconsistentSalesSettingsError: 'InconsistentSalesSettingsError',
|
|
66
|
+
InvalidSaleDestinationError: 'InvalidSaleDestinationError',
|
|
57
67
|
};
|
|
58
68
|
|
|
59
69
|
module.exports = {
|
|
@@ -64,10 +74,12 @@ module.exports = {
|
|
|
64
74
|
UserCannotBeDeletedError,
|
|
65
75
|
NetworkDoesNotExistError,
|
|
66
76
|
NetworkAlreadyExistsError,
|
|
77
|
+
NetworkCannotBeUpdatedError,
|
|
67
78
|
NetworkCannotBeDeletedError,
|
|
68
79
|
WrongNetworkError,
|
|
69
80
|
ShopDoesNotExistError,
|
|
70
81
|
ShopAlreadyExistsError,
|
|
82
|
+
ShopCannotBeUpdatedError,
|
|
71
83
|
ShopCannotBeDeletedError,
|
|
72
84
|
ShopNotEnabledError,
|
|
73
85
|
WrongShopError,
|
|
@@ -84,5 +96,8 @@ module.exports = {
|
|
|
84
96
|
ZoneDoesNotExistError,
|
|
85
97
|
ZoneAlreadyExistsError,
|
|
86
98
|
ZoneCannotBeDeletedError,
|
|
99
|
+
SaleAlreadyExistsError,
|
|
100
|
+
InconsistentSalesSettingsError,
|
|
101
|
+
InvalidSaleDestinationError,
|
|
87
102
|
errorsNames,
|
|
88
103
|
};
|