@salla.sa/twilight 2.11.35 → 2.11.36
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/@salla.sa/twilight.min.js +3 -3
- package/dist/@salla.sa/twilight.min.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
- package/types/api/index.d.ts +3 -1
- package/types/api/landing.d.ts +6 -0
- package/types/event/index.d.ts +3 -0
- package/types/event/landing.d.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salla.sa/twilight",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.36",
|
|
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": "
|
|
63
|
+
"gitHead": "e8d3caac3c499674c49e0a43040ef57112f3f76d"
|
|
64
64
|
}
|
package/types/api/index.d.ts
CHANGED
|
@@ -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, */*',
|
package/types/event/index.d.ts
CHANGED
|
@@ -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
|
+
}
|