@magemetrics/ai 0.17.0 → 0.19.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.
@@ -76,6 +76,25 @@ export declare const Canvas: React.FC<{
76
76
  canvasId: string;
77
77
  }>;
78
78
 
79
+ declare type CanvasSharingComponentsConfig = {
80
+ canvasSharing?: CanvasSharingConfig;
81
+ getCanvasShareableLink?: never;
82
+ } | {
83
+ canvasSharing?: never;
84
+ /**
85
+ * @deprecated Use `canvasSharing` with `mode: "public"` instead.
86
+ */
87
+ getCanvasShareableLink?: (canvasId: string) => string;
88
+ };
89
+
90
+ declare type CanvasSharingConfig = {
91
+ mode: "public";
92
+ getShareableLink: (canvasId: string) => string;
93
+ } | {
94
+ mode: "group";
95
+ getShareableLink: (canvasId: string) => string;
96
+ };
97
+
79
98
  export declare type CellContentProps = {
80
99
  formattedValue: FormattedData | undefined;
81
100
  unit?: string;
@@ -171,7 +190,7 @@ declare interface ColumnSort {
171
190
  id: string;
172
191
  }
173
192
 
174
- export declare interface Components {
193
+ export declare type Components = {
175
194
  dataTableCells?: {
176
195
  empty?: (props: CellContentProps) => default_2.ReactNode;
177
196
  units?: {
@@ -199,12 +218,11 @@ export declare interface Components {
199
218
  visualization: FrontendVisualization | V1FrontendVisualization;
200
219
  }) => default_2.ReactNode;
201
220
  avatar?: default_2.ReactNode;
202
- getCanvasShareableLink?: (canvasId: string) => string;
203
221
  canvasPanelActions?: (props: {
204
222
  canvas: FrontendCanvas;
205
223
  flowId: string;
206
224
  }) => default_2.ReactNode;
207
- }
225
+ } & CanvasSharingComponentsConfig;
208
226
 
209
227
  export declare const ConfigurableChat: ConfigurableChatComponent;
210
228
 
@@ -379,8 +397,8 @@ declare type FormattedData = {
379
397
  declare type FrontendCanvas = z.infer<typeof FrontendCanvasSchema>;
380
398
 
381
399
  declare const FrontendCanvasSchema: z.ZodObject<{
382
- title: z.ZodNullable<z.ZodString>;
383
400
  id: z.ZodUUID;
401
+ title: z.ZodNullable<z.ZodString>;
384
402
  nodes: z.ZodArray<z.ZodAny>;
385
403
  edges: z.ZodArray<z.ZodAny>;
386
404
  is_public: z.ZodBoolean;
@@ -393,9 +411,9 @@ declare const FrontendRecommendationsSchema: z.ZodObject<{
393
411
  }, z.core.$strip>;
394
412
 
395
413
  declare const FrontendReportSchema: z.ZodObject<{
414
+ id: z.ZodNumber;
396
415
  status: z.ZodNullable<z.ZodString>;
397
416
  title: z.ZodString;
398
- id: z.ZodNumber;
399
417
  uuid: z.ZodString;
400
418
  created_at: z.ZodString;
401
419
  request: z.ZodNullable<z.ZodString>;
@@ -518,12 +536,6 @@ declare type InternalColorSwatchProps = {
518
536
 
519
537
  export declare const logout: () => void;
520
538
 
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
-
527
539
  export { MageMetricsClient }
528
540
 
529
541
  export { MageMetricsClientConfig }
@@ -786,8 +798,8 @@ declare const TableFilterValueSchema: z.ZodObject<{
786
798
  * ```
787
799
  */
788
800
  export declare const useCanvas: (canvasId: string | undefined | null, options?: Omit<UseQueryOptions<FrontendCanvas, unknown>, "queryKey" | "queryFn">) => UseQueryResult<NoInfer<{
789
- title: string | null;
790
801
  id: string;
802
+ title: string | null;
791
803
  nodes: any[];
792
804
  edges: any[];
793
805
  is_public: boolean;
@@ -927,9 +939,9 @@ export declare const useDataReportColumnValue: (reportId: string, filters: Repor
927
939
 
928
940
  export declare const useDataTableContext: () => {
929
941
  report: {
942
+ id: number;
930
943
  status: string | null;
931
944
  title: string;
932
- id: number;
933
945
  uuid: string;
934
946
  created_at: string;
935
947
  request: string | null;
@@ -1071,9 +1083,9 @@ export declare const useMageMetricsClient: () => MageMetricsClient;
1071
1083
  export declare const useMageMetricsReady: () => false | MageMetricsClient;
1072
1084
 
1073
1085
  export declare const useRecentFlows: (limit?: number, metadataFilter?: FlowMetadata_2) => UseQueryResult<NoInfer<{
1086
+ id: string;
1074
1087
  title: string | null;
1075
1088
  metadata: Record<string, string | number | boolean>;
1076
- id: string;
1077
1089
  created_at: string;
1078
1090
  request: string;
1079
1091
  user_id: string | null;