@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.
Files changed (53) hide show
  1. package/build/__generated__/global-types.d.ts +22 -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/__generated__/getMyCountry.d.ts +3 -0
  8. package/build/api/country/__generated__/listCountry.d.ts +2 -0
  9. package/build/api/country/index.d.ts +2 -1
  10. package/build/api/index.d.ts +0 -2
  11. package/build/api/storefront/__generated__/getStorefront.d.ts +39 -10
  12. package/build/api/storefront/index.d.ts +1 -1
  13. package/build/components/checkout/index.d.ts +3 -0
  14. package/build/components/checkout/model.d.ts +4 -3
  15. package/build/index.es.js +728 -430
  16. package/build/index.js +730 -433
  17. package/build/models/data/cart/index.d.ts +9 -0
  18. package/build/models/data/country/index.d.ts +2 -0
  19. package/build/models/data/sales-channel/index.d.ts +12 -0
  20. package/build/models/data/storefront/{storefront-domain → domain}/index.d.ts +1 -0
  21. package/build/models/data/storefront/index.d.ts +17 -6
  22. package/build/models/data/storefront/localization/index.d.ts +7 -0
  23. package/build/models/data/storefront/routing/index.d.ts +9 -0
  24. package/build/models/data/storefront/theme/index.d.ts +13 -0
  25. package/build/models/data/storefront/theme-localization/index.d.ts +12 -0
  26. package/build/models/ui/product-list/index.d.ts +1 -1
  27. package/build/pages/404.d.ts +1 -0
  28. package/build/pages/[slug]/index.d.ts +1 -0
  29. package/build/pages/account/addresses.d.ts +1 -0
  30. package/build/pages/account/favorite-products.d.ts +1 -0
  31. package/build/pages/account/forgot-password.d.ts +1 -0
  32. package/build/pages/account/index.d.ts +1 -0
  33. package/build/pages/account/login.d.ts +1 -0
  34. package/build/pages/account/orders/[id].d.ts +1 -0
  35. package/build/pages/account/orders/index.d.ts +1 -0
  36. package/build/pages/account/recover-password.d.ts +1 -0
  37. package/build/pages/account/register.d.ts +1 -0
  38. package/build/pages/cart.d.ts +1 -0
  39. package/build/pages/checkout/[id].d.ts +4 -0
  40. package/build/pages/home.d.ts +1 -0
  41. package/build/pages/pages/[slug].d.ts +1 -0
  42. package/build/pages/search.d.ts +1 -0
  43. package/build/store/base.d.ts +13 -0
  44. package/build/storefront/index.d.ts +18 -0
  45. package/build/utils/providers/page-data.d.ts +10 -0
  46. package/build/utils/settings.d.ts +142 -0
  47. package/package.json +1 -1
  48. package/build/api/product-stock-location/__generated__/listProductStockLocation.d.ts +0 -13
  49. package/build/api/product-stock-location/index.d.ts +0 -4
  50. package/build/api/theme/index.d.ts +0 -4
  51. package/build/models/data/storefront/stockfront-location/index.d.ts +0 -5
  52. package/build/models/data/storefront/stockfront-route/index.d.ts +0 -5
  53. package/build/models/data/storefront/storefront-region/index.d.ts +0 -18
@@ -90,6 +90,7 @@ export declare enum OrderPackageFulfillStatusEnum {
90
90
  CANCEL_REJECTED = "CANCEL_REJECTED",
91
91
  CANCEL_REQUESTED = "CANCEL_REQUESTED",
92
92
  DELIVERED = "DELIVERED",
93
+ ERROR = "ERROR",
93
94
  FULFILLED = "FULFILLED",
94
95
  REFUNDED = "REFUNDED",
95
96
  REFUND_REJECTED = "REFUND_REJECTED",
@@ -137,6 +138,7 @@ export declare enum PaymentMethodEnum {
137
138
  CASH = "CASH",
138
139
  CASH_ON_DELIVERY = "CASH_ON_DELIVERY",
139
140
  CREDIT_CARD = "CREDIT_CARD",
141
+ CREDIT_CARD_ON_DELIVERY = "CREDIT_CARD_ON_DELIVERY",
140
142
  GIFT_CARD = "GIFT_CARD",
141
143
  MONEY_ORDER = "MONEY_ORDER",
142
144
  OTHER = "OTHER"
@@ -216,6 +218,20 @@ export declare enum SortByTypeEnum {
216
218
  DISCOUNT_RATIO = "DISCOUNT_RATIO",
217
219
  PRICE = "PRICE"
218
220
  }
221
+ /**
222
+ * StorefrontStatusTypes
223
+ */
224
+ export declare enum StorefrontStatusTypes {
225
+ READY = "READY",
226
+ WAITING = "WAITING"
227
+ }
228
+ /**
229
+ * StorefrontThemeStatus
230
+ */
231
+ export declare enum StorefrontThemeStatus {
232
+ READY = "READY",
233
+ WAITING = "WAITING"
234
+ }
219
235
  /**
220
236
  * Transaction Card Association Enum
221
237
  */
@@ -269,7 +285,6 @@ export interface CartLineVariantInput {
269
285
  export interface CheckStocksLineInput {
270
286
  productId: string;
271
287
  quantity: number;
272
- stockLocationId?: string | null;
273
288
  variantId: string;
274
289
  }
275
290
  export interface CheckoutCustomerInput {
@@ -415,6 +430,11 @@ export interface SaveItemToCartInput {
415
430
  cartId?: string | null;
416
431
  customerId?: string | null;
417
432
  item: CartLineItemInput;
433
+ priceListId?: string | null;
434
+ salesChannelId: string;
435
+ storefrontId: string;
436
+ storefrontRoutingId: string;
437
+ storefrontThemeId: string;
418
438
  }
419
439
  export interface SaveMyCustomerInput {
420
440
  addresses?: CustomerAddressInput[] | null;
@@ -423,6 +443,7 @@ export interface SaveMyCustomerInput {
423
443
  phone?: string | null;
424
444
  }
425
445
  export interface SearchInput {
446
+ brandId?: string | null;
426
447
  categoryIdList?: string[] | null;
427
448
  filterList?: SearchInputFilterListInput[] | null;
428
449
  order?: SearchInputOrderByInput[] | null;
@@ -51,6 +51,10 @@ export interface getCart_getCart {
51
51
  dueDate: any;
52
52
  id: string;
53
53
  itemCount: number;
54
+ salesChannelId: string;
55
+ storefrontId: string | null;
56
+ storefrontRoutingId: string | null;
57
+ storefrontThemeId: string | null;
54
58
  items: getCart_getCart_items[];
55
59
  merchantId: string;
56
60
  status: CartStatusEnum;
@@ -54,6 +54,10 @@ export interface saveItemToCart_saveItemToCart {
54
54
  merchantId: string;
55
55
  itemCount: number;
56
56
  totalPrice: number;
57
+ salesChannelId: string;
58
+ storefrontId: string | null;
59
+ storefrontRoutingId: string | null;
60
+ storefrontThemeId: string | null;
57
61
  items: saveItemToCart_saveItemToCart_items[];
58
62
  }
59
63
  export interface saveItemToCart {
@@ -1,18 +1,18 @@
1
1
  import { CheckStocksLineInput } from "../../../__generated__/global-types";
2
2
  export interface checkStocks_checkStocks_lines {
3
3
  __typename: "CheckStocksLineResponse";
4
- availableQuantity: number;
4
+ stockCount: number;
5
5
  isAvailable: boolean;
6
- stockLocationId: string | null;
7
6
  variantId: string;
8
7
  }
9
8
  export interface checkStocks_checkStocks {
10
9
  __typename: "CheckStocksResponse";
11
- lines: checkStocks_checkStocks_lines[] | null;
10
+ lines: checkStocks_checkStocks_lines[];
12
11
  }
13
12
  export interface checkStocks {
14
13
  checkStocks: checkStocks_checkStocks;
15
14
  }
16
15
  export interface checkStocksVariables {
17
16
  lines: CheckStocksLineInput[];
17
+ stockLocationIdList?: string[] | null;
18
18
  }
@@ -9,7 +9,7 @@ export declare class IkasCheckoutAPI {
9
9
  static createSaleTransactionWithCheckout(checkoutId: string, paymentGatewayId: string, paymentMethodDetail?: IkasPaymentMethodDetail): Promise<SaleTransactionTypes.createSaleTransactionWithCheckout_createSaleTransactionWithCheckout | undefined>;
10
10
  static listPaymentGateway(): Promise<IkasPaymentGateway[] | undefined>;
11
11
  static retrieveInstallmentInfo(input: IkasInstallmentInfoInput): Promise<IkasInstallmentInfo | undefined>;
12
- static checkStocks(lines: CheckStocksLineInput[]): Promise<CheckStocksTypes.checkStocks_checkStocks | undefined>;
12
+ static checkStocks(lines: CheckStocksLineInput[], stockLocationIdList: string[]): Promise<CheckStocksTypes.checkStocks_checkStocks | undefined>;
13
13
  }
14
14
  declare type CheckStocksLineInput = {
15
15
  quantity: number;
@@ -1,3 +1,6 @@
1
1
  export interface getAvailableShippingCountries {
2
2
  getAvailableShippingCountries: string[];
3
3
  }
4
+ export interface getAvailableShippingCountriesVariables {
5
+ storefrontId: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ export interface getMyCountry {
2
+ getMyCountry: string | null;
3
+ }
@@ -7,6 +7,8 @@ export interface listCountry_listCountry {
7
7
  __typename: "Country";
8
8
  id: string;
9
9
  name: string;
10
+ native: string | null;
11
+ iso2: string | null;
10
12
  iso3: string | null;
11
13
  phoneCode: string | null;
12
14
  locationTranslations: listCountry_listCountry_locationTranslations;
@@ -1,5 +1,6 @@
1
1
  import { IkasCountry } from "../../models/index";
2
2
  export declare class IkasCountryAPI {
3
3
  static listCountries(): Promise<IkasCountry[]>;
4
- static listShippingCountries(): Promise<string[]>;
4
+ static listShippingCountries(storefrontId: string): Promise<string[]>;
5
+ static getMyCountry(): Promise<string | null | undefined>;
5
6
  }
@@ -13,7 +13,5 @@ export { IkasProductAttributeAPI } from "./product-attribute/index";
13
13
  export { IkasFavoriteProductAPI } from "./favorite-product/index";
14
14
  export { IkasContactFormAPI } from "./contact-form/index";
15
15
  export { IkasStateAPI } from "./state/index";
16
- export { IkasStorefrontAPI } from "./storefront/index";
17
- export { IkasThemeAPI } from "./theme/index";
18
16
  export { IkasVariantTypeAPI } from "./variant-type/index";
19
17
  export { apollo } from "./apollo";
@@ -1,23 +1,52 @@
1
- export interface getStorefront_getStorefront_regions {
2
- __typename: "StorefrontRegion";
1
+ import { StorefrontStatusTypes, StorefrontThemeStatus } from "../../../__generated__/global-types";
2
+ export interface getStorefront_getStorefront_localizations {
3
+ __typename: "StorefrontLocalization";
4
+ createdAt: any | null;
3
5
  id: string;
6
+ isDefault: boolean;
4
7
  locale: string;
5
- privacyPolicy: string | null;
6
- returnPolicy: string | null;
7
- termsOfService: string | null;
8
+ name: string;
8
9
  }
9
- export interface getStorefront_getStorefront {
10
- __typename: "Storefront";
10
+ export interface getStorefront_getStorefront_routings {
11
+ __typename: "StorefrontRouting";
12
+ countryCodes: string[] | null;
13
+ createdAt: any | null;
14
+ domain: string | null;
15
+ id: string;
16
+ locale: string;
17
+ path: string | null;
18
+ priceListId: string | null;
19
+ updatedAt: any | null;
20
+ }
21
+ export interface getStorefront_getStorefront_themes {
22
+ __typename: "StorefrontTheme";
23
+ createdAt: any | null;
11
24
  id: string;
25
+ isMainTheme: boolean;
12
26
  name: string;
27
+ status: StorefrontThemeStatus;
13
28
  themeId: string;
14
29
  themeVersionId: string;
15
- userId: string;
16
- regions: getStorefront_getStorefront_regions[];
30
+ updatedAt: any | null;
31
+ }
32
+ export interface getStorefront_getStorefront {
33
+ __typename: "Storefront";
34
+ createdAt: any | null;
35
+ emailSettingsId: string | null;
36
+ fbpId: string | null;
37
+ gtmId: string | null;
38
+ id: string;
39
+ localizations: getStorefront_getStorefront_localizations[];
40
+ mainStorefrontThemeId: string | null;
41
+ name: string;
42
+ salesChannelId: string;
43
+ routings: getStorefront_getStorefront_routings[];
44
+ status: StorefrontStatusTypes;
45
+ themes: getStorefront_getStorefront_themes[];
17
46
  }
18
47
  export interface getStorefront {
19
48
  getStorefront: getStorefront_getStorefront;
20
49
  }
21
50
  export interface getStorefrontVariables {
22
- storefrontId: string;
51
+ id: string;
23
52
  }
@@ -1,4 +1,4 @@
1
1
  import { IkasStorefront } from "../../models/data/storefront/index";
2
2
  export declare class IkasStorefrontAPI {
3
- static getStorefront(storefrontId: string): Promise<IkasStorefront | undefined>;
3
+ static getStorefront(id: string): Promise<IkasStorefront | undefined>;
4
4
  }
@@ -4,6 +4,9 @@ import { ParsedUrlQuery } from "querystring";
4
4
  import { IkasCheckout } from "../../models/index";
5
5
  declare type Props = {
6
6
  checkout: IkasCheckout;
7
+ returnPolicy: string;
8
+ privacyPolicy: string;
9
+ termsOfService: string;
7
10
  queryParams: ParsedUrlQuery;
8
11
  };
9
12
  export declare const IkasCheckoutPage: React.FC<Props>;
@@ -27,11 +27,13 @@ export default class CheckoutViewModel {
27
27
  shippingCountryIds?: string[] | null;
28
28
  selectedShippingAddressId?: string;
29
29
  selectedBillingAddressId?: string;
30
+ returnPolicy: string;
31
+ privacyPolicy: string;
32
+ termsOfService: string;
30
33
  error?: CheckoutError | null;
31
- constructor(checkout: IkasCheckout, queryParams: ParsedUrlQuery, router: NextRouter);
34
+ constructor(checkout: IkasCheckout, queryParams: ParsedUrlQuery, router: NextRouter, returnPolicy: string, privacyPolicy: string, termsOfService: string);
32
35
  init: (queryParams: ParsedUrlQuery) => Promise<void>;
33
36
  get cart(): import("../../models/data/cart/index").IkasCart | null | undefined;
34
- get storefrontRegion(): import("../../models/data/storefront/storefront-region/index").IkasStorefrontRegion | undefined;
35
37
  get selectedPaymentGatewayIndex(): number;
36
38
  get selectedInstallmentIndex(): number;
37
39
  get checkoutUrl(): string;
@@ -51,7 +53,6 @@ export default class CheckoutViewModel {
51
53
  initialStockCheck: () => Promise<void>;
52
54
  listPaymentGateways: () => Promise<void>;
53
55
  retrieveInstallmentInfo: (input: IkasInstallmentInfoInput) => Promise<void>;
54
- getStorefront: () => Promise<void>;
55
56
  createCustomer: () => void;
56
57
  createShippingAddress: () => void;
57
58
  createBillingAddress: () => void;