@zennify/sdk-js 1.13.2 → 1.15.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/package.json +1 -1
- package/src/errors.ts +5 -0
- package/translations/en_US.json +16 -0
- package/translations/pt_BR.json +16 -0
- package/types/errors.d.ts +6 -0
package/package.json
CHANGED
package/src/errors.ts
CHANGED
|
@@ -26,6 +26,10 @@ export interface APIErrors {
|
|
|
26
26
|
'PLEASE_REVERIFY': {};
|
|
27
27
|
// = user errors
|
|
28
28
|
'USER_NOT_FOUND': {};
|
|
29
|
+
/// token errors
|
|
30
|
+
'INVALID_TOKEN_NAME': {};
|
|
31
|
+
'INVALID_TOKEN_EXPIRATION': {};
|
|
32
|
+
'INVALID_TOKEN_PERMISSIONS': { received: string };
|
|
29
33
|
/// password errors
|
|
30
34
|
'INVALID_PASSWORD': {};
|
|
31
35
|
'YOU_MUST_INSERT_THE_ACTUAL_PASSWORD': {};
|
|
@@ -85,6 +89,7 @@ export interface APIErrors {
|
|
|
85
89
|
'FAILED_REFUND': {};
|
|
86
90
|
'INVALID_METADATA': { details: string };
|
|
87
91
|
// MP errors
|
|
92
|
+
'MP_INTERNAL_ERROR': {};
|
|
88
93
|
'MP_ACCOUNT_OFFLINE': {};
|
|
89
94
|
'MP_PIX_KEY_NOT_CONFIGURED': {};
|
|
90
95
|
'MP_NOT_ALLOWED_TO_SELL': {};
|
package/translations/en_US.json
CHANGED
|
@@ -79,6 +79,18 @@
|
|
|
79
79
|
"name": "User not found",
|
|
80
80
|
"message": "Try again."
|
|
81
81
|
},
|
|
82
|
+
"INVALID_TOKEN_NAME": {
|
|
83
|
+
"name": "Invalid Token Name",
|
|
84
|
+
"message": "Must be a string between 1 and 50 characters"
|
|
85
|
+
},
|
|
86
|
+
"INVALID_TOKEN_EXPIRATION": {
|
|
87
|
+
"name": "Invalid Token Expiration Date",
|
|
88
|
+
"message": "Must be a date between now and 500 days, or 0 (Forever)"
|
|
89
|
+
},
|
|
90
|
+
"INVALID_TOKEN_PERMISSIONS": {
|
|
91
|
+
"name": "Invalid Permissions",
|
|
92
|
+
"message": "Contact support and/or check our documentation"
|
|
93
|
+
},
|
|
82
94
|
"INVALID_PASSWORD": {
|
|
83
95
|
"name": "Invalid password",
|
|
84
96
|
"message": "Try again."
|
|
@@ -195,6 +207,10 @@
|
|
|
195
207
|
"name": "Transaction not found.",
|
|
196
208
|
"message": "It may not exist or may belong to another user."
|
|
197
209
|
},
|
|
210
|
+
"MP_INTERNAL_ERROR": {
|
|
211
|
+
"name": "Mercado Pago returned an unknown error, please try again or wait for them to fix it.",
|
|
212
|
+
"message": "Please note that this error is not a Zennify problem, but a Mercado Pago problem."
|
|
213
|
+
},
|
|
198
214
|
"MP_ACCOUNT_OFFLINE": {
|
|
199
215
|
"name": "Unable to generate an order",
|
|
200
216
|
"message": "It appears that this Mercado Pago account is offline."
|
package/translations/pt_BR.json
CHANGED
|
@@ -75,6 +75,18 @@
|
|
|
75
75
|
"name": "Usuário não encontrado",
|
|
76
76
|
"message": "Tente novamente."
|
|
77
77
|
},
|
|
78
|
+
"INVALID_TOKEN_NAME": {
|
|
79
|
+
"name": "Nome de token inválido",
|
|
80
|
+
"message": "Precisa ser uma string entre 1 e 50 caracteres"
|
|
81
|
+
},
|
|
82
|
+
"INVALID_TOKEN_EXPIRATION": {
|
|
83
|
+
"name": "Data de expiração do token inválida",
|
|
84
|
+
"message": "Deve ser uma data entre agora e 500 dias, ou 0 (Para sempre)"
|
|
85
|
+
},
|
|
86
|
+
"INVALID_TOKEN_PERMISSIONS": {
|
|
87
|
+
"name": "Permissões inválidas",
|
|
88
|
+
"message": "Contate o suporte e/ou verifique nossa documentação"
|
|
89
|
+
},
|
|
78
90
|
"INVALID_PASSWORD": {
|
|
79
91
|
"name": "Senha inválida",
|
|
80
92
|
"message": "Tente novamente."
|
|
@@ -191,6 +203,10 @@
|
|
|
191
203
|
"name": "Transação não encontrada.",
|
|
192
204
|
"message": "Talvez não exista ou pertença a outra pessoa."
|
|
193
205
|
},
|
|
206
|
+
"MP_INTERNAL_ERROR": {
|
|
207
|
+
"name": "O Mercado Pago retornou um erro desconhecido, tente novamente ou aguarde a correção deles.",
|
|
208
|
+
"message": "Note que esse erro não é um problema do Zennify, mas sim do Mercado Pago."
|
|
209
|
+
},
|
|
194
210
|
"MP_ACCOUNT_OFFLINE": {
|
|
195
211
|
"name": "Não foi possível gerar um pedido",
|
|
196
212
|
"message": "Aparentemente essa conta do Mercado Pago está inoperante."
|
package/types/errors.d.ts
CHANGED
|
@@ -23,6 +23,11 @@ export interface APIErrors {
|
|
|
23
23
|
'VERIFY_YOUR_EMAIL': {};
|
|
24
24
|
'PLEASE_REVERIFY': {};
|
|
25
25
|
'USER_NOT_FOUND': {};
|
|
26
|
+
'INVALID_TOKEN_NAME': {};
|
|
27
|
+
'INVALID_TOKEN_EXPIRATION': {};
|
|
28
|
+
'INVALID_TOKEN_PERMISSIONS': {
|
|
29
|
+
received: string;
|
|
30
|
+
};
|
|
26
31
|
'INVALID_PASSWORD': {};
|
|
27
32
|
'YOU_MUST_INSERT_THE_ACTUAL_PASSWORD': {};
|
|
28
33
|
'THE_PASSWORD_DOES_NOT_MATCH': {};
|
|
@@ -79,6 +84,7 @@ export interface APIErrors {
|
|
|
79
84
|
'INVALID_METADATA': {
|
|
80
85
|
details: string;
|
|
81
86
|
};
|
|
87
|
+
'MP_INTERNAL_ERROR': {};
|
|
82
88
|
'MP_ACCOUNT_OFFLINE': {};
|
|
83
89
|
'MP_PIX_KEY_NOT_CONFIGURED': {};
|
|
84
90
|
'MP_NOT_ALLOWED_TO_SELL': {};
|