@salla.sa/twilight 2.0.210 → 2.0.211

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight",
3
- "version": "2.0.210",
3
+ "version": "2.0.211",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs/main.js",
6
6
  "module": "dist/esm/main.js",
package/types/all.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './api/cart/cart-details-response';
2
- export * from './api/cart/cart-item';
2
+ export * from './api/cart';
3
+ export * from './api/coupon';
3
4
  export * from './api/cart/cart-status-response';
4
5
  export * from './api/order/re-order-response';
@@ -1,4 +1,4 @@
1
- import {CartDetailsResponse} from "./cart/cart-details-response";
1
+ // import {CartDetailsResponse} from "./cart/cart-details-response";
2
2
  import {Nullable} from "../common";
3
3
 
4
4
  export interface itemOffer {
@@ -33,6 +33,7 @@ export interface CartSummary {
33
33
  total: number,
34
34
  count: number,
35
35
  items: Nullable<CartItem[]>,
36
+ user_id: number | string,
36
37
  }
37
38
 
38
39
  export interface OfferSummary {
@@ -64,7 +65,7 @@ export interface DeleteCartItemResponse extends CartUpdateResponse {
64
65
  }
65
66
 
66
67
  export default interface CartApi {
67
- latest: () => Promise<{ status: number; success: boolean; data: { cart_id: number }; message: string; } | any>,
68
- generate: () => Promise<any>,
69
- details: () => Promise<CartDetailsResponse | any>,
68
+ latest: () => Promise<{ status: number, success: boolean, data: { cart_id: number }, message: string, }>;
69
+ generate: () => Promise<{}>;
70
+ // details: () => Promise<CartDetailsResponse>;
70
71
  }
@@ -1,9 +1,4 @@
1
- import {
2
- CartSummary,
3
- AddToCartResponse,
4
- UpdateCartItemResponse,
5
- DeleteCartItemResponse
6
- } from "../api/cart/responses";
1
+ import {CartSummary, AddToCartResponse, UpdateCartItemResponse, DeleteCartItemResponse} from "../api/cart";
7
2
 
8
3
  export default interface CartEvent {
9
4
  onUpdated: (callback: (cartSummery: CartSummary) => void) => void,
package/types/index.d.ts CHANGED
@@ -9,7 +9,7 @@ import CouponApi from "./api/coupon";
9
9
 
10
10
  export * from "./all";
11
11
 
12
- export interface salla {
12
+ export default interface salla {
13
13
  notify: string;
14
14
  api: Axios | {
15
15
  cart: CartApi,