apirocket 0.13.4 → 0.13.6
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,14 +94,18 @@ interface ReadOnly <CustomerService> {
|
|
|
94
94
|
type: 'B2B' | 'B2C';
|
|
95
95
|
isLogged: boolean;
|
|
96
96
|
|
|
97
|
+
countries: () => Promise <Array <Countries>>;
|
|
98
|
+
createBillingAddress: (input: Omit <BillingAddress, 'id'>) => Promise <BillingAddress>;
|
|
97
99
|
createShippingAddress: (input: Omit <ShippingAddress, 'id'>) => Promise <ShippingAddress>;
|
|
98
100
|
myAccount: () => Promise <CustomerAccount>;
|
|
99
101
|
price: (productId: number) => Promise <ProductPrice>;
|
|
100
102
|
orders: (filter: OrdersFilter = {}) => Promise <Array <Order>>;
|
|
101
103
|
order: (id: number) => Promise <Order>;
|
|
104
|
+
states: (countryId: number) => Promise <Array <State>>;
|
|
102
105
|
subscribe: (cb: (customer: CustomerService) => void);
|
|
103
106
|
updateMyAccount: (input: InputUpdateAccount) => Promise <boolean>;
|
|
104
107
|
updatePassword: (oldPassword: string, newPassword: string) => Promise <boolean>;
|
|
108
|
+
updateBillingAddress: (input: BillingAddress) => Promise <BillingAddress>;
|
|
105
109
|
updateShippingAddress: (input: ShippingAddress) => Promise <ShippingAddress>;
|
|
106
110
|
}
|
|
107
111
|
|
|
@@ -121,10 +125,14 @@ type ShippingAddress {
|
|
|
121
125
|
lastName: string;
|
|
122
126
|
phone: string;
|
|
123
127
|
postalCode?: string;
|
|
124
|
-
state:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
state: State
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```javascript
|
|
133
|
+
type State = {
|
|
134
|
+
name?: string;
|
|
135
|
+
id: number;
|
|
128
136
|
}
|
|
129
137
|
```
|
|
130
138
|
|
|
@@ -141,7 +149,7 @@ type InputUpdateAccount = {
|
|
|
141
149
|
```javascript
|
|
142
150
|
interface CustomerAccount {
|
|
143
151
|
acceptEmailMarketing?: boolean;
|
|
144
|
-
billingAddress?:
|
|
152
|
+
billingAddress?: BillingAddress;
|
|
145
153
|
custom?: any;
|
|
146
154
|
email?: string
|
|
147
155
|
firstName?: string;
|
|
@@ -152,24 +160,18 @@ interface CustomerAccount {
|
|
|
152
160
|
```
|
|
153
161
|
|
|
154
162
|
```javascript
|
|
155
|
-
interface
|
|
163
|
+
interface BillingAddress {
|
|
156
164
|
address: string;
|
|
157
165
|
address2: string;
|
|
158
166
|
city: string;
|
|
159
|
-
country:
|
|
160
|
-
id: number;
|
|
161
|
-
name: string;
|
|
162
|
-
}
|
|
167
|
+
country: Country
|
|
163
168
|
default: boolean;
|
|
164
169
|
description: string;
|
|
165
170
|
id: number;
|
|
166
171
|
name: string;
|
|
167
172
|
phone: string;
|
|
168
173
|
postalCode: string;
|
|
169
|
-
state:
|
|
170
|
-
name: string;
|
|
171
|
-
id: number;
|
|
172
|
-
}
|
|
174
|
+
state: State;
|
|
173
175
|
taxCode: string;
|
|
174
176
|
}
|
|
175
177
|
```
|
|
@@ -180,7 +182,7 @@ interface AccountShippingAddress {
|
|
|
180
182
|
address: string;
|
|
181
183
|
address2: string;
|
|
182
184
|
city: string;
|
|
183
|
-
country:
|
|
185
|
+
country: Country;
|
|
184
186
|
default: boolean;
|
|
185
187
|
description: string;
|
|
186
188
|
firstName: string;
|
|
@@ -240,7 +242,7 @@ interface OrderBillindAddress {
|
|
|
240
242
|
address?: string;
|
|
241
243
|
address2?: string;
|
|
242
244
|
city?: string;
|
|
243
|
-
country?:
|
|
245
|
+
country?: Country;
|
|
244
246
|
description?: string;
|
|
245
247
|
id?: number;
|
|
246
248
|
name?: string;
|
|
@@ -356,7 +358,7 @@ interface OrderShippingAddress {
|
|
|
356
358
|
address?: string;
|
|
357
359
|
address2?: string;
|
|
358
360
|
city?: string;
|
|
359
|
-
country?:
|
|
361
|
+
country?: Country;
|
|
360
362
|
description?: string;
|
|
361
363
|
email?: string;
|
|
362
364
|
firstName?: string;
|