@ikas/storefront 0.1.24-alpha.8 → 0.2.0-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 (31) hide show
  1. package/build/__generated__/global-types.d.ts +23 -0
  2. package/build/api/checkout/__generated__/getCheckoutById.d.ts +0 -4
  3. package/build/api/checkout/__generated__/listPaymentGateway.d.ts +1 -3
  4. package/build/api/checkout/index.d.ts +0 -1
  5. package/build/api/customer/__generated__/customerForgotPassword.d.ts +0 -1
  6. package/build/api/customer/__generated__/registerCustomer.d.ts +0 -1
  7. package/build/api/index.d.ts +1 -0
  8. package/build/api/product-option-set/__generated__/ListProductOptionSet.d.ts +90 -0
  9. package/build/api/product-option-set/index.d.ts +6 -0
  10. package/build/components/checkout/components/address-form/model.d.ts +0 -8
  11. package/build/components/checkout/model.d.ts +2 -2
  12. package/build/index.css +4 -9
  13. package/build/index.es.css +4 -9
  14. package/build/index.es.js +12000 -12122
  15. package/build/index.js +11996 -12110
  16. package/build/models/data/cart/index.d.ts +0 -1
  17. package/build/models/data/index.d.ts +1 -0
  18. package/build/models/data/order/address/index.d.ts +0 -2
  19. package/build/models/data/order/index.d.ts +2 -1
  20. package/build/models/data/order/line-item/index.d.ts +0 -1
  21. package/build/models/data/order-transaction/index.d.ts +0 -1
  22. package/build/models/data/payment-gateway/index.d.ts +0 -2
  23. package/build/models/data/product/index.d.ts +3 -0
  24. package/build/models/data/product/variant/price/index.d.ts +0 -1
  25. package/build/models/data/product-option-set/index.d.ts +85 -0
  26. package/build/models/data/simple-product/index.d.ts +1 -0
  27. package/build/store/cart.d.ts +0 -1
  28. package/build/store/customer.d.ts +0 -1
  29. package/build/utils/currency.d.ts +0 -6
  30. package/package.json +1 -1
  31. package/build/api/checkout/__generated__/addCouponCodeToCheckout.d.ts +0 -11
@@ -5,7 +5,6 @@ export declare class IkasCart {
5
5
  updatedAt: string;
6
6
  dueDate?: string | null;
7
7
  currencyCode: string;
8
- currencySymbol: string;
9
8
  customerId?: string | null;
10
9
  itemCount: number;
11
10
  items: IkasOrderLineItem[];
@@ -28,3 +28,4 @@ export type { IkasState } from "./state/index";
28
28
  export * from "./variant-type/index";
29
29
  export { IkasVariantValue } from "./variant-type/variant-value/index";
30
30
  export { IkasOrderTransaction, IkasTransactionStatusEnum, IkasTransactionTypeEnum, } from "./order-transaction/index";
31
+ export * from "./product-option-set/index";
@@ -29,8 +29,6 @@ declare type IkasOrderAddressLocation = {
29
29
  id?: string;
30
30
  name?: string;
31
31
  code?: string;
32
- iso2?: string;
33
- iso3?: string;
34
32
  };
35
33
  export declare type IkasOrderAddressCountry = IkasOrderAddressLocation;
36
34
  export declare type IkasOrderAddressCity = IkasOrderAddressLocation;
@@ -1,6 +1,7 @@
1
1
  import { IkasOrderAddress } from "./address/index";
2
2
  import { IkasOrderShippingLine } from "./shipping-line/index";
3
3
  import { IkasOrderLineItem } from "./line-item/index";
4
+ import { IkasCustomerStore } from "../../../store/customer";
4
5
  export declare class IkasOrder {
5
6
  id: string;
6
7
  orderNumber: string;
@@ -8,7 +9,6 @@ export declare class IkasOrder {
8
9
  totalPrice: number | null;
9
10
  totalFinalPrice: number | null;
10
11
  currencyCode: string;
11
- currencySymbol: string;
12
12
  orderedAt: number;
13
13
  cancelledAt: number | null;
14
14
  status: IkasOrderStatus;
@@ -25,6 +25,7 @@ export declare class IkasOrder {
25
25
  taxLines: IkasOrderTaxLine[] | null;
26
26
  orderPackages: IkasOrderPackage[] | null;
27
27
  currencyRates: IkasOrderCurrencyRate[] | null;
28
+ customerStore: IkasCustomerStore;
28
29
  private _refundSettings;
29
30
  constructor(data: IkasOrder);
30
31
  get refundableItems(): IkasOrderLineItem[];
@@ -7,7 +7,6 @@ export declare class IkasOrderLineItem {
7
7
  orderedAt: number;
8
8
  deleted: boolean;
9
9
  currencyCode: string;
10
- currencySymbol: string;
11
10
  discount?: IkasOrderLineDiscount | null;
12
11
  discountPrice?: number | null;
13
12
  finalPrice: number;
@@ -3,7 +3,6 @@ export declare class IkasOrderTransaction {
3
3
  checkoutId: string | null;
4
4
  createdAt: number | null;
5
5
  currencyCode: string | null;
6
- currencySymbol: string | null;
7
6
  customerId: string | null;
8
7
  error: IkasTransactionError | null;
9
8
  id: string | null;
@@ -11,8 +11,6 @@ export declare class IkasPaymentGateway {
11
11
  description: string | null;
12
12
  additionalPrices: IkasPaymentGatewayAdditionalPrice[] | null;
13
13
  translations: IkasPaymentGatewayTranslation[] | null;
14
- supportedCurrencies: string[];
15
- availableCountries: string[];
16
14
  constructor(data: Partial<IkasPaymentGateway>);
17
15
  getCalculatedAdditionalPrices(totalFinalPrice: number, shippingLines: IkasOrderShippingLine[] | null): {
18
16
  name: string;
@@ -5,6 +5,7 @@ import { IkasProductVariantType } from "./variant-type/index";
5
5
  import { IkasBrand } from "../brand/index";
6
6
  import { IkasHTMLMetaData } from "../html-meta-data/index";
7
7
  import { IkasProductTag } from "../product-tag/index";
8
+ import { IkasProductOptionSet } from "../product-option-set/index";
8
9
  export declare class IkasProduct {
9
10
  id: string;
10
11
  name: string;
@@ -18,6 +19,8 @@ export declare class IkasProduct {
18
19
  variants: IkasProductVariant[];
19
20
  attributes: IkasProductAttributeValue[];
20
21
  variantTypes: IkasProductVariantType[];
22
+ productOptionSetId?: string | null;
23
+ productOptionSet?: IkasProductOptionSet | null;
21
24
  constructor(data?: Partial<IkasProduct>);
22
25
  get hasVariant(): boolean;
23
26
  get mainVariantType(): import("../index").IkasVariantType | undefined;
@@ -2,7 +2,6 @@ export declare class IkasProductPrice {
2
2
  sellPrice: number;
3
3
  discountPrice: number | null;
4
4
  currency: string;
5
- currencySymbol: string;
6
5
  constructor(data?: Partial<IkasProductPrice>);
7
6
  get finalPrice(): number;
8
7
  get hasDiscount(): boolean;
@@ -0,0 +1,85 @@
1
+ import { IkasImage } from "../../../index";
2
+ export declare enum IkasProductOptionType {
3
+ CHOICE = "CHOICE",
4
+ TEXT = "TEXT",
5
+ TEXT_AREA = "TEXT_AREA",
6
+ IMAGE = "IMAGE",
7
+ FILE = "FILE",
8
+ COLOR_PICKER = "COLOR_PICKER",
9
+ CHECKBOX = "CHECKBOX"
10
+ }
11
+ export declare enum IkasProductOptionSelectType {
12
+ SELECT = "SELECT",
13
+ BOX = "BOX",
14
+ SWATCH = "SWATCH"
15
+ }
16
+ export declare class IkasProductOptionSelectValueTranslations {
17
+ id: string;
18
+ value: string | null;
19
+ constructor(data: Partial<IkasProductOptionSelectValueTranslations>);
20
+ }
21
+ export declare class IkasProductOptionTranslations {
22
+ id: string;
23
+ name: string | null;
24
+ optionalText: string | null;
25
+ values: IkasProductOptionSelectValueTranslations[] | null;
26
+ constructor(data: Partial<IkasProductOptionTranslations>);
27
+ }
28
+ export declare class IkasProductOptionSetTranslations {
29
+ locale: string;
30
+ options: IkasProductOptionTranslations[] | null;
31
+ constructor(data: Partial<IkasProductOptionSetTranslations>);
32
+ }
33
+ export declare class IkasProductOptionSelectValue {
34
+ order: number;
35
+ value: string;
36
+ price: number | null;
37
+ thumbnailImageId: string | null;
38
+ colorCode: string | null;
39
+ thumbnailImage?: IkasImage;
40
+ constructor(data?: Partial<IkasProductOptionSelectValue>);
41
+ }
42
+ export declare class IkasProductOptionSelectSettings {
43
+ type: IkasProductOptionSelectType;
44
+ minSelect: number | null;
45
+ maxSelect: number | null;
46
+ values: IkasProductOptionSelectValue[];
47
+ constructor(data?: Partial<IkasProductOptionSelectSettings>);
48
+ }
49
+ export declare class IkasProductOptionDateSettings {
50
+ min: Date | null;
51
+ max: Date | null;
52
+ constructor(data: Partial<IkasProductOptionDateSettings>);
53
+ }
54
+ export declare class IkasProductOptionTextSettings {
55
+ min: number | null;
56
+ max: number | null;
57
+ constructor(data?: Partial<IkasProductOptionTextSettings>);
58
+ }
59
+ export declare class IkasProductOptionFileSettings {
60
+ allowedExtensions: string[] | null;
61
+ minQuantity: number | null;
62
+ maxQuantity: number | null;
63
+ constructor(data: Partial<IkasProductOptionFileSettings>);
64
+ }
65
+ export declare class IkasProductOption {
66
+ name: string;
67
+ order: number;
68
+ type: IkasProductOptionType;
69
+ selectSettings: IkasProductOptionSelectSettings | null;
70
+ textSettings: IkasProductOptionTextSettings | null;
71
+ fileSettings: IkasProductOptionFileSettings | null;
72
+ dateSettings: IkasProductOptionDateSettings | null;
73
+ price: number | null;
74
+ isOptional: boolean | null;
75
+ optionalText: string | null;
76
+ requiredOptionId: string | null;
77
+ requiredOptionValueIds: string[] | null;
78
+ constructor(data: Partial<IkasProductOption>);
79
+ }
80
+ export declare class IkasProductOptionSet {
81
+ name: string;
82
+ options: IkasProductOption[];
83
+ translations: IkasProductOptionSetTranslations[] | null;
84
+ constructor(data: Partial<IkasProductOptionSet>);
85
+ }
@@ -17,6 +17,7 @@ export interface ISimpleProduct {
17
17
  tags?: ISimpleProductTag[] | null;
18
18
  brand?: ISimpleProductBrand | null;
19
19
  metaData?: ISimpleHTMLMetaData | null;
20
+ productOptionSetId?: string | null;
20
21
  }
21
22
  export interface ISimpleVariantType {
22
23
  id: string;
@@ -17,7 +17,6 @@ export declare class IkasCartStore {
17
17
  get checkoutUrl(): string | undefined;
18
18
  private getCart;
19
19
  private setCart;
20
- private beforeCartOperationCheck;
21
20
  addItem: (variant: IkasProductVariant, product: IkasProduct, initialQuantity?: number) => Promise<void>;
22
21
  changeItemQuantity: (item: IkasOrderLineItem, quantity: number) => Promise<void>;
23
22
  removeItem: (item: IkasOrderLineItem) => Promise<void>;
@@ -39,7 +39,6 @@ export declare class IkasCustomerStore {
39
39
  onCustomerConsentGrant: () => void;
40
40
  waitUntilInitialized: () => Promise<unknown>;
41
41
  private init;
42
- private routeChangeInit;
43
42
  private getCustomer;
44
43
  private refreshToken;
45
44
  private setCustomer;
@@ -1,7 +1 @@
1
- /**
2
- *
3
- * @param price Price to format
4
- * @param currency Code for the currency, USD, EUR, TRY, etc..
5
- */
6
1
  export declare const formatMoney: (price: number, currency: string) => string;
7
- export declare function getCurrencySymbol(currencyCode: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.1.24-alpha.8",
3
+ "version": "0.2.0-alpha.1",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",
@@ -1,11 +0,0 @@
1
- export interface addCouponCodeToCheckout_addCouponCodeToCheckout {
2
- __typename: "Checkout";
3
- id: string;
4
- }
5
- export interface addCouponCodeToCheckout {
6
- addCouponCodeToCheckout: addCouponCodeToCheckout_addCouponCodeToCheckout;
7
- }
8
- export interface addCouponCodeToCheckoutVariables {
9
- checkoutId: string;
10
- couponCode: string;
11
- }