@zennify/sdk-js 1.16.0 → 1.17.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 +13 -4
- package/translations/en_US.json +43 -3
- package/translations/pt_BR.json +43 -3
- package/types/errors.d.ts +11 -1
package/package.json
CHANGED
package/src/errors.ts
CHANGED
|
@@ -55,6 +55,7 @@ export interface APIErrors {
|
|
|
55
55
|
'WEBHOOK_RECEIVED_INVALID_DATA': { status: number };
|
|
56
56
|
/// payment errors
|
|
57
57
|
'INVALID_PAYMENT_METHOD': {};
|
|
58
|
+
'BANK_INTERNAL_ERROR': {};
|
|
58
59
|
// Order Errors
|
|
59
60
|
'YOU_NEED_TO_INSERT_AT_LEAST_1_ITEM': {};
|
|
60
61
|
'ONE_PROVIDED_PRODUCT_IS_OUT_OF_STOCK': {
|
|
@@ -90,10 +91,20 @@ export interface APIErrors {
|
|
|
90
91
|
'FAILED_REFUND': {};
|
|
91
92
|
'INVALID_METADATA': { details: string };
|
|
92
93
|
// MP errors
|
|
93
|
-
'MP_INTERNAL_ERROR': {};
|
|
94
94
|
'MP_ACCOUNT_OFFLINE': {};
|
|
95
95
|
'MP_PIX_KEY_NOT_CONFIGURED': {};
|
|
96
96
|
'MP_NOT_ALLOWED_TO_SELL': {};
|
|
97
|
+
'MP_RATE_LIMIT': {};
|
|
98
|
+
// Efi Errors
|
|
99
|
+
'EFIBANK_INVALID_PIX_KEY': {};
|
|
100
|
+
'EFIBANK_INVALID_CREDENTIALS': {};
|
|
101
|
+
'EFIBANK_INVALID_SCOPES': {};
|
|
102
|
+
'EFIBANK_INVALID_CERTIFICATE': {};
|
|
103
|
+
'EFIBANK_INVALID_CLIENT_ID': {};
|
|
104
|
+
'EFIBANK_INVALID_CLIENT_SECRET': {};
|
|
105
|
+
'EFIBANK_BLOCKED_ACCOUNT': {};
|
|
106
|
+
'EFIBANK_UNKNOWN_TRANSACTION': {};
|
|
107
|
+
'EFIBANK_RATE_LIMIT': {};
|
|
97
108
|
/// bad preference configuration
|
|
98
109
|
'THIS_SELLER_HAS_NOT_YET_CONFIGURED_RECEIPT_VIA_PIX': {};
|
|
99
110
|
'THIS_SELLER_HAS_NOT_YET_CONFIGURED_RECEIPT_VIA_BOLETO': {};
|
|
@@ -112,9 +123,7 @@ export interface APIErrors {
|
|
|
112
123
|
// store errors
|
|
113
124
|
'UNKNOWN_STORE': {};
|
|
114
125
|
'EXPIRED_STORE': {},
|
|
115
|
-
'UNKNOWN_BANK': {
|
|
116
|
-
received: string
|
|
117
|
-
};
|
|
126
|
+
'UNKNOWN_BANK': { received: string };
|
|
118
127
|
'INVALID_STORE_NAME': {};
|
|
119
128
|
'YOU_HAVE_ALREADY_MIGRATED': {};
|
|
120
129
|
/// AUTOROLE
|
package/translations/en_US.json
CHANGED
|
@@ -175,6 +175,10 @@
|
|
|
175
175
|
"name": "Invalid payment method",
|
|
176
176
|
"message": "Try again with another method."
|
|
177
177
|
},
|
|
178
|
+
"BANK_INTERNAL_ERROR": {
|
|
179
|
+
"name": "The bank returned an unknown error, please try again or wait for them to resolve it.",
|
|
180
|
+
"message": "Note that this error is not a problem of Zennify, but rather of the bank."
|
|
181
|
+
},
|
|
178
182
|
"YOU_NEED_TO_INSERT_AT_LEAST_1_ITEM": {
|
|
179
183
|
"name": "You need to insert at least 1 item",
|
|
180
184
|
"message": "Add an item to the order."
|
|
@@ -211,9 +215,9 @@
|
|
|
211
215
|
"name": "Transaction not found.",
|
|
212
216
|
"message": "It may not exist or may belong to another user."
|
|
213
217
|
},
|
|
214
|
-
"
|
|
215
|
-
"name": "
|
|
216
|
-
"message": "
|
|
218
|
+
"MP_RATE_LIMIT": {
|
|
219
|
+
"name": "Action limit reached, please try again.",
|
|
220
|
+
"message": "Note that this limit is imposed by Mercado Pago, not by Zennify."
|
|
217
221
|
},
|
|
218
222
|
"MP_ACCOUNT_OFFLINE": {
|
|
219
223
|
"name": "Unable to generate an order",
|
|
@@ -227,6 +231,42 @@
|
|
|
227
231
|
"name": "Not authorized by Mercado Pago to sell",
|
|
228
232
|
"message": "Please contact Mercado Pago support."
|
|
229
233
|
},
|
|
234
|
+
"EFIBANK_INVALID_PIX_KEY": {
|
|
235
|
+
"name": "The configured random Pix key is invalid or does not exist.",
|
|
236
|
+
"message": "Try generating a new random Pix key and configure it via the dashboard."
|
|
237
|
+
},
|
|
238
|
+
"EFIBANK_INVALID_CREDENTIALS": {
|
|
239
|
+
"name": "Efí credentials are invalid.",
|
|
240
|
+
"message": "Enter a valid client id, client secret, and certificate."
|
|
241
|
+
},
|
|
242
|
+
"EFIBANK_INVALID_SCOPES": {
|
|
243
|
+
"name": "The configured application's scopes are invalid.",
|
|
244
|
+
"message": "Configure the scopes correctly. Contact the Zennify team if you have any questions."
|
|
245
|
+
},
|
|
246
|
+
"EFIBANK_INVALID_CERTIFICATE": {
|
|
247
|
+
"name": "The configured certificate is invalid or does not exist.",
|
|
248
|
+
"message": "Remember to use the production certificate, not the test certificate."
|
|
249
|
+
},
|
|
250
|
+
"EFIBANK_INVALID_CLIENT_ID": {
|
|
251
|
+
"name": "The configured Client ID is invalid or does not exist.",
|
|
252
|
+
"message": "Remember to use the production Client ID, not the test Client ID."
|
|
253
|
+
},
|
|
254
|
+
"EFIBANK_INVALID_CLIENT_SECRET": {
|
|
255
|
+
"name": "The configured Client Secret is invalid or does not exist.",
|
|
256
|
+
"message": "Remember to use the production Client Secret, not the test Client Secret."
|
|
257
|
+
},
|
|
258
|
+
"EFIBANK_BLOCKED_ACCOUNT": {
|
|
259
|
+
"name": "The associated efí account is suspended from selling.",
|
|
260
|
+
"message": "Try contacting the Banco Efí team."
|
|
261
|
+
},
|
|
262
|
+
"EFIBANK_RATE_LIMIT": {
|
|
263
|
+
"name": "Action limit reached, please try again.",
|
|
264
|
+
"message": "Note that this limit is imposed by Banco Efí, not by Zennify."
|
|
265
|
+
},
|
|
266
|
+
"EFIBANK_UNKNOWN_TRANSACTION": {
|
|
267
|
+
"name": "This transaction could not be found.",
|
|
268
|
+
"message": "Maybe it does not exist or belongs to another account."
|
|
269
|
+
},
|
|
230
270
|
"INVALID_OPERATION_FOR_CURRENT_TRANSACTION_STATUS": {
|
|
231
271
|
"name": "Invalid operation for this transaction.",
|
|
232
272
|
"message": "The current status doesn't allow this operation."
|
package/translations/pt_BR.json
CHANGED
|
@@ -171,6 +171,10 @@
|
|
|
171
171
|
"name": "Método de pagamento inválido",
|
|
172
172
|
"message": "Tente novamente com outro método."
|
|
173
173
|
},
|
|
174
|
+
"BANK_INTERNAL_ERROR": {
|
|
175
|
+
"name": "O banco retornou um erro desconhecido, tente novamente ou aguarde a correção deles.",
|
|
176
|
+
"message": "Note que esse erro não é um problema do Zennify, mas sim do banco."
|
|
177
|
+
},
|
|
174
178
|
"YOU_NEED_TO_INSERT_AT_LEAST_1_ITEM": {
|
|
175
179
|
"name": "Insira pelo menos 1 item",
|
|
176
180
|
"message": "Adicione um item ao pedido."
|
|
@@ -207,9 +211,9 @@
|
|
|
207
211
|
"name": "Transação não encontrada.",
|
|
208
212
|
"message": "Talvez não exista ou pertença a outra pessoa."
|
|
209
213
|
},
|
|
210
|
-
"
|
|
211
|
-
"name": "O
|
|
212
|
-
"message": "Note que esse
|
|
214
|
+
"MP_RATE_LIMIT": {
|
|
215
|
+
"name": "O limite de ações foi atingido, tente novamente.",
|
|
216
|
+
"message": "Note que esse limite é imposto pelo Mercado Pago, não pelo Zennify."
|
|
213
217
|
},
|
|
214
218
|
"MP_ACCOUNT_OFFLINE": {
|
|
215
219
|
"name": "Não foi possível gerar um pedido",
|
|
@@ -223,6 +227,42 @@
|
|
|
223
227
|
"name": "Sem autorização do Mercado Pago para vender",
|
|
224
228
|
"message": "Entre em contato com o Mercado Pago."
|
|
225
229
|
},
|
|
230
|
+
"EFIBANK_INVALID_PIX_KEY": {
|
|
231
|
+
"name": "A chave pix aleatória configurada é inválida ou não existe.",
|
|
232
|
+
"message": "Tente gerar uma nova chave pix aleatória e configurar novamente."
|
|
233
|
+
},
|
|
234
|
+
"EFIBANK_INVALID_CREDENTIALS": {
|
|
235
|
+
"name": "As credenciais da Efí estão inválidas.",
|
|
236
|
+
"message": "Insira um client id, client secret e certificado válido."
|
|
237
|
+
},
|
|
238
|
+
"EFIBANK_INVALID_SCOPES": {
|
|
239
|
+
"name": "Os escopos da aplicação configurada são inválidos.",
|
|
240
|
+
"message": "Configure os escopos corretamente. Entre em contato com a equipe do Zennify caso tenha dúvidas."
|
|
241
|
+
},
|
|
242
|
+
"EFIBANK_INVALID_CERTIFICATE": {
|
|
243
|
+
"name": "O certificado configurado é inválido ou não existe.",
|
|
244
|
+
"message": "Lembre-se de usar o certificado de produção, não de homologação."
|
|
245
|
+
},
|
|
246
|
+
"EFIBANK_INVALID_CLIENT_ID": {
|
|
247
|
+
"name": "O Client ID configurado é inválido ou não existe.",
|
|
248
|
+
"message": "Lembre-se de usar o Client ID de produção, não de homologação."
|
|
249
|
+
},
|
|
250
|
+
"EFIBANK_INVALID_CLIENT_SECRET": {
|
|
251
|
+
"name": "O Client Secret configurado é inválido ou não existe.",
|
|
252
|
+
"message": "Lembre-se de usar o Client Secret de produção, não de homologação."
|
|
253
|
+
},
|
|
254
|
+
"EFIBANK_BLOCKED_ACCOUNT": {
|
|
255
|
+
"name": "A conta efí associada está suspensa de vender.",
|
|
256
|
+
"message": "Tente entrar em contato com a equipe do Banco Efí."
|
|
257
|
+
},
|
|
258
|
+
"EFIBANK_RATE_LIMIT": {
|
|
259
|
+
"name": "O limite de ações foi atingido, tente novamente.",
|
|
260
|
+
"message": "Note que esse limite é imposto pelo Banco Efí, não pelo Zennify."
|
|
261
|
+
},
|
|
262
|
+
"EFIBANK_UNKNOWN_TRANSACTION": {
|
|
263
|
+
"name": "Não foi possível encontrar essa transação.",
|
|
264
|
+
"message": "Talvez ela não existe ou seja pertencente a outra conta."
|
|
265
|
+
},
|
|
226
266
|
"INVALID_OPERATION_FOR_CURRENT_TRANSACTION_STATUS": {
|
|
227
267
|
"name": "Operação inválida para essa transação.",
|
|
228
268
|
"message": "O estado atual não permite que a operação seja realizada."
|
package/types/errors.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export interface APIErrors {
|
|
|
49
49
|
status: number;
|
|
50
50
|
};
|
|
51
51
|
'INVALID_PAYMENT_METHOD': {};
|
|
52
|
+
'BANK_INTERNAL_ERROR': {};
|
|
52
53
|
'YOU_NEED_TO_INSERT_AT_LEAST_1_ITEM': {};
|
|
53
54
|
'ONE_PROVIDED_PRODUCT_IS_OUT_OF_STOCK': {
|
|
54
55
|
name: string;
|
|
@@ -83,10 +84,19 @@ export interface APIErrors {
|
|
|
83
84
|
'INVALID_METADATA': {
|
|
84
85
|
details: string;
|
|
85
86
|
};
|
|
86
|
-
'MP_INTERNAL_ERROR': {};
|
|
87
87
|
'MP_ACCOUNT_OFFLINE': {};
|
|
88
88
|
'MP_PIX_KEY_NOT_CONFIGURED': {};
|
|
89
89
|
'MP_NOT_ALLOWED_TO_SELL': {};
|
|
90
|
+
'MP_RATE_LIMIT': {};
|
|
91
|
+
'EFIBANK_INVALID_PIX_KEY': {};
|
|
92
|
+
'EFIBANK_INVALID_CREDENTIALS': {};
|
|
93
|
+
'EFIBANK_INVALID_SCOPES': {};
|
|
94
|
+
'EFIBANK_INVALID_CERTIFICATE': {};
|
|
95
|
+
'EFIBANK_INVALID_CLIENT_ID': {};
|
|
96
|
+
'EFIBANK_INVALID_CLIENT_SECRET': {};
|
|
97
|
+
'EFIBANK_BLOCKED_ACCOUNT': {};
|
|
98
|
+
'EFIBANK_UNKNOWN_TRANSACTION': {};
|
|
99
|
+
'EFIBANK_RATE_LIMIT': {};
|
|
90
100
|
'THIS_SELLER_HAS_NOT_YET_CONFIGURED_RECEIPT_VIA_PIX': {};
|
|
91
101
|
'THIS_SELLER_HAS_NOT_YET_CONFIGURED_RECEIPT_VIA_BOLETO': {};
|
|
92
102
|
'THIS_SELLER_HAS_NOT_YET_CONFIGURED_RECEIPT_VIA_CRYPTO': {};
|