@ikas/storefront 0.0.101 → 0.0.103
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 +22 -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/__generated__/getMyCountry.d.ts +3 -0
- package/build/api/country/__generated__/listCountry.d.ts +2 -0
- package/build/api/country/index.d.ts +2 -1
- package/build/api/index.d.ts +0 -2
- package/build/api/storefront/__generated__/getStorefront.d.ts +39 -10
- package/build/api/storefront/index.d.ts +1 -1
- package/build/components/checkout/index.d.ts +3 -0
- package/build/components/checkout/model.d.ts +4 -3
- package/build/index.es.js +728 -430
- package/build/index.js +730 -433
- package/build/models/data/cart/index.d.ts +9 -0
- package/build/models/data/country/index.d.ts +2 -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 +17 -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 +12 -0
- package/build/models/ui/product-list/index.d.ts +1 -1
- package/build/pages/404.d.ts +1 -0
- package/build/pages/[slug]/index.d.ts +1 -0
- package/build/pages/account/addresses.d.ts +1 -0
- package/build/pages/account/favorite-products.d.ts +1 -0
- package/build/pages/account/forgot-password.d.ts +1 -0
- package/build/pages/account/index.d.ts +1 -0
- package/build/pages/account/login.d.ts +1 -0
- package/build/pages/account/orders/[id].d.ts +1 -0
- package/build/pages/account/orders/index.d.ts +1 -0
- package/build/pages/account/recover-password.d.ts +1 -0
- package/build/pages/account/register.d.ts +1 -0
- package/build/pages/cart.d.ts +1 -0
- package/build/pages/checkout/[id].d.ts +4 -0
- package/build/pages/home.d.ts +1 -0
- package/build/pages/pages/[slug].d.ts +1 -0
- package/build/pages/search.d.ts +1 -0
- package/build/store/base.d.ts +13 -0
- package/build/storefront/index.d.ts +18 -0
- package/build/utils/providers/page-data.d.ts +10 -0
- package/build/utils/settings.d.ts +142 -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/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,23 @@
|
|
|
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
|
+
export declare enum StorefrontStatus {
|
|
6
|
+
WAITING = "WAITING",
|
|
7
|
+
READY = "READY"
|
|
8
|
+
}
|
|
3
9
|
export declare class IkasStorefront {
|
|
4
10
|
id: string;
|
|
5
11
|
name: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
status: StorefrontStatus;
|
|
13
|
+
mainStorefrontThemeId: string | null;
|
|
14
|
+
emailSettingsId: string | null;
|
|
15
|
+
salesChannelId: string | null;
|
|
16
|
+
fbpId: string | null;
|
|
17
|
+
gtmId: string | null;
|
|
18
|
+
localizations: IkasStorefrontLocalization[];
|
|
19
|
+
routings: IkasStorefrontRouting[];
|
|
9
20
|
domains: IkasStorefrontDomain[];
|
|
10
|
-
|
|
21
|
+
themes: IkasStorefrontTheme[];
|
|
11
22
|
constructor(data?: Partial<IkasStorefront>);
|
|
12
23
|
}
|
|
@@ -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,12 @@
|
|
|
1
|
+
import { IkasTheme } from "../../../theme/index";
|
|
2
|
+
export declare class IkasStorefrontThemeLocalization {
|
|
3
|
+
id: string;
|
|
4
|
+
locale: string;
|
|
5
|
+
storefrontId: string;
|
|
6
|
+
storefrontThemeId: string;
|
|
7
|
+
themeJson: IkasTheme;
|
|
8
|
+
privacyPolicy: string | null;
|
|
9
|
+
returnPolicy: string | null;
|
|
10
|
+
termsOfService: string | null;
|
|
11
|
+
constructor(data: Partial<IkasStorefrontThemeLocalization>);
|
|
12
|
+
}
|
|
@@ -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;
|
package/build/pages/404.d.ts
CHANGED
package/build/pages/cart.d.ts
CHANGED
|
@@ -4,7 +4,11 @@ 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;
|
|
11
|
+
configJson: Record<string, any>;
|
|
8
12
|
};
|
|
9
13
|
declare const _default: React.FunctionComponent<Props>;
|
|
10
14
|
export default _default;
|
package/build/pages/home.d.ts
CHANGED
package/build/pages/search.d.ts
CHANGED
package/build/store/base.d.ts
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import { IkasCartStore } from "./cart";
|
|
2
2
|
import { IkasCustomerStore } from "./customer";
|
|
3
3
|
import { IkasThemePageType } from "../models/index";
|
|
4
|
+
import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
|
|
4
5
|
export declare class IkasBaseStore {
|
|
5
6
|
readonly customerStore: IkasCustomerStore;
|
|
6
7
|
readonly cartStore: IkasCartStore;
|
|
7
8
|
currentPageType?: IkasThemePageType | null;
|
|
9
|
+
localeOptions: IkasLocaleOption[];
|
|
10
|
+
showLocaleOptions: boolean;
|
|
11
|
+
private localeChecked;
|
|
8
12
|
constructor();
|
|
13
|
+
checkLocalization(): Promise<void>;
|
|
14
|
+
setLocalization(localeOption: IkasLocaleOption): void;
|
|
9
15
|
}
|
|
16
|
+
declare type IkasLocaleOption = {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly countryName?: string;
|
|
19
|
+
readonly routing: IkasStorefrontRouting;
|
|
20
|
+
readonly isRecommended: boolean;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -1,8 +1,26 @@
|
|
|
1
|
+
import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
|
|
1
2
|
import { IkasBaseStore } from "../store/index";
|
|
2
3
|
export declare class IkasStorefrontConfig {
|
|
3
4
|
static store: IkasBaseStore;
|
|
4
5
|
static components: any;
|
|
5
6
|
static config: Record<string, any>;
|
|
6
7
|
static apiUrlOverride: string | null;
|
|
8
|
+
static storefrontId?: string;
|
|
9
|
+
static storefrontRoutingId?: string;
|
|
10
|
+
static storefrontThemeId?: string;
|
|
11
|
+
static salesChannelId?: string;
|
|
12
|
+
static priceListId?: string;
|
|
13
|
+
static stockLocationIds?: string[];
|
|
14
|
+
static routings: IkasStorefrontRouting[];
|
|
7
15
|
static init(store: IkasBaseStore, components: any, config: Record<string, any>, apiUrlOverride?: string): void;
|
|
16
|
+
static initWithJson(json: Record<string, any>): void;
|
|
17
|
+
static getJson(): {
|
|
18
|
+
storefrontId: string | null;
|
|
19
|
+
storefrontRoutingId: string | null;
|
|
20
|
+
storefrontThemeId: string | null;
|
|
21
|
+
salesChannelId: string | null;
|
|
22
|
+
priceListId: string | null;
|
|
23
|
+
stockLocationIds: string[] | null;
|
|
24
|
+
routings: any;
|
|
25
|
+
};
|
|
8
26
|
}
|
|
@@ -17,9 +17,19 @@ export declare class IkasPageDataProvider {
|
|
|
17
17
|
get nextPageData(): {
|
|
18
18
|
props: {
|
|
19
19
|
propValuesStr: string;
|
|
20
|
+
pageSpecificDataStr: string;
|
|
20
21
|
page: IkasThemePage | null;
|
|
21
22
|
settingsStr: string;
|
|
22
23
|
merchantSettings: string | null;
|
|
24
|
+
configJson: {
|
|
25
|
+
storefrontId: string | undefined;
|
|
26
|
+
storefrontRoutingId: string | undefined;
|
|
27
|
+
storefrontThemeId: string | undefined;
|
|
28
|
+
salesChannelId: string | undefined;
|
|
29
|
+
priceListId: string | undefined;
|
|
30
|
+
stockLocationIds: string[] | undefined;
|
|
31
|
+
routings: import("../../models/data/storefront/routing/index").IkasStorefrontRouting[];
|
|
32
|
+
};
|
|
23
33
|
};
|
|
24
34
|
};
|
|
25
35
|
get specification(): IkasThemePageSpecification | undefined;
|
|
@@ -0,0 +1,142 @@
|
|
|
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
|
+
import { IkasStorefrontThemeLocalization } from "../models/data/storefront/theme-localization/index";
|
|
9
|
+
export declare class SettingsHelper {
|
|
10
|
+
static readLocalTheme(): Promise<IkasTheme>;
|
|
11
|
+
static readSettingsFile(): Promise<any>;
|
|
12
|
+
static getSettings(locale: string): Promise<SettingsData | null>;
|
|
13
|
+
static getPageData(context: GetStaticPropsContext<ParsedUrlQuery> | GetServerSidePropsContext<ParsedUrlQuery>, isServer: boolean, pageType?: IkasThemePageType): Promise<{
|
|
14
|
+
props: {
|
|
15
|
+
propValuesStr: string;
|
|
16
|
+
pageSpecificDataStr: string;
|
|
17
|
+
page: import("../models/index").IkasThemePage | null;
|
|
18
|
+
settingsStr: string;
|
|
19
|
+
merchantSettings: string | null;
|
|
20
|
+
configJson: {
|
|
21
|
+
storefrontId: string | null;
|
|
22
|
+
storefrontRoutingId: string | null;
|
|
23
|
+
storefrontThemeId: string | null;
|
|
24
|
+
salesChannelId: string | null;
|
|
25
|
+
priceListId: string | null;
|
|
26
|
+
stockLocationIds: string[] | null;
|
|
27
|
+
routings: any;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
} | {
|
|
31
|
+
props: {};
|
|
32
|
+
notFound: boolean;
|
|
33
|
+
revalidate?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
props: {
|
|
36
|
+
propValuesStr: string;
|
|
37
|
+
pageSpecificDataStr: string;
|
|
38
|
+
page: import("../models/index").IkasThemePage | null;
|
|
39
|
+
settingsStr: string;
|
|
40
|
+
merchantSettings: string | null;
|
|
41
|
+
configJson: {
|
|
42
|
+
storefrontId: string | null;
|
|
43
|
+
storefrontRoutingId: string | null;
|
|
44
|
+
storefrontThemeId: string | null;
|
|
45
|
+
salesChannelId: string | null;
|
|
46
|
+
priceListId: string | null;
|
|
47
|
+
stockLocationIds: string[] | null;
|
|
48
|
+
routings: any;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
revalidate: number;
|
|
52
|
+
notFound?: undefined;
|
|
53
|
+
}>;
|
|
54
|
+
static getStaticProps(context: GetStaticPropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType): Promise<{
|
|
55
|
+
props: {
|
|
56
|
+
propValuesStr: string;
|
|
57
|
+
pageSpecificDataStr: string;
|
|
58
|
+
page: import("../models/index").IkasThemePage | null;
|
|
59
|
+
settingsStr: string;
|
|
60
|
+
merchantSettings: string | null;
|
|
61
|
+
configJson: {
|
|
62
|
+
storefrontId: string | null;
|
|
63
|
+
storefrontRoutingId: string | null;
|
|
64
|
+
storefrontThemeId: string | null;
|
|
65
|
+
salesChannelId: string | null;
|
|
66
|
+
priceListId: string | null;
|
|
67
|
+
stockLocationIds: string[] | null;
|
|
68
|
+
routings: any;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
} | {
|
|
72
|
+
props: {};
|
|
73
|
+
notFound: boolean;
|
|
74
|
+
revalidate?: undefined;
|
|
75
|
+
} | {
|
|
76
|
+
props: {
|
|
77
|
+
propValuesStr: string;
|
|
78
|
+
pageSpecificDataStr: string;
|
|
79
|
+
page: import("../models/index").IkasThemePage | null;
|
|
80
|
+
settingsStr: string;
|
|
81
|
+
merchantSettings: string | null;
|
|
82
|
+
configJson: {
|
|
83
|
+
storefrontId: string | null;
|
|
84
|
+
storefrontRoutingId: string | null;
|
|
85
|
+
storefrontThemeId: string | null;
|
|
86
|
+
salesChannelId: string | null;
|
|
87
|
+
priceListId: string | null;
|
|
88
|
+
stockLocationIds: string[] | null;
|
|
89
|
+
routings: any;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
revalidate: number;
|
|
93
|
+
notFound?: undefined;
|
|
94
|
+
}>;
|
|
95
|
+
static getServerSideProps(context: GetServerSidePropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType): Promise<{
|
|
96
|
+
props: {
|
|
97
|
+
propValuesStr: string;
|
|
98
|
+
pageSpecificDataStr: string;
|
|
99
|
+
page: import("../models/index").IkasThemePage | null;
|
|
100
|
+
settingsStr: string;
|
|
101
|
+
merchantSettings: string | null;
|
|
102
|
+
configJson: {
|
|
103
|
+
storefrontId: string | null;
|
|
104
|
+
storefrontRoutingId: string | null;
|
|
105
|
+
storefrontThemeId: string | null;
|
|
106
|
+
salesChannelId: string | null;
|
|
107
|
+
priceListId: string | null;
|
|
108
|
+
stockLocationIds: string[] | null;
|
|
109
|
+
routings: any;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
} | {
|
|
113
|
+
props: {};
|
|
114
|
+
notFound: boolean;
|
|
115
|
+
revalidate?: undefined;
|
|
116
|
+
} | {
|
|
117
|
+
props: {
|
|
118
|
+
propValuesStr: string;
|
|
119
|
+
pageSpecificDataStr: string;
|
|
120
|
+
page: import("../models/index").IkasThemePage | null;
|
|
121
|
+
settingsStr: string;
|
|
122
|
+
merchantSettings: string | null;
|
|
123
|
+
configJson: {
|
|
124
|
+
storefrontId: string | null;
|
|
125
|
+
storefrontRoutingId: string | null;
|
|
126
|
+
storefrontThemeId: string | null;
|
|
127
|
+
salesChannelId: string | null;
|
|
128
|
+
priceListId: string | null;
|
|
129
|
+
stockLocationIds: string[] | null;
|
|
130
|
+
routings: any;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
revalidate: number;
|
|
134
|
+
notFound?: undefined;
|
|
135
|
+
}>;
|
|
136
|
+
}
|
|
137
|
+
export declare type SettingsData = {
|
|
138
|
+
storefront: IkasStorefront;
|
|
139
|
+
themeLocalization: IkasStorefrontThemeLocalization;
|
|
140
|
+
salesChannel: IkasSalesChannel;
|
|
141
|
+
routing: IkasStorefrontRouting;
|
|
142
|
+
};
|
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,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
|
-
}
|