@salla.sa/twilight 2.0.264 → 2.0.265

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.264",
3
+ "version": "2.0.265",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -54,7 +54,7 @@ export interface Category {
54
54
  }
55
55
 
56
56
  export interface GetCategoriesResponse extends SuccessResponse {
57
- data: Category[];
57
+ data: Category | Category[]; //single category when getting subCategories by passing categoryId
58
58
  }
59
59
 
60
60
  export default interface ProductApi {
@@ -36,7 +36,6 @@ export interface UpdateProfileResponse extends SuccessResponse {
36
36
 
37
37
  export default interface ProfileApi {
38
38
  update: (data: ProfileUpdatePayload) => Promise<UpdateProfileResponse>;
39
- updateMobile: (data: ProfileUpdateMobilePayload) => Promise<UpdateProfileResponse>;
40
- updateEmail: (data: ProfileUpdateEmailPayload) => Promise<UpdateProfileResponse>;
41
39
  verify: (data: AuthRequest.verifyByMobile | AuthRequest.verifyByEmail) => Promise<SuccessResponse>;
40
+ updateContacts: (data: ProfileUpdateMobilePayload | ProfileUpdateEmailPayload) => Promise<UpdateProfileResponse>;
42
41
  }
@@ -3,13 +3,11 @@ import {RequestErrorEvent, SuccessResponse} from "../common";
3
3
 
4
4
  export default interface ProfileEvent {
5
5
  onUpdated: (callback: (response: UpdateProfileResponse) => void) => void;
6
- onMobileUpdated: (callback: (response: UpdateProfileResponse) => void) => void;
7
- onEmailUpdated: (callback: (response: UpdateProfileResponse) => void) => void;
8
6
  onVerified: (callback: (response: SuccessResponse) => void) => void;
7
+ onContactsUpdated: (callback: (response: UpdateProfileResponse) => void) => void;
9
8
 
10
9
  //errors
11
10
  onUpdateFailed: RequestErrorEvent;
12
- onUpdateMobileFailed: RequestErrorEvent;
13
- onUpdateEmailFailed: RequestErrorEvent;
14
11
  onUnverified: RequestErrorEvent;
12
+ onUpdateContactsFailed: RequestErrorEvent;
15
13
  }