@salla.sa/twilight 2.0.252 → 2.0.254

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.252",
3
+ "version": "2.0.254",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -7,7 +7,6 @@ import {CartRequest} from "./request";
7
7
  export default interface CartApi {
8
8
  latest: () => Promise<CartResponse.update>;
9
9
  details: () => Promise<CartResponse.update>;
10
- summary: () => Promise<CartResponse.update>;
11
10
  quickAdd: (/*product_id*/id: number) => Promise<CartResponse.update>;
12
11
  addItem: (data: CartRequest.addItem) => Promise<CartResponse.update>;
13
12
  deleteItem: (item_id: number) => Promise<CartResponse.update>;
@@ -13,7 +13,7 @@ export interface AvailabilityPayload {
13
13
  //💡 Following properties required for guests
14
14
  email?: string;//required when request without mobile
15
15
  country_code?: string | 'SA';//required when request without email
16
- mobile?: string | '555555555';//required when request without email
16
+ phone?: string | '555555555';//required when request without email
17
17
  }
18
18
 
19
19
  export interface GetPriceResponse extends SuccessResponse {
@@ -9,7 +9,6 @@ export default interface CartEvent {
9
9
  onLatestFetched: (callback: (response: CartResponse.update) => void) => void;
10
10
  onSubmitted: (callback: (response: CartResponse.status) => void) => void;
11
11
  onImageDeleted: (callback: (response: SuccessResponse, file_id: number) => void) => void;
12
- onSummaryFetched: (callback: (response: CartResponse.status) => void) => void;
13
12
  onDetailsFetched: (callback: (response: CartResponse.status) => void) => void;
14
13
  onSuccessReset: (callback: () => void) => void;
15
14
 
@@ -20,7 +19,6 @@ export default interface CartEvent {
20
19
  onItemDeletedFailed: (callback: (error: RequestError | 'There is no "id"!', item_id?: number) => void) => void;
21
20
  onSubmitFailed: (callback: (error: RequestError | "Can't find next_step );") => void) => void;
22
21
  onImageNotDeleted: (callback: (error: RequestError | 'There is no "id"!', file_id?: number) => void) => void;
23
- onSummaryNotFetched: (callback: (error: RequestError) => void) => void;
24
22
  onDetailsNotFetched: (callback: (error: RequestError) => void) => void;
25
23
 
26
24
  //coupons
@@ -1,6 +1,7 @@
1
1
  import {ApiActionName} from "../api";
2
2
 
3
3
  export default interface SallaForm {
4
- submit: (action: ApiActionName, eventOrData: Event | Object) => Promise<any>;
5
- onSubmit: (action: ApiActionName, eventOrData: Event | Object) => false;
4
+ submit: (action: ApiActionName|string, eventOrData: Event | Object) => Promise<any>;
5
+ onSubmit: (action: ApiActionName|string, eventOrData: Event | Object) => false;
6
+ onChange: (action: ApiActionName|string, eventOrData: Event | Object) => false;
6
7
  }