@ikas/storefront 0.0.94 → 0.0.96
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/build/__generated__/global-types.d.ts +7 -1
- package/build/api/cart/__generated__/getCart.d.ts +4 -0
- package/build/api/cart/__generated__/saveItemToCart.d.ts +4 -0
- package/build/api/checkout/__generated__/checkStocks.d.ts +3 -3
- package/build/api/checkout/index.d.ts +1 -1
- package/build/api/country/__generated__/getAvailableShippingCountries.d.ts +3 -0
- package/build/api/country/index.d.ts +1 -1
- package/build/api/index.d.ts +0 -2
- package/build/components/checkout/index.d.ts +3 -0
- package/build/components/checkout/model.d.ts +4 -3
- package/build/index.es.js +426 -409
- package/build/index.js +427 -412
- package/build/models/data/cart/index.d.ts +9 -0
- package/build/models/data/sales-channel/index.d.ts +12 -0
- package/build/models/data/storefront/{storefront-domain → domain}/index.d.ts +1 -0
- package/build/models/data/storefront/index.d.ts +19 -6
- package/build/models/data/storefront/localization/index.d.ts +7 -0
- package/build/models/data/storefront/routing/index.d.ts +9 -0
- package/build/models/data/storefront/theme/index.d.ts +13 -0
- package/build/models/data/storefront/theme-localization/index.d.ts +11 -0
- package/build/models/ui/product-list/index.d.ts +1 -1
- package/build/pages/checkout/[id].d.ts +3 -0
- package/build/storefront/index.d.ts +6 -0
- package/build/utils/settings.d.ts +82 -0
- package/package.json +1 -1
- package/build/api/product-stock-location/__generated__/listProductStockLocation.d.ts +0 -13
- package/build/api/product-stock-location/index.d.ts +0 -4
- package/build/api/storefront/__generated__/getStorefront.d.ts +0 -23
- package/build/api/storefront/index.d.ts +0 -4
- package/build/api/theme/index.d.ts +0 -4
- package/build/models/data/storefront/stockfront-location/index.d.ts +0 -5
- package/build/models/data/storefront/stockfront-route/index.d.ts +0 -5
- 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 {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class IkasSalesChannel {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
priceListId: string | null;
|
|
5
|
+
stockLocations: IkasSalesChannelStockLocation[] | null;
|
|
6
|
+
constructor(data: Partial<IkasSalesChannel>);
|
|
7
|
+
}
|
|
8
|
+
export declare class IkasSalesChannelStockLocation {
|
|
9
|
+
id: string;
|
|
10
|
+
order: number;
|
|
11
|
+
constructor(data: Partial<IkasSalesChannelStockLocation>);
|
|
12
|
+
}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
22
|
+
themes: IkasStorefrontTheme[];
|
|
23
|
+
regions: IkasStorefrontThemeLocalization[];
|
|
11
24
|
constructor(data?: Partial<IkasStorefront>);
|
|
12
25
|
}
|
|
@@ -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,11 @@ 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;
|
|
12
|
+
static stockLocationIds?: string[];
|
|
7
13
|
static init(store: IkasBaseStore, components: any, config: Record<string, any>, apiUrlOverride?: string): void;
|
|
8
14
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { GetServerSidePropsContext, GetStaticPropsContext } from "next";
|
|
3
|
+
import { ParsedUrlQuery } from "querystring";
|
|
4
|
+
import { IkasTheme, IkasThemePageType } from "../models/index";
|
|
5
|
+
import { IkasStorefront } from "../models/data/storefront/index";
|
|
6
|
+
import { IkasSalesChannel } from "../models/data/sales-channel/index";
|
|
7
|
+
import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
|
|
8
|
+
export declare class SettingsHelper {
|
|
9
|
+
static getSettings(locale: string): Promise<SettingsData | null>;
|
|
10
|
+
static getPageData(context: GetStaticPropsContext<ParsedUrlQuery> | GetServerSidePropsContext<ParsedUrlQuery>, isServer: boolean, pageType?: IkasThemePageType): Promise<{
|
|
11
|
+
props: {
|
|
12
|
+
propValuesStr: string;
|
|
13
|
+
page: import("../models/index").IkasThemePage | null;
|
|
14
|
+
settingsStr: string;
|
|
15
|
+
merchantSettings: string | null;
|
|
16
|
+
};
|
|
17
|
+
} | {
|
|
18
|
+
props: {};
|
|
19
|
+
notFound: boolean;
|
|
20
|
+
revalidate?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
props: {
|
|
23
|
+
pageSpecificDataStr: string;
|
|
24
|
+
propValuesStr: string;
|
|
25
|
+
page: import("../models/index").IkasThemePage | null;
|
|
26
|
+
settingsStr: string;
|
|
27
|
+
merchantSettings: string | null;
|
|
28
|
+
};
|
|
29
|
+
revalidate: number;
|
|
30
|
+
notFound?: undefined;
|
|
31
|
+
}>;
|
|
32
|
+
static getStaticProps(context: GetStaticPropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType): Promise<{
|
|
33
|
+
props: {
|
|
34
|
+
propValuesStr: string;
|
|
35
|
+
page: import("../models/index").IkasThemePage | null;
|
|
36
|
+
settingsStr: string;
|
|
37
|
+
merchantSettings: string | null;
|
|
38
|
+
};
|
|
39
|
+
} | {
|
|
40
|
+
props: {};
|
|
41
|
+
notFound: boolean;
|
|
42
|
+
revalidate?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
props: {
|
|
45
|
+
pageSpecificDataStr: string;
|
|
46
|
+
propValuesStr: string;
|
|
47
|
+
page: import("../models/index").IkasThemePage | null;
|
|
48
|
+
settingsStr: string;
|
|
49
|
+
merchantSettings: string | null;
|
|
50
|
+
};
|
|
51
|
+
revalidate: number;
|
|
52
|
+
notFound?: undefined;
|
|
53
|
+
}>;
|
|
54
|
+
static getServerSideProps(context: GetServerSidePropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType): Promise<{
|
|
55
|
+
props: {
|
|
56
|
+
propValuesStr: string;
|
|
57
|
+
page: import("../models/index").IkasThemePage | null;
|
|
58
|
+
settingsStr: string;
|
|
59
|
+
merchantSettings: string | null;
|
|
60
|
+
};
|
|
61
|
+
} | {
|
|
62
|
+
props: {};
|
|
63
|
+
notFound: boolean;
|
|
64
|
+
revalidate?: undefined;
|
|
65
|
+
} | {
|
|
66
|
+
props: {
|
|
67
|
+
pageSpecificDataStr: string;
|
|
68
|
+
propValuesStr: string;
|
|
69
|
+
page: import("../models/index").IkasThemePage | null;
|
|
70
|
+
settingsStr: string;
|
|
71
|
+
merchantSettings: string | null;
|
|
72
|
+
};
|
|
73
|
+
revalidate: number;
|
|
74
|
+
notFound?: undefined;
|
|
75
|
+
}>;
|
|
76
|
+
}
|
|
77
|
+
export declare type SettingsData = {
|
|
78
|
+
storefront: IkasStorefront;
|
|
79
|
+
theme: IkasTheme;
|
|
80
|
+
salesChannel: IkasSalesChannel;
|
|
81
|
+
routing: IkasStorefrontRouting;
|
|
82
|
+
};
|
package/package.json
CHANGED
|
@@ -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,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
|
-
}
|