@thorprovider/types 7.9.0 → 7.11.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/.turbo/turbo-build.log +18 -18
- package/.turbo/turbo-type-check.log +0 -0
- package/CHANGELOG.md +31 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.mts +159 -3
- package/dist/index.d.ts +159 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/publish.log +60 -0
- package/src/auth.ts +15 -1
- package/src/cart.ts +9 -2
- package/src/catalog.ts +38 -0
- package/src/checkout.ts +13 -0
- package/src/commerce-provider.ts +32 -1
- package/src/customer.ts +50 -0
- package/src/index.ts +12 -0
- package/src/product.ts +53 -0
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 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 CustomerOrderAction,\n CustomerOrderPaymentStatus,\n CustomerOrderFulfillmentStatus,\n CustomerOrderFulfillmentItemStatus,\n CustomerOrderHistoryQuick,\n CustomerOrderHistorySort,\n CustomerOrderHistoryDatePreset,\n CustomerOrderHistoryCommercialStatus,\n CustomerOrderHistoryCommercialFilter,\n CustomerOrderHistoryPaymentFilter,\n CustomerOrderHistoryRefundFilter,\n CustomerOrderHistoryFulfilmentFilter,\n CustomerOrderHistoryDeliveryMode,\n CustomerOrderHistoryReturnStatus,\n CustomerOrderHistoryFilters,\n CustomerOrderHistoryQuery,\n CustomerOrderHistoryOptions,\n CustomerOrderHistoryShipment,\n CustomerOrderHistoryRecord,\n CustomerOrderHistoryPage,\n CustomerOrderDetail,\n CustomerOrderDetailAction,\n CustomerOrderDetailAdjustment,\n CustomerOrderDetailAdjustmentDirection,\n CustomerOrderDetailAdjustmentScope,\n CustomerOrderDetailAdjustmentSource,\n CustomerOrderDetailAllocation,\n CustomerOrderDetailApprovalStatus,\n CustomerOrderDetailAttachment,\n CustomerOrderDetailAttribute,\n CustomerOrderDetailAttributeKind,\n CustomerOrderDetailBusiness,\n CustomerOrderDetailCase,\n CustomerOrderDetailCaseLine,\n CustomerOrderDetailCaseStatus,\n CustomerOrderDetailCaseType,\n CustomerOrderDetailDocument,\n CustomerOrderDetailDocumentKind,\n CustomerOrderDetailFulfillment,\n CustomerOrderDetailFulfillmentItemStatus,\n CustomerOrderDetailFulfillmentStatus,\n CustomerOrderDetailGroup,\n CustomerOrderDetailInvoiceStatus,\n CustomerOrderDetailIssue,\n CustomerOrderDetailLine,\n CustomerOrderDetailLinePrice,\n CustomerOrderDetailOrder,\n CustomerOrderDetailPackage,\n CustomerOrderDetailPaymentStatus,\n CustomerOrderDetailPickup,\n CustomerOrderDetailPickupStatus,\n CustomerOrderDetailPriceKind,\n CustomerOrderDetailProductKind,\n CustomerOrderDetailPromotion,\n CustomerOrderDetailPromotionApplication,\n CustomerOrderDetailPromotionNominal,\n CustomerOrderDetailPromotionScope,\n CustomerOrderDetailRevision,\n CustomerOrderDetailRevisionKind,\n CustomerOrderDetailSection,\n CustomerOrderDetailShippingMethod,\n CustomerOrderDetailSnapshot,\n CustomerOrderDetailTaxLine,\n CustomerOrderDetailTotals,\n CustomerOrderDetailTransaction,\n CustomerOrderDetailTransactionKind,\n CustomerOrderDetailTransactionMethod,\n CustomerOrderDetailTransactionStatus,\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":[]}
|
|
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 CheckoutOrderClaimRequestResult,\n CheckoutOrderClaimAcceptResult,\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 CatalogFacetOption,\n CatalogFacetGroup,\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 ProductHighlight,\n ProductAttribute,\n ProductAttributeGroup,\n ProductAttachment,\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 AddressFilter,\n AddressSort,\n AddressListQuery,\n AddressListResult,\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 CustomerOrderAction,\n CustomerOrderPaymentStatus,\n CustomerOrderFulfillmentStatus,\n CustomerOrderFulfillmentItemStatus,\n CustomerOrderHistoryQuick,\n CustomerOrderHistorySort,\n CustomerOrderHistoryDatePreset,\n CustomerOrderHistoryCommercialStatus,\n CustomerOrderHistoryCommercialFilter,\n CustomerOrderHistoryPaymentFilter,\n CustomerOrderHistoryRefundFilter,\n CustomerOrderHistoryFulfilmentFilter,\n CustomerOrderHistoryDeliveryMode,\n CustomerOrderHistoryReturnStatus,\n CustomerOrderHistoryFilters,\n CustomerOrderHistoryQuery,\n CustomerOrderHistoryOptions,\n CustomerOrderHistoryShipment,\n CustomerOrderHistoryRecord,\n CustomerOrderHistoryPage,\n CustomerOrderDetail,\n CustomerOrderDetailAction,\n CustomerOrderDetailAdjustment,\n CustomerOrderDetailAdjustmentDirection,\n CustomerOrderDetailAdjustmentScope,\n CustomerOrderDetailAdjustmentSource,\n CustomerOrderDetailAllocation,\n CustomerOrderDetailApprovalStatus,\n CustomerOrderDetailAttachment,\n CustomerOrderDetailAttribute,\n CustomerOrderDetailAttributeKind,\n CustomerOrderDetailBusiness,\n CustomerOrderDetailCase,\n CustomerOrderDetailCaseLine,\n CustomerOrderDetailCaseStatus,\n CustomerOrderDetailCaseType,\n CustomerOrderDetailDocument,\n CustomerOrderDetailDocumentKind,\n CustomerOrderDetailFulfillment,\n CustomerOrderDetailFulfillmentItemStatus,\n CustomerOrderDetailFulfillmentStatus,\n CustomerOrderDetailGroup,\n CustomerOrderDetailInvoiceStatus,\n CustomerOrderDetailIssue,\n CustomerOrderDetailLine,\n CustomerOrderDetailLinePrice,\n CustomerOrderDetailOrder,\n CustomerOrderDetailPackage,\n CustomerOrderDetailPaymentStatus,\n CustomerOrderDetailPickup,\n CustomerOrderDetailPickupStatus,\n CustomerOrderDetailPriceKind,\n CustomerOrderDetailProductKind,\n CustomerOrderDetailPromotion,\n CustomerOrderDetailPromotionApplication,\n CustomerOrderDetailPromotionNominal,\n CustomerOrderDetailPromotionScope,\n CustomerOrderDetailRevision,\n CustomerOrderDetailRevisionKind,\n CustomerOrderDetailSection,\n CustomerOrderDetailShippingMethod,\n CustomerOrderDetailSnapshot,\n CustomerOrderDetailTaxLine,\n CustomerOrderDetailTotals,\n CustomerOrderDetailTransaction,\n CustomerOrderDetailTransactionKind,\n CustomerOrderDetailTransactionMethod,\n CustomerOrderDetailTransactionStatus,\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
package/publish.log
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
npm warn Unknown project config "network-concurrency". This will stop working in the next major version of npm.
|
|
2
|
+
npm warn publish npm auto-corrected some errors in your package.json when publishing. Please run "npm pkg fix" to address these errors.
|
|
3
|
+
npm warn publish errors corrected:
|
|
4
|
+
npm warn publish "repository.url" was normalized to "git+https://github.com/thorprovider/thor-commerce.git"
|
|
5
|
+
npm notice
|
|
6
|
+
npm notice 📦 @thor/types@2.0.1
|
|
7
|
+
npm notice Tarball Contents
|
|
8
|
+
npm notice 277B AGENTS.md
|
|
9
|
+
npm notice 1.6kB CHANGELOG.md
|
|
10
|
+
npm notice 6.4kB README.md
|
|
11
|
+
npm notice 101.2kB dist/index.d.mts
|
|
12
|
+
npm notice 101.2kB dist/index.d.ts
|
|
13
|
+
npm notice 3.2kB dist/index.js
|
|
14
|
+
npm notice 14.3kB dist/index.js.map
|
|
15
|
+
npm notice 1.9kB dist/index.mjs
|
|
16
|
+
npm notice 14.2kB dist/index.mjs.map
|
|
17
|
+
npm notice 832B package.json
|
|
18
|
+
npm notice 724B src/admin/AdminUser.ts
|
|
19
|
+
npm notice 946B src/admin/AuditLog.ts
|
|
20
|
+
npm notice 2.0kB src/admin/DashboardConfig.ts
|
|
21
|
+
npm notice 1.5kB src/admin/DashboardMetrics.ts
|
|
22
|
+
npm notice 268B src/admin/index.ts
|
|
23
|
+
npm notice 1.2kB src/admin/SiteConfigMetadata.ts
|
|
24
|
+
npm notice 6.5kB src/auth.ts
|
|
25
|
+
npm notice 2.8kB src/cart.ts
|
|
26
|
+
npm notice 3.0kB src/category.ts
|
|
27
|
+
npm notice 733B src/collection.ts
|
|
28
|
+
npm notice 35.3kB src/commerce-provider.ts
|
|
29
|
+
npm notice 2.1kB src/common.ts
|
|
30
|
+
npm notice 4.6kB src/customer.ts
|
|
31
|
+
npm notice 2.5kB src/designer-config.ts
|
|
32
|
+
npm notice 7.3kB src/header-config.README.md
|
|
33
|
+
npm notice 4.6kB src/header-config.ts
|
|
34
|
+
npm notice 5.5kB src/index.ts
|
|
35
|
+
npm notice 5.0kB src/order.ts
|
|
36
|
+
npm notice 6.0kB src/payment.ts
|
|
37
|
+
npm notice 10.7kB src/product.ts
|
|
38
|
+
npm notice 3.8kB src/provider.ts
|
|
39
|
+
npm notice 1.4kB src/region.ts
|
|
40
|
+
npm notice 2.1kB src/site-config-labels.ts
|
|
41
|
+
npm notice 3.0kB src/site-config.ts
|
|
42
|
+
npm notice 1.3kB src/stock-location.ts
|
|
43
|
+
npm notice 1.5kB src/storefront-config.ts
|
|
44
|
+
npm notice 3.3kB src/storefront.ts
|
|
45
|
+
npm notice 333B tsconfig.json
|
|
46
|
+
npm notice 303B tsup.config.ts
|
|
47
|
+
npm notice Tarball Details
|
|
48
|
+
npm notice name: @thor/types
|
|
49
|
+
npm notice version: 2.0.1
|
|
50
|
+
npm notice filename: thor-types-2.0.1.tgz
|
|
51
|
+
npm notice package size: 87.7 kB
|
|
52
|
+
npm notice unpacked size: 365.5 kB
|
|
53
|
+
npm notice shasum: 45a0c68b20d21a5446a471abb9077f2dd59cdd0d
|
|
54
|
+
npm notice integrity: sha512-AJRNa0Gs1osFo[...]RLXmlsHuMfinQ==
|
|
55
|
+
npm notice total files: 39
|
|
56
|
+
npm notice
|
|
57
|
+
npm notice Publishing to https://npm.pkg.github.com with tag latest and restricted access
|
|
58
|
+
npm error code E401
|
|
59
|
+
npm error 401 Unauthorized - PUT https://npm.pkg.github.com/@thor%2ftypes - unauthenticated: User cannot be authenticated with the token provided.
|
|
60
|
+
npm error A complete log of this run can be found in: /home/nelson/.npm/_logs/2026-04-16T15_45_29_457Z-debug-0.log
|
package/src/auth.ts
CHANGED
|
@@ -6,7 +6,12 @@
|
|
|
6
6
|
* Follows Thor Commerce principles: decoupling, agnostic configuration.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type {
|
|
9
|
+
import type {
|
|
10
|
+
Customer,
|
|
11
|
+
Address,
|
|
12
|
+
AddressListQuery,
|
|
13
|
+
AddressListResult,
|
|
14
|
+
} from './customer';
|
|
10
15
|
|
|
11
16
|
/**
|
|
12
17
|
* Authentication method configuration
|
|
@@ -418,6 +423,15 @@ export interface AuthProvider {
|
|
|
418
423
|
* @returns List of customer addresses
|
|
419
424
|
*/
|
|
420
425
|
getAddresses(): Promise<Address[]>;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Read one server-filtered page of the customer's address book.
|
|
429
|
+
*
|
|
430
|
+
* Optional so existing providers keep compiling; a provider that cannot
|
|
431
|
+
* serve the query must omit it rather than return a partial or locally
|
|
432
|
+
* filtered page.
|
|
433
|
+
*/
|
|
434
|
+
listAddresses?(query: AddressListQuery): Promise<AddressListResult>;
|
|
421
435
|
|
|
422
436
|
/**
|
|
423
437
|
* Create new address for current customer
|
package/src/cart.ts
CHANGED
|
@@ -190,8 +190,7 @@ export interface Cart {
|
|
|
190
190
|
*/
|
|
191
191
|
guestContact?: GuestContact;
|
|
192
192
|
/** Backend id of the applied shipping method, when one is selected. */
|
|
193
|
-
selectedShippingMethodId?: string;
|
|
194
|
-
/**
|
|
193
|
+
selectedShippingMethodId?: string; /**
|
|
195
194
|
* Backend id of the shipping option the applied method was created from.
|
|
196
195
|
*
|
|
197
196
|
* This is the identity the checkout shipping UI selects (the value passed to
|
|
@@ -206,6 +205,14 @@ export interface Cart {
|
|
|
206
205
|
promotions?: PromotionSummary[];
|
|
207
206
|
/** Platform-specific backend metadata, carried through unchanged. */
|
|
208
207
|
metadata?: Record<string, unknown>;
|
|
208
|
+
/**
|
|
209
|
+
* Buyer email the backend holds on the cart.
|
|
210
|
+
*
|
|
211
|
+
* Authoritative for the guest checkout: the backend requires `cart.email`
|
|
212
|
+
* before a guest order can be completed. Absent when the cart has no contact
|
|
213
|
+
* email yet, which is the state the host must resolve before payment.
|
|
214
|
+
*/
|
|
215
|
+
contactEmail?: string;
|
|
209
216
|
}
|
|
210
217
|
|
|
211
218
|
/**
|
package/src/catalog.ts
CHANGED
|
@@ -137,6 +137,38 @@ export interface FacetSupport {
|
|
|
137
137
|
heldReasons?: Record<string, string>;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
/** One selectable facet option and the number of matching products. */
|
|
141
|
+
export interface CatalogFacetOption {
|
|
142
|
+
/** Stable option id; this is the value a query applies for the facet. */
|
|
143
|
+
id: string;
|
|
144
|
+
/** Buyer-visible label. */
|
|
145
|
+
label: string;
|
|
146
|
+
/** Products matching this option in the current scope, supplied by the backend. */
|
|
147
|
+
count: number;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* One facet group the backend returned with the current result.
|
|
152
|
+
*
|
|
153
|
+
* Distinct from `FacetSupport`, which only says whether a filter can be applied.
|
|
154
|
+
* This carries the options and bounds the backend actually returned for the
|
|
155
|
+
* query. Enumerated facets carry `options`; the numeric `price` facet carries
|
|
156
|
+
* `min`/`max` instead. Nothing here is synthesized: absent means the backend did
|
|
157
|
+
* not return the group for that query.
|
|
158
|
+
*/
|
|
159
|
+
export interface CatalogFacetGroup {
|
|
160
|
+
/** Canonical id the surface maps onto its filter key. */
|
|
161
|
+
id: CatalogFacetId;
|
|
162
|
+
/** Buyer-visible group label, when the backend supplies one. */
|
|
163
|
+
label?: string;
|
|
164
|
+
/** Selectable values, in backend order. */
|
|
165
|
+
options?: CatalogFacetOption[];
|
|
166
|
+
/** Lowest matching value for a numeric facet. */
|
|
167
|
+
min?: number;
|
|
168
|
+
/** Highest matching value for a numeric facet. */
|
|
169
|
+
max?: number;
|
|
170
|
+
}
|
|
171
|
+
|
|
140
172
|
/**
|
|
141
173
|
* Truthful catalog result for a fully applied query.
|
|
142
174
|
*
|
|
@@ -154,6 +186,12 @@ export interface CatalogResults {
|
|
|
154
186
|
appliedFilters: CatalogAppliedFilters;
|
|
155
187
|
/** Facet support descriptor for the query and scope. */
|
|
156
188
|
facetSupport?: FacetSupport;
|
|
189
|
+
/**
|
|
190
|
+
* Facet groups the backend returned for this query, in display order.
|
|
191
|
+
* Only groups with options or finite bounds are useful to a surface; the
|
|
192
|
+
* adapter omits any it cannot fill from backend data.
|
|
193
|
+
*/
|
|
194
|
+
facets?: CatalogFacetGroup[];
|
|
157
195
|
}
|
|
158
196
|
|
|
159
197
|
/**
|
package/src/checkout.ts
CHANGED
|
@@ -127,6 +127,19 @@ export interface CheckoutShippingGroupItem {
|
|
|
127
127
|
quantity?: number;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
/** Outcome of requesting a guest-order claim (transfer) for a registered customer. */
|
|
131
|
+
export interface CheckoutOrderClaimRequestResult {
|
|
132
|
+
/** True once the backend accepted the transfer request. */
|
|
133
|
+
requested: boolean;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Outcome of accepting a guest-order claim with the email token. */
|
|
137
|
+
export interface CheckoutOrderClaimAcceptResult {
|
|
138
|
+
accepted: boolean;
|
|
139
|
+
/** The order the transfer was applied to. */
|
|
140
|
+
orderId: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
130
143
|
export interface CheckoutAdjustmentPayment {
|
|
131
144
|
id: string;
|
|
132
145
|
kind: 'gift-card' | 'store-credit';
|
package/src/commerce-provider.ts
CHANGED
|
@@ -49,7 +49,11 @@ import type {
|
|
|
49
49
|
GiftCardValidationResult,
|
|
50
50
|
StoreCreditAccountSummary,
|
|
51
51
|
} from './payment';
|
|
52
|
-
import type {
|
|
52
|
+
import type {
|
|
53
|
+
CheckoutGuestContact,
|
|
54
|
+
CheckoutOrderClaimAcceptResult,
|
|
55
|
+
CheckoutOrderClaimRequestResult,
|
|
56
|
+
} from './checkout';
|
|
53
57
|
import type { AuthProvider } from './auth';
|
|
54
58
|
import type { StorefrontContext } from './storefront';
|
|
55
59
|
import type { StockLocation, InventoryLevel, StockValidation, FulfillmentOption } from './stock-location';
|
|
@@ -786,6 +790,33 @@ export interface CommerceProvider {
|
|
|
786
790
|
* @throws {ProviderAPIError} If the backend fails or returns an invalid projection
|
|
787
791
|
*/
|
|
788
792
|
getCheckoutLineProjection?(cartId: string): Promise<CheckoutLineProjection>;
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Read the backend's own capability flags, awaited (OPTIONAL).
|
|
796
|
+
*
|
|
797
|
+
* The synchronous `capabilities` property is a snapshot that returns static
|
|
798
|
+
* defaults until a provider's discovery fetch resolves, and those defaults are
|
|
799
|
+
* not authoritative. A caller that gates behaviour on a flag (guest checkout,
|
|
800
|
+
* for example) must use this method so an unread or failed flag can be treated
|
|
801
|
+
* as off.
|
|
802
|
+
*/
|
|
803
|
+
getCapabilities?(): Promise<BackendCapabilities>;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* Request the transfer of a guest order to the authenticated customer
|
|
807
|
+
* (OPTIONAL). The backend emails an acceptance token; nothing moves until it
|
|
808
|
+
* is accepted.
|
|
809
|
+
*/
|
|
810
|
+
requestOrderClaim?(orderId: string): Promise<CheckoutOrderClaimRequestResult>;
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* Accept a previously requested guest-order transfer with its email token
|
|
814
|
+
* (OPTIONAL). Requires no customer session.
|
|
815
|
+
*/
|
|
816
|
+
acceptOrderClaim?(
|
|
817
|
+
orderId: string,
|
|
818
|
+
token: string,
|
|
819
|
+
): Promise<CheckoutOrderClaimAcceptResult>;
|
|
789
820
|
|
|
790
821
|
/**
|
|
791
822
|
* Initiate payment session with provider
|
package/src/customer.ts
CHANGED
|
@@ -34,6 +34,56 @@ export interface Address {
|
|
|
34
34
|
isDefaultBilling?: boolean; // Whether this is the default billing address
|
|
35
35
|
isDefaultShipping?: boolean; // Whether this is the default shipping address
|
|
36
36
|
metadata?: Record<string, unknown>; // Flexible storage for platform-specific extras (label, etc.)
|
|
37
|
+
createdAt?: string; // ISO 8601 timestamp
|
|
38
|
+
updatedAt?: string; // ISO 8601 timestamp; the address book sorts by it
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Filters the address book can request from the provider. */
|
|
42
|
+
export type AddressFilter =
|
|
43
|
+
| 'all'
|
|
44
|
+
| 'personal'
|
|
45
|
+
| 'business'
|
|
46
|
+
| 'default-shipping'
|
|
47
|
+
| 'default-billing'
|
|
48
|
+
| 'verified'
|
|
49
|
+
| 'needs-review'
|
|
50
|
+
| 'delivery-available';
|
|
51
|
+
|
|
52
|
+
/** Server-side ordering supported by the address book. */
|
|
53
|
+
export type AddressSort =
|
|
54
|
+
| 'default-first'
|
|
55
|
+
| 'recent'
|
|
56
|
+
| 'oldest'
|
|
57
|
+
| 'alphabetical'
|
|
58
|
+
| 'city'
|
|
59
|
+
| 'country'
|
|
60
|
+
| 'company';
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* One page of the authenticated customer's address book.
|
|
64
|
+
*
|
|
65
|
+
* `total` is the filtered total of the customer's scope, never the page
|
|
66
|
+
* length. `serverQuery` is intentionally absent: it is a presentation fact the
|
|
67
|
+
* host knows, not a domain field.
|
|
68
|
+
*/
|
|
69
|
+
export interface AddressListQuery {
|
|
70
|
+
/** Free-text match over label, recipient, company, postal lines and phone. */
|
|
71
|
+
search?: string;
|
|
72
|
+
filter?: AddressFilter;
|
|
73
|
+
sort?: AddressSort;
|
|
74
|
+
/** 1-based page index. */
|
|
75
|
+
page?: number;
|
|
76
|
+
/** Page size requested from the provider. */
|
|
77
|
+
pageSize?: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Result of a server-side address list query. */
|
|
81
|
+
export interface AddressListResult {
|
|
82
|
+
items: Address[];
|
|
83
|
+
total: number;
|
|
84
|
+
page: number;
|
|
85
|
+
pageSize: number;
|
|
86
|
+
hasMore: boolean;
|
|
37
87
|
}
|
|
38
88
|
|
|
39
89
|
/**
|
package/src/index.ts
CHANGED
|
@@ -51,6 +51,8 @@ export type {
|
|
|
51
51
|
CheckoutShippingGroup,
|
|
52
52
|
CheckoutShippingGroupItem,
|
|
53
53
|
CheckoutAdjustmentPayment,
|
|
54
|
+
CheckoutOrderClaimRequestResult,
|
|
55
|
+
CheckoutOrderClaimAcceptResult,
|
|
54
56
|
CheckoutInterruptionKind,
|
|
55
57
|
CheckoutInterruptionAction,
|
|
56
58
|
CheckoutInterruption,
|
|
@@ -102,6 +104,8 @@ export type {
|
|
|
102
104
|
CatalogFacetId,
|
|
103
105
|
CatalogFacetDemonstrationSource,
|
|
104
106
|
FacetSupport,
|
|
107
|
+
CatalogFacetOption,
|
|
108
|
+
CatalogFacetGroup,
|
|
105
109
|
CatalogResults,
|
|
106
110
|
CatalogQueryFailureCode,
|
|
107
111
|
CatalogQueryFailureRepair,
|
|
@@ -118,6 +122,10 @@ export type {
|
|
|
118
122
|
ProductVariant,
|
|
119
123
|
SelectedOption,
|
|
120
124
|
PriceRange,
|
|
125
|
+
ProductHighlight,
|
|
126
|
+
ProductAttribute,
|
|
127
|
+
ProductAttributeGroup,
|
|
128
|
+
ProductAttachment,
|
|
121
129
|
GetProductsOptions,
|
|
122
130
|
ActiveFilter,
|
|
123
131
|
SortOption,
|
|
@@ -186,6 +194,10 @@ export type {
|
|
|
186
194
|
export type {
|
|
187
195
|
Customer,
|
|
188
196
|
Address,
|
|
197
|
+
AddressFilter,
|
|
198
|
+
AddressSort,
|
|
199
|
+
AddressListQuery,
|
|
200
|
+
AddressListResult,
|
|
189
201
|
GetCustomersOptions,
|
|
190
202
|
GetCustomersCallback,
|
|
191
203
|
} from './customer';
|
package/src/product.ts
CHANGED
|
@@ -50,6 +50,10 @@ export interface ProductVariant {
|
|
|
50
50
|
|
|
51
51
|
// Media
|
|
52
52
|
image?: Image; // Variant-specific image
|
|
53
|
+
|
|
54
|
+
// Specifications that differ per variant (e.g. a size chart); absent means
|
|
55
|
+
// the product-level groups apply.
|
|
56
|
+
attributes?: ProductAttributeGroup[];
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
/**
|
|
@@ -60,6 +64,45 @@ export interface PriceRange {
|
|
|
60
64
|
maxVariantPrice: Money;
|
|
61
65
|
}
|
|
62
66
|
|
|
67
|
+
/**
|
|
68
|
+
* One merchandising highlight, rendered as a label/value pair (e.g.
|
|
69
|
+
* "Pantalla" / "14 pulgadas") above the description.
|
|
70
|
+
*/
|
|
71
|
+
export interface ProductHighlight {
|
|
72
|
+
label: string;
|
|
73
|
+
value: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** One row inside an attribute group. */
|
|
77
|
+
export interface ProductAttribute {
|
|
78
|
+
id?: string;
|
|
79
|
+
label: string;
|
|
80
|
+
value: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* A titled block of specifications (e.g. "Peso y medidas"). Grouped rather than
|
|
85
|
+
* flat so the product detail can render several tables without inventing titles.
|
|
86
|
+
*/
|
|
87
|
+
export interface ProductAttributeGroup {
|
|
88
|
+
id?: string;
|
|
89
|
+
title: string;
|
|
90
|
+
items: ProductAttribute[];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** A document attached to the product (datasheet, manual, care guide). */
|
|
94
|
+
export interface ProductAttachment {
|
|
95
|
+
id: string;
|
|
96
|
+
name: string;
|
|
97
|
+
kind?: string;
|
|
98
|
+
language?: string;
|
|
99
|
+
size?: string;
|
|
100
|
+
version?: string;
|
|
101
|
+
url?: string;
|
|
102
|
+
/** Empty or absent means the attachment applies to every variant. */
|
|
103
|
+
variantIds?: string[];
|
|
104
|
+
}
|
|
105
|
+
|
|
63
106
|
/**
|
|
64
107
|
* Main product type - normalized across all providers
|
|
65
108
|
*
|
|
@@ -96,6 +139,16 @@ export interface Product {
|
|
|
96
139
|
productType?: string; // Shopify: productType, Medusa: type, WooCommerce: type (simple/variable)
|
|
97
140
|
vendor?: string; // Shopify-specific, stored in metadata for others
|
|
98
141
|
tags?: string[];
|
|
142
|
+
|
|
143
|
+
// Merchandising detail (optional, provider-dependent). A provider without a
|
|
144
|
+
// source for one of these omits it; the product detail renders the module off
|
|
145
|
+
// instead of showing an empty shell.
|
|
146
|
+
brand?: string;
|
|
147
|
+
model?: string;
|
|
148
|
+
shortDescription?: string;
|
|
149
|
+
highlights?: ProductHighlight[];
|
|
150
|
+
attributes?: ProductAttributeGroup[];
|
|
151
|
+
attachments?: ProductAttachment[];
|
|
99
152
|
|
|
100
153
|
// SEO
|
|
101
154
|
seo?: SEO;
|