@magemetrics/ai 0.0.45 → 0.0.47
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/fonts.css +1 -0
- package/dist/fonts.js +1 -0
- package/dist/react/ai.js +9633 -9764
- package/dist/react/index.d.ts +101 -1
- package/dist/styles.css +1 -1
- package/dist/web-component/web-component.es.js +41910 -36392
- package/package.json +5 -3
package/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
2
|
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import { UseMutateAsyncFunction } from '@tanstack/react-query';
|
|
4
|
+
import { UseMutateFunction } from '@tanstack/react-query';
|
|
5
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
3
6
|
import { z } from 'zod';
|
|
4
7
|
|
|
5
8
|
export declare class ApiService {
|
|
@@ -13,7 +16,7 @@ export declare class ApiService {
|
|
|
13
16
|
request: string;
|
|
14
17
|
user_id: string | null;
|
|
15
18
|
}[]>;
|
|
16
|
-
startFlow: (request:
|
|
19
|
+
startFlow: (request: StartFlowParam) => Promise<string>;
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
export declare type CellContentProps = {
|
|
@@ -231,6 +234,10 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
|
|
|
231
234
|
}>>>>;
|
|
232
235
|
confidence_score: z.ZodNumber;
|
|
233
236
|
confidence_score_reason: z.ZodString;
|
|
237
|
+
assumptions_score: z.ZodOptional<z.ZodNumber>;
|
|
238
|
+
assumptions_score_reason: z.ZodOptional<z.ZodString>;
|
|
239
|
+
friendliness_score: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
friendliness_score_reason: z.ZodOptional<z.ZodString>;
|
|
234
241
|
id: z.ZodNumber;
|
|
235
242
|
flow_data_id: z.ZodNumber;
|
|
236
243
|
created_at: z.ZodString;
|
|
@@ -266,6 +273,10 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
|
|
|
266
273
|
target: string;
|
|
267
274
|
}[];
|
|
268
275
|
}> | null | undefined;
|
|
276
|
+
assumptions_score?: number | undefined;
|
|
277
|
+
assumptions_score_reason?: string | undefined;
|
|
278
|
+
friendliness_score?: number | undefined;
|
|
279
|
+
friendliness_score_reason?: string | undefined;
|
|
269
280
|
}, {
|
|
270
281
|
flow_data_id: number;
|
|
271
282
|
confidence_score: number;
|
|
@@ -298,6 +309,10 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
|
|
|
298
309
|
target: string;
|
|
299
310
|
}[];
|
|
300
311
|
}> | null | undefined;
|
|
312
|
+
assumptions_score?: number | undefined;
|
|
313
|
+
assumptions_score_reason?: string | undefined;
|
|
314
|
+
friendliness_score?: number | undefined;
|
|
315
|
+
friendliness_score_reason?: string | undefined;
|
|
301
316
|
}>;
|
|
302
317
|
|
|
303
318
|
declare const FrontendFlowDataSchema: z.ZodObject<Omit<{
|
|
@@ -447,12 +462,97 @@ declare type StandaloneConversationModalProps = {
|
|
|
447
462
|
onOpenChange?: (open: boolean) => void;
|
|
448
463
|
};
|
|
449
464
|
|
|
465
|
+
declare type StartFlowParam = {
|
|
466
|
+
query: string;
|
|
467
|
+
} | {
|
|
468
|
+
triggerId: string;
|
|
469
|
+
variables: Record<string, string>;
|
|
470
|
+
};
|
|
471
|
+
|
|
450
472
|
declare type StartOptions = DisplayControlProps & {
|
|
451
473
|
label?: string;
|
|
452
474
|
recommendationsLabel?: string;
|
|
453
475
|
placeholders?: string[];
|
|
454
476
|
};
|
|
455
477
|
|
|
478
|
+
export declare const useStartFlow: (options?: UseMutationOptions<string, Error, StartFlowParam>) => {
|
|
479
|
+
startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
480
|
+
startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
481
|
+
data: undefined;
|
|
482
|
+
variables: undefined;
|
|
483
|
+
error: null;
|
|
484
|
+
isError: false;
|
|
485
|
+
isIdle: true;
|
|
486
|
+
isPending: false;
|
|
487
|
+
isSuccess: false;
|
|
488
|
+
status: "idle";
|
|
489
|
+
mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
490
|
+
reset: () => void;
|
|
491
|
+
context: unknown;
|
|
492
|
+
failureCount: number;
|
|
493
|
+
failureReason: Error | null;
|
|
494
|
+
isPaused: boolean;
|
|
495
|
+
submittedAt: number;
|
|
496
|
+
mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
497
|
+
} | {
|
|
498
|
+
startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
499
|
+
startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
500
|
+
data: undefined;
|
|
501
|
+
variables: StartFlowParam;
|
|
502
|
+
error: null;
|
|
503
|
+
isError: false;
|
|
504
|
+
isIdle: false;
|
|
505
|
+
isPending: true;
|
|
506
|
+
isSuccess: false;
|
|
507
|
+
status: "pending";
|
|
508
|
+
mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
509
|
+
reset: () => void;
|
|
510
|
+
context: unknown;
|
|
511
|
+
failureCount: number;
|
|
512
|
+
failureReason: Error | null;
|
|
513
|
+
isPaused: boolean;
|
|
514
|
+
submittedAt: number;
|
|
515
|
+
mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
516
|
+
} | {
|
|
517
|
+
startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
518
|
+
startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
519
|
+
data: undefined;
|
|
520
|
+
error: Error;
|
|
521
|
+
variables: StartFlowParam;
|
|
522
|
+
isError: true;
|
|
523
|
+
isIdle: false;
|
|
524
|
+
isPending: false;
|
|
525
|
+
isSuccess: false;
|
|
526
|
+
status: "error";
|
|
527
|
+
mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
528
|
+
reset: () => void;
|
|
529
|
+
context: unknown;
|
|
530
|
+
failureCount: number;
|
|
531
|
+
failureReason: Error | null;
|
|
532
|
+
isPaused: boolean;
|
|
533
|
+
submittedAt: number;
|
|
534
|
+
mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
535
|
+
} | {
|
|
536
|
+
startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
537
|
+
startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
538
|
+
data: string;
|
|
539
|
+
error: null;
|
|
540
|
+
variables: StartFlowParam;
|
|
541
|
+
isError: false;
|
|
542
|
+
isIdle: false;
|
|
543
|
+
isPending: false;
|
|
544
|
+
isSuccess: true;
|
|
545
|
+
status: "success";
|
|
546
|
+
mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
547
|
+
reset: () => void;
|
|
548
|
+
context: unknown;
|
|
549
|
+
failureCount: number;
|
|
550
|
+
failureReason: Error | null;
|
|
551
|
+
isPaused: boolean;
|
|
552
|
+
submittedAt: number;
|
|
553
|
+
mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
554
|
+
};
|
|
555
|
+
|
|
456
556
|
export { }
|
|
457
557
|
|
|
458
558
|
|