@zennify/sdk-js 1.17.0 → 1.19.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zennify/sdk-js",
3
- "version": "1.17.0",
3
+ "version": "1.19.0",
4
4
  "description": "A simple package to work with https://api.zennify.app",
5
5
  "main": "dist/main.js",
6
6
  "keywords": [],
package/src/errors.ts CHANGED
@@ -91,6 +91,7 @@ export interface APIErrors {
91
91
  'FAILED_REFUND': {};
92
92
  'INVALID_METADATA': { details: string };
93
93
  // MP errors
94
+ 'MP_INVALID_TOKEN': {};
94
95
  'MP_ACCOUNT_OFFLINE': {};
95
96
  'MP_PIX_KEY_NOT_CONFIGURED': {};
96
97
  'MP_NOT_ALLOWED_TO_SELL': {};
@@ -2,7 +2,12 @@ export type Statistic = {
2
2
  count: number,
3
3
  users: number,
4
4
  value: number,
5
- rating: number
5
+ rating: number,
6
+ customers: Array<{
7
+ id: number,
8
+ discord_user_id: string,
9
+ value: number
10
+ }>
6
11
  }
7
12
 
8
13
  export type Statistics = Record<string, Record<number, Statistic>>
@@ -215,6 +215,10 @@
215
215
  "name": "Transaction not found.",
216
216
  "message": "It may not exist or may belong to another user."
217
217
  },
218
+ "MP_INVALID_TOKEN": {
219
+ "name": "The Mercado Pago access token is invalid.",
220
+ "message": "Try re-authenticating via the dashboard."
221
+ },
218
222
  "MP_RATE_LIMIT": {
219
223
  "name": "Action limit reached, please try again.",
220
224
  "message": "Note that this limit is imposed by Mercado Pago, not by Zennify."
@@ -132,8 +132,8 @@
132
132
  "message": ""
133
133
  },
134
134
  "THE_PIX_KEY_INSERTED_ISNT_VALID": {
135
- "name": "A chave pix inserida não é válida",
136
- "message": "Aceitamos CPF, email, telefone e chave aletória"
135
+ "name": "A chave pix inserida não é válida, configure uma chave válida.",
136
+ "message": "Aceitamos CPF, email, telefone e chave aletória."
137
137
  },
138
138
  "INSERT_A_VALID_URL": {
139
139
  "name": "Insira uma URL válida",
@@ -211,6 +211,10 @@
211
211
  "name": "Transação não encontrada.",
212
212
  "message": "Talvez não exista ou pertença a outra pessoa."
213
213
  },
214
+ "MP_INVALID_TOKEN": {
215
+ "name": "A chave de acesso do Mercado Pago é inválida.",
216
+ "message": "Tente se autenticar novamente via dashboard."
217
+ },
214
218
  "MP_RATE_LIMIT": {
215
219
  "name": "O limite de ações foi atingido, tente novamente.",
216
220
  "message": "Note que esse limite é imposto pelo Mercado Pago, não pelo Zennify."
package/types/errors.d.ts CHANGED
@@ -84,6 +84,7 @@ export interface APIErrors {
84
84
  'INVALID_METADATA': {
85
85
  details: string;
86
86
  };
87
+ 'MP_INVALID_TOKEN': {};
87
88
  'MP_ACCOUNT_OFFLINE': {};
88
89
  'MP_PIX_KEY_NOT_CONFIGURED': {};
89
90
  'MP_NOT_ALLOWED_TO_SELL': {};
@@ -3,6 +3,11 @@ export type Statistic = {
3
3
  users: number;
4
4
  value: number;
5
5
  rating: number;
6
+ customers: Array<{
7
+ id: number;
8
+ discord_user_id: string;
9
+ value: number;
10
+ }>;
6
11
  };
7
12
  export type Statistics = Record<string, Record<number, Statistic>>;
8
13
  export type StatisticsResponse = {