@zennify/sdk-js 1.7.0 → 1.7.2
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/dist/main.js +1 -1
- package/package.json +1 -1
- package/src/errors.ts +2 -2
- package/src/interfaces/Transactions.ts +55 -0
- package/src/main.ts +1 -1
- package/translations/en_US.json +2 -2
- package/translations/pt_BR.json +2 -2
- package/types/errors.d.ts +2 -2
- package/types/interfaces/Transactions.d.ts +55 -0
- package/types/main.d.ts +1 -1
- package/src/interfaces/Orders.ts +0 -53
- package/types/interfaces/Orders.d.ts +0 -53
- /package/dist/interfaces/{Orders.js → Transactions.js} +0 -0
package/dist/main.js
CHANGED
|
@@ -24,5 +24,5 @@ __exportStar(require("./interfaces/Panels"), exports);
|
|
|
24
24
|
__exportStar(require("./interfaces/Products"), exports);
|
|
25
25
|
__exportStar(require("./interfaces/Guild"), exports);
|
|
26
26
|
__exportStar(require("./interfaces/Stores"), exports);
|
|
27
|
-
__exportStar(require("./interfaces/
|
|
27
|
+
__exportStar(require("./interfaces/Transactions"), exports);
|
|
28
28
|
__exportStar(require("./interfaces/Statistics"), exports);
|
package/package.json
CHANGED
package/src/errors.ts
CHANGED
|
@@ -75,11 +75,11 @@ export interface APIErrors {
|
|
|
75
75
|
'YOU_INSERTED_AN_INVALID_ADDITIONAL': {
|
|
76
76
|
addon: string
|
|
77
77
|
};
|
|
78
|
-
'
|
|
78
|
+
'UNKNOWN_TRANSACTION': {}
|
|
79
79
|
/// for update
|
|
80
80
|
'INVALID_OPERATION_FOR_CURRENT_TRANSACTION_STATUS': {};
|
|
81
81
|
'INVALID_OPERATION_FOR_PAYMENT_ENTITY': {};
|
|
82
|
-
'
|
|
82
|
+
'INVALID_STATUS_FOR_TRANSACTION_UPDATE': {};
|
|
83
83
|
'INVALID_REFUND_VALUE_EXCEEDS_ORDER_VALUE': {};
|
|
84
84
|
'ORDER_TRANSACTION_ALREADY_REFUNDED': {};
|
|
85
85
|
'FAILED_REFUND': {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type FullTransaction = {
|
|
2
|
+
id: string,
|
|
3
|
+
entity: 'semiauto' | 'mercadopago',
|
|
4
|
+
method: 'pix',
|
|
5
|
+
managed: null,
|
|
6
|
+
status: 'approved' | 'cancelled' | 'expired' | 'pending' | 'refused' | 'rejected' | 'analysis',
|
|
7
|
+
value: number,
|
|
8
|
+
base_value: number,
|
|
9
|
+
refunded_value: number,
|
|
10
|
+
refund_reason: null,
|
|
11
|
+
refund_comment: null,
|
|
12
|
+
refund_requested_by: null,
|
|
13
|
+
pix_e2eid: null,
|
|
14
|
+
pix_qrcode: null,
|
|
15
|
+
payer_bank: null,
|
|
16
|
+
order: {
|
|
17
|
+
id: string,
|
|
18
|
+
created_at: string,
|
|
19
|
+
platform: 'discord',
|
|
20
|
+
discord_guild_id: null,
|
|
21
|
+
discount: number,
|
|
22
|
+
subtotal: number,
|
|
23
|
+
total_value: number,
|
|
24
|
+
rating: null,
|
|
25
|
+
rating_message: null,
|
|
26
|
+
metadata: null,
|
|
27
|
+
payer: {
|
|
28
|
+
id: number,
|
|
29
|
+
username: string,
|
|
30
|
+
discord_user_id: string
|
|
31
|
+
},
|
|
32
|
+
seller: {
|
|
33
|
+
id: number,
|
|
34
|
+
username: string,
|
|
35
|
+
discord_user_id: string
|
|
36
|
+
},
|
|
37
|
+
store: {
|
|
38
|
+
id: number,
|
|
39
|
+
name: string,
|
|
40
|
+
icon_id: null,
|
|
41
|
+
banner_id: null
|
|
42
|
+
},
|
|
43
|
+
products: [
|
|
44
|
+
{
|
|
45
|
+
id: number,
|
|
46
|
+
name: string,
|
|
47
|
+
value: number,
|
|
48
|
+
icon_id: null,
|
|
49
|
+
banner_id: null,
|
|
50
|
+
amount: number,
|
|
51
|
+
delivered: string[]
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}
|
package/src/main.ts
CHANGED
|
@@ -9,5 +9,5 @@ export * from './interfaces/Panels';
|
|
|
9
9
|
export * from './interfaces/Products';
|
|
10
10
|
export * from './interfaces/Guild';
|
|
11
11
|
export * from './interfaces/Stores';
|
|
12
|
-
export * from './interfaces/
|
|
12
|
+
export * from './interfaces/Transactions';
|
|
13
13
|
export * from './interfaces/Statistics';
|
package/translations/en_US.json
CHANGED
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"name": "You inserted an invalid additional",
|
|
192
192
|
"message": "Remove the additional \"{addon}\"."
|
|
193
193
|
},
|
|
194
|
-
"
|
|
194
|
+
"UNKNOWN_TRANSACTION": {
|
|
195
195
|
"name": "Order not found.",
|
|
196
196
|
"message": "Check if the ID is correct."
|
|
197
197
|
},
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
"name": "This payment entity doesn't support this operation",
|
|
216
216
|
"message": "Try using another payment entity or check the request"
|
|
217
217
|
},
|
|
218
|
-
"
|
|
218
|
+
"INVALID_STATUS_FOR_TRANSACTION_UPDATE": {
|
|
219
219
|
"name": "Invalid status provided",
|
|
220
220
|
"message": "Check the documentation."
|
|
221
221
|
},
|
package/translations/pt_BR.json
CHANGED
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"name": "Adicional inválido",
|
|
188
188
|
"message": "Remova o adicional \"{addon}\"."
|
|
189
189
|
},
|
|
190
|
-
"
|
|
190
|
+
"UNKNOWN_TRANSACTION": {
|
|
191
191
|
"name": "Pedido não encontrado.",
|
|
192
192
|
"message": "Verifique o ID enviado."
|
|
193
193
|
},
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
"name": "Essa entidade de pagamento não suporta essa operação",
|
|
212
212
|
"message": "Tente usando uma outra entidade de pagamento"
|
|
213
213
|
},
|
|
214
|
-
"
|
|
214
|
+
"INVALID_STATUS_FOR_TRANSACTION_UPDATE": {
|
|
215
215
|
"name": "Estado inválido fornecido",
|
|
216
216
|
"message": "Verifique a documentação."
|
|
217
217
|
},
|
package/types/errors.d.ts
CHANGED
|
@@ -69,10 +69,10 @@ export interface APIErrors {
|
|
|
69
69
|
'YOU_INSERTED_AN_INVALID_ADDITIONAL': {
|
|
70
70
|
addon: string;
|
|
71
71
|
};
|
|
72
|
-
'
|
|
72
|
+
'UNKNOWN_TRANSACTION': {};
|
|
73
73
|
'INVALID_OPERATION_FOR_CURRENT_TRANSACTION_STATUS': {};
|
|
74
74
|
'INVALID_OPERATION_FOR_PAYMENT_ENTITY': {};
|
|
75
|
-
'
|
|
75
|
+
'INVALID_STATUS_FOR_TRANSACTION_UPDATE': {};
|
|
76
76
|
'INVALID_REFUND_VALUE_EXCEEDS_ORDER_VALUE': {};
|
|
77
77
|
'ORDER_TRANSACTION_ALREADY_REFUNDED': {};
|
|
78
78
|
'FAILED_REFUND': {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type FullTransaction = {
|
|
2
|
+
id: string;
|
|
3
|
+
entity: 'semiauto' | 'mercadopago';
|
|
4
|
+
method: 'pix';
|
|
5
|
+
managed: null;
|
|
6
|
+
status: 'approved' | 'cancelled' | 'expired' | 'pending' | 'refused' | 'rejected' | 'analysis';
|
|
7
|
+
value: number;
|
|
8
|
+
base_value: number;
|
|
9
|
+
refunded_value: number;
|
|
10
|
+
refund_reason: null;
|
|
11
|
+
refund_comment: null;
|
|
12
|
+
refund_requested_by: null;
|
|
13
|
+
pix_e2eid: null;
|
|
14
|
+
pix_qrcode: null;
|
|
15
|
+
payer_bank: null;
|
|
16
|
+
order: {
|
|
17
|
+
id: string;
|
|
18
|
+
created_at: string;
|
|
19
|
+
platform: 'discord';
|
|
20
|
+
discord_guild_id: null;
|
|
21
|
+
discount: number;
|
|
22
|
+
subtotal: number;
|
|
23
|
+
total_value: number;
|
|
24
|
+
rating: null;
|
|
25
|
+
rating_message: null;
|
|
26
|
+
metadata: null;
|
|
27
|
+
payer: {
|
|
28
|
+
id: number;
|
|
29
|
+
username: string;
|
|
30
|
+
discord_user_id: string;
|
|
31
|
+
};
|
|
32
|
+
seller: {
|
|
33
|
+
id: number;
|
|
34
|
+
username: string;
|
|
35
|
+
discord_user_id: string;
|
|
36
|
+
};
|
|
37
|
+
store: {
|
|
38
|
+
id: number;
|
|
39
|
+
name: string;
|
|
40
|
+
icon_id: null;
|
|
41
|
+
banner_id: null;
|
|
42
|
+
};
|
|
43
|
+
products: [
|
|
44
|
+
{
|
|
45
|
+
id: number;
|
|
46
|
+
name: string;
|
|
47
|
+
value: number;
|
|
48
|
+
icon_id: null;
|
|
49
|
+
banner_id: null;
|
|
50
|
+
amount: number;
|
|
51
|
+
delivered: string[];
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
};
|
|
55
|
+
};
|
package/types/main.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export * from './interfaces/Panels';
|
|
|
8
8
|
export * from './interfaces/Products';
|
|
9
9
|
export * from './interfaces/Guild';
|
|
10
10
|
export * from './interfaces/Stores';
|
|
11
|
-
export * from './interfaces/
|
|
11
|
+
export * from './interfaces/Transactions';
|
|
12
12
|
export * from './interfaces/Statistics';
|
package/src/interfaces/Orders.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export type FullOrder = {
|
|
2
|
-
id: string,
|
|
3
|
-
created_at: string,
|
|
4
|
-
platform: 'discord',
|
|
5
|
-
discord_guild_id?: null | string,
|
|
6
|
-
discount: number,
|
|
7
|
-
subtotal: number,
|
|
8
|
-
total_value: number,
|
|
9
|
-
rating?: null | number,
|
|
10
|
-
rating_message?: null | number,
|
|
11
|
-
metadata?: null | string,
|
|
12
|
-
transaction_data: {
|
|
13
|
-
id: string,
|
|
14
|
-
entity: 'semiauto' | 'mercadopago',
|
|
15
|
-
method: 'pix',
|
|
16
|
-
managed?: null | boolean,
|
|
17
|
-
status: 'approved' | 'cancelled' | 'expired' | 'pending' | 'refused' | 'rejected' | 'analysis',
|
|
18
|
-
value: number,
|
|
19
|
-
base_value: number,
|
|
20
|
-
refunded_value: number,
|
|
21
|
-
refund_reason?: null | string,
|
|
22
|
-
refund_comment?: null | string,
|
|
23
|
-
refund_requested_by?: null | number,
|
|
24
|
-
pix_e2eid?: null | string,
|
|
25
|
-
pix_qrcode?: null | string,
|
|
26
|
-
payer_bank?: null | string
|
|
27
|
-
},
|
|
28
|
-
payer: {
|
|
29
|
-
id: number,
|
|
30
|
-
username: string,
|
|
31
|
-
discord_user_id: string
|
|
32
|
-
},
|
|
33
|
-
seller: {
|
|
34
|
-
id: number,
|
|
35
|
-
username: string,
|
|
36
|
-
discord_user_id: string
|
|
37
|
-
},
|
|
38
|
-
store: {
|
|
39
|
-
id: number,
|
|
40
|
-
name: string,
|
|
41
|
-
icon_id?: null | number,
|
|
42
|
-
banner_id?: null | number
|
|
43
|
-
},
|
|
44
|
-
products: {
|
|
45
|
-
id: number,
|
|
46
|
-
name: string,
|
|
47
|
-
value: number,
|
|
48
|
-
icon_id?: null | number,
|
|
49
|
-
banner_id?: null | number,
|
|
50
|
-
amount: number,
|
|
51
|
-
delivered: string[]
|
|
52
|
-
}[]
|
|
53
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export type FullOrder = {
|
|
2
|
-
id: string;
|
|
3
|
-
created_at: string;
|
|
4
|
-
platform: 'discord';
|
|
5
|
-
discord_guild_id?: null | string;
|
|
6
|
-
discount: number;
|
|
7
|
-
subtotal: number;
|
|
8
|
-
total_value: number;
|
|
9
|
-
rating?: null | number;
|
|
10
|
-
rating_message?: null | number;
|
|
11
|
-
metadata?: null | string;
|
|
12
|
-
transaction_data: {
|
|
13
|
-
id: string;
|
|
14
|
-
entity: 'semiauto' | 'mercadopago';
|
|
15
|
-
method: 'pix';
|
|
16
|
-
managed?: null | boolean;
|
|
17
|
-
status: 'approved' | 'cancelled' | 'expired' | 'pending' | 'refused' | 'rejected' | 'analysis';
|
|
18
|
-
value: number;
|
|
19
|
-
base_value: number;
|
|
20
|
-
refunded_value: number;
|
|
21
|
-
refund_reason?: null | string;
|
|
22
|
-
refund_comment?: null | string;
|
|
23
|
-
refund_requested_by?: null | number;
|
|
24
|
-
pix_e2eid?: null | string;
|
|
25
|
-
pix_qrcode?: null | string;
|
|
26
|
-
payer_bank?: null | string;
|
|
27
|
-
};
|
|
28
|
-
payer: {
|
|
29
|
-
id: number;
|
|
30
|
-
username: string;
|
|
31
|
-
discord_user_id: string;
|
|
32
|
-
};
|
|
33
|
-
seller: {
|
|
34
|
-
id: number;
|
|
35
|
-
username: string;
|
|
36
|
-
discord_user_id: string;
|
|
37
|
-
};
|
|
38
|
-
store: {
|
|
39
|
-
id: number;
|
|
40
|
-
name: string;
|
|
41
|
-
icon_id?: null | number;
|
|
42
|
-
banner_id?: null | number;
|
|
43
|
-
};
|
|
44
|
-
products: {
|
|
45
|
-
id: number;
|
|
46
|
-
name: string;
|
|
47
|
-
value: number;
|
|
48
|
-
icon_id?: null | number;
|
|
49
|
-
banner_id?: null | number;
|
|
50
|
-
amount: number;
|
|
51
|
-
delivered: string[];
|
|
52
|
-
}[];
|
|
53
|
-
};
|
|
File without changes
|