@burdenoff/microfe-store 2026.714.7 → 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/MyLicensesPage.d.ts +3 -0
- package/dist/pages/OrderConfirmationPage.d.ts +3 -0
- package/dist/pages/OrdersPage.d.ts +9 -0
- 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,575 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Navigation item for shell integration
|
|
3
|
+
*/
|
|
4
|
+
export interface NavItem {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
path: string;
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
order?: number;
|
|
10
|
+
group?: string;
|
|
11
|
+
badge?: number;
|
|
12
|
+
children?: NavItem[];
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Footer item for shell integration
|
|
17
|
+
*/
|
|
18
|
+
export interface FooterItem {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
path?: string;
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Current user type
|
|
26
|
+
*/
|
|
27
|
+
export interface User {
|
|
28
|
+
id: string;
|
|
29
|
+
email: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
firstName?: string;
|
|
32
|
+
lastName?: string;
|
|
33
|
+
avatar?: string;
|
|
34
|
+
role?: string;
|
|
35
|
+
roles?: string[];
|
|
36
|
+
workspaceId?: string;
|
|
37
|
+
organizationId?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Props for the StoreRoot component
|
|
41
|
+
*/
|
|
42
|
+
export interface StoreRootProps {
|
|
43
|
+
/**
|
|
44
|
+
* Base path for routing within the store microfrontend
|
|
45
|
+
*/
|
|
46
|
+
basePath?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Navigation function from the shell
|
|
49
|
+
*/
|
|
50
|
+
navigate?: (path: string) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Current authenticated user
|
|
53
|
+
*/
|
|
54
|
+
currentUser?: User;
|
|
55
|
+
/**
|
|
56
|
+
* Alias for currentUser
|
|
57
|
+
*/
|
|
58
|
+
user?: User;
|
|
59
|
+
/**
|
|
60
|
+
* Current workspace ID
|
|
61
|
+
*/
|
|
62
|
+
workspaceId?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Current organization ID
|
|
65
|
+
*/
|
|
66
|
+
organizationId?: string;
|
|
67
|
+
/**
|
|
68
|
+
* API Gateway URL for GraphQL requests
|
|
69
|
+
*/
|
|
70
|
+
apiGatewayUrl?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Authentication token for GraphQL requests
|
|
73
|
+
*/
|
|
74
|
+
authToken?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Optional callback when a product is purchased
|
|
77
|
+
*/
|
|
78
|
+
onProductPurchase?: (product: ProductSummary) => void;
|
|
79
|
+
/**
|
|
80
|
+
* Optional callback when an app is installed
|
|
81
|
+
*/
|
|
82
|
+
onAppInstall?: (installation: InstallationSummary) => void;
|
|
83
|
+
/**
|
|
84
|
+
* Optional callback when a product is submitted (for publishers)
|
|
85
|
+
*/
|
|
86
|
+
onProductSubmit?: (submission: SubmissionSummary) => void;
|
|
87
|
+
/**
|
|
88
|
+
* Optional function to register navigation items with the shell
|
|
89
|
+
* Injected by the shell app
|
|
90
|
+
*/
|
|
91
|
+
registerNavItems?: (items: NavItem | NavItem[]) => () => void;
|
|
92
|
+
/**
|
|
93
|
+
* Optional function to register footer items with the shell
|
|
94
|
+
* Injected by the shell app
|
|
95
|
+
*/
|
|
96
|
+
registerFooterItems?: (items: FooterItem | FooterItem[]) => () => void;
|
|
97
|
+
/**
|
|
98
|
+
* Optional initial cart items
|
|
99
|
+
*/
|
|
100
|
+
initialCartItems?: CartItem[];
|
|
101
|
+
/**
|
|
102
|
+
* Optional feature flags
|
|
103
|
+
*/
|
|
104
|
+
features?: {
|
|
105
|
+
enablePhysicalProducts?: boolean;
|
|
106
|
+
enablePublisherPortal?: boolean;
|
|
107
|
+
enableReviews?: boolean;
|
|
108
|
+
enableSubscriptions?: boolean;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Host product identifier (e.g., "bigconsole", "workspaces", "fluidgrids").
|
|
112
|
+
* Used to scope the store experience to the host product.
|
|
113
|
+
*/
|
|
114
|
+
productId?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Product name for display purposes (e.g., "BigConsole", "Burdenoff Workspaces").
|
|
117
|
+
*/
|
|
118
|
+
productName?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Default compatibleWith filter applied to all store queries.
|
|
121
|
+
* When set, only products compatible with this value are shown.
|
|
122
|
+
* Example: "bigconsole" to show only BigConsole-compatible items.
|
|
123
|
+
*/
|
|
124
|
+
defaultCompatibleWith?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Current tenant ID
|
|
127
|
+
*/
|
|
128
|
+
tenantId?: string;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Props for the StoreAdminRoot component (admin shell only).
|
|
132
|
+
*
|
|
133
|
+
* Subset of StoreRootProps — omits user-flow concerns like cart,
|
|
134
|
+
* purchase callbacks, and feature flags.
|
|
135
|
+
*/
|
|
136
|
+
export interface StoreAdminRootProps {
|
|
137
|
+
basePath?: string;
|
|
138
|
+
navigate?: (path: string) => void;
|
|
139
|
+
currentUser?: User;
|
|
140
|
+
user?: User;
|
|
141
|
+
workspaceId?: string;
|
|
142
|
+
organizationId?: string;
|
|
143
|
+
apiGatewayUrl?: string;
|
|
144
|
+
authToken?: string;
|
|
145
|
+
registerNavItems?: (items: NavItem | NavItem[]) => () => void;
|
|
146
|
+
registerFooterItems?: (items: FooterItem | FooterItem[]) => () => void;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Product item types
|
|
150
|
+
*/
|
|
151
|
+
export type ItemType = 'APP' | 'WORKFLOW' | 'TEMPLATE' | 'INTEGRATION' | 'EXTENSION' | 'THEME' | 'PHYSICAL' | 'BUNDLE';
|
|
152
|
+
/**
|
|
153
|
+
* Product types for apps
|
|
154
|
+
*/
|
|
155
|
+
export type ProductType = 'WORKSPACE_MODULE' | 'TENANT_MODULE' | 'STANDALONE_APP' | 'BROWSER_EXTENSION' | 'CODE_EXTENSION' | 'CLI_TOOL' | 'API_INTEGRATION' | 'WORKFLOW_TEMPLATE' | 'UI_THEME' | 'PHYSICAL_GOODS';
|
|
156
|
+
/**
|
|
157
|
+
* Pricing models
|
|
158
|
+
*/
|
|
159
|
+
export type PricingModel = 'FREE' | 'ONE_TIME' | 'SUBSCRIPTION' | 'USAGE_BASED' | 'FREEMIUM' | 'PAY_WHAT_YOU_WANT';
|
|
160
|
+
/**
|
|
161
|
+
* Product status
|
|
162
|
+
*/
|
|
163
|
+
export type ProductStatus = 'DRAFT' | 'PENDING_REVIEW' | 'APPROVED' | 'PUBLISHED' | 'REJECTED' | 'DEPRECATED' | 'UNLISTED';
|
|
164
|
+
/**
|
|
165
|
+
* Subscription status
|
|
166
|
+
*/
|
|
167
|
+
export type SubscriptionStatus = 'ACTIVE' | 'PAST_DUE' | 'CANCELED' | 'UNPAID' | 'TRIALING';
|
|
168
|
+
/**
|
|
169
|
+
* Installation status
|
|
170
|
+
*/
|
|
171
|
+
export type InstallationStatus = 'PENDING' | 'INSTALLING' | 'CONFIGURING' | 'ACTIVE' | 'INACTIVE' | 'FAILED' | 'UNINSTALLING';
|
|
172
|
+
/**
|
|
173
|
+
* License types
|
|
174
|
+
*/
|
|
175
|
+
export type LicenseType = 'PERPETUAL' | 'SUBSCRIPTION' | 'TRIAL' | 'SITE' | 'FLOATING' | 'CONCURRENT';
|
|
176
|
+
/**
|
|
177
|
+
* License status
|
|
178
|
+
*/
|
|
179
|
+
export type LicenseStatus = 'ACTIVE' | 'EXPIRED' | 'REVOKED' | 'SUSPENDED' | 'PENDING_ACTIVATION';
|
|
180
|
+
/**
|
|
181
|
+
* Order status
|
|
182
|
+
*/
|
|
183
|
+
export type OrderStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'REFUNDED' | 'PARTIALLY_REFUNDED';
|
|
184
|
+
/**
|
|
185
|
+
* Shipment status
|
|
186
|
+
*/
|
|
187
|
+
export type ShipmentStatus = 'PENDING' | 'PROCESSING' | 'SHIPPED' | 'IN_TRANSIT' | 'DELIVERED' | 'FAILED' | 'RETURNED';
|
|
188
|
+
/**
|
|
189
|
+
* Review status
|
|
190
|
+
*/
|
|
191
|
+
export type ReviewStatus = 'PENDING' | 'APPROVED' | 'REJECTED' | 'FLAGGED';
|
|
192
|
+
/**
|
|
193
|
+
* Submission status
|
|
194
|
+
*/
|
|
195
|
+
export type SubmissionStatus = 'DRAFT' | 'PENDING' | 'UNDER_REVIEW' | 'APPROVED' | 'REJECTED' | 'CHANGES_REQUESTED';
|
|
196
|
+
/**
|
|
197
|
+
* Payment gateway types
|
|
198
|
+
*/
|
|
199
|
+
export type PaymentGateway = 'STRIPE' | 'RAZORPAY' | 'PAYPAL' | 'UPI';
|
|
200
|
+
/**
|
|
201
|
+
* View modes
|
|
202
|
+
*/
|
|
203
|
+
export type ViewMode = 'grid' | 'list';
|
|
204
|
+
/**
|
|
205
|
+
* Sort options
|
|
206
|
+
*/
|
|
207
|
+
export type SortBy = 'relevance' | 'rating' | 'price-asc' | 'price-desc' | 'downloads' | 'newest' | 'popular';
|
|
208
|
+
/**
|
|
209
|
+
* Product category
|
|
210
|
+
*/
|
|
211
|
+
export interface Category {
|
|
212
|
+
id: string;
|
|
213
|
+
name: string;
|
|
214
|
+
slug: string;
|
|
215
|
+
description?: string;
|
|
216
|
+
iconUrl?: string;
|
|
217
|
+
parentId?: string;
|
|
218
|
+
order: number;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Publisher
|
|
222
|
+
*/
|
|
223
|
+
export interface Publisher {
|
|
224
|
+
id: string;
|
|
225
|
+
name: string;
|
|
226
|
+
displayName: string;
|
|
227
|
+
website?: string;
|
|
228
|
+
email: string;
|
|
229
|
+
verified: boolean;
|
|
230
|
+
description?: string;
|
|
231
|
+
logoUrl?: string;
|
|
232
|
+
totalProducts: number;
|
|
233
|
+
totalDownloads: number;
|
|
234
|
+
averageRating: number;
|
|
235
|
+
joinedAt: string;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Product variant (version)
|
|
239
|
+
*/
|
|
240
|
+
export interface ProductVariant {
|
|
241
|
+
id: string;
|
|
242
|
+
name: string;
|
|
243
|
+
sku: string;
|
|
244
|
+
version: string;
|
|
245
|
+
changelog?: string;
|
|
246
|
+
releaseNotes?: string;
|
|
247
|
+
downloadUrl?: string;
|
|
248
|
+
fileSize?: number;
|
|
249
|
+
price: number;
|
|
250
|
+
compareAtPrice?: number;
|
|
251
|
+
available: boolean;
|
|
252
|
+
stockQuantity?: number;
|
|
253
|
+
releasedAt: string;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Product
|
|
257
|
+
*/
|
|
258
|
+
export interface Product {
|
|
259
|
+
id: string;
|
|
260
|
+
publisherId: string;
|
|
261
|
+
publisher: Publisher;
|
|
262
|
+
name: string;
|
|
263
|
+
slug: string;
|
|
264
|
+
displayName: string;
|
|
265
|
+
description: string;
|
|
266
|
+
shortDescription: string;
|
|
267
|
+
iconUrl?: string;
|
|
268
|
+
screenshotUrls: string[];
|
|
269
|
+
videoUrls: string[];
|
|
270
|
+
itemType: ItemType;
|
|
271
|
+
type: ProductType;
|
|
272
|
+
manifest?: Record<string, unknown>;
|
|
273
|
+
manifestVersion?: string;
|
|
274
|
+
manifestCapabilities?: string[];
|
|
275
|
+
manifestPermissions?: string[];
|
|
276
|
+
manifestPlatforms?: string[];
|
|
277
|
+
category?: Category;
|
|
278
|
+
tags: string[];
|
|
279
|
+
pricingModel: PricingModel;
|
|
280
|
+
basePrice: number;
|
|
281
|
+
currency: string;
|
|
282
|
+
variants: ProductVariant[];
|
|
283
|
+
status: ProductStatus;
|
|
284
|
+
featured: boolean;
|
|
285
|
+
verified: boolean;
|
|
286
|
+
websiteUrl?: string;
|
|
287
|
+
supportUrl?: string;
|
|
288
|
+
privacyPolicyUrl?: string;
|
|
289
|
+
termsOfServiceUrl?: string;
|
|
290
|
+
downloadCount: number;
|
|
291
|
+
installCount: number;
|
|
292
|
+
orderCount: number;
|
|
293
|
+
averageRating: number;
|
|
294
|
+
reviewCount: number;
|
|
295
|
+
createdAt: string;
|
|
296
|
+
updatedAt: string;
|
|
297
|
+
publishedAt?: string;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Product summary for callbacks
|
|
301
|
+
*/
|
|
302
|
+
export interface ProductSummary {
|
|
303
|
+
id: string;
|
|
304
|
+
name: string;
|
|
305
|
+
price: number;
|
|
306
|
+
itemType: ItemType;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Cart item
|
|
310
|
+
*/
|
|
311
|
+
export interface CartItem {
|
|
312
|
+
id: string;
|
|
313
|
+
productId: string;
|
|
314
|
+
product?: Product;
|
|
315
|
+
variantId?: string;
|
|
316
|
+
variant?: ProductVariant;
|
|
317
|
+
quantity: number;
|
|
318
|
+
unitPrice: number;
|
|
319
|
+
totalPrice: number;
|
|
320
|
+
itemType: 'digital' | 'physical' | 'bundle';
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Shopping cart
|
|
324
|
+
*/
|
|
325
|
+
export interface Cart {
|
|
326
|
+
id: string;
|
|
327
|
+
userId: string;
|
|
328
|
+
items: CartItem[];
|
|
329
|
+
subtotal: number;
|
|
330
|
+
tax: number;
|
|
331
|
+
total: number;
|
|
332
|
+
itemCount: number;
|
|
333
|
+
createdAt: string;
|
|
334
|
+
updatedAt: string;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Address
|
|
338
|
+
*/
|
|
339
|
+
export interface Address {
|
|
340
|
+
line1: string;
|
|
341
|
+
line2?: string;
|
|
342
|
+
city: string;
|
|
343
|
+
state: string;
|
|
344
|
+
postalCode: string;
|
|
345
|
+
country: string;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Shipping method
|
|
349
|
+
*/
|
|
350
|
+
export interface ShippingMethod {
|
|
351
|
+
id: string;
|
|
352
|
+
name: string;
|
|
353
|
+
description?: string;
|
|
354
|
+
price: number;
|
|
355
|
+
estimatedDays: number;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Checkout session
|
|
359
|
+
*/
|
|
360
|
+
export interface Checkout {
|
|
361
|
+
id: string;
|
|
362
|
+
cartId: string;
|
|
363
|
+
cart?: Cart;
|
|
364
|
+
shippingAddress?: Address;
|
|
365
|
+
billingAddress?: Address;
|
|
366
|
+
shippingMethod?: ShippingMethod;
|
|
367
|
+
subtotal: number;
|
|
368
|
+
shippingCost: number;
|
|
369
|
+
tax: number;
|
|
370
|
+
total: number;
|
|
371
|
+
status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Order
|
|
375
|
+
*/
|
|
376
|
+
export interface Order {
|
|
377
|
+
id: string;
|
|
378
|
+
orderNumber: string;
|
|
379
|
+
userId: string;
|
|
380
|
+
cartId: string;
|
|
381
|
+
items: CartItem[];
|
|
382
|
+
subtotal: number;
|
|
383
|
+
shippingCost: number;
|
|
384
|
+
tax: number;
|
|
385
|
+
total: number;
|
|
386
|
+
status: OrderStatus;
|
|
387
|
+
paymentGateway: PaymentGateway;
|
|
388
|
+
paymentId?: string;
|
|
389
|
+
shippingAddress?: Address;
|
|
390
|
+
billingAddress?: Address;
|
|
391
|
+
trackingNumber?: string;
|
|
392
|
+
shipmentStatus?: ShipmentStatus;
|
|
393
|
+
completedAt?: string;
|
|
394
|
+
createdAt: string;
|
|
395
|
+
updatedAt: string;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Installation
|
|
399
|
+
*/
|
|
400
|
+
export interface Installation {
|
|
401
|
+
id: string;
|
|
402
|
+
productId: string;
|
|
403
|
+
product?: Product;
|
|
404
|
+
workspaceId: string;
|
|
405
|
+
userId: string;
|
|
406
|
+
status: InstallationStatus;
|
|
407
|
+
installedVersion: string;
|
|
408
|
+
latestVersion?: string;
|
|
409
|
+
configData?: Record<string, unknown>;
|
|
410
|
+
permissions: string[];
|
|
411
|
+
credentials?: Record<string, string>;
|
|
412
|
+
usageMetrics?: {
|
|
413
|
+
apiCalls: number;
|
|
414
|
+
storage: number;
|
|
415
|
+
users: number;
|
|
416
|
+
};
|
|
417
|
+
lastUsedAt?: string;
|
|
418
|
+
installedAt: string;
|
|
419
|
+
updatedAt: string;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Installation summary for callbacks
|
|
423
|
+
*/
|
|
424
|
+
export interface InstallationSummary {
|
|
425
|
+
id: string;
|
|
426
|
+
productId: string;
|
|
427
|
+
productName: string;
|
|
428
|
+
status: InstallationStatus;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* License
|
|
432
|
+
*/
|
|
433
|
+
export interface License {
|
|
434
|
+
id: string;
|
|
435
|
+
productId: string;
|
|
436
|
+
product?: Product;
|
|
437
|
+
userId: string;
|
|
438
|
+
licenseKey: string;
|
|
439
|
+
type: LicenseType;
|
|
440
|
+
status: LicenseStatus;
|
|
441
|
+
maxActivations: number;
|
|
442
|
+
activeActivations: number;
|
|
443
|
+
expiresAt?: string;
|
|
444
|
+
metadata?: Record<string, unknown>;
|
|
445
|
+
createdAt: string;
|
|
446
|
+
updatedAt: string;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* License activation (device)
|
|
450
|
+
*/
|
|
451
|
+
export interface LicenseActivation {
|
|
452
|
+
id: string;
|
|
453
|
+
licenseId: string;
|
|
454
|
+
deviceId: string;
|
|
455
|
+
deviceName: string;
|
|
456
|
+
platform?: string;
|
|
457
|
+
activatedAt: string;
|
|
458
|
+
lastSeenAt?: string;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Review
|
|
462
|
+
*/
|
|
463
|
+
export interface Review {
|
|
464
|
+
id: string;
|
|
465
|
+
productId: string;
|
|
466
|
+
userId: string;
|
|
467
|
+
userName?: string;
|
|
468
|
+
rating: number;
|
|
469
|
+
comment?: string;
|
|
470
|
+
screenshots?: string[];
|
|
471
|
+
status: ReviewStatus;
|
|
472
|
+
helpful: number;
|
|
473
|
+
notHelpful: number;
|
|
474
|
+
verified: boolean;
|
|
475
|
+
publisherResponse?: string;
|
|
476
|
+
publisherResponseAt?: string;
|
|
477
|
+
createdAt: string;
|
|
478
|
+
updatedAt: string;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Product submission
|
|
482
|
+
*/
|
|
483
|
+
export interface Submission {
|
|
484
|
+
id: string;
|
|
485
|
+
productId: string;
|
|
486
|
+
product?: Product;
|
|
487
|
+
publisherId: string;
|
|
488
|
+
version: string;
|
|
489
|
+
manifest: Record<string, unknown>;
|
|
490
|
+
status: SubmissionStatus;
|
|
491
|
+
reviewerNotes?: string;
|
|
492
|
+
submittedAt: string;
|
|
493
|
+
reviewedAt?: string;
|
|
494
|
+
approvedAt?: string;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Submission summary for callbacks
|
|
498
|
+
*/
|
|
499
|
+
export interface SubmissionSummary {
|
|
500
|
+
id: string;
|
|
501
|
+
productId: string;
|
|
502
|
+
productName: string;
|
|
503
|
+
status: SubmissionStatus;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Revenue metrics
|
|
507
|
+
*/
|
|
508
|
+
export interface RevenueMetrics {
|
|
509
|
+
totalRevenue: number;
|
|
510
|
+
periodRevenue: number;
|
|
511
|
+
totalDownloads: number;
|
|
512
|
+
periodDownloads: number;
|
|
513
|
+
averageRating: number;
|
|
514
|
+
totalReviews: number;
|
|
515
|
+
currency: string;
|
|
516
|
+
period: 'day' | 'week' | 'month' | 'year';
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Product filter input
|
|
520
|
+
*/
|
|
521
|
+
export interface ProductFilter {
|
|
522
|
+
itemType?: ItemType[];
|
|
523
|
+
category?: string;
|
|
524
|
+
priceRange?: {
|
|
525
|
+
min: number;
|
|
526
|
+
max: number;
|
|
527
|
+
};
|
|
528
|
+
rating?: number;
|
|
529
|
+
capabilities?: string[];
|
|
530
|
+
platforms?: string[];
|
|
531
|
+
pricingModel?: PricingModel[];
|
|
532
|
+
verified?: boolean;
|
|
533
|
+
featured?: boolean;
|
|
534
|
+
search?: string;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Product sort input
|
|
538
|
+
*/
|
|
539
|
+
export interface ProductSort {
|
|
540
|
+
field: 'RELEVANCE' | 'RATING' | 'PRICE' | 'DOWNLOADS' | 'CREATED_AT';
|
|
541
|
+
direction: 'ASC' | 'DESC';
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Pagination info
|
|
545
|
+
*/
|
|
546
|
+
export interface PageInfo {
|
|
547
|
+
hasNextPage: boolean;
|
|
548
|
+
hasPreviousPage?: boolean;
|
|
549
|
+
totalCount: number;
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Paginated products
|
|
553
|
+
*/
|
|
554
|
+
export interface ProductConnection {
|
|
555
|
+
edges: Array<{
|
|
556
|
+
node: Product;
|
|
557
|
+
cursor?: string;
|
|
558
|
+
}>;
|
|
559
|
+
pageInfo: PageInfo;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* GraphQL error
|
|
563
|
+
*/
|
|
564
|
+
export interface GraphQLError {
|
|
565
|
+
field?: string;
|
|
566
|
+
message: string;
|
|
567
|
+
code?: string;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Mutation result
|
|
571
|
+
*/
|
|
572
|
+
export interface MutationResult<T> {
|
|
573
|
+
data?: T;
|
|
574
|
+
errors?: GraphQLError[];
|
|
575
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format price with currency
|
|
3
|
+
*/
|
|
4
|
+
export declare function formatPrice(price: number, currency?: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Format price honoring a pricing model. Returns "Free" for FREE model.
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatPriceForModel(price: number, currency: string, model: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Format number with abbreviation (1.2K, 3.4M, etc.)
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatNumber(num: number): string;
|
|
13
|
+
/**
|
|
14
|
+
* Calculate cart totals
|
|
15
|
+
*/
|
|
16
|
+
export declare function calculateCartTotals(items: Array<{
|
|
17
|
+
quantity: number;
|
|
18
|
+
unitPrice: number;
|
|
19
|
+
}>, taxRate?: number): {
|
|
20
|
+
subtotal: number;
|
|
21
|
+
tax: number;
|
|
22
|
+
total: number;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Generate rating stars array
|
|
26
|
+
*/
|
|
27
|
+
export declare function getRatingStars(rating: number): Array<'full' | 'half' | 'empty'>;
|
|
28
|
+
/**
|
|
29
|
+
* Get item type display name
|
|
30
|
+
*/
|
|
31
|
+
export declare function getItemTypeName(itemType: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get pricing model display name
|
|
34
|
+
*/
|
|
35
|
+
export declare function getPricingModelName(model: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Get status color variant
|
|
38
|
+
*/
|
|
39
|
+
export declare function getStatusColor(status: string): 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
40
|
+
/**
|
|
41
|
+
* Validate license key format
|
|
42
|
+
*/
|
|
43
|
+
export declare function validateLicenseKey(key: string): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Mask license key for display
|
|
46
|
+
*/
|
|
47
|
+
export declare function maskLicenseKey(key: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Calculate days until expiry
|
|
50
|
+
*/
|
|
51
|
+
export declare function getDaysUntilExpiry(expiryDate: string): number;
|
|
52
|
+
/**
|
|
53
|
+
* Check if license is expiring soon (within 30 days)
|
|
54
|
+
*/
|
|
55
|
+
export declare function isLicenseExpiringSoon(expiryDate: string): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Format file size
|
|
58
|
+
*/
|
|
59
|
+
export declare function formatFileSize(bytes: number): string;
|
|
60
|
+
/**
|
|
61
|
+
* Generate unique cart item ID
|
|
62
|
+
*/
|
|
63
|
+
export declare function generateCartItemId(productId: string, variantId?: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* Debounce function
|
|
66
|
+
*/
|
|
67
|
+
export declare function debounce<T extends (...args: unknown[]) => unknown>(func: T, wait: number): (...args: Parameters<T>) => void;
|
|
68
|
+
/**
|
|
69
|
+
* Truncate text with ellipsis
|
|
70
|
+
*/
|
|
71
|
+
export declare function truncate(text: string, maxLength: number): string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { getPlatform, isNative, isIOS, isAndroid, isWeb, nativeImpact, nativeNotify, nativeToast, nativeConfirm, nativeCopyText, nativeShare, nativeOpenUrl, useNativePlatform, useSafeArea, useNativeKeyboard, useAppState, useDeviceInfo, useHaptics, useStatusBar, } from '@burdenoff/fe-libs/shared/native';
|
|
2
|
+
export type { BurdenoffNativePlatform, BurdenoffNativeBridge, SafeAreaInsets, DeviceInfo, HapticImpactStyle, HapticNotificationType, ToastDuration, ConfirmOptions, ShareOptions, AppState, StatusBarTheme, } from '@burdenoff/fe-libs/shared/native';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-store",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.715.1",
|
|
4
4
|
"description": "Store microfrontend for Burdenoff products",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
23
|
"scripts": {
|
|
24
24
|
"dev": "vite",
|
|
25
|
-
"build": "tsc && vite build",
|
|
25
|
+
"build": "tsc && MFE_DTS=1 vite build",
|
|
26
26
|
"lint": "eslint .",
|
|
27
27
|
"lint:sanity": "if [ \"${CI:-}\" = \"true\" ]; then bun run lint; else bun run lint -- --cache --cache-location .eslintcache; fi",
|
|
28
28
|
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|