@salla.sa/twilight 2.11.35 → 2.11.38

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.11.35",
3
+ "version": "2.11.38",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -60,5 +60,5 @@
60
60
  "peerDependencies": {
61
61
  "webpack": "^4 || ^5"
62
62
  },
63
- "gitHead": "e37ad122b530a37e3b84f172681d8f07a4b8abbc"
63
+ "gitHead": "3ecc3bb5f32ce18409c1a71c355338db4ed17238"
64
64
  }
@@ -10,6 +10,7 @@ import CurrencyApi from "./currency";
10
10
  import DocumentApi from "./document";
11
11
  import WishlistApi from "./wishlist";
12
12
  import ScopeApi from "./scope";
13
+ import LandingApi from "./landing";
13
14
  import BookingApi, { Booking } from "./booking";
14
15
  import { ErrorResponse, SuccessResponse } from "@salla.sa/base/types/common";
15
16
 
@@ -27,6 +28,7 @@ export {
27
28
  WishlistApi,
28
29
  ScopeApi,
29
30
  BookingApi,
31
+ LandingApi,
30
32
  };
31
33
  export type ApiActionName =
32
34
  'auth.login'
@@ -67,7 +69,6 @@ export type ApiActionName =
67
69
  | 'product.uploadGiftImage'
68
70
  | 'profile.update'
69
71
  | 'profile.info'
70
- | 'profile.update'
71
72
  | 'profile.updateContacts'
72
73
  | 'profile.verify'
73
74
  | 'profile.updateSettings'
@@ -101,6 +102,7 @@ export default interface Api {
101
102
  wishlist: WishlistApi;
102
103
  scope: ScopeApi;
103
104
  booking: BookingApi;
105
+ landing: LandingApi;
104
106
  withoutNotifier: (callback: Function) => Promise<void>;
105
107
  getHeaders: () => {
106
108
  Accept: string | 'application/json, text/plain, */*',
@@ -0,0 +1,6 @@
1
+ import {SuccessResponse} from "../common";
2
+
3
+ export default interface LandingApi {
4
+ getDetails: (page_id?: number) => Promise<SuccessResponse>;
5
+ createCartFromPage: (page_id?: number) => Promise<SuccessResponse>;
6
+ }
@@ -12,6 +12,7 @@ import WishlistEvent from "./wishlist";
12
12
  import InfiniteScrollEvent from "./infiniteScroll";
13
13
  import ScopeEvents from "./scope";
14
14
  import BookingEvent from "./booking";
15
+ import LandingEvent from "./landing";
15
16
  import Emitter from "@salla.sa/base/types/event";
16
17
 
17
18
  export type event = (symbol | string);
@@ -31,6 +32,7 @@ export {
31
32
  InfiniteScrollEvent,
32
33
  ScopeEvents,
33
34
  BookingEvent,
35
+ LandingEvent,
34
36
  }
35
37
 
36
38
  export default interface TwilightEmitter extends Emitter {
@@ -46,6 +48,7 @@ export default interface TwilightEmitter extends Emitter {
46
48
  document: DocumentEvent;
47
49
  wishlist: WishlistEvent;
48
50
  scope: ScopeEvents;
51
+ landing: LandingEvent;
49
52
  booking: BookingEvent;
50
53
  infiniteScroll: InfiniteScrollEvent;
51
54
  }
@@ -0,0 +1,8 @@
1
+ import {RequestError, SuccessResponse} from "../common";
2
+
3
+ export default interface LandingEvent {
4
+ orderCreationFailed: (error: RequestError, page_id?: number) => void;
5
+ orderCreated: (response: SuccessResponse, page_id?: number) => Promise<void>;
6
+ onOrderCreated: (callback: (response: SuccessResponse, page_id?: number) => void) => void;
7
+ onOrderCreationFailed: (callback: (error: RequestError, page_id?: number) => void) => void;
8
+ }