apirocket 0.9.0 → 0.9.2

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
@@ -2,13 +2,11 @@ import { Observable } from 'rxjs';
2
2
  import type { CartType, InputCartRemoveItem, InputCartUpdate, InputCartUpdateItem, OrderType } from '@src/types/types';
3
3
  import type { CustomerService } from '@src/services/customer.service';
4
4
  declare const ID_ESPANA = 199;
5
- export { cartRemoveItem, cartUpdate, cartUpdateItem, geolocation, myAccount, orderSummary, paymentMethods, shippingMethods, states, ID_ESPANA };
5
+ export { cartRemoveItem, cartUpdate, cartUpdateItem, geolocation, orderSummary, paymentMethods, states, ID_ESPANA };
6
6
  declare const cartRemoveItem: (input: InputCartRemoveItem, customer: CustomerService) => Observable<CartType>;
7
7
  declare const cartUpdate: (input: InputCartUpdate, customer: CustomerService) => Observable<CartType>;
8
8
  declare const cartUpdateItem: (input: InputCartUpdateItem, customer: CustomerService) => Observable<CartType>;
9
9
  declare const orderSummary: (id: number, hash: string, customer: CustomerService) => Observable<OrderType>;
10
10
  declare const paymentMethods: (customer: CustomerService) => Observable<Array<PaymentMethodOption>>;
11
- declare const myAccount: (customer: CustomerService) => Observable<CustomerAccount>;
12
11
  declare const geolocation: () => Observable<any>;
13
12
  declare const states: (countryId: number, customer: CustomerService) => Observable<Array<StateType>>;
14
- declare const shippingMethods: (customer: CustomerService, cartUuid: string) => Observable<Array<ShippingMethodType> | false>;
@@ -12,8 +12,14 @@ export type QueryOptions = {
12
12
  retry?: number;
13
13
  };
14
14
  export { getApi, getEcommerce, post, postEcommerce, query };
15
- declare const getEcommerce: (url: string, data: any, customer: CustomerService | undefined) => Observable<AjaxResponse<any>>;
16
- declare const postEcommerce: <T>(url: string, data: any, customer?: CustomerService) => Observable<T>;
15
+ declare const getEcommerce: <T>(url: string, inputData: any, customer: CustomerService | undefined) => Observable<{
16
+ __errors: any;
17
+ status: number;
18
+ } & T>;
19
+ declare const postEcommerce: <T>(url: string, inputData: any, customer?: CustomerService) => Observable<{
20
+ __errors: any;
21
+ status: number;
22
+ } & T>;
17
23
  declare const post: <T>(url: string, data: any, customer?: CustomerService) => Observable<{
18
24
  __errors: any;
19
25
  status: number;
@@ -1,11 +1,14 @@
1
- export { account, asFloat, asInteger, backToShopping, buildQuery, cart, checkout, dataset, euroPrice, euros, millares, orderError, orderSummary, price, rememberPassword, round, signIn, storageAvailable };
2
- declare function buildQuery(data: {
1
+ export { account, asFloat, asInteger, backToShopping, buildQuery, cart, checkout, dataset, euroPrice, euros, isBoolean, isNumber, isString, millares, orderError, orderSummary, price, rememberPassword, round, signIn, storageAvailable };
2
+ declare const buildQuery: (data: {
3
3
  [key: string]: any;
4
- }): string;
4
+ }) => string;
5
5
  declare const dataset: (element: HTMLElement, property: string) => any;
6
+ declare const euroPrice: (taxBase: number, taxAmount: number, pricesTaxIncluded: boolean, decimales: number, cero?: boolean) => string;
6
7
  declare const euros: (valor: number, decimales: number, cero?: boolean) => string;
8
+ declare const isBoolean: (value: any) => boolean;
9
+ declare const isNumber: (value: any) => number;
10
+ declare const isString: (value: any, defaultValue?: string) => string;
7
11
  declare const price: (taxBase: number, taxAmount: number, pricesTaxIncluded: boolean) => number;
8
- declare const euroPrice: (taxBase: number, taxAmount: number, pricesTaxIncluded: boolean, decimales: number, cero?: boolean) => string;
9
12
  declare const millares: (valor: number, decimales: number, cero?: boolean) => string;
10
13
  declare const asFloat: (value: string | number | Array<string> | undefined, decimales?: number) => number;
11
14
  declare const asInteger: (value: string | number | Array<string> | boolean | undefined) => number;
@@ -34,6 +34,6 @@ export declare class CustomerService {
34
34
  status: number;
35
35
  }>;
36
36
  private updateState;
37
- updateToken(data: LoginData): void;
38
37
  private getMyAccount;
38
+ updateToken(data: LoginData): void;
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apirocket",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": " ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",