@basedone/core 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.
@@ -1093,6 +1093,73 @@ interface CustomerSummary {
1093
1093
  /** First order date */
1094
1094
  firstOrderDate?: string;
1095
1095
  }
1096
+ /**
1097
+ * Flash sale item entity
1098
+ */
1099
+ interface FlashSaleItem {
1100
+ /** Item ID */
1101
+ id: string;
1102
+ /** Product ID */
1103
+ productId: string;
1104
+ /** Sale price in USDC */
1105
+ salePrice: string;
1106
+ /** Original price in USDC */
1107
+ originalPrice: string;
1108
+ /** Discount percentage */
1109
+ discountPercent: number;
1110
+ /** Maximum quantity available at this price */
1111
+ maxQuantity: number | null;
1112
+ /** Quantity sold at flash price */
1113
+ soldQuantity: number;
1114
+ /** Remaining quantity */
1115
+ remainingQuantity: number | null;
1116
+ /** Limit per customer */
1117
+ limitPerCustomer: number | null;
1118
+ /** Product details */
1119
+ product: {
1120
+ id: string;
1121
+ title: string;
1122
+ description?: string | null;
1123
+ images: string[];
1124
+ priceUSDC: string;
1125
+ inventory: number | null;
1126
+ soldCount: number;
1127
+ averageRating: number | null;
1128
+ reviewCount: number;
1129
+ merchant?: {
1130
+ id: string;
1131
+ name: string;
1132
+ };
1133
+ };
1134
+ }
1135
+ /**
1136
+ * Flash sale entity
1137
+ */
1138
+ interface FlashSale {
1139
+ /** Flash sale ID */
1140
+ id: string;
1141
+ /** Sale name */
1142
+ name: string;
1143
+ /** Description */
1144
+ description?: string | null;
1145
+ /** Start timestamp */
1146
+ startsAt: string;
1147
+ /** End timestamp */
1148
+ endsAt: string;
1149
+ /** Badge text (e.g., "Mall", "Hot Deal") */
1150
+ badgeText?: string | null;
1151
+ /** Badge color (hex) */
1152
+ badgeColor?: string | null;
1153
+ /** Priority (higher = shown first) */
1154
+ priority: number;
1155
+ /** Merchant information */
1156
+ merchant?: {
1157
+ id: string;
1158
+ name: string;
1159
+ } | null;
1160
+ /** Flash sale items */
1161
+ items: FlashSaleItem[];
1162
+ }
1096
1163
 
1097
1164
  /**
1098
1165
  * Ecommerce API Request Types
@@ -1570,6 +1637,80 @@ interface ListActiveBannersParams {
1570
1637
  /** Filter by merchant ID */
1571
1638
  merchantId?: string;
1572
1639
  }
1640
+ /**
1641
+ * List active flash sales params
1642
+ */
1643
+ interface ListActiveFlashSalesParams {
1644
+ /** Maximum number of flash sales to return */
1645
+ limit?: number;
1646
+ /** Filter by merchant ID */
1647
+ merchantId?: string;
1648
+ }
1649
+ /**
1650
+ * Flash sale item input
1651
+ */
1652
+ interface FlashSaleItemInput {
1653
+ /** Product ID */
1654
+ productId: string;
1655
+ /** Sale price in USDC */
1656
+ salePrice: number;
1657
+ /** Maximum quantity available */
1658
+ maxQuantity?: number | null;
1659
+ /** Limit per customer */
1660
+ limitPerCustomer?: number;
1661
+ /** Sort order */
1662
+ sortOrder?: number;
1663
+ }
1664
+ /**
1665
+ * Create flash sale request
1666
+ */
1667
+ interface CreateFlashSaleRequest {
1668
+ /** Sale name */
1669
+ name: string;
1670
+ /** Description */
1671
+ description?: string | null;
1672
+ /** Start timestamp */
1673
+ startsAt: string;
1674
+ /** End timestamp */
1675
+ endsAt: string;
1676
+ /** Badge text */
1677
+ badgeText?: string;
1678
+ /** Badge color (hex) */
1679
+ badgeColor?: string;
1680
+ /** Priority (higher = shown first) */
1681
+ priority?: number;
1682
+ /** Is active */
1683
+ isActive?: boolean;
1684
+ /** Flash sale items */
1685
+ items?: FlashSaleItemInput[];
1686
+ }
1687
+ /**
1688
+ * Update flash sale request
1689
+ */
1690
+ interface UpdateFlashSaleRequest extends Partial<CreateFlashSaleRequest> {
1691
+ }
1692
+ /**
1693
+ * List merchant products params
1694
+ */
1695
+ interface ListMerchantProductsParams extends PaginationParams {
1696
+ /** Search query */
1697
+ search?: string;
1698
+ /** Filter by category slug */
1699
+ category?: string;
1700
+ /** Minimum price */
1701
+ minPrice?: number;
1702
+ /** Maximum price */
1703
+ maxPrice?: number;
1704
+ /** Sort by: popular, latest, top_sales, price_asc, price_desc, rating */
1705
+ sortBy?: "popular" | "latest" | "top_sales" | "price_asc" | "price_desc" | "rating";
1706
+ }
1707
+ /**
1708
+ * List followed merchants params
1709
+ */
1710
+ interface ListFollowingParams extends PaginationParams {
1711
+ /** Sort by: recent (default) or name */
1712
+ sortBy?: "recent" | "name";
1713
+ }
1573
1714
 
1574
1715
  /**
1575
1716
  * Ecommerce API Response Types
@@ -1868,6 +2009,96 @@ interface MerchantProfileResponse {
1868
2009
  /** Merchant */
1869
2010
  merchant: Merchant;
1870
2011
  }
2012
+ /**
2013
+ * Public merchant profile (for storefront)
2014
+ */
2015
+ interface PublicMerchantProfile {
2016
+ /** Merchant ID */
2017
+ id: string;
2018
+ /** Merchant name */
2019
+ name: string;
2020
+ /** Description */
2021
+ description: string | null;
2022
+ /** Created at */
2023
+ createdAt: string;
2024
+ /** Number of active products */
2025
+ productCount: number;
2026
+ /** Total orders */
2027
+ orderCount: number;
2028
+ /** Average rating */
2029
+ averageRating: number | null;
2030
+ /** Total sold count */
2031
+ totalSold: number;
2032
+ /** Total view count */
2033
+ totalViews: number;
2034
+ /** Review count */
2035
+ reviewCount: number;
2036
+ /** Follower count */
2037
+ followerCount: number;
2038
+ /** Categories the merchant sells in */
2039
+ categories: string[];
2040
+ }
2041
+ /**
2042
+ * Public merchant profile response
2043
+ */
2044
+ interface PublicMerchantProfileResponse {
2045
+ /** Merchant */
2046
+ merchant: PublicMerchantProfile;
2047
+ }
2048
+ /**
2049
+ * Merchant products response
2050
+ */
2051
+ interface MerchantProductsResponse extends PaginatedResponse<Product> {
2052
+ /** Merchant info */
2053
+ merchant: {
2054
+ id: string;
2055
+ name: string;
2056
+ };
2057
+ }
2058
+ /**
2059
+ * Follow status response
2060
+ */
2061
+ interface FollowStatusResponse {
2062
+ /** Whether the user is following */
2063
+ isFollowing: boolean;
2064
+ /** When the user followed (null if not following) */
2065
+ followedAt: string | null;
2066
+ }
2067
+ /**
2068
+ * Follow action response
2069
+ */
2070
+ interface FollowActionResponse {
2071
+ /** Success flag */
2072
+ success: boolean;
2073
+ /** Human-readable message */
2074
+ message: string;
2075
+ /** Whether the user is now following */
2076
+ isFollowing: boolean;
2077
+ /** When the user followed (only for follow action) */
2078
+ followedAt?: string;
2079
+ }
2080
+ /**
2081
+ * Followed merchant summary
2082
+ */
2083
+ interface FollowedMerchantSummary {
2084
+ /** When the user followed */
2085
+ followedAt: string;
2086
+ /** Merchant info */
2087
+ merchant: {
2088
+ id: string;
2089
+ name: string;
2090
+ description: string | null;
2091
+ createdAt: string;
2092
+ productCount: number;
2093
+ averageRating: number | null;
2094
+ totalSold: number;
2095
+ };
2096
+ }
2097
+ /**
2098
+ * List followed merchants response
2099
+ */
2100
+ interface ListFollowingResponse extends PaginatedResponse<FollowedMerchantSummary> {
2101
+ }
1871
2102
  /**
1872
2103
  * List coupons response
1873
2104
  */
@@ -2019,6 +2250,38 @@ interface MessageResponse {
2019
2250
  /** Message */
2020
2251
  message: Message;
2021
2252
  }
2253
+ /**
2254
+ * Customer messages response (for retail users)
2255
+ *
2256
+ * Groups messages by order, where each order represents a conversation with a merchant.
2257
+ */
2258
+ interface CustomerMessagesResponse {
2259
+ /** Conversations grouped by order */
2260
+ conversations: Array<{
2261
+ orderId: string;
2262
+ orderNumber: string;
2263
+ merchant: {
2264
+ id: string;
2265
+ name: string;
2266
+ ownerUserId: string;
2267
+ };
2268
+ lastMessage: Message;
2269
+ unreadCount: number;
2270
+ messages: Message[];
2271
+ }>;
2272
+ /** Stats */
2273
+ stats: {
2274
+ total: number;
2275
+ unread: number;
2276
+ };
2277
+ }
2278
+ /**
2279
+ * Message stats response (for notification badges)
2280
+ */
2281
+ interface MessageStatsResponse {
2282
+ /** Unread message count */
2283
+ unread: number;
2284
+ }
2022
2285
  /**
2023
2286
  * Analytics overview
2024
2287
  */
@@ -2297,6 +2560,22 @@ interface CreateOrderEventResponse {
2297
2560
  /** Event */
2298
2561
  event: any;
2299
2562
  }
2563
+ /**
2564
+ * Active flash sales response
2565
+ */
2566
+ interface ActiveFlashSalesResponse {
2567
+ /** Flash sales */
2568
+ flashSales: FlashSale[];
2569
+ /** Time remaining for the featured/first sale */
2570
+ timeRemaining: {
2571
+ /** End timestamp */
2572
+ endsAt: string;
2573
+ /** Remaining seconds */
2574
+ remainingSeconds: number;
2575
+ } | null;
2576
+ /** Server time (for client-side sync) */
2577
+ serverTime: string;
2578
+ }
2300
2579
 
2301
2580
  /**
2302
2581
  * Customer/End-User Ecommerce API Client
@@ -2675,6 +2954,187 @@ declare class CustomerEcommerceClient extends BaseEcommerceClient {
2675
2954
  * ```
2676
2955
  */
2677
2956
  trackBanner(bannerId: string, request: TrackBannerRequest): Promise<SuccessResponse>;
2957
+ /**
2958
+ * List messages for customer
2959
+ *
2960
+ * Returns all conversations grouped by order, where each order represents
2961
+ * a conversation with a merchant.
2962
+ *
2963
+ * @returns List of conversations with messages and stats
2964
+ *
2965
+ * @example
2966
+ * ```typescript
2967
+ * const result = await client.listMessages();
2968
+ * console.log("Unread:", result.stats.unread);
2969
+ * result.conversations.forEach(conv => {
2970
+ * console.log(`Order ${conv.orderNumber}: ${conv.unreadCount} unread`);
2971
+ * });
2972
+ * ```
2973
+ */
2974
+ listMessages(): Promise<CustomerMessagesResponse>;
2975
+ /**
2976
+ * Get message stats (unread count)
2977
+ *
2978
+ * Lightweight endpoint for notification badges.
2979
+ *
2980
+ * @returns Unread message count
2981
+ *
2982
+ * @example
2983
+ * ```typescript
2984
+ * const stats = await client.getMessageStats();
2985
+ * console.log("Unread messages:", stats.unread);
2986
+ * ```
2987
+ */
2988
+ getMessageStats(): Promise<MessageStatsResponse>;
2989
+ /**
2990
+ * Send a message to a merchant about an order
2991
+ *
2992
+ * @param request - Message data including orderId, recipientId (merchant user ID), and message
2993
+ * @returns Sent message
2994
+ *
2995
+ * @example
2996
+ * ```typescript
2997
+ * await client.sendMessage({
2998
+ * orderId: "ord_123",
2999
+ * recipientId: "user_merchant_456",
3000
+ * message: "When will my order ship?"
3001
+ * });
3002
+ * ```
3003
+ */
3004
+ sendMessage(request: SendMessageRequest): Promise<MessageResponse>;
3005
+ /**
3006
+ * Mark a message as read
3007
+ *
3008
+ * @param messageId - Message ID
3009
+ * @returns Updated message
3010
+ *
3011
+ * @example
3012
+ * ```typescript
3013
+ * await client.markMessageAsRead("msg_123");
3014
+ * ```
3015
+ */
3016
+ markMessageAsRead(messageId: string): Promise<MessageResponse>;
3017
+ /**
3018
+ * Get active flash sales
3019
+ *
3020
+ * Returns currently running flash sales with their discounted products.
3021
+ * Includes countdown timer information for UI display.
3022
+ *
3023
+ * @param params - Query parameters
3024
+ * @returns List of active flash sales with time remaining
3025
+ *
3026
+ * @example
3027
+ * ```typescript
3028
+ * const result = await client.getActiveFlashSales({ limit: 5 });
3029
+ *
3030
+ * result.flashSales.forEach(sale => {
3031
+ * console.log(`${sale.name} - ends at ${sale.endsAt}`);
3032
+ * sale.items.forEach(item => {
3033
+ * console.log(` ${item.product.title}: $${item.salePrice} (${item.discountPercent}% off)`);
3034
+ * });
3035
+ * });
3036
+ *
3037
+ * // Use timeRemaining for countdown UI
3038
+ * if (result.timeRemaining) {
3039
+ * console.log(`Featured sale ends in ${result.timeRemaining.remainingSeconds} seconds`);
3040
+ * }
3041
+ * ```
3042
+ */
3043
+ getActiveFlashSales(params?: ListActiveFlashSalesParams): Promise<ActiveFlashSalesResponse>;
3044
+ /**
3045
+ * Get public merchant profile
3046
+ *
3047
+ * Fetches public information about a merchant for the storefront page.
3048
+ *
3049
+ * @param merchantId - Merchant ID
3050
+ * @returns Public merchant profile with stats
3051
+ *
3052
+ * @example
3053
+ * ```typescript
3054
+ * const result = await client.getMerchantProfile("merchant_123");
3055
+ * console.log(result.merchant.name, result.merchant.productCount);
3056
+ * ```
3057
+ */
3058
+ getMerchantProfile(merchantId: string): Promise<PublicMerchantProfileResponse>;
3059
+ /**
3060
+ * List merchant products
3061
+ *
3062
+ * Fetches products for a specific merchant with search, filter, and sort options.
3063
+ *
3064
+ * @param merchantId - Merchant ID
3065
+ * @param params - Query parameters for filtering and pagination
3066
+ * @returns Paginated list of products
3067
+ *
3068
+ * @example
3069
+ * ```typescript
3070
+ * const result = await client.getMerchantProducts("merchant_123", {
3071
+ * search: "laptop",
3072
+ * sortBy: "popular",
3073
+ * limit: 20,
3074
+ * });
3075
+ *
3076
+ * result.items.forEach(product => {
3077
+ * console.log(product.title, product.priceUSDC);
3078
+ * });
3079
+ * ```
3080
+ */
3081
+ getMerchantProducts(merchantId: string, params?: ListMerchantProductsParams): Promise<MerchantProductsResponse>;
3082
+ /**
3083
+ * Check if following a merchant
3084
+ *
3085
+ * @param merchantId - Merchant ID
3086
+ * @returns Follow status with follow date if applicable
3087
+ *
3088
+ * @example
3089
+ * ```typescript
3090
+ * const status = await client.isFollowingMerchant("merchant_123");
3091
+ * if (status.isFollowing) {
3092
+ * console.log(`Following since ${status.followedAt}`);
3093
+ * }
3094
+ * ```
3095
+ */
3096
+ isFollowingMerchant(merchantId: string): Promise<FollowStatusResponse>;
3097
+ /**
3098
+ * Follow a merchant
3099
+ *
3100
+ * @param merchantId - Merchant ID to follow
3101
+ * @returns Follow action result
3102
+ *
3103
+ * @example
3104
+ * ```typescript
3105
+ * const result = await client.followMerchant("merchant_123");
3106
+ * console.log(result.message); // "Now following Awesome Store"
3107
+ * ```
3108
+ */
3109
+ followMerchant(merchantId: string): Promise<FollowActionResponse>;
3110
+ /**
3111
+ * Unfollow a merchant
3112
+ *
3113
+ * @param merchantId - Merchant ID to unfollow
3114
+ * @returns Unfollow action result
3115
+ *
3116
+ * @example
3117
+ * ```typescript
3118
+ * const result = await client.unfollowMerchant("merchant_123");
3119
+ * console.log(result.message); // "Unfollowed successfully"
3120
+ * ```
3121
+ */
3122
+ unfollowMerchant(merchantId: string): Promise<FollowActionResponse>;
3123
+ /**
3124
+ * Get list of followed merchants
3125
+ *
3126
+ * @param params - Query parameters for pagination and sorting
3127
+ * @returns Paginated list of followed merchants with their info
3128
+ *
3129
+ * @example
3130
+ * ```typescript
3131
+ * const result = await client.getFollowedMerchants({ limit: 20, sortBy: "recent" });
3132
+ * result.items.forEach(item => {
3133
+ * console.log(`${item.merchant.name} - followed on ${item.followedAt}`);
3134
+ * });
3135
+ * ```
3136
+ */
3137
+ getFollowedMerchants(params?: ListFollowingParams): Promise<ListFollowingResponse>;
2678
3138
  }
2679
3139
 
2680
3140
  /**
@@ -3729,4 +4189,4 @@ declare function calculateDiscountAmount(price: number, discountType: "PERCENTAG
3729
4189
  */
3730
4190
  declare function calculateFinalPrice(price: number, discountType: "PERCENTAGE" | "FIXED_AMOUNT", discountValue: number): number;
3731
4191
 
3732
- export { type AnalyticsOverview, type ApiResponse, type AppliedDiscount, type Banner, type BannerResponse, BannerType, BaseEcommerceClient, type BaseEntity, type CalculateCartDiscountsRequest, type CalculateCartDiscountsResponse, type CalculateTaxRequest, type CalculateTaxResponse, type CartItem, type ConfirmEscrowDepositResponse, type Coupon, type CouponResponse, type CouponUsage, type CreateBannerRequest, type CreateCouponRequest, type CreateOrderEventRequest, type CreateOrderEventResponse, type CreateOrderRequest, type CreateOrderResponse, type CreateProductRequest, type CreateProductVariantRequest, type CreateReviewRequest, type CreateShippingMethodRequest, type CreateTaxNexusRequest, type CreateTaxRuleRequest, CustomerEcommerceClient, type CustomerSummary, DiscountMethod, DiscountScope, DiscountType, EcommerceApiError, type EcommerceClientConfig, type GenerateTaxReportRequest, type GetAnalyticsParams, type GetAnalyticsResponse, type GetCouponResponse, type GetOrderResponse, type GetProductMetricsResponse, type GetProductResponse, type GetTaxReportResponse, InventoryAuditAction, type InventoryAuditEntry, type ListActiveBannersParams, type ListBannersResponse, type ListCouponsResponse, type ListCustomersParams, type ListCustomersResponse, type ListInventoryAuditResponse, type ListMediaAssetsResponse, type ListMessagesResponse, type ListOrdersParams, type ListOrdersResponse, type ListProductVariantsResponse, type ListProductsParams, type ListProductsResponse, type ListReturnsResponse, type ListReviewsParams, type ListReviewsResponse, type ListShipmentsResponse, type ListShippingAddressesResponse, type ListShippingMethodsResponse, type ListTaxNexusResponse, type ListTaxReportsParams, type ListTaxReportsResponse, type ListTaxRulesResponse, type MediaAsset, type MediaAssetResponse, type Merchant, MerchantEcommerceClient, type MerchantProfileRequest, type MerchantProfileResponse, MerchantStatus, type Message, type MessageResponse, type Order, type OrderEvent, type OrderItem, type OrderReceiptResponse, OrderStatus, type OrdersByStatus, type PaginatedResponse, type PaginationParams, type Payment, PaymentMethod, PaymentStatus, type Product, type ProductDimensions, type ProductDiscountsResponse, type ProductMetrics, type ProductResponse, type ProductReview, ProductSortBy, type ProductVariant, type ProductVariantResponse, type RecentOrderSummary, type RespondToReviewRequest, type Return, type ReturnItem, type ReturnResponse, ReturnStatus, type RevenueByDay, type ReviewResponse, ReviewSortBy, ReviewStatus, type SendMessageRequest, type Settlement, type Shipment, type ShipmentResponse, ShipmentStatus, type ShippingAddress, type ShippingAddressRequest, type ShippingAddressResponse, type ShippingMethod, type ShippingMethodResponse, SortOrder, type SuccessResponse, TaxBehavior, type TaxBreakdownItem, type TaxNexus, type TaxNexusResponse, type TaxReport, type TaxReportDetails, TaxReportPeriodType, type TaxReportResponse, TaxReportStatus, type TaxRule, type TaxRuleResponse, type TaxSettings, type TaxSettingsResponse, TaxType, type TopProduct, type TrackBannerRequest, type UpdateBannerRequest, type UpdateCouponRequest, type UpdateOrderResponse, type UpdateOrderStatusRequest, type UpdateProductRequest, type UpdateProductVariantRequest, type UpdateShipmentRequest, type UpdateShippingMethodRequest, type UpdateTaxNexusRequest, type UpdateTaxReportStatusRequest, type UpdateTaxRuleRequest, type UpdateTaxSettingsRequest, type UserShippingAddress, type ValidateDiscountRequest, type ValidateDiscountResponse, buildQueryString, calculateDiscountAmount, calculateFinalPrice, formatPrice, getBackoffDelay, isRetryableError, isValidAddress, isValidEmail, parseError, retryWithBackoff, sleep, truncateAddress };
4192
+ export { type ActiveFlashSalesResponse, type AnalyticsOverview, type ApiResponse, type AppliedDiscount, type Banner, type BannerResponse, BannerType, BaseEcommerceClient, type BaseEntity, type CalculateCartDiscountsRequest, type CalculateCartDiscountsResponse, type CalculateTaxRequest, type CalculateTaxResponse, type CartItem, type ConfirmEscrowDepositResponse, type Coupon, type CouponResponse, type CouponUsage, type CreateBannerRequest, type CreateCouponRequest, type CreateFlashSaleRequest, type CreateOrderEventRequest, type CreateOrderEventResponse, type CreateOrderRequest, type CreateOrderResponse, type CreateProductRequest, type CreateProductVariantRequest, type CreateReviewRequest, type CreateShippingMethodRequest, type CreateTaxNexusRequest, type CreateTaxRuleRequest, CustomerEcommerceClient, type CustomerMessagesResponse, type CustomerSummary, DiscountMethod, DiscountScope, DiscountType, EcommerceApiError, type EcommerceClientConfig, type FlashSale, type FlashSaleItem, type FlashSaleItemInput, type FollowActionResponse, type FollowStatusResponse, type FollowedMerchantSummary, type GenerateTaxReportRequest, type GetAnalyticsParams, type GetAnalyticsResponse, type GetCouponResponse, type GetOrderResponse, type GetProductMetricsResponse, type GetProductResponse, type GetTaxReportResponse, InventoryAuditAction, type InventoryAuditEntry, type ListActiveBannersParams, type ListActiveFlashSalesParams, type ListBannersResponse, type ListCouponsResponse, type ListCustomersParams, type ListCustomersResponse, type ListFollowingParams, type ListFollowingResponse, type ListInventoryAuditResponse, type ListMediaAssetsResponse, type ListMerchantProductsParams, type ListMessagesResponse, type ListOrdersParams, type ListOrdersResponse, type ListProductVariantsResponse, type ListProductsParams, type ListProductsResponse, type ListReturnsResponse, type ListReviewsParams, type ListReviewsResponse, type ListShipmentsResponse, type ListShippingAddressesResponse, type ListShippingMethodsResponse, type ListTaxNexusResponse, type ListTaxReportsParams, type ListTaxReportsResponse, type ListTaxRulesResponse, type MediaAsset, type MediaAssetResponse, type Merchant, MerchantEcommerceClient, type MerchantProductsResponse, type MerchantProfileRequest, type MerchantProfileResponse, MerchantStatus, type Message, type MessageResponse, type MessageStatsResponse, type Order, type OrderEvent, type OrderItem, type OrderReceiptResponse, OrderStatus, type OrdersByStatus, type PaginatedResponse, type PaginationParams, type Payment, PaymentMethod, PaymentStatus, type Product, type ProductDimensions, type ProductDiscountsResponse, type ProductMetrics, type ProductResponse, type ProductReview, ProductSortBy, type ProductVariant, type ProductVariantResponse, type PublicMerchantProfile, type PublicMerchantProfileResponse, type RecentOrderSummary, type RespondToReviewRequest, type Return, type ReturnItem, type ReturnResponse, ReturnStatus, type RevenueByDay, type ReviewResponse, ReviewSortBy, ReviewStatus, type SendMessageRequest, type Settlement, type Shipment, type ShipmentResponse, ShipmentStatus, type ShippingAddress, type ShippingAddressRequest, type ShippingAddressResponse, type ShippingMethod, type ShippingMethodResponse, SortOrder, type SuccessResponse, TaxBehavior, type TaxBreakdownItem, type TaxNexus, type TaxNexusResponse, type TaxReport, type TaxReportDetails, TaxReportPeriodType, type TaxReportResponse, TaxReportStatus, type TaxRule, type TaxRuleResponse, type TaxSettings, type TaxSettingsResponse, TaxType, type TopProduct, type TrackBannerRequest, type UpdateBannerRequest, type UpdateCouponRequest, type UpdateFlashSaleRequest, type UpdateOrderResponse, type UpdateOrderStatusRequest, type UpdateProductRequest, type UpdateProductVariantRequest, type UpdateShipmentRequest, type UpdateShippingMethodRequest, type UpdateTaxNexusRequest, type UpdateTaxReportStatusRequest, type UpdateTaxRuleRequest, type UpdateTaxSettingsRequest, type UserShippingAddress, type ValidateDiscountRequest, type ValidateDiscountResponse, buildQueryString, calculateDiscountAmount, calculateFinalPrice, formatPrice, getBackoffDelay, isRetryableError, isValidAddress, isValidEmail, parseError, retryWithBackoff, sleep, truncateAddress };