@ikas/storefront 0.0.94 → 0.0.95

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 (32) hide show
  1. package/build/__generated__/global-types.d.ts +7 -1
  2. package/build/api/cart/__generated__/getCart.d.ts +4 -0
  3. package/build/api/cart/__generated__/saveItemToCart.d.ts +4 -0
  4. package/build/api/checkout/__generated__/checkStocks.d.ts +3 -3
  5. package/build/api/checkout/index.d.ts +1 -1
  6. package/build/api/country/__generated__/getAvailableShippingCountries.d.ts +3 -0
  7. package/build/api/country/index.d.ts +1 -1
  8. package/build/api/index.d.ts +0 -2
  9. package/build/components/checkout/index.d.ts +3 -0
  10. package/build/components/checkout/model.d.ts +4 -3
  11. package/build/index.es.js +402 -409
  12. package/build/index.js +403 -412
  13. package/build/models/data/cart/index.d.ts +9 -0
  14. package/build/models/data/storefront/{storefront-domain → domain}/index.d.ts +1 -0
  15. package/build/models/data/storefront/index.d.ts +19 -6
  16. package/build/models/data/storefront/localization/index.d.ts +7 -0
  17. package/build/models/data/storefront/routing/index.d.ts +9 -0
  18. package/build/models/data/storefront/theme/index.d.ts +13 -0
  19. package/build/models/data/storefront/theme-localization/index.d.ts +11 -0
  20. package/build/models/ui/product-list/index.d.ts +1 -1
  21. package/build/pages/checkout/[id].d.ts +3 -0
  22. package/build/storefront/index.d.ts +5 -0
  23. package/build/utils/settings.d.ts +80 -0
  24. package/package.json +1 -1
  25. package/build/api/product-stock-location/__generated__/listProductStockLocation.d.ts +0 -13
  26. package/build/api/product-stock-location/index.d.ts +0 -4
  27. package/build/api/storefront/__generated__/getStorefront.d.ts +0 -23
  28. package/build/api/storefront/index.d.ts +0 -4
  29. package/build/api/theme/index.d.ts +0 -4
  30. package/build/models/data/storefront/stockfront-location/index.d.ts +0 -5
  31. package/build/models/data/storefront/stockfront-route/index.d.ts +0 -5
  32. package/build/models/data/storefront/storefront-region/index.d.ts +0 -18
@@ -10,6 +10,10 @@ export declare class IkasCart {
10
10
  items: IkasOrderLineItem[];
11
11
  merchantId: string;
12
12
  totalPrice: number;
13
+ salesChannelId: string;
14
+ storefrontId: string | null;
15
+ storefrontRoutingId: string | null;
16
+ storefrontThemeId: string | null;
13
17
  constructor(data: Partial<IkasCart>);
14
18
  get totalTax(): number;
15
19
  }
@@ -26,5 +30,10 @@ export declare type IkasSaveItemToCartInput = {
26
30
  cartId: string | null;
27
31
  customerId: string | null;
28
32
  item: IkasCartLineItemInput;
33
+ priceListId: string | null;
34
+ salesChannelId: string;
35
+ storefrontId: string;
36
+ storefrontRoutingId: string;
37
+ storefrontThemeId: string;
29
38
  };
30
39
  export {};
@@ -3,5 +3,6 @@ export declare class IkasStorefrontDomain {
3
3
  merchantDomainId: string;
4
4
  name: string;
5
5
  redirectDomainName: string | null;
6
+ isDefault?: boolean | false;
6
7
  constructor(data?: Partial<IkasStorefrontDomain>);
7
8
  }
@@ -1,12 +1,25 @@
1
- import { IkasStorefrontDomain } from "./storefront-domain/index";
2
- import { IkasStorefrontRegion } from "./storefront-region/index";
1
+ import { IkasStorefrontLocalization } from "./localization/index";
2
+ import { IkasStorefrontDomain } from "./domain/index";
3
+ import { IkasStorefrontRouting } from "./routing/index";
4
+ import { IkasStorefrontTheme } from "./theme/index";
5
+ import { IkasStorefrontThemeLocalization } from "./theme-localization/index";
6
+ export declare enum StorefrontStatus {
7
+ WAITING = "WAITING",
8
+ READY = "READY"
9
+ }
3
10
  export declare class IkasStorefront {
4
11
  id: string;
5
12
  name: string;
6
- themeId: string;
7
- themeVersionId: string;
8
- userId: string;
13
+ status: StorefrontStatus;
14
+ mainStorefrontThemeId: string | null;
15
+ emailSettingsId: string | null;
16
+ salesChannelId: string | null;
17
+ fbpId: string | null;
18
+ gtmId: string | null;
19
+ localizations: IkasStorefrontLocalization[];
20
+ routings: IkasStorefrontRouting[];
9
21
  domains: IkasStorefrontDomain[];
10
- regions: IkasStorefrontRegion[];
22
+ themes: IkasStorefrontTheme[];
23
+ regions: IkasStorefrontThemeLocalization[];
11
24
  constructor(data?: Partial<IkasStorefront>);
12
25
  }
@@ -0,0 +1,7 @@
1
+ export declare class IkasStorefrontLocalization {
2
+ id: string;
3
+ isDefault: boolean;
4
+ locale: string;
5
+ name: string;
6
+ constructor(data: Partial<IkasStorefrontLocalization>);
7
+ }
@@ -0,0 +1,9 @@
1
+ export declare class IkasStorefrontRouting {
2
+ id: string;
3
+ countryCodes: string[] | null;
4
+ domain: string | null;
5
+ locale: string;
6
+ path: string | null;
7
+ priceListId: string | null;
8
+ constructor(data: Partial<IkasStorefrontRouting>);
9
+ }
@@ -0,0 +1,13 @@
1
+ export declare enum IkasStorefrontThemeStatus {
2
+ WAITING = "WAITING",
3
+ READY = "READY"
4
+ }
5
+ export declare class IkasStorefrontTheme {
6
+ id: string;
7
+ isMainTheme: boolean;
8
+ name: string;
9
+ status: IkasStorefrontThemeStatus;
10
+ themeId: string;
11
+ themeVersionId: string;
12
+ constructor(data: Partial<IkasStorefrontTheme>);
13
+ }
@@ -0,0 +1,11 @@
1
+ export declare class IkasStorefrontThemeLocalization {
2
+ id: string;
3
+ locale: string;
4
+ storefrontId: string;
5
+ storefrontThemeId: string;
6
+ themeJson: string;
7
+ privacyPolicy: string | null;
8
+ returnPolicy: string | null;
9
+ termsOfService: string | null;
10
+ constructor(data: Partial<IkasStorefrontThemeLocalization>);
11
+ }
@@ -53,7 +53,7 @@ export declare class IkasProductList {
53
53
  getPrev: () => Promise<void>;
54
54
  getNext: () => Promise<void>;
55
55
  getPage: (page: number) => Promise<void>;
56
- onFilterCategoryClick(filterCategory: IkasFilterCategory): void;
56
+ onFilterCategoryClick(filterCategory: IkasFilterCategory, disableRoute?: boolean): Promise<void>;
57
57
  toJSON(): {
58
58
  data: IkasProductDetail[];
59
59
  type: IkasProductListType;
@@ -4,6 +4,9 @@ import { GetServerSideProps } from "next";
4
4
  import { ParsedUrlQuery } from "querystring";
5
5
  declare type Props = {
6
6
  checkoutStr: string;
7
+ returnPolicy: string;
8
+ privacyPolicy: string;
9
+ termsOfService: string;
7
10
  queryParams: ParsedUrlQuery;
8
11
  };
9
12
  declare const _default: React.FunctionComponent<Props>;
@@ -4,5 +4,10 @@ export declare class IkasStorefrontConfig {
4
4
  static components: any;
5
5
  static config: Record<string, any>;
6
6
  static apiUrlOverride: string | null;
7
+ static storefrontId?: string;
8
+ static storefrontRoutingId?: string;
9
+ static storefrontThemeId?: string;
10
+ static salesChannelId?: string;
11
+ static priceListId?: string;
7
12
  static init(store: IkasBaseStore, components: any, config: Record<string, any>, apiUrlOverride?: string): void;
8
13
  }
@@ -0,0 +1,80 @@
1
+ /// <reference types="node" />
2
+ import { IkasTheme, IkasThemePageType } from "../models/index";
3
+ import { IkasStorefront } from "../models/data/storefront/index";
4
+ import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
5
+ import { GetServerSidePropsContext, GetStaticPropsContext } from "next";
6
+ import { ParsedUrlQuery } from "querystring";
7
+ export declare class SettingsHelper {
8
+ static getSettings(locale: string): Promise<SettingsData | null>;
9
+ static getPageData(context: GetStaticPropsContext<ParsedUrlQuery> | GetServerSidePropsContext<ParsedUrlQuery>, isServer: boolean, pageType?: IkasThemePageType): Promise<{
10
+ props: {
11
+ propValuesStr: string;
12
+ page: import("../models/index").IkasThemePage | null;
13
+ settingsStr: string;
14
+ merchantSettings: string | null;
15
+ };
16
+ } | {
17
+ props: {};
18
+ notFound: boolean;
19
+ revalidate?: undefined;
20
+ } | {
21
+ props: {
22
+ pageSpecificDataStr: string;
23
+ propValuesStr: string;
24
+ page: import("../models/index").IkasThemePage | null;
25
+ settingsStr: string;
26
+ merchantSettings: string | null;
27
+ };
28
+ revalidate: number;
29
+ notFound?: undefined;
30
+ }>;
31
+ static getStaticProps(context: GetStaticPropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType): Promise<{
32
+ props: {
33
+ propValuesStr: string;
34
+ page: import("../models/index").IkasThemePage | null;
35
+ settingsStr: string;
36
+ merchantSettings: string | null;
37
+ };
38
+ } | {
39
+ props: {};
40
+ notFound: boolean;
41
+ revalidate?: undefined;
42
+ } | {
43
+ props: {
44
+ pageSpecificDataStr: string;
45
+ propValuesStr: string;
46
+ page: import("../models/index").IkasThemePage | null;
47
+ settingsStr: string;
48
+ merchantSettings: string | null;
49
+ };
50
+ revalidate: number;
51
+ notFound?: undefined;
52
+ }>;
53
+ static getServerSideProps(context: GetServerSidePropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType): Promise<{
54
+ props: {
55
+ propValuesStr: string;
56
+ page: import("../models/index").IkasThemePage | null;
57
+ settingsStr: string;
58
+ merchantSettings: string | null;
59
+ };
60
+ } | {
61
+ props: {};
62
+ notFound: boolean;
63
+ revalidate?: undefined;
64
+ } | {
65
+ props: {
66
+ pageSpecificDataStr: string;
67
+ propValuesStr: string;
68
+ page: import("../models/index").IkasThemePage | null;
69
+ settingsStr: string;
70
+ merchantSettings: string | null;
71
+ };
72
+ revalidate: number;
73
+ notFound?: undefined;
74
+ }>;
75
+ }
76
+ export declare type SettingsData = {
77
+ storefront: IkasStorefront;
78
+ theme: IkasTheme;
79
+ routing: IkasStorefrontRouting;
80
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.94",
3
+ "version": "0.0.95",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",
@@ -1,13 +0,0 @@
1
- export interface listProductStockLocation_listProductStockLocation {
2
- __typename: "ProductStockLocation";
3
- variantId: string;
4
- stockLocationId: string;
5
- stockCount: number;
6
- }
7
- export interface listProductStockLocation {
8
- listProductStockLocation: listProductStockLocation_listProductStockLocation[];
9
- }
10
- export interface listProductStockLocationVariables {
11
- stockLocationIdList: string[];
12
- variantIdList: string[];
13
- }
@@ -1,4 +0,0 @@
1
- import * as ListProductStockLocationTypes from "./__generated__/listProductStockLocation";
2
- export declare class IkasProductStockLocationAPI {
3
- static listProductStockLocation(stockLocationIdList: string[], variantIdList: string[]): Promise<ListProductStockLocationTypes.listProductStockLocation_listProductStockLocation[] | undefined>;
4
- }
@@ -1,23 +0,0 @@
1
- export interface getStorefront_getStorefront_regions {
2
- __typename: "StorefrontRegion";
3
- id: string;
4
- locale: string;
5
- privacyPolicy: string | null;
6
- returnPolicy: string | null;
7
- termsOfService: string | null;
8
- }
9
- export interface getStorefront_getStorefront {
10
- __typename: "Storefront";
11
- id: string;
12
- name: string;
13
- themeId: string;
14
- themeVersionId: string;
15
- userId: string;
16
- regions: getStorefront_getStorefront_regions[];
17
- }
18
- export interface getStorefront {
19
- getStorefront: getStorefront_getStorefront;
20
- }
21
- export interface getStorefrontVariables {
22
- storefrontId: string;
23
- }
@@ -1,4 +0,0 @@
1
- import { IkasStorefront } from "../../models/data/storefront/index";
2
- export declare class IkasStorefrontAPI {
3
- static getStorefront(storefrontId: string): Promise<IkasStorefront | undefined>;
4
- }
@@ -1,4 +0,0 @@
1
- import { IkasTheme } from "../../models/index";
2
- export declare class IkasThemeAPI {
3
- static fetchTheme(): Promise<IkasTheme>;
4
- }
@@ -1,5 +0,0 @@
1
- export declare class IkasStorefrontLocation {
2
- countryId: string;
3
- stateId: string | null;
4
- constructor(data?: Partial<IkasStorefrontLocation>);
5
- }
@@ -1,5 +0,0 @@
1
- export declare class IkasStorefrontRoute {
2
- domainId: string;
3
- useSubPath: boolean;
4
- constructor(data?: Partial<IkasStorefrontRoute>);
5
- }
@@ -1,18 +0,0 @@
1
- import { IkasStorefrontLocation } from "../stockfront-location/index";
2
- import { IkasStorefrontRoute } from "../stockfront-route/index";
3
- import { IkasTheme } from "../../../theme/index";
4
- export declare class IkasStorefrontRegion {
5
- id: string;
6
- locale: string;
7
- themeJSON: string | null;
8
- shipping: string | null;
9
- paymentSettingsId: string | null;
10
- priceListId: string | null;
11
- locations: IkasStorefrontLocation[] | null;
12
- routes: IkasStorefrontRoute[] | null;
13
- termsOfService: string;
14
- privacyPolicy: string;
15
- returnPolicy: string;
16
- theme: IkasTheme;
17
- constructor(data?: Partial<IkasStorefrontRegion>);
18
- }