b5-api-client 0.0.6 → 0.0.7

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/APITester.js CHANGED
@@ -72,7 +72,7 @@ function testCreateOrder() {
72
72
  paymentMethods: [
73
73
  {
74
74
  type: 'MERCADO_PAGO',
75
- username: 'blas'
75
+ alias: 'blas'
76
76
  }
77
77
  ],
78
78
  creatorId: '7b74abef-f1b2-4431-aa95-ce565893d47c'
package/dist/types.d.ts CHANGED
@@ -1,9 +1,5 @@
1
1
  export type OrderType = 'SELL' | 'BUY';
2
2
  export type OrderStatus = 'WAITING_PAYMENT' | 'WAITING_BUYER_ADDRESS' | 'PENDING' | 'ACTIVE' | 'FIAT_SENT' | 'RELEASED' | 'CLOSED' | 'DISPUTE' | 'CANCELED' | 'SUCCESS' | 'PAID_HOLD_INVOICE' | 'CANCELED_BY_ADMIN' | 'EXPIRED' | 'COMPLETED_BY_ADMIN';
3
- export interface PaymentMethod {
4
- type: string;
5
- username: string;
6
- }
7
3
  export interface TransactionStatusResponse {
8
4
  hash: string;
9
5
  block_number: number | null;
@@ -36,7 +32,10 @@ export interface OrderResponse {
36
32
  }
37
33
  export interface PaymentMethod {
38
34
  type: string;
39
- username: string;
35
+ alias?: string;
36
+ cbu?: string;
37
+ fullName?: string;
38
+ entity?: string;
40
39
  }
41
40
  export interface CreateOrderRequest {
42
41
  type: OrderType;
@@ -74,6 +73,7 @@ export interface TakeBuyOrderRequest {
74
73
  userId: string;
75
74
  amount: string;
76
75
  username?: string;
76
+ paymentMethod?: PaymentMethod[];
77
77
  }
78
78
  export interface CreateUserRequest {
79
79
  username: string;
@@ -81,6 +81,11 @@ export interface CreateUserRequest {
81
81
  export interface UpdateOrderRequest {
82
82
  status: string;
83
83
  orderId: string;
84
+ sellerId?: string;
85
+ takenAt?: string;
86
+ isLocked?: boolean;
87
+ txLock?: string;
88
+ txRelease?: string;
84
89
  }
85
90
  export interface OrderLockedEvent {
86
91
  type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "b5-api-client",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Escrow Backend API client",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/APITester.ts CHANGED
@@ -54,7 +54,7 @@ async function testCreateOrder() {
54
54
  paymentMethods: [
55
55
  {
56
56
  type: 'MERCADO_PAGO',
57
- username: 'blas'
57
+ alias: 'blas'
58
58
  }
59
59
  ],
60
60
  creatorId: '7b74abef-f1b2-4431-aa95-ce565893d47c'
package/src/types.ts CHANGED
@@ -16,12 +16,6 @@ export type OrderStatus =
16
16
  'EXPIRED' |
17
17
  'COMPLETED_BY_ADMIN';
18
18
 
19
-
20
- export interface PaymentMethod {
21
- type: string;
22
- username: string;
23
- }
24
-
25
19
  export interface TransactionStatusResponse {
26
20
  hash: string;
27
21
  block_number: number | null;
@@ -57,7 +51,10 @@ export interface OrderResponse {
57
51
 
58
52
  export interface PaymentMethod {
59
53
  type: string;
60
- username: string;
54
+ alias?: string;
55
+ cbu?: string;
56
+ fullName?: string;
57
+ entity?: string;
61
58
  }
62
59
 
63
60
  export interface CreateOrderRequest {
@@ -100,6 +97,7 @@ export interface TakeBuyOrderRequest {
100
97
  userId: string;
101
98
  amount: string;
102
99
  username?: string;
100
+ paymentMethod?: PaymentMethod[];
103
101
  }
104
102
 
105
103
  export interface CreateUserRequest {
@@ -109,6 +107,11 @@ export interface CreateUserRequest {
109
107
  export interface UpdateOrderRequest {
110
108
  status: string;
111
109
  orderId: string;
110
+ sellerId?: string;
111
+ takenAt?: string;
112
+ isLocked?: boolean;
113
+ txLock?: string;
114
+ txRelease?: string;
112
115
  }
113
116
 
114
117
  export interface OrderLockedEvent {