@gls_spain/gps-common 32.5.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.
@@ -2,12 +2,14 @@
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/NetworkCannotBeUpdatedError.js" afterDir="false" />
6
- <change afterPath="$PROJECT_DIR$/errors/ShopCannotBeUpdatedError.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" />
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" />
9
10
  <change beforePath="$PROJECT_DIR$/schemas/definitions/networks.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/networks.js" afterDir="false" />
10
- <change beforePath="$PROJECT_DIR$/schemas/definitions/shops.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/shops.js" afterDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/schemas/definitions/sales.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/sales.js" afterDir="false" />
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" />
13
15
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -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$/errors" />
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">
@@ -569,7 +572,25 @@
569
572
  <workItem from="1591865082734" duration="29000" />
570
573
  <workItem from="1594828405112" duration="147000" />
571
574
  <workItem from="1594885748220" duration="6957000" />
572
- <workItem from="1594925133162" duration="587000" />
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" />
573
594
  </task>
574
595
  <servers />
575
596
  </component>
@@ -608,21 +629,29 @@
608
629
  <option name="oldMeFiltersMigrated" value="true" />
609
630
  </component>
610
631
  <component name="WindowStateProjectService">
611
- <state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1594925626891">
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">
612
641
  <screen x="0" y="23" width="2048" height="1129" />
613
642
  </state>
614
- <state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1594925626891" />
615
- <state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1594925626891">
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">
616
645
  <screen x="0" y="23" width="2048" height="1129" />
617
646
  </state>
618
- <state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1594925626891" />
619
- <state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1594925626890">
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">
620
649
  <screen x="0" y="23" width="2048" height="1129" />
621
650
  </state>
622
- <state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1594925626890" />
623
- <state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1594925626891">
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">
624
653
  <screen x="0" y="23" width="2048" height="1129" />
625
654
  </state>
626
- <state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1594925626891" />
655
+ <state x="689" y="276" width="670" height="676" key="search.everywhere.popup/0.23.2048.1129@0.23.2048.1129" timestamp="1595579270021" />
627
656
  </component>
628
657
  </project>
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
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
+
1
19
  # [32.5.0](https://github.com/GLS-Spain/gps-common/compare/v32.4.0...v32.5.0) (2020-07-16)
2
20
 
3
21
 
@@ -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 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;
package/errors/index.js CHANGED
@@ -27,6 +27,9 @@ const RepresentativeCannotBeDeletedError = require('./RepresentativeCannotBeDele
27
27
  const ZoneDoesNotExistError = require('./ZoneDoesNotExistError');
28
28
  const ZoneAlreadyExistsError = require('./ZoneAlreadyExistsError');
29
29
  const ZoneCannotBeDeletedError = require('./ZoneCannotBeDeletedError');
30
+ const SaleAlreadyExistsError = require('./SaleAlreadyExistsError');
31
+ const InconsistentSalesSettingsError = require('./InconsistentSalesSettingsError');
32
+ const InvalidSaleDestinationError = require('./InvalidSaleDestinationError');
30
33
 
31
34
  const errorsNames = {
32
35
  DatabaseNotEmptyError: 'DatabaseNotEmptyError',
@@ -58,6 +61,9 @@ const errorsNames = {
58
61
  ZoneDoesNotExistError: 'ZoneDoesNotExistError',
59
62
  ZoneAlreadyExistsError: 'ZoneAlreadyExistsError',
60
63
  ZoneCannotBeDeletedError: 'ZoneCannotBeDeletedError',
64
+ SaleAlreadyExistsError: 'SaleAlreadyExistsError',
65
+ InconsistentSalesSettingsError: 'InconsistentSalesSettingsError',
66
+ InvalidSaleDestinationError: 'InvalidSaleDestinationError',
61
67
  };
62
68
 
63
69
  module.exports = {
@@ -90,5 +96,8 @@ module.exports = {
90
96
  ZoneDoesNotExistError,
91
97
  ZoneAlreadyExistsError,
92
98
  ZoneCannotBeDeletedError,
99
+ SaleAlreadyExistsError,
100
+ InconsistentSalesSettingsError,
101
+ InvalidSaleDestinationError,
93
102
  errorsNames,
94
103
  };