@nextblock-cms/ecom 0.0.10 → 0.8.1

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.
Files changed (147) hide show
  1. package/actions.d.ts +2 -0
  2. package/currency-rest-client-CwoqdgAP.js +23 -0
  3. package/currency-rest-client-uolJxUkL.cjs +1 -0
  4. package/index.cjs.js +1 -0
  5. package/index.d.ts +35 -0
  6. package/index.es.js +3226 -0
  7. package/invoice-ui-BJZfedDd.cjs +332 -0
  8. package/invoice-ui-GJ1ADAjn.js +5759 -0
  9. package/lib/CurrencyProvider.d.ts +18 -0
  10. package/lib/cart-store.d.ts +47 -0
  11. package/lib/components/AccountNavigationMenu.d.ts +14 -0
  12. package/lib/components/AddToCartButton.d.ts +8 -0
  13. package/lib/components/Cart.d.ts +1 -0
  14. package/lib/components/CartDrawer.d.ts +1 -0
  15. package/lib/components/CartIcon.d.ts +1 -0
  16. package/lib/components/Checkout.d.ts +6 -0
  17. package/lib/components/CouponForm.d.ts +8 -0
  18. package/lib/components/CurrencySwitcher.d.ts +1 -0
  19. package/lib/components/CustomerProfileForm.d.ts +21 -0
  20. package/lib/components/FeaturedProduct.d.ts +8 -0
  21. package/lib/components/InvoiceDocument.d.ts +32 -0
  22. package/lib/components/InvoiceViewerShell.d.ts +26 -0
  23. package/lib/components/ProductCard.d.ts +7 -0
  24. package/lib/components/ProductDetailsLayout.d.ts +7 -0
  25. package/lib/components/ProductGallery.d.ts +9 -0
  26. package/lib/components/ProductGrid.d.ts +8 -0
  27. package/lib/components/ShippingEstimator.d.ts +5 -0
  28. package/lib/components/SimpleTiptapRenderer.d.ts +7 -0
  29. package/lib/components/SubscriptionSelector.d.ts +7 -0
  30. package/lib/components/media/MediaImage.d.ts +12 -0
  31. package/lib/components/media/MediaPickerDialog.d.ts +16 -0
  32. package/lib/components/media/MediaUploadForm.d.ts +10 -0
  33. package/lib/components/media/UploadFolderContext.d.ts +10 -0
  34. package/lib/countries.d.ts +5 -0
  35. package/lib/coupon-server.d.ts +22 -0
  36. package/lib/coupon-server.test.d.ts +1 -0
  37. package/lib/coupons.d.ts +41 -0
  38. package/lib/currency-constants.d.ts +1 -0
  39. package/lib/currency-rest-client.d.ts +1 -0
  40. package/lib/currency-sale-schedule.test.d.ts +1 -0
  41. package/lib/currency-store.d.ts +20 -0
  42. package/lib/currency-sync.d.ts +19 -0
  43. package/lib/currency.d.ts +116 -0
  44. package/lib/customer-addresses.d.ts +19 -0
  45. package/lib/customer-orders.d.ts +23 -0
  46. package/lib/customer.d.ts +51 -0
  47. package/lib/export-helpers.d.ts +48 -0
  48. package/lib/factory.d.ts +2 -0
  49. package/lib/freemius-coupons.d.ts +58 -0
  50. package/lib/freemius-order-sync.d.ts +133 -0
  51. package/lib/freemius-order-sync.test.d.ts +1 -0
  52. package/lib/inventory-settings.d.ts +16 -0
  53. package/lib/invoice-server.d.ts +18 -0
  54. package/lib/invoice-ui.d.ts +29 -0
  55. package/lib/invoice.d.ts +75 -0
  56. package/lib/order-inventory.d.ts +7 -0
  57. package/lib/order-tax-details.d.ts +57 -0
  58. package/lib/pages/cms/coupons/CouponEditorForm.d.ts +23 -0
  59. package/lib/pages/cms/coupons/CouponsPage.d.ts +8 -0
  60. package/lib/pages/cms/coupons/CreateCouponDialog.d.ts +6 -0
  61. package/lib/pages/cms/coupons/EditCouponPage.d.ts +5 -0
  62. package/lib/pages/cms/coupons/ProductScopePicker.d.ts +16 -0
  63. package/lib/pages/cms/coupons/actions.d.ts +5 -0
  64. package/lib/pages/cms/coupons/index.d.ts +2 -0
  65. package/lib/pages/cms/coupons/product-options.d.ts +2 -0
  66. package/lib/pages/cms/orders/ExportReportsDialog.d.ts +2 -0
  67. package/lib/pages/cms/orders/MarkPaidButton.d.ts +3 -0
  68. package/lib/pages/cms/orders/OrderDetailPage.d.ts +5 -0
  69. package/lib/pages/cms/orders/OrderPrintButton.d.ts +3 -0
  70. package/lib/pages/cms/orders/OrderStatusForm.d.ts +4 -0
  71. package/lib/pages/cms/orders/OrdersPage.d.ts +6 -0
  72. package/lib/pages/cms/orders/actions.d.ts +7 -0
  73. package/lib/pages/cms/orders/export-actions.d.ts +2 -0
  74. package/lib/pages/cms/orders/index.d.ts +6 -0
  75. package/lib/pages/cms/orders/server-actions.d.ts +11 -0
  76. package/lib/pages/cms/orders/types.d.ts +60 -0
  77. package/lib/pages/cms/payments/PaymentsClient.d.ts +19 -0
  78. package/lib/pages/cms/payments/PaymentsPage.d.ts +1 -0
  79. package/lib/pages/cms/payments/actions.d.ts +4 -0
  80. package/lib/pages/cms/payments/index.d.ts +2 -0
  81. package/lib/pages/cms/payments/queries.d.ts +12 -0
  82. package/lib/pages/cms/products/ProductsPage.d.ts +7 -0
  83. package/lib/pages/cms/products/[id]/edit/EditProductPage.d.ts +12 -0
  84. package/lib/pages/cms/products/actions.d.ts +18201 -0
  85. package/lib/pages/cms/products/attributes/AttributeManagementPage.d.ts +1 -0
  86. package/lib/pages/cms/products/attributes/components/AttributeManager.d.ts +50 -0
  87. package/lib/pages/cms/products/categories/CategoryManagementPage.d.ts +1 -0
  88. package/lib/pages/cms/products/categories/components/CategoryManager.d.ts +47 -0
  89. package/lib/pages/cms/products/components/CopyProductFromLanguage.d.ts +9 -0
  90. package/lib/pages/cms/products/components/CurrencyPriceFields.d.ts +18 -0
  91. package/lib/pages/cms/products/components/DeleteProductButton.d.ts +9 -0
  92. package/lib/pages/cms/products/components/FreemiusPricingDashboard.d.ts +24 -0
  93. package/lib/pages/cms/products/components/ProductCategorySelector.d.ts +14 -0
  94. package/lib/pages/cms/products/components/ProductForm.d.ts +62 -0
  95. package/lib/pages/cms/products/components/ProductMediaManager.d.ts +17 -0
  96. package/lib/pages/cms/products/components/ProductsBulkTable.d.ts +32 -0
  97. package/lib/pages/cms/products/components/SaleScheduleFields.d.ts +16 -0
  98. package/lib/pages/cms/products/components/SyncFreemiusButton.d.ts +3 -0
  99. package/lib/pages/cms/products/components/SyncFreemiusPricingButton.d.ts +5 -0
  100. package/lib/pages/cms/products/components/SyncProductForm.d.ts +1 -0
  101. package/lib/pages/cms/products/components/VariationsEditor.d.ts +26 -0
  102. package/lib/pages/cms/products/index.d.ts +7 -0
  103. package/lib/pages/cms/products/inventory/InventoryPage.d.ts +1 -0
  104. package/lib/pages/cms/products/inventory/InventoryTableClient.d.ts +6 -0
  105. package/lib/pages/cms/products/inventory/actions.d.ts +38 -0
  106. package/lib/pages/cms/products/new/NewProductPage.d.ts +9 -0
  107. package/lib/pages/cms/products/product-price-sync.d.ts +43 -0
  108. package/lib/pages/cms/products/server-actions.d.ts +125 -0
  109. package/lib/pages/cms/shipping/ShippingPage.d.ts +6 -0
  110. package/lib/pages/cms/shipping/components/RateForm.d.ts +26 -0
  111. package/lib/pages/cms/shipping/components/ZoneForm.d.ts +13 -0
  112. package/lib/pages/cms/shipping/index.d.ts +2 -0
  113. package/lib/pages/cms/shipping/server-actions.d.ts +80 -0
  114. package/lib/pages/cms/taxes/TaxesPage.d.ts +5 -0
  115. package/lib/pages/cms/taxes/actions.d.ts +3 -0
  116. package/lib/pages/cms/taxes/components/TaxRateForm.d.ts +8 -0
  117. package/lib/pages/cms/taxes/index.d.ts +2 -0
  118. package/lib/product-actions.d.ts +18457 -0
  119. package/lib/product-context.d.ts +7 -0
  120. package/lib/product-schema.d.ts +73 -0
  121. package/lib/providers/freemius.d.ts +49 -0
  122. package/lib/providers/stripe.d.ts +13 -0
  123. package/lib/server-actions/coupon-actions.d.ts +17 -0
  124. package/lib/server-actions/customer-actions.d.ts +18 -0
  125. package/lib/server-actions/product-actions.d.ts +69 -0
  126. package/lib/server-actions/shipping-actions.d.ts +10 -0
  127. package/lib/server-actions/tax-actions.d.ts +7 -0
  128. package/lib/shared-inventory.d.ts +38 -0
  129. package/lib/shipping/resolver.d.ts +16 -0
  130. package/lib/shipping-rate-currency.d.ts +39 -0
  131. package/lib/states.d.ts +9 -0
  132. package/lib/stripe/checkout.d.ts +6 -0
  133. package/lib/stripe/client.d.ts +2 -0
  134. package/lib/stripe/order-sync.d.ts +18 -0
  135. package/lib/stripe/webhooks.d.ts +4 -0
  136. package/lib/tax-calculation.d.ts +23 -0
  137. package/lib/trials.d.ts +15 -0
  138. package/lib/types.d.ts +245 -0
  139. package/lib/use-cart.d.ts +11 -0
  140. package/lib/variation-utils.d.ts +72 -0
  141. package/lib/zod-config.d.ts +2 -0
  142. package/package.json +47 -2
  143. package/server.cjs.js +110 -0
  144. package/server.d.ts +31 -0
  145. package/server.es.js +6039 -0
  146. package/index.ts +0 -12
  147. package/tsconfig.lib.json +0 -10
@@ -0,0 +1 @@
1
+ export declare function AttributeManagementPage(): Promise<import("react").JSX.Element>;
@@ -0,0 +1,50 @@
1
+ import { ProductAttribute } from '../../../../../types';
2
+ import { Database } from '../../../../../../../../db/src/index.ts';
3
+ type Language = Database['public']['Tables']['languages']['Row'];
4
+ interface AttributeManagerProps {
5
+ attributes: ProductAttribute[];
6
+ languages: Language[];
7
+ createAttributeAction: (input: {
8
+ name: string;
9
+ slug?: string;
10
+ }) => Promise<{
11
+ success: boolean;
12
+ error?: string;
13
+ }>;
14
+ deleteAttributeAction: (attributeId: string) => Promise<{
15
+ success: boolean;
16
+ error?: string;
17
+ }>;
18
+ createTermAction: (input: {
19
+ attributeId: string;
20
+ value: string;
21
+ slug?: string;
22
+ }) => Promise<{
23
+ success: boolean;
24
+ error?: string;
25
+ }>;
26
+ deleteTermAction: (termId: string) => Promise<{
27
+ success: boolean;
28
+ error?: string;
29
+ }>;
30
+ reorderTermsAction: (input: {
31
+ attributeId: string;
32
+ orderedTermIds: string[];
33
+ }) => Promise<{
34
+ success: boolean;
35
+ error?: string;
36
+ }>;
37
+ updateTranslationsAction: (input: {
38
+ attributeId: string;
39
+ nameTranslations: Record<string, string>;
40
+ termTranslations: Array<{
41
+ termId: string;
42
+ valueTranslations: Record<string, string>;
43
+ }>;
44
+ }) => Promise<{
45
+ success: boolean;
46
+ error?: string;
47
+ }>;
48
+ }
49
+ export declare function AttributeManager({ attributes, languages, createAttributeAction, deleteAttributeAction, createTermAction, deleteTermAction, reorderTermsAction, updateTranslationsAction, }: AttributeManagerProps): import("react").JSX.Element;
50
+ export {};
@@ -0,0 +1 @@
1
+ export declare function CategoryManagementPage(): Promise<import("react").JSX.Element>;
@@ -0,0 +1,47 @@
1
+ import { default as React } from 'react';
2
+ interface Language {
3
+ id: number;
4
+ code: string;
5
+ name: string;
6
+ is_default: boolean;
7
+ }
8
+ interface CategoryItem {
9
+ id: string;
10
+ name: string;
11
+ slug: string;
12
+ description: string;
13
+ created_at: string;
14
+ productCount: number;
15
+ name_translations?: Record<string, string> | null;
16
+ description_translations?: Record<string, string> | null;
17
+ }
18
+ interface CategoryManagerProps {
19
+ initialCategories: CategoryItem[];
20
+ languages: Language[];
21
+ createCategory: (input: {
22
+ name: string;
23
+ slug?: string;
24
+ description?: string;
25
+ nameTranslations?: Record<string, string>;
26
+ descriptionTranslations?: Record<string, string>;
27
+ }) => Promise<{
28
+ success: boolean;
29
+ error?: string;
30
+ }>;
31
+ updateCategory: (id: string, input: {
32
+ name: string;
33
+ slug?: string;
34
+ description?: string;
35
+ nameTranslations?: Record<string, string>;
36
+ descriptionTranslations?: Record<string, string>;
37
+ }) => Promise<{
38
+ success: boolean;
39
+ error?: string;
40
+ }>;
41
+ deleteCategory: (id: string) => Promise<{
42
+ success: boolean;
43
+ error?: string;
44
+ }>;
45
+ }
46
+ export declare function CategoryManager({ initialCategories, languages, createCategory, updateCategory, deleteCategory, }: CategoryManagerProps): React.JSX.Element;
47
+ export {};
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ interface CopyProductFromLanguageProps {
3
+ productId: string;
4
+ currentLanguageId: number;
5
+ translationGroupId: string;
6
+ allSiteLanguages: any[];
7
+ }
8
+ export declare function CopyProductFromLanguage({ productId, currentLanguageId, translationGroupId, allSiteLanguages, }: CopyProductFromLanguageProps): React.JSX.Element;
9
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ import { CurrencyRecord } from '../../../../currency';
3
+ interface CurrencyPriceFieldsProps {
4
+ idPrefix?: string;
5
+ currencies: CurrencyRecord[];
6
+ prices: Record<string, number | null | undefined>;
7
+ salePrices: Record<string, number | null | undefined>;
8
+ managedCurrencyCodes?: string[];
9
+ onPriceChange: (currencyCode: string, value: number) => void;
10
+ onSalePriceChange: (currencyCode: string, value: number | null) => void;
11
+ onAutoFill?: () => void;
12
+ readOnly?: boolean;
13
+ helperText?: string;
14
+ /** Rendered inline at the end of the default-currency row (e.g. a sale schedule). */
15
+ trailing?: ReactNode;
16
+ }
17
+ export declare function CurrencyPriceFields({ idPrefix, currencies, prices, salePrices, managedCurrencyCodes, onPriceChange, onSalePriceChange, readOnly, helperText, trailing, }: CurrencyPriceFieldsProps): import("react").JSX.Element | null;
18
+ export {};
@@ -0,0 +1,9 @@
1
+ interface DeleteProductButtonProps {
2
+ productName: string;
3
+ isIcon?: boolean;
4
+ className?: string;
5
+ redirectTo?: string;
6
+ deleteAction: () => Promise<void>;
7
+ }
8
+ export declare function DeleteProductButton({ productName, isIcon, className, redirectTo, deleteAction, }: DeleteProductButtonProps): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,24 @@
1
+ interface FreemiusPricingData {
2
+ id: string;
3
+ license_quota: number;
4
+ api_monthly_price: number | null;
5
+ api_annual_price: number | null;
6
+ api_lifetime_price: number | null;
7
+ override_monthly_price: number | null;
8
+ override_annual_price: number | null;
9
+ override_lifetime_price: number | null;
10
+ is_active: boolean;
11
+ }
12
+ interface FreemiusPlanData {
13
+ id: string;
14
+ name: string;
15
+ title: string;
16
+ freemius_pricing: FreemiusPricingData[];
17
+ }
18
+ interface FreemiusPricingDashboardProps {
19
+ productId: string;
20
+ freemiusProductId: string;
21
+ plans: FreemiusPlanData[];
22
+ }
23
+ export declare function FreemiusPricingDashboard({ plans }: FreemiusPricingDashboardProps): import("react").JSX.Element;
24
+ export {};
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ interface CategoryOption {
3
+ id: string;
4
+ name: string;
5
+ slug: string;
6
+ }
7
+ interface ProductCategorySelectorProps {
8
+ categories: CategoryOption[];
9
+ selectedIds: string[];
10
+ onChange: (ids: string[]) => void;
11
+ placeholder?: string;
12
+ }
13
+ export declare function ProductCategorySelector({ categories, selectedIds, onChange, placeholder, }: ProductCategorySelectorProps): React.JSX.Element;
14
+ export {};
@@ -0,0 +1,62 @@
1
+ import { default as React } from 'react';
2
+ import { z } from 'zod';
3
+ import { ProductFormValues, productSchema } from '../../../../product-schema';
4
+ import { EnabledPaymentProviders, ProductAttribute } from '../../../../types';
5
+ import { CurrencyRecord } from '../../../../currency';
6
+ type ProductLanguageOption = {
7
+ id: number;
8
+ name: string;
9
+ code: string;
10
+ is_default?: boolean;
11
+ };
12
+ type ProductMediaRelation = {
13
+ id?: string;
14
+ media_id: string;
15
+ sort_order?: number | null;
16
+ media?: {
17
+ file_path?: string | null;
18
+ object_key?: string | null;
19
+ alt_text?: string | null;
20
+ } | null;
21
+ };
22
+ type ProductFormInitialData = Omit<z.infer<typeof productSchema>, 'product_media'> & {
23
+ id?: string;
24
+ product_media?: ProductMediaRelation[];
25
+ language_id?: number;
26
+ translation_group_id?: string;
27
+ category_ids?: string[];
28
+ };
29
+ type PaymentConfigStatus = {
30
+ stripe: {
31
+ hasKeys: boolean;
32
+ missing: string[];
33
+ };
34
+ freemius: {
35
+ hasKeys: boolean;
36
+ missing: string[];
37
+ };
38
+ };
39
+ interface ProductFormProps {
40
+ initialData?: ProductFormInitialData;
41
+ isEdit?: boolean;
42
+ mediaPickerNode?: React.ReactNode;
43
+ availableLanguagesProp: ProductLanguageOption[];
44
+ globalAttributesProp: ProductAttribute[];
45
+ currenciesProp: CurrencyRecord[];
46
+ translationGroupId?: string;
47
+ targetLanguageId?: string;
48
+ freemiusDashboardNode?: React.ReactNode;
49
+ enabledProviders: EnabledPaymentProviders;
50
+ configStatus: PaymentConfigStatus;
51
+ createAction?: (data: ProductFormValues) => Promise<void>;
52
+ updateAction?: (data: ProductFormValues) => Promise<{
53
+ success: boolean;
54
+ } | void>;
55
+ availableCategoriesProp?: Array<{
56
+ id: string;
57
+ name: string;
58
+ slug: string;
59
+ }>;
60
+ }
61
+ export declare function ProductForm({ initialData, isEdit, mediaPickerNode, availableLanguagesProp, globalAttributesProp, currenciesProp, translationGroupId, targetLanguageId, freemiusDashboardNode, enabledProviders, configStatus, createAction, updateAction, availableCategoriesProp }: ProductFormProps): React.JSX.Element;
62
+ export {};
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ type MediaItem = {
3
+ id: string;
4
+ media_id: string;
5
+ file_path: string;
6
+ alt: string;
7
+ sort_order: number;
8
+ isNew?: boolean;
9
+ isDeleted?: boolean;
10
+ };
11
+ interface ProductMediaManagerProps {
12
+ initialMedia: MediaItem[];
13
+ onUpdate: (media: MediaItem[]) => void;
14
+ mediaPickerNode?: React.ReactNode;
15
+ }
16
+ export declare const ProductMediaManager: ({ initialMedia, onUpdate, mediaPickerNode }: ProductMediaManagerProps) => React.JSX.Element;
17
+ export {};
@@ -0,0 +1,32 @@
1
+ type ProductRow = {
2
+ id: string;
3
+ title: string;
4
+ sku: string;
5
+ slug?: string | null;
6
+ price?: number | null;
7
+ sale_price?: number | null;
8
+ stock?: number | null;
9
+ status?: string | null;
10
+ language_id: number;
11
+ product_media?: Array<{
12
+ media?: {
13
+ file_path?: string | null;
14
+ object_key?: string | null;
15
+ } | null;
16
+ }> | null;
17
+ };
18
+ type BulkActionResult = Promise<{
19
+ success: boolean;
20
+ error?: string;
21
+ count?: number;
22
+ }>;
23
+ interface ProductsBulkTableProps {
24
+ products: ProductRow[];
25
+ languageLabels: Record<string, string>;
26
+ defaultCurrencyCode: string;
27
+ deleteProductAction: (id: string) => Promise<void>;
28
+ bulkDeleteProductsAction: (productIds: string[]) => BulkActionResult;
29
+ bulkDraftProductsAction: (productIds: string[]) => BulkActionResult;
30
+ }
31
+ export declare function ProductsBulkTable({ products, languageLabels, defaultCurrencyCode, deleteProductAction, bulkDeleteProductsAction, bulkDraftProductsAction, }: ProductsBulkTableProps): import("react").JSX.Element;
32
+ export {};
@@ -0,0 +1,16 @@
1
+ export type SaleScheduleField = 'sale_start_at' | 'sale_end_at';
2
+ interface SaleScheduleFieldsProps {
3
+ idPrefix?: string;
4
+ startAt?: string | null;
5
+ endAt?: string | null;
6
+ onChange: (field: SaleScheduleField, value: string | null) => void;
7
+ error?: string;
8
+ disabled?: boolean;
9
+ description?: string;
10
+ /** Slimmer boxed layout. */
11
+ dense?: boolean;
12
+ /** Inline STARTS → ENDS only, no box / heading (e.g. inside a variant row). */
13
+ bare?: boolean;
14
+ }
15
+ export declare function SaleScheduleFields({ idPrefix, startAt, endAt, onChange, error, disabled, description, dense, bare, }: SaleScheduleFieldsProps): import("react").JSX.Element;
16
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function SyncFreemiusButton({ title }: {
2
+ title?: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ interface SyncFreemiusPricingButtonProps {
2
+ productId: string;
3
+ }
4
+ export declare function SyncFreemiusPricingButton({ productId }: SyncFreemiusPricingButtonProps): import("react").JSX.Element;
5
+ export {};
@@ -0,0 +1 @@
1
+ export declare function SyncProductForm(): import("react").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { ProductFormValues } from '../../../../product-schema';
2
+ import { ProductAttribute } from '../../../../types';
3
+ import { CurrencyRecord } from '../../../../currency';
4
+ interface VariationsEditorProps {
5
+ globalAttributes: ProductAttribute[];
6
+ currentLanguageCode?: string;
7
+ baseSku: string;
8
+ basePrice: number;
9
+ basePrices?: Record<string, number | null | undefined>;
10
+ baseSalePrice?: number | null;
11
+ baseSalePrices?: Record<string, number | null | undefined>;
12
+ currencies: CurrencyRecord[];
13
+ availableVariantImages?: Array<{
14
+ media_id: string;
15
+ file_path: string;
16
+ alt?: string | null;
17
+ }>;
18
+ initialVariationAttributes?: ProductFormValues['variation_attributes'];
19
+ initialVariants?: ProductFormValues['variants'];
20
+ onChange: (payload: {
21
+ variationAttributes: ProductFormValues['variation_attributes'];
22
+ variants: ProductFormValues['variants'];
23
+ }) => void;
24
+ }
25
+ export declare function VariationsEditor({ globalAttributes, currentLanguageCode, baseSku, basePrice, basePrices, baseSalePrice, baseSalePrices, currencies, availableVariantImages, initialVariationAttributes, initialVariants, onChange, }: VariationsEditorProps): import("react").JSX.Element;
26
+ export {};
@@ -0,0 +1,7 @@
1
+ export * from './ProductsPage';
2
+ export * from './inventory/InventoryPage';
3
+ export * from './attributes/AttributeManagementPage';
4
+ export * from './new/NewProductPage';
5
+ export * from './[id]/edit/EditProductPage';
6
+ export * from './components/CopyProductFromLanguage';
7
+ export * from './categories/CategoryManagementPage';
@@ -0,0 +1 @@
1
+ export declare function InventoryPage(): Promise<import("react").JSX.Element>;
@@ -0,0 +1,6 @@
1
+ import { InventoryItem } from '../../../../shared-inventory';
2
+ interface InventoryTableClientProps {
3
+ initialItems: InventoryItem[];
4
+ }
5
+ export declare function InventoryTableClient({ initialItems }: InventoryTableClientProps): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,38 @@
1
+ interface UpdateInventoryQuantityInput {
2
+ sku: string;
3
+ stock: number;
4
+ }
5
+ export declare function updateInventoryQuantityAction(input: UpdateInventoryQuantityInput): Promise<{
6
+ success: boolean;
7
+ itemKey: string;
8
+ stock: number;
9
+ error?: undefined;
10
+ } | {
11
+ success: boolean;
12
+ error: string;
13
+ itemKey?: undefined;
14
+ stock?: undefined;
15
+ }>;
16
+ export declare function importInventoryCsvAction(csvText: string): Promise<{
17
+ success: boolean;
18
+ error: string;
19
+ updatedCount?: undefined;
20
+ items?: undefined;
21
+ } | {
22
+ success: boolean;
23
+ updatedCount: number;
24
+ items: {
25
+ key: string;
26
+ sku: string;
27
+ stock: number;
28
+ usageType: import('../../../../shared-inventory').InventoryUsageType;
29
+ productTitles: string[];
30
+ parentProductSkus: string[];
31
+ languages: string[];
32
+ statuses: string[];
33
+ productIds: string[];
34
+ variantIds: string[];
35
+ }[];
36
+ error?: undefined;
37
+ }>;
38
+ export {};
@@ -0,0 +1,9 @@
1
+ interface NewProductPageProps {
2
+ mediaPickerNode?: React.ReactNode;
3
+ availableLanguagesProp: any[];
4
+ translationGroupId?: string;
5
+ targetLanguageId?: string;
6
+ initialData?: any;
7
+ }
8
+ export declare function NewProductPage({ mediaPickerNode, availableLanguagesProp, translationGroupId, targetLanguageId, initialData }: NewProductPageProps): Promise<import("react").JSX.Element>;
9
+ export {};
@@ -0,0 +1,43 @@
1
+ import { CurrencyRecord } from '../../../currency';
2
+ import { ProductFormValues } from '../../../product-schema';
3
+ type EditorPriceMap = Record<string, number | null | undefined>;
4
+ type ProductVariantValue = NonNullable<ProductFormValues['variants']>[number];
5
+ export declare function isCurrencyStoreManagedPrice(currency: CurrencyRecord | null | undefined): boolean;
6
+ export declare function getStoreManagedPriceCurrencyCodes(currencies: CurrencyRecord[]): string[];
7
+ export declare function resolveEditorCurrencyPriceMaps(params: {
8
+ currencies: CurrencyRecord[];
9
+ prices: EditorPriceMap | null | undefined;
10
+ salePrices: EditorPriceMap | null | undefined;
11
+ fallbackPrice: number | null | undefined;
12
+ fallbackSalePrice: number | null | undefined;
13
+ }): {
14
+ prices: Record<string, number | null | undefined>;
15
+ salePrices: Record<string, number | null | undefined>;
16
+ };
17
+ export declare function sanitizeVariantDraftForStoreManagedCurrencies(variant: ProductVariantValue, currencies: CurrencyRecord[]): ProductVariantValue;
18
+ export declare function sanitizeVariantDraftsForStoreManagedCurrencies(variants: ProductFormValues['variants'] | undefined, currencies: CurrencyRecord[]): {
19
+ combination_key: string;
20
+ sku: string;
21
+ price: number;
22
+ prices: Record<string, number>;
23
+ sale_prices: Record<string, number | null>;
24
+ stock_quantity: number;
25
+ attribute_term_ids: string[];
26
+ selected_options: {
27
+ attribute_id: string;
28
+ attribute_name: string;
29
+ term_id: string;
30
+ term_value: string;
31
+ term_slug?: string | undefined;
32
+ }[];
33
+ label: string;
34
+ id?: string | undefined;
35
+ upc?: string | null | undefined;
36
+ sale_price?: number | null | undefined;
37
+ sale_start_at?: string | null | undefined;
38
+ sale_end_at?: string | null | undefined;
39
+ main_media_id?: string | null | undefined;
40
+ main_image_url?: string | null | undefined;
41
+ }[];
42
+ export declare function sanitizeProductFormValuesForStoreManagedCurrencies(data: ProductFormValues, currencies: CurrencyRecord[]): ProductFormValues;
43
+ export {};
@@ -0,0 +1,125 @@
1
+ import { ProductFormValues } from '../../../product-schema';
2
+ export declare function createProductAction(data: ProductFormValues): Promise<void>;
3
+ export declare function updateProductAction(id: string, data: ProductFormValues): Promise<{
4
+ success: boolean;
5
+ }>;
6
+ export declare function deleteProductAction(id: string): Promise<void>;
7
+ export declare function bulkDeleteProductsAction(productIds: string[]): Promise<{
8
+ success: boolean;
9
+ error: string;
10
+ count?: undefined;
11
+ } | {
12
+ success: boolean;
13
+ count: number;
14
+ error?: undefined;
15
+ }>;
16
+ export declare function bulkDraftProductsAction(productIds: string[]): Promise<{
17
+ success: boolean;
18
+ error: string;
19
+ count?: undefined;
20
+ } | {
21
+ success: boolean;
22
+ count: number;
23
+ error?: undefined;
24
+ }>;
25
+ export declare function createProductAttributeAction(input: {
26
+ name: string;
27
+ slug?: string;
28
+ }): Promise<{
29
+ success: boolean;
30
+ error: any;
31
+ } | {
32
+ success: boolean;
33
+ error?: undefined;
34
+ }>;
35
+ export declare function deleteProductAttributeAction(attributeId: string): Promise<{
36
+ success: boolean;
37
+ error: any;
38
+ } | {
39
+ success: boolean;
40
+ error?: undefined;
41
+ }>;
42
+ export declare function createProductAttributeTermAction(input: {
43
+ attributeId: string;
44
+ value: string;
45
+ slug?: string;
46
+ }): Promise<{
47
+ success: boolean;
48
+ error: any;
49
+ } | {
50
+ success: boolean;
51
+ error?: undefined;
52
+ }>;
53
+ export declare function reorderProductAttributeTermsAction(input: {
54
+ attributeId: string;
55
+ orderedTermIds: string[];
56
+ }): Promise<{
57
+ success: boolean;
58
+ error: any;
59
+ } | {
60
+ success: boolean;
61
+ error?: undefined;
62
+ }>;
63
+ export declare function updateProductAttributeTranslationsAction(input: {
64
+ attributeId: string;
65
+ nameTranslations: Record<string, string>;
66
+ termTranslations: Array<{
67
+ termId: string;
68
+ valueTranslations: Record<string, string>;
69
+ }>;
70
+ }): Promise<{
71
+ success: boolean;
72
+ error: any;
73
+ } | {
74
+ success: boolean;
75
+ error?: undefined;
76
+ }>;
77
+ export declare function deleteProductAttributeTermAction(termId: string): Promise<{
78
+ success: boolean;
79
+ error: any;
80
+ } | {
81
+ success: boolean;
82
+ error?: undefined;
83
+ }>;
84
+ export declare function createCategoryAction(input: {
85
+ name: string;
86
+ slug?: string;
87
+ description?: string;
88
+ nameTranslations?: Record<string, string>;
89
+ descriptionTranslations?: Record<string, string>;
90
+ }): Promise<{
91
+ success: boolean;
92
+ error: any;
93
+ category?: undefined;
94
+ } | {
95
+ success: boolean;
96
+ category: any;
97
+ error?: undefined;
98
+ }>;
99
+ export declare function updateCategoryAction(id: string, input: {
100
+ name: string;
101
+ slug?: string;
102
+ description?: string;
103
+ nameTranslations?: Record<string, string>;
104
+ descriptionTranslations?: Record<string, string>;
105
+ }): Promise<{
106
+ success: boolean;
107
+ error: any;
108
+ } | {
109
+ success: boolean;
110
+ error?: undefined;
111
+ }>;
112
+ export declare function deleteCategoryAction(id: string): Promise<{
113
+ success: boolean;
114
+ error: any;
115
+ } | {
116
+ success: boolean;
117
+ error?: undefined;
118
+ }>;
119
+ export declare function syncProductCategoriesAction(productId: string, categoryIds: string[]): Promise<{
120
+ success: boolean;
121
+ error?: undefined;
122
+ } | {
123
+ success: boolean;
124
+ error: any;
125
+ }>;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ export declare function ShippingPage({ searchParams, }: {
3
+ searchParams?: {
4
+ success?: string;
5
+ };
6
+ }): Promise<React.JSX.Element>;
@@ -0,0 +1,26 @@
1
+ import { Database } from '../../../../../../../db/src/index.ts';
2
+ import { CurrencyRecord } from '../../../../currency';
3
+ import { ShippingRateCurrencyMode } from '../../../../shipping-rate-currency';
4
+ type Language = Pick<Database['public']['Tables']['languages']['Row'], 'code' | 'name' | 'is_default'>;
5
+ interface RateFormProps {
6
+ zoneId: string;
7
+ zoneName: string;
8
+ languages: Language[];
9
+ currencies?: CurrencyRecord[];
10
+ defaultCurrencyCode?: string;
11
+ mode?: 'create' | 'edit';
12
+ initialData?: {
13
+ id: string;
14
+ name: string;
15
+ name_translations?: Record<string, string> | null;
16
+ method_type: 'flat_rate' | 'free_shipping';
17
+ cost_amount: number;
18
+ cost_amounts?: Record<string, number> | null;
19
+ cost_currency?: string | null;
20
+ currency_pricing_mode?: ShippingRateCurrencyMode | null;
21
+ min_order_amount: number;
22
+ min_order_amounts?: Record<string, number> | null;
23
+ };
24
+ }
25
+ export declare function RateForm({ zoneId, zoneName, languages, currencies, defaultCurrencyCode, mode, initialData, }: RateFormProps): import("react").JSX.Element;
26
+ export {};
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { ShippingZoneLocationInput } from '../server-actions';
3
+ interface ZoneFormProps {
4
+ mode?: 'create' | 'edit';
5
+ initialData?: {
6
+ id: string;
7
+ name: string;
8
+ priority_order: number;
9
+ locations: ShippingZoneLocationInput[];
10
+ };
11
+ }
12
+ export declare function ZoneForm({ mode, initialData }: ZoneFormProps): React.JSX.Element;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './ShippingPage';
2
+ export * from './server-actions';