@ikas/storefront 0.0.158 → 0.0.160-alpha.1

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 +44 -0
  2. package/build/api/checkout/__generated__/listPaymentGateway.d.ts +9 -1
  3. package/build/api/country/__generated__/listCountry.d.ts +1 -0
  4. package/build/api/country/index.d.ts +1 -1
  5. package/build/api/customer/__generated__/customerLogin.d.ts +2 -1
  6. package/build/api/customer/__generated__/getLastViewedProducts.d.ts +15 -0
  7. package/build/api/customer/__generated__/saveLastViewedProducts.d.ts +11 -0
  8. package/build/api/customer/index.d.ts +13 -1
  9. package/build/components/checkout/components/address-form/index.d.ts +3 -0
  10. package/build/components/checkout/components/address-form/model.d.ts +9 -0
  11. package/build/components/checkout/components/form-item/model.d.ts +7 -0
  12. package/build/components/checkout/model.d.ts +1 -0
  13. package/build/index.es.js +1615 -663
  14. package/build/index.js +1615 -662
  15. package/build/models/data/category/index.d.ts +5 -0
  16. package/build/models/data/checkout/index.d.ts +3 -0
  17. package/build/models/data/index.d.ts +1 -1
  18. package/build/models/data/order/line-item/index.d.ts +1 -0
  19. package/build/models/data/payment-gateway/index.d.ts +25 -2
  20. package/build/models/data/product/attribute-value/index.d.ts +4 -0
  21. package/build/models/theme/component/prop/index.d.ts +5 -1
  22. package/build/models/theme/custom-data/index.d.ts +10 -0
  23. package/build/models/theme/page/component/prop-value/attribute-list.d.ts +7 -0
  24. package/build/models/ui/product-list/index.d.ts +8 -5
  25. package/build/store/base.d.ts +0 -1
  26. package/build/store/customer.d.ts +19 -6
  27. package/build/utils/helper.d.ts +1 -0
  28. package/build/utils/providers/page-data.d.ts +7 -1
  29. package/build/utils/providers/prop-value/attribute-list.d.ts +9 -0
  30. package/build/utils/providers/prop-value/boolean.d.ts +1 -1
  31. package/build/utils/providers/prop-value/custom.d.ts +4 -0
  32. package/package.json +1 -1
@@ -73,6 +73,14 @@ export declare enum CustomerAccountStatusesEnum {
73
73
  DISABLED_ACCOUNT = "DISABLED_ACCOUNT",
74
74
  INVITED_TO_CREATE_ACCOUNT = "INVITED_TO_CREATE_ACCOUNT"
75
75
  }
76
+ /**
77
+ * Customer Email Subscription Statuses
78
+ */
79
+ export declare enum CustomerEmailSubscriptionStatusesEnum {
80
+ NOT_SUBSCRIBED = "NOT_SUBSCRIBED",
81
+ PENDING_CONFIRMATION = "PENDING_CONFIRMATION",
82
+ SUBSCRIBED = "SUBSCRIBED"
83
+ }
76
84
  /**
77
85
  * Url Slug Target Type Enum Codes
78
86
  */
@@ -147,6 +155,20 @@ export declare enum OrderStatusEnum {
147
155
  REFUND_REJECTED = "REFUND_REJECTED",
148
156
  REFUND_REQUESTED = "REFUND_REQUESTED"
149
157
  }
158
+ /**
159
+ * Payment Gateway Additional Price Type Enum
160
+ */
161
+ export declare enum PaymentGatewayAdditionalPriceTypeEnum {
162
+ DECREMENT = "DECREMENT",
163
+ INCREMENT = "INCREMENT"
164
+ }
165
+ /**
166
+ * Payment Gateway Transaction Fee Type Enum
167
+ */
168
+ export declare enum PaymentGatewayTransactionFeeTypeEnum {
169
+ AMOUNT = "AMOUNT",
170
+ RATIO = "RATIO"
171
+ }
150
172
  /**
151
173
  * Payment Method Enum
152
174
  */
@@ -213,6 +235,11 @@ export declare enum ProductFilterTypeEnum {
213
235
  TAG = "TAG",
214
236
  VARIANT_TYPE = "VARIANT_TYPE"
215
237
  }
238
+ export declare enum ProductSearchShowStockOptionEnum {
239
+ HIDE_OUT_OF_STOCK = "HIDE_OUT_OF_STOCK",
240
+ SHOW_ALL = "SHOW_ALL",
241
+ SHOW_OUT_OF_STOCK_AT_END = "SHOW_OUT_OF_STOCK_AT_END"
242
+ }
216
243
  /**
217
244
  * Shipping Method Enum
218
245
  */
@@ -446,6 +473,22 @@ export interface PaymentMethodDetailInput {
446
473
  installmentCount: number;
447
474
  threeDSecure: boolean;
448
475
  }
476
+ export interface ProductItemInput {
477
+ createdAt?: any | null;
478
+ deleted?: boolean | null;
479
+ id?: string | null;
480
+ productId: string;
481
+ updatedAt?: any | null;
482
+ variantId: string;
483
+ }
484
+ export interface ProductLastViewedInput {
485
+ createdAt?: any | null;
486
+ customerId: string;
487
+ deleted?: boolean | null;
488
+ id?: string | null;
489
+ products: ProductItemInput[];
490
+ updatedAt?: any | null;
491
+ }
449
492
  export interface RetrieveInstallmentInfoInput {
450
493
  binNumber: string;
451
494
  paymentGatewayId: string;
@@ -494,6 +537,7 @@ export interface SearchInput {
494
537
  productIdList?: string[] | null;
495
538
  query?: string | null;
496
539
  salesChannelId?: string | null;
540
+ showStockOption?: ProductSearchShowStockOptionEnum | null;
497
541
  slug?: string | null;
498
542
  }
499
543
  export interface SearchInputFilterListInput {
@@ -1,9 +1,16 @@
1
- import { StringFilterInput, PaymentMethodEnum } from "../../../__generated__/global-types";
1
+ import { StringFilterInput, PaymentMethodEnum, PaymentGatewayTransactionFeeTypeEnum, PaymentGatewayAdditionalPriceTypeEnum } from "../../../__generated__/global-types";
2
2
  export interface listPaymentGateway_listPaymentGateway_paymentMethods {
3
3
  __typename: "PaymentGatewayPaymentMethod";
4
4
  name: string;
5
5
  logoUrl: string | null;
6
6
  }
7
+ export interface listPaymentGateway_listPaymentGateway_additionalPrices {
8
+ __typename: "AdditionalPrice";
9
+ amount: number;
10
+ amountType: PaymentGatewayTransactionFeeTypeEnum;
11
+ name: string;
12
+ type: PaymentGatewayAdditionalPriceTypeEnum;
13
+ }
7
14
  export interface listPaymentGateway_listPaymentGateway {
8
15
  __typename: "PaymentGateway";
9
16
  paymentMethods: listPaymentGateway_listPaymentGateway_paymentMethods[];
@@ -12,6 +19,7 @@ export interface listPaymentGateway_listPaymentGateway {
12
19
  name: string;
13
20
  description: string | null;
14
21
  testMode: boolean | null;
22
+ additionalPrices: listPaymentGateway_listPaymentGateway_additionalPrices[] | null;
15
23
  }
16
24
  export interface listPaymentGateway {
17
25
  listPaymentGateway: listPaymentGateway_listPaymentGateway[];
@@ -19,4 +19,5 @@ export interface listCountry {
19
19
  }
20
20
  export interface listCountryVariables {
21
21
  iso2?: StringFilterInput | null;
22
+ id?: StringFilterInput | null;
22
23
  }
@@ -1,6 +1,6 @@
1
1
  import { IkasCountry } from "../../models/index";
2
2
  export declare class IkasCountryAPI {
3
- static listCountries(iso2List?: string[]): Promise<IkasCountry[]>;
3
+ static listCountries(iso2List?: string[], idList?: string[]): Promise<IkasCountry[]>;
4
4
  static listShippingCountries(salesChannelId: string): Promise<string[]>;
5
5
  static getMyCountry(): Promise<string | null | undefined>;
6
6
  }
@@ -1,4 +1,4 @@
1
- import { CustomerAccountStatusesEnum } from "../../../__generated__/global-types";
1
+ import { CustomerAccountStatusesEnum, CustomerEmailSubscriptionStatusesEnum } from "../../../__generated__/global-types";
2
2
  export interface customerLogin_customerLogin_customer_addresses_city {
3
3
  __typename: "CustomerAddressCity";
4
4
  code: string | null;
@@ -53,6 +53,7 @@ export interface customerLogin_customerLogin_customer {
53
53
  accountStatus: CustomerAccountStatusesEnum | null;
54
54
  email: string | null;
55
55
  firstName: string;
56
+ subscriptionStatus: CustomerEmailSubscriptionStatusesEnum | null;
56
57
  }
57
58
  export interface customerLogin_customerLogin {
58
59
  __typename: "CustomerLoginResponse";
@@ -0,0 +1,15 @@
1
+ export interface getLastViewedProducts_getLastViewedProducts_products {
2
+ __typename: "ProductItem";
3
+ productId: string;
4
+ variantId: string;
5
+ }
6
+ export interface getLastViewedProducts_getLastViewedProducts {
7
+ __typename: "ProductLastViewed";
8
+ products: getLastViewedProducts_getLastViewedProducts_products[];
9
+ }
10
+ export interface getLastViewedProducts {
11
+ getLastViewedProducts: getLastViewedProducts_getLastViewedProducts;
12
+ }
13
+ export interface getLastViewedProductsVariables {
14
+ customerId?: string | null;
15
+ }
@@ -0,0 +1,11 @@
1
+ import { ProductLastViewedInput } from "../../../__generated__/global-types";
2
+ export interface saveLastViewedProducts_saveLastViewedProducts {
3
+ __typename: "ProductLastViewed";
4
+ id: string;
5
+ }
6
+ export interface saveLastViewedProducts {
7
+ saveLastViewedProducts: saveLastViewedProducts_saveLastViewedProducts;
8
+ }
9
+ export interface saveLastViewedProductsVariables {
10
+ input: ProductLastViewedInput;
11
+ }
@@ -1,6 +1,7 @@
1
1
  import { IkasCustomer, IkasOrder } from "../../models/index";
2
- import * as RefreshTokenTypes from "./__generated__/customerRefreshToken";
3
2
  import { IkasRefund } from "../../models/data/order/refund/index";
3
+ import * as RefreshTokenTypes from "./__generated__/customerRefreshToken";
4
+ import * as GetLastViewedProductsTypes from "./__generated__/getLastViewedProducts";
4
5
  export declare class IkasCustomerAPI {
5
6
  static login(email: string, password: string): Promise<{
6
7
  customer: IkasCustomer;
@@ -28,4 +29,15 @@ export declare class IkasCustomerAPI {
28
29
  }): Promise<any>;
29
30
  static saveIkasOrderRefund(input: IkasRefund): Promise<IkasOrder | undefined>;
30
31
  static createCustomerEmailSubscription(email: string): Promise<boolean>;
32
+ static getLastViewedProducts(customerId: string): Promise<GetLastViewedProductsTypes.getLastViewedProducts_getLastViewedProducts_products[]>;
33
+ static saveLastViewedProducts(input: LastViewedProductInput): Promise<boolean>;
31
34
  }
35
+ declare type LastViewedProduct = {
36
+ productId: string;
37
+ variantId: string;
38
+ };
39
+ declare type LastViewedProductInput = {
40
+ customerId: string;
41
+ products: LastViewedProduct[];
42
+ };
43
+ export {};
@@ -1,12 +1,15 @@
1
1
  import * as React from "react";
2
2
  import { IkasOrderAddress, IkasAddressValidationResult } from "../../../../models/data/order/address/index";
3
3
  import { IkasCheckoutCustomer } from "../../../../models/index";
4
+ import CheckoutViewModel from "../../model";
4
5
  declare type Props = {
6
+ vm: CheckoutViewModel;
5
7
  address: IkasOrderAddress;
6
8
  allowedCountryIds?: string[];
7
9
  customer?: IkasCheckoutCustomer;
8
10
  isErrorsVisible: boolean;
9
11
  validationResult: IkasAddressValidationResult;
12
+ isBilling?: boolean;
10
13
  };
11
14
  export declare const AddressForm: React.FC<Props>;
12
15
  export {};
@@ -1,6 +1,8 @@
1
1
  import { IkasOrderAddress } from "../../../../models/data/order/address/index";
2
2
  import { IkasCountry, IkasState, IkasCity, IkasDistrict, IkasCheckoutCustomer } from "../../../../models/index";
3
+ import CheckoutViewModel from "../../model";
3
4
  export default class AddressFormViewModel {
5
+ vm: CheckoutViewModel;
4
6
  address: IkasOrderAddress;
5
7
  customer?: IkasCheckoutCustomer | null;
6
8
  countries: IkasCountry[];
@@ -8,6 +10,7 @@ export default class AddressFormViewModel {
8
10
  cities: IkasCity[];
9
11
  districts: IkasDistrict[];
10
12
  allowedCountryIds?: string[] | null;
13
+ isCorporate: boolean;
11
14
  constructor(data: AddressFormViewModelParams);
12
15
  get firstName(): string | null | undefined;
13
16
  get lastName(): string | null | undefined;
@@ -71,8 +74,14 @@ export default class AddressFormViewModel {
71
74
  onCityChange: (cityId: string) => void;
72
75
  onDistrictChange: (districtId: string) => void;
73
76
  onDistrictInputChange: (value: string) => void;
77
+ onCorporateChange: (value: boolean) => void;
78
+ onCompanyChange: (value: string) => void;
79
+ onTaxNumberChange: (value: string) => void;
80
+ onTaxOfficeChange: (value: string) => void;
74
81
  }
75
82
  interface AddressFormViewModelParams extends Partial<AddressFormViewModel> {
83
+ vm: CheckoutViewModel;
76
84
  address: IkasOrderAddress;
85
+ isCorporate?: boolean;
77
86
  }
78
87
  export {};
@@ -1,5 +1,6 @@
1
1
  export default class FormItemViewModel implements Props {
2
2
  type: FormItemType;
3
+ inputType?: FormItemInputType;
3
4
  options?: FormItemSelectOption[];
4
5
  label: string;
5
6
  value?: string;
@@ -16,6 +17,7 @@ export default class FormItemViewModel implements Props {
16
17
  }
17
18
  export interface Props {
18
19
  type: FormItemType;
20
+ inputType?: FormItemInputType;
19
21
  options?: FormItemSelectOption[];
20
22
  label: string;
21
23
  value?: string;
@@ -34,3 +36,8 @@ export declare type FormItemSelectOption = {
34
36
  value: string;
35
37
  label: string;
36
38
  };
39
+ export declare enum FormItemInputType {
40
+ NUMERIC = "numeric",
41
+ TEL = "tel",
42
+ EMAIL = "email"
43
+ }
@@ -49,6 +49,7 @@ export default class CheckoutViewModel {
49
49
  }[];
50
50
  get installmentPrice(): number | null | undefined;
51
51
  get installmentExtraPrice(): number | undefined;
52
+ get finalPrice(): number;
52
53
  get canProceedToShipping(): boolean;
53
54
  get canProceedToPayment(): boolean;
54
55
  get canPerformPayment(): boolean | undefined;