@magemetrics/ai 0.11.6 → 0.12.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.
@@ -293,9 +293,15 @@ export declare interface FileAttachment {
293
293
  filename: string;
294
294
  /** File size in bytes */
295
295
  size: number;
296
- /** The FileUIPart ready to be sent via sendMessage */
296
+ /** File media type */
297
+ mediaType: string;
298
+ /** The lightweight FileUIPart reference ready to be sent via sendMessage */
297
299
  filePart: FileUIPart;
298
- /** Validation error, if any */
300
+ /** Upload lifecycle state */
301
+ status: "uploading" | "uploaded" | "error";
302
+ /** Uploaded file identifier once the backend accepts the file */
303
+ uploadedFileId?: string;
304
+ /** Validation or upload error, if any */
299
305
  error?: string;
300
306
  }
301
307
 
@@ -304,30 +310,27 @@ export declare interface FileUploadConfig {
304
310
  maxFileSize?: number;
305
311
  /** Maximum combined file size in bytes. Default: 20 * 1024 * 1024 (20 MB) */
306
312
  maxCombinedSize?: number;
313
+ /**
314
+ * The flow ID of the current conversation. Passed to the upload endpoint
315
+ * so the server can enforce the per-conversation file budget. Absent for
316
+ * the first message (flow not yet created).
317
+ */
318
+ flowId?: string;
307
319
  }
308
320
 
309
321
  export declare interface FileUploadController {
310
- /** Currently attached files (valid and invalid) */
311
322
  attachments: FileAttachment[];
312
- /** Whether all attachments are valid and ready to send */
313
323
  isReady: boolean;
314
- /** Whether any file is currently being read (FileReader in progress) */
315
324
  isProcessing: boolean;
316
- /** Total size of all valid attachments in bytes */
317
325
  totalSize: number;
318
- /** Combined size limit error, if total exceeds maxCombinedSize */
319
326
  combinedSizeError?: string;
320
- /** Add files from a FileList (e.g., from an input[type=file]) */
321
327
  addFiles: (files: FileList) => void;
322
- /** Remove a specific attachment by ID */
323
328
  removeFile: (id: string) => void;
324
- /** Clear all attachments */
325
- clearFiles: () => void;
326
- /** Get all valid FileUIParts for sendMessage */
329
+ deleteFiles: () => void;
330
+ resetFiles: () => void;
327
331
  getFileParts: () => FileUIPart[];
328
- /** Open the native file picker (programmatic trigger) */
332
+ getUploadedFileIds: () => string[];
329
333
  openFilePicker: () => void;
330
- /** Ref to attach to a hidden file input element */
331
334
  fileInputRef: React.RefObject<HTMLInputElement | null>;
332
335
  }
333
336
 
@@ -378,6 +381,7 @@ declare const FrontendReportSchema: z.ZodObject<{
378
381
  status: z.ZodNullable<z.ZodString>;
379
382
  title: z.ZodString;
380
383
  id: z.ZodNumber;
384
+ uuid: z.ZodString;
381
385
  request: z.ZodNullable<z.ZodString>;
382
386
  created_at: z.ZodString;
383
387
  data_summary: z.ZodObject<{
@@ -415,6 +419,7 @@ declare type FrontendVisualization = z.output<typeof FrontendVisualizationSchema
415
419
 
416
420
  declare const FrontendVisualizationSchema: z.ZodObject<{
417
421
  id: z.ZodNumber;
422
+ uuid: z.ZodString;
418
423
  configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
419
424
  config_version: z.ZodLiteral<2>;
420
425
  xAxisLabel: z.ZodString;
@@ -467,6 +472,7 @@ declare const FrontendVisualizationSchema: z.ZodObject<{
467
472
  }>>;
468
473
  }, z.core.$strip>>;
469
474
  flow_data_id: z.ZodNumber;
475
+ report_uuid: z.ZodString;
470
476
  }, z.core.$strip>;
471
477
 
472
478
  declare const InputContainer: default_2.FC<{
@@ -888,6 +894,7 @@ export declare const useDataTableContext: () => {
888
894
  status: string | null;
889
895
  title: string;
890
896
  id: number;
897
+ uuid: string;
891
898
  request: string | null;
892
899
  created_at: string;
893
900
  data_summary: {
@@ -1031,6 +1038,9 @@ request: string;
1031
1038
  created_at: string;
1032
1039
  user_id: string | null;
1033
1040
  application_id?: number | null | undefined;
1041
+ context_tokens?: number | undefined;
1042
+ acc_input_tokens?: number | undefined;
1043
+ acc_output_tokens?: number | undefined;
1034
1044
  }[], Error>;
1035
1045
 
1036
1046
  export declare const useRecommendations: (count: number) => UseQueryResult< {
@@ -1044,6 +1054,7 @@ export declare const useReport: (reportId: number) => {
1044
1054
  created_at: string;
1045
1055
  flow_id: string;
1046
1056
  id: number;
1057
+ uuid: string;
1047
1058
  title: string;
1048
1059
  request: string | null;
1049
1060
  data_summary: {
@@ -1084,6 +1095,7 @@ export declare const useReport: (reportId: number) => {
1084
1095
  created_at: string;
1085
1096
  flow_id: string;
1086
1097
  id: number;
1098
+ uuid: string;
1087
1099
  title: string;
1088
1100
  request: string | null;
1089
1101
  data_summary: {
@@ -1126,6 +1138,7 @@ declare type V1FrontendVisualization = z.output<typeof V1FrontendVisualizationSc
1126
1138
 
1127
1139
  declare const V1FrontendVisualizationSchema: z.ZodObject<{
1128
1140
  id: z.ZodNumber;
1141
+ uuid: z.ZodString;
1129
1142
  configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
1130
1143
  xAxisLabel: z.ZodString;
1131
1144
  yAxisLabel: z.ZodString;
@@ -1171,6 +1184,7 @@ declare const V1FrontendVisualizationSchema: z.ZodObject<{
1171
1184
  }>>;
1172
1185
  }, z.core.$strip>>;
1173
1186
  flow_data_id: z.ZodNumber;
1187
+ report_uuid: z.ZodString;
1174
1188
  }, z.core.$strip>;
1175
1189
 
1176
1190
  export declare const Visualization: ForwardRefExoticComponent< {