apirocket 0.13.3 → 0.13.5
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/README.md
CHANGED
|
@@ -94,19 +94,46 @@ interface ReadOnly <CustomerService> {
|
|
|
94
94
|
type: 'B2B' | 'B2C';
|
|
95
95
|
isLogged: boolean;
|
|
96
96
|
|
|
97
|
+
countries: () => Promise <Array <Countries>>;
|
|
98
|
+
createShippingAddress: (input: Omit <ShippingAddress, 'id'>) => Promise <ShippingAddress>;
|
|
97
99
|
myAccount: () => Promise <CustomerAccount>;
|
|
98
100
|
price: (productId: number) => Promise <ProductPrice>;
|
|
99
101
|
orders: (filter: OrdersFilter = {}) => Promise <Array <Order>>;
|
|
100
102
|
order: (id: number) => Promise <Order>;
|
|
103
|
+
states: (countryId: number) => Promise <Array <State>>;
|
|
101
104
|
subscribe: (cb: (customer: CustomerService) => void);
|
|
102
105
|
updateMyAccount: (input: InputUpdateAccount) => Promise <boolean>;
|
|
103
106
|
updatePassword: (oldPassword: string, newPassword: string) => Promise <boolean>;
|
|
107
|
+
updateShippingAddress: (input: ShippingAddress) => Promise <ShippingAddress>;
|
|
104
108
|
}
|
|
105
109
|
|
|
106
110
|
```
|
|
107
111
|
|
|
108
112
|
### Tipos
|
|
109
113
|
|
|
114
|
+
```javascript
|
|
115
|
+
type ShippingAddress {
|
|
116
|
+
address: string;
|
|
117
|
+
address2?: string;
|
|
118
|
+
city: string;
|
|
119
|
+
country: { id: number; name?: string; iso?: string };
|
|
120
|
+
description: string;
|
|
121
|
+
firstName: string;
|
|
122
|
+
id: number;
|
|
123
|
+
lastName: string;
|
|
124
|
+
phone: string;
|
|
125
|
+
postalCode?: string;
|
|
126
|
+
state: State
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```javascript
|
|
131
|
+
type State = {
|
|
132
|
+
name?: string;
|
|
133
|
+
id: number;
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
110
137
|
```javascript
|
|
111
138
|
type InputUpdateAccount = {
|
|
112
139
|
acceptEmailMarketing: boolean;
|
|
@@ -159,7 +186,7 @@ interface AccountShippingAddress {
|
|
|
159
186
|
address: string;
|
|
160
187
|
address2: string;
|
|
161
188
|
city: string;
|
|
162
|
-
country:
|
|
189
|
+
country: Country;
|
|
163
190
|
default: boolean;
|
|
164
191
|
description: string;
|
|
165
192
|
firstName: string;
|
|
@@ -219,7 +246,7 @@ interface OrderBillindAddress {
|
|
|
219
246
|
address?: string;
|
|
220
247
|
address2?: string;
|
|
221
248
|
city?: string;
|
|
222
|
-
country?:
|
|
249
|
+
country?: Country;
|
|
223
250
|
description?: string;
|
|
224
251
|
id?: number;
|
|
225
252
|
name?: string;
|
|
@@ -335,7 +362,7 @@ interface OrderShippingAddress {
|
|
|
335
362
|
address?: string;
|
|
336
363
|
address2?: string;
|
|
337
364
|
city?: string;
|
|
338
|
-
country?:
|
|
365
|
+
country?: Country;
|
|
339
366
|
description?: string;
|
|
340
367
|
email?: string;
|
|
341
368
|
firstName?: string;
|