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/dist/lib/api.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import type { CustomerService } from '@src/services/customer.service';
3
- export { geolocation, getCountryId, states, };
3
+ export { countries, geolocation, getCountryId, states, };
4
+ declare const countries: (customer: CustomerService) => Promise<Array<Country>>;
5
+ declare const states: (countryId: number, customer: CustomerService) => Promise<Array<State>>;
4
6
  declare const geolocation: () => Observable<any>;
5
- declare const states: (countryId: number, customer: CustomerService) => Observable<Array<StateType>>;
6
7
  declare const getCountryId: (countryIso: string) => Promise<number>;
@@ -3,9 +3,9 @@ declare class CheckoutAddress implements AddressType {
3
3
  address?: string;
4
4
  address2?: string;
5
5
  city?: string;
6
- country?: CountryRecord;
6
+ country?: Country;
7
7
  id: number;
8
- state?: StateType;
8
+ state?: State;
9
9
  postalCode?: string;
10
10
  protected constructor(values: AddressType);
11
11
  private getFullAddress;
@@ -6,7 +6,7 @@ import type { ShippingAddress } from "@src/models/shipping-address.model";
6
6
  export declare class CartService {
7
7
  readonly change$: Observable<CartService>;
8
8
  get count(): number;
9
- get country(): CountryRecord;
9
+ get country(): Country;
10
10
  get items(): Array<CartItem>;
11
11
  get lastOrder(): LastOrder;
12
12
  get numItems(): number;
@@ -53,7 +53,7 @@ export declare class CartService {
53
53
  removeItem(item: CartItem): void;
54
54
  updateItem(item: CartItem, quantity: number): void;
55
55
  private addItemCart;
56
- setCountryData(country: CountryRecord): void;
56
+ setCountryData(country: Country): void;
57
57
  private updateShippingData;
58
58
  private cartUpdate;
59
59
  update(): void;
@@ -44,7 +44,9 @@ export declare class CustomerService implements Authentication {
44
44
  updateMyAccount(data: InputUpdateAccount): Promise<boolean>;
45
45
  updatePassword(oldPassword: string, newPassword: string): Promise<boolean>;
46
46
  createShippingAddress(input: Omit<ShippingAddress, 'id'>): Promise<unknown>;
47
+ createBillingAddress(input: Omit<BillingAddress, 'id'>): Promise<unknown>;
47
48
  updateShippingAddress(input: ShippingAddress): Promise<unknown>;
49
+ updateBillingAddress(input: ShippingAddress): Promise<unknown>;
48
50
  }
49
51
  export declare function customerProxy(customer: CustomerService): {
50
52
  acceptEmailMarketing: boolean;
@@ -55,11 +57,14 @@ export declare function customerProxy(customer: CustomerService): {
55
57
  phone: string;
56
58
  type: CustomerType;
57
59
  isLogged: boolean;
58
- myAccount: () => Promise<CustomerAccount>;
60
+ countries: () => Promise<Country[]>;
61
+ createBillingAddress: (input: Omit<BillingAddress, 'id'>) => Promise<unknown>;
59
62
  createShippingAddress: (input: Omit<ShippingAddress, 'id'>) => Promise<unknown>;
60
- price: (productId: number) => Promise<any>;
63
+ myAccount: () => Promise<CustomerAccount>;
61
64
  order: (id: number) => Promise<Order>;
62
65
  orders: (filter?: OrdersFilter) => Promise<CustomerOrders>;
66
+ price: (productId: number) => Promise<any>;
67
+ states: (countryId: number) => Promise<globalThis.State[]>;
63
68
  subscribe: (cb: (customer: CustomerService) => void) => () => void;
64
69
  updateMyAccount: (input: InputUpdateAccount) => Promise<boolean>;
65
70
  updatePassword: (oldPassword: string, newPassword: string) => Promise<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apirocket",
3
- "version": "0.13.4",
3
+ "version": "0.13.6",
4
4
  "description": " ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",