@basedone/core 0.2.2 → 0.2.3

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.
@@ -25,6 +25,8 @@ interface EcommerceClientConfig {
25
25
  headers?: Record<string, string>;
26
26
  /** Enable automatic retry on retryable errors */
27
27
  enableRetry?: boolean;
28
+ /** Whether to send cookies with requests */
29
+ withCredentials?: boolean;
28
30
  }
29
31
  /**
30
32
  * Base ecommerce API client class
@@ -199,8 +201,12 @@ declare enum OrderStatus {
199
201
  * Payment method enum
200
202
  */
201
203
  declare enum PaymentMethod {
202
- /** USDC payment via Hyperliquid escrow */
204
+ /** USDC payment via Hyperliquid SpotTransfer */
203
205
  USDC_ESCROW = "USDC_ESCROW",
206
+ /** BasedPay external ledger payment */
207
+ BASEDPAY = "BASEDPAY",
208
+ /** Stripe card payment */
209
+ STRIPE = "STRIPE",
204
210
  /** Points-based payment */
205
211
  POINTS = "POINTS"
206
212
  }
@@ -542,7 +548,7 @@ interface Merchant extends BaseEntity {
542
548
  /**
543
549
  * Shipping address
544
550
  */
545
- interface ShippingAddress {
551
+ interface ShippingAddress$1 {
546
552
  /** Full name */
547
553
  fullName: string;
548
554
  /** Phone number */
@@ -567,7 +573,7 @@ interface ShippingAddress {
567
573
  /**
568
574
  * User shipping address entity (saved addresses)
569
575
  */
570
- interface UserShippingAddress extends BaseEntity, ShippingAddress {
576
+ interface UserShippingAddress extends BaseEntity, ShippingAddress$1 {
571
577
  /** User ID */
572
578
  userId: string;
573
579
  /** Is default address */
@@ -670,7 +676,7 @@ interface Order extends BaseEntity {
670
676
  /** Payment method */
671
677
  paymentMethod: PaymentMethod;
672
678
  /** Shipping address */
673
- shippingAddress: ShippingAddress;
679
+ shippingAddress: ShippingAddress$1;
674
680
  /** Customer notes */
675
681
  customerNotes?: string | null;
676
682
  /** Order items */
@@ -1160,6 +1166,92 @@ interface FlashSale {
1160
1166
  /** Flash sale items */
1161
1167
  items: FlashSaleItem[];
1162
1168
  }
1169
+ /**
1170
+ * Merchant shipping settings entity
1171
+ */
1172
+ interface MerchantShippingSettings extends BaseEntity {
1173
+ /** Merchant ID */
1174
+ merchantId: string;
1175
+ /** Default handling fee in USDC */
1176
+ defaultHandlingFee: number;
1177
+ /** Default processing time in days */
1178
+ defaultProcessingDays: number;
1179
+ /** Default product weight in kg */
1180
+ defaultWeightKg: number;
1181
+ /** Free shipping enabled globally */
1182
+ freeShippingEnabled: boolean;
1183
+ /** Free shipping threshold in USDC */
1184
+ freeShippingThreshold: number | null;
1185
+ /** Show estimated delivery to customers */
1186
+ showEstimatedDelivery: boolean;
1187
+ }
1188
+ /**
1189
+ * Shipping zone entity
1190
+ */
1191
+ interface ShippingZone extends BaseEntity {
1192
+ /** Merchant ID */
1193
+ merchantId: string;
1194
+ /** Zone name */
1195
+ name: string;
1196
+ /** Country codes (ISO 2-letter codes) */
1197
+ countries: string[];
1198
+ /** Is default zone for unlisted countries */
1199
+ isDefault: boolean;
1200
+ /** Is zone active */
1201
+ isActive: boolean;
1202
+ /** Priority (higher = checked first) */
1203
+ priority: number;
1204
+ /** Number of rates in this zone */
1205
+ rateCount?: number;
1206
+ /** Associated shipping rates */
1207
+ rates?: ShippingRate[];
1208
+ }
1209
+ /**
1210
+ * Shipping rate entity
1211
+ */
1212
+ interface ShippingRate extends BaseEntity {
1213
+ /** Zone ID */
1214
+ zoneId: string;
1215
+ /** Zone name (for display) */
1216
+ zoneName?: string;
1217
+ /** Merchant ID */
1218
+ merchantId: string;
1219
+ /** Rate name (e.g., "Standard", "Express") */
1220
+ name: string;
1221
+ /** Base shipping rate in USDC */
1222
+ baseRate: number;
1223
+ /** Per kg rate in USDC */
1224
+ perKgRate: number;
1225
+ /** Minimum weight in kg */
1226
+ minWeightKg: number | null;
1227
+ /** Maximum weight in kg */
1228
+ maxWeightKg: number | null;
1229
+ /** Minimum delivery days */
1230
+ minDeliveryDays: number | null;
1231
+ /** Maximum delivery days */
1232
+ maxDeliveryDays: number | null;
1233
+ /** Free shipping above this amount */
1234
+ freeAboveAmount: number | null;
1235
+ /** Is rate active */
1236
+ isActive: boolean;
1237
+ /** Sort order */
1238
+ sortOrder: number;
1239
+ }
1240
+ /**
1241
+ * Shipping option (calculated for checkout)
1242
+ */
1243
+ interface ShippingOption {
1244
+ /** Rate ID */
1245
+ id: string;
1246
+ /** Rate name */
1247
+ name: string;
1248
+ /** Calculated cost in USDC */
1249
+ cost: number;
1250
+ /** Estimated delivery string */
1251
+ estimatedDelivery: string;
1252
+ /** Zone name */
1253
+ zoneName: string;
1254
+ }
1163
1255
 
1164
1256
  /**
1165
1257
  * Ecommerce API Request Types
@@ -1279,13 +1371,21 @@ interface CreateOrderRequest {
1279
1371
  /** Payment method */
1280
1372
  paymentMethod: PaymentMethod;
1281
1373
  /** Shipping address */
1282
- shippingAddress: ShippingAddress;
1374
+ shippingAddress: ShippingAddress$1;
1283
1375
  /** Customer notes */
1284
1376
  customerNotes?: string;
1285
1377
  /** Coupon code */
1286
1378
  couponCode?: string;
1287
1379
  /** Idempotency key */
1288
1380
  idempotencyKey?: string;
1381
+ /** Selected shipping method name (e.g., "Standard", "Express") */
1382
+ shippingMethod?: string;
1383
+ /** Calculated shipping cost in USDC */
1384
+ shippingCost?: number;
1385
+ /** Shipping zone name for reference */
1386
+ shippingZone?: string;
1387
+ /** Estimated delivery time (e.g., "5-7 business days") */
1388
+ estimatedDelivery?: string;
1289
1389
  }
1290
1390
  /**
1291
1391
  * List orders request parameters
@@ -1347,7 +1447,7 @@ interface RespondToReviewRequest {
1347
1447
  /**
1348
1448
  * Create/update shipping address request
1349
1449
  */
1350
- interface ShippingAddressRequest extends ShippingAddress {
1450
+ interface ShippingAddressRequest extends ShippingAddress$1 {
1351
1451
  /** Is default address */
1352
1452
  isDefault?: boolean;
1353
1453
  /** Address label */
@@ -1711,6 +1811,88 @@ interface ListFollowingParams extends PaginationParams {
1711
1811
  /** Sort by: recent (default) or name */
1712
1812
  sortBy?: "recent" | "name";
1713
1813
  }
1814
+ /**
1815
+ * Update shipping settings request
1816
+ */
1817
+ interface UpdateShippingSettingsRequest {
1818
+ /** Default handling fee in USDC */
1819
+ defaultHandlingFee?: number;
1820
+ /** Default processing time in days */
1821
+ defaultProcessingDays?: number;
1822
+ /** Default product weight in kg */
1823
+ defaultWeightKg?: number;
1824
+ /** Free shipping enabled globally */
1825
+ freeShippingEnabled?: boolean;
1826
+ /** Free shipping threshold in USDC */
1827
+ freeShippingThreshold?: number | null;
1828
+ /** Show estimated delivery to customers */
1829
+ showEstimatedDelivery?: boolean;
1830
+ }
1831
+ /**
1832
+ * Create shipping zone request
1833
+ */
1834
+ interface CreateShippingZoneRequest {
1835
+ /** Zone name */
1836
+ name: string;
1837
+ /** Country codes (ISO 2-letter codes) */
1838
+ countries: string[];
1839
+ /** Is default zone for unlisted countries */
1840
+ isDefault?: boolean;
1841
+ /** Is zone active */
1842
+ isActive?: boolean;
1843
+ /** Priority (higher = checked first) */
1844
+ priority?: number;
1845
+ }
1846
+ /**
1847
+ * Update shipping zone request
1848
+ */
1849
+ interface UpdateShippingZoneRequest extends Partial<CreateShippingZoneRequest> {
1850
+ }
1851
+ /**
1852
+ * Create shipping rate request
1853
+ */
1854
+ interface CreateShippingRateRequest {
1855
+ /** Zone ID */
1856
+ zoneId: string;
1857
+ /** Rate name (e.g., "Standard", "Express") */
1858
+ name: string;
1859
+ /** Base shipping rate in USDC */
1860
+ baseRate: number;
1861
+ /** Per kg rate in USDC */
1862
+ perKgRate?: number;
1863
+ /** Minimum weight in kg */
1864
+ minWeightKg?: number | null;
1865
+ /** Maximum weight in kg */
1866
+ maxWeightKg?: number | null;
1867
+ /** Minimum delivery days */
1868
+ minDeliveryDays?: number | null;
1869
+ /** Maximum delivery days */
1870
+ maxDeliveryDays?: number | null;
1871
+ /** Free shipping above this amount */
1872
+ freeAboveAmount?: number | null;
1873
+ /** Is rate active */
1874
+ isActive?: boolean;
1875
+ /** Sort order */
1876
+ sortOrder?: number;
1877
+ }
1878
+ /**
1879
+ * Update shipping rate request
1880
+ */
1881
+ interface UpdateShippingRateRequest extends Partial<Omit<CreateShippingRateRequest, "zoneId">> {
1882
+ }
1883
+ /**
1884
+ * Calculate shipping options request
1885
+ */
1886
+ interface CalculateShippingRequest {
1887
+ /** Merchant ID */
1888
+ merchantId: string;
1889
+ /** Cart items */
1890
+ cartItems: CartItem[];
1891
+ /** Destination country code (ISO 2-letter) */
1892
+ destinationCountry: string;
1893
+ /** Order subtotal in USDC */
1894
+ orderSubtotal: number;
1895
+ }
1714
1896
 
1715
1897
  /**
1716
1898
  * Ecommerce API Response Types
@@ -2577,6 +2759,130 @@ interface ActiveFlashSalesResponse {
2577
2759
  serverTime: string;
2578
2760
  }
2579
2761
 
2762
+ /**
2763
+ * Get shipping settings response
2764
+ */
2765
+ interface ShippingSettingsResponse {
2766
+ /** Shipping settings */
2767
+ settings: MerchantShippingSettings | {
2768
+ defaultHandlingFee: number;
2769
+ defaultProcessingDays: number;
2770
+ freeShippingEnabled: boolean;
2771
+ freeShippingThreshold: number | null;
2772
+ defaultWeightKg: number;
2773
+ showEstimatedDelivery: boolean;
2774
+ };
2775
+ }
2776
+ /**
2777
+ * List shipping zones response
2778
+ */
2779
+ interface ListShippingZonesResponse {
2780
+ /** Shipping zones */
2781
+ zones: ShippingZone[];
2782
+ }
2783
+ /**
2784
+ * Shipping zone response
2785
+ */
2786
+ interface ShippingZoneResponse {
2787
+ /** Shipping zone */
2788
+ zone: ShippingZone;
2789
+ }
2790
+ /**
2791
+ * List shipping rates response
2792
+ */
2793
+ interface ListShippingRatesResponse {
2794
+ /** Shipping rates */
2795
+ rates: ShippingRate[];
2796
+ }
2797
+ /**
2798
+ * Shipping rate response
2799
+ */
2800
+ interface ShippingRateResponse {
2801
+ /** Shipping rate */
2802
+ rate: ShippingRate;
2803
+ }
2804
+ /**
2805
+ * Calculate shipping options response
2806
+ */
2807
+ interface CalculateShippingResponse {
2808
+ /** Available shipping options */
2809
+ shippingOptions: ShippingOption[];
2810
+ }
2811
+ /**
2812
+ * Payment method info for display
2813
+ */
2814
+ interface PaymentMethodInfo {
2815
+ /** Payment method ID (e.g., "USDC_ESCROW") */
2816
+ id: string;
2817
+ /** Display name (e.g., "USDC (Hyperliquid)") */
2818
+ name: string;
2819
+ /** Description of the payment method */
2820
+ description: string;
2821
+ /** Icon identifier */
2822
+ icon?: string;
2823
+ /** Whether the payment requires user signature (e.g., blockchain) */
2824
+ requiresSignature?: boolean;
2825
+ /** Whether refunds are supported */
2826
+ supportsRefund?: boolean;
2827
+ }
2828
+ /**
2829
+ * Get payment methods response
2830
+ */
2831
+ interface GetPaymentMethodsResponse {
2832
+ /** Whether the request was successful */
2833
+ success: boolean;
2834
+ /** Whether payments are globally enabled */
2835
+ paymentsEnabled: boolean;
2836
+ /** List of enabled payment methods */
2837
+ methods: PaymentMethodInfo[];
2838
+ /** Optional message (e.g., when payments are disabled) */
2839
+ message?: string;
2840
+ }
2841
+ /**
2842
+ * Process payment request
2843
+ */
2844
+ interface ProcessPaymentRequest {
2845
+ /** Order ID to pay for */
2846
+ orderId: string;
2847
+ /** Payment method to use */
2848
+ paymentMethod: string;
2849
+ /** Amount in USDC */
2850
+ amount: number;
2851
+ /** Pre-signed action for USDC_ESCROW */
2852
+ signedAction?: {
2853
+ action: unknown;
2854
+ nonce: number;
2855
+ signature: unknown;
2856
+ };
2857
+ /** Stripe payment method ID */
2858
+ stripePaymentMethodId?: string;
2859
+ /** BasedPay account ID */
2860
+ basedPayAccountId?: string;
2861
+ /** Points to spend */
2862
+ pointsAmount?: number;
2863
+ }
2864
+ /**
2865
+ * Process payment response
2866
+ */
2867
+ interface ProcessPaymentResponse {
2868
+ /** Whether the payment was successful */
2869
+ success: boolean;
2870
+ /** Payment transaction ID */
2871
+ transactionId?: string;
2872
+ /** Blockchain transaction hash (for crypto payments) */
2873
+ transactionHash?: string;
2874
+ /** Payment status */
2875
+ status: "PENDING" | "PROCESSING" | "COMPLETED" | "FAILED" | "CANCELLED" | "REFUNDED";
2876
+ /** Amount charged */
2877
+ amount: number;
2878
+ /** Currency */
2879
+ currency: string;
2880
+ /** Error message if failed */
2881
+ error?: string;
2882
+ /** Error code */
2883
+ errorCode?: string;
2884
+ }
2885
+
2580
2886
  /**
2581
2887
  * Customer/End-User Ecommerce API Client
2582
2888
  *
@@ -2922,6 +3228,29 @@ declare class CustomerEcommerceClient extends BaseEcommerceClient {
2922
3228
  * ```
2923
3229
  */
2924
3230
  calculateTax(request: CalculateTaxRequest): Promise<CalculateTaxResponse>;
3231
+ /**
3232
+ * Calculate shipping options for cart items
3233
+ *
3234
+ * @param request - Cart items, merchant, and destination
3235
+ * @returns Available shipping options with costs
3236
+ *
3237
+ * @example
3238
+ * ```typescript
3239
+ * const result = await client.calculateShippingOptions({
3240
+ * merchantId: "merchant_123",
3241
+ * cartItems: [
3242
+ * { productId: "prod_123", quantity: 2 }
3243
+ * ],
3244
+ * destinationCountry: "US",
3245
+ * orderSubtotal: 99.99
3246
+ * });
3247
+ *
3248
+ * result.shippingOptions.forEach(opt => {
3249
+ * console.log(opt.name, opt.cost, opt.estimatedDelivery);
3250
+ * });
3251
+ * ```
3252
+ */
3253
+ calculateShippingOptions(request: CalculateShippingRequest): Promise<CalculateShippingResponse>;
2925
3254
  /**
2926
3255
  * Get active promotional banners
2927
3256
  *
@@ -3135,6 +3464,24 @@ declare class CustomerEcommerceClient extends BaseEcommerceClient {
3135
3464
  * ```
3136
3465
  */
3137
3466
  getFollowedMerchants(params?: ListFollowingParams): Promise<ListFollowingResponse>;
3467
+ /**
3468
+ * Get available payment methods
3469
+ *
3470
+ * Returns the list of enabled payment methods that can be used during checkout.
3471
+ *
3472
+ * @returns List of available payment methods with display info
3473
+ *
3474
+ * @example
3475
+ * ```typescript
3476
+ * const result = await client.getPaymentMethods();
3477
+ * if (result.paymentsEnabled) {
3478
+ * result.methods.forEach(method => {
3479
+ * console.log(`${method.name}: ${method.description}`);
3480
+ * });
3481
+ * }
3482
+ * ```
3483
+ */
3484
+ getPaymentMethods(): Promise<GetPaymentMethodsResponse>;
3138
3485
  }
3139
3486
 
3140
3487
  /**
@@ -3616,6 +3963,166 @@ declare class MerchantEcommerceClient extends BaseEcommerceClient {
3616
3963
  * ```
3617
3964
  */
3618
3965
  updateShipment(shipmentId: string, request: UpdateShipmentRequest): Promise<ShipmentResponse>;
3966
+ /**
3967
+ * Get merchant shipping settings
3968
+ *
3969
+ * @returns Shipping settings
3970
+ *
3971
+ * @example
3972
+ * ```typescript
3973
+ * const { settings } = await client.getShippingSettings();
3974
+ * console.log("Handling fee:", settings.defaultHandlingFee);
3975
+ * ```
3976
+ */
3977
+ getShippingSettings(): Promise<ShippingSettingsResponse>;
3978
+ /**
3979
+ * Update merchant shipping settings
3980
+ *
3981
+ * @param request - Settings to update
3982
+ * @returns Updated settings
3983
+ *
3984
+ * @example
3985
+ * ```typescript
3986
+ * await client.updateShippingSettings({
3987
+ * defaultHandlingFee: 2.50,
3988
+ * freeShippingEnabled: true,
3989
+ * freeShippingThreshold: 100
3990
+ * });
3991
+ * ```
3992
+ */
3993
+ updateShippingSettings(request: UpdateShippingSettingsRequest): Promise<ShippingSettingsResponse>;
3994
+ /**
3995
+ * List all shipping zones
3996
+ *
3997
+ * @returns List of shipping zones with rate counts
3998
+ *
3999
+ * @example
4000
+ * ```typescript
4001
+ * const { zones } = await client.listShippingZones();
4002
+ * zones.forEach(z => console.log(z.name, z.countries.length, "countries"));
4003
+ * ```
4004
+ */
4005
+ listShippingZones(): Promise<ListShippingZonesResponse>;
4006
+ /**
4007
+ * Get a shipping zone by ID
4008
+ *
4009
+ * @param zoneId - Zone ID
4010
+ * @returns Zone with rates
4011
+ *
4012
+ * @example
4013
+ * ```typescript
4014
+ * const { zone } = await client.getShippingZone("zone_123");
4015
+ * console.log(zone.name, zone.rates?.length, "rates");
4016
+ * ```
4017
+ */
4018
+ getShippingZone(zoneId: string): Promise<ShippingZoneResponse>;
4019
+ /**
4020
+ * Create a shipping zone
4021
+ *
4022
+ * @param request - Zone data
4023
+ * @returns Created zone
4024
+ *
4025
+ * @example
4026
+ * ```typescript
4027
+ * const { zone } = await client.createShippingZone({
4028
+ * name: "Southeast Asia",
4029
+ * countries: ["SG", "MY", "TH", "ID", "PH", "VN"],
4030
+ * isDefault: false,
4031
+ * priority: 10
4032
+ * });
4033
+ * ```
4034
+ */
4035
+ createShippingZone(request: CreateShippingZoneRequest): Promise<ShippingZoneResponse>;
4036
+ /**
4037
+ * Update a shipping zone
4038
+ *
4039
+ * @param zoneId - Zone ID
4040
+ * @param request - Updated zone data
4041
+ * @returns Updated zone
4042
+ *
4043
+ * @example
4044
+ * ```typescript
4045
+ * await client.updateShippingZone("zone_123", {
4046
+ * countries: ["SG", "MY", "TH", "ID", "PH", "VN", "BN"]
4047
+ * });
4048
+ * ```
4049
+ */
4050
+ updateShippingZone(zoneId: string, request: UpdateShippingZoneRequest): Promise<ShippingZoneResponse>;
4051
+ /**
4052
+ * Delete a shipping zone
4053
+ *
4054
+ * @param zoneId - Zone ID
4055
+ * @returns Success response
4056
+ *
4057
+ * @example
4058
+ * ```typescript
4059
+ * await client.deleteShippingZone("zone_123");
4060
+ * ```
4061
+ */
4062
+ deleteShippingZone(zoneId: string): Promise<SuccessResponse>;
4063
+ /**
4064
+ * List shipping rates
4065
+ *
4066
+ * @param zoneId - Optional zone ID to filter by
4067
+ * @returns List of shipping rates
4068
+ *
4069
+ * @example
4070
+ * ```typescript
4071
+ * // All rates
4072
+ * const { rates } = await client.listShippingRates();
4073
+ *
4074
+ * // Rates for a specific zone
4075
+ * const { rates: zoneRates } = await client.listShippingRates("zone_123");
4076
+ * ```
4077
+ */
4078
+ listShippingRates(zoneId?: string): Promise<ListShippingRatesResponse>;
4079
+ /**
4080
+ * Create a shipping rate
4081
+ *
4082
+ * @param request - Rate data
4083
+ * @returns Created rate
4084
+ *
4085
+ * @example
4086
+ * ```typescript
4087
+ * const { rate } = await client.createShippingRate({
4088
+ * zoneId: "zone_123",
4089
+ * name: "Standard Shipping",
4090
+ * baseRate: 5.00,
4091
+ * perKgRate: 1.50,
4092
+ * minDeliveryDays: 7,
4093
+ * maxDeliveryDays: 14
4094
+ * });
4095
+ * ```
4096
+ */
4097
+ createShippingRate(request: CreateShippingRateRequest): Promise<ShippingRateResponse>;
4098
+ /**
4099
+ * Update a shipping rate
4100
+ *
4101
+ * @param rateId - Rate ID
4102
+ * @param request - Updated rate data
4103
+ * @returns Updated rate
4104
+ *
4105
+ * @example
4106
+ * ```typescript
4107
+ * await client.updateShippingRate("rate_123", {
4108
+ * baseRate: 6.00,
4109
+ * freeAboveAmount: 75
4110
+ * });
4111
+ * ```
4112
+ */
4113
+ updateShippingRate(rateId: string, request: UpdateShippingRateRequest): Promise<ShippingRateResponse>;
4114
+ /**
4115
+ * Delete a shipping rate
4116
+ *
4117
+ * @param rateId - Rate ID
4118
+ * @returns Success response
4119
+ *
4120
+ * @example
4121
+ * ```typescript
4122
+ * await client.deleteShippingRate("rate_123");
4123
+ * ```
4124
+ */
4125
+ deleteShippingRate(rateId: string): Promise<SuccessResponse>;
3619
4126
  /**
3620
4127
  * List returns
3621
4128
  *
@@ -4111,6 +4618,506 @@ declare class MerchantEcommerceClient extends BaseEcommerceClient {
4111
4618
  * ```
4112
4619
  */
4113
4620
  exportTaxReport(reportId: string): Promise<string>;
4621
+ /**
4622
+ * List connected dropship suppliers
4623
+ *
4624
+ * @returns Connected and available suppliers
4625
+ *
4626
+ * @example
4627
+ * ```typescript
4628
+ * const { connected, available } = await client.listDropshipSuppliers();
4629
+ * ```
4630
+ */
4631
+ listDropshipSuppliers(): Promise<{
4632
+ connected: DropshipSupplier[];
4633
+ available: DropshipSupplierInfo[];
4634
+ }>;
4635
+ /**
4636
+ * Connect a new dropship supplier
4637
+ *
4638
+ * @param request - Supplier credentials
4639
+ * @returns Connected supplier
4640
+ *
4641
+ * @example
4642
+ * ```typescript
4643
+ * const supplier = await client.connectDropshipSupplier({
4644
+ * code: "CJ_DROPSHIPPING",
4645
+ * apiKey: "your-api-key"
4646
+ * });
4647
+ * ```
4648
+ */
4649
+ connectDropshipSupplier(request: ConnectDropshipSupplierRequest): Promise<{
4650
+ supplier: DropshipSupplier;
4651
+ message: string;
4652
+ }>;
4653
+ /**
4654
+ * Update dropship supplier settings
4655
+ *
4656
+ * @param supplierId - Supplier ID
4657
+ * @param request - Settings to update
4658
+ * @returns Updated supplier
4659
+ */
4660
+ updateDropshipSupplier(supplierId: string, request: UpdateDropshipSupplierRequest): Promise<{
4661
+ supplier: DropshipSupplier;
4662
+ }>;
4663
+ /**
4664
+ * Disconnect a dropship supplier
4665
+ *
4666
+ * @param supplierId - Supplier ID
4667
+ */
4668
+ disconnectDropshipSupplier(supplierId: string): Promise<SuccessResponse>;
4669
+ /**
4670
+ * Search products from connected suppliers
4671
+ *
4672
+ * @param request - Search parameters
4673
+ * @returns Search results with pagination
4674
+ *
4675
+ * @example
4676
+ * ```typescript
4677
+ * const results = await client.searchDropshipProducts({
4678
+ * supplierId: "supplier_123",
4679
+ * query: "wireless headphones",
4680
+ * limit: 20
4681
+ * });
4682
+ * ```
4683
+ */
4684
+ searchDropshipProducts(request: SearchDropshipProductsRequest): Promise<{
4685
+ products: SupplierProduct[];
4686
+ pagination: {
4687
+ total: number;
4688
+ page: number;
4689
+ limit: number;
4690
+ hasMore: boolean;
4691
+ };
4692
+ supplier?: string;
4693
+ }>;
4694
+ /**
4695
+ * Get dropship supplier categories
4696
+ *
4697
+ * @param supplierId - Supplier ID
4698
+ * @returns Category list
4699
+ */
4700
+ getDropshipCategories(supplierId: string): Promise<{
4701
+ categories: SupplierCategory[];
4702
+ }>;
4703
+ /**
4704
+ * Get detailed product info from supplier
4705
+ *
4706
+ * @param supplierId - Supplier ID
4707
+ * @param externalProductId - Supplier's product ID
4708
+ * @returns Product details with suggested pricing
4709
+ */
4710
+ getDropshipProductDetails(supplierId: string, externalProductId: string): Promise<{
4711
+ product: SupplierProduct;
4712
+ suggestedPrice: number;
4713
+ estimatedMargin: number;
4714
+ }>;
4715
+ /**
4716
+ * Import a product from supplier to your store
4717
+ *
4718
+ * @param request - Import parameters
4719
+ * @returns Created product IDs
4720
+ *
4721
+ * @example
4722
+ * ```typescript
4723
+ * const result = await client.importDropshipProduct({
4724
+ * supplierId: "supplier_123",
4725
+ * externalProductId: "ext_product_456",
4726
+ * priceUSDC: 29.99,
4727
+ * title: "Custom Title"
4728
+ * });
4729
+ * ```
4730
+ */
4731
+ importDropshipProduct(request: ImportDropshipProductRequest): Promise<{
4732
+ success: boolean;
4733
+ productId?: string;
4734
+ dropshipProductId?: string;
4735
+ error?: string;
4736
+ }>;
4737
+ /**
4738
+ * Bulk import products from supplier
4739
+ *
4740
+ * @param request - Bulk import parameters
4741
+ * @returns Import results
4742
+ */
4743
+ bulkImportDropshipProducts(request: BulkImportDropshipProductsRequest): Promise<{
4744
+ success: boolean;
4745
+ imported: number;
4746
+ failed: number;
4747
+ results: Array<{
4748
+ externalProductId: string;
4749
+ success: boolean;
4750
+ productId?: string;
4751
+ error?: string;
4752
+ }>;
4753
+ }>;
4754
+ /**
4755
+ * List imported dropship products
4756
+ *
4757
+ * @param params - Filter parameters
4758
+ * @returns Imported products list
4759
+ */
4760
+ listDropshipProducts(params?: {
4761
+ supplierId?: string;
4762
+ isActive?: boolean;
4763
+ limit?: number;
4764
+ offset?: number;
4765
+ }): Promise<{
4766
+ items: DropshipProduct[];
4767
+ pagination: {
4768
+ total: number;
4769
+ limit: number;
4770
+ offset: number;
4771
+ hasMore: boolean;
4772
+ };
4773
+ }>;
4774
+ /**
4775
+ * List dropship order links
4776
+ *
4777
+ * @param params - Filter parameters
4778
+ * @returns Order links with status summary
4779
+ */
4780
+ listDropshipOrders(params?: {
4781
+ status?: string | string[];
4782
+ limit?: number;
4783
+ offset?: number;
4784
+ }): Promise<{
4785
+ items: DropshipOrderLink[];
4786
+ pagination: {
4787
+ total: number;
4788
+ limit: number;
4789
+ offset: number;
4790
+ hasMore: boolean;
4791
+ };
4792
+ summary: {
4793
+ pending: number;
4794
+ forwarded: number;
4795
+ processing: number;
4796
+ shipped: number;
4797
+ delivered: number;
4798
+ failed: number;
4799
+ };
4800
+ }>;
4801
+ /**
4802
+ * Forward orders to supplier
4803
+ *
4804
+ * @param orderItemIds - Order item IDs to forward
4805
+ * @returns Forward results
4806
+ */
4807
+ forwardDropshipOrders(orderItemIds: string[]): Promise<{
4808
+ success: boolean;
4809
+ forwarded: number;
4810
+ failed: number;
4811
+ results: Array<{
4812
+ orderItemId: string;
4813
+ success: boolean;
4814
+ externalOrderId?: string;
4815
+ error?: string;
4816
+ }>;
4817
+ }>;
4818
+ /**
4819
+ * Sync tracking for all pending dropship orders
4820
+ *
4821
+ * @returns Sync results
4822
+ */
4823
+ syncDropshipTracking(): Promise<{
4824
+ success: boolean;
4825
+ total: number;
4826
+ synced: number;
4827
+ updated: number;
4828
+ failed: number;
4829
+ }>;
4830
+ /**
4831
+ * Get order forwarding details for manual forwarding
4832
+ *
4833
+ * @param orderItemId - Order item ID
4834
+ * @returns Forwarding details
4835
+ */
4836
+ getDropshipOrderDetails(orderItemId: string): Promise<{
4837
+ details: {
4838
+ orderId: string;
4839
+ orderItemId: string;
4840
+ productTitle: string;
4841
+ quantity: number;
4842
+ supplierName: string;
4843
+ supplierProductId: string;
4844
+ supplierPrice: number;
4845
+ shippingAddress: ShippingAddress;
4846
+ estimatedCost: number;
4847
+ status: string;
4848
+ };
4849
+ }>;
4850
+ /**
4851
+ * Forward a single order item to supplier
4852
+ *
4853
+ * @param orderItemId - Order item ID
4854
+ * @returns Forward result
4855
+ */
4856
+ forwardDropshipOrder(orderItemId: string): Promise<{
4857
+ success: boolean;
4858
+ dropshipOrderLinkId?: string;
4859
+ externalOrderId?: string;
4860
+ error?: string;
4861
+ }>;
4862
+ /**
4863
+ * Get dropship settings
4864
+ *
4865
+ * @returns Merchant dropship settings
4866
+ */
4867
+ getDropshipSettings(): Promise<{
4868
+ settings: DropshipMerchantSettings;
4869
+ }>;
4870
+ /**
4871
+ * Update dropship settings
4872
+ *
4873
+ * @param request - Settings to update
4874
+ * @returns Updated settings
4875
+ */
4876
+ updateDropshipSettings(request: UpdateDropshipSettingsRequest): Promise<{
4877
+ settings: DropshipMerchantSettings;
4878
+ }>;
4879
+ /**
4880
+ * Sync dropship products and/or orders
4881
+ *
4882
+ * @param type - Sync type (products, orders, all, single)
4883
+ * @param dropshipProductId - For single product sync
4884
+ * @returns Sync results
4885
+ */
4886
+ syncDropship(type: "products" | "orders" | "all" | "single", dropshipProductId?: string): Promise<{
4887
+ success: boolean;
4888
+ type: string;
4889
+ results: {
4890
+ products?: {
4891
+ total: number;
4892
+ synced: number;
4893
+ failed: number;
4894
+ };
4895
+ orders?: {
4896
+ total: number;
4897
+ synced: number;
4898
+ updated: number;
4899
+ failed: number;
4900
+ };
4901
+ product?: {
4902
+ success: boolean;
4903
+ updated: boolean;
4904
+ error?: string;
4905
+ };
4906
+ };
4907
+ }>;
4908
+ }
4909
+ interface DropshipSupplier {
4910
+ id: string;
4911
+ code: string;
4912
+ name: string;
4913
+ isActive: boolean;
4914
+ autoForward: boolean;
4915
+ settings?: Record<string, any>;
4916
+ createdAt: string;
4917
+ }
4918
+ interface DropshipSupplierInfo {
4919
+ code: string;
4920
+ name: string;
4921
+ description: string;
4922
+ features: string[];
4923
+ isConnected: boolean;
4924
+ }
4925
+ interface ConnectDropshipSupplierRequest {
4926
+ code: string;
4927
+ apiKey?: string;
4928
+ apiSecret?: string;
4929
+ accessToken?: string;
4930
+ }
4931
+ interface UpdateDropshipSupplierRequest {
4932
+ autoForward?: boolean;
4933
+ settings?: Record<string, any>;
4934
+ apiKey?: string;
4935
+ apiSecret?: string;
4936
+ accessToken?: string;
4937
+ }
4938
+ interface SearchDropshipProductsRequest {
4939
+ supplierId?: string;
4940
+ supplierCode?: string;
4941
+ query?: string;
4942
+ category?: string;
4943
+ minPrice?: number;
4944
+ maxPrice?: number;
4945
+ page?: number;
4946
+ limit?: number;
4947
+ sortBy?: "price_asc" | "price_desc" | "rating" | "orders" | "newest";
4948
+ }
4949
+ interface SupplierProduct {
4950
+ externalProductId: string;
4951
+ externalUrl?: string;
4952
+ externalSku?: string;
4953
+ title: string;
4954
+ description: string;
4955
+ images: string[];
4956
+ price: number;
4957
+ currency: string;
4958
+ shippingCost?: number;
4959
+ processingDays?: number;
4960
+ shippingDays?: number;
4961
+ warehouseLocation?: string;
4962
+ category?: string;
4963
+ variants?: SupplierProductVariant[];
4964
+ rating?: number;
4965
+ reviewCount?: number;
4966
+ minOrderQuantity?: number;
4967
+ inventory?: number;
4968
+ }
4969
+ interface SupplierProductVariant {
4970
+ externalVariantId: string;
4971
+ name: string;
4972
+ sku?: string;
4973
+ price: number;
4974
+ inventory?: number;
4975
+ attributes: Record<string, string>;
4976
+ image?: string;
4977
+ }
4978
+ interface SupplierCategory {
4979
+ id: string;
4980
+ name: string;
4981
+ parentId?: string;
4982
+ children?: SupplierCategory[];
4983
+ }
4984
+ interface ImportDropshipProductRequest {
4985
+ supplierId: string;
4986
+ externalProductId: string;
4987
+ priceUSDC: number;
4988
+ compareAtPrice?: number;
4989
+ title?: string;
4990
+ richDescription?: string;
4991
+ category?: string;
4992
+ categoryId?: string;
4993
+ tags?: string[];
4994
+ isActive?: boolean;
4995
+ }
4996
+ interface BulkImportDropshipProductsRequest {
4997
+ supplierId: string;
4998
+ products: Array<{
4999
+ externalProductId: string;
5000
+ priceUSDC: number;
5001
+ compareAtPrice?: number;
5002
+ title?: string;
5003
+ category?: string;
5004
+ categoryId?: string;
5005
+ }>;
5006
+ }
5007
+ interface DropshipProduct {
5008
+ id: string;
5009
+ supplierId: string;
5010
+ externalProductId: string;
5011
+ externalUrl?: string;
5012
+ supplierPrice: string;
5013
+ supplierCurrency: string;
5014
+ shippingCost?: string;
5015
+ processingDays?: number;
5016
+ shippingDays?: number;
5017
+ warehouseLocation?: string;
5018
+ productSnapshot: any;
5019
+ lastSyncedAt?: string;
5020
+ syncError?: string;
5021
+ localProductId?: string;
5022
+ localProduct?: {
5023
+ id: string;
5024
+ title: string;
5025
+ priceUSDC: string;
5026
+ images: string[];
5027
+ isActive: boolean;
5028
+ inventory?: number;
5029
+ soldCount: number;
5030
+ };
5031
+ supplier?: {
5032
+ id: string;
5033
+ name: string;
5034
+ code: string;
5035
+ };
5036
+ isActive: boolean;
5037
+ createdAt: string;
5038
+ }
5039
+ interface DropshipOrderLink {
5040
+ id: string;
5041
+ orderId: string;
5042
+ orderItemId: string;
5043
+ supplierId: string;
5044
+ dropshipProductId?: string;
5045
+ externalOrderId?: string;
5046
+ externalStatus?: string;
5047
+ status: string;
5048
+ forwardedAt?: string;
5049
+ processedAt?: string;
5050
+ shippedAt?: string;
5051
+ deliveredAt?: string;
5052
+ trackingNumber?: string;
5053
+ trackingUrl?: string;
5054
+ carrier?: string;
5055
+ supplierCost?: string;
5056
+ shippingCost?: string;
5057
+ lastError?: string;
5058
+ order?: {
5059
+ id: string;
5060
+ status: string;
5061
+ totalUSDC: string;
5062
+ shippingAddress: any;
5063
+ createdAt: string;
5064
+ };
5065
+ orderItem?: {
5066
+ id: string;
5067
+ titleSnapshot: string;
5068
+ quantity: number;
5069
+ unitPriceUSDC: string;
5070
+ };
5071
+ supplier?: {
5072
+ id: string;
5073
+ name: string;
5074
+ code: string;
5075
+ };
5076
+ createdAt: string;
5077
+ }
5078
+ interface DropshipMerchantSettings {
5079
+ merchantId: string;
5080
+ defaultMarkupType: string;
5081
+ defaultMarkupValue: string;
5082
+ roundPriceTo?: string;
5083
+ autoForwardOrders: boolean;
5084
+ autoSyncTracking: boolean;
5085
+ syncIntervalMinutes: number;
5086
+ autoSyncInventory: boolean;
5087
+ lowStockThreshold: number;
5088
+ outOfStockBehavior: string;
5089
+ defaultShippingMethod?: string;
5090
+ freeShippingThreshold?: string;
5091
+ notifyOnNewOrder: boolean;
5092
+ notifyOnLowStock: boolean;
5093
+ notifyOnShipment: boolean;
5094
+ }
5095
+ interface UpdateDropshipSettingsRequest {
5096
+ defaultMarkupType?: string;
5097
+ defaultMarkupValue?: number;
5098
+ roundPriceTo?: number | null;
5099
+ autoForwardOrders?: boolean;
5100
+ autoSyncTracking?: boolean;
5101
+ syncIntervalMinutes?: number;
5102
+ autoSyncInventory?: boolean;
5103
+ lowStockThreshold?: number;
5104
+ outOfStockBehavior?: string;
5105
+ defaultShippingMethod?: string | null;
5106
+ freeShippingThreshold?: number | null;
5107
+ notifyOnNewOrder?: boolean;
5108
+ notifyOnLowStock?: boolean;
5109
+ notifyOnShipment?: boolean;
5110
+ }
5111
+ interface ShippingAddress {
5112
+ fullName: string;
5113
+ phone: string;
5114
+ email?: string;
5115
+ addressLine1: string;
5116
+ addressLine2?: string;
5117
+ city: string;
5118
+ state?: string;
5119
+ postalCode: string;
5120
+ country: string;
4114
5121
  }
4115
5122
 
4116
5123
  /**
@@ -4189,4 +5196,4 @@ declare function calculateDiscountAmount(price: number, discountType: "PERCENTAG
4189
5196
  */
4190
5197
  declare function calculateFinalPrice(price: number, discountType: "PERCENTAGE" | "FIXED_AMOUNT", discountValue: number): number;
4191
5198
 
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 };
5199
+ export { type ActiveFlashSalesResponse, type AnalyticsOverview, type ApiResponse, type AppliedDiscount, type Banner, type BannerResponse, BannerType, BaseEcommerceClient, type BaseEntity, type CalculateCartDiscountsRequest, type CalculateCartDiscountsResponse, type CalculateShippingRequest, type CalculateShippingResponse, 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 CreateShippingRateRequest, type CreateShippingZoneRequest, 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 GetPaymentMethodsResponse, 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 ListShippingRatesResponse, type ListShippingZonesResponse, type ListTaxNexusResponse, type ListTaxReportsParams, type ListTaxReportsResponse, type ListTaxRulesResponse, type MediaAsset, type MediaAssetResponse, type Merchant, MerchantEcommerceClient, type MerchantProductsResponse, type MerchantProfileRequest, type MerchantProfileResponse, type MerchantShippingSettings, 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, type PaymentMethodInfo, PaymentStatus, type ProcessPaymentRequest, type ProcessPaymentResponse, 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$1 as ShippingAddress, type ShippingAddressRequest, type ShippingAddressResponse, type ShippingMethod, type ShippingMethodResponse, type ShippingOption, type ShippingRate, type ShippingRateResponse, type ShippingSettingsResponse, type ShippingZone, type ShippingZoneResponse, 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 UpdateShippingRateRequest, type UpdateShippingSettingsRequest, type UpdateShippingZoneRequest, 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 };