@ikas/storefront 1.0.13 → 1.0.14-alpha.2

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.
Files changed (26) hide show
  1. package/build/__generated__/global-types.d.ts +3 -0
  2. package/build/api/blog/__generated__/getBlog.d.ts +14 -16
  3. package/build/api/blog/__generated__/listBlog.d.ts +14 -16
  4. package/build/api/blog/__generated__/listBlogCategory.d.ts +14 -16
  5. package/build/api/blog/__generated__/listBlogMetaData.d.ts +14 -16
  6. package/build/api/brand/__generated__/listProductBrand.d.ts +3 -3
  7. package/build/api/cart/__generated__/getCart.d.ts +2 -4
  8. package/build/api/cart/__generated__/saveItemToCart.d.ts +2 -4
  9. package/build/api/category/__generated__/listCategory.d.ts +3 -3
  10. package/build/api/checkout/__generated__/getCheckoutById.d.ts +2 -4
  11. package/build/api/checkout/__generated__/getOrder.d.ts +5 -11
  12. package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +5 -11
  13. package/build/api/customer/__generated__/customerLogin.d.ts +12 -5
  14. package/build/api/customer/__generated__/customerSocialLogin.d.ts +161 -0
  15. package/build/api/customer/__generated__/getCustomerOrders.d.ts +5 -11
  16. package/build/api/customer/__generated__/getMyCustomer.d.ts +4 -5
  17. package/build/api/customer/__generated__/registerCustomer.d.ts +12 -5
  18. package/build/api/customer/__generated__/saveMyCustomer.d.ts +12 -5
  19. package/build/api/customer/index.d.ts +5 -0
  20. package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +14 -16
  21. package/build/api/variant-type/__generated__/listVariantType.d.ts +3 -7
  22. package/build/index.es.js +171 -59
  23. package/build/index.js +171 -59
  24. package/build/store/customer.d.ts +19 -0
  25. package/build/storefront/index.d.ts +3 -1
  26. package/package.json +1 -1
@@ -15,6 +15,25 @@ export declare class IkasCustomerStore {
15
15
  get canCreateEmailSubscription(): boolean;
16
16
  get customerConsentGranted(): boolean;
17
17
  login: (email: string, password: string) => Promise<boolean>;
18
+ /**
19
+ * Call it when click the social login button
20
+ * This will automaticly redirect to matched url.
21
+ * @param provider
22
+ * @returns undefined
23
+ */
24
+ socialLogin(provider: "facebook" | "google"): Promise<void>;
25
+ /**
26
+ * When user click the social login ex. facebook login. We navigate to backend.
27
+ * and backend navigate to provider. after user login into provider,
28
+ * backend redirect to account/login with following params;
29
+ * socialLoginStatus: success | fail
30
+ * socialLoginError: string
31
+ * socialLoginToken: string
32
+ * if query params includes socialLoginToken call this function to verify
33
+ * @param token
34
+ * @returns boolean
35
+ */
36
+ socialLoginToken(token: string): Promise<boolean>;
18
37
  register: (firstName: string, lastName: string, email: string, password: string, isMarketingAccepted?: boolean | undefined) => Promise<boolean>;
19
38
  saveContactForm: (input: IkasContactForm) => Promise<boolean | undefined>;
20
39
  checkEmail: (email: string) => Promise<boolean>;
@@ -5,11 +5,13 @@ import { IkasThemeStockPreference } from "../models/theme/settings/index";
5
5
  import { IkasThemeFavicon } from "../models/theme/settings/prop/favicon/index";
6
6
  import { IkasBaseStore } from "../store/index";
7
7
  import { IkasCustomerReviewSettings } from "../models/index";
8
+ import { NextRouter } from "next/router";
8
9
  export declare class IkasStorefrontConfig {
9
10
  static store: IkasBaseStore;
10
11
  static components: any;
11
12
  static config: Record<string, any>;
12
13
  static apiUrlOverride: string | null;
14
+ static router?: NextRouter;
13
15
  static domain: string;
14
16
  static storefrontId?: string;
15
17
  static storefrontRoutingId?: string;
@@ -29,7 +31,7 @@ export declare class IkasStorefrontConfig {
29
31
  static customerReviewSettings: IkasCustomerReviewSettings | null;
30
32
  static productBackInStockSettings: IkasProductBackInStockSettings | null;
31
33
  static init(store: IkasBaseStore, components: any, config: Record<string, any>, apiUrlOverride?: string): void;
32
- static initWithJson(json: Record<string, any>): void;
34
+ static initWithJson(json: Record<string, any>, router: NextRouter): void;
33
35
  static getCurrentLocale(): string;
34
36
  static getJson(): {
35
37
  domain: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "1.0.13",
3
+ "version": "1.0.14-alpha.2",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",