adamo-types 1.1.10 → 1.1.13

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 (77) hide show
  1. package/dist/admin/bill/index.js +1 -5
  2. package/dist/admin/constants/index.js +1 -5
  3. package/dist/admin/index.js +1 -5
  4. package/dist/admin/migrate/index.js +1 -5
  5. package/dist/admin/user/create/index.js +1 -5
  6. package/dist/admin/user/index.js +1 -5
  7. package/dist/ams/index.js +1 -5
  8. package/dist/bss/bearingpoint/billing/index.js +1 -5
  9. package/dist/bss/bearingpoint/channel/index.js +1 -5
  10. package/dist/bss/bearingpoint/customer/index.js +1 -5
  11. package/dist/bss/bearingpoint/index.js +1 -5
  12. package/dist/bss/bearingpoint/product-offering/index.js +1 -5
  13. package/dist/bss/bearingpoint/search/index.js +1 -5
  14. package/dist/bss/bearingpoint/service-specification/index.js +1 -5
  15. package/dist/bss/bearingpoint/shopping-cart/index.js +1 -5
  16. package/dist/bss/cache/index.js +1 -5
  17. package/dist/bss/constants/index.js +1 -5
  18. package/dist/bss/customer/index.js +1 -5
  19. package/dist/bss/index.js +1 -5
  20. package/dist/bss/login/index.js +1 -5
  21. package/dist/bss/number-pool/index.js +1 -5
  22. package/dist/bss/payment-provider/index.js +1 -5
  23. package/dist/bss/product/index.js +1 -5
  24. package/dist/bss/shopping-cart/index.js +1 -5
  25. package/dist/bss/tariff-model/index.js +1 -5
  26. package/dist/common/constants/common.constants.d.ts +11 -0
  27. package/dist/common/constants/common.constants.js +13 -1
  28. package/dist/common/constants/error.constants.d.ts +1 -0
  29. package/dist/common/constants/error.constants.js +3 -2
  30. package/dist/common/constants/index.js +1 -5
  31. package/dist/common/edge-acl/user/index.js +1 -5
  32. package/dist/common/edge-ams/index.js +1 -5
  33. package/dist/common/edge-bss/address/index.js +1 -5
  34. package/dist/common/edge-bss/address/req/create.entity.js +1 -1
  35. package/dist/common/edge-bss/billing/index.js +1 -5
  36. package/dist/common/edge-bss/channel/index.js +1 -5
  37. package/dist/common/edge-bss/common/index.js +1 -5
  38. package/dist/common/edge-bss/customer/index.js +1 -5
  39. package/dist/common/edge-bss/customer/req/index.js +1 -5
  40. package/dist/common/edge-bss/index.js +1 -5
  41. package/dist/common/edge-bss/login/index.js +1 -5
  42. package/dist/common/edge-bss/product/index.js +1 -5
  43. package/dist/common/edge-bss/product/res/index.js +1 -5
  44. package/dist/common/edge-bss/saleperson/index.js +1 -5
  45. package/dist/common/edge-bss/shopping-cart/index.js +1 -5
  46. package/dist/common/edge-bss/shopping-cart/req/index.js +1 -5
  47. package/dist/common/edge-bss/shopping-cart/res/index.js +1 -5
  48. package/dist/common/edge-bss/shopping-cart/res/other.entity.js +1 -1
  49. package/dist/common/edge-bss/user/index.js +1 -5
  50. package/dist/common/edge-database/index.js +1 -5
  51. package/dist/common/edge-sms/contract/index.js +1 -5
  52. package/dist/common/edge-sms/index.js +1 -5
  53. package/dist/common/edge-zoho/index.js +1 -5
  54. package/dist/common/edge-zoho/sale-process/index.js +1 -5
  55. package/dist/common/edge-zoho/sale-process/req/patch.entity.js +3 -3
  56. package/dist/common/entities/index.js +1 -5
  57. package/dist/common/exception/exception.entity.d.ts +32 -18
  58. package/dist/common/exception/exception.entity.js +91 -41
  59. package/dist/common/exception/index.js +1 -5
  60. package/dist/common/number-pool/index.js +1 -5
  61. package/dist/common/user/auth/index.js +1 -5
  62. package/dist/common/user/index.js +1 -5
  63. package/dist/database/acl/user.entity.d.ts +0 -1
  64. package/dist/database/acl/user.entity.js +3 -5
  65. package/dist/database/index.js +1 -5
  66. package/dist/sys03/address/index.js +1 -5
  67. package/dist/sys03/constants/index.js +1 -5
  68. package/dist/sys03/otrs/index.js +1 -5
  69. package/dist/sys03/sale-process/index.js +1 -5
  70. package/dist/sys03/shopping-cart/index.js +1 -5
  71. package/dist/sys03/storage/index.js +1 -5
  72. package/dist/sys03/storage/res/index.js +1 -5
  73. package/dist/tsconfig.build.tsbuildinfo +1 -1
  74. package/dist/zoho/constants/index.js +1 -5
  75. package/dist/zoho/index.js +1 -5
  76. package/dist/zoho/sale-process/index.js +1 -5
  77. package/package.json +1 -1
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -116,7 +116,7 @@ class ShoppingCartConfigurationServiceSpecificationItemResDto {
116
116
  exports.ShoppingCartConfigurationServiceSpecificationItemResDto = ShoppingCartConfigurationServiceSpecificationItemResDto;
117
117
  class ShoppingCartConfigurationAddressResDto {
118
118
  static _OPENAPI_METADATA_FACTORY() {
119
- return { country: { required: false, type: () => String }, postcode: { required: true, type: () => String, pattern: /^[0-9]{1,5}$/ }, province: { required: true, type: () => String }, city: { required: true, type: () => String }, streetType: { required: true, type: () => String }, streetName: { required: true, type: () => String }, streetNumber: { required: true, type: () => String }, block: { required: true, type: () => String }, floor: { required: true, type: () => String }, door: { required: true, type: () => String }, entrance: { required: true, type: () => String }, apartmentId: { required: false, type: () => String } };
119
+ return { country: { required: false, type: () => String }, postcode: { required: true, type: () => String }, province: { required: true, type: () => String }, city: { required: true, type: () => String }, streetType: { required: true, type: () => String }, streetName: { required: true, type: () => String }, streetNumber: { required: true, type: () => String }, block: { required: true, type: () => String }, floor: { required: true, type: () => String }, door: { required: true, type: () => String }, entrance: { required: true, type: () => String }, apartmentId: { required: false, type: () => String } };
120
120
  }
121
121
  }
122
122
  __decorate([
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -337,7 +337,7 @@ class PartialAddressSelectedDto {
337
337
  }
338
338
  }
339
339
  __decorate([
340
- (0, class_validator_1.IsString)(),
340
+ (0, class_validator_1.IsInt)(),
341
341
  (0, class_validator_1.IsNotEmpty)(),
342
342
  __metadata("design:type", Number)
343
343
  ], PartialAddressSelectedDto.prototype, "coberturaId", void 0);
@@ -359,13 +359,13 @@ __decorate([
359
359
  __metadata("design:type", String)
360
360
  ], PartialApartmentSelectedDto.prototype, "search", void 0);
361
361
  __decorate([
362
- (0, class_validator_1.IsString)(),
362
+ (0, class_validator_1.IsInt)(),
363
363
  (0, class_validator_1.IsNotEmpty)(),
364
364
  (0, class_validator_1.IsOptional)(),
365
365
  __metadata("design:type", Number)
366
366
  ], PartialApartmentSelectedDto.prototype, "coberturaId", void 0);
367
367
  __decorate([
368
- (0, class_validator_1.IsString)(),
368
+ (0, class_validator_1.IsInt)(),
369
369
  (0, class_validator_1.IsNotEmpty)(),
370
370
  __metadata("design:type", Number)
371
371
  ], PartialApartmentSelectedDto.prototype, "coberturaPisoPortaId", void 0);
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,3 +1,4 @@
1
+ import { MicroserviceType } from '@common/constants/common.constants';
1
2
  export declare class BulkExceptionPayloadDto {
2
3
  child: string | number;
3
4
  message: HttpExceptionPayloadDto;
@@ -14,39 +15,52 @@ export declare class ConstraintsDto {
14
15
  isNotNull?: string;
15
16
  }
16
17
  export declare class HttpExceptionPayloadDto {
18
+ source?: MicroserviceType;
17
19
  status: number;
18
20
  i18n?: string;
19
21
  message: string;
20
22
  messages?: MessagePayloadDto[];
21
23
  }
24
+ interface ErrorParams {
25
+ code?: string;
26
+ args?: any;
27
+ }
22
28
  export declare class CustomError extends Error {
23
29
  code: string;
24
- constructor(code: string, ...args: any[]);
25
- }
26
- export declare class BundleConfigurationAttributeMismatchingError extends CustomError {
27
- constructor(...args: any[]);
28
- }
29
- export declare class FiberNotAvailableForThisNetworkError extends CustomError {
30
- constructor(...args: any[]);
31
- }
32
- export declare class EmptyShoppingCartError extends CustomError {
33
- constructor(...args: any[]);
34
- }
35
- export declare class ProvinceWithoutPrefixesError extends CustomError {
36
- constructor(...args: any[]);
30
+ source: MicroserviceType;
31
+ constructor(source: MicroserviceType, code: string, ...args: any[]);
37
32
  }
38
33
  export declare class DniValidationError extends CustomError {
39
- constructor(...args: any[]);
34
+ constructor(source: MicroserviceType, ...args: any[]);
40
35
  }
41
36
  export declare class CifValidationError extends CustomError {
42
- constructor(...args: any[]);
37
+ constructor(source: MicroserviceType, ...args: any[]);
43
38
  }
44
39
  export declare class NieValidationError extends CustomError {
45
- constructor(...args: any[]);
40
+ constructor(source: MicroserviceType, ...args: any[]);
46
41
  }
47
42
  export declare class FtpError extends CustomError {
48
- constructor(code: string, ...args: any[]);
43
+ constructor({ code, args }: ErrorParams);
49
44
  }
50
45
  export declare class ZohoError extends CustomError {
51
- constructor(code: string, ...args: any[]);
46
+ constructor({ code, args }: ErrorParams);
47
+ }
48
+ export declare class SmsCertError extends CustomError {
49
+ constructor({ code, args }: ErrorParams);
50
+ }
51
+ export declare class OtrsError extends CustomError {
52
+ constructor({ code, args }: ErrorParams);
53
+ }
54
+ export declare class DbBridgeError extends CustomError {
55
+ constructor({ code, args }: ErrorParams);
56
+ }
57
+ export declare class AmsError extends CustomError {
58
+ constructor({ args, code }: ErrorParams);
59
+ }
60
+ export declare class BearingPointError extends CustomError {
61
+ constructor({ code, args }: ErrorParams);
62
+ }
63
+ export declare class BssBridgeError extends CustomError {
64
+ constructor({ code, args }: ErrorParams);
52
65
  }
66
+ export {};
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ZohoError = exports.FtpError = exports.NieValidationError = exports.CifValidationError = exports.DniValidationError = exports.ProvinceWithoutPrefixesError = exports.EmptyShoppingCartError = exports.FiberNotAvailableForThisNetworkError = exports.BundleConfigurationAttributeMismatchingError = exports.CustomError = exports.HttpExceptionPayloadDto = exports.ConstraintsDto = exports.MessagePayloadDto = exports.BulkExceptionPayloadDto = void 0;
3
+ exports.BssBridgeError = exports.BearingPointError = exports.AmsError = exports.DbBridgeError = exports.OtrsError = exports.SmsCertError = exports.ZohoError = exports.FtpError = exports.NieValidationError = exports.CifValidationError = exports.DniValidationError = exports.CustomError = exports.HttpExceptionPayloadDto = exports.ConstraintsDto = exports.MessagePayloadDto = exports.BulkExceptionPayloadDto = void 0;
4
4
  const openapi = require("@nestjs/swagger");
5
- const constants_1 = require("../constants");
5
+ const error_constants_1 = require("../constants/error.constants");
6
+ const common_constants_1 = require("../constants/common.constants");
6
7
  class BulkExceptionPayloadDto {
7
8
  static _OPENAPI_METADATA_FACTORY() {
8
9
  return { child: { required: true, type: () => Object }, message: { required: true, type: () => require("./exception.entity").HttpExceptionPayloadDto } };
@@ -23,98 +24,147 @@ class ConstraintsDto {
23
24
  exports.ConstraintsDto = ConstraintsDto;
24
25
  class HttpExceptionPayloadDto {
25
26
  static _OPENAPI_METADATA_FACTORY() {
26
- return { status: { required: true, type: () => Number }, i18n: { required: false, type: () => String }, message: { required: true, type: () => String }, messages: { required: false, type: () => [require("./exception.entity").MessagePayloadDto] } };
27
+ return { source: { required: false, enum: require("../constants/common.constants").MicroserviceType }, status: { required: true, type: () => Number }, i18n: { required: false, type: () => String }, message: { required: true, type: () => String }, messages: { required: false, type: () => [require("./exception.entity").MessagePayloadDto] } };
27
28
  }
28
29
  }
29
30
  exports.HttpExceptionPayloadDto = HttpExceptionPayloadDto;
31
+ function mapErrorCode(code) {
32
+ if (code && code.toString().startsWith('E_'))
33
+ return code;
34
+ switch (code) {
35
+ case 'ECONNREFUSED':
36
+ return error_constants_1.E_CONNECTION_REFUSED;
37
+ }
38
+ }
30
39
  class CustomError extends Error {
31
- constructor(code, ...args) {
40
+ constructor(source, code, ...args) {
32
41
  super(...args);
42
+ this.source = source;
33
43
  this.code = code;
34
44
  }
35
45
  static _OPENAPI_METADATA_FACTORY() {
36
- return { code: { required: true, type: () => String } };
46
+ return { code: { required: true, type: () => String }, source: { required: true, enum: require("../constants/common.constants").MicroserviceType } };
37
47
  }
38
48
  }
39
49
  exports.CustomError = CustomError;
40
- class BundleConfigurationAttributeMismatchingError extends CustomError {
41
- constructor(...args) {
42
- super(constants_1.E_BUNDLE_CONFIGURATION_ATTRIBUTE_MISMATCHING, ...args);
50
+ class DniValidationError extends CustomError {
51
+ constructor(source, ...args) {
52
+ super(source, error_constants_1.E_DNI_VALIDATION, ...args);
43
53
  }
44
54
  static _OPENAPI_METADATA_FACTORY() {
45
55
  return {};
46
56
  }
47
57
  }
48
- exports.BundleConfigurationAttributeMismatchingError = BundleConfigurationAttributeMismatchingError;
49
- class FiberNotAvailableForThisNetworkError extends CustomError {
50
- constructor(...args) {
51
- super(constants_1.E_FIBER_NOT_AVAILABLE_FOR_THIS_NETWORK, ...args);
58
+ exports.DniValidationError = DniValidationError;
59
+ class CifValidationError extends CustomError {
60
+ constructor(source, ...args) {
61
+ super(source, error_constants_1.E_CIF_VALIDATION, ...args);
52
62
  }
53
63
  static _OPENAPI_METADATA_FACTORY() {
54
64
  return {};
55
65
  }
56
66
  }
57
- exports.FiberNotAvailableForThisNetworkError = FiberNotAvailableForThisNetworkError;
58
- class EmptyShoppingCartError extends CustomError {
59
- constructor(...args) {
60
- super(constants_1.E_EMPTY_SHOPPING_CART, ...args);
67
+ exports.CifValidationError = CifValidationError;
68
+ class NieValidationError extends CustomError {
69
+ constructor(source, ...args) {
70
+ super(source, error_constants_1.E_NIE_VALIDATION, ...args);
61
71
  }
62
72
  static _OPENAPI_METADATA_FACTORY() {
63
73
  return {};
64
74
  }
65
75
  }
66
- exports.EmptyShoppingCartError = EmptyShoppingCartError;
67
- class ProvinceWithoutPrefixesError extends CustomError {
68
- constructor(...args) {
69
- super(constants_1.E_PROVINCE_WITHOUT_PREFIXES, ...args);
76
+ exports.NieValidationError = NieValidationError;
77
+ class FtpError extends CustomError {
78
+ constructor({ code, args }) {
79
+ const { code: argsCode } = args, mappedCode = code !== null && code !== void 0 ? code : mapErrorCode(argsCode);
80
+ super(common_constants_1.MicroserviceType.FTP, mappedCode, args);
81
+ this.name = 'FtpError';
70
82
  }
71
83
  static _OPENAPI_METADATA_FACTORY() {
72
84
  return {};
73
85
  }
74
86
  }
75
- exports.ProvinceWithoutPrefixesError = ProvinceWithoutPrefixesError;
76
- class DniValidationError extends CustomError {
77
- constructor(...args) {
78
- super(constants_1.E_DNI_VALIDATION, ...args);
87
+ exports.FtpError = FtpError;
88
+ class ZohoError extends CustomError {
89
+ constructor({ code, args }) {
90
+ const { response: { data: { code: responseCode, message: responseMessage } } = { data: ({} = {}) }, message, stack, code: argsCode } = args, mappedCode = code !== null && code !== void 0 ? code : (responseCode !== null && responseCode !== void 0 ? responseCode : mapErrorCode(argsCode));
91
+ super(common_constants_1.MicroserviceType.ZOHO_ADAPTOR, responseCode, responseMessage || message, stack);
92
+ this.name = 'ZohoError';
79
93
  }
80
94
  static _OPENAPI_METADATA_FACTORY() {
81
95
  return {};
82
96
  }
83
97
  }
84
- exports.DniValidationError = DniValidationError;
85
- class CifValidationError extends CustomError {
86
- constructor(...args) {
87
- super(constants_1.E_CIF_VALIDATION, ...args);
98
+ exports.ZohoError = ZohoError;
99
+ class SmsCertError extends CustomError {
100
+ constructor({ code, args }) {
101
+ const { response: { data: { code: responseCode, message: responseMessage } } = { data: ({} = {}) }, message, stack, code: argsCode } = args, mappedCode = code !== null && code !== void 0 ? code : (responseCode !== null && responseCode !== void 0 ? responseCode : mapErrorCode(argsCode));
102
+ super(common_constants_1.MicroserviceType.SMS_CERT, mappedCode, responseMessage || message, stack);
103
+ this.name = 'SmsCertError';
88
104
  }
89
105
  static _OPENAPI_METADATA_FACTORY() {
90
106
  return {};
91
107
  }
92
108
  }
93
- exports.CifValidationError = CifValidationError;
94
- class NieValidationError extends CustomError {
95
- constructor(...args) {
96
- super(constants_1.E_NIE_VALIDATION, ...args);
109
+ exports.SmsCertError = SmsCertError;
110
+ class OtrsError extends CustomError {
111
+ constructor({ code, args }) {
112
+ const { message, stack, code: argsCode } = args, mappedCode = code !== null && code !== void 0 ? code : mapErrorCode(argsCode);
113
+ super(common_constants_1.MicroserviceType.OTRS, mappedCode, message, stack);
114
+ this.name = 'OtrsError';
97
115
  }
98
116
  static _OPENAPI_METADATA_FACTORY() {
99
117
  return {};
100
118
  }
101
119
  }
102
- exports.NieValidationError = NieValidationError;
103
- class FtpError extends CustomError {
104
- constructor(code, ...args) {
105
- super(code, ...args);
120
+ exports.OtrsError = OtrsError;
121
+ class DbBridgeError extends CustomError {
122
+ constructor({ code, args }) {
123
+ const { message, stack, code: argsCode } = args, mappedCode = code !== null && code !== void 0 ? code : mapErrorCode(argsCode);
124
+ super(common_constants_1.MicroserviceType.DB_BRIDGE, mappedCode, message, stack);
125
+ this.name = 'DbBridgeError';
106
126
  }
107
127
  static _OPENAPI_METADATA_FACTORY() {
108
128
  return {};
109
129
  }
110
130
  }
111
- exports.FtpError = FtpError;
112
- class ZohoError extends CustomError {
113
- constructor(code, ...args) {
114
- super(code, ...args);
131
+ exports.DbBridgeError = DbBridgeError;
132
+ class AmsError extends CustomError {
133
+ constructor({ args, code }) {
134
+ const { message, stack, code: argsCode } = args, mappedCode = code !== null && code !== void 0 ? code : mapErrorCode(argsCode);
135
+ super(common_constants_1.MicroserviceType.AMS, mappedCode, message, stack);
136
+ this.name = 'AmsError';
115
137
  }
116
138
  static _OPENAPI_METADATA_FACTORY() {
117
139
  return {};
118
140
  }
119
141
  }
120
- exports.ZohoError = ZohoError;
142
+ exports.AmsError = AmsError;
143
+ class BearingPointError extends CustomError {
144
+ constructor({ code, args }) {
145
+ const { message, stack, code: argsCode } = args, mappedCode = code !== null && code !== void 0 ? code : mapErrorCode(argsCode);
146
+ super(common_constants_1.MicroserviceType.BEARINGPOINT, mappedCode, message, stack);
147
+ this.name = 'BearingPointError';
148
+ }
149
+ static _OPENAPI_METADATA_FACTORY() {
150
+ return {};
151
+ }
152
+ }
153
+ exports.BearingPointError = BearingPointError;
154
+ class BssBridgeError extends CustomError {
155
+ constructor({ code, args }) {
156
+ const { message, stack, code: argsCode, response } = args, mappedCode = code !== null && code !== void 0 ? code : mapErrorCode(argsCode);
157
+ if (response && response.data) {
158
+ const { source, i18n, message: dataMessage } = response.data;
159
+ super(source, i18n !== null && i18n !== void 0 ? i18n : mappedCode, dataMessage !== null && dataMessage !== void 0 ? dataMessage : message, stack);
160
+ this.name = 'BssBridgeError';
161
+ return;
162
+ }
163
+ super(common_constants_1.MicroserviceType.BSS_BRIDGE, mappedCode, message, stack);
164
+ this.name = 'BssBridgeError';
165
+ }
166
+ static _OPENAPI_METADATA_FACTORY() {
167
+ return {};
168
+ }
169
+ }
170
+ exports.BssBridgeError = BssBridgeError;
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,5 +1,4 @@
1
1
  export declare class AclUser {
2
- id?: number;
3
2
  user_id: string;
4
3
  role: string;
5
4
  }
@@ -14,19 +14,17 @@ const openapi = require("@nestjs/swagger");
14
14
  const typeorm_1 = require("typeorm");
15
15
  let AclUser = class AclUser {
16
16
  static _OPENAPI_METADATA_FACTORY() {
17
- return { id: { required: false, type: () => Number }, user_id: { required: true, type: () => String }, role: { required: true, type: () => String } };
17
+ return { user_id: { required: true, type: () => String }, role: { required: true, type: () => String } };
18
18
  }
19
19
  };
20
- __decorate([
21
- (0, typeorm_1.PrimaryGeneratedColumn)(),
22
- __metadata("design:type", Number)
23
- ], AclUser.prototype, "id", void 0);
24
20
  __decorate([
25
21
  (0, typeorm_1.Column)({ nullable: false }),
22
+ (0, typeorm_1.PrimaryColumn)(),
26
23
  __metadata("design:type", String)
27
24
  ], AclUser.prototype, "user_id", void 0);
28
25
  __decorate([
29
26
  (0, typeorm_1.Column)({ nullable: false }),
27
+ (0, typeorm_1.PrimaryColumn)(),
30
28
  __metadata("design:type", String)
31
29
  ], AclUser.prototype, "role", void 0);
32
30
  AclUser = __decorate([
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];