@zennify/sdk-js 1.41.1 → 1.41.3

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.41.1",
3
+ "version": "1.41.3",
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
@@ -24,10 +24,14 @@ export interface APIErrors {
24
24
  'INVALID_SCOPE': {};
25
25
  'VERIFY_YOUR_EMAIL': {};
26
26
  'PLEASE_REVERIFY': {};
27
+ // Wallet errors
28
+ 'WITHDRAW_INSUFFICIENT_BALANCE': { available: number };
29
+ 'WITHDRAW_LIMIT_EXCEEDED': { limit: number };
27
30
  // = user errors
28
31
  'USER_NOT_FOUND': {};
29
32
  'USER_INVALID_NAME': {};
30
33
  /// legal errors
34
+ 'USER_LEGAL_DATA_REQUIRED': {};
31
35
  'USER_LEGAL_DATA_ALREADY_EXISTS': {};
32
36
  'USER_LEGAL_RESPONSIBLE_INVALID': {};
33
37
 
@@ -75,6 +75,14 @@
75
75
  "name": "Please re-verify",
76
76
  "message": "An error occurred during authentication"
77
77
  },
78
+ "WITHDRAW_INSUFFICIENT_BALANCE": {
79
+ "name": "Insufficient balance for withdrawal",
80
+ "message": "You have {available} available for withdrawal."
81
+ },
82
+ "WITHDRAW_LIMIT_EXCEEDED": {
83
+ "name": "You've made too many withdrawals today",
84
+ "message": "You can only withdraw up to {limit} in the last 24h."
85
+ },
78
86
  "USER_NOT_FOUND": {
79
87
  "name": "User not found",
80
88
  "message": "Try again."
@@ -83,6 +91,10 @@
83
91
  "name": "Invalid username",
84
92
  "message": "Must be between 3 to 32 characters, with alphanumeric characters."
85
93
  },
94
+ "USER_LEGAL_DATA_REQUIRED": {
95
+ "name": "Legal data registration required",
96
+ "message": "Legal data is mandatory in this context."
97
+ },
86
98
  "USER_LEGAL_DATA_ALREADY_EXISTS": {
87
99
  "name": "Legal data already exists",
88
100
  "message": "You already have legal data registered."
@@ -71,6 +71,14 @@
71
71
  "name": "Por favor, re-verifique",
72
72
  "message": "Um erro ocorreu durante a autenticação"
73
73
  },
74
+ "WITHDRAW_INSUFFICIENT_BALANCE": {
75
+ "name": "Saldo insuficiente para saque.",
76
+ "message": "Você tem {available} disponível para saque."
77
+ },
78
+ "WITHDRAW_LIMIT_EXCEEDED": {
79
+ "name": "Você já fez muitos saques hoje.",
80
+ "message": "Você só pode sacar até {limit} nas últimas 24h."
81
+ },
74
82
  "USER_NOT_FOUND": {
75
83
  "name": "Usuário não encontrado",
76
84
  "message": "Tente novamente."
@@ -79,6 +87,10 @@
79
87
  "name": "Nome de usuário inválido",
80
88
  "message": "Deve ter entre 3 a 32 caracteres, com caracteres alfanuméricos."
81
89
  },
90
+ "USER_LEGAL_DATA_REQUIRED": {
91
+ "name": "É necessário ter dados legais cadastrados.",
92
+ "message": "Os dados legais são obrigatórios nesse contexto."
93
+ },
82
94
  "USER_LEGAL_DATA_ALREADY_EXISTS": {
83
95
  "name": "Dados legais já existem",
84
96
  "message": "Você já possui dados legais cadastrados."
package/types/errors.d.ts CHANGED
@@ -22,8 +22,15 @@ export interface APIErrors {
22
22
  'INVALID_SCOPE': {};
23
23
  'VERIFY_YOUR_EMAIL': {};
24
24
  'PLEASE_REVERIFY': {};
25
+ 'WITHDRAW_INSUFFICIENT_BALANCE': {
26
+ available: number;
27
+ };
28
+ 'WITHDRAW_LIMIT_EXCEEDED': {
29
+ limit: number;
30
+ };
25
31
  'USER_NOT_FOUND': {};
26
32
  'USER_INVALID_NAME': {};
33
+ 'USER_LEGAL_DATA_REQUIRED': {};
27
34
  'USER_LEGAL_DATA_ALREADY_EXISTS': {};
28
35
  'USER_LEGAL_RESPONSIBLE_INVALID': {};
29
36
  'USER_LEGAL_DOCUMENTS_REQUIRED': {};