sm-types 1.9.9 → 1.9.11

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/errors/index.d.ts CHANGED
@@ -1,26 +1,9 @@
1
+ export { SUPPORT_ERROR_CODES } from "./support";
1
2
  export * as USER_ERRORS from "./user";
2
- export declare const SUPPORT_ERROR_CODES: {
3
- SUPPLIER_CONFIG_REPLICATION: {
4
- MISSING_CONFIGS: {
5
- usecase: string;
6
- type: string;
7
- messageLangMap: {
8
- "PT-BR": string;
9
- };
10
- };
11
- ALREADY_HAS_CONFIGS: {
12
- usecase: string;
13
- type: string;
14
- messageLangMap: {
15
- "PT-BR": string;
16
- };
17
- };
18
- SUPPORT_USER_NOT_FOUND: {
19
- usecase: string;
20
- type: string;
21
- messageLangMap: {
22
- "PT-BR": string;
23
- };
24
- };
25
- };
3
+ export declare const REQUEST_ERRORS: {
4
+ TIMEOUT: string;
5
+ NOT_FOUND: string;
6
+ UNAUTHORIZED: string;
7
+ UNEXPECTED: string;
8
+ BAD_REQUEST: string;
26
9
  };
package/errors/index.js CHANGED
@@ -23,30 +23,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.SUPPORT_ERROR_CODES = exports.USER_ERRORS = void 0;
26
+ exports.REQUEST_ERRORS = exports.USER_ERRORS = exports.SUPPORT_ERROR_CODES = void 0;
27
+ var support_1 = require("./support");
28
+ Object.defineProperty(exports, "SUPPORT_ERROR_CODES", { enumerable: true, get: function () { return support_1.SUPPORT_ERROR_CODES; } });
27
29
  exports.USER_ERRORS = __importStar(require("./user"));
28
- exports.SUPPORT_ERROR_CODES = {
29
- SUPPLIER_CONFIG_REPLICATION: {
30
- MISSING_CONFIGS: {
31
- usecase: "SUPPLIER_CONFIG_REPLICATION",
32
- type: "MISSING_CONFIGS",
33
- messageLangMap: {
34
- "PT-BR": "Perfil de cobrança selecionado deve ter todos os fornecedores configurados para ser replicado.",
35
- },
36
- },
37
- ALREADY_HAS_CONFIGS: {
38
- usecase: "SUPPLIER_CONFIG_REPLICATION",
39
- type: "ALREADY_HAS_CONFIGS",
40
- messageLangMap: {
41
- "PT-BR": "Este perfil de cobrança já possui fornecedores configurados.",
42
- },
43
- },
44
- SUPPORT_USER_NOT_FOUND: {
45
- usecase: "SUPPLIER_CONFIG_REPLICATION",
46
- type: "SUPPORT_USER_NOT_FOUND",
47
- messageLangMap: {
48
- "PT-BR": "Aconteceu um erro inesperado.",
49
- },
50
- },
51
- },
30
+ exports.REQUEST_ERRORS = {
31
+ TIMEOUT: 'TIMEOUT',
32
+ NOT_FOUND: 'NOT_FOUND',
33
+ UNAUTHORIZED: 'UNAUTHORIZED',
34
+ UNEXPECTED: 'UNEXPECTED',
35
+ BAD_REQUEST: 'BAD_REQUEST',
52
36
  };
@@ -0,0 +1,134 @@
1
+ export declare const SUPPORT_ERROR_CODES: {
2
+ SUPPLIER_CONFIG_REPLICATION: {
3
+ MISSING_CONFIGS: {
4
+ usecase: string;
5
+ type: string;
6
+ messageLangMap: {
7
+ "PT-BR": string;
8
+ };
9
+ };
10
+ ALREADY_HAS_CONFIGS: {
11
+ usecase: string;
12
+ type: string;
13
+ messageLangMap: {
14
+ "PT-BR": string;
15
+ };
16
+ };
17
+ SUPPORT_USER_NOT_FOUND: {
18
+ usecase: string;
19
+ type: string;
20
+ messageLangMap: {
21
+ "PT-BR": string;
22
+ };
23
+ };
24
+ };
25
+ SUPPLIER_CONFIG_CREATE: {
26
+ INVALID_REPLICATION: {
27
+ usecase: string;
28
+ type: string;
29
+ messageLangMap: {
30
+ "PT-BR": string;
31
+ };
32
+ };
33
+ INVALID_PAY_OPTION: {
34
+ usecase: string;
35
+ type: string;
36
+ messageLangMap: {
37
+ "PT-BR": string;
38
+ };
39
+ };
40
+ INVALID_MONETIZATION_LOCATION: {
41
+ usecase: string;
42
+ type: string;
43
+ messageLangMap: {
44
+ "PT-BR": string;
45
+ };
46
+ };
47
+ INVALID_MONETIZATION_CONFIG: {
48
+ usecase: string;
49
+ type: string;
50
+ messageLangMap: {
51
+ "PT-BR": string;
52
+ };
53
+ };
54
+ MONETIZATION_CONFIG_INCOMPLETE: {
55
+ usecase: string;
56
+ type: string;
57
+ messageLangMap: {
58
+ "PT-BR": string;
59
+ };
60
+ };
61
+ INVALID_AGENCY_RECEIPT_OPTION: {
62
+ usecase: string;
63
+ type: string;
64
+ messageLangMap: {
65
+ "PT-BR": string;
66
+ };
67
+ };
68
+ INVALID_SUPPLIER_RECEIPT_OPTION: {
69
+ usecase: string;
70
+ type: string;
71
+ messageLangMap: {
72
+ "PT-BR": string;
73
+ };
74
+ };
75
+ ALREADY_REGISTERED: {
76
+ usecase: string;
77
+ type: string;
78
+ messageLangMap: {
79
+ "PT-BR": string;
80
+ };
81
+ };
82
+ };
83
+ SUPPLIER_CONFIG_EDIT: {
84
+ INVALID_MONETIZATION_LOCATION: {
85
+ usecase: string;
86
+ type: string;
87
+ messageLangMap: {
88
+ "PT-BR": string;
89
+ };
90
+ };
91
+ INVALID_MONETIZATION_CONFIG: {
92
+ usecase: string;
93
+ type: string;
94
+ messageLangMap: {
95
+ "PT-BR": string;
96
+ };
97
+ };
98
+ INVALID_AGENCY_RECEIPT_OPTION: {
99
+ usecase: string;
100
+ type: string;
101
+ messageLangMap: {
102
+ "PT-BR": string;
103
+ };
104
+ };
105
+ INVALID_SUPPLIER_RECEIPT_OPTION: {
106
+ usecase: string;
107
+ type: string;
108
+ messageLangMap: {
109
+ "PT-BR": string;
110
+ };
111
+ };
112
+ SUPPLIER_NOT_FOUND: {
113
+ usecase: string;
114
+ type: string;
115
+ messageLangMap: {
116
+ "PT-BR": string;
117
+ };
118
+ };
119
+ USER_NOT_FOUND: {
120
+ usecase: string;
121
+ type: string;
122
+ messageLangMap: {
123
+ "PT-BR": string;
124
+ };
125
+ };
126
+ SUPPLIER_CONFIG_NOT_FOUND: {
127
+ usecase: string;
128
+ type: string;
129
+ messageLangMap: {
130
+ "PT-BR": string;
131
+ };
132
+ };
133
+ };
134
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUPPORT_ERROR_CODES = void 0;
4
+ var createSupplierConfig_1 = require("./use-cases/createSupplierConfig");
5
+ var editSupplierConfig_1 = require("./use-cases/editSupplierConfig");
6
+ var replicateSupplierConfigs_1 = require("./use-cases/replicateSupplierConfigs");
7
+ exports.SUPPORT_ERROR_CODES = {
8
+ SUPPLIER_CONFIG_REPLICATION: replicateSupplierConfigs_1.SUPPLIER_CONFIG_REPLICATION,
9
+ SUPPLIER_CONFIG_CREATE: createSupplierConfig_1.SUPPLIER_CONFIG_CREATE,
10
+ SUPPLIER_CONFIG_EDIT: editSupplierConfig_1.SUPPLIER_CONFIG_EDIT,
11
+ };
@@ -0,0 +1,58 @@
1
+ export declare const SUPPLIER_CONFIG_CREATE: {
2
+ INVALID_REPLICATION: {
3
+ usecase: string;
4
+ type: string;
5
+ messageLangMap: {
6
+ "PT-BR": string;
7
+ };
8
+ };
9
+ INVALID_PAY_OPTION: {
10
+ usecase: string;
11
+ type: string;
12
+ messageLangMap: {
13
+ "PT-BR": string;
14
+ };
15
+ };
16
+ INVALID_MONETIZATION_LOCATION: {
17
+ usecase: string;
18
+ type: string;
19
+ messageLangMap: {
20
+ "PT-BR": string;
21
+ };
22
+ };
23
+ INVALID_MONETIZATION_CONFIG: {
24
+ usecase: string;
25
+ type: string;
26
+ messageLangMap: {
27
+ "PT-BR": string;
28
+ };
29
+ };
30
+ MONETIZATION_CONFIG_INCOMPLETE: {
31
+ usecase: string;
32
+ type: string;
33
+ messageLangMap: {
34
+ "PT-BR": string;
35
+ };
36
+ };
37
+ INVALID_AGENCY_RECEIPT_OPTION: {
38
+ usecase: string;
39
+ type: string;
40
+ messageLangMap: {
41
+ "PT-BR": string;
42
+ };
43
+ };
44
+ INVALID_SUPPLIER_RECEIPT_OPTION: {
45
+ usecase: string;
46
+ type: string;
47
+ messageLangMap: {
48
+ "PT-BR": string;
49
+ };
50
+ };
51
+ ALREADY_REGISTERED: {
52
+ usecase: string;
53
+ type: string;
54
+ messageLangMap: {
55
+ "PT-BR": string;
56
+ };
57
+ };
58
+ };
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUPPLIER_CONFIG_CREATE = void 0;
4
+ exports.SUPPLIER_CONFIG_CREATE = {
5
+ INVALID_REPLICATION: {
6
+ usecase: "SUPPLIER_CONFIG_CREATE",
7
+ type: "INVALID_REPLICATION",
8
+ messageLangMap: {
9
+ "PT-BR": "Não é possível replicar um fornecedor integrado.",
10
+ },
11
+ },
12
+ INVALID_PAY_OPTION: {
13
+ usecase: "SUPPLIER_CONFIG_CREATE",
14
+ type: "INVALID_PAY_OPTION",
15
+ messageLangMap: {
16
+ "PT-BR": "Opção de pagamento inválida.",
17
+ },
18
+ },
19
+ INVALID_MONETIZATION_LOCATION: {
20
+ usecase: "SUPPLIER_CONFIG_CREATE",
21
+ type: "INVALID_MONETIZATION",
22
+ messageLangMap: {
23
+ "PT-BR": "Não é possível configurar monetização pela agência nesse fornecedor.",
24
+ },
25
+ },
26
+ INVALID_MONETIZATION_CONFIG: {
27
+ usecase: "SUPPLIER_CONFIG_CREATE",
28
+ type: "INVALID_MONETIZATION_CONFIG",
29
+ messageLangMap: {
30
+ "PT-BR": "Configuração de monetização inválida.",
31
+ },
32
+ },
33
+ MONETIZATION_CONFIG_INCOMPLETE: {
34
+ usecase: "SUPPLIER_CONFIG_CREATE",
35
+ type: "MONETIZATION_CONFIG_INCOMPLETE",
36
+ messageLangMap: {
37
+ "PT-BR": "Configuração de monetização incompleta.",
38
+ },
39
+ },
40
+ INVALID_AGENCY_RECEIPT_OPTION: {
41
+ usecase: "SUPPLIER_CONFIG_CREATE",
42
+ type: "INVALID_AGENCY_RECEIPT_OPTION",
43
+ messageLangMap: {
44
+ "PT-BR": "Opção de recebimento da agência inválida.",
45
+ },
46
+ },
47
+ INVALID_SUPPLIER_RECEIPT_OPTION: {
48
+ usecase: "SUPPLIER_CONFIG_CREATE",
49
+ type: "INVALID_SUPPLIER_RECEIPT_OPTION",
50
+ messageLangMap: {
51
+ "PT-BR": "Opção de recebimento do fornecedor inválida.",
52
+ },
53
+ },
54
+ ALREADY_REGISTERED: {
55
+ usecase: "SUPPLIER_CONFIG_CREATE",
56
+ type: "ALREADY_REGISTERED",
57
+ messageLangMap: {
58
+ "PT-BR": "Fornecedor já configurado.",
59
+ },
60
+ }
61
+ };
@@ -0,0 +1,51 @@
1
+ export declare const SUPPLIER_CONFIG_EDIT: {
2
+ INVALID_MONETIZATION_LOCATION: {
3
+ usecase: string;
4
+ type: string;
5
+ messageLangMap: {
6
+ "PT-BR": string;
7
+ };
8
+ };
9
+ INVALID_MONETIZATION_CONFIG: {
10
+ usecase: string;
11
+ type: string;
12
+ messageLangMap: {
13
+ "PT-BR": string;
14
+ };
15
+ };
16
+ INVALID_AGENCY_RECEIPT_OPTION: {
17
+ usecase: string;
18
+ type: string;
19
+ messageLangMap: {
20
+ "PT-BR": string;
21
+ };
22
+ };
23
+ INVALID_SUPPLIER_RECEIPT_OPTION: {
24
+ usecase: string;
25
+ type: string;
26
+ messageLangMap: {
27
+ "PT-BR": string;
28
+ };
29
+ };
30
+ SUPPLIER_NOT_FOUND: {
31
+ usecase: string;
32
+ type: string;
33
+ messageLangMap: {
34
+ "PT-BR": string;
35
+ };
36
+ };
37
+ USER_NOT_FOUND: {
38
+ usecase: string;
39
+ type: string;
40
+ messageLangMap: {
41
+ "PT-BR": string;
42
+ };
43
+ };
44
+ SUPPLIER_CONFIG_NOT_FOUND: {
45
+ usecase: string;
46
+ type: string;
47
+ messageLangMap: {
48
+ "PT-BR": string;
49
+ };
50
+ };
51
+ };
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUPPLIER_CONFIG_EDIT = void 0;
4
+ exports.SUPPLIER_CONFIG_EDIT = {
5
+ INVALID_MONETIZATION_LOCATION: {
6
+ usecase: "SUPPLIER_CONFIG_EDIT",
7
+ type: "INVALID_MONETIZATION",
8
+ messageLangMap: {
9
+ "PT-BR": "Não é possível configurar monetização pela agência nesse fornecedor.",
10
+ },
11
+ },
12
+ INVALID_MONETIZATION_CONFIG: {
13
+ usecase: "SUPPLIER_CONFIG_EDIT",
14
+ type: "INVALID_MONETIZATION_CONFIG",
15
+ messageLangMap: {
16
+ "PT-BR": "Configuração de monetização inválida.",
17
+ },
18
+ },
19
+ INVALID_AGENCY_RECEIPT_OPTION: {
20
+ usecase: "SUPPLIER_CONFIG_EDIT",
21
+ type: "INVALID_AGENCY_RECEIPT_OPTION",
22
+ messageLangMap: {
23
+ "PT-BR": "Opção de recebimento da agência inválida.",
24
+ },
25
+ },
26
+ INVALID_SUPPLIER_RECEIPT_OPTION: {
27
+ usecase: "SUPPLIER_CONFIG_EDIT",
28
+ type: "INVALID_SUPPLIER_RECEIPT_OPTION",
29
+ messageLangMap: {
30
+ "PT-BR": "Opção de recebimento do fornecedor inválida.",
31
+ },
32
+ },
33
+ SUPPLIER_NOT_FOUND: {
34
+ usecase: "SUPPLIER_CONFIG_EDIT",
35
+ type: "SUPPLIER_NOT_FOUND",
36
+ messageLangMap: {
37
+ "PT-BR": "Fornecedor não encontrado.",
38
+ },
39
+ },
40
+ USER_NOT_FOUND: {
41
+ usecase: "SUPPLIER_CONFIG_EDIT",
42
+ type: "USER_NOT_FOUND",
43
+ messageLangMap: {
44
+ "PT-BR": "Usuário não encontrado.",
45
+ },
46
+ },
47
+ SUPPLIER_CONFIG_NOT_FOUND: {
48
+ usecase: "SUPPLIER_CONFIG_EDIT",
49
+ type: "SUPPLIER_CONFIG_NOT_FOUND",
50
+ messageLangMap: {
51
+ "PT-BR": "Configuração de fornecedor não encontrada.",
52
+ },
53
+ },
54
+ };
@@ -0,0 +1,23 @@
1
+ export declare const SUPPLIER_CONFIG_REPLICATION: {
2
+ MISSING_CONFIGS: {
3
+ usecase: string;
4
+ type: string;
5
+ messageLangMap: {
6
+ "PT-BR": string;
7
+ };
8
+ };
9
+ ALREADY_HAS_CONFIGS: {
10
+ usecase: string;
11
+ type: string;
12
+ messageLangMap: {
13
+ "PT-BR": string;
14
+ };
15
+ };
16
+ SUPPORT_USER_NOT_FOUND: {
17
+ usecase: string;
18
+ type: string;
19
+ messageLangMap: {
20
+ "PT-BR": string;
21
+ };
22
+ };
23
+ };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUPPLIER_CONFIG_REPLICATION = void 0;
4
+ exports.SUPPLIER_CONFIG_REPLICATION = {
5
+ MISSING_CONFIGS: {
6
+ usecase: "SUPPLIER_CONFIG_REPLICATION",
7
+ type: "MISSING_CONFIGS",
8
+ messageLangMap: {
9
+ "PT-BR": "Perfil de cobrança selecionado deve ter todos os fornecedores configurados para ser replicado.",
10
+ },
11
+ },
12
+ ALREADY_HAS_CONFIGS: {
13
+ usecase: "SUPPLIER_CONFIG_REPLICATION",
14
+ type: "ALREADY_HAS_CONFIGS",
15
+ messageLangMap: {
16
+ "PT-BR": "Este perfil de cobrança já possui fornecedores configurados.",
17
+ },
18
+ },
19
+ SUPPORT_USER_NOT_FOUND: {
20
+ usecase: "SUPPLIER_CONFIG_REPLICATION",
21
+ type: "SUPPORT_USER_NOT_FOUND",
22
+ messageLangMap: {
23
+ "PT-BR": "Aconteceu um erro inesperado.",
24
+ },
25
+ },
26
+ };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Smartrips",
4
4
  "license": "ISC",
5
5
  "keywords": [],
6
- "version": "1.9.9",
6
+ "version": "1.9.11",
7
7
  "description": "",
8
8
  "repository": {
9
9
  "type": "git",