@magemetrics/ai 0.16.0 → 0.18.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.
@@ -5,9 +5,12 @@ import { default as default_2 } from 'react';
5
5
  import { DirectAuthProvider } from '@magemetrics/core';
6
6
  import { ExternalAuthProvider } from '@magemetrics/core';
7
7
  import { ExternalAuthProviderConfig } from '@magemetrics/core';
8
+ import { FC } from 'react';
8
9
  import { FetchNextPageOptions } from '@tanstack/react-query';
9
10
  import { FileUIPart } from 'ai';
11
+ import { FlowMetadata } from '@magemetrics/core';
10
12
  import { ForwardRefExoticComponent } from 'react';
13
+ import { GetRecentFlowsParams } from '@magemetrics/core';
11
14
  import { InfiniteData } from '@tanstack/react-query';
12
15
  import { InfiniteQueryObserverResult } from '@tanstack/react-query';
13
16
  import { JSX } from 'react';
@@ -340,6 +343,12 @@ export declare interface FileUploadController {
340
343
  fileInputRef: React.RefObject<HTMLInputElement | null>;
341
344
  }
342
345
 
346
+ export { FlowMetadata }
347
+
348
+ declare type FlowMetadata_2 = z.infer<typeof FlowMetadataSchema>;
349
+
350
+ declare const FlowMetadataSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
351
+
343
352
  /**
344
353
  * This module handles the formatting and normalization of table cell values for display and sorting.
345
354
  *
@@ -370,8 +379,8 @@ declare type FormattedData = {
370
379
  declare type FrontendCanvas = z.infer<typeof FrontendCanvasSchema>;
371
380
 
372
381
  declare const FrontendCanvasSchema: z.ZodObject<{
373
- title: z.ZodNullable<z.ZodString>;
374
382
  id: z.ZodUUID;
383
+ title: z.ZodNullable<z.ZodString>;
375
384
  nodes: z.ZodArray<z.ZodAny>;
376
385
  edges: z.ZodArray<z.ZodAny>;
377
386
  is_public: z.ZodBoolean;
@@ -384,9 +393,9 @@ declare const FrontendRecommendationsSchema: z.ZodObject<{
384
393
  }, z.core.$strip>;
385
394
 
386
395
  declare const FrontendReportSchema: z.ZodObject<{
396
+ id: z.ZodNumber;
387
397
  status: z.ZodNullable<z.ZodString>;
388
398
  title: z.ZodString;
389
- id: z.ZodNumber;
390
399
  uuid: z.ZodString;
391
400
  created_at: z.ZodString;
392
401
  request: z.ZodNullable<z.ZodString>;
@@ -490,6 +499,8 @@ declare const FrontendVisualizationSchema: z.ZodObject<{
490
499
  }, z.core.$strip>>;
491
500
  }, z.core.$strip>;
492
501
 
502
+ export { GetRecentFlowsParams }
503
+
493
504
  declare const InputContainer: default_2.FC<{
494
505
  children?: default_2.ReactNode | ((context: ChatInputContextValue) => default_2.ReactNode);
495
506
  }>;
@@ -507,6 +518,12 @@ declare type InternalColorSwatchProps = {
507
518
 
508
519
  export declare const logout: () => void;
509
520
 
521
+ export declare const MageMetricsCanvasViewerProvider: React.FC<MageMetricsCanvasViewerProviderProps>;
522
+
523
+ export declare type MageMetricsCanvasViewerProviderProps = PropsWithChildren<Pick<MageMetricsClientConfig, "apiUrl" | "apiKey" | "externalJwt"> & {
524
+ components?: Components;
525
+ }>;
526
+
510
527
  export { MageMetricsClient }
511
528
 
512
529
  export { MageMetricsClientConfig }
@@ -613,7 +630,9 @@ declare type PrimaryColorShade = (typeof PRIMARY_SHADE_STOPS)[number];
613
630
  /** Complete primary swatch (7 shades required) */
614
631
  export declare type PrimaryColorSwatch = Record<PrimaryColorShade, string>;
615
632
 
616
- export declare const PublicCanvas: React.FC<React.ComponentProps<typeof PublicCanvasPanel>>;
633
+ export declare const PublicCanvas: FC<{
634
+ canvasId: string;
635
+ }>;
617
636
 
618
637
  declare const PublicCanvasPanel: default_2.FC<{
619
638
  canvasId: string;
@@ -664,6 +683,8 @@ declare type SecondaryColorShade = (typeof SECONDARY_SHADE_STOPS)[number];
664
683
  /** Complete secondary swatch (3 shades required) */
665
684
  export declare type SecondaryColorSwatch = Record<SecondaryColorShade, string>;
666
685
 
686
+ export declare const SharedCanvas: React.FC<React.ComponentProps<typeof PublicCanvasPanel>>;
687
+
667
688
  declare type SortingState = ColumnSort[];
668
689
 
669
690
  export declare const StandaloneConversationModal: default_2.FC<StandaloneConversationModalProps>;
@@ -765,8 +786,8 @@ declare const TableFilterValueSchema: z.ZodObject<{
765
786
  * ```
766
787
  */
767
788
  export declare const useCanvas: (canvasId: string | undefined | null, options?: Omit<UseQueryOptions<FrontendCanvas, unknown>, "queryKey" | "queryFn">) => UseQueryResult<NoInfer<{
768
- title: string | null;
769
789
  id: string;
790
+ title: string | null;
770
791
  nodes: any[];
771
792
  edges: any[];
772
793
  is_public: boolean;
@@ -906,9 +927,9 @@ export declare const useDataReportColumnValue: (reportId: string, filters: Repor
906
927
 
907
928
  export declare const useDataTableContext: () => {
908
929
  report: {
930
+ id: number;
909
931
  status: string | null;
910
932
  title: string;
911
- id: number;
912
933
  uuid: string;
913
934
  created_at: string;
914
935
  request: string | null;
@@ -1049,9 +1070,10 @@ export declare const useMageMetricsClient: () => MageMetricsClient;
1049
1070
 
1050
1071
  export declare const useMageMetricsReady: () => false | MageMetricsClient;
1051
1072
 
1052
- export declare const useRecentFlows: (limit?: number) => UseQueryResult<NoInfer<{
1053
- title: string | null;
1073
+ export declare const useRecentFlows: (limit?: number, metadataFilter?: FlowMetadata_2) => UseQueryResult<NoInfer<{
1054
1074
  id: string;
1075
+ title: string | null;
1076
+ metadata: Record<string, string | number | boolean>;
1055
1077
  created_at: string;
1056
1078
  request: string;
1057
1079
  user_id: string | null;