apirocket 0.19.2 → 0.19.3

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.
@@ -1,5 +1,6 @@
1
1
  import type { CustomerService } from '@src/services/customer.service';
2
- export { countries, geolocation, getCountry, getEcommerce, getPayment, postAuth, postEcommerce, rememberPassword, resetPassword, states };
2
+ import type { SalesService } from '@src/services/sales.service';
3
+ export { countries, geolocation, getCountry, getEcommerce, getPayment, getSales, postAuth, postEcommerce, rememberPassword, resetPassword, states };
3
4
  declare const countries: (customer: CustomerService) => Promise<Array<Country>>;
4
5
  declare const geolocation: () => Promise<any>;
5
6
  declare const getCountry: (countryIso: string) => Promise<Country>;
@@ -9,6 +10,9 @@ declare const getEcommerce: <T>(url: string, inputData: any, customer: CustomerS
9
10
  declare const getPayment: <T>(url: string, inputData: any, customer?: CustomerService) => Promise<{
10
11
  __errors: any;
11
12
  } & T>;
13
+ declare const getSales: <T>(url: string, inputData: any, sales: SalesService | undefined) => Promise<{
14
+ __errors: any;
15
+ } & T>;
12
16
  declare const postAuth: <T>(url: string, inputData: any) => Promise<{
13
17
  __errors: any;
14
18
  status: number;
@@ -3,6 +3,7 @@ import type { FormControl } from "@e-xisto/form-control";
3
3
  import type { CartService } from "./cart.service";
4
4
  import type { AccountService } from "./account.service";
5
5
  import type { CheckoutService } from "./checkout.service";
6
+ import type { SalesService } from "./sales.service";
6
7
  import type { BillingAddress, ShippingAddress } from "@src/models/addresses-models";
7
8
  type ContactData = {
8
9
  acceptEmailMarketing: boolean;
@@ -56,7 +57,7 @@ export declare class CustomerService implements Authentication {
56
57
  myAccount(): Promise<CustomerAccount>;
57
58
  orders(filter?: Partial<OrdersFilter>): Promise<CustomerOrders>;
58
59
  rememberPassword(email: string): Promise<number>;
59
- resetPassword(hash: string, email: string, password: string): Promise<void>;
60
+ resetPassword(hash: string, email: string, password: string): Promise<boolean>;
60
61
  private restoreState;
61
62
  private saveState;
62
63
  setData(data: {
@@ -66,10 +67,11 @@ export declare class CustomerService implements Authentication {
66
67
  lastName?: string;
67
68
  phone?: string;
68
69
  }): void;
69
- setServices(cart: CartService, account: AccountService, checkout: CheckoutService): void;
70
+ setServices(cart: CartService, account: AccountService, checkout: CheckoutService, sales: SalesService): void;
70
71
  updateBillingAddress(input: BillingAddress): Promise<any>;
71
72
  updateMyAccount(data: InputUpdateAccount): Promise<boolean>;
72
73
  updateShippingAddress(input: ShippingAddress): Promise<any>;
74
+ clearSession(): void;
73
75
  logout(): Promise<{
74
76
  status: number;
75
77
  }>;
@@ -6,7 +6,7 @@ import { AccountService } from './account.service';
6
6
  import { SalesService } from './sales.service';
7
7
  export declare class EcommerceService {
8
8
  #private;
9
- get bellobath(): boolean;
9
+ get hispalgan(): boolean;
10
10
  get account(): AccountService;
11
11
  get cart(): CartService;
12
12
  get checkout(): CheckoutService;
@@ -1,6 +1,6 @@
1
1
  import { Observable } from "rxjs";
2
2
  import type { CustomerService } from "./customer.service";
3
- export declare class SalesService implements Authentication {
3
+ export declare class SalesService {
4
4
  #private;
5
5
  readonly change$: Observable<SalesService>;
6
6
  get customers$(): Observable<SalesCustomers>;
@@ -9,13 +9,12 @@ export declare class SalesService implements Authentication {
9
9
  get id(): number;
10
10
  get lastName(): string;
11
11
  get phone(): string;
12
- get refreshToken(): string;
13
- get token(): string;
14
12
  get isLogged(): boolean;
15
13
  private _state;
16
14
  private _subscribe$;
17
15
  private _update$;
18
16
  constructor();
17
+ clear(): void;
19
18
  private customersData;
20
19
  customersSearch(filter: CustomersFilter): Observable<SalesCustomers>;
21
20
  private getCustomers$;
@@ -27,13 +26,13 @@ export declare class SalesService implements Authentication {
27
26
  setCustomerService(customer: CustomerService): void;
28
27
  private changeSales;
29
28
  rememberPassword(email: string): Promise<number>;
30
- resetPassword(hash: string, email: string, password: string): Promise<void>;
29
+ resetPassword(hash: string, email: string, password: string): Promise<boolean>;
31
30
  private restoreState;
32
31
  private saveState;
33
32
  subscribe(cb: (sales: SalesService) => void): () => void;
34
33
  private updateState;
35
- updateToken(data: LoginData): void;
36
- customerLogin(customerId: number): void;
34
+ updateToken(data: LoginSalesData): void;
35
+ customerLogin(customerId: number): Promise<void>;
37
36
  logout(): Promise<{
38
37
  status: number;
39
38
  }>;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.19.2";
1
+ export declare const VERSION = "0.19.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apirocket",
3
- "version": "0.19.2",
3
+ "version": "0.19.3",
4
4
  "description": " ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,21 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import type { SalesService } from '@src/services/sales.service';
3
- export type QueryErrors = {
4
- __errors?: Array<string>;
5
- };
6
- export type QueryVariables = {
7
- [index: string]: any;
8
- };
9
- export type QueryOptions = {
10
- debug?: boolean;
11
- retry?: number;
12
- };
13
- export { getSales, postSales };
14
- declare const getSales: <T>(url: string, { search, page }: CustomersFilter, sales: SalesService | undefined) => Observable<{
15
- __errors: any;
16
- status: number;
17
- } & T>;
18
- declare const postSales: <T>(url: string, inputData: any, sales: SalesService) => Observable<{
19
- __errors: any;
20
- status: number;
21
- } & T>;