@salla.sa/twilight 2.0.216 → 2.0.217

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.216",
3
+ "version": "2.0.217",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs/main.js",
6
6
  "module": "dist/esm/main.js",
@@ -9,6 +9,7 @@ export interface ProfilePayload {
9
9
  mobile: string | number;
10
10
  country_code: string | 'SA';
11
11
  country_key: string | '+966';
12
+ avatar?: BinaryType;
12
13
  }
13
14
 
14
15
  export interface UpdateProfileResponse extends TwilightResponse {
package/types/index.d.ts CHANGED
@@ -34,6 +34,15 @@ export default interface Salla {
34
34
  feedback: any;
35
35
  twilight: any;
36
36
  wishlist: any;
37
+ getHeaders: () => {
38
+ "Accept": string | 'application/json, text/plain, */*',
39
+ "X-Requested-With": 'XMLHttpRequest',
40
+ "S-SOURCE": 'twilight',
41
+ "Store-Identifier"?: number,
42
+ "currency"?: string | 'SAR',
43
+ "accept-language"?: string | 'ar',
44
+ "Authorization"?: string
45
+ }
37
46
  };
38
47
  event: {
39
48
  auth: AuthEvent,
@@ -78,9 +87,10 @@ export default interface Salla {
78
87
  twilight: { api: any, event: any };
79
88
  wishlist: { api: any, event: any };
80
89
 
81
- log: any;
82
- success: any;
83
- error: any;
90
+ log: (message: string | any) => void;
91
+ success: (message: string) => void;
92
+ error: (message: string) => void;
93
+ lang: any;
84
94
  onReady: any; //don't relay on it because Salla may not existed yet
85
95
  AppHelpers: any;
86
96
  money: (money: number | Price) => string;
@@ -4,7 +4,7 @@ import {Price} from "../common";
4
4
  export interface SallaConfig {
5
5
  merge: (config: TwilightConfig) => SallaConfig;
6
6
  set: (key: string, value: string) => SallaConfig;
7
- get: (key: string, default_: any) => any;
7
+ get: (key: string, default_?: any) => any;
8
8
  isRTL: () => boolean;
9
9
  money: (money: number | Price) => string;
10
10
  isUser: () => boolean;