@thorprovider/types 7.6.0 → 7.8.0

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
@@ -82,6 +82,36 @@ interface Country {
82
82
  /** ISO 3166-1 numeric code (optional, e.g., "840", "724") */
83
83
  numCode?: string;
84
84
  }
85
+ /**
86
+ * How a promotion was applied.
87
+ *
88
+ * - `coupon`: the shopper entered a code.
89
+ * - `automatic`: the backend applied it without a code.
90
+ * - `discount`: an adjustment whose promotion identity is not available.
91
+ */
92
+ type PromotionKind = 'coupon' | 'automatic' | 'discount';
93
+ /**
94
+ * Where a promotion was applied, as far as the backend adjustments reveal.
95
+ *
96
+ * `items` and `shipping` are derived from the adjustment location. `order` is
97
+ * used when no adjustment location is available yet (for example a code applied
98
+ * before a shipping method exists).
99
+ */
100
+ type PromotionScope = 'order' | 'items' | 'shipping';
101
+ /**
102
+ * One promotion row from the backend's discount adjustments.
103
+ *
104
+ * `amount` is the sum of the adjustments attributed to this promotion, never a
105
+ * locally computed percentage or configured value.
106
+ */
107
+ interface PromotionSummary {
108
+ id: string;
109
+ code?: string;
110
+ label: string;
111
+ kind: PromotionKind;
112
+ scope: PromotionScope;
113
+ amount: Money;
114
+ }
85
115
 
86
116
  /**
87
117
  * @thorprovider/types — Commerce contracts (type-only)
@@ -213,6 +243,21 @@ interface CheckoutContactValues {
213
243
  lastName: string;
214
244
  phone: string;
215
245
  }
246
+ /**
247
+ * Guest contact stored on the cart/order (never on the Customer record).
248
+ *
249
+ * The email is authoritative on `Cart.email`; this shape carries the display
250
+ * name and phone the shopper entered for the order.
251
+ */
252
+ interface GuestContact {
253
+ firstName: string;
254
+ lastName: string;
255
+ phone: string;
256
+ }
257
+ /** Guest contact payload accepted by the checkout contact route. */
258
+ interface CheckoutGuestContact extends GuestContact {
259
+ email: string;
260
+ }
216
261
  /** Authenticated identity mapped by the host. No token or raw customer object. */
217
262
  interface CheckoutCustomerIdentity {
218
263
  id: string;
@@ -1413,6 +1458,40 @@ type CatalogQueryOutcome = {
1413
1458
  * Cart types - unified interface for all commerce providers
1414
1459
  */
1415
1460
 
1461
+ /**
1462
+ * One quantity-price tier for a cart line.
1463
+ *
1464
+ * `maxQuantity` is absent for an open-ended tier. The unit price is the
1465
+ * backend's effective price for that range; consumers render it and never
1466
+ * derive it from a percentage or a configured amount.
1467
+ */
1468
+ interface PriceTier {
1469
+ minQuantity: number;
1470
+ maxQuantity?: number;
1471
+ unitPrice: Money;
1472
+ }
1473
+ /**
1474
+ * Per-line checkout projection: stock and the effective quantity-price ladder.
1475
+ *
1476
+ * `availableQuantity` is the maximum number of complete units a single
1477
+ * sales-channel warehouse can serve, never the sum across warehouses.
1478
+ * `basePrice` is the effective group's base price when the backend reports one;
1479
+ * `tiers` is the quantity ladder. Both are omitted/empty when the backend does
1480
+ * not expose them.
1481
+ */
1482
+ interface CheckoutLineProjectionLine {
1483
+ lineId: string;
1484
+ variantId: string;
1485
+ availableQuantity?: number;
1486
+ stockStatus?: StockStatus;
1487
+ locationId?: string;
1488
+ basePrice?: Money;
1489
+ tiers: PriceTier[];
1490
+ }
1491
+ interface CheckoutLineProjection {
1492
+ lines: CheckoutLineProjectionLine[];
1493
+ stockValidation: StockValidation;
1494
+ }
1416
1495
  /**
1417
1496
  * Product reference in cart
1418
1497
  */
@@ -1429,6 +1508,15 @@ interface CartItem {
1429
1508
  id: string | undefined;
1430
1509
  quantity: number;
1431
1510
  stockStatus?: StockStatus;
1511
+ /**
1512
+ * Maximum complete units a single sales-channel warehouse can serve, when
1513
+ * the backend exposes stock. Absent for unmanaged inventory or backorder.
1514
+ */
1515
+ availableQuantity?: number;
1516
+ /** Effective quantity-price ladder, when the backend exposes one. */
1517
+ tiers?: PriceTier[];
1518
+ /** Effective price group's base price, when the backend reports one. */
1519
+ basePrice?: Money;
1432
1520
  cost: {
1433
1521
  totalAmount: Money;
1434
1522
  /**
@@ -1516,6 +1604,28 @@ interface Cart {
1516
1604
  * cart that belongs to another shopper.
1517
1605
  */
1518
1606
  customerId?: string;
1607
+ /**
1608
+ * Contact email stored on the cart.
1609
+ *
1610
+ * For a guest checkout the backend copies it to the order and uses it for the
1611
+ * confirmation email. It is the authoritative contact email; the name and
1612
+ * phone live in `guestContact`.
1613
+ */
1614
+ email?: string;
1615
+ /**
1616
+ * Whether the cart's customer is a registered account (`has_account=true`).
1617
+ *
1618
+ * A guest customer created natively by Medusa has `has_account=false`; the
1619
+ * runtime uses this flag to exclude registered-only instruments such as store
1620
+ * credit.
1621
+ */
1622
+ customerHasAccount?: boolean;
1623
+ /**
1624
+ * Guest contact carried in `cart.metadata.guest_contact`.
1625
+ *
1626
+ * Never written to the Customer record; the order inherits the metadata.
1627
+ */
1628
+ guestContact?: GuestContact;
1519
1629
  /** Backend id of the applied shipping method, when one is selected. */
1520
1630
  selectedShippingMethodId?: string;
1521
1631
  /**
@@ -1526,6 +1636,11 @@ interface Cart {
1526
1636
  * (the applied shipping-method record id). Absent when no method is applied.
1527
1637
  */
1528
1638
  selectedShippingOptionId?: string;
1639
+ /**
1640
+ * One row per promotion resolved from the backend's adjustments. Absent when
1641
+ * the provider does not expose a promotion breakdown.
1642
+ */
1643
+ promotions?: PromotionSummary[];
1529
1644
  /** Platform-specific backend metadata, carried through unchanged. */
1530
1645
  metadata?: Record<string, unknown>;
1531
1646
  }
@@ -1935,9 +2050,24 @@ interface OrderDeliveryGroup {
1935
2050
  /**
1936
2051
  * Order-line ids belonging to this group, only when the backend exposes the
1937
2052
  * membership. Consumers MUST NOT invent an assignment when it is absent.
2053
+ * A line whose allocations span more than one group is ambiguous and is
2054
+ * omitted from every group rather than assigned arbitrarily.
1938
2055
  */
1939
2056
  lineIds?: string[];
1940
2057
  }
2058
+ /** One payment captured/authorized against an order. */
2059
+ type OrderPaymentStatus = 'authorized' | 'captured' | 'canceled' | 'pending';
2060
+ interface OrderPayment {
2061
+ id: string;
2062
+ providerId: string;
2063
+ /** Provider display label when the adapter can resolve one. */
2064
+ label?: string;
2065
+ /** Payment amount in the order currency. */
2066
+ amount?: Money;
2067
+ status: OrderPaymentStatus;
2068
+ capturedAt?: string;
2069
+ canceledAt?: string;
2070
+ }
1941
2071
  /**
1942
2072
  * Order
1943
2073
  *
@@ -1956,6 +2086,14 @@ interface Order {
1956
2086
  fulfillmentStatus: FulfillmentStatus;
1957
2087
  customerId?: string;
1958
2088
  customer?: Customer;
2089
+ /**
2090
+ * Sales channel the order belongs to (Medusa `sales_channel_id`).
2091
+ *
2092
+ * Carried so the runtime can prove a receipt belongs to the validated store
2093
+ * channel before rendering it; a provider that cannot expose it leaves it
2094
+ * absent and the receipt path fails closed.
2095
+ */
2096
+ salesChannelId?: string;
1959
2097
  items: OrderItem[];
1960
2098
  subtotal: Money;
1961
2099
  total: Money;
@@ -1976,7 +2114,20 @@ interface Order {
1976
2114
  providerId?: string;
1977
2115
  label?: string;
1978
2116
  detail?: string;
2117
+ amount?: Money;
2118
+ capturedAt?: string;
1979
2119
  };
2120
+ /**
2121
+ * Every payment on the order, when the backend reports them. Kept separate
2122
+ * from `payment` (the first/primary payment) so a multi-instrument checkout
2123
+ * can render its breakdown after a reload without inventing amounts.
2124
+ */
2125
+ payments?: OrderPayment[];
2126
+ /**
2127
+ * One row per promotion resolved from the order's item and shipping
2128
+ * adjustments. Absent when the backend does not expose a breakdown.
2129
+ */
2130
+ promotions?: PromotionSummary[];
1980
2131
  /** Backend tax rate in basis points, when the order reports one rate. */
1981
2132
  taxRateBps?: number;
1982
2133
  /**
@@ -2725,6 +2876,7 @@ interface AuthProvider {
2725
2876
  *
2726
2877
  * @see packages/adapters/PAYMENT_METHODS_ARCHITECTURE.md
2727
2878
  */
2879
+
2728
2880
  /**
2729
2881
  * Payment method type identifier
2730
2882
  * Normalized across all backends
@@ -2737,7 +2889,7 @@ interface AuthProvider {
2737
2889
  * 'pp_system_default' → type: 'cash_on_delivery'
2738
2890
  * ```
2739
2891
  */
2740
- type PaymentMethodType = 'card' | 'wallet' | 'bank_transfer' | 'buy_now_pay_later' | 'cash_on_delivery' | 'crypto' | 'other';
2892
+ type PaymentMethodType = 'card' | 'wallet' | 'bank_transfer' | 'buy_now_pay_later' | 'cash_on_delivery' | 'crypto' | 'gift_card' | 'store_credit' | 'other';
2741
2893
  /**
2742
2894
  * Payment method features and capabilities
2743
2895
  * Describes what a payment method supports
@@ -2942,6 +3094,89 @@ interface CachedPaymentMethods {
2942
3094
  */
2943
3095
  ttl: number;
2944
3096
  }
3097
+ /**
3098
+ * When a checkout payment is captured.
3099
+ *
3100
+ * - `now`: captured as part of the checkout completion (gift card, store credit,
3101
+ * card/PSP that supports immediate capture).
3102
+ * - `deferred`: authorized at checkout and captured later by the admin (Zelle,
3103
+ * Cash App, system/manual methods).
3104
+ */
3105
+ type CheckoutCapturePolicy = 'now' | 'deferred';
3106
+ /**
3107
+ * One instrument of the checkout payment plan.
3108
+ *
3109
+ * The backend is authoritative: `amount` is the exact amount for this
3110
+ * instrument and the plan must sum to the cart total. Gift card and store credit
3111
+ * carry the data the backend needs to validate and create the payment session.
3112
+ */
3113
+ interface CheckoutPaymentPlanItem {
3114
+ provider_id: string;
3115
+ amount: number;
3116
+ capture: CheckoutCapturePolicy;
3117
+ /** Gift-card code; required when `provider_id` is the gift-card provider. */
3118
+ gift_card_code?: string;
3119
+ /** Store-credit account id; resolved from the customer when omitted. */
3120
+ account_id?: string;
3121
+ }
3122
+ /**
3123
+ * Result of validating a gift-card code before it is added to a payment plan.
3124
+ *
3125
+ * The backend is the authority: this is a read-only check, not a session or a
3126
+ * reservation. The balance and currency belong to the gift card; a valid card
3127
+ * can still be rejected later when the plan is completed if its balance or
3128
+ * currency changed.
3129
+ */
3130
+ type GiftCardValidationResult = {
3131
+ valid: true;
3132
+ status: string;
3133
+ balance: Money;
3134
+ expiresAt?: string;
3135
+ } | {
3136
+ valid: false;
3137
+ reason: string;
3138
+ status?: string;
3139
+ };
3140
+ /**
3141
+ * One store-credit account available to the authenticated customer.
3142
+ *
3143
+ * Amounts are backend-authoritative. The checkout only offers accounts whose
3144
+ * currency matches the cart currency; the backend still validates the account
3145
+ * and amount again when the payment plan is completed.
3146
+ */
3147
+ interface StoreCreditAccountSummary {
3148
+ id: string;
3149
+ currencyCode: string;
3150
+ balance: Money;
3151
+ credits?: Money;
3152
+ debits?: Money;
3153
+ }
3154
+ /**
3155
+ * Authoritative payment state returned by the checkout completion.
3156
+ *
3157
+ * `captured_amount` and `pending_amount` are separate from `total`: the order
3158
+ * total is never reduced by a payment.
3159
+ */
3160
+ interface CheckoutPaymentSummaryPayment {
3161
+ id: string;
3162
+ provider_id: string;
3163
+ amount: number;
3164
+ capture: CheckoutCapturePolicy;
3165
+ captured_at: string | null;
3166
+ }
3167
+ type CheckoutPaymentSummaryStatus = 'captured' | 'partially_captured' | 'pending' | 'reconciliation_required';
3168
+ interface CheckoutPaymentSummary {
3169
+ total: number;
3170
+ captured_amount: number;
3171
+ pending_amount: number;
3172
+ status: CheckoutPaymentSummaryStatus;
3173
+ payments: CheckoutPaymentSummaryPayment[];
3174
+ reconciliation_required: boolean;
3175
+ errors?: Array<{
3176
+ code: string;
3177
+ message: string;
3178
+ }>;
3179
+ }
2945
3180
 
2946
3181
  /**
2947
3182
  * Backend capabilities interface
@@ -3360,6 +3595,7 @@ interface CommerceProvider {
3360
3595
  */
3361
3596
  createCart(options?: {
3362
3597
  regionId?: string;
3598
+ salesChannelId?: string;
3363
3599
  }): Promise<Cart>;
3364
3600
  /**
3365
3601
  * Get an existing cart by ID
@@ -3380,6 +3616,19 @@ interface CommerceProvider {
3380
3616
  * @throws {ProviderAPIError} If the cart cannot be transferred
3381
3617
  */
3382
3618
  assignCartToCustomer?(cartId: string): Promise<Cart>;
3619
+ /**
3620
+ * Persist the guest checkout contact (email + name + phone) on the cart.
3621
+ *
3622
+ * The backend writes `cart.email` and merges
3623
+ * `cart.metadata.guest_contact`; it never writes the Customer record. The
3624
+ * provider must carry no customer token: the cart id is the capability and
3625
+ * the backend enforces the guest/channel rules.
3626
+ *
3627
+ * @param cartId - Cart ID
3628
+ * @param contact - Guest contact values
3629
+ * @returns The updated cart with the contact stored
3630
+ */
3631
+ updateCheckoutGuestContact?(cartId: string, contact: CheckoutGuestContact): Promise<Cart>;
3383
3632
  /**
3384
3633
  * Add items to cart
3385
3634
  * @param cartId - Cart ID
@@ -3541,6 +3790,22 @@ interface CommerceProvider {
3541
3790
  * @throws {ProviderAPIError} If the backend rejects the selection set
3542
3791
  */
3543
3792
  applyCheckoutShippingGroups?(cartId: string, selections: ShippingGroupSelection[]): Promise<void>;
3793
+ /**
3794
+ * Project stock and the effective quantity-price ladder for each cart line
3795
+ * (OPTIONAL).
3796
+ *
3797
+ * The backend selects the effective price group with Medusa's pricing engine
3798
+ * and reports the maximum number of complete units a single sales-channel
3799
+ * warehouse can serve. Callers render the values; they never sum stock across
3800
+ * warehouses, mix price groups or derive a price locally.
3801
+ *
3802
+ * Optional for the same reason as `getCheckoutShippingGroups`; its absence
3803
+ * is an unsupported capability, not an empty projection.
3804
+ *
3805
+ * @param cartId - Cart ID
3806
+ * @throws {ProviderAPIError} If the backend fails or returns an invalid projection
3807
+ */
3808
+ getCheckoutLineProjection?(cartId: string): Promise<CheckoutLineProjection>;
3544
3809
  /**
3545
3810
  * Initiate payment session with provider
3546
3811
  *
@@ -3696,6 +3961,17 @@ interface CommerceProvider {
3696
3961
  * @returns Order or undefined if not found
3697
3962
  */
3698
3963
  getOrder?(orderId: string): Promise<Order | undefined>;
3964
+ /**
3965
+ * Read a single order through the channel-scoped guest receipt route
3966
+ * (OPTIONAL).
3967
+ *
3968
+ * Unlike `getOrder`, the backend resolves the sales channel from the
3969
+ * publishable key and returns 404 for an order from another channel. The
3970
+ * runtime uses it for the unauthenticated confirmation page; a provider
3971
+ * without it falls back to `getOrder` and must expose `Order.salesChannelId`
3972
+ * so the runtime can verify the channel itself.
3973
+ */
3974
+ getCheckoutOrder?(orderId: string): Promise<Order | undefined>;
3699
3975
  /**
3700
3976
  * Get all orders for a customer (optional)
3701
3977
  *
@@ -3766,6 +4042,38 @@ interface CommerceProvider {
3766
4042
  * @throws {Error} If required options are missing (e.g., regionId for Medusa)
3767
4043
  */
3768
4044
  getPaymentMethods(options: PaymentMethodsOptions): Promise<PaymentMethod$1[]>;
4045
+ /**
4046
+ * Validate a gift-card code before it is added to the checkout payment plan
4047
+ * (OPTIONAL).
4048
+ *
4049
+ * Read-only: it must not create a payment session, reserve balance or mutate
4050
+ * the cart. The backend remains the authority; a valid result can still be
4051
+ * rejected when the plan is completed if the balance or currency changed.
4052
+ *
4053
+ * Optional so a provider without gift-card support keeps its existing
4054
+ * contract; callers must treat its absence as an unsupported capability
4055
+ * rather than as an invalid gift card.
4056
+ *
4057
+ * @param code - Gift-card code supplied by the shopper
4058
+ * @returns The backend's validation result, including balance and status
4059
+ * @throws {ProviderAPIError} If the backend fails or returns an invalid shape
4060
+ */
4061
+ validateGiftCard?(code: string): Promise<GiftCardValidationResult>;
4062
+ /**
4063
+ * List the authenticated customer's store-credit accounts (OPTIONAL).
4064
+ *
4065
+ * Read-only: it must not create a payment session or debit the account. The
4066
+ * checkout filters these accounts by the cart currency and lets the shopper
4067
+ * choose one; the backend validates the account and amount again when the
4068
+ * payment plan is completed.
4069
+ *
4070
+ * Optional for the same reason as {@link validateGiftCard}.
4071
+ *
4072
+ * @returns Store-credit accounts with their backend-authoritative balances
4073
+ * @throws {ProviderAPIError} If the customer is not authenticated or the
4074
+ * backend fails
4075
+ */
4076
+ getStoreCreditAccounts?(): Promise<StoreCreditAccountSummary[]>;
3769
4077
  /**
3770
4078
  * Fetch stock locations, optionally filtered by sales channel.
3771
4079
  * Returns empty array when admin config is not provided (graceful degradation).
@@ -7208,4 +7516,4 @@ type UpdateBusinessPolicyResponse = {
7208
7516
  business_policy: string;
7209
7517
  };
7210
7518
 
7211
- export type { AccountDropdownConfig, AccountMenuItem, AcknowledgeCostPriceChangesResponse, ActiveFilter, AddOrderEditItemBody, AddOrderEditItemResponse, Address, AdminApiKey, AdminChannelCategory, AdminChannelCustomer, AdminDropshipperAccount, AdminDropshipperBalance, AdminProduct, AdminProductVariant, AdminSalesChannelRef, AdminSiteConfig, AdminSiteConfigHistoryEntry, AdminSiteConfigHistoryEntryFull, AdminStorefrontConfig, AdminStorefrontSeoDefaults, AdminUser, AdvancedSearchProductsOptions, AssignCategoriesToChannelsBody, AssignCategoriesToChannelsResponse, AssignCollectionsToChannelsBody, AssignCollectionsToChannelsResponse, AuditLog, AuditLogAdapter, AuthConfig, AuthMethod, AuthProvider, AuthResponse, AuthStorage, AuthorConfig, BackendCapabilities, BrandConfig, CachedPaymentMethods, CancelDropshipperOrderResponse, CancelMovementBody, CancelMovementResponse, CancelSettlementBody, Cart, CartCost, CartItem, CartLineInput, CartLineUpdate, CartProduct, CartSession, CatalogAppliedFilters, CatalogFacetDemonstrationSource, CatalogFacetId, CatalogQuery, CatalogQueryFailure, CatalogQueryFailureCode, CatalogQueryFailureRepair, CatalogQueryOutcome, CatalogResults, CatalogSortKey, CategoryMapping, ChartDataPoint, ChatAssistantHealthResponse, ChatIntent, ChatMessage, ChatRequest, ChatResponse, ChatSource, ChatSourceVariant, CheckoutAddressLevel, CheckoutAddressOption, CheckoutAddressValues, CheckoutAdjustmentPayment, CheckoutContactValues, CheckoutCustomerIdentity, CheckoutInterruption, CheckoutInterruptionAction, CheckoutInterruptionKind, CheckoutLocationOptions, CheckoutReadState, CheckoutSavedAddress, CheckoutShippingGroup, CheckoutShippingGroupItem, CheckoutShippingOption, CheckoutSubmission, Collection, CollectionProductsOptions, CommerceProvider, CompareProduct, ConfigHistoryEntry, ConfirmMovementBody, ConfirmMovementResponse, ConfirmOrderEditResponse, ConfirmSettlementBody, Connection, ConvertDropshipperDraftOrderBody, ConvertDropshipperDraftOrderResponse, CostPriceChangeItem, CostPriceChangesCheckResponse, CostPriceChangesResponse, Country, CreateAddressData, CreateAjusteBody, CreateAjusteResponse, CreateCategoryMappingBody, CreateCategoryMappingResponse, CreateCobroBody, CreateCobroResponse, CreateCompensacionBody, CreateCompensacionResponse, CreateDropshipperCategoryBody, CreateDropshipperCustomerBody, CreateDropshipperCustomerResponse, CreateDropshipperDraftOrderBody, CreateDropshipperDraftOrderResponse, CreateDropshipperOrderBody, CreateDropshipperOrderResponse, CreateDropshipperPromotionBody, CreateOrderEditBody, CreateOrderEditResponse, CreateOrderItem, CreateOrderNoteBody, CreateOrderNoteResponse, CreatePagoBody, CreatePagoResponse, CreateReversoBody, CreateReversoResponse, CreateSettlementBody, CreateSettlementResponse, Customer, CustomerOrdersPage, DashboardChanges, DashboardConfig, DashboardMetrics, DashboardMetricsAdapter, DashboardOrdersAdapter, DashboardPeriodMetrics, DashboardProductsAdapter, DashboardStats, DashboardTopProduct, DeleteCategoryMappingResponse, DeleteDropshipperCategoryResponse, DeleteDropshipperDraftOrderResponse, DeleteDropshipperPromotionResponse, DeleteOrderNoteResponse, DesignerConfig, DesignerHistoryEntry, DesignerNavItem, DesignerThemeConfig, DesignerThemePreset, DiscountCode, DropshipperAccount, DropshipperAccountRef, DropshipperAddressBody, DropshipperAddressResponse, DropshipperAttributeDefinition, DropshipperAttributeDefinitionValue, DropshipperBalance, DropshipperCategory, DropshipperCostTier, DropshipperCustomer, DropshipperCustomerAddress, DropshipperCustomerDetail, DropshipperCustomerFinancial, DropshipperCustomerStats, DropshipperDashboardCapabilities, DropshipperDraftOrder, DropshipperDraftOrderItem, DropshipperNotificationEventType, DropshipperNotificationPreference, DropshipperOrder, DropshipperOrderCustomer, DropshipperOrderDetail, DropshipperOrderItem, DropshipperOrderShippingAddress, DropshipperOrderTaxLine, DropshipperOrderTimelineEvent, DropshipperOrderTotals, DropshipperPayableOrder, DropshipperPaymentMethodConfig, DropshipperPendingOrders, DropshipperPriceItem, DropshipperPriceTier, DropshipperProduct, DropshipperProductAttachment, DropshipperProductAttribute, DropshipperProductAttributeValue, DropshipperProductImage, DropshipperProductOption, DropshipperProductOptionValue, DropshipperProductPrivateMedia, DropshipperProfile, DropshipperPromotion, DropshipperReceivableOrder, DropshipperSaleTier, DropshipperShippingGroup, DropshipperShippingGroupOption, DropshipperShippingOption, DropshipperVariant, DynamicSource, Edge, ExtendedCreateDropshipperOrderBody, ExtendedCreateDropshipperOrderResponse, FacetSupport, FilterConfig, FilterOption, FilterSection, FulfillmentOption, FulfillmentSet, FulfillmentStatus, GeoCity, GeoCountry, GeoProvince, GetAdminAccountBalanceResponse, GetAdminDropshipperAccountOrdersResponse, GetAdminDropshipperAccountSettlementsOptions, GetAdminDropshipperAccountSettlementsResponse, GetAdminDropshipperAccountsResponse, GetAdminPriceListsResponse, GetAdminSiteConfigHistoryOptions, GetAdminSiteConfigHistoryResponse, GetAdminSiteConfigResponse, GetAdminStorefrontConfigResponse, GetBusinessPolicyResponse, GetCategoriesCallback, GetCategoriesOptions, GetCategoryMappingsOptions, GetCategoryMappingsResponse, GetCategorySalesChannelsResponse, GetChannelApiKeysResponse, GetChannelCategoriesOptions, GetChannelCategoriesResponse, GetChannelCustomersOptions, GetChannelCustomersResponse, GetCollectionSalesChannelsResponse, GetCollectionsOptions, GetCustomerOrdersPageOptions, GetCustomersCallback, GetCustomersOptions, GetDashboardStatsOptions, GetDashboardStatsResponse, GetDropshipperAccountBalanceResponse, GetDropshipperAccountOrdersOptions, GetDropshipperAccountOrdersResponse, GetDropshipperAccountResponse, GetDropshipperAddressesResponse, GetDropshipperAttributesResponse, GetDropshipperCategoriesOptions, GetDropshipperCategoriesResponse, GetDropshipperCustomerDetailResponse, GetDropshipperCustomersOptions, GetDropshipperCustomersResponse, GetDropshipperDraftOrderDetailResponse, GetDropshipperDraftOrdersOptions, GetDropshipperDraftOrdersResponse, GetDropshipperOrderDetailResponse, GetDropshipperOrdersOptions, GetDropshipperOrdersResponse, GetDropshipperPayableResponse, GetDropshipperProductsOptions, GetDropshipperProductsResponse, GetDropshipperPromotionsOptions, GetDropshipperPromotionsResponse, GetDropshipperReceivableResponse, GetDropshipperShippingOptionsBody, GetDropshipperShippingOptionsResponse, GetFinancialAnalysisResponse, GetGeoCitiesResponse, GetGeoCountriesResponse, GetGeoProvincesResponse, GetMyProfileResponse, GetNotificationPreferencesResponse, GetNotificationsOptions, GetNotificationsResponse, GetOrderNotesResponse, GetOrdersCallback, GetOrdersOptions, GetProductAttributesResponse, GetProductsOptions, GetProviderCategoriesResponse, GetSettlementDetailResponse, GetSettlementsOptions, GetSettlementsResponse, GetStorefrontDropshipperCategoriesResponse, GetUserChannelResponse, HeaderLinkItem, HeaderNavigationConfig, IconConfig, Image, InterestCategory, InventoryLevel, LinkCustomerToChannelResponse, LoginCredentials, ManualAdminNotificationData, ModulesConfig, Money, NavigationCalloutItem, NavigationItem, NavigationLinkItem, NotificationData, OnboardDropshipperBody, OnboardDropshipperResponse, Order, OrderDeliveryGroup, OrderItem, OrderNote, OrderReceipt, OrderStatus, OrdersMetrics, PaginationOptions, PasswordResetConfirm, PasswordResetRequest, PaymentMethod$1 as PaymentMethod, PaymentMethodFeatures, PaymentMethodType, PaymentMethodsOptions, PaymentStatus, PreviewDropshipperOrderItem, PreviewDropshipperOrderTotalsBody, PreviewDropshipperOrderTotalsResponse, PriceRange, PriceUpdatedNotificationData, Product, ProductAssignedNotificationData, ProductCategory, ProductOption, ProductPreview, ProductVariant, ProductsMetrics, PromotionRule, ProviderCategory, ProviderConfig, ProviderTypeString, QueryEntitiesInput, QueryEntityInput, QueryErrors, QueryMeta, QueryResponse, QuerySortDirection, RawNotification, RecoveryConfirmResult, Region, RegisterData, RegisterPaymentBody, RegisterPaymentResponse, RequestedProfile, ResolveGuaranteeBody, ResolveGuaranteeResponse, RestoreSiteConfigResponse, Review, SEO, SalesChannelType, SalesMetrics, SearchBarConfig, SearchResultMeta, SelectedOption, SetPaymentCollectorBody, SetPaymentCollectorResponse, SetPaymentMethodBody, SetPaymentMethodResponse, SettlementRecord, SettlementStatus, ShippingGroup, ShippingGroupInput, ShippingGroupItem, ShippingGroupLocation, ShippingGroupOption, ShippingGroupQuote, ShippingGroupSelection, ShippingMethod, ShopperIdentity, SiteConfig, SiteConfigLabels, SiteConfigMetadata, SocialConfig, SortOption, SortOptions, StockChangeNotificationData, StockLocation, StockStatus, StockValidation, StoreContext, StorefrontConfig, StorefrontContext, StorefrontPlatformType, StorefrontSeoDefaults, SubmitApplicationBody, SubmitApplicationConflictApplication, SubmitApplicationCreated, SubmitApplicationResponse, SubmitApplicationResult, SubmitApplicationSalesChannel, TokenVerifyResult, TokenVerifyState, UnassignCategoriesFromChannelsBody, UnassignCategoriesFromChannelsResponse, UnassignCollectionsFromChannelsBody, UnassignCollectionsFromChannelsResponse, UpdateBusinessPolicyBody, UpdateBusinessPolicyResponse, UpdateCustomerData, UpdateDropshipperCategoryBody, UpdateDropshipperCustomerBody, UpdateDropshipperCustomerResponse, UpdateDropshipperDraftOrderBody, UpdateDropshipperDraftOrderResponse, UpdateDropshipperPricesBody, UpdateDropshipperPricesResponse, UpdateDropshipperProductStatusBody, UpdateDropshipperProductStatusResponse, UpdateDropshipperPromotionBody, UpdateNotificationPreferencesBody, UpdateSettlementStatusResponse, UpdateSiteConfigBody, UpdateSiteConfigResponse, UpdateStorefrontConfigBody, UpdateStorefrontConfigResponse, ValidateCheckoutItemsRequest, ValidateCheckoutItemsResponse, ValidateGiftCardBody, ValidateGiftCardResponse, ValidatedCheckoutItem };
7519
+ export type { AccountDropdownConfig, AccountMenuItem, AcknowledgeCostPriceChangesResponse, ActiveFilter, AddOrderEditItemBody, AddOrderEditItemResponse, Address, AdminApiKey, AdminChannelCategory, AdminChannelCustomer, AdminDropshipperAccount, AdminDropshipperBalance, AdminProduct, AdminProductVariant, AdminSalesChannelRef, AdminSiteConfig, AdminSiteConfigHistoryEntry, AdminSiteConfigHistoryEntryFull, AdminStorefrontConfig, AdminStorefrontSeoDefaults, AdminUser, AdvancedSearchProductsOptions, AssignCategoriesToChannelsBody, AssignCategoriesToChannelsResponse, AssignCollectionsToChannelsBody, AssignCollectionsToChannelsResponse, AuditLog, AuditLogAdapter, AuthConfig, AuthMethod, AuthProvider, AuthResponse, AuthStorage, AuthorConfig, BackendCapabilities, BrandConfig, CachedPaymentMethods, CancelDropshipperOrderResponse, CancelMovementBody, CancelMovementResponse, CancelSettlementBody, Cart, CartCost, CartItem, CartLineInput, CartLineUpdate, CartProduct, CartSession, CatalogAppliedFilters, CatalogFacetDemonstrationSource, CatalogFacetId, CatalogQuery, CatalogQueryFailure, CatalogQueryFailureCode, CatalogQueryFailureRepair, CatalogQueryOutcome, CatalogResults, CatalogSortKey, CategoryMapping, ChartDataPoint, ChatAssistantHealthResponse, ChatIntent, ChatMessage, ChatRequest, ChatResponse, ChatSource, ChatSourceVariant, CheckoutAddressLevel, CheckoutAddressOption, CheckoutAddressValues, CheckoutAdjustmentPayment, CheckoutCapturePolicy, CheckoutContactValues, CheckoutCustomerIdentity, CheckoutGuestContact, CheckoutInterruption, CheckoutInterruptionAction, CheckoutInterruptionKind, CheckoutLineProjection, CheckoutLineProjectionLine, CheckoutLocationOptions, CheckoutPaymentPlanItem, CheckoutPaymentSummary, CheckoutPaymentSummaryPayment, CheckoutPaymentSummaryStatus, CheckoutReadState, CheckoutSavedAddress, CheckoutShippingGroup, CheckoutShippingGroupItem, CheckoutShippingOption, CheckoutSubmission, Collection, CollectionProductsOptions, CommerceProvider, CompareProduct, ConfigHistoryEntry, ConfirmMovementBody, ConfirmMovementResponse, ConfirmOrderEditResponse, ConfirmSettlementBody, Connection, ConvertDropshipperDraftOrderBody, ConvertDropshipperDraftOrderResponse, CostPriceChangeItem, CostPriceChangesCheckResponse, CostPriceChangesResponse, Country, CreateAddressData, CreateAjusteBody, CreateAjusteResponse, CreateCategoryMappingBody, CreateCategoryMappingResponse, CreateCobroBody, CreateCobroResponse, CreateCompensacionBody, CreateCompensacionResponse, CreateDropshipperCategoryBody, CreateDropshipperCustomerBody, CreateDropshipperCustomerResponse, CreateDropshipperDraftOrderBody, CreateDropshipperDraftOrderResponse, CreateDropshipperOrderBody, CreateDropshipperOrderResponse, CreateDropshipperPromotionBody, CreateOrderEditBody, CreateOrderEditResponse, CreateOrderItem, CreateOrderNoteBody, CreateOrderNoteResponse, CreatePagoBody, CreatePagoResponse, CreateReversoBody, CreateReversoResponse, CreateSettlementBody, CreateSettlementResponse, Customer, CustomerOrdersPage, DashboardChanges, DashboardConfig, DashboardMetrics, DashboardMetricsAdapter, DashboardOrdersAdapter, DashboardPeriodMetrics, DashboardProductsAdapter, DashboardStats, DashboardTopProduct, DeleteCategoryMappingResponse, DeleteDropshipperCategoryResponse, DeleteDropshipperDraftOrderResponse, DeleteDropshipperPromotionResponse, DeleteOrderNoteResponse, DesignerConfig, DesignerHistoryEntry, DesignerNavItem, DesignerThemeConfig, DesignerThemePreset, DiscountCode, DropshipperAccount, DropshipperAccountRef, DropshipperAddressBody, DropshipperAddressResponse, DropshipperAttributeDefinition, DropshipperAttributeDefinitionValue, DropshipperBalance, DropshipperCategory, DropshipperCostTier, DropshipperCustomer, DropshipperCustomerAddress, DropshipperCustomerDetail, DropshipperCustomerFinancial, DropshipperCustomerStats, DropshipperDashboardCapabilities, DropshipperDraftOrder, DropshipperDraftOrderItem, DropshipperNotificationEventType, DropshipperNotificationPreference, DropshipperOrder, DropshipperOrderCustomer, DropshipperOrderDetail, DropshipperOrderItem, DropshipperOrderShippingAddress, DropshipperOrderTaxLine, DropshipperOrderTimelineEvent, DropshipperOrderTotals, DropshipperPayableOrder, DropshipperPaymentMethodConfig, DropshipperPendingOrders, DropshipperPriceItem, DropshipperPriceTier, DropshipperProduct, DropshipperProductAttachment, DropshipperProductAttribute, DropshipperProductAttributeValue, DropshipperProductImage, DropshipperProductOption, DropshipperProductOptionValue, DropshipperProductPrivateMedia, DropshipperProfile, DropshipperPromotion, DropshipperReceivableOrder, DropshipperSaleTier, DropshipperShippingGroup, DropshipperShippingGroupOption, DropshipperShippingOption, DropshipperVariant, DynamicSource, Edge, ExtendedCreateDropshipperOrderBody, ExtendedCreateDropshipperOrderResponse, FacetSupport, FilterConfig, FilterOption, FilterSection, FulfillmentOption, FulfillmentSet, FulfillmentStatus, GeoCity, GeoCountry, GeoProvince, GetAdminAccountBalanceResponse, GetAdminDropshipperAccountOrdersResponse, GetAdminDropshipperAccountSettlementsOptions, GetAdminDropshipperAccountSettlementsResponse, GetAdminDropshipperAccountsResponse, GetAdminPriceListsResponse, GetAdminSiteConfigHistoryOptions, GetAdminSiteConfigHistoryResponse, GetAdminSiteConfigResponse, GetAdminStorefrontConfigResponse, GetBusinessPolicyResponse, GetCategoriesCallback, GetCategoriesOptions, GetCategoryMappingsOptions, GetCategoryMappingsResponse, GetCategorySalesChannelsResponse, GetChannelApiKeysResponse, GetChannelCategoriesOptions, GetChannelCategoriesResponse, GetChannelCustomersOptions, GetChannelCustomersResponse, GetCollectionSalesChannelsResponse, GetCollectionsOptions, GetCustomerOrdersPageOptions, GetCustomersCallback, GetCustomersOptions, GetDashboardStatsOptions, GetDashboardStatsResponse, GetDropshipperAccountBalanceResponse, GetDropshipperAccountOrdersOptions, GetDropshipperAccountOrdersResponse, GetDropshipperAccountResponse, GetDropshipperAddressesResponse, GetDropshipperAttributesResponse, GetDropshipperCategoriesOptions, GetDropshipperCategoriesResponse, GetDropshipperCustomerDetailResponse, GetDropshipperCustomersOptions, GetDropshipperCustomersResponse, GetDropshipperDraftOrderDetailResponse, GetDropshipperDraftOrdersOptions, GetDropshipperDraftOrdersResponse, GetDropshipperOrderDetailResponse, GetDropshipperOrdersOptions, GetDropshipperOrdersResponse, GetDropshipperPayableResponse, GetDropshipperProductsOptions, GetDropshipperProductsResponse, GetDropshipperPromotionsOptions, GetDropshipperPromotionsResponse, GetDropshipperReceivableResponse, GetDropshipperShippingOptionsBody, GetDropshipperShippingOptionsResponse, GetFinancialAnalysisResponse, GetGeoCitiesResponse, GetGeoCountriesResponse, GetGeoProvincesResponse, GetMyProfileResponse, GetNotificationPreferencesResponse, GetNotificationsOptions, GetNotificationsResponse, GetOrderNotesResponse, GetOrdersCallback, GetOrdersOptions, GetProductAttributesResponse, GetProductsOptions, GetProviderCategoriesResponse, GetSettlementDetailResponse, GetSettlementsOptions, GetSettlementsResponse, GetStorefrontDropshipperCategoriesResponse, GetUserChannelResponse, GiftCardValidationResult, GuestContact, HeaderLinkItem, HeaderNavigationConfig, IconConfig, Image, InterestCategory, InventoryLevel, LinkCustomerToChannelResponse, LoginCredentials, ManualAdminNotificationData, ModulesConfig, Money, NavigationCalloutItem, NavigationItem, NavigationLinkItem, NotificationData, OnboardDropshipperBody, OnboardDropshipperResponse, Order, OrderDeliveryGroup, OrderItem, OrderNote, OrderPayment, OrderPaymentStatus, OrderReceipt, OrderStatus, OrdersMetrics, PaginationOptions, PasswordResetConfirm, PasswordResetRequest, PaymentMethod$1 as PaymentMethod, PaymentMethodFeatures, PaymentMethodType, PaymentMethodsOptions, PaymentStatus, PreviewDropshipperOrderItem, PreviewDropshipperOrderTotalsBody, PreviewDropshipperOrderTotalsResponse, PriceRange, PriceTier, PriceUpdatedNotificationData, Product, ProductAssignedNotificationData, ProductCategory, ProductOption, ProductPreview, ProductVariant, ProductsMetrics, PromotionKind, PromotionRule, PromotionScope, PromotionSummary, ProviderCategory, ProviderConfig, ProviderTypeString, QueryEntitiesInput, QueryEntityInput, QueryErrors, QueryMeta, QueryResponse, QuerySortDirection, RawNotification, RecoveryConfirmResult, Region, RegisterData, RegisterPaymentBody, RegisterPaymentResponse, RequestedProfile, ResolveGuaranteeBody, ResolveGuaranteeResponse, RestoreSiteConfigResponse, Review, SEO, SalesChannelType, SalesMetrics, SearchBarConfig, SearchResultMeta, SelectedOption, SetPaymentCollectorBody, SetPaymentCollectorResponse, SetPaymentMethodBody, SetPaymentMethodResponse, SettlementRecord, SettlementStatus, ShippingGroup, ShippingGroupInput, ShippingGroupItem, ShippingGroupLocation, ShippingGroupOption, ShippingGroupQuote, ShippingGroupSelection, ShippingMethod, ShopperIdentity, SiteConfig, SiteConfigLabels, SiteConfigMetadata, SocialConfig, SortOption, SortOptions, StockChangeNotificationData, StockLocation, StockStatus, StockValidation, StoreContext, StoreCreditAccountSummary, StorefrontConfig, StorefrontContext, StorefrontPlatformType, StorefrontSeoDefaults, SubmitApplicationBody, SubmitApplicationConflictApplication, SubmitApplicationCreated, SubmitApplicationResponse, SubmitApplicationResult, SubmitApplicationSalesChannel, TokenVerifyResult, TokenVerifyState, UnassignCategoriesFromChannelsBody, UnassignCategoriesFromChannelsResponse, UnassignCollectionsFromChannelsBody, UnassignCollectionsFromChannelsResponse, UpdateBusinessPolicyBody, UpdateBusinessPolicyResponse, UpdateCustomerData, UpdateDropshipperCategoryBody, UpdateDropshipperCustomerBody, UpdateDropshipperCustomerResponse, UpdateDropshipperDraftOrderBody, UpdateDropshipperDraftOrderResponse, UpdateDropshipperPricesBody, UpdateDropshipperPricesResponse, UpdateDropshipperProductStatusBody, UpdateDropshipperProductStatusResponse, UpdateDropshipperPromotionBody, UpdateNotificationPreferencesBody, UpdateSettlementStatusResponse, UpdateSiteConfigBody, UpdateSiteConfigResponse, UpdateStorefrontConfigBody, UpdateStorefrontConfigResponse, ValidateCheckoutItemsRequest, ValidateCheckoutItemsResponse, ValidateGiftCardBody, ValidateGiftCardResponse, ValidatedCheckoutItem };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @thorprovider/types v1.0\n * Shared TypeScript types for Thor Commerce ecosystem\n * \n * Pure type definitions with zero runtime dependencies.\n * Foundation for type-safe commerce operations following SOLID principles.\n */\n\n// ============================================\n// Common Types\n// ============================================\nexport type {\n Money,\n Image,\n SEO,\n Connection,\n Edge,\n PaginationOptions,\n SortOptions,\n Country,\n} from './common';\n\n// ============================================\n// Commerce Contracts (single-store context + guest shapes)\n// ============================================\nexport type {\n StoreContext,\n ShopperIdentity,\n CartSession,\n OrderReceipt,\n} from './commerce';\n\n// ============================================\n// Checkout Contracts (type-only)\n// ============================================\nexport type {\n CheckoutReadState,\n CheckoutAddressOption,\n CheckoutAddressLevel,\n CheckoutLocationOptions,\n CheckoutAddressValues,\n CheckoutContactValues,\n CheckoutCustomerIdentity,\n CheckoutSavedAddress,\n CheckoutShippingOption,\n CheckoutShippingGroup,\n CheckoutShippingGroupItem,\n CheckoutAdjustmentPayment,\n CheckoutInterruptionKind,\n CheckoutInterruptionAction,\n CheckoutInterruption,\n CheckoutSubmission,\n} from './checkout';\n\n// ============================================\n// Grouped Shipping Contracts (type-only)\n// ============================================\nexport type {\n ShippingGroupLocation,\n ShippingGroupOption,\n ShippingGroupItem,\n ShippingGroup,\n ShippingGroupQuote,\n ShippingGroupSelection,\n} from './shipping';\n\nexport type {\n AuthorConfig,\n BrandConfig,\n ModulesConfig,\n NavigationItem,\n SiteConfig,\n SocialConfig,\n} from './site-config';\n\nexport type { SiteConfigLabels } from './site-config-labels';\n\n// ============================================\n// Unified Query Types\n// ============================================\nexport type {\n QuerySortDirection,\n QueryEntityInput,\n QueryEntitiesInput,\n QueryMeta,\n QueryErrors,\n QueryResponse,\n} from './query';\n\n// ============================================\n// Catalog Query & Facet Support Types\n// ============================================\nexport type {\n CatalogSortKey,\n CatalogQuery,\n CatalogAppliedFilters,\n CatalogFacetId,\n CatalogFacetDemonstrationSource,\n FacetSupport,\n CatalogResults,\n CatalogQueryFailureCode,\n CatalogQueryFailureRepair,\n CatalogQueryFailure,\n CatalogQueryOutcome,\n} from './catalog';\n\n// ============================================\n// Product Types\n// ============================================\nexport type {\n Product,\n ProductOption,\n ProductVariant,\n SelectedOption,\n PriceRange,\n GetProductsOptions,\n ActiveFilter,\n SortOption,\n FilterSection,\n FilterOption,\n ProductPreview,\n Review,\n CompareProduct,\n AdminProductVariant,\n AdminProduct,\n AdvancedSearchProductsOptions,\n SearchResultMeta,\n FilterConfig,\n} from './product';\n\n// ============================================\n// Cart Types\n// ============================================\nexport type {\n Cart,\n CartItem,\n CartProduct,\n CartCost,\n CartLineInput,\n CartLineUpdate,\n ShippingMethod,\n DiscountCode,\n} from './cart';\n\n// ============================================\n// Inventory & Fulfillment Types\n// ============================================\nexport type {\n StockLocation,\n InventoryLevel,\n FulfillmentSet,\n FulfillmentOption,\n StockStatus,\n StockValidation,\n} from './stock-location';\n\n// ============================================\n// Collection Types\n// ============================================\nexport type {\n Collection,\n CollectionProductsOptions,\n GetCollectionsOptions,\n} from './collection';\n\n// ============================================\n// Category Types\n// ============================================\nexport type {\n ProductCategory,\n GetCategoriesOptions,\n GetCategoriesCallback,\n} from './category';\n\n// ============================================\n// Customer Types\n// ============================================\nexport type {\n Customer,\n Address,\n GetCustomersOptions,\n GetCustomersCallback,\n} from './customer';\n\n// ============================================\n// Region Types\n// ============================================\nexport type {\n Region,\n} from './region';\n\n// ============================================\n// Order Types\n// ============================================\nexport type {\n Order,\n OrderDeliveryGroup,\n OrderItem,\n OrderStatus,\n PaymentStatus,\n FulfillmentStatus,\n GetOrdersOptions,\n GetOrdersCallback,\n GetCustomerOrdersPageOptions,\n CustomerOrdersPage,\n} from './order';\n\n// ============================================\n// Provider Types (L1 - type-only)\n// Runtime provider registry lives in @thorprovider/adapters\n// ============================================\nexport type { ProviderTypeString } from './provider';\n\n// ============================================\n// Storefront Types\n// ============================================\nexport type {\n StorefrontContext,\n StorefrontPlatformType,\n} from './storefront';\n\n// ============================================\n// Storefront Configuration Types\n// ============================================\nexport type {\n StorefrontConfig,\n StorefrontSeoDefaults,\n} from './storefront-config';\n\n// ============================================\n// Designer Configuration Types\n// ============================================\nexport type {\n DesignerConfig,\n DesignerThemeConfig,\n DesignerThemePreset,\n DesignerNavItem,\n DesignerHistoryEntry,\n} from './designer-config';\n\n// ============================================\n// Auth Types\n// ============================================\nexport type {\n AuthProvider,\n AuthConfig,\n AuthMethod,\n AuthStorage,\n LoginCredentials,\n RegisterData,\n AuthResponse,\n UpdateCustomerData,\n CreateAddressData,\n PasswordResetRequest,\n PasswordResetConfirm,\n TokenVerifyState,\n TokenVerifyResult,\n RecoveryConfirmResult,\n SalesChannelType,\n InterestCategory,\n RequestedProfile,\n SubmitApplicationSalesChannel,\n SubmitApplicationBody,\n SubmitApplicationCreated,\n SubmitApplicationConflictApplication,\n SubmitApplicationResponse,\n SubmitApplicationResult,\n} from './auth';\n\n// ============================================\n// Payment Types\n// ============================================\nexport type {\n PaymentMethod,\n PaymentMethodType,\n PaymentMethodFeatures,\n PaymentMethodsOptions,\n CachedPaymentMethods,\n} from './payment';\n\n// ============================================\n// Commerce Provider Interface\n// ============================================\nexport type {\n CommerceProvider,\n BackendCapabilities,\n ProviderConfig,\n} from './commerce-provider';\n\n// ============================================\n// Admin Types\n// ============================================\nexport type {\n AdminUser,\n AuditLog,\n DashboardConfig,\n DashboardMetrics,\n SalesMetrics,\n OrdersMetrics,\n ProductsMetrics,\n ChartDataPoint,\n DashboardMetricsAdapter,\n DashboardOrdersAdapter,\n DashboardProductsAdapter,\n AuditLogAdapter,\n SiteConfigMetadata,\n ConfigHistoryEntry,\n // Multi-tenant admin types\n AdminChannelCustomer,\n GetChannelCustomersResponse,\n GetChannelCustomersOptions,\n AdminApiKey,\n GetChannelApiKeysResponse,\n AdminChannelCategory,\n GetChannelCategoriesResponse,\n GetChannelCategoriesOptions,\n AdminSalesChannelRef,\n GetCategorySalesChannelsResponse,\n AssignCategoriesToChannelsBody,\n AssignCategoriesToChannelsResponse,\n UnassignCategoriesFromChannelsBody,\n UnassignCategoriesFromChannelsResponse,\n GetCollectionSalesChannelsResponse,\n AssignCollectionsToChannelsBody,\n AssignCollectionsToChannelsResponse,\n UnassignCollectionsFromChannelsBody,\n UnassignCollectionsFromChannelsResponse,\n AdminStorefrontSeoDefaults,\n AdminStorefrontConfig,\n GetAdminStorefrontConfigResponse,\n UpdateStorefrontConfigBody,\n UpdateStorefrontConfigResponse,\n AdminSiteConfigHistoryEntry,\n AdminSiteConfig,\n GetAdminSiteConfigResponse,\n UpdateSiteConfigBody,\n UpdateSiteConfigResponse,\n AdminSiteConfigHistoryEntryFull,\n GetAdminSiteConfigHistoryResponse,\n GetAdminSiteConfigHistoryOptions,\n RestoreSiteConfigResponse,\n LinkCustomerToChannelResponse,\n // Dropshipping types\n DropshipperAccountRef,\n DropshipperCostTier,\n DropshipperSaleTier,\n OnboardDropshipperBody,\n OnboardDropshipperResponse,\n DropshipperVariant,\n DropshipperProduct,\n DropshipperProductImage,\n DropshipperProductAttachment,\n DropshipperProductPrivateMedia,\n GetDropshipperProductsOptions,\n GetDropshipperProductsResponse,\n ValidateCheckoutItemsRequest,\n ValidatedCheckoutItem,\n ValidateCheckoutItemsResponse,\n UpdateDropshipperProductStatusBody,\n UpdateDropshipperProductStatusResponse,\n DropshipperPriceTier,\n DropshipperPriceItem,\n UpdateDropshipperPricesBody,\n UpdateDropshipperPricesResponse,\n DropshipperOrderCustomer,\n DropshipperOrder,\n GetDropshipperOrdersOptions,\n GetDropshipperOrdersResponse,\n DropshipperShippingOption,\n DropshipperShippingGroupOption,\n DropshipperShippingGroup,\n ShippingGroupInput,\n GetDropshipperShippingOptionsBody,\n GetDropshipperShippingOptionsResponse,\n DropshipperOrderShippingAddress,\n DropshipperOrderItem,\n DropshipperOrderTotals,\n DropshipperOrderTaxLine,\n DropshipperOrderTimelineEvent,\n DropshipperOrderDetail,\n GetDropshipperOrderDetailResponse,\n CreateOrderItem,\n CreateDropshipperOrderBody,\n CreateDropshipperOrderResponse,\n ExtendedCreateDropshipperOrderBody,\n ExtendedCreateDropshipperOrderResponse,\n SetPaymentCollectorBody,\n SetPaymentCollectorResponse,\n SetPaymentMethodBody,\n SetPaymentMethodResponse,\n ValidateGiftCardBody,\n ValidateGiftCardResponse,\n DropshipperCategory,\n GetDropshipperCategoriesOptions,\n GetDropshipperCategoriesResponse,\n CreateDropshipperCategoryBody,\n UpdateDropshipperCategoryBody,\n DeleteDropshipperCategoryResponse,\n ProviderCategory,\n GetProviderCategoriesResponse,\n GetCategoryMappingsOptions,\n CategoryMapping,\n GetCategoryMappingsResponse,\n CreateCategoryMappingBody,\n CreateCategoryMappingResponse,\n DeleteCategoryMappingResponse,\n DropshipperCustomer,\n DropshipperCustomerStats,\n DropshipperCustomerFinancial,\n DropshipperCustomerAddress,\n DropshipperCustomerDetail,\n GetDropshipperCustomersOptions,\n GetDropshipperCustomersResponse,\n GetDropshipperCustomerDetailResponse,\n CreateDropshipperCustomerBody,\n CreateDropshipperCustomerResponse,\n UpdateDropshipperCustomerBody,\n UpdateDropshipperCustomerResponse,\n DropshipperBalance,\n DropshipperPendingOrders,\n DropshipperPaymentMethodConfig,\n DropshipperAccount,\n GetDropshipperAccountResponse,\n DropshipperPayableOrder,\n GetDropshipperPayableResponse,\n DropshipperReceivableOrder,\n GetDropshipperReceivableResponse,\n SettlementRecord,\n GetSettlementsOptions,\n GetSettlementsResponse,\n GetSettlementDetailResponse,\n CreateSettlementBody,\n CreateSettlementResponse,\n ConfirmSettlementBody,\n CancelSettlementBody,\n UpdateSettlementStatusResponse,\n AdminDropshipperAccount,\n AdminDropshipperBalance,\n GetAdminDropshipperAccountsResponse,\n GetAdminAccountBalanceResponse,\n GetAdminPriceListsResponse,\n GetUserChannelResponse,\n DropshipperPromotion,\n GetDropshipperPromotionsOptions,\n GetDropshipperPromotionsResponse,\n PromotionRule,\n CreateDropshipperPromotionBody,\n UpdateDropshipperPromotionBody,\n DeleteDropshipperPromotionResponse,\n GetDashboardStatsOptions,\n DashboardPeriodMetrics,\n DashboardChanges,\n DashboardTopProduct,\n DashboardStats,\n GetDashboardStatsResponse,\n GetStorefrontDropshipperCategoriesResponse,\n OrderNote,\n CreateOrderNoteBody,\n GetOrderNotesResponse,\n CreateOrderNoteResponse,\n DeleteOrderNoteResponse,\n // Order cancel and edits\n CancelDropshipperOrderResponse,\n CreateOrderEditBody,\n CreateOrderEditResponse,\n AddOrderEditItemBody,\n AddOrderEditItemResponse,\n ConfirmOrderEditResponse,\n // Draft Orders\n DropshipperDraftOrderItem,\n DropshipperDraftOrder,\n GetDropshipperDraftOrdersOptions,\n GetDropshipperDraftOrdersResponse,\n CreateDropshipperDraftOrderBody,\n CreateDropshipperDraftOrderResponse,\n GetDropshipperDraftOrderDetailResponse,\n UpdateDropshipperDraftOrderBody,\n UpdateDropshipperDraftOrderResponse,\n ConvertDropshipperDraftOrderBody,\n ConvertDropshipperDraftOrderResponse,\n DeleteDropshipperDraftOrderResponse,\n // Order totals preview\n PreviewDropshipperOrderItem,\n PreviewDropshipperOrderTotalsBody,\n PreviewDropshipperOrderTotalsResponse,\n // Dropshipper addresses (channel-scoped)\n DropshipperAddressBody,\n DropshipperAddressResponse,\n GetDropshipperAddressesResponse,\n // Financial Endpoints — Group A\n SettlementStatus,\n GetDropshipperAccountBalanceResponse,\n GetDropshipperAccountOrdersOptions,\n GetDropshipperAccountOrdersResponse,\n GetAdminDropshipperAccountOrdersResponse,\n GetAdminDropshipperAccountSettlementsOptions,\n GetAdminDropshipperAccountSettlementsResponse,\n ResolveGuaranteeBody,\n ResolveGuaranteeResponse,\n CreateCompensacionBody,\n CreateCompensacionResponse,\n CreateAjusteBody,\n CreateAjusteResponse,\n // Financial Endpoints — Group B\n CreateCobroBody,\n CreateCobroResponse,\n CreatePagoBody,\n CreatePagoResponse,\n CreateReversoBody,\n CreateReversoResponse,\n ConfirmMovementBody,\n ConfirmMovementResponse,\n CancelMovementBody,\n CancelMovementResponse,\n GetFinancialAnalysisResponse,\n RegisterPaymentBody,\n RegisterPaymentResponse,\n // Dashboard Capabilities\n DropshipperDashboardCapabilities,\n // AI Assistant Chat\n ChatMessage,\n ChatRequest,\n ChatIntent,\n ChatSource,\n ChatSourceVariant,\n ChatResponse,\n ChatAssistantHealthResponse,\n // Geo-reference\n GeoCountry,\n GeoProvince,\n GeoCity,\n GetGeoCountriesResponse,\n GetGeoProvincesResponse,\n GetGeoCitiesResponse,\n // Product Attributes\n DropshipperProductAttribute,\n DropshipperProductAttributeValue,\n GetProductAttributesResponse,\n DropshipperAttributeDefinition,\n DropshipperAttributeDefinitionValue,\n GetDropshipperAttributesResponse,\n DropshipperProductOption,\n DropshipperProductOptionValue,\n // Dropshipper Profile\n DropshipperProfile,\n GetMyProfileResponse,\n // Cost Price Changes Detection\n CostPriceChangesCheckResponse,\n CostPriceChangeItem,\n CostPriceChangesResponse,\n AcknowledgeCostPriceChangesResponse,\n // Notifications\n NotificationData,\n PriceUpdatedNotificationData,\n ProductAssignedNotificationData,\n StockChangeNotificationData,\n ManualAdminNotificationData,\n RawNotification,\n GetNotificationsOptions,\n GetNotificationsResponse,\n // Notification preferences\n DropshipperNotificationEventType,\n DropshipperNotificationPreference,\n UpdateNotificationPreferencesBody,\n GetNotificationPreferencesResponse,\n } from './admin';\n\n// ============================================\n// Dropshipper Business Policy Types\n// ============================================\nexport type {\n GetBusinessPolicyResponse,\n UpdateBusinessPolicyBody,\n UpdateBusinessPolicyResponse,\n} from './dropshipper-business-policy';\n\n// ============================================\n// Header Configuration Types\n// ============================================\nexport type {\n IconConfig,\n NavigationCalloutItem,\n NavigationLinkItem,\n DynamicSource,\n HeaderLinkItem,\n AccountMenuItem,\n AccountDropdownConfig,\n SearchBarConfig,\n HeaderNavigationConfig,\n} from './header-config';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @thorprovider/types v1.0\n * Shared TypeScript types for Thor Commerce ecosystem\n * \n * Pure type definitions with zero runtime dependencies.\n * Foundation for type-safe commerce operations following SOLID principles.\n */\n\n// ============================================\n// Common Types\n// ============================================\nexport type {\n Money,\n Image,\n SEO,\n Connection,\n Edge,\n PaginationOptions,\n SortOptions,\n Country,\n PromotionKind,\n PromotionScope,\n PromotionSummary,\n} from './common';\n\n// ============================================\n// Commerce Contracts (single-store context + guest shapes)\n// ============================================\nexport type {\n StoreContext,\n ShopperIdentity,\n CartSession,\n OrderReceipt,\n} from './commerce';\n\n// ============================================\n// Checkout Contracts (type-only)\n// ============================================\nexport type {\n CheckoutReadState,\n CheckoutAddressOption,\n CheckoutAddressLevel,\n CheckoutLocationOptions,\n CheckoutAddressValues,\n CheckoutContactValues,\n GuestContact,\n CheckoutGuestContact,\n CheckoutCustomerIdentity,\n CheckoutSavedAddress,\n CheckoutShippingOption,\n CheckoutShippingGroup,\n CheckoutShippingGroupItem,\n CheckoutAdjustmentPayment,\n CheckoutInterruptionKind,\n CheckoutInterruptionAction,\n CheckoutInterruption,\n CheckoutSubmission,\n} from './checkout';\n\n// ============================================\n// Grouped Shipping Contracts (type-only)\n// ============================================\nexport type {\n ShippingGroupLocation,\n ShippingGroupOption,\n ShippingGroupItem,\n ShippingGroup,\n ShippingGroupQuote,\n ShippingGroupSelection,\n} from './shipping';\n\nexport type {\n AuthorConfig,\n BrandConfig,\n ModulesConfig,\n NavigationItem,\n SiteConfig,\n SocialConfig,\n} from './site-config';\n\nexport type { SiteConfigLabels } from './site-config-labels';\n\n// ============================================\n// Unified Query Types\n// ============================================\nexport type {\n QuerySortDirection,\n QueryEntityInput,\n QueryEntitiesInput,\n QueryMeta,\n QueryErrors,\n QueryResponse,\n} from './query';\n\n// ============================================\n// Catalog Query & Facet Support Types\n// ============================================\nexport type {\n CatalogSortKey,\n CatalogQuery,\n CatalogAppliedFilters,\n CatalogFacetId,\n CatalogFacetDemonstrationSource,\n FacetSupport,\n CatalogResults,\n CatalogQueryFailureCode,\n CatalogQueryFailureRepair,\n CatalogQueryFailure,\n CatalogQueryOutcome,\n} from './catalog';\n\n// ============================================\n// Product Types\n// ============================================\nexport type {\n Product,\n ProductOption,\n ProductVariant,\n SelectedOption,\n PriceRange,\n GetProductsOptions,\n ActiveFilter,\n SortOption,\n FilterSection,\n FilterOption,\n ProductPreview,\n Review,\n CompareProduct,\n AdminProductVariant,\n AdminProduct,\n AdvancedSearchProductsOptions,\n SearchResultMeta,\n FilterConfig,\n} from './product';\n\n// ============================================\n// Cart Types\n// ============================================\nexport type {\n Cart,\n CartItem,\n CartProduct,\n CartCost,\n CartLineInput,\n CartLineUpdate,\n ShippingMethod,\n DiscountCode,\n PriceTier,\n CheckoutLineProjection,\n CheckoutLineProjectionLine,\n} from './cart';\n\n// ============================================\n// Inventory & Fulfillment Types\n// ============================================\nexport type {\n StockLocation,\n InventoryLevel,\n FulfillmentSet,\n FulfillmentOption,\n StockStatus,\n StockValidation,\n} from './stock-location';\n\n// ============================================\n// Collection Types\n// ============================================\nexport type {\n Collection,\n CollectionProductsOptions,\n GetCollectionsOptions,\n} from './collection';\n\n// ============================================\n// Category Types\n// ============================================\nexport type {\n ProductCategory,\n GetCategoriesOptions,\n GetCategoriesCallback,\n} from './category';\n\n// ============================================\n// Customer Types\n// ============================================\nexport type {\n Customer,\n Address,\n GetCustomersOptions,\n GetCustomersCallback,\n} from './customer';\n\n// ============================================\n// Region Types\n// ============================================\nexport type {\n Region,\n} from './region';\n\n// ============================================\n// Order Types\n// ============================================\nexport type {\n Order,\n OrderDeliveryGroup,\n OrderItem,\n OrderPayment,\n OrderPaymentStatus,\n OrderStatus,\n PaymentStatus,\n FulfillmentStatus,\n GetOrdersOptions,\n GetOrdersCallback,\n GetCustomerOrdersPageOptions,\n CustomerOrdersPage,\n} from './order';\n\n// ============================================\n// Provider Types (L1 - type-only)\n// Runtime provider registry lives in @thorprovider/adapters\n// ============================================\nexport type { ProviderTypeString } from './provider';\n\n// ============================================\n// Storefront Types\n// ============================================\nexport type {\n StorefrontContext,\n StorefrontPlatformType,\n} from './storefront';\n\n// ============================================\n// Storefront Configuration Types\n// ============================================\nexport type {\n StorefrontConfig,\n StorefrontSeoDefaults,\n} from './storefront-config';\n\n// ============================================\n// Designer Configuration Types\n// ============================================\nexport type {\n DesignerConfig,\n DesignerThemeConfig,\n DesignerThemePreset,\n DesignerNavItem,\n DesignerHistoryEntry,\n} from './designer-config';\n\n// ============================================\n// Auth Types\n// ============================================\nexport type {\n AuthProvider,\n AuthConfig,\n AuthMethod,\n AuthStorage,\n LoginCredentials,\n RegisterData,\n AuthResponse,\n UpdateCustomerData,\n CreateAddressData,\n PasswordResetRequest,\n PasswordResetConfirm,\n TokenVerifyState,\n TokenVerifyResult,\n RecoveryConfirmResult,\n SalesChannelType,\n InterestCategory,\n RequestedProfile,\n SubmitApplicationSalesChannel,\n SubmitApplicationBody,\n SubmitApplicationCreated,\n SubmitApplicationConflictApplication,\n SubmitApplicationResponse,\n SubmitApplicationResult,\n} from './auth';\n\n// ============================================\n// Payment Types\n// ============================================\nexport type {\n PaymentMethod,\n PaymentMethodType,\n PaymentMethodFeatures,\n PaymentMethodsOptions,\n CachedPaymentMethods,\n CheckoutCapturePolicy,\n CheckoutPaymentPlanItem,\n GiftCardValidationResult,\n StoreCreditAccountSummary,\n CheckoutPaymentSummary,\n CheckoutPaymentSummaryPayment,\n CheckoutPaymentSummaryStatus,\n} from './payment';\n\n// ============================================\n// Commerce Provider Interface\n// ============================================\nexport type {\n CommerceProvider,\n BackendCapabilities,\n ProviderConfig,\n} from './commerce-provider';\n\n// ============================================\n// Admin Types\n// ============================================\nexport type {\n AdminUser,\n AuditLog,\n DashboardConfig,\n DashboardMetrics,\n SalesMetrics,\n OrdersMetrics,\n ProductsMetrics,\n ChartDataPoint,\n DashboardMetricsAdapter,\n DashboardOrdersAdapter,\n DashboardProductsAdapter,\n AuditLogAdapter,\n SiteConfigMetadata,\n ConfigHistoryEntry,\n // Multi-tenant admin types\n AdminChannelCustomer,\n GetChannelCustomersResponse,\n GetChannelCustomersOptions,\n AdminApiKey,\n GetChannelApiKeysResponse,\n AdminChannelCategory,\n GetChannelCategoriesResponse,\n GetChannelCategoriesOptions,\n AdminSalesChannelRef,\n GetCategorySalesChannelsResponse,\n AssignCategoriesToChannelsBody,\n AssignCategoriesToChannelsResponse,\n UnassignCategoriesFromChannelsBody,\n UnassignCategoriesFromChannelsResponse,\n GetCollectionSalesChannelsResponse,\n AssignCollectionsToChannelsBody,\n AssignCollectionsToChannelsResponse,\n UnassignCollectionsFromChannelsBody,\n UnassignCollectionsFromChannelsResponse,\n AdminStorefrontSeoDefaults,\n AdminStorefrontConfig,\n GetAdminStorefrontConfigResponse,\n UpdateStorefrontConfigBody,\n UpdateStorefrontConfigResponse,\n AdminSiteConfigHistoryEntry,\n AdminSiteConfig,\n GetAdminSiteConfigResponse,\n UpdateSiteConfigBody,\n UpdateSiteConfigResponse,\n AdminSiteConfigHistoryEntryFull,\n GetAdminSiteConfigHistoryResponse,\n GetAdminSiteConfigHistoryOptions,\n RestoreSiteConfigResponse,\n LinkCustomerToChannelResponse,\n // Dropshipping types\n DropshipperAccountRef,\n DropshipperCostTier,\n DropshipperSaleTier,\n OnboardDropshipperBody,\n OnboardDropshipperResponse,\n DropshipperVariant,\n DropshipperProduct,\n DropshipperProductImage,\n DropshipperProductAttachment,\n DropshipperProductPrivateMedia,\n GetDropshipperProductsOptions,\n GetDropshipperProductsResponse,\n ValidateCheckoutItemsRequest,\n ValidatedCheckoutItem,\n ValidateCheckoutItemsResponse,\n UpdateDropshipperProductStatusBody,\n UpdateDropshipperProductStatusResponse,\n DropshipperPriceTier,\n DropshipperPriceItem,\n UpdateDropshipperPricesBody,\n UpdateDropshipperPricesResponse,\n DropshipperOrderCustomer,\n DropshipperOrder,\n GetDropshipperOrdersOptions,\n GetDropshipperOrdersResponse,\n DropshipperShippingOption,\n DropshipperShippingGroupOption,\n DropshipperShippingGroup,\n ShippingGroupInput,\n GetDropshipperShippingOptionsBody,\n GetDropshipperShippingOptionsResponse,\n DropshipperOrderShippingAddress,\n DropshipperOrderItem,\n DropshipperOrderTotals,\n DropshipperOrderTaxLine,\n DropshipperOrderTimelineEvent,\n DropshipperOrderDetail,\n GetDropshipperOrderDetailResponse,\n CreateOrderItem,\n CreateDropshipperOrderBody,\n CreateDropshipperOrderResponse,\n ExtendedCreateDropshipperOrderBody,\n ExtendedCreateDropshipperOrderResponse,\n SetPaymentCollectorBody,\n SetPaymentCollectorResponse,\n SetPaymentMethodBody,\n SetPaymentMethodResponse,\n ValidateGiftCardBody,\n ValidateGiftCardResponse,\n DropshipperCategory,\n GetDropshipperCategoriesOptions,\n GetDropshipperCategoriesResponse,\n CreateDropshipperCategoryBody,\n UpdateDropshipperCategoryBody,\n DeleteDropshipperCategoryResponse,\n ProviderCategory,\n GetProviderCategoriesResponse,\n GetCategoryMappingsOptions,\n CategoryMapping,\n GetCategoryMappingsResponse,\n CreateCategoryMappingBody,\n CreateCategoryMappingResponse,\n DeleteCategoryMappingResponse,\n DropshipperCustomer,\n DropshipperCustomerStats,\n DropshipperCustomerFinancial,\n DropshipperCustomerAddress,\n DropshipperCustomerDetail,\n GetDropshipperCustomersOptions,\n GetDropshipperCustomersResponse,\n GetDropshipperCustomerDetailResponse,\n CreateDropshipperCustomerBody,\n CreateDropshipperCustomerResponse,\n UpdateDropshipperCustomerBody,\n UpdateDropshipperCustomerResponse,\n DropshipperBalance,\n DropshipperPendingOrders,\n DropshipperPaymentMethodConfig,\n DropshipperAccount,\n GetDropshipperAccountResponse,\n DropshipperPayableOrder,\n GetDropshipperPayableResponse,\n DropshipperReceivableOrder,\n GetDropshipperReceivableResponse,\n SettlementRecord,\n GetSettlementsOptions,\n GetSettlementsResponse,\n GetSettlementDetailResponse,\n CreateSettlementBody,\n CreateSettlementResponse,\n ConfirmSettlementBody,\n CancelSettlementBody,\n UpdateSettlementStatusResponse,\n AdminDropshipperAccount,\n AdminDropshipperBalance,\n GetAdminDropshipperAccountsResponse,\n GetAdminAccountBalanceResponse,\n GetAdminPriceListsResponse,\n GetUserChannelResponse,\n DropshipperPromotion,\n GetDropshipperPromotionsOptions,\n GetDropshipperPromotionsResponse,\n PromotionRule,\n CreateDropshipperPromotionBody,\n UpdateDropshipperPromotionBody,\n DeleteDropshipperPromotionResponse,\n GetDashboardStatsOptions,\n DashboardPeriodMetrics,\n DashboardChanges,\n DashboardTopProduct,\n DashboardStats,\n GetDashboardStatsResponse,\n GetStorefrontDropshipperCategoriesResponse,\n OrderNote,\n CreateOrderNoteBody,\n GetOrderNotesResponse,\n CreateOrderNoteResponse,\n DeleteOrderNoteResponse,\n // Order cancel and edits\n CancelDropshipperOrderResponse,\n CreateOrderEditBody,\n CreateOrderEditResponse,\n AddOrderEditItemBody,\n AddOrderEditItemResponse,\n ConfirmOrderEditResponse,\n // Draft Orders\n DropshipperDraftOrderItem,\n DropshipperDraftOrder,\n GetDropshipperDraftOrdersOptions,\n GetDropshipperDraftOrdersResponse,\n CreateDropshipperDraftOrderBody,\n CreateDropshipperDraftOrderResponse,\n GetDropshipperDraftOrderDetailResponse,\n UpdateDropshipperDraftOrderBody,\n UpdateDropshipperDraftOrderResponse,\n ConvertDropshipperDraftOrderBody,\n ConvertDropshipperDraftOrderResponse,\n DeleteDropshipperDraftOrderResponse,\n // Order totals preview\n PreviewDropshipperOrderItem,\n PreviewDropshipperOrderTotalsBody,\n PreviewDropshipperOrderTotalsResponse,\n // Dropshipper addresses (channel-scoped)\n DropshipperAddressBody,\n DropshipperAddressResponse,\n GetDropshipperAddressesResponse,\n // Financial Endpoints — Group A\n SettlementStatus,\n GetDropshipperAccountBalanceResponse,\n GetDropshipperAccountOrdersOptions,\n GetDropshipperAccountOrdersResponse,\n GetAdminDropshipperAccountOrdersResponse,\n GetAdminDropshipperAccountSettlementsOptions,\n GetAdminDropshipperAccountSettlementsResponse,\n ResolveGuaranteeBody,\n ResolveGuaranteeResponse,\n CreateCompensacionBody,\n CreateCompensacionResponse,\n CreateAjusteBody,\n CreateAjusteResponse,\n // Financial Endpoints — Group B\n CreateCobroBody,\n CreateCobroResponse,\n CreatePagoBody,\n CreatePagoResponse,\n CreateReversoBody,\n CreateReversoResponse,\n ConfirmMovementBody,\n ConfirmMovementResponse,\n CancelMovementBody,\n CancelMovementResponse,\n GetFinancialAnalysisResponse,\n RegisterPaymentBody,\n RegisterPaymentResponse,\n // Dashboard Capabilities\n DropshipperDashboardCapabilities,\n // AI Assistant Chat\n ChatMessage,\n ChatRequest,\n ChatIntent,\n ChatSource,\n ChatSourceVariant,\n ChatResponse,\n ChatAssistantHealthResponse,\n // Geo-reference\n GeoCountry,\n GeoProvince,\n GeoCity,\n GetGeoCountriesResponse,\n GetGeoProvincesResponse,\n GetGeoCitiesResponse,\n // Product Attributes\n DropshipperProductAttribute,\n DropshipperProductAttributeValue,\n GetProductAttributesResponse,\n DropshipperAttributeDefinition,\n DropshipperAttributeDefinitionValue,\n GetDropshipperAttributesResponse,\n DropshipperProductOption,\n DropshipperProductOptionValue,\n // Dropshipper Profile\n DropshipperProfile,\n GetMyProfileResponse,\n // Cost Price Changes Detection\n CostPriceChangesCheckResponse,\n CostPriceChangeItem,\n CostPriceChangesResponse,\n AcknowledgeCostPriceChangesResponse,\n // Notifications\n NotificationData,\n PriceUpdatedNotificationData,\n ProductAssignedNotificationData,\n StockChangeNotificationData,\n ManualAdminNotificationData,\n RawNotification,\n GetNotificationsOptions,\n GetNotificationsResponse,\n // Notification preferences\n DropshipperNotificationEventType,\n DropshipperNotificationPreference,\n UpdateNotificationPreferencesBody,\n GetNotificationPreferencesResponse,\n } from './admin';\n\n// ============================================\n// Dropshipper Business Policy Types\n// ============================================\nexport type {\n GetBusinessPolicyResponse,\n UpdateBusinessPolicyBody,\n UpdateBusinessPolicyResponse,\n} from './dropshipper-business-policy';\n\n// ============================================\n// Header Configuration Types\n// ============================================\nexport type {\n IconConfig,\n NavigationCalloutItem,\n NavigationLinkItem,\n DynamicSource,\n HeaderLinkItem,\n AccountMenuItem,\n AccountDropdownConfig,\n SearchBarConfig,\n HeaderNavigationConfig,\n} from './header-config';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thorprovider/types",
3
- "version": "7.6.0",
3
+ "version": "7.8.0",
4
4
  "description": "Shared TypeScript types for Thor Commerce ecosystem - Framework-agnostic type definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/cart.ts CHANGED
@@ -3,10 +3,48 @@
3
3
  * Cart types - unified interface for all commerce providers
4
4
  */
5
5
 
6
- import type { Image, Money } from './common';
6
+ import type { Image, Money, PromotionSummary } from './common';
7
+ import type { GuestContact } from './checkout';
7
8
  import type { SelectedOption } from './product';
8
9
  import type { FulfillmentOption, StockStatus, StockValidation } from './stock-location';
9
10
 
11
+ /**
12
+ * One quantity-price tier for a cart line.
13
+ *
14
+ * `maxQuantity` is absent for an open-ended tier. The unit price is the
15
+ * backend's effective price for that range; consumers render it and never
16
+ * derive it from a percentage or a configured amount.
17
+ */
18
+ export interface PriceTier {
19
+ minQuantity: number;
20
+ maxQuantity?: number;
21
+ unitPrice: Money;
22
+ }
23
+
24
+ /**
25
+ * Per-line checkout projection: stock and the effective quantity-price ladder.
26
+ *
27
+ * `availableQuantity` is the maximum number of complete units a single
28
+ * sales-channel warehouse can serve, never the sum across warehouses.
29
+ * `basePrice` is the effective group's base price when the backend reports one;
30
+ * `tiers` is the quantity ladder. Both are omitted/empty when the backend does
31
+ * not expose them.
32
+ */
33
+ export interface CheckoutLineProjectionLine {
34
+ lineId: string;
35
+ variantId: string;
36
+ availableQuantity?: number;
37
+ stockStatus?: StockStatus;
38
+ locationId?: string;
39
+ basePrice?: Money;
40
+ tiers: PriceTier[];
41
+ }
42
+
43
+ export interface CheckoutLineProjection {
44
+ lines: CheckoutLineProjectionLine[];
45
+ stockValidation: StockValidation;
46
+ }
47
+
10
48
  /**
11
49
  * Product reference in cart
12
50
  */
@@ -24,6 +62,15 @@ export interface CartItem {
24
62
  id: string | undefined;
25
63
  quantity: number;
26
64
  stockStatus?: StockStatus;
65
+ /**
66
+ * Maximum complete units a single sales-channel warehouse can serve, when
67
+ * the backend exposes stock. Absent for unmanaged inventory or backorder.
68
+ */
69
+ availableQuantity?: number;
70
+ /** Effective quantity-price ladder, when the backend exposes one. */
71
+ tiers?: PriceTier[];
72
+ /** Effective price group's base price, when the backend reports one. */
73
+ basePrice?: Money;
27
74
  cost: {
28
75
  totalAmount: Money;
29
76
  /**
@@ -120,6 +167,28 @@ export interface Cart {
120
167
  * cart that belongs to another shopper.
121
168
  */
122
169
  customerId?: string;
170
+ /**
171
+ * Contact email stored on the cart.
172
+ *
173
+ * For a guest checkout the backend copies it to the order and uses it for the
174
+ * confirmation email. It is the authoritative contact email; the name and
175
+ * phone live in `guestContact`.
176
+ */
177
+ email?: string;
178
+ /**
179
+ * Whether the cart's customer is a registered account (`has_account=true`).
180
+ *
181
+ * A guest customer created natively by Medusa has `has_account=false`; the
182
+ * runtime uses this flag to exclude registered-only instruments such as store
183
+ * credit.
184
+ */
185
+ customerHasAccount?: boolean;
186
+ /**
187
+ * Guest contact carried in `cart.metadata.guest_contact`.
188
+ *
189
+ * Never written to the Customer record; the order inherits the metadata.
190
+ */
191
+ guestContact?: GuestContact;
123
192
  /** Backend id of the applied shipping method, when one is selected. */
124
193
  selectedShippingMethodId?: string;
125
194
  /**
@@ -130,6 +199,11 @@ export interface Cart {
130
199
  * (the applied shipping-method record id). Absent when no method is applied.
131
200
  */
132
201
  selectedShippingOptionId?: string;
202
+ /**
203
+ * One row per promotion resolved from the backend's adjustments. Absent when
204
+ * the provider does not expose a promotion breakdown.
205
+ */
206
+ promotions?: PromotionSummary[];
133
207
  /** Platform-specific backend metadata, carried through unchanged. */
134
208
  metadata?: Record<string, unknown>;
135
209
  }