sinfactura-types 1.6.62 → 1.6.63
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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/seeder.d.ts +67 -0
- package/dist/seeder.js +17 -0
- package/dist/store.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/seeder.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
type SeedVertical = 'ferreteria' | 'kiosco' | 'libreria' | 'farmacia';
|
|
3
|
+
type SeedScale = 'demo' | 'full';
|
|
4
|
+
interface SeedProfile {
|
|
5
|
+
vertical: SeedVertical;
|
|
6
|
+
storeName: string;
|
|
7
|
+
brands: string[];
|
|
8
|
+
categories: string[];
|
|
9
|
+
suppliers: string[];
|
|
10
|
+
productHints: string[];
|
|
11
|
+
targetCounts: {
|
|
12
|
+
products: number;
|
|
13
|
+
customers: number;
|
|
14
|
+
orders: number;
|
|
15
|
+
invoices: number;
|
|
16
|
+
};
|
|
17
|
+
locale: string;
|
|
18
|
+
}
|
|
19
|
+
interface SeedJobStartRequest {
|
|
20
|
+
profile: SeedProfile;
|
|
21
|
+
}
|
|
22
|
+
interface SeedAiTenantOpRequest {
|
|
23
|
+
storeId: string;
|
|
24
|
+
vertical: SeedVertical;
|
|
25
|
+
scale: SeedScale;
|
|
26
|
+
overwrite?: boolean;
|
|
27
|
+
}
|
|
28
|
+
interface SeedJobHandle {
|
|
29
|
+
jobId: string;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
status: 'queued' | 'running' | 'done' | 'cancelled' | 'error';
|
|
32
|
+
}
|
|
33
|
+
interface SeederJob {
|
|
34
|
+
storeId: string;
|
|
35
|
+
jobId: string;
|
|
36
|
+
profile: SeedProfile;
|
|
37
|
+
status: SeedJobHandle['status'];
|
|
38
|
+
executionArn?: string;
|
|
39
|
+
phase?: SeedPhase;
|
|
40
|
+
completed?: number;
|
|
41
|
+
total?: number;
|
|
42
|
+
costUsd?: number;
|
|
43
|
+
createdAt: number;
|
|
44
|
+
updatedAt: number;
|
|
45
|
+
ttl: number;
|
|
46
|
+
}
|
|
47
|
+
type SeedPhase = 'extracting' | 'planning' | 'generating' | 'streaming' | 'committing' | 'done' | 'error';
|
|
48
|
+
interface SeedSampleCard {
|
|
49
|
+
kind: 'product' | 'customer' | 'order' | 'invoice' | 'brand' | 'category' | 'supplier';
|
|
50
|
+
id: string;
|
|
51
|
+
title: string;
|
|
52
|
+
subtitle?: string;
|
|
53
|
+
imageUrl?: string;
|
|
54
|
+
priceArs?: number;
|
|
55
|
+
}
|
|
56
|
+
interface SeedProgressEvent {
|
|
57
|
+
jobId: string;
|
|
58
|
+
phase: SeedPhase;
|
|
59
|
+
currentLabel?: string;
|
|
60
|
+
completed: number;
|
|
61
|
+
total: number;
|
|
62
|
+
etaMs?: number;
|
|
63
|
+
sample?: SeedSampleCard;
|
|
64
|
+
error?: string;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export {};
|
package/dist/seeder.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AI Tenant Seeder types (sinfactura/app#1054; sinfactura/api#1073-#1082, #1758, #1759).
|
|
2
|
+
//
|
|
3
|
+
// `SeedProfile` / `SeedJobHandle` / `SeedSampleCard` / `SeedProgressEvent` / `SeedPhase`
|
|
4
|
+
// mirror the ALREADY-SHIPPED FE contract verbatim — `app/src/features/seeder/validation/
|
|
5
|
+
// seederSchema.ts`, `app/src/app/slices/seederProgress.ts`, `app/src/features/seeder/
|
|
6
|
+
// constants.ts`. FE shipped first (scaffold PRs #1940/#1942/#1952/#1943), so these are the
|
|
7
|
+
// frozen ground truth; the original research blueprint's shapes are superseded where they
|
|
8
|
+
// differ. See the 2026-07-14 audit decision recorded on app#1054.
|
|
9
|
+
//
|
|
10
|
+
// Two distinct HTTP entry points share the pipeline (api#1079 start-job lib, imported by
|
|
11
|
+
// both, not Lambda-to-Lambda invoke):
|
|
12
|
+
// - `POST /seeder/run` (api#1758, tenant wizard, adminToken) sends `SeedJobStartRequest`.
|
|
13
|
+
// - `POST /platform/operations` mode `seed-ai-tenant` (api#1079, MANAGER SuperOp,
|
|
14
|
+
// app#1464) sends `SeedAiTenantOpRequest` — coarser params; the handler expands
|
|
15
|
+
// `scale` into `SeedProfile.targetCounts` and constructs the rest of the profile
|
|
16
|
+
// server-side (the SuperOp caller doesn't know the tenant's brands/categories/etc).
|
|
17
|
+
export {};
|
package/dist/store.d.ts
CHANGED