@thorprovider/types 7.6.0 → 7.7.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.mts CHANGED
@@ -1938,6 +1938,19 @@ interface OrderDeliveryGroup {
1938
1938
  */
1939
1939
  lineIds?: string[];
1940
1940
  }
1941
+ /** One payment captured/authorized against an order. */
1942
+ type OrderPaymentStatus = 'authorized' | 'captured' | 'canceled' | 'pending';
1943
+ interface OrderPayment {
1944
+ id: string;
1945
+ providerId: string;
1946
+ /** Provider display label when the adapter can resolve one. */
1947
+ label?: string;
1948
+ /** Payment amount in the order currency. */
1949
+ amount?: Money;
1950
+ status: OrderPaymentStatus;
1951
+ capturedAt?: string;
1952
+ canceledAt?: string;
1953
+ }
1941
1954
  /**
1942
1955
  * Order
1943
1956
  *
@@ -1976,7 +1989,15 @@ interface Order {
1976
1989
  providerId?: string;
1977
1990
  label?: string;
1978
1991
  detail?: string;
1992
+ amount?: Money;
1993
+ capturedAt?: string;
1979
1994
  };
1995
+ /**
1996
+ * Every payment on the order, when the backend reports them. Kept separate
1997
+ * from `payment` (the first/primary payment) so a multi-instrument checkout
1998
+ * can render its breakdown after a reload without inventing amounts.
1999
+ */
2000
+ payments?: OrderPayment[];
1980
2001
  /** Backend tax rate in basis points, when the order reports one rate. */
1981
2002
  taxRateBps?: number;
1982
2003
  /**
@@ -2725,6 +2746,7 @@ interface AuthProvider {
2725
2746
  *
2726
2747
  * @see packages/adapters/PAYMENT_METHODS_ARCHITECTURE.md
2727
2748
  */
2749
+
2728
2750
  /**
2729
2751
  * Payment method type identifier
2730
2752
  * Normalized across all backends
@@ -2737,7 +2759,7 @@ interface AuthProvider {
2737
2759
  * 'pp_system_default' → type: 'cash_on_delivery'
2738
2760
  * ```
2739
2761
  */
2740
- type PaymentMethodType = 'card' | 'wallet' | 'bank_transfer' | 'buy_now_pay_later' | 'cash_on_delivery' | 'crypto' | 'other';
2762
+ type PaymentMethodType = 'card' | 'wallet' | 'bank_transfer' | 'buy_now_pay_later' | 'cash_on_delivery' | 'crypto' | 'gift_card' | 'store_credit' | 'other';
2741
2763
  /**
2742
2764
  * Payment method features and capabilities
2743
2765
  * Describes what a payment method supports
@@ -2942,6 +2964,89 @@ interface CachedPaymentMethods {
2942
2964
  */
2943
2965
  ttl: number;
2944
2966
  }
2967
+ /**
2968
+ * When a checkout payment is captured.
2969
+ *
2970
+ * - `now`: captured as part of the checkout completion (gift card, store credit,
2971
+ * card/PSP that supports immediate capture).
2972
+ * - `deferred`: authorized at checkout and captured later by the admin (Zelle,
2973
+ * Cash App, system/manual methods).
2974
+ */
2975
+ type CheckoutCapturePolicy = 'now' | 'deferred';
2976
+ /**
2977
+ * One instrument of the checkout payment plan.
2978
+ *
2979
+ * The backend is authoritative: `amount` is the exact amount for this
2980
+ * instrument and the plan must sum to the cart total. Gift card and store credit
2981
+ * carry the data the backend needs to validate and create the payment session.
2982
+ */
2983
+ interface CheckoutPaymentPlanItem {
2984
+ provider_id: string;
2985
+ amount: number;
2986
+ capture: CheckoutCapturePolicy;
2987
+ /** Gift-card code; required when `provider_id` is the gift-card provider. */
2988
+ gift_card_code?: string;
2989
+ /** Store-credit account id; resolved from the customer when omitted. */
2990
+ account_id?: string;
2991
+ }
2992
+ /**
2993
+ * Result of validating a gift-card code before it is added to a payment plan.
2994
+ *
2995
+ * The backend is the authority: this is a read-only check, not a session or a
2996
+ * reservation. The balance and currency belong to the gift card; a valid card
2997
+ * can still be rejected later when the plan is completed if its balance or
2998
+ * currency changed.
2999
+ */
3000
+ type GiftCardValidationResult = {
3001
+ valid: true;
3002
+ status: string;
3003
+ balance: Money;
3004
+ expiresAt?: string;
3005
+ } | {
3006
+ valid: false;
3007
+ reason: string;
3008
+ status?: string;
3009
+ };
3010
+ /**
3011
+ * One store-credit account available to the authenticated customer.
3012
+ *
3013
+ * Amounts are backend-authoritative. The checkout only offers accounts whose
3014
+ * currency matches the cart currency; the backend still validates the account
3015
+ * and amount again when the payment plan is completed.
3016
+ */
3017
+ interface StoreCreditAccountSummary {
3018
+ id: string;
3019
+ currencyCode: string;
3020
+ balance: Money;
3021
+ credits?: Money;
3022
+ debits?: Money;
3023
+ }
3024
+ /**
3025
+ * Authoritative payment state returned by the checkout completion.
3026
+ *
3027
+ * `captured_amount` and `pending_amount` are separate from `total`: the order
3028
+ * total is never reduced by a payment.
3029
+ */
3030
+ interface CheckoutPaymentSummaryPayment {
3031
+ id: string;
3032
+ provider_id: string;
3033
+ amount: number;
3034
+ capture: CheckoutCapturePolicy;
3035
+ captured_at: string | null;
3036
+ }
3037
+ type CheckoutPaymentSummaryStatus = 'captured' | 'partially_captured' | 'pending' | 'reconciliation_required';
3038
+ interface CheckoutPaymentSummary {
3039
+ total: number;
3040
+ captured_amount: number;
3041
+ pending_amount: number;
3042
+ status: CheckoutPaymentSummaryStatus;
3043
+ payments: CheckoutPaymentSummaryPayment[];
3044
+ reconciliation_required: boolean;
3045
+ errors?: Array<{
3046
+ code: string;
3047
+ message: string;
3048
+ }>;
3049
+ }
2945
3050
 
2946
3051
  /**
2947
3052
  * Backend capabilities interface
@@ -3766,6 +3871,38 @@ interface CommerceProvider {
3766
3871
  * @throws {Error} If required options are missing (e.g., regionId for Medusa)
3767
3872
  */
3768
3873
  getPaymentMethods(options: PaymentMethodsOptions): Promise<PaymentMethod$1[]>;
3874
+ /**
3875
+ * Validate a gift-card code before it is added to the checkout payment plan
3876
+ * (OPTIONAL).
3877
+ *
3878
+ * Read-only: it must not create a payment session, reserve balance or mutate
3879
+ * the cart. The backend remains the authority; a valid result can still be
3880
+ * rejected when the plan is completed if the balance or currency changed.
3881
+ *
3882
+ * Optional so a provider without gift-card support keeps its existing
3883
+ * contract; callers must treat its absence as an unsupported capability
3884
+ * rather than as an invalid gift card.
3885
+ *
3886
+ * @param code - Gift-card code supplied by the shopper
3887
+ * @returns The backend's validation result, including balance and status
3888
+ * @throws {ProviderAPIError} If the backend fails or returns an invalid shape
3889
+ */
3890
+ validateGiftCard?(code: string): Promise<GiftCardValidationResult>;
3891
+ /**
3892
+ * List the authenticated customer's store-credit accounts (OPTIONAL).
3893
+ *
3894
+ * Read-only: it must not create a payment session or debit the account. The
3895
+ * checkout filters these accounts by the cart currency and lets the shopper
3896
+ * choose one; the backend validates the account and amount again when the
3897
+ * payment plan is completed.
3898
+ *
3899
+ * Optional for the same reason as {@link validateGiftCard}.
3900
+ *
3901
+ * @returns Store-credit accounts with their backend-authoritative balances
3902
+ * @throws {ProviderAPIError} If the customer is not authenticated or the
3903
+ * backend fails
3904
+ */
3905
+ getStoreCreditAccounts?(): Promise<StoreCreditAccountSummary[]>;
3769
3906
  /**
3770
3907
  * Fetch stock locations, optionally filtered by sales channel.
3771
3908
  * Returns empty array when admin config is not provided (graceful degradation).
@@ -7208,4 +7345,4 @@ type UpdateBusinessPolicyResponse = {
7208
7345
  business_policy: string;
7209
7346
  };
7210
7347
 
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 };
7348
+ 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, CheckoutInterruption, CheckoutInterruptionAction, CheckoutInterruptionKind, 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, 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, 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, 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.d.ts CHANGED
@@ -1938,6 +1938,19 @@ interface OrderDeliveryGroup {
1938
1938
  */
1939
1939
  lineIds?: string[];
1940
1940
  }
1941
+ /** One payment captured/authorized against an order. */
1942
+ type OrderPaymentStatus = 'authorized' | 'captured' | 'canceled' | 'pending';
1943
+ interface OrderPayment {
1944
+ id: string;
1945
+ providerId: string;
1946
+ /** Provider display label when the adapter can resolve one. */
1947
+ label?: string;
1948
+ /** Payment amount in the order currency. */
1949
+ amount?: Money;
1950
+ status: OrderPaymentStatus;
1951
+ capturedAt?: string;
1952
+ canceledAt?: string;
1953
+ }
1941
1954
  /**
1942
1955
  * Order
1943
1956
  *
@@ -1976,7 +1989,15 @@ interface Order {
1976
1989
  providerId?: string;
1977
1990
  label?: string;
1978
1991
  detail?: string;
1992
+ amount?: Money;
1993
+ capturedAt?: string;
1979
1994
  };
1995
+ /**
1996
+ * Every payment on the order, when the backend reports them. Kept separate
1997
+ * from `payment` (the first/primary payment) so a multi-instrument checkout
1998
+ * can render its breakdown after a reload without inventing amounts.
1999
+ */
2000
+ payments?: OrderPayment[];
1980
2001
  /** Backend tax rate in basis points, when the order reports one rate. */
1981
2002
  taxRateBps?: number;
1982
2003
  /**
@@ -2725,6 +2746,7 @@ interface AuthProvider {
2725
2746
  *
2726
2747
  * @see packages/adapters/PAYMENT_METHODS_ARCHITECTURE.md
2727
2748
  */
2749
+
2728
2750
  /**
2729
2751
  * Payment method type identifier
2730
2752
  * Normalized across all backends
@@ -2737,7 +2759,7 @@ interface AuthProvider {
2737
2759
  * 'pp_system_default' → type: 'cash_on_delivery'
2738
2760
  * ```
2739
2761
  */
2740
- type PaymentMethodType = 'card' | 'wallet' | 'bank_transfer' | 'buy_now_pay_later' | 'cash_on_delivery' | 'crypto' | 'other';
2762
+ type PaymentMethodType = 'card' | 'wallet' | 'bank_transfer' | 'buy_now_pay_later' | 'cash_on_delivery' | 'crypto' | 'gift_card' | 'store_credit' | 'other';
2741
2763
  /**
2742
2764
  * Payment method features and capabilities
2743
2765
  * Describes what a payment method supports
@@ -2942,6 +2964,89 @@ interface CachedPaymentMethods {
2942
2964
  */
2943
2965
  ttl: number;
2944
2966
  }
2967
+ /**
2968
+ * When a checkout payment is captured.
2969
+ *
2970
+ * - `now`: captured as part of the checkout completion (gift card, store credit,
2971
+ * card/PSP that supports immediate capture).
2972
+ * - `deferred`: authorized at checkout and captured later by the admin (Zelle,
2973
+ * Cash App, system/manual methods).
2974
+ */
2975
+ type CheckoutCapturePolicy = 'now' | 'deferred';
2976
+ /**
2977
+ * One instrument of the checkout payment plan.
2978
+ *
2979
+ * The backend is authoritative: `amount` is the exact amount for this
2980
+ * instrument and the plan must sum to the cart total. Gift card and store credit
2981
+ * carry the data the backend needs to validate and create the payment session.
2982
+ */
2983
+ interface CheckoutPaymentPlanItem {
2984
+ provider_id: string;
2985
+ amount: number;
2986
+ capture: CheckoutCapturePolicy;
2987
+ /** Gift-card code; required when `provider_id` is the gift-card provider. */
2988
+ gift_card_code?: string;
2989
+ /** Store-credit account id; resolved from the customer when omitted. */
2990
+ account_id?: string;
2991
+ }
2992
+ /**
2993
+ * Result of validating a gift-card code before it is added to a payment plan.
2994
+ *
2995
+ * The backend is the authority: this is a read-only check, not a session or a
2996
+ * reservation. The balance and currency belong to the gift card; a valid card
2997
+ * can still be rejected later when the plan is completed if its balance or
2998
+ * currency changed.
2999
+ */
3000
+ type GiftCardValidationResult = {
3001
+ valid: true;
3002
+ status: string;
3003
+ balance: Money;
3004
+ expiresAt?: string;
3005
+ } | {
3006
+ valid: false;
3007
+ reason: string;
3008
+ status?: string;
3009
+ };
3010
+ /**
3011
+ * One store-credit account available to the authenticated customer.
3012
+ *
3013
+ * Amounts are backend-authoritative. The checkout only offers accounts whose
3014
+ * currency matches the cart currency; the backend still validates the account
3015
+ * and amount again when the payment plan is completed.
3016
+ */
3017
+ interface StoreCreditAccountSummary {
3018
+ id: string;
3019
+ currencyCode: string;
3020
+ balance: Money;
3021
+ credits?: Money;
3022
+ debits?: Money;
3023
+ }
3024
+ /**
3025
+ * Authoritative payment state returned by the checkout completion.
3026
+ *
3027
+ * `captured_amount` and `pending_amount` are separate from `total`: the order
3028
+ * total is never reduced by a payment.
3029
+ */
3030
+ interface CheckoutPaymentSummaryPayment {
3031
+ id: string;
3032
+ provider_id: string;
3033
+ amount: number;
3034
+ capture: CheckoutCapturePolicy;
3035
+ captured_at: string | null;
3036
+ }
3037
+ type CheckoutPaymentSummaryStatus = 'captured' | 'partially_captured' | 'pending' | 'reconciliation_required';
3038
+ interface CheckoutPaymentSummary {
3039
+ total: number;
3040
+ captured_amount: number;
3041
+ pending_amount: number;
3042
+ status: CheckoutPaymentSummaryStatus;
3043
+ payments: CheckoutPaymentSummaryPayment[];
3044
+ reconciliation_required: boolean;
3045
+ errors?: Array<{
3046
+ code: string;
3047
+ message: string;
3048
+ }>;
3049
+ }
2945
3050
 
2946
3051
  /**
2947
3052
  * Backend capabilities interface
@@ -3766,6 +3871,38 @@ interface CommerceProvider {
3766
3871
  * @throws {Error} If required options are missing (e.g., regionId for Medusa)
3767
3872
  */
3768
3873
  getPaymentMethods(options: PaymentMethodsOptions): Promise<PaymentMethod$1[]>;
3874
+ /**
3875
+ * Validate a gift-card code before it is added to the checkout payment plan
3876
+ * (OPTIONAL).
3877
+ *
3878
+ * Read-only: it must not create a payment session, reserve balance or mutate
3879
+ * the cart. The backend remains the authority; a valid result can still be
3880
+ * rejected when the plan is completed if the balance or currency changed.
3881
+ *
3882
+ * Optional so a provider without gift-card support keeps its existing
3883
+ * contract; callers must treat its absence as an unsupported capability
3884
+ * rather than as an invalid gift card.
3885
+ *
3886
+ * @param code - Gift-card code supplied by the shopper
3887
+ * @returns The backend's validation result, including balance and status
3888
+ * @throws {ProviderAPIError} If the backend fails or returns an invalid shape
3889
+ */
3890
+ validateGiftCard?(code: string): Promise<GiftCardValidationResult>;
3891
+ /**
3892
+ * List the authenticated customer's store-credit accounts (OPTIONAL).
3893
+ *
3894
+ * Read-only: it must not create a payment session or debit the account. The
3895
+ * checkout filters these accounts by the cart currency and lets the shopper
3896
+ * choose one; the backend validates the account and amount again when the
3897
+ * payment plan is completed.
3898
+ *
3899
+ * Optional for the same reason as {@link validateGiftCard}.
3900
+ *
3901
+ * @returns Store-credit accounts with their backend-authoritative balances
3902
+ * @throws {ProviderAPIError} If the customer is not authenticated or the
3903
+ * backend fails
3904
+ */
3905
+ getStoreCreditAccounts?(): Promise<StoreCreditAccountSummary[]>;
3769
3906
  /**
3770
3907
  * Fetch stock locations, optionally filtered by sales channel.
3771
3908
  * Returns empty array when admin config is not provided (graceful degradation).
@@ -7208,4 +7345,4 @@ type UpdateBusinessPolicyResponse = {
7208
7345
  business_policy: string;
7209
7346
  };
7210
7347
 
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 };
7348
+ 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, CheckoutInterruption, CheckoutInterruptionAction, CheckoutInterruptionKind, 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, 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, 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, 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} 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 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.7.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",
@@ -39,7 +39,12 @@ import type {
39
39
  CustomerOrdersPage,
40
40
  } from './order';
41
41
  import type { Region } from './region';
42
- import type { PaymentMethod, PaymentMethodsOptions } from './payment';
42
+ import type {
43
+ PaymentMethod,
44
+ PaymentMethodsOptions,
45
+ GiftCardValidationResult,
46
+ StoreCreditAccountSummary,
47
+ } from './payment';
43
48
  import type { AuthProvider } from './auth';
44
49
  import type { StorefrontContext } from './storefront';
45
50
  import type { StockLocation, InventoryLevel, StockValidation, FulfillmentOption } from './stock-location';
@@ -993,6 +998,40 @@ export interface CommerceProvider {
993
998
  */
994
999
  getPaymentMethods(options: PaymentMethodsOptions): Promise<PaymentMethod[]>;
995
1000
 
1001
+ /**
1002
+ * Validate a gift-card code before it is added to the checkout payment plan
1003
+ * (OPTIONAL).
1004
+ *
1005
+ * Read-only: it must not create a payment session, reserve balance or mutate
1006
+ * the cart. The backend remains the authority; a valid result can still be
1007
+ * rejected when the plan is completed if the balance or currency changed.
1008
+ *
1009
+ * Optional so a provider without gift-card support keeps its existing
1010
+ * contract; callers must treat its absence as an unsupported capability
1011
+ * rather than as an invalid gift card.
1012
+ *
1013
+ * @param code - Gift-card code supplied by the shopper
1014
+ * @returns The backend's validation result, including balance and status
1015
+ * @throws {ProviderAPIError} If the backend fails or returns an invalid shape
1016
+ */
1017
+ validateGiftCard?(code: string): Promise<GiftCardValidationResult>;
1018
+
1019
+ /**
1020
+ * List the authenticated customer's store-credit accounts (OPTIONAL).
1021
+ *
1022
+ * Read-only: it must not create a payment session or debit the account. The
1023
+ * checkout filters these accounts by the cart currency and lets the shopper
1024
+ * choose one; the backend validates the account and amount again when the
1025
+ * payment plan is completed.
1026
+ *
1027
+ * Optional for the same reason as {@link validateGiftCard}.
1028
+ *
1029
+ * @returns Store-credit accounts with their backend-authoritative balances
1030
+ * @throws {ProviderAPIError} If the customer is not authenticated or the
1031
+ * backend fails
1032
+ */
1033
+ getStoreCreditAccounts?(): Promise<StoreCreditAccountSummary[]>;
1034
+
996
1035
  // ============================================
997
1036
  // Inventory Operations (Admin API — Optional)
998
1037
  // ============================================
package/src/index.ts CHANGED
@@ -196,6 +196,8 @@ export type {
196
196
  Order,
197
197
  OrderDeliveryGroup,
198
198
  OrderItem,
199
+ OrderPayment,
200
+ OrderPaymentStatus,
199
201
  OrderStatus,
200
202
  PaymentStatus,
201
203
  FulfillmentStatus,
@@ -276,6 +278,13 @@ export type {
276
278
  PaymentMethodFeatures,
277
279
  PaymentMethodsOptions,
278
280
  CachedPaymentMethods,
281
+ CheckoutCapturePolicy,
282
+ CheckoutPaymentPlanItem,
283
+ GiftCardValidationResult,
284
+ StoreCreditAccountSummary,
285
+ CheckoutPaymentSummary,
286
+ CheckoutPaymentSummaryPayment,
287
+ CheckoutPaymentSummaryStatus,
279
288
  } from './payment';
280
289
 
281
290
  // ============================================