@putiikkipalvelu/storefront-sdk 0.2.0 → 0.2.2

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/dist/index.d.ts CHANGED
@@ -573,42 +573,42 @@ interface PickupLocationOpeningHours {
573
573
  * Returned from Shipit API with merchant pricing added
574
574
  */
575
575
  interface PickupLocation {
576
- /** Unique location ID */
576
+ /** Unique location ID from Shipit */
577
577
  id: string;
578
+ /** Shipit service ID */
579
+ serviceId: string;
578
580
  /** Location name */
579
581
  name: string;
580
582
  /** Street address */
581
583
  address1: string;
582
- /** Postal code */
583
- zipcode: string;
584
584
  /** City */
585
585
  city: string;
586
+ /** Postal code */
587
+ zipcode: string;
586
588
  /** Country code (e.g., "FI") */
587
589
  countryCode: string;
588
- /** Shipit service ID */
589
- serviceId: string;
590
- /** Carrier name */
590
+ /** Carrier name (e.g., "Posti", "Matkahuolto") */
591
591
  carrier: string;
592
- /** Shipit price in cents (may be null) */
593
- price: number | null;
594
- /** Merchant's price in cents (from store settings) */
595
- merchantPrice: number | null;
596
592
  /** Carrier logo URL */
597
593
  carrierLogo: string;
598
- /** Structured opening hours */
599
- openingHours: PickupLocationOpeningHours | null;
600
- /** Raw opening hours string */
601
- openingHoursRaw: string | null;
602
594
  /** GPS latitude */
603
- latitude: number;
595
+ latitude?: number;
604
596
  /** GPS longitude */
605
- longitude: number;
597
+ longitude?: number;
606
598
  /** Distance from postal code in meters */
607
599
  distanceInMeters: number;
608
600
  /** Distance from postal code in kilometers */
609
601
  distanceInKilometers: number;
602
+ /** Location type */
603
+ type?: string;
604
+ /** Structured opening hours */
605
+ openingHours?: PickupLocationOpeningHours | null;
606
+ /** Raw opening hours string from Shipit */
607
+ openingHoursRaw?: string | null;
610
608
  /** Additional metadata */
611
- metadata: unknown | null;
609
+ metadata?: unknown | null;
610
+ /** Merchant's price in cents (from store settings) */
611
+ merchantPrice: number | null;
612
612
  }
613
613
  /**
614
614
  * Response from GET /shipment-methods
@@ -629,15 +629,49 @@ interface ShipmentMethodsWithLocationsResponse {
629
629
  }
630
630
 
631
631
  /**
632
- * Customer Types
632
+ * Order Types
633
633
  *
634
- * Types for customer authentication and account management API endpoints.
634
+ * Types for fetching order details from the Storefront API.
635
+ * These types represent the raw order data returned by GET /order/{id}.
636
+ *
637
+ * Note: These differ from CustomerOrder types in customer.ts which are
638
+ * transformed for customer order history display.
635
639
  */
636
640
  /**
637
- * Basic customer information returned from most customer endpoints
641
+ * Item type for order line items
638
642
  */
639
- interface Customer {
640
- /** Unique customer ID */
643
+ type ConfirmationItemType = "PRODUCT" | "VARIATION" | "SHIPPING";
644
+ /**
645
+ * A single line item in an order confirmation
646
+ * Represents raw data as stored in the database
647
+ */
648
+ interface ConfirmationOrderLineItem {
649
+ /** Unique line item ID */
650
+ id: string;
651
+ /** Parent order ID */
652
+ orderId: string;
653
+ /** Type of item: PRODUCT, VARIATION, or SHIPPING */
654
+ itemType: ConfirmationItemType;
655
+ /** Quantity ordered */
656
+ quantity: number;
657
+ /** Price per unit in cents */
658
+ price: number;
659
+ /** Total amount in cents (price * quantity) */
660
+ totalAmount: number;
661
+ /** Product or variation code (ID reference) */
662
+ productCode: string;
663
+ /** Display name of the item */
664
+ name: string;
665
+ /** VAT rate percentage */
666
+ vatRate: number;
667
+ /** Product images array */
668
+ images: string[];
669
+ }
670
+ /**
671
+ * Customer delivery information attached to an order
672
+ */
673
+ interface ConfirmationOrderCustomerData {
674
+ /** Customer data record ID */
641
675
  id: string;
642
676
  /** Customer's first name */
643
677
  firstName: string;
@@ -645,26 +679,97 @@ interface Customer {
645
679
  lastName: string;
646
680
  /** Customer's email address */
647
681
  email: string;
682
+ /** Customer's phone number */
683
+ phone: string | null;
684
+ /** Delivery street address */
685
+ address: string;
686
+ /** Delivery city */
687
+ city: string;
688
+ /** Delivery postal code */
689
+ postalCode: string;
648
690
  }
649
691
  /**
650
- * Extended customer information returned after registration
692
+ * Shipment method information attached to an order
693
+ * Includes tracking information when available
651
694
  */
652
- interface CustomerWithVerification extends Customer {
653
- /** Account creation timestamp */
654
- createdAt: string;
655
- /** Email verification token (for sending verification emails) */
656
- emailVerificationToken: string;
657
- /** Token expiration timestamp */
658
- emailVerificationExpiresAt: string;
695
+ interface ConfirmationOrderShipmentMethod {
696
+ /** Shipment method record ID */
697
+ id: string;
698
+ /** Carrier service ID (for Shipit integration) */
699
+ serviceId: string | null;
700
+ /** Shipment method display name */
701
+ name: string;
702
+ /** Description of the shipment method */
703
+ description: string | null;
704
+ /** Carrier logo URL */
705
+ logo: string | null;
706
+ /** Shipping price in cents */
707
+ price: number;
708
+ /** Parent order ID */
709
+ orderId: string;
710
+ /** VAT rate percentage */
711
+ vatRate: number | null;
712
+ /** Tracking number (when shipped) */
713
+ trackingNumber: string | null;
714
+ /** Array of tracking URLs */
715
+ trackingUrls: string[];
716
+ /** Shipit shipment number */
717
+ shipmentNumber: string | null;
718
+ /** Freight document URLs */
719
+ freightDoc: string[];
659
720
  }
660
721
  /**
661
- * Customer information returned after login
722
+ * Order status values (matches Prisma OrderStatus enum)
723
+ */
724
+ type OrderStatus = "PENDING" | "COMPLETED" | "CANCELLED" | "FAILED" | "PAID" | "SHIPPED" | "PARTIALLY_REFUNDED" | "REFUNDED";
725
+ /**
726
+ * Complete order information returned by GET /order/{id}
727
+ * Used for order confirmation pages and order detail views
662
728
  */
663
- interface CustomerWithEmailStatus extends Customer {
664
- /** Email verification timestamp (null if not verified) */
665
- emailVerified: string | null;
666
- /** Account creation timestamp */
729
+ interface Order {
730
+ /** Unique order ID */
731
+ id: string;
732
+ /** Store ID this order belongs to */
733
+ storeId: string;
734
+ /** Order creation timestamp */
667
735
  createdAt: string;
736
+ /** Total order amount in cents */
737
+ totalAmount: number;
738
+ /** Current order status */
739
+ status: OrderStatus;
740
+ /** Human-readable order number */
741
+ orderNumber: number;
742
+ /** Order line items (products, variations, shipping) */
743
+ OrderLineItems: ConfirmationOrderLineItem[];
744
+ /** Customer delivery information */
745
+ orderCustomerData: ConfirmationOrderCustomerData | null;
746
+ /** Shipment method with tracking info */
747
+ orderShipmentMethod: ConfirmationOrderShipmentMethod | null;
748
+ }
749
+
750
+ /**
751
+ * Customer Types
752
+ *
753
+ * Types for customer authentication and account management API endpoints.
754
+ */
755
+
756
+ /**
757
+ * Customer information returned from API endpoints.
758
+ * Some fields are optional depending on which endpoint is called.
759
+ */
760
+ interface Customer {
761
+ /** Unique customer ID */
762
+ id: string;
763
+ /** Customer's first name */
764
+ firstName: string;
765
+ /** Customer's last name */
766
+ lastName: string;
767
+ /** Customer's email address */
768
+ email: string;
769
+ /** Account creation timestamp (included in register, login, edit responses) */
770
+ createdAt?: string;
771
+ /** Email verification timestamp - null if not verified (only in login response) */
772
+ emailVerified?: string | null;
668
773
  }
669
774
  /**
670
775
  * Data required to register a new customer account
@@ -687,13 +792,14 @@ interface LoginOptions {
687
792
  cartId?: string;
688
793
  }
689
794
  /**
690
- * Response from successful registration
795
+ * Response from successful registration.
796
+ * Note: Verification email is sent server-side automatically.
691
797
  */
692
798
  interface RegisterResponse {
693
799
  /** Whether the operation was successful */
694
800
  success: true;
695
- /** Created customer with verification token */
696
- customer: CustomerWithVerification;
801
+ /** Created customer (verification email sent automatically) */
802
+ customer: Customer;
697
803
  /** Success message */
698
804
  message: string;
699
805
  }
@@ -703,8 +809,8 @@ interface RegisterResponse {
703
809
  interface LoginResponse {
704
810
  /** Whether the operation was successful */
705
811
  success: true;
706
- /** Authenticated customer data */
707
- customer: CustomerWithEmailStatus;
812
+ /** Authenticated customer data (includes emailVerified and createdAt) */
813
+ customer: Customer;
708
814
  /** Success message */
709
815
  message: string;
710
816
  /** Session token for authenticated requests */
@@ -753,13 +859,12 @@ interface VerifyEmailResponse {
753
859
  message: string;
754
860
  }
755
861
  /**
756
- * Response from resend verification email
862
+ * Response from resend verification email.
863
+ * Note: Verification email is sent server-side automatically.
757
864
  */
758
865
  interface ResendVerificationResponse {
759
866
  /** Whether the operation was successful */
760
867
  success: true;
761
- /** Updated customer with new verification token */
762
- customer: CustomerWithVerification;
763
868
  /** Success message */
764
869
  message: string;
765
870
  }
@@ -774,13 +879,6 @@ interface UpdateProfileData {
774
879
  /** Updated email address */
775
880
  email?: string;
776
881
  }
777
- /**
778
- * Extended customer info returned after profile update
779
- */
780
- interface CustomerWithCreatedAt extends Customer {
781
- /** Account creation timestamp */
782
- createdAt: string;
783
- }
784
882
  /**
785
883
  * Response from updating profile
786
884
  */
@@ -788,7 +886,7 @@ interface UpdateProfileResponse {
788
886
  /** Success message */
789
887
  message: string;
790
888
  /** Updated customer data */
791
- customer: CustomerWithCreatedAt;
889
+ customer: Customer;
792
890
  }
793
891
  /**
794
892
  * Response from deleting account
@@ -856,10 +954,7 @@ interface OrderShipmentMethod {
856
954
  /** Carrier logo URL */
857
955
  logo: string | null;
858
956
  }
859
- /**
860
- * Order status values
861
- */
862
- type OrderStatus = "PENDING" | "PROCESSING" | "SHIPPED" | "DELIVERED" | "CANCELLED" | "REFUNDED";
957
+
863
958
  /**
864
959
  * A customer order
865
960
  */
@@ -994,124 +1089,25 @@ interface RemoveFromWishlistResponse {
994
1089
  /** Success message */
995
1090
  message: string;
996
1091
  }
997
-
998
- /**
999
- * Order Types
1000
- *
1001
- * Types for fetching order details from the Storefront API.
1002
- * These types represent the raw order data returned by GET /order/{id}.
1003
- *
1004
- * Note: These differ from CustomerOrder types in customer.ts which are
1005
- * transformed for customer order history display.
1006
- */
1007
- /**
1008
- * Item type for order line items
1009
- */
1010
- type ConfirmationItemType = "PRODUCT" | "VARIATION" | "SHIPPING";
1011
- /**
1012
- * A single line item in an order confirmation
1013
- * Represents raw data as stored in the database
1014
- */
1015
- interface ConfirmationOrderLineItem {
1016
- /** Unique line item ID */
1017
- id: string;
1018
- /** Parent order ID */
1019
- orderId: string;
1020
- /** Type of item: PRODUCT, VARIATION, or SHIPPING */
1021
- itemType: ConfirmationItemType;
1022
- /** Quantity ordered */
1023
- quantity: number;
1024
- /** Price per unit in cents */
1025
- price: number;
1026
- /** Total amount in cents (price * quantity) */
1027
- totalAmount: number;
1028
- /** Product or variation code (ID reference) */
1029
- productCode: string;
1030
- /** Display name of the item */
1031
- name: string;
1032
- /** VAT rate percentage */
1033
- vatRate: number;
1034
- /** Product images array */
1035
- images: string[];
1036
- }
1037
1092
  /**
1038
- * Customer delivery information attached to an order
1093
+ * Response from forgot password request.
1094
+ * Always returns same response to prevent email enumeration.
1095
+ * Email with reset link is sent server-side (token never exposed to client).
1039
1096
  */
1040
- interface ConfirmationOrderCustomerData {
1041
- /** Customer data record ID */
1042
- id: string;
1043
- /** Customer's first name */
1044
- firstName: string;
1045
- /** Customer's last name */
1046
- lastName: string;
1047
- /** Customer's email address */
1048
- email: string;
1049
- /** Customer's phone number */
1050
- phone: string | null;
1051
- /** Delivery street address */
1052
- address: string;
1053
- /** Delivery city */
1054
- city: string;
1055
- /** Delivery postal code */
1056
- postalCode: string;
1057
- }
1058
- /**
1059
- * Shipment method information attached to an order
1060
- * Includes tracking information when available
1061
- */
1062
- interface ConfirmationOrderShipmentMethod {
1063
- /** Shipment method record ID */
1064
- id: string;
1065
- /** Carrier service ID (for Shipit integration) */
1066
- serviceId: string | null;
1067
- /** Shipment method display name */
1068
- name: string;
1069
- /** Description of the shipment method */
1070
- description: string | null;
1071
- /** Carrier logo URL */
1072
- logo: string | null;
1073
- /** Shipping price in cents */
1074
- price: number;
1075
- /** Parent order ID */
1076
- orderId: string;
1077
- /** VAT rate percentage */
1078
- vatRate: number | null;
1079
- /** Tracking number (when shipped) */
1080
- trackingNumber: string | null;
1081
- /** Array of tracking URLs */
1082
- trackingUrls: string[];
1083
- /** Shipit shipment number */
1084
- shipmentNumber: string | null;
1085
- /** Freight document URLs */
1086
- freightDoc: string[];
1097
+ interface ForgotPasswordResponse {
1098
+ /** Whether the operation was successful */
1099
+ success: true;
1100
+ /** Success message (same regardless of whether email exists) */
1101
+ message: string;
1087
1102
  }
1088
1103
  /**
1089
- * Order status values
1090
- */
1091
- type ConfirmationOrderStatus = "PENDING" | "PAID" | "SHIPPED" | "DELIVERED" | "CANCELLED" | "REFUNDED";
1092
- /**
1093
- * Complete order information returned by GET /order/{id}
1094
- * Used for order confirmation pages and order detail views
1104
+ * Response from successful password reset
1095
1105
  */
1096
- interface Order {
1097
- /** Unique order ID */
1098
- id: string;
1099
- /** Store ID this order belongs to */
1100
- storeId: string;
1101
- /** Order creation timestamp */
1102
- createdAt: string;
1103
- /** Total order amount in cents */
1104
- totalAmount: number;
1105
- /** Current order status */
1106
- status: ConfirmationOrderStatus;
1107
- /** Human-readable order number */
1108
- orderNumber: number;
1109
- /** Order line items (products, variations, shipping) */
1110
- OrderLineItems: ConfirmationOrderLineItem[];
1111
- /** Customer delivery information */
1112
- orderCustomerData: ConfirmationOrderCustomerData | null;
1113
- /** Shipment method with tracking info */
1114
- orderShipmentMethod: ConfirmationOrderShipmentMethod | null;
1106
+ interface ResetPasswordResponse {
1107
+ /** Whether the operation was successful */
1108
+ success: true;
1109
+ /** Success message */
1110
+ message: string;
1115
1111
  }
1116
1112
 
1117
1113
  /**
@@ -1774,11 +1770,12 @@ type ShippingResource = ReturnType<typeof createShippingResource>;
1774
1770
  declare function createCustomerResource(fetcher: Fetcher): {
1775
1771
  /**
1776
1772
  * Register a new customer account.
1777
- * After registration, the customer must verify their email before logging in.
1773
+ * A verification email is sent automatically by the server.
1774
+ * The customer must verify their email before logging in.
1778
1775
  *
1779
1776
  * @param data - Registration data (firstName, lastName, email, password)
1780
1777
  * @param fetchOptions - Fetch options
1781
- * @returns Created customer with verification token
1778
+ * @returns Created customer data and success message
1782
1779
  *
1783
1780
  * @example
1784
1781
  * ```typescript
@@ -1789,7 +1786,7 @@ declare function createCustomerResource(fetcher: Fetcher): {
1789
1786
  * password: 'securePassword123'
1790
1787
  * });
1791
1788
  *
1792
- * // Send verification email using customer.emailVerificationToken
1789
+ * // Verification email is sent automatically by the server
1793
1790
  * console.log('Account created:', message);
1794
1791
  * ```
1795
1792
  */
@@ -1887,24 +1884,77 @@ declare function createCustomerResource(fetcher: Fetcher): {
1887
1884
  */
1888
1885
  verifyEmail(token: string, fetchOptions?: FetchOptions): Promise<VerifyEmailResponse>;
1889
1886
  /**
1890
- * Resend the email verification token for an unverified customer.
1891
- * Generates a new token valid for 24 hours.
1887
+ * Resend the verification email for an unverified customer.
1888
+ * A new verification email is sent automatically by the server.
1892
1889
  *
1893
1890
  * @param customerId - The customer's ID (from failed login response)
1894
1891
  * @param fetchOptions - Fetch options
1895
- * @returns Updated customer with new verification token
1892
+ * @returns Success message
1896
1893
  * @throws ValidationError if customer is already verified or not found
1897
1894
  *
1898
1895
  * @example
1899
1896
  * ```typescript
1900
1897
  * // After login fails with requiresVerification
1901
- * const { customer } = await client.customer.resendVerification(customerId);
1898
+ * const { message } = await client.customer.resendVerification(customerId);
1902
1899
  *
1903
- * // Send new verification email using customer.emailVerificationToken
1904
- * await sendVerificationEmail(customer.email, customer.emailVerificationToken);
1900
+ * // Verification email is sent automatically by the server
1901
+ * console.log(message); // "Verification email sent."
1905
1902
  * ```
1906
1903
  */
1907
1904
  resendVerification(customerId: string, fetchOptions?: FetchOptions): Promise<ResendVerificationResponse>;
1905
+ /**
1906
+ * Request a password reset for a customer account.
1907
+ * The server sends a password reset email directly to the customer.
1908
+ * Returns success even if email doesn't exist (to prevent email enumeration).
1909
+ *
1910
+ * Note: The reset token is never exposed to the client for security.
1911
+ * The email is sent server-side with the reset link.
1912
+ *
1913
+ * @param email - Customer's email address
1914
+ * @param fetchOptions - Fetch options
1915
+ * @returns Generic success message (same whether email exists or not)
1916
+ *
1917
+ * @example
1918
+ * ```typescript
1919
+ * const response = await client.customer.forgotPassword('john@example.com');
1920
+ *
1921
+ * // Always show same message to user (email sent server-side)
1922
+ * console.log(response.message);
1923
+ * // "If an account exists with that email, password reset instructions have been sent."
1924
+ * ```
1925
+ */
1926
+ forgotPassword(email: string, fetchOptions?: FetchOptions): Promise<ForgotPasswordResponse>;
1927
+ /**
1928
+ * Reset a customer's password using a valid reset token.
1929
+ * The token is sent via email by the forgotPassword endpoint.
1930
+ * After successful reset, all existing sessions are invalidated.
1931
+ *
1932
+ * @param token - Password reset token (from email link)
1933
+ * @param password - New password (minimum 8 characters)
1934
+ * @param fetchOptions - Fetch options
1935
+ * @returns Success confirmation
1936
+ * @throws ValidationError if token is invalid or expired
1937
+ *
1938
+ * @example
1939
+ * ```typescript
1940
+ * // Token comes from the reset email link
1941
+ * const token = searchParams.get('token');
1942
+ *
1943
+ * try {
1944
+ * const { message } = await client.customer.resetPassword(token, newPassword);
1945
+ * console.log(message); // "Password reset successful..."
1946
+ *
1947
+ * // Redirect to login page
1948
+ * redirect('/login?reset=success');
1949
+ * } catch (error) {
1950
+ * if (error instanceof ValidationError) {
1951
+ * // Token invalid or expired
1952
+ * console.error('Please request a new password reset');
1953
+ * }
1954
+ * }
1955
+ * ```
1956
+ */
1957
+ resetPassword(token: string, password: string, fetchOptions?: FetchOptions): Promise<ResetPasswordResponse>;
1908
1958
  /**
1909
1959
  * Update the authenticated customer's profile.
1910
1960
  *
@@ -2250,10 +2300,6 @@ type CheckoutResource = ReturnType<typeof createCheckoutResource>;
2250
2300
  * The Storefront API client
2251
2301
  */
2252
2302
  interface StorefrontClient {
2253
- /**
2254
- * The configured API key (masked for security)
2255
- */
2256
- readonly apiKey: string;
2257
2303
  /**
2258
2304
  * The base URL for API requests
2259
2305
  */
@@ -2410,5 +2456,14 @@ declare class NotFoundError extends StorefrontError {
2410
2456
  declare class ValidationError extends StorefrontError {
2411
2457
  constructor(message?: string);
2412
2458
  }
2459
+ /**
2460
+ * Error thrown when login fails due to unverified email
2461
+ * Contains customerId for resending verification email
2462
+ */
2463
+ declare class VerificationRequiredError extends StorefrontError {
2464
+ readonly requiresVerification: true;
2465
+ readonly customerId: string;
2466
+ constructor(message: string, customerId: string);
2467
+ }
2413
2468
 
2414
- export { type AddToCartParams, type AddToWishlistResponse, AuthError, type BuyXPayYCampaign, type CalculatedCartItem, type Campaign, type CampaignType, type CartCalculationResult, type CartItem, type CartResponse, type CartSessionOptions, type CartValidationChanges, type CartValidationResponse, type Category, type CategoryReference, type CategoryResponse, type CheckoutCustomerData, type CheckoutErrorCode, type CheckoutErrorDetails, type CheckoutOptions, type CheckoutParams, type CheckoutShipmentMethod, type ConfirmationItemType, type ConfirmationOrderCustomerData, type ConfirmationOrderLineItem, type ConfirmationOrderShipmentMethod, type ConfirmationOrderStatus, type Customer, type CustomerOrder, type CustomerWithCreatedAt, type CustomerWithEmailStatus, type CustomerWithVerification, type DeleteAccountResponse, type FeatureFlags, type FetchOptions, type FreeShippingCampaign, type FreeShippingStatus, type GetOrdersResponse, type GetUserResponse, type LoginOptions, type LoginResponse, type LoginVerificationRequiredResponse, type LogoutResponse, NotFoundError, type Order, type OrderLineItem, type OrderProductInfo, type OrderShipmentMethod, type OrderStatus, type PaymentConfig, type PaytrailCheckoutResponse, type PaytrailGroup, type PaytrailProvider, type PickupLocation, type PickupLocationOpeningHours, type PriceInfo, type Product, type ProductCountResponse, type ProductDetail, type ProductListParams, type ProductListResponse, type ProductSortOption, type ProductVariation, type ProductVariationListing, RateLimitError, type RegisterData, type RegisterResponse, type RemoveFromCartParams, type RemoveFromWishlistResponse, type ResendVerificationResponse, type ShipitShippingMethod, type ShipmentMethod, type ShipmentMethodsResponse, type ShipmentMethodsWithLocationsResponse, type StoreConfig, type StoreInfo, type StoreSeo, type StorefrontClient, type StorefrontClientConfig, StorefrontError, type StripeCheckoutResponse, type UpdateCartQuantityParams, type UpdateProfileData, type UpdateProfileResponse, ValidationError, type VariationOption, type VerifyEmailResponse, type WishlistItem, type WishlistProduct, type WishlistResponse, type WishlistVariation, type WishlistVariationOption, calculateCartWithCampaigns, createStorefrontClient, getPriceInfo, isSaleActive };
2469
+ export { type AddToCartParams, type AddToWishlistResponse, AuthError, type BuyXPayYCampaign, type CalculatedCartItem, type Campaign, type CampaignType, type CartCalculationResult, type CartItem, type CartResponse, type CartSessionOptions, type CartValidationChanges, type CartValidationResponse, type Category, type CategoryReference, type CategoryResponse, type CheckoutCustomerData, type CheckoutErrorCode, type CheckoutErrorDetails, type CheckoutOptions, type CheckoutParams, type CheckoutShipmentMethod, type ConfirmationItemType, type ConfirmationOrderCustomerData, type ConfirmationOrderLineItem, type ConfirmationOrderShipmentMethod, type Customer, type CustomerOrder, type DeleteAccountResponse, type FeatureFlags, type FetchOptions, type ForgotPasswordResponse, type FreeShippingCampaign, type FreeShippingStatus, type GetOrdersResponse, type GetUserResponse, type LoginOptions, type LoginResponse, type LoginVerificationRequiredResponse, type LogoutResponse, NotFoundError, type Order, type OrderLineItem, type OrderProductInfo, type OrderShipmentMethod, type OrderStatus, type PaymentConfig, type PaytrailCheckoutResponse, type PaytrailGroup, type PaytrailProvider, type PickupLocation, type PriceInfo, type Product, type ProductCountResponse, type ProductDetail, type ProductListParams, type ProductListResponse, type ProductSortOption, type ProductVariation, type ProductVariationListing, RateLimitError, type RegisterData, type RegisterResponse, type RemoveFromCartParams, type RemoveFromWishlistResponse, type ResendVerificationResponse, type ResetPasswordResponse, type ShipitShippingMethod, type ShipmentMethod, type ShipmentMethodsResponse, type ShipmentMethodsWithLocationsResponse, type StoreConfig, type StoreInfo, type StoreSeo, type StorefrontClient, type StorefrontClientConfig, StorefrontError, type StripeCheckoutResponse, type UpdateCartQuantityParams, type UpdateProfileData, type UpdateProfileResponse, ValidationError, type VariationOption, VerificationRequiredError, type VerifyEmailResponse, type WishlistItem, type WishlistProduct, type WishlistResponse, type WishlistVariation, type WishlistVariationOption, calculateCartWithCampaigns, createStorefrontClient, getPriceInfo, isSaleActive };