@gls_spain/gps-common 34.9.1 → 34.9.3

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 (81) hide show
  1. package/.eslintignore +1 -1
  2. package/.eslintrc.json +11 -11
  3. package/.idea/codeStyles/Project.xml +36 -36
  4. package/.idea/codeStyles/codeStyleConfig.xml +4 -4
  5. package/.idea/gps-common.iml +11 -11
  6. package/.idea/inspectionProfiles/Project_Default.xml +6 -6
  7. package/.idea/jsLibraryMappings.xml +5 -5
  8. package/.idea/misc.xml +5 -5
  9. package/.idea/modules.xml +7 -7
  10. package/.idea/prettier.xml +6 -6
  11. package/.idea/scopes/Source_files.xml +2 -2
  12. package/.idea/vcs.xml +5 -5
  13. package/.prettierignore +4 -4
  14. package/.prettierrc.json +13 -13
  15. package/.releaserc +17 -17
  16. package/CHANGELOG.md +1264 -1250
  17. package/README.md +103 -103
  18. package/errors/CountersDoNotExistError.js +11 -11
  19. package/errors/DatabaseNotEmptyError.js +11 -11
  20. package/errors/DefaultsDoNotExistError.js +11 -11
  21. package/errors/ExpeditionAlreadyExistsError.js +11 -11
  22. package/errors/ExpeditionCannotBeDeletedError.js +11 -11
  23. package/errors/ExpeditionCannotBeUpdatedError.js +11 -11
  24. package/errors/ExpeditionDoesNotExistError.js +11 -11
  25. package/errors/GLSRecordingError.js +11 -11
  26. package/errors/GLSSpainError.js +11 -11
  27. package/errors/InconsistentSalesSettingsError.js +11 -11
  28. package/errors/InvalidSaleDestinationError.js +11 -11
  29. package/errors/LabelDoesNotExistError.js +11 -11
  30. package/errors/NetworkAlreadyExistsError.js +11 -11
  31. package/errors/NetworkCannotBeDeletedError.js +11 -11
  32. package/errors/NetworkCannotBeUpdatedError.js +11 -11
  33. package/errors/NetworkDoesNotExistError.js +11 -11
  34. package/errors/RepresentativeAlreadyExistsError.js +11 -11
  35. package/errors/RepresentativeCannotBeDeletedError.js +11 -11
  36. package/errors/RepresentativeDoesNotExistError.js +11 -11
  37. package/errors/SaleAlreadyExistsError.js +11 -11
  38. package/errors/SaleDoesNotExistError.js +11 -11
  39. package/errors/ShopAlreadyExistsError.js +11 -11
  40. package/errors/ShopCannotBeDeletedError.js +11 -11
  41. package/errors/ShopCannotBeUpdatedError.js +11 -11
  42. package/errors/ShopCannotSellError.js +11 -11
  43. package/errors/ShopDoesNotExistError.js +11 -11
  44. package/errors/ShopNotEnabledError.js +11 -11
  45. package/errors/UserAlreadyExistsError.js +11 -11
  46. package/errors/UserCannotBeDeletedError.js +11 -11
  47. package/errors/UserCannotBeUpdatedError.js +11 -11
  48. package/errors/UserDoesNotExistError.js +11 -11
  49. package/errors/WrongNetworkError.js +11 -11
  50. package/errors/WrongPasswordError.js +11 -11
  51. package/errors/WrongShopError.js +11 -11
  52. package/errors/ZoneAlreadyExistsError.js +11 -11
  53. package/errors/ZoneCannotBeDeletedError.js +11 -11
  54. package/errors/ZoneDoesNotExistError.js +11 -11
  55. package/errors/index.js +118 -118
  56. package/index.js +9 -9
  57. package/index.test.js +36 -36
  58. package/jest.config.js +5 -5
  59. package/open-api-spec/index.js +3715 -3715
  60. package/package.json +65 -69
  61. package/schemas/definitions/become.js +5 -5
  62. package/schemas/definitions/common.js +462 -440
  63. package/schemas/definitions/counters.js +43 -43
  64. package/schemas/definitions/defaults.js +140 -140
  65. package/schemas/definitions/expeditions.js +867 -867
  66. package/schemas/definitions/gls-spain-integration-events.js +139 -139
  67. package/schemas/definitions/historic-records.js +90 -90
  68. package/schemas/definitions/integrations.js +38 -38
  69. package/schemas/definitions/login.js +38 -38
  70. package/schemas/definitions/logout.js +8 -8
  71. package/schemas/definitions/networks.js +123 -123
  72. package/schemas/definitions/pods.js +26 -26
  73. package/schemas/definitions/representatives.js +194 -194
  74. package/schemas/definitions/sales.js +253 -249
  75. package/schemas/definitions/shops.js +404 -404
  76. package/schemas/definitions/users.js +337 -337
  77. package/schemas/definitions/zones.js +92 -92
  78. package/schemas/index.js +400 -400
  79. package/scripts/build-documentation.js +40 -40
  80. package/scripts/build-json-schemas.js +35 -35
  81. package/.idea/workspace.xml +0 -696
@@ -1,11 +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;
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;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class SaleDoesNotExistError extends DatabaseError {
4
- constructor(message = 'Sale does not exist.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'SaleDoesNotExistError';
8
- }
9
- }
10
-
11
- module.exports = SaleDoesNotExistError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class SaleDoesNotExistError extends DatabaseError {
4
+ constructor(message = 'Sale does not exist.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'SaleDoesNotExistError';
8
+ }
9
+ }
10
+
11
+ module.exports = SaleDoesNotExistError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class ShopAlreadyExistsError extends DatabaseError {
4
- constructor(message = 'Shop already exists.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'ShopAlreadyExistsError';
8
- }
9
- }
10
-
11
- module.exports = ShopAlreadyExistsError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class ShopAlreadyExistsError extends DatabaseError {
4
+ constructor(message = 'Shop already exists.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'ShopAlreadyExistsError';
8
+ }
9
+ }
10
+
11
+ module.exports = ShopAlreadyExistsError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class ShopCannotBeDeletedError extends DatabaseError {
4
- constructor(message = 'Shop cannot be deleted.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'ShopCannotBeDeletedError';
8
- }
9
- }
10
-
11
- module.exports = ShopCannotBeDeletedError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class ShopCannotBeDeletedError extends DatabaseError {
4
+ constructor(message = 'Shop cannot be deleted.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'ShopCannotBeDeletedError';
8
+ }
9
+ }
10
+
11
+ module.exports = ShopCannotBeDeletedError;
@@ -1,11 +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;
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;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class ShopCannotSellError extends DatabaseError {
4
- constructor(message = 'Shop cannot sell.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'ShopCannotSellError';
8
- }
9
- }
10
-
11
- module.exports = ShopCannotSellError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class ShopCannotSellError extends DatabaseError {
4
+ constructor(message = 'Shop cannot sell.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'ShopCannotSellError';
8
+ }
9
+ }
10
+
11
+ module.exports = ShopCannotSellError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class ShopDoesNotExistError extends DatabaseError {
4
- constructor(message = 'Shop does not exist.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'ShopDoesNotExistError';
8
- }
9
- }
10
-
11
- module.exports = ShopDoesNotExistError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class ShopDoesNotExistError extends DatabaseError {
4
+ constructor(message = 'Shop does not exist.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'ShopDoesNotExistError';
8
+ }
9
+ }
10
+
11
+ module.exports = ShopDoesNotExistError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class ShopNotEnabledError extends DatabaseError {
4
- constructor(message = 'Shop is not enabled.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'ShopNotEnabledError';
8
- }
9
- }
10
-
11
- module.exports = ShopNotEnabledError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class ShopNotEnabledError extends DatabaseError {
4
+ constructor(message = 'Shop is not enabled.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'ShopNotEnabledError';
8
+ }
9
+ }
10
+
11
+ module.exports = ShopNotEnabledError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class UserAlreadyExistsError extends DatabaseError {
4
- constructor(message = 'User already exists.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'UserAlreadyExistsError';
8
- }
9
- }
10
-
11
- module.exports = UserAlreadyExistsError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class UserAlreadyExistsError extends DatabaseError {
4
+ constructor(message = 'User already exists.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'UserAlreadyExistsError';
8
+ }
9
+ }
10
+
11
+ module.exports = UserAlreadyExistsError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class UserCannotBeDeletedError extends DatabaseError {
4
- constructor(message = 'User cannot be deleted.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'UserCannotBeDeletedError';
8
- }
9
- }
10
-
11
- module.exports = UserCannotBeDeletedError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class UserCannotBeDeletedError extends DatabaseError {
4
+ constructor(message = 'User cannot be deleted.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'UserCannotBeDeletedError';
8
+ }
9
+ }
10
+
11
+ module.exports = UserCannotBeDeletedError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class UserCannotBeUpdatedError extends DatabaseError {
4
- constructor(message = 'User cannot be updated.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'UserCannotBeUpdatedError';
8
- }
9
- }
10
-
11
- module.exports = UserCannotBeUpdatedError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class UserCannotBeUpdatedError extends DatabaseError {
4
+ constructor(message = 'User cannot be updated.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'UserCannotBeUpdatedError';
8
+ }
9
+ }
10
+
11
+ module.exports = UserCannotBeUpdatedError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class UserDoesNotExistError extends DatabaseError {
4
- constructor(message = 'User does not exist.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'UserDoesNotExistError';
8
- }
9
- }
10
-
11
- module.exports = UserDoesNotExistError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class UserDoesNotExistError extends DatabaseError {
4
+ constructor(message = 'User does not exist.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'UserDoesNotExistError';
8
+ }
9
+ }
10
+
11
+ module.exports = UserDoesNotExistError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class WrongNetworkError extends DatabaseError {
4
- constructor(message = 'The provided network is not the right one.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'WrongNetworkError';
8
- }
9
- }
10
-
11
- module.exports = WrongNetworkError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class WrongNetworkError extends DatabaseError {
4
+ constructor(message = 'The provided network is not the right one.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'WrongNetworkError';
8
+ }
9
+ }
10
+
11
+ module.exports = WrongNetworkError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class WrongPasswordError extends DatabaseError {
4
- constructor(message = 'The provided password is not the right one.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'WrongPasswordError';
8
- }
9
- }
10
-
11
- module.exports = WrongPasswordError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class WrongPasswordError extends DatabaseError {
4
+ constructor(message = 'The provided password is not the right one.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'WrongPasswordError';
8
+ }
9
+ }
10
+
11
+ module.exports = WrongPasswordError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class WrongShopError extends DatabaseError {
4
- constructor(message = 'The provided shop is not the right one.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'WrongShopError';
8
- }
9
- }
10
-
11
- module.exports = WrongShopError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class WrongShopError extends DatabaseError {
4
+ constructor(message = 'The provided shop is not the right one.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'WrongShopError';
8
+ }
9
+ }
10
+
11
+ module.exports = WrongShopError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class ZoneAlreadyExistsError extends DatabaseError {
4
- constructor(message = 'Zone already exists.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'ZoneAlreadyExistsError';
8
- }
9
- }
10
-
11
- module.exports = ZoneAlreadyExistsError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class ZoneAlreadyExistsError extends DatabaseError {
4
+ constructor(message = 'Zone already exists.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'ZoneAlreadyExistsError';
8
+ }
9
+ }
10
+
11
+ module.exports = ZoneAlreadyExistsError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class ZoneCannotBeDeletedError extends DatabaseError {
4
- constructor(message = 'Zone cannot be deleted.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'ZoneCannotBeDeletedError';
8
- }
9
- }
10
-
11
- module.exports = ZoneCannotBeDeletedError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class ZoneCannotBeDeletedError extends DatabaseError {
4
+ constructor(message = 'Zone cannot be deleted.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'ZoneCannotBeDeletedError';
8
+ }
9
+ }
10
+
11
+ module.exports = ZoneCannotBeDeletedError;
@@ -1,11 +1,11 @@
1
- const { DatabaseError } = require('@gls_spain/mongodb');
2
-
3
- class ZoneDoesNotExistError extends DatabaseError {
4
- constructor(message = 'Zone does not exist.') {
5
- // noinspection JSCheckFunctionSignatures
6
- super(message);
7
- this.name = 'ZoneDoesNotExistError';
8
- }
9
- }
10
-
11
- module.exports = ZoneDoesNotExistError;
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class ZoneDoesNotExistError extends DatabaseError {
4
+ constructor(message = 'Zone does not exist.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'ZoneDoesNotExistError';
8
+ }
9
+ }
10
+
11
+ module.exports = ZoneDoesNotExistError;