@burdenoff/microfe-store 2026.714.6 → 2026.715.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.
- package/dist/StoreAdminRoot.d.ts +22 -0
- package/dist/StoreAdminRoutes.d.ts +9 -0
- package/dist/StoreRoot.d.ts +31 -0
- package/dist/StoreRoutes.d.ts +12 -0
- package/dist/components/AccessDenied.d.ts +6 -0
- package/dist/components/InstallAppModal.d.ts +28 -0
- package/dist/components/PermissionGuard.d.ts +9 -0
- package/dist/components/RouteGuards.d.ts +8 -0
- package/dist/components/cart/CartDrawer.d.ts +35 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/generated/global-operations.d.ts +2027 -0
- package/dist/generated/global-types.d.ts +24704 -0
- package/dist/generated/wspace-operations.d.ts +1 -0
- package/dist/generated/wspace-types.d.ts +80484 -0
- package/dist/hooks/useBackendCart.d.ts +73 -0
- package/dist/hooks/useCart.d.ts +62 -0
- package/dist/hooks/useInstallations.d.ts +47 -0
- package/dist/hooks/useOrders.d.ts +47 -0
- package/dist/hooks/useProductSearch.d.ts +22 -0
- package/dist/hooks/useStoreGraphQL.d.ts +481 -0
- package/dist/hooks/useStoreGraphQLWithContext.d.ts +32 -0
- package/dist/hooks/useStorePermissions.d.ts +63 -0
- package/dist/index.d.ts +44 -0
- package/dist/pages/AdminDashboardPage.d.ts +3 -0
- package/dist/pages/AdminReviewModerationPage.d.ts +3 -0
- package/dist/pages/AdminStoresPage.d.ts +3 -0
- package/dist/pages/AdminSubmissionsQueuePage.d.ts +3 -0
- package/dist/pages/AppDetailPage.d.ts +3 -0
- package/dist/pages/AppSettingsPage.d.ts +3 -0
- package/dist/pages/CartPage.d.ts +8 -0
- package/dist/pages/InstalledAppsPage.d.ts +3 -0
- package/dist/pages/MarketplaceHomePage.d.ts +3 -0
- package/dist/pages/MarketplaceHomePage.js.map +1 -1
- package/dist/pages/MyLicensesPage.d.ts +3 -0
- package/dist/pages/OrderConfirmationPage.d.ts +3 -0
- package/dist/pages/OrdersPage.d.ts +9 -0
- package/dist/pages/OrdersPage.js +8 -4
- package/dist/pages/OrdersPage.js.map +1 -1
- package/dist/pages/ProductCategoryPage.d.ts +3 -0
- package/dist/pages/ProductDetailPage.d.ts +8 -0
- package/dist/pages/SearchResultsPage.d.ts +3 -0
- package/dist/pages/StoresPage.d.ts +3 -0
- package/dist/providers/StoreProvider.d.ts +38 -0
- package/dist/store/storeStore.d.ts +69 -0
- package/dist/translations/en.d.ts +518 -0
- package/dist/types/index.d.ts +575 -0
- package/dist/utils/index.d.ts +71 -0
- package/dist/utils/nativeBridge.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { AddToCartInput, CreateStoreOrderInput } from '../generated/global-types';
|
|
2
|
+
|
|
3
|
+
export interface Cart {
|
|
4
|
+
id: string;
|
|
5
|
+
userId?: string;
|
|
6
|
+
organizationId?: string;
|
|
7
|
+
sessionId?: string;
|
|
8
|
+
status: 'ACTIVE' | 'ABANDONED' | 'CONVERTED' | 'EXPIRED';
|
|
9
|
+
currency: string;
|
|
10
|
+
subtotal: number;
|
|
11
|
+
total: number;
|
|
12
|
+
itemCount: number;
|
|
13
|
+
notes?: string;
|
|
14
|
+
expiresAt?: string;
|
|
15
|
+
lastActivityAt: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
requiresShipping: boolean;
|
|
19
|
+
isEmpty: boolean;
|
|
20
|
+
items: CartItem[];
|
|
21
|
+
}
|
|
22
|
+
export interface CartItem {
|
|
23
|
+
id: string;
|
|
24
|
+
cartId: string;
|
|
25
|
+
productId: string;
|
|
26
|
+
variantId?: string;
|
|
27
|
+
itemType: 'DIGITAL' | 'PHYSICAL' | 'BUNDLE';
|
|
28
|
+
quantity: number;
|
|
29
|
+
unitPrice: number;
|
|
30
|
+
compareAtPrice?: number;
|
|
31
|
+
subtotal: number;
|
|
32
|
+
workspaceId?: string;
|
|
33
|
+
productName: string;
|
|
34
|
+
variantName?: string;
|
|
35
|
+
productIcon?: string;
|
|
36
|
+
product?: {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
slug?: string;
|
|
40
|
+
icon?: string;
|
|
41
|
+
price?: number;
|
|
42
|
+
pricingModel?: string;
|
|
43
|
+
};
|
|
44
|
+
addedAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Hook for backend cart operations
|
|
49
|
+
*/
|
|
50
|
+
export declare function useBackendCart(): {
|
|
51
|
+
cart: Cart | null;
|
|
52
|
+
cartItems: CartItem[];
|
|
53
|
+
itemCount: number;
|
|
54
|
+
subtotal: number;
|
|
55
|
+
tax: number;
|
|
56
|
+
total: number;
|
|
57
|
+
currency: string;
|
|
58
|
+
loading: boolean;
|
|
59
|
+
addingToCart: boolean;
|
|
60
|
+
updatingCartItem: boolean;
|
|
61
|
+
removingFromCart: boolean;
|
|
62
|
+
clearingCart: boolean;
|
|
63
|
+
checkingOut: boolean;
|
|
64
|
+
error: Error | null;
|
|
65
|
+
addProductToCart: (input: AddToCartInput) => Promise<Cart | undefined>;
|
|
66
|
+
updateQuantity: (cartItemId: string, quantity: number) => Promise<Cart | undefined>;
|
|
67
|
+
removeProductFromCart: (cartItemId: string) => Promise<Cart | undefined>;
|
|
68
|
+
clearAllItems: () => Promise<Cart | undefined>;
|
|
69
|
+
createOrder: (input: CreateStoreOrderInput) => Promise<{
|
|
70
|
+
id: string;
|
|
71
|
+
}>;
|
|
72
|
+
refetchCart: (forceNetwork?: boolean) => Promise<void>;
|
|
73
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Product, ProductVariant } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Hook for cart management (now using backend cart)
|
|
5
|
+
*
|
|
6
|
+
* This hook provides a unified interface for cart operations,
|
|
7
|
+
* using the backend for cart data and Zustand for UI state.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useCart(): {
|
|
10
|
+
cart: import('./useBackendCart').Cart | null;
|
|
11
|
+
cartItems: {
|
|
12
|
+
id: string;
|
|
13
|
+
productId: string;
|
|
14
|
+
productName: string;
|
|
15
|
+
productIcon: string | undefined;
|
|
16
|
+
variantName: string | undefined;
|
|
17
|
+
subtotal: number;
|
|
18
|
+
product: {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
displayName: string;
|
|
22
|
+
icon: string | undefined;
|
|
23
|
+
iconUrl: string | undefined;
|
|
24
|
+
publisher: {
|
|
25
|
+
displayName?: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
} | undefined;
|
|
28
|
+
pricingModel: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
variantId: string | undefined;
|
|
31
|
+
variant: {
|
|
32
|
+
name: string;
|
|
33
|
+
version: string;
|
|
34
|
+
} | undefined;
|
|
35
|
+
quantity: number;
|
|
36
|
+
unitPrice: number;
|
|
37
|
+
totalPrice: number;
|
|
38
|
+
itemType: "physical" | "digital" | "bundle";
|
|
39
|
+
}[];
|
|
40
|
+
itemCount: number;
|
|
41
|
+
subtotal: number;
|
|
42
|
+
tax: number;
|
|
43
|
+
total: number;
|
|
44
|
+
cartOpen: boolean;
|
|
45
|
+
loading: boolean;
|
|
46
|
+
addingToCart: boolean;
|
|
47
|
+
updatingCartItem: boolean;
|
|
48
|
+
removingFromCart: boolean;
|
|
49
|
+
clearingCart: boolean;
|
|
50
|
+
checkingOut: boolean;
|
|
51
|
+
addProduct: (product: Product, variant?: ProductVariant, quantity?: number, workspaceId?: string) => Promise<void>;
|
|
52
|
+
removeProduct: (cartItemId: string) => Promise<void>;
|
|
53
|
+
updateQuantity: (cartItemId: string, quantity: number) => Promise<void>;
|
|
54
|
+
clearCart: () => Promise<void>;
|
|
55
|
+
createOrder: (input: import('../generated/global-types').CreateStoreOrderInput) => Promise<{
|
|
56
|
+
id: string;
|
|
57
|
+
}>;
|
|
58
|
+
refetchCart: (forceNetwork?: boolean) => Promise<void>;
|
|
59
|
+
toggleCart: () => void;
|
|
60
|
+
openCart: () => void;
|
|
61
|
+
closeCart: () => void;
|
|
62
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { StoreInstallationStatus, InstallationFilterInput } from '../generated/global-types';
|
|
2
|
+
|
|
3
|
+
export interface InstalledApp {
|
|
4
|
+
id: string;
|
|
5
|
+
productId: string;
|
|
6
|
+
workspaceId: string;
|
|
7
|
+
organizationId?: string | null;
|
|
8
|
+
status: StoreInstallationStatus;
|
|
9
|
+
installedAt: string;
|
|
10
|
+
version?: string | null;
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
workspaceName?: string | null;
|
|
13
|
+
workspaceType?: string | null;
|
|
14
|
+
installedById: string;
|
|
15
|
+
manifest?: Record<string, unknown> | null;
|
|
16
|
+
metadata?: Record<string, unknown> | null;
|
|
17
|
+
context?: Record<string, unknown> | null;
|
|
18
|
+
grantedPermissions?: Array<{
|
|
19
|
+
resource: string;
|
|
20
|
+
level: 'read' | 'write';
|
|
21
|
+
}> | null;
|
|
22
|
+
uninstalledAt?: string | null;
|
|
23
|
+
uninstalledById?: string | null;
|
|
24
|
+
}
|
|
25
|
+
interface InstallationsState {
|
|
26
|
+
installations: InstalledApp[];
|
|
27
|
+
totalCount: number;
|
|
28
|
+
hasMore: boolean;
|
|
29
|
+
loading: boolean;
|
|
30
|
+
error: Error | null;
|
|
31
|
+
uninstallingIds: Set<string>;
|
|
32
|
+
refetch: () => Promise<void>;
|
|
33
|
+
loadMore: () => void;
|
|
34
|
+
uninstall: (installation: Pick<InstalledApp, 'workspaceId' | 'productId'>, reason?: string) => Promise<boolean>;
|
|
35
|
+
}
|
|
36
|
+
export declare function useInstallations(options?: {
|
|
37
|
+
filter?: InstallationFilterInput;
|
|
38
|
+
limit?: number;
|
|
39
|
+
offset?: number;
|
|
40
|
+
}): InstallationsState;
|
|
41
|
+
export declare function useInstallation(installationId?: string): {
|
|
42
|
+
installation: InstalledApp | null;
|
|
43
|
+
loading: boolean;
|
|
44
|
+
error: Error | null;
|
|
45
|
+
refetch: () => Promise<void>;
|
|
46
|
+
};
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { OrderStatus } from '../generated/global-types';
|
|
2
|
+
|
|
3
|
+
interface StoreOrder {
|
|
4
|
+
id: string;
|
|
5
|
+
status: string;
|
|
6
|
+
total: number;
|
|
7
|
+
currency: string;
|
|
8
|
+
lineItems: Array<{
|
|
9
|
+
productId: string;
|
|
10
|
+
name: string;
|
|
11
|
+
quantity: number;
|
|
12
|
+
unitPrice: number;
|
|
13
|
+
subtotal: number;
|
|
14
|
+
itemType?: string;
|
|
15
|
+
pricingModel?: string;
|
|
16
|
+
productType?: string;
|
|
17
|
+
productIcon?: string;
|
|
18
|
+
variantId?: string;
|
|
19
|
+
variantName?: string;
|
|
20
|
+
version?: string;
|
|
21
|
+
}>;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
fulfillment?: {
|
|
25
|
+
status?: string | null;
|
|
26
|
+
trackingNumber?: string | null;
|
|
27
|
+
trackingUrl?: string | null;
|
|
28
|
+
carrier?: string | null;
|
|
29
|
+
estimatedDeliveryDate?: string | null;
|
|
30
|
+
} | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Hook for fetching and managing orders with offset-based pagination.
|
|
34
|
+
*/
|
|
35
|
+
export declare function useOrders(options?: {
|
|
36
|
+
limit?: number;
|
|
37
|
+
offset?: number;
|
|
38
|
+
status?: OrderStatus;
|
|
39
|
+
}): {
|
|
40
|
+
orders: StoreOrder[];
|
|
41
|
+
hasMore: boolean;
|
|
42
|
+
loading: boolean;
|
|
43
|
+
error: Error | null;
|
|
44
|
+
refetchOrders: () => Promise<void>;
|
|
45
|
+
loadMore: () => void;
|
|
46
|
+
};
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ProductFilter, ProductSort, SortBy } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Hook for product search and filtering
|
|
5
|
+
*/
|
|
6
|
+
export declare function useProductSearch(): {
|
|
7
|
+
searchQuery: string;
|
|
8
|
+
activeFilters: ProductFilter;
|
|
9
|
+
viewMode: import('..').ViewMode;
|
|
10
|
+
sortBy: SortBy;
|
|
11
|
+
showFiltersPanel: boolean;
|
|
12
|
+
graphqlSort: ProductSort;
|
|
13
|
+
graphqlFilter: ProductFilter;
|
|
14
|
+
hasActiveFilters: boolean;
|
|
15
|
+
setSearchQuery: (query: string) => void;
|
|
16
|
+
updateFilters: (filters: Partial<ProductFilter>) => void;
|
|
17
|
+
clearFilters: () => void;
|
|
18
|
+
resetFilters: () => void;
|
|
19
|
+
setViewMode: (mode: import('..').ViewMode) => void;
|
|
20
|
+
setSortBy: (sort: SortBy) => void;
|
|
21
|
+
toggleFiltersPanel: () => void;
|
|
22
|
+
};
|