@tuturuuu/internal-api 0.18.0 → 0.20.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/education.d.ts +0 -218
- package/dist/education.d.ts.map +1 -1
- package/dist/education.js +0 -137
- package/dist/external-projects.d.ts +136 -1
- package/dist/external-projects.d.ts.map +1 -1
- package/dist/external-projects.js +83 -0
- package/dist/finance.d.ts +1 -0
- package/dist/finance.d.ts.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +47 -43
- package/dist/infrastructure/index.d.ts +1 -0
- package/dist/infrastructure/index.d.ts.map +1 -1
- package/dist/infrastructure/index.js +1 -0
- package/dist/infrastructure/internal-accounts.d.ts +52 -0
- package/dist/infrastructure/internal-accounts.d.ts.map +1 -0
- package/dist/infrastructure/internal-accounts.js +31 -0
- package/dist/infrastructure/types.d.ts +1 -1
- package/dist/infrastructure/types.d.ts.map +1 -1
- package/dist/infrastructure.d.ts +1 -0
- package/dist/infrastructure.d.ts.map +1 -1
- package/dist/infrastructure.js +1 -0
- package/dist/inventory.d.ts +270 -3
- package/dist/inventory.d.ts.map +1 -1
- package/dist/inventory.js +77 -0
- package/dist/posts.d.ts +29 -0
- package/dist/posts.d.ts.map +1 -1
- package/dist/posts.js +39 -0
- package/dist/promotions.d.ts +6 -0
- package/dist/promotions.d.ts.map +1 -1
- package/dist/promotions.js +21 -0
- package/dist/storage.d.ts +11 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +25 -1
- package/dist/user-groups.d.ts +21 -0
- package/dist/user-groups.d.ts.map +1 -1
- package/dist/user-groups.js +37 -1
- package/dist/users.d.ts +24 -0
- package/dist/users.d.ts.map +1 -1
- package/dist/users.js +20 -0
- package/dist/workspace-configs.js +1 -1
- package/dist/workspace-invite-links.d.ts +15 -0
- package/dist/workspace-invite-links.d.ts.map +1 -0
- package/dist/workspace-invite-links.js +60 -0
- package/dist/workspaces.d.ts +24 -0
- package/dist/workspaces.d.ts.map +1 -1
- package/dist/workspaces.js +50 -0
- package/package.json +3 -13
- package/dist/task-progress-types.d.ts +0 -216
- package/dist/task-progress-types.d.ts.map +0 -1
- package/dist/task-progress-types.js +0 -2
- package/dist/task-progress.d.ts +0 -44
- package/dist/task-progress.d.ts.map +0 -1
- package/dist/task-progress.js +0 -105
package/dist/inventory.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export type InventoryStorefrontThemePreset = 'boutique' | 'catalog' | 'editorial
|
|
|
27
27
|
export type InventoryStorefrontLayoutStyle = 'feature' | 'grid' | 'list';
|
|
28
28
|
export type InventoryStorefrontSurfaceStyle = 'glass' | 'soft' | 'solid';
|
|
29
29
|
export type InventoryStorefrontCornerStyle = 'compact' | 'rounded' | 'soft';
|
|
30
|
-
export type InventoryStorefrontCheckoutMode = 'disabled' | 'polar' | 'square_terminal' | 'simulated';
|
|
30
|
+
export type InventoryStorefrontCheckoutMode = 'disabled' | 'polar' | 'square_pos' | 'square_terminal' | 'simulated';
|
|
31
31
|
export type InventoryStorefrontSectionType = 'cover' | 'featured_banners' | 'featured_listings' | 'product_grid' | 'promo' | 'text';
|
|
32
32
|
export type InventoryStorefrontSectionStatus = 'draft' | 'hidden' | 'published';
|
|
33
33
|
export type InventoryStorefrontAnalyticsEventType = 'add_to_cart' | 'banner_click' | 'checkout_completed' | 'checkout_created' | 'checkout_failed' | 'checkout_started' | 'product_view' | 'remove_from_cart' | 'view';
|
|
@@ -302,6 +302,7 @@ export type InventoryCheckoutSession = {
|
|
|
302
302
|
squareOrderId: string | null;
|
|
303
303
|
squareTerminalCheckoutId: string | null;
|
|
304
304
|
squarePaymentId: string | null;
|
|
305
|
+
squarePosClientTransactionId?: string | null;
|
|
305
306
|
squareReceiptUrl: string | null;
|
|
306
307
|
squareStatus: InventorySquareTerminalCheckoutStatus | null;
|
|
307
308
|
squareFailureReason: string | null;
|
|
@@ -345,7 +346,7 @@ export type InventorySquareEnvironment = 'production' | 'sandbox';
|
|
|
345
346
|
export type InventorySquareAuthMethod = 'manual' | 'oauth';
|
|
346
347
|
export type InventorySquareConnectionStatus = 'error' | 'pending' | 'ready' | 'revoked';
|
|
347
348
|
export type InventorySquareTerminalCheckoutStatus = 'cancel_requested' | 'canceled' | 'cancelled' | 'checkout_created' | 'completed' | 'expired' | 'failed' | 'in_progress' | 'paid' | 'pending';
|
|
348
|
-
export type InventorySquareReadinessIssue = 'app_credentials_missing' | 'connection_missing' | 'device_missing' | 'location_missing' | 'scopes_missing' | 'webhook_signature_missing';
|
|
349
|
+
export type InventorySquareReadinessIssue = 'app_credentials_missing' | 'connection_missing' | 'device_missing' | 'location_missing' | 'production_required' | 'scopes_missing' | 'webhook_signature_missing';
|
|
349
350
|
export type InventorySquareConnection = {
|
|
350
351
|
environment: InventorySquareEnvironment;
|
|
351
352
|
authMethod: InventorySquareAuthMethod;
|
|
@@ -382,6 +383,10 @@ export type InventorySquareSettings = {
|
|
|
382
383
|
ready: boolean;
|
|
383
384
|
issues: InventorySquareReadinessIssue[];
|
|
384
385
|
};
|
|
386
|
+
posReadiness: {
|
|
387
|
+
ready: boolean;
|
|
388
|
+
issues: InventorySquareReadinessIssue[];
|
|
389
|
+
};
|
|
385
390
|
appCredentials: InventorySquareAppCredential[];
|
|
386
391
|
connections: InventorySquareConnection[];
|
|
387
392
|
};
|
|
@@ -434,6 +439,7 @@ export type InventorySquareTerminalCheckoutPayload = {
|
|
|
434
439
|
};
|
|
435
440
|
export type InventorySquareCatalogSyncDirection = 'bidirectional' | 'from_square' | 'to_square';
|
|
436
441
|
export type InventorySquareCatalogSyncSummary = {
|
|
442
|
+
centLevelPricesReady: boolean | null;
|
|
437
443
|
conflicts: number;
|
|
438
444
|
direction: InventorySquareCatalogSyncDirection;
|
|
439
445
|
environment: InventorySquareEnvironment;
|
|
@@ -447,6 +453,21 @@ export type InventorySquareCatalogSyncSummary = {
|
|
|
447
453
|
variationsPulled: number;
|
|
448
454
|
variationsPushed: number;
|
|
449
455
|
};
|
|
456
|
+
export type InventorySquareCatalogLink = {
|
|
457
|
+
lastError: string | null;
|
|
458
|
+
lastSyncedAt: string | null;
|
|
459
|
+
productId: string;
|
|
460
|
+
productName: string;
|
|
461
|
+
squareItemId: string;
|
|
462
|
+
squareItemName: string | null;
|
|
463
|
+
squareSku: string | null;
|
|
464
|
+
squareVariationId: string;
|
|
465
|
+
squareVariationName: string | null;
|
|
466
|
+
status: 'active' | 'conflict' | 'error' | 'remote_deleted';
|
|
467
|
+
syncOrigin: 'square' | 'tuturuuu';
|
|
468
|
+
unitId: string;
|
|
469
|
+
warehouseId: string;
|
|
470
|
+
};
|
|
450
471
|
export type InventorySquareCatalogSyncState = {
|
|
451
472
|
environment: InventorySquareEnvironment;
|
|
452
473
|
lastCatalogCursorAt: string | null;
|
|
@@ -455,6 +476,7 @@ export type InventorySquareCatalogSyncState = {
|
|
|
455
476
|
lastInventorySyncAt: string | null;
|
|
456
477
|
lastStatus: 'error' | 'idle' | 'partial' | 'running' | 'success';
|
|
457
478
|
lastSummary: InventorySquareCatalogSyncSummary | null;
|
|
479
|
+
links: InventorySquareCatalogLink[];
|
|
458
480
|
updatedAt: string | null;
|
|
459
481
|
};
|
|
460
482
|
export type InventoryPolarSyncStatusCounts = {
|
|
@@ -472,9 +494,120 @@ export type InventoryStorefrontAnalytics = {
|
|
|
472
494
|
}>;
|
|
473
495
|
conversionRate: number;
|
|
474
496
|
};
|
|
497
|
+
export type InventoryAnalyticsSummary = {
|
|
498
|
+
revenue: number;
|
|
499
|
+
sales: number;
|
|
500
|
+
units: number;
|
|
501
|
+
averageOrderValue: number;
|
|
502
|
+
estimatedGrossProfit?: number;
|
|
503
|
+
estimatedGrossMarginPercentage?: number;
|
|
504
|
+
sellThroughPercentage?: number;
|
|
505
|
+
inventoryValue?: number;
|
|
506
|
+
finiteStockUnits?: number;
|
|
507
|
+
activeProducts?: number;
|
|
508
|
+
stockedProducts?: number;
|
|
509
|
+
lowStockRows?: number;
|
|
510
|
+
outOfStockRows?: number;
|
|
511
|
+
unlimitedStockRows?: number;
|
|
512
|
+
};
|
|
513
|
+
export type InventoryAnalyticsMetric = {
|
|
514
|
+
label: string;
|
|
515
|
+
revenue: number;
|
|
516
|
+
sales: number;
|
|
517
|
+
units?: number;
|
|
518
|
+
};
|
|
519
|
+
export type InventoryAnalyticsResponse = {
|
|
520
|
+
currency: string;
|
|
521
|
+
generatedAt: string;
|
|
522
|
+
observability?: {
|
|
523
|
+
dataPoints: number;
|
|
524
|
+
queryDurationMs: number;
|
|
525
|
+
};
|
|
526
|
+
range: {
|
|
527
|
+
days: number;
|
|
528
|
+
from: string;
|
|
529
|
+
to: string;
|
|
530
|
+
previousFrom: string;
|
|
531
|
+
previousTo: string;
|
|
532
|
+
};
|
|
533
|
+
summary: InventoryAnalyticsSummary;
|
|
534
|
+
previousSummary: InventoryAnalyticsSummary;
|
|
535
|
+
trend: Array<{
|
|
536
|
+
date: string;
|
|
537
|
+
previousDate: string;
|
|
538
|
+
revenue: number;
|
|
539
|
+
sales: number;
|
|
540
|
+
units: number;
|
|
541
|
+
previousRevenue: number;
|
|
542
|
+
previousSales: number;
|
|
543
|
+
previousUnits: number;
|
|
544
|
+
}>;
|
|
545
|
+
categoryMix: InventoryAnalyticsMetric[];
|
|
546
|
+
ownerMix: InventoryAnalyticsMetric[];
|
|
547
|
+
channels: InventoryAnalyticsMetric[];
|
|
548
|
+
weekdays: Array<{
|
|
549
|
+
day: number;
|
|
550
|
+
revenue: number;
|
|
551
|
+
sales: number;
|
|
552
|
+
}>;
|
|
553
|
+
products: Array<{
|
|
554
|
+
productId: string | null;
|
|
555
|
+
label: string;
|
|
556
|
+
imageUrl: string | null;
|
|
557
|
+
revenue: number;
|
|
558
|
+
units: number;
|
|
559
|
+
sales: number;
|
|
560
|
+
finiteStock: number;
|
|
561
|
+
unlimitedStockRows: number;
|
|
562
|
+
}>;
|
|
563
|
+
warehouses: Array<{
|
|
564
|
+
id: string;
|
|
565
|
+
label: string;
|
|
566
|
+
products: number;
|
|
567
|
+
stockRows: number;
|
|
568
|
+
unlimitedStockRows: number;
|
|
569
|
+
finiteStockUnits: number;
|
|
570
|
+
inventoryValue: number;
|
|
571
|
+
lowStockRows: number;
|
|
572
|
+
outOfStockRows: number;
|
|
573
|
+
}>;
|
|
574
|
+
periods: Array<{
|
|
575
|
+
periodId: string | null;
|
|
576
|
+
label: string;
|
|
577
|
+
revenue: number;
|
|
578
|
+
sales: number;
|
|
579
|
+
}>;
|
|
580
|
+
storefrontFunnel: {
|
|
581
|
+
views: number;
|
|
582
|
+
addToCart: number;
|
|
583
|
+
checkoutStarted: number;
|
|
584
|
+
checkoutCreated: number;
|
|
585
|
+
completed: number;
|
|
586
|
+
conversionRate: number;
|
|
587
|
+
};
|
|
588
|
+
quality: {
|
|
589
|
+
productsWithoutImages: number;
|
|
590
|
+
productsWithoutStock: number;
|
|
591
|
+
productsWithUnlimitedStock: number;
|
|
592
|
+
stockCoveragePercentage: number;
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
export type InventoryStorefrontBulkImportResult = {
|
|
596
|
+
created: number;
|
|
597
|
+
eligible: number;
|
|
598
|
+
skippedExisting: number;
|
|
599
|
+
skippedWithoutStock: number;
|
|
600
|
+
};
|
|
475
601
|
export type InventoryPolarProductSyncSummary = {
|
|
476
602
|
listings: InventoryPolarSyncStatusCounts;
|
|
477
603
|
bundles: InventoryPolarSyncStatusCounts;
|
|
604
|
+
items: Array<{
|
|
605
|
+
kind: 'listing' | 'bundle';
|
|
606
|
+
name: string;
|
|
607
|
+
polarProductId: string | null;
|
|
608
|
+
status: 'synced' | 'pending' | 'error' | 'disabled';
|
|
609
|
+
syncedAt: string | null;
|
|
610
|
+
}>;
|
|
478
611
|
errors: Array<{
|
|
479
612
|
kind: 'listing' | 'bundle';
|
|
480
613
|
name: string;
|
|
@@ -732,6 +865,30 @@ export type InventoryBatchPayload = {
|
|
|
732
865
|
total_diff?: number;
|
|
733
866
|
};
|
|
734
867
|
export type InventorySaleSource = 'checkout_session' | 'finance_invoice';
|
|
868
|
+
export type InventorySalesPeriodStatus = 'active' | 'archived';
|
|
869
|
+
export type InventorySalesPeriodProductScope = 'all' | 'allowlist' | 'blocklist';
|
|
870
|
+
export type InventorySalesPeriod = {
|
|
871
|
+
created_at: string;
|
|
872
|
+
description: string | null;
|
|
873
|
+
ends_at: string | null;
|
|
874
|
+
id: string;
|
|
875
|
+
name: string;
|
|
876
|
+
product_ids: string[];
|
|
877
|
+
product_scope: InventorySalesPeriodProductScope;
|
|
878
|
+
sale_count: number;
|
|
879
|
+
starts_at: string | null;
|
|
880
|
+
status: InventorySalesPeriodStatus;
|
|
881
|
+
updated_at: string;
|
|
882
|
+
ws_id: string;
|
|
883
|
+
};
|
|
884
|
+
export type InventorySalesPeriodPayload = {
|
|
885
|
+
description?: string | null;
|
|
886
|
+
ends_at?: string | null;
|
|
887
|
+
name: string;
|
|
888
|
+
product_ids?: string[];
|
|
889
|
+
product_scope?: InventorySalesPeriodProductScope;
|
|
890
|
+
starts_at?: string | null;
|
|
891
|
+
};
|
|
735
892
|
export type InventorySaleSummary = {
|
|
736
893
|
category_name?: string | null;
|
|
737
894
|
completed_at: string | null;
|
|
@@ -745,6 +902,7 @@ export type InventorySaleSummary = {
|
|
|
745
902
|
notice?: string | null;
|
|
746
903
|
owners?: string[];
|
|
747
904
|
paid_amount: number;
|
|
905
|
+
period?: InventorySalesPeriod | null;
|
|
748
906
|
polar_order_id?: string | null;
|
|
749
907
|
public_token?: string | null;
|
|
750
908
|
square_order_id?: string | null;
|
|
@@ -753,6 +911,7 @@ export type InventorySaleSummary = {
|
|
|
753
911
|
wallet_name?: string | null;
|
|
754
912
|
};
|
|
755
913
|
export type InventorySaleLine = {
|
|
914
|
+
product_image_url?: string | null;
|
|
756
915
|
product_id: string;
|
|
757
916
|
product_name: string;
|
|
758
917
|
owner_id: string | null;
|
|
@@ -816,6 +975,33 @@ export type InventorySaleUpdatePayload = {
|
|
|
816
975
|
price: number;
|
|
817
976
|
}>;
|
|
818
977
|
};
|
|
978
|
+
export type InventorySaleCreatePayload = {
|
|
979
|
+
category_id: string;
|
|
980
|
+
content: string;
|
|
981
|
+
notes?: string;
|
|
982
|
+
period_id?: string | null;
|
|
983
|
+
products: Array<{
|
|
984
|
+
category_id: string;
|
|
985
|
+
price: number;
|
|
986
|
+
product_id: string;
|
|
987
|
+
quantity: number;
|
|
988
|
+
unit_id: string;
|
|
989
|
+
warehouse_id: string;
|
|
990
|
+
}>;
|
|
991
|
+
wallet_id: string;
|
|
992
|
+
};
|
|
993
|
+
export type InventorySaleCreateResponse = {
|
|
994
|
+
data?: {
|
|
995
|
+
category_id?: string | null;
|
|
996
|
+
id?: string;
|
|
997
|
+
products_count?: number;
|
|
998
|
+
subtotal?: number;
|
|
999
|
+
total?: number;
|
|
1000
|
+
};
|
|
1001
|
+
invoice_id: string;
|
|
1002
|
+
message: string;
|
|
1003
|
+
period_assignment_warning?: string;
|
|
1004
|
+
};
|
|
819
1005
|
export type InventoryAuditLogSummary = {
|
|
820
1006
|
auditRecordId: string;
|
|
821
1007
|
eventKind: string;
|
|
@@ -893,6 +1079,10 @@ export type InventoryOffsetListQuery = {
|
|
|
893
1079
|
limit?: number;
|
|
894
1080
|
offset?: number;
|
|
895
1081
|
};
|
|
1082
|
+
export type InventorySalesListQuery = InventoryOffsetListQuery & {
|
|
1083
|
+
period_id?: string;
|
|
1084
|
+
unassigned?: boolean;
|
|
1085
|
+
};
|
|
896
1086
|
export type InventoryOrderHistoryQuery = InventoryOffsetListQuery & {
|
|
897
1087
|
storeSlug?: string;
|
|
898
1088
|
};
|
|
@@ -1164,14 +1354,40 @@ export type InventoryListResponse<T> = {
|
|
|
1164
1354
|
data: T[];
|
|
1165
1355
|
count: number;
|
|
1166
1356
|
};
|
|
1357
|
+
export type InventorySalesListResponse = InventoryListResponse<InventorySaleSummary> & {
|
|
1358
|
+
realtime_enabled?: boolean;
|
|
1359
|
+
workspace_currency: string;
|
|
1360
|
+
};
|
|
1361
|
+
export type InventoryCommerceSummary = {
|
|
1362
|
+
currency: string;
|
|
1363
|
+
estimatedGrossMarginPercentage: number;
|
|
1364
|
+
estimatedGrossProfit: number;
|
|
1365
|
+
excludedCurrencyCount: number;
|
|
1366
|
+
revenue: number;
|
|
1367
|
+
salesCount: number;
|
|
1368
|
+
unitsSold: number;
|
|
1369
|
+
};
|
|
1167
1370
|
export type InventoryProductFormOptionsResponse = {
|
|
1168
1371
|
categories: ProductCategory[];
|
|
1372
|
+
defaultFinanceCategoryId?: string | null;
|
|
1373
|
+
defaultRevenueWalletId?: string | null;
|
|
1374
|
+
defaultSalesPeriodId?: string | null;
|
|
1375
|
+
defaultWalletId?: string | null;
|
|
1169
1376
|
financeCategories: TransactionCategory[];
|
|
1170
1377
|
manufacturers: InventoryManufacturer[];
|
|
1171
1378
|
owners: InventoryOwner[];
|
|
1172
1379
|
units: ProductUnit[];
|
|
1380
|
+
wallets?: Array<{
|
|
1381
|
+
id: string;
|
|
1382
|
+
name: string;
|
|
1383
|
+
}>;
|
|
1173
1384
|
warehouses: ProductWarehouse[];
|
|
1174
1385
|
};
|
|
1386
|
+
export type InventorySalesDefaultsPayload = {
|
|
1387
|
+
defaultFinanceCategoryId: string | null;
|
|
1388
|
+
defaultRevenueWalletId: string | null;
|
|
1389
|
+
defaultSalesPeriodId: string | null;
|
|
1390
|
+
};
|
|
1175
1391
|
export type InventoryStatisticsResponse = {
|
|
1176
1392
|
batches: number;
|
|
1177
1393
|
categories: number;
|
|
@@ -1192,6 +1408,13 @@ export type InventoryCheckoutResponse = {
|
|
|
1192
1408
|
checkoutUrl: string | null;
|
|
1193
1409
|
checkoutMode?: InventoryStorefrontCheckoutMode;
|
|
1194
1410
|
nextUrl?: string | null;
|
|
1411
|
+
squarePos?: InventorySquarePosLaunch;
|
|
1412
|
+
};
|
|
1413
|
+
export type InventorySquarePosLaunch = {
|
|
1414
|
+
androidUrl: string;
|
|
1415
|
+
callbackUrl: string;
|
|
1416
|
+
fallbackUrl: string;
|
|
1417
|
+
iosUrl: string;
|
|
1195
1418
|
};
|
|
1196
1419
|
export type InventoryOrderHistoryItem = {
|
|
1197
1420
|
checkout: InventoryCheckoutSession;
|
|
@@ -1247,6 +1470,9 @@ export declare function getInventoryStatistics(wsId: string, options?: InternalA
|
|
|
1247
1470
|
export declare function getInventoryOverview(wsId: string, options?: InternalApiClientOptions): Promise<InventoryOverviewResponse>;
|
|
1248
1471
|
export declare function getInventoryProduct(wsId: string, productId: string, options?: InternalApiClientOptions): Promise<Product>;
|
|
1249
1472
|
export declare function getInventoryProductFormOptions(wsId: string, options?: InternalApiClientOptions): Promise<InventoryProductFormOptionsResponse>;
|
|
1473
|
+
export declare function updateInventorySalesDefaults(wsId: string, payload: InventorySalesDefaultsPayload, options?: InternalApiClientOptions): Promise<{
|
|
1474
|
+
message: string;
|
|
1475
|
+
}>;
|
|
1250
1476
|
export declare function listInventoryProducts(wsId: string, query?: InventoryCatalogListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryProductSummary>>;
|
|
1251
1477
|
export declare function createInventoryProduct(wsId: string, payload: InventoryProductPayload, options?: InternalApiClientOptions): Promise<{
|
|
1252
1478
|
message: string;
|
|
@@ -1255,6 +1481,7 @@ export declare function updateInventoryProduct(wsId: string, productId: string,
|
|
|
1255
1481
|
message: string;
|
|
1256
1482
|
}>;
|
|
1257
1483
|
export declare function deleteInventoryProduct(wsId: string, productId: string, options?: InternalApiClientOptions): Promise<{
|
|
1484
|
+
disposition: 'archived' | 'deleted';
|
|
1258
1485
|
message: string;
|
|
1259
1486
|
}>;
|
|
1260
1487
|
export declare function updateInventoryProductInventory(wsId: string, productId: string, payload: InventoryProductInventoryPayload, options?: InternalApiClientOptions): Promise<{
|
|
@@ -1344,7 +1571,40 @@ export declare function deleteInventoryOwner(wsId: string, ownerId: string, opti
|
|
|
1344
1571
|
}>;
|
|
1345
1572
|
export declare function listInventoryUnits(wsId: string, options?: InternalApiClientOptions): Promise<InventoryUnit[]>;
|
|
1346
1573
|
export declare function listInventoryUnitsPage(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductUnit>>;
|
|
1347
|
-
export declare function listInventorySales(wsId: string, query?:
|
|
1574
|
+
export declare function listInventorySales(wsId: string, query?: InventorySalesListQuery, options?: InternalApiClientOptions): Promise<InventorySalesListResponse>;
|
|
1575
|
+
export declare function getInventoryCommerceSummary(wsId: string, query?: Pick<InventorySalesListQuery, 'period_id' | 'unassigned'>, options?: InternalApiClientOptions): Promise<InventoryCommerceSummary>;
|
|
1576
|
+
export declare function listInventorySalesPeriods(wsId: string, query?: {
|
|
1577
|
+
include_archived?: boolean;
|
|
1578
|
+
}, options?: InternalApiClientOptions): Promise<{
|
|
1579
|
+
data: InventorySalesPeriod[];
|
|
1580
|
+
}>;
|
|
1581
|
+
export declare function createInventorySalesPeriod(wsId: string, payload: InventorySalesPeriodPayload, options?: InternalApiClientOptions): Promise<{
|
|
1582
|
+
data: InventorySalesPeriod;
|
|
1583
|
+
}>;
|
|
1584
|
+
export declare function updateInventorySalesPeriod(wsId: string, periodId: string, payload: Partial<InventorySalesPeriodPayload & {
|
|
1585
|
+
status: InventorySalesPeriodStatus;
|
|
1586
|
+
}>, options?: InternalApiClientOptions): Promise<{
|
|
1587
|
+
data: InventorySalesPeriod;
|
|
1588
|
+
}>;
|
|
1589
|
+
export declare function deleteInventorySalesPeriod(wsId: string, periodId: string, options?: InternalApiClientOptions): Promise<{
|
|
1590
|
+
ok: true;
|
|
1591
|
+
}>;
|
|
1592
|
+
export declare function setInventorySalePeriod(wsId: string, saleId: string, payload: {
|
|
1593
|
+
period_id: string | null;
|
|
1594
|
+
source: InventorySaleSource;
|
|
1595
|
+
}, options?: InternalApiClientOptions): Promise<{
|
|
1596
|
+
data: InventorySalesPeriod | null;
|
|
1597
|
+
}>;
|
|
1598
|
+
export declare function setInventorySalesPeriodBulk(wsId: string, payload: {
|
|
1599
|
+
period_id: string | null;
|
|
1600
|
+
sales: Array<{
|
|
1601
|
+
id: string;
|
|
1602
|
+
source: InventorySaleSource;
|
|
1603
|
+
}>;
|
|
1604
|
+
}, options?: InternalApiClientOptions): Promise<{
|
|
1605
|
+
data: InventorySalesPeriod | null;
|
|
1606
|
+
updated: number;
|
|
1607
|
+
}>;
|
|
1348
1608
|
export type InventoryProductSalesRow = {
|
|
1349
1609
|
productId: string;
|
|
1350
1610
|
productName: string;
|
|
@@ -1357,6 +1617,7 @@ export declare function listInventorySalesByProduct(wsId: string, options?: Inte
|
|
|
1357
1617
|
export declare function getInventorySale(wsId: string, saleId: string, options?: InternalApiClientOptions): Promise<{
|
|
1358
1618
|
data: InventorySaleDetail;
|
|
1359
1619
|
}>;
|
|
1620
|
+
export declare function createInventorySale(wsId: string, payload: InventorySaleCreatePayload, options?: InternalApiClientOptions): Promise<InventorySaleCreateResponse>;
|
|
1360
1621
|
export declare function updateInventorySale(wsId: string, saleId: string, payload: InventorySaleUpdatePayload, options?: InternalApiClientOptions): Promise<{
|
|
1361
1622
|
data: InventorySaleDetail;
|
|
1362
1623
|
}>;
|
|
@@ -1399,6 +1660,9 @@ export declare function listInventoryStorefrontListings(wsId: string, storefront
|
|
|
1399
1660
|
export declare function createInventoryStorefrontListing(wsId: string, storefrontId: string, payload: InventoryStorefrontListingPayload, options?: InternalApiClientOptions): Promise<{
|
|
1400
1661
|
data: InventoryStorefrontListing;
|
|
1401
1662
|
}>;
|
|
1663
|
+
export declare function bulkImportInventoryStorefrontListings(wsId: string, storefrontId: string, options?: InternalApiClientOptions): Promise<{
|
|
1664
|
+
data: InventoryStorefrontBulkImportResult;
|
|
1665
|
+
}>;
|
|
1402
1666
|
export declare function updateInventoryStorefrontListing(wsId: string, storefrontId: string, listingId: string, payload: Partial<InventoryStorefrontListingPayload>, options?: InternalApiClientOptions): Promise<{
|
|
1403
1667
|
data: InventoryStorefrontListing;
|
|
1404
1668
|
}>;
|
|
@@ -1460,6 +1724,9 @@ export declare function createInventorySquareDeviceCode(wsId: string, payload: {
|
|
|
1460
1724
|
export declare function getInventoryStorefrontAnalytics(wsId: string, query?: {
|
|
1461
1725
|
days?: number;
|
|
1462
1726
|
}, options?: InternalApiClientOptions): Promise<InventoryStorefrontAnalytics>;
|
|
1727
|
+
export declare function getInventoryAnalytics(wsId: string, query?: {
|
|
1728
|
+
days?: number;
|
|
1729
|
+
}, options?: InternalApiClientOptions): Promise<InventoryAnalyticsResponse>;
|
|
1463
1730
|
export declare function getInventoryPolarSyncSummary(wsId: string, options?: InternalApiClientOptions): Promise<InventoryPolarProductSyncSummary>;
|
|
1464
1731
|
export declare function syncInventoryPolarProducts(wsId: string, options?: InternalApiClientOptions): Promise<{
|
|
1465
1732
|
ok: boolean;
|