@smess/networking 1.1.0 → 1.1.1

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.
@@ -2,7 +2,7 @@ import { ProviderType, NetworkingConfig, NetworkingUIEventWrapped, HttpResponse
2
2
  import { SmessService } from "./smess.service";
3
3
  import { PaginationLinks } from "./store.product.service";
4
4
  import { BehaviorSubject, Observable } from "rxjs";
5
- export type CustomerTarget = "register" | "get-profile" | "update-profile" | "cart-collection" | "customer-product-collection" | "customer-product-create" | "customer-product-remove" | "customer-product-update-category";
5
+ export type CustomerTarget = "register" | "get-profile" | "update-profile" | "update-shipping-address" | "update-billing-address" | "cart-collection" | "customer-product-collection" | "customer-product-create" | "customer-product-remove" | "customer-product-update-category";
6
6
  export interface CustomerRegisterRequest {
7
7
  client_id?: string;
8
8
  email: string;
@@ -22,6 +22,18 @@ export interface CustomerUpdateRequest {
22
22
  contact_email: string | null;
23
23
  phone_number: string | null;
24
24
  }
25
+ export interface CustomerUpdateAddressRequest {
26
+ name?: string | null;
27
+ first_name?: string | null;
28
+ last_name?: string | null;
29
+ address?: string | null;
30
+ postal_code?: string | null;
31
+ city?: string | null;
32
+ state?: string | null;
33
+ country?: string | null;
34
+ phone_number?: string | null;
35
+ marked_as_default?: boolean | null;
36
+ }
25
37
  export interface CustomerCartCollectionQuery {
26
38
  page?: number;
27
39
  per_page?: number;
@@ -191,6 +203,8 @@ export declare class CustomerService {
191
203
  register(payload: CustomerRegisterRequest): Observable<NetworkingUIEventWrapped<HttpResponse>>;
192
204
  getProfile(): Observable<NetworkingUIEventWrapped<HttpResponse>>;
193
205
  updateProfile(payload: CustomerUpdateRequest): Observable<NetworkingUIEventWrapped<HttpResponse>>;
206
+ updateShippingAddress(payload: CustomerUpdateAddressRequest): Observable<NetworkingUIEventWrapped<HttpResponse>>;
207
+ updateBillingAddress(payload: CustomerUpdateAddressRequest): Observable<NetworkingUIEventWrapped<HttpResponse>>;
194
208
  getCartCollection(query?: CustomerCartCollectionQuery): Observable<NetworkingUIEventWrapped<HttpResponse>>;
195
209
  getCustomerProductCollection(query?: CustomerProductCollectionQuery): Observable<NetworkingUIEventWrapped<HttpResponse>>;
196
210
  createCustomerProduct(payload: CustomerProductCreateRequest): Observable<NetworkingUIEventWrapped<HttpResponse>>;
@@ -18,6 +18,10 @@ export class CustomerProvider {
18
18
  return "/authentication/customer/get-profile";
19
19
  case "update-profile":
20
20
  return "/authentication/customer/update";
21
+ case "update-shipping-address":
22
+ return "/authentication/customer/update-shipping-address";
23
+ case "update-billing-address":
24
+ return "/authentication/customer/update-billing-address";
21
25
  case "cart-collection":
22
26
  return "/store/cart/collection";
23
27
  case "customer-product-collection":
@@ -46,6 +50,10 @@ export class CustomerProvider {
46
50
  return "DELETE";
47
51
  case "customer-product-update-category":
48
52
  return "PATCH";
53
+ case "update-shipping-address":
54
+ return "PATCH";
55
+ case "update-billing-address":
56
+ return "PATCH";
49
57
  case "update-profile":
50
58
  return "PUT";
51
59
  default:
@@ -96,6 +104,12 @@ export class CustomerService {
96
104
  updateProfile(payload) {
97
105
  return this.provider("update-profile").request(payload);
98
106
  }
107
+ updateShippingAddress(payload) {
108
+ return this.provider("update-shipping-address").request(payload);
109
+ }
110
+ updateBillingAddress(payload) {
111
+ return this.provider("update-billing-address").request(payload);
112
+ }
99
113
  getCartCollection(query) {
100
114
  return this.provider("cart-collection").request(query);
101
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smess/networking",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Networking utilities and services for SMESS platform.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",