@tuturuuu/internal-api 0.4.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calendar.d.ts +224 -2
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +198 -0
- package/dist/finance.d.ts +132 -0
- package/dist/finance.d.ts.map +1 -1
- package/dist/finance.js +92 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +85 -12
- package/dist/infrastructure.d.ts +86 -62
- package/dist/infrastructure.d.ts.map +1 -1
- package/dist/infrastructure.js +73 -8
- package/dist/inventory.d.ts +467 -7
- package/dist/inventory.d.ts.map +1 -1
- package/dist/inventory.js +285 -1
- package/dist/tasks.d.ts +52 -0
- package/dist/tasks.d.ts.map +1 -1
- package/dist/tasks.js +38 -0
- package/dist/tulearn.d.ts +14 -5
- package/dist/tulearn.d.ts.map +1 -1
- package/dist/workspace-config-ids.d.ts +1 -0
- package/dist/workspace-config-ids.d.ts.map +1 -1
- package/dist/workspace-config-ids.js +2 -1
- package/dist/workspace-configs.d.ts +1 -1
- package/dist/workspace-configs.d.ts.map +1 -1
- package/dist/workspace-configs.js +2 -1
- package/package.json +4 -4
package/dist/inventory.d.ts
CHANGED
|
@@ -8,8 +8,14 @@ import type { ProductUnit } from '@tuturuuu/types/primitives/ProductUnit';
|
|
|
8
8
|
import type { ProductWarehouse } from '@tuturuuu/types/primitives/ProductWarehouse';
|
|
9
9
|
import type { TransactionCategory } from '@tuturuuu/types/primitives/TransactionCategory';
|
|
10
10
|
import { type InternalApiClientOptions } from './client';
|
|
11
|
+
import { type WorkspaceStorageUploadProgress, type WorkspaceUploadUrlResponse } from './storage';
|
|
11
12
|
export type InventoryStorefrontStatus = 'draft' | 'published' | 'paused' | 'archived';
|
|
12
13
|
export type InventoryStorefrontVisibility = 'private' | 'public';
|
|
14
|
+
export type InventoryStorefrontThemePreset = 'boutique' | 'catalog' | 'editorial' | 'minimal';
|
|
15
|
+
export type InventoryStorefrontLayoutStyle = 'feature' | 'grid' | 'list';
|
|
16
|
+
export type InventoryStorefrontSurfaceStyle = 'glass' | 'soft' | 'solid';
|
|
17
|
+
export type InventoryStorefrontCornerStyle = 'compact' | 'rounded' | 'soft';
|
|
18
|
+
export type InventoryStorefrontCheckoutMode = 'disabled' | 'polar' | 'simulated';
|
|
13
19
|
export type InventoryListingStatus = 'draft' | 'published' | 'paused' | 'archived';
|
|
14
20
|
export type InventoryBundleStatus = 'draft' | 'active' | 'paused' | 'archived';
|
|
15
21
|
export type InventoryCheckoutStatus = 'reserved' | 'completed' | 'cancelled' | 'expired';
|
|
@@ -24,6 +30,12 @@ export type InventoryStorefront = {
|
|
|
24
30
|
heroImageUrl: string | null;
|
|
25
31
|
accentColor: string | null;
|
|
26
32
|
currency: string;
|
|
33
|
+
checkoutMode: InventoryStorefrontCheckoutMode;
|
|
34
|
+
themePreset: InventoryStorefrontThemePreset;
|
|
35
|
+
layoutStyle: InventoryStorefrontLayoutStyle;
|
|
36
|
+
surfaceStyle: InventoryStorefrontSurfaceStyle;
|
|
37
|
+
cornerStyle: InventoryStorefrontCornerStyle;
|
|
38
|
+
showInventoryBadges: boolean;
|
|
27
39
|
listingsCount?: number;
|
|
28
40
|
createdAt: string | null;
|
|
29
41
|
updatedAt: string | null;
|
|
@@ -143,26 +155,126 @@ export type InventoryPolarSettingsPayload = {
|
|
|
143
155
|
};
|
|
144
156
|
export type InventoryOverviewResponse = {
|
|
145
157
|
category_breakdown?: Array<Record<string, unknown>>;
|
|
158
|
+
dashboard?: InventoryDashboardSnapshot | null;
|
|
146
159
|
low_stock_products?: Array<Record<string, unknown>>;
|
|
147
160
|
owner_breakdown?: Array<Record<string, unknown>>;
|
|
148
161
|
realtime_enabled?: boolean;
|
|
149
162
|
recent_sales?: Array<Record<string, unknown>>;
|
|
150
163
|
totals?: Record<string, number>;
|
|
151
164
|
};
|
|
165
|
+
export type InventoryDashboardCounts = {
|
|
166
|
+
products: number;
|
|
167
|
+
stockRows: number;
|
|
168
|
+
lowStock: number;
|
|
169
|
+
categories: number;
|
|
170
|
+
owners: number;
|
|
171
|
+
manufacturers: number;
|
|
172
|
+
units: number;
|
|
173
|
+
warehouses: number;
|
|
174
|
+
suppliers: number;
|
|
175
|
+
batches: number;
|
|
176
|
+
storefronts: number;
|
|
177
|
+
publishedStorefronts: number;
|
|
178
|
+
listings: number;
|
|
179
|
+
publishedListings: number;
|
|
180
|
+
bundles: number;
|
|
181
|
+
activeBundles: number;
|
|
182
|
+
checkouts: number;
|
|
183
|
+
reservedCheckouts: number;
|
|
184
|
+
staleCheckouts: number;
|
|
185
|
+
sales: number;
|
|
186
|
+
costingProfiles: number;
|
|
187
|
+
polarReady: number;
|
|
188
|
+
simulatedCheckoutStorefronts: number;
|
|
189
|
+
};
|
|
190
|
+
export type InventoryDashboardReadinessItem = {
|
|
191
|
+
key: 'checkout' | 'costing' | 'products' | 'setup' | 'storefront';
|
|
192
|
+
view: 'catalog' | 'commerce' | 'costing' | 'setup' | 'storefront';
|
|
193
|
+
score: number;
|
|
194
|
+
completed: number;
|
|
195
|
+
total: number;
|
|
196
|
+
};
|
|
197
|
+
export type InventoryDashboardRisk = {
|
|
198
|
+
kind: 'low_stock' | 'stale_checkout' | 'storefront_ready';
|
|
199
|
+
severity: 'high' | 'medium' | 'low';
|
|
200
|
+
view: InventoryOperatorDashboardView;
|
|
201
|
+
entityId: string | null;
|
|
202
|
+
label: string;
|
|
203
|
+
detail: string | null;
|
|
204
|
+
metric: number | null;
|
|
205
|
+
};
|
|
206
|
+
export type InventoryDashboardAction = {
|
|
207
|
+
kind: 'create_costing' | 'create_product' | 'publish_storefront' | 'resolve_low_stock' | 'setup_resources';
|
|
208
|
+
view: InventoryOperatorDashboardView;
|
|
209
|
+
priority: number;
|
|
210
|
+
};
|
|
211
|
+
export type InventoryDashboardTrendPoint = {
|
|
212
|
+
date: string;
|
|
213
|
+
revenue: number;
|
|
214
|
+
quantity: number;
|
|
215
|
+
};
|
|
216
|
+
export type InventoryDashboardMixPoint = {
|
|
217
|
+
label: string;
|
|
218
|
+
revenue: number;
|
|
219
|
+
quantity: number;
|
|
220
|
+
};
|
|
221
|
+
export type InventoryDashboardScenarioSummary = {
|
|
222
|
+
profileId: string;
|
|
223
|
+
profileName: string;
|
|
224
|
+
scenarioId: string;
|
|
225
|
+
scenarioName: string;
|
|
226
|
+
grossMarginPercentage: number;
|
|
227
|
+
breakEvenQuantity: number | null;
|
|
228
|
+
};
|
|
229
|
+
export type InventoryDashboardSnapshot = {
|
|
230
|
+
counts: InventoryDashboardCounts;
|
|
231
|
+
readiness: InventoryDashboardReadinessItem[];
|
|
232
|
+
risks: InventoryDashboardRisk[];
|
|
233
|
+
actions: InventoryDashboardAction[];
|
|
234
|
+
analytics: {
|
|
235
|
+
revenueTrend: InventoryDashboardTrendPoint[];
|
|
236
|
+
categoryMix: InventoryDashboardMixPoint[];
|
|
237
|
+
ownerMix: InventoryDashboardMixPoint[];
|
|
238
|
+
};
|
|
239
|
+
costing: {
|
|
240
|
+
profilesCount: number;
|
|
241
|
+
scenariosCount: number;
|
|
242
|
+
averageMarginPercentage: number;
|
|
243
|
+
lowestBreakEvenQuantity: number | null;
|
|
244
|
+
bestScenario: InventoryDashboardScenarioSummary | null;
|
|
245
|
+
weakestScenario: InventoryDashboardScenarioSummary | null;
|
|
246
|
+
};
|
|
247
|
+
storefrontHealth: {
|
|
248
|
+
published: number;
|
|
249
|
+
withoutPublishedListings: number;
|
|
250
|
+
themeGaps: number;
|
|
251
|
+
polarCheckout: number;
|
|
252
|
+
simulatedCheckout: number;
|
|
253
|
+
disabledCheckout: number;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
export type InventoryOperatorDashboardView = 'catalog' | 'commerce' | 'costing' | 'setup' | 'stock' | 'storefront';
|
|
152
257
|
export type InventoryProductSummary = {
|
|
153
258
|
archived?: boolean;
|
|
259
|
+
avatar_url?: string | null;
|
|
154
260
|
category?: string | null;
|
|
261
|
+
category_id?: string | null;
|
|
262
|
+
description?: string | null;
|
|
263
|
+
finance_category_id?: string | null;
|
|
155
264
|
id: string;
|
|
156
265
|
inventory?: Array<Record<string, unknown>>;
|
|
157
266
|
manufacturer_id?: string | null;
|
|
158
267
|
manufacturer?: string | null;
|
|
159
268
|
min_amount?: number | null;
|
|
160
269
|
name: string;
|
|
270
|
+
owner_id?: string | null;
|
|
161
271
|
owner?: {
|
|
272
|
+
id?: string | null;
|
|
162
273
|
name?: string | null;
|
|
163
274
|
} | null;
|
|
164
275
|
stock?: Array<Record<string, unknown>>;
|
|
165
276
|
unit?: string | null;
|
|
277
|
+
usage?: string | null;
|
|
166
278
|
warehouse?: string | null;
|
|
167
279
|
};
|
|
168
280
|
export type InventoryManufacturer = {
|
|
@@ -179,6 +291,61 @@ export type InventoryUnit = {
|
|
|
179
291
|
created_at?: string | null;
|
|
180
292
|
updated_at?: string | null;
|
|
181
293
|
};
|
|
294
|
+
export type InventoryProductInventoryItem = {
|
|
295
|
+
warehouse_id: string;
|
|
296
|
+
unit_id: string;
|
|
297
|
+
amount: number | null;
|
|
298
|
+
min_amount?: number;
|
|
299
|
+
price: number;
|
|
300
|
+
};
|
|
301
|
+
export type InventoryProductPayload = {
|
|
302
|
+
name: string;
|
|
303
|
+
avatar_url?: string | null;
|
|
304
|
+
manufacturer_id?: string | null;
|
|
305
|
+
manufacturer?: string | null;
|
|
306
|
+
description?: string;
|
|
307
|
+
usage?: string;
|
|
308
|
+
category_id: string;
|
|
309
|
+
owner_id?: string;
|
|
310
|
+
finance_category_id?: string | null;
|
|
311
|
+
inventory?: InventoryProductInventoryItem[];
|
|
312
|
+
archived?: boolean;
|
|
313
|
+
};
|
|
314
|
+
export type InventoryMediaUploadTarget = 'bundle-image' | 'listing-image' | 'product-featured-image' | 'storefront-hero';
|
|
315
|
+
export type InventoryMediaUploadUrlResponse = WorkspaceUploadUrlResponse & {
|
|
316
|
+
readUrl: string;
|
|
317
|
+
target: InventoryMediaUploadTarget;
|
|
318
|
+
};
|
|
319
|
+
export type InventoryMediaUploadResult = {
|
|
320
|
+
fullPath: string | null;
|
|
321
|
+
path: string;
|
|
322
|
+
target: InventoryMediaUploadTarget;
|
|
323
|
+
url: string;
|
|
324
|
+
};
|
|
325
|
+
export type InventoryProductInventoryPayload = {
|
|
326
|
+
inventory: InventoryProductInventoryItem[];
|
|
327
|
+
};
|
|
328
|
+
export type InventoryCategoryPayload = {
|
|
329
|
+
name: string;
|
|
330
|
+
};
|
|
331
|
+
export type InventoryWarehousePayload = {
|
|
332
|
+
name: string;
|
|
333
|
+
};
|
|
334
|
+
export type InventorySupplierPayload = {
|
|
335
|
+
name: string;
|
|
336
|
+
};
|
|
337
|
+
export type InventoryOwnerPayload = {
|
|
338
|
+
name: string;
|
|
339
|
+
linked_workspace_user_id?: string | null;
|
|
340
|
+
avatar_url?: string | null;
|
|
341
|
+
archived?: boolean;
|
|
342
|
+
};
|
|
343
|
+
export type InventoryBatchPayload = {
|
|
344
|
+
warehouse_id: string;
|
|
345
|
+
supplier_id?: string | null;
|
|
346
|
+
price?: number;
|
|
347
|
+
total_diff?: number;
|
|
348
|
+
};
|
|
182
349
|
export type InventorySaleSummary = {
|
|
183
350
|
completed_at: string | null;
|
|
184
351
|
created_at: string | null;
|
|
@@ -188,15 +355,69 @@ export type InventorySaleSummary = {
|
|
|
188
355
|
paid_amount: number;
|
|
189
356
|
total_quantity: number;
|
|
190
357
|
};
|
|
358
|
+
export type InventorySaleLine = {
|
|
359
|
+
product_id: string;
|
|
360
|
+
product_name: string;
|
|
361
|
+
owner_id: string | null;
|
|
362
|
+
owner_name: string;
|
|
363
|
+
unit_id: string;
|
|
364
|
+
unit_name: string;
|
|
365
|
+
warehouse_id: string;
|
|
366
|
+
warehouse_name: string;
|
|
367
|
+
quantity: number;
|
|
368
|
+
price: number;
|
|
369
|
+
};
|
|
370
|
+
export type InventorySaleDetail = InventorySaleSummary & {
|
|
371
|
+
notice: string | null;
|
|
372
|
+
note: string | null;
|
|
373
|
+
wallet_id: string | null;
|
|
374
|
+
wallet_name: string | null;
|
|
375
|
+
category_id: string | null;
|
|
376
|
+
category_name: string | null;
|
|
377
|
+
transaction_id: string | null;
|
|
378
|
+
transaction_missing: boolean;
|
|
379
|
+
customer_id: string | null;
|
|
380
|
+
customer_name: string | null;
|
|
381
|
+
creator_name: string | null;
|
|
382
|
+
owners: string[];
|
|
383
|
+
lines: InventorySaleLine[];
|
|
384
|
+
};
|
|
385
|
+
export type InventorySaleUpdatePayload = {
|
|
386
|
+
notice?: string | null;
|
|
387
|
+
note?: string | null;
|
|
388
|
+
wallet_id?: string | null;
|
|
389
|
+
category_id?: string | null;
|
|
390
|
+
products?: Array<{
|
|
391
|
+
product_id: string;
|
|
392
|
+
unit_id: string;
|
|
393
|
+
warehouse_id: string;
|
|
394
|
+
quantity: number;
|
|
395
|
+
price: number;
|
|
396
|
+
}>;
|
|
397
|
+
};
|
|
191
398
|
export type InventoryAuditLogSummary = {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
event_kind: string;
|
|
198
|
-
id: string;
|
|
399
|
+
auditRecordId: string;
|
|
400
|
+
eventKind: string;
|
|
401
|
+
entityKind: string;
|
|
402
|
+
entityId: string | null;
|
|
403
|
+
entityLabel: string | null;
|
|
199
404
|
summary: string;
|
|
405
|
+
changedFields: string[];
|
|
406
|
+
fieldChanges: Array<{
|
|
407
|
+
field: string;
|
|
408
|
+
label: string;
|
|
409
|
+
before: string | null;
|
|
410
|
+
after: string | null;
|
|
411
|
+
}>;
|
|
412
|
+
before: Record<string, unknown>;
|
|
413
|
+
after: Record<string, unknown>;
|
|
414
|
+
actor: {
|
|
415
|
+
authUid: string | null;
|
|
416
|
+
workspaceUserId: string | null;
|
|
417
|
+
displayName: string | null;
|
|
418
|
+
};
|
|
419
|
+
occurredAt: string | null;
|
|
420
|
+
source: string | null;
|
|
200
421
|
};
|
|
201
422
|
export type InventoryStorefrontListQuery = {
|
|
202
423
|
q?: string;
|
|
@@ -231,6 +452,9 @@ export type InventoryNamedListQuery = {
|
|
|
231
452
|
page?: number;
|
|
232
453
|
pageSize?: number;
|
|
233
454
|
};
|
|
455
|
+
export type InventoryCostProfileListQuery = InventoryNamedListQuery & {
|
|
456
|
+
status?: InventoryCostProfileStatus | 'all';
|
|
457
|
+
};
|
|
234
458
|
export type InventoryManufacturerPayload = {
|
|
235
459
|
name: string;
|
|
236
460
|
};
|
|
@@ -250,6 +474,12 @@ export type InventoryStorefrontPayload = {
|
|
|
250
474
|
heroImageUrl?: string | null;
|
|
251
475
|
accentColor?: string | null;
|
|
252
476
|
currency?: string;
|
|
477
|
+
checkoutMode?: InventoryStorefrontCheckoutMode;
|
|
478
|
+
themePreset?: InventoryStorefrontThemePreset;
|
|
479
|
+
layoutStyle?: InventoryStorefrontLayoutStyle;
|
|
480
|
+
surfaceStyle?: InventoryStorefrontSurfaceStyle;
|
|
481
|
+
cornerStyle?: InventoryStorefrontCornerStyle;
|
|
482
|
+
showInventoryBadges?: boolean;
|
|
253
483
|
};
|
|
254
484
|
export type InventoryStorefrontListingPayload = {
|
|
255
485
|
listingType?: 'product' | 'bundle';
|
|
@@ -293,6 +523,123 @@ export type InventoryCheckoutCreatePayload = {
|
|
|
293
523
|
quantity: number;
|
|
294
524
|
}>;
|
|
295
525
|
};
|
|
526
|
+
export type InventoryCostProfileStatus = 'active' | 'archived' | 'draft';
|
|
527
|
+
export type InventoryCostScenarioMetrics = {
|
|
528
|
+
batchCost: number;
|
|
529
|
+
breakEvenQuantity: number | null;
|
|
530
|
+
grossMarginPercentage: number;
|
|
531
|
+
grossProfitPerUnit: number;
|
|
532
|
+
totalCostPerUnit: number;
|
|
533
|
+
};
|
|
534
|
+
export type InventoryCostScenario = {
|
|
535
|
+
id: string;
|
|
536
|
+
profileId: string;
|
|
537
|
+
wsId: string;
|
|
538
|
+
name: string;
|
|
539
|
+
batchSize: number;
|
|
540
|
+
manufacturingCostPerUnit: number;
|
|
541
|
+
artCommissionCost: number;
|
|
542
|
+
shippingCost: number;
|
|
543
|
+
tariffCost: number;
|
|
544
|
+
packagingCostPerUnit: number;
|
|
545
|
+
otherCostPerUnit: number;
|
|
546
|
+
sortOrder: number;
|
|
547
|
+
metrics: InventoryCostScenarioMetrics;
|
|
548
|
+
createdAt: string | null;
|
|
549
|
+
updatedAt: string | null;
|
|
550
|
+
};
|
|
551
|
+
export type InventoryCostProfitShare = {
|
|
552
|
+
id: string;
|
|
553
|
+
profileId: string;
|
|
554
|
+
wsId: string;
|
|
555
|
+
recipientLabel: string;
|
|
556
|
+
sharePercentage: number;
|
|
557
|
+
sortOrder: number;
|
|
558
|
+
createdAt: string | null;
|
|
559
|
+
updatedAt: string | null;
|
|
560
|
+
};
|
|
561
|
+
export type InventoryCostProfile = {
|
|
562
|
+
id: string;
|
|
563
|
+
wsId: string;
|
|
564
|
+
productId: string | null;
|
|
565
|
+
productName?: string | null;
|
|
566
|
+
categoryId: string | null;
|
|
567
|
+
categoryName?: string | null;
|
|
568
|
+
name: string;
|
|
569
|
+
status: InventoryCostProfileStatus;
|
|
570
|
+
currency: string;
|
|
571
|
+
targetRetailPrice: number;
|
|
572
|
+
notes: string | null;
|
|
573
|
+
scenarios: InventoryCostScenario[];
|
|
574
|
+
profitShares: InventoryCostProfitShare[];
|
|
575
|
+
createdAt: string | null;
|
|
576
|
+
updatedAt: string | null;
|
|
577
|
+
};
|
|
578
|
+
export type InventoryCostProfilePayload = {
|
|
579
|
+
productId?: string | null;
|
|
580
|
+
categoryId?: string | null;
|
|
581
|
+
name: string;
|
|
582
|
+
status?: InventoryCostProfileStatus;
|
|
583
|
+
currency?: string;
|
|
584
|
+
targetRetailPrice: number;
|
|
585
|
+
notes?: string | null;
|
|
586
|
+
scenarios?: Array<{
|
|
587
|
+
id?: string;
|
|
588
|
+
name: string;
|
|
589
|
+
batchSize: number;
|
|
590
|
+
manufacturingCostPerUnit?: number;
|
|
591
|
+
artCommissionCost?: number;
|
|
592
|
+
shippingCost?: number;
|
|
593
|
+
tariffCost?: number;
|
|
594
|
+
packagingCostPerUnit?: number;
|
|
595
|
+
otherCostPerUnit?: number;
|
|
596
|
+
sortOrder?: number;
|
|
597
|
+
}>;
|
|
598
|
+
profitShares?: Array<{
|
|
599
|
+
id?: string;
|
|
600
|
+
recipientLabel: string;
|
|
601
|
+
sharePercentage: number;
|
|
602
|
+
sortOrder?: number;
|
|
603
|
+
}>;
|
|
604
|
+
};
|
|
605
|
+
export type InventoryCostImportPreviewRow = {
|
|
606
|
+
itemCategory: string;
|
|
607
|
+
batchSize: number;
|
|
608
|
+
manufacturingCostPerUnit: number;
|
|
609
|
+
totalCostPerUnit: number | null;
|
|
610
|
+
targetRetailPrice: number;
|
|
611
|
+
talentProfitPerSale?: number | null;
|
|
612
|
+
partnerProfitPerSale?: number | null;
|
|
613
|
+
};
|
|
614
|
+
export type InventoryCostImportPreview = {
|
|
615
|
+
rows: InventoryCostImportPreviewRow[];
|
|
616
|
+
warnings: string[];
|
|
617
|
+
};
|
|
618
|
+
export type InventoryCostImportPayload = {
|
|
619
|
+
csv: string;
|
|
620
|
+
commit?: boolean;
|
|
621
|
+
};
|
|
622
|
+
export type InventoryCostingAnalyticsScenario = {
|
|
623
|
+
profileId: string;
|
|
624
|
+
profileName: string;
|
|
625
|
+
scenarioId: string;
|
|
626
|
+
scenarioName: string;
|
|
627
|
+
currency: string;
|
|
628
|
+
batchSize: number;
|
|
629
|
+
targetRetailPrice: number;
|
|
630
|
+
totalCostPerUnit: number;
|
|
631
|
+
grossProfitPerUnit: number;
|
|
632
|
+
grossMarginPercentage: number;
|
|
633
|
+
breakEvenQuantity: number | null;
|
|
634
|
+
batchCost: number;
|
|
635
|
+
};
|
|
636
|
+
export type InventoryCostingAnalytics = {
|
|
637
|
+
profilesCount: number;
|
|
638
|
+
scenariosCount: number;
|
|
639
|
+
averageMarginPercentage: number;
|
|
640
|
+
lowestBreakEvenQuantity: number | null;
|
|
641
|
+
scenarios: InventoryCostingAnalyticsScenario[];
|
|
642
|
+
};
|
|
296
643
|
export type InventoryListResponse<T> = {
|
|
297
644
|
data: T[];
|
|
298
645
|
count: number;
|
|
@@ -324,24 +671,122 @@ export type InventoryCheckoutResponse = {
|
|
|
324
671
|
checkout: InventoryCheckoutSession;
|
|
325
672
|
checkoutUrl: string | null;
|
|
326
673
|
};
|
|
674
|
+
export declare function createInventoryMediaUploadUrl(wsId: string, payload: {
|
|
675
|
+
contentType?: string;
|
|
676
|
+
filename: string;
|
|
677
|
+
size?: number;
|
|
678
|
+
target: InventoryMediaUploadTarget;
|
|
679
|
+
}, options?: InternalApiClientOptions): Promise<InventoryMediaUploadUrlResponse>;
|
|
680
|
+
export declare function uploadInventoryMedia(wsId: string, file: File, target: InventoryMediaUploadTarget, options?: InternalApiClientOptions & {
|
|
681
|
+
onUploadProgress?: (progress: WorkspaceStorageUploadProgress) => void;
|
|
682
|
+
}): Promise<InventoryMediaUploadResult>;
|
|
327
683
|
export declare function listInventoryStorefronts(wsId: string, query?: InventoryStorefrontListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryStorefront>>;
|
|
684
|
+
export declare function getInventoryStorefront(wsId: string, storefrontId: string, options?: InternalApiClientOptions): Promise<{
|
|
685
|
+
data: InventoryStorefront;
|
|
686
|
+
}>;
|
|
687
|
+
export declare function listInventoryCostProfiles(wsId: string, query?: InventoryCostProfileListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryCostProfile>>;
|
|
688
|
+
export declare function getInventoryCostProfile(wsId: string, profileId: string, options?: InternalApiClientOptions): Promise<{
|
|
689
|
+
data: InventoryCostProfile;
|
|
690
|
+
}>;
|
|
691
|
+
export declare function getInventoryCostingAnalytics(wsId: string, options?: InternalApiClientOptions): Promise<InventoryCostingAnalytics>;
|
|
692
|
+
export declare function importInventoryCostingCsv(wsId: string, payload: InventoryCostImportPayload, options?: InternalApiClientOptions): Promise<InventoryCostImportPreview & {
|
|
693
|
+
createdProfiles?: InventoryCostProfile[];
|
|
694
|
+
}>;
|
|
695
|
+
export declare function createInventoryCostProfile(wsId: string, payload: InventoryCostProfilePayload, options?: InternalApiClientOptions): Promise<{
|
|
696
|
+
data: InventoryCostProfile;
|
|
697
|
+
}>;
|
|
698
|
+
export declare function updateInventoryCostProfile(wsId: string, profileId: string, payload: Partial<InventoryCostProfilePayload>, options?: InternalApiClientOptions): Promise<{
|
|
699
|
+
data: InventoryCostProfile;
|
|
700
|
+
}>;
|
|
701
|
+
export declare function deleteInventoryCostProfile(wsId: string, profileId: string, options?: InternalApiClientOptions): Promise<{
|
|
702
|
+
ok: boolean;
|
|
703
|
+
}>;
|
|
328
704
|
export declare function getInventoryStatistics(wsId: string, options?: InternalApiClientOptions): Promise<InventoryStatisticsResponse>;
|
|
329
705
|
export declare function getInventoryOverview(wsId: string, options?: InternalApiClientOptions): Promise<InventoryOverviewResponse>;
|
|
330
706
|
export declare function getInventoryProduct(wsId: string, productId: string, options?: InternalApiClientOptions): Promise<Product>;
|
|
331
707
|
export declare function getInventoryProductFormOptions(wsId: string, options?: InternalApiClientOptions): Promise<InventoryProductFormOptionsResponse>;
|
|
332
708
|
export declare function listInventoryProducts(wsId: string, query?: InventoryCatalogListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryProductSummary>>;
|
|
709
|
+
export declare function createInventoryProduct(wsId: string, payload: InventoryProductPayload, options?: InternalApiClientOptions): Promise<{
|
|
710
|
+
message: string;
|
|
711
|
+
}>;
|
|
712
|
+
export declare function updateInventoryProduct(wsId: string, productId: string, payload: Partial<InventoryProductPayload>, options?: InternalApiClientOptions): Promise<{
|
|
713
|
+
message: string;
|
|
714
|
+
}>;
|
|
715
|
+
export declare function deleteInventoryProduct(wsId: string, productId: string, options?: InternalApiClientOptions): Promise<{
|
|
716
|
+
message: string;
|
|
717
|
+
}>;
|
|
718
|
+
export declare function updateInventoryProductInventory(wsId: string, productId: string, payload: InventoryProductInventoryPayload, options?: InternalApiClientOptions): Promise<{
|
|
719
|
+
message: string;
|
|
720
|
+
}>;
|
|
333
721
|
export declare function listInventoryProductCategories(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductCategory>>;
|
|
722
|
+
export declare function createInventoryProductCategory(wsId: string, payload: InventoryCategoryPayload, options?: InternalApiClientOptions): Promise<{
|
|
723
|
+
message: string;
|
|
724
|
+
}>;
|
|
725
|
+
export declare function updateInventoryProductCategory(wsId: string, categoryId: string, payload: Partial<InventoryCategoryPayload>, options?: InternalApiClientOptions): Promise<{
|
|
726
|
+
message: string;
|
|
727
|
+
}>;
|
|
728
|
+
export declare function deleteInventoryProductCategory(wsId: string, categoryId: string, options?: InternalApiClientOptions): Promise<{
|
|
729
|
+
message: string;
|
|
730
|
+
}>;
|
|
334
731
|
export declare function listInventoryWarehouses(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductWarehouse>>;
|
|
732
|
+
export declare function createInventoryWarehouse(wsId: string, payload: InventoryWarehousePayload, options?: InternalApiClientOptions): Promise<{
|
|
733
|
+
message: string;
|
|
734
|
+
}>;
|
|
735
|
+
export declare function updateInventoryWarehouse(wsId: string, warehouseId: string, payload: Partial<InventoryWarehousePayload>, options?: InternalApiClientOptions): Promise<{
|
|
736
|
+
message: string;
|
|
737
|
+
}>;
|
|
738
|
+
export declare function deleteInventoryWarehouse(wsId: string, warehouseId: string, options?: InternalApiClientOptions): Promise<{
|
|
739
|
+
message: string;
|
|
740
|
+
}>;
|
|
335
741
|
export declare function listInventorySuppliers(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductSupplier>>;
|
|
742
|
+
export declare function createInventorySupplier(wsId: string, payload: InventorySupplierPayload, options?: InternalApiClientOptions): Promise<{
|
|
743
|
+
data: ProductSupplier;
|
|
744
|
+
}>;
|
|
745
|
+
export declare function updateInventorySupplier(wsId: string, supplierId: string, payload: Partial<InventorySupplierPayload>, options?: InternalApiClientOptions): Promise<{
|
|
746
|
+
data: ProductSupplier;
|
|
747
|
+
}>;
|
|
748
|
+
export declare function deleteInventorySupplier(wsId: string, supplierId: string, options?: InternalApiClientOptions): Promise<{
|
|
749
|
+
message: string;
|
|
750
|
+
}>;
|
|
336
751
|
export declare function listInventoryBatches(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductBatch>>;
|
|
752
|
+
export declare function createInventoryBatch(wsId: string, payload: InventoryBatchPayload, options?: InternalApiClientOptions): Promise<{
|
|
753
|
+
data: ProductBatch;
|
|
754
|
+
}>;
|
|
755
|
+
export declare function updateInventoryBatch(wsId: string, batchId: string, payload: Partial<InventoryBatchPayload>, options?: InternalApiClientOptions): Promise<{
|
|
756
|
+
data: ProductBatch;
|
|
757
|
+
}>;
|
|
758
|
+
export declare function deleteInventoryBatch(wsId: string, batchId: string, options?: InternalApiClientOptions): Promise<{
|
|
759
|
+
ok: boolean;
|
|
760
|
+
}>;
|
|
337
761
|
export declare function listInventoryPromotions(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductPromotion>>;
|
|
338
762
|
export declare function listInventoryManufacturers(wsId: string, options?: InternalApiClientOptions): Promise<{
|
|
339
763
|
data: InventoryManufacturer[];
|
|
340
764
|
}>;
|
|
341
765
|
export declare function listInventoryManufacturersPage(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryManufacturer>>;
|
|
766
|
+
export declare function listInventoryOwners(wsId: string, options?: InternalApiClientOptions): Promise<{
|
|
767
|
+
data: InventoryOwner[];
|
|
768
|
+
}>;
|
|
769
|
+
export declare function createInventoryOwner(wsId: string, payload: InventoryOwnerPayload, options?: InternalApiClientOptions): Promise<{
|
|
770
|
+
data: InventoryOwner;
|
|
771
|
+
}>;
|
|
772
|
+
export declare function updateInventoryOwner(wsId: string, ownerId: string, payload: Partial<InventoryOwnerPayload>, options?: InternalApiClientOptions): Promise<{
|
|
773
|
+
data: InventoryOwner;
|
|
774
|
+
}>;
|
|
775
|
+
export declare function deleteInventoryOwner(wsId: string, ownerId: string, options?: InternalApiClientOptions): Promise<{
|
|
776
|
+
message: string;
|
|
777
|
+
}>;
|
|
342
778
|
export declare function listInventoryUnits(wsId: string, options?: InternalApiClientOptions): Promise<InventoryUnit[]>;
|
|
343
779
|
export declare function listInventoryUnitsPage(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductUnit>>;
|
|
344
780
|
export declare function listInventorySales(wsId: string, query?: InventoryOffsetListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventorySaleSummary>>;
|
|
781
|
+
export declare function getInventorySale(wsId: string, saleId: string, options?: InternalApiClientOptions): Promise<{
|
|
782
|
+
data: InventorySaleDetail;
|
|
783
|
+
}>;
|
|
784
|
+
export declare function updateInventorySale(wsId: string, saleId: string, payload: InventorySaleUpdatePayload, options?: InternalApiClientOptions): Promise<{
|
|
785
|
+
data: InventorySaleDetail;
|
|
786
|
+
}>;
|
|
787
|
+
export declare function deleteInventorySale(wsId: string, saleId: string, options?: InternalApiClientOptions): Promise<{
|
|
788
|
+
message: string;
|
|
789
|
+
}>;
|
|
345
790
|
export declare function listInventoryAuditLogs(wsId: string, query?: InventoryOffsetListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryAuditLogSummary>>;
|
|
346
791
|
export declare function createInventoryStorefront(wsId: string, payload: InventoryStorefrontPayload, options?: InternalApiClientOptions): Promise<{
|
|
347
792
|
data: InventoryStorefront;
|
|
@@ -369,12 +814,21 @@ export declare function deleteInventoryUnit(wsId: string, unitId: string, option
|
|
|
369
814
|
export declare function updateInventoryStorefront(wsId: string, storefrontId: string, payload: Partial<InventoryStorefrontPayload>, options?: InternalApiClientOptions): Promise<{
|
|
370
815
|
data: InventoryStorefront;
|
|
371
816
|
}>;
|
|
817
|
+
export declare function deleteInventoryStorefront(wsId: string, storefrontId: string, options?: InternalApiClientOptions): Promise<{
|
|
818
|
+
ok: boolean;
|
|
819
|
+
}>;
|
|
372
820
|
export declare function listInventoryStorefrontListings(wsId: string, storefrontId: string, query?: {
|
|
373
821
|
status?: InventoryListingStatus | 'all';
|
|
374
822
|
}, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryStorefrontListing>>;
|
|
375
823
|
export declare function createInventoryStorefrontListing(wsId: string, storefrontId: string, payload: InventoryStorefrontListingPayload, options?: InternalApiClientOptions): Promise<{
|
|
376
824
|
data: InventoryStorefrontListing;
|
|
377
825
|
}>;
|
|
826
|
+
export declare function updateInventoryStorefrontListing(wsId: string, storefrontId: string, listingId: string, payload: Partial<InventoryStorefrontListingPayload>, options?: InternalApiClientOptions): Promise<{
|
|
827
|
+
data: InventoryStorefrontListing;
|
|
828
|
+
}>;
|
|
829
|
+
export declare function deleteInventoryStorefrontListing(wsId: string, storefrontId: string, listingId: string, options?: InternalApiClientOptions): Promise<{
|
|
830
|
+
ok: boolean;
|
|
831
|
+
}>;
|
|
378
832
|
export declare function listInventoryBundles(wsId: string, query?: InventoryBundleListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryBundle>>;
|
|
379
833
|
export declare function createInventoryBundle(wsId: string, payload: InventoryBundlePayload, options?: InternalApiClientOptions): Promise<{
|
|
380
834
|
data: InventoryBundle;
|
|
@@ -382,7 +836,13 @@ export declare function createInventoryBundle(wsId: string, payload: InventoryBu
|
|
|
382
836
|
export declare function updateInventoryBundle(wsId: string, bundleId: string, payload: Partial<InventoryBundlePayload>, options?: InternalApiClientOptions): Promise<{
|
|
383
837
|
data: InventoryBundle;
|
|
384
838
|
}>;
|
|
839
|
+
export declare function deleteInventoryBundle(wsId: string, bundleId: string, options?: InternalApiClientOptions): Promise<{
|
|
840
|
+
ok: boolean;
|
|
841
|
+
}>;
|
|
385
842
|
export declare function listInventoryCheckouts(wsId: string, query?: InventoryCheckoutListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryCheckoutSession>>;
|
|
843
|
+
export declare function releaseInventoryCheckout(wsId: string, checkoutId: string, options?: InternalApiClientOptions): Promise<{
|
|
844
|
+
data: InventoryCheckoutSession;
|
|
845
|
+
}>;
|
|
386
846
|
export declare function getInventoryPolarSettings(wsId: string, options?: InternalApiClientOptions): Promise<InventoryPolarSettings>;
|
|
387
847
|
export declare function updateInventoryPolarSettings(wsId: string, payload: InventoryPolarSettingsPayload, options?: InternalApiClientOptions): Promise<InventoryPolarSettings>;
|
|
388
848
|
export declare function getInventoryPublicStorefront(slug: string, options?: InternalApiClientOptions): Promise<InventoryPublicStorefrontResponse>;
|