@marketrix.ai/widget 3.8.139 → 3.8.141
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/src/sdk/contract.d.ts +11 -2
- package/dist/src/sdk/contracts/activityLog.d.ts +6 -6
- package/dist/src/sdk/contracts/entities.d.ts +2 -2
- package/dist/src/sdk/contracts/widget.d.ts +22 -0
- package/dist/src/sdk/index.d.ts +11 -2
- package/dist/src/services/StreamClient.d.ts +1 -0
- package/dist/src/types/index.d.ts +3 -0
- package/dist/widget.mjs +59 -59
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ export declare const widgetContract: {
|
|
|
3
3
|
id: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
4
4
|
created_at: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>>;
|
|
5
5
|
updated_at: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>>;
|
|
6
|
-
workspace_id: import("zod").ZodOptional<import("zod").
|
|
6
|
+
workspace_id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
7
7
|
user_id: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
8
8
|
metadata: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
|
|
9
9
|
details: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -55,7 +55,7 @@ export declare const widgetContract: {
|
|
|
55
55
|
id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
56
56
|
created_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
|
|
57
57
|
updated_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
|
|
58
|
-
workspace_id: import("zod").
|
|
58
|
+
workspace_id: import("zod").ZodNumber;
|
|
59
59
|
user_id: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
60
60
|
type: import("zod").ZodEnum<{
|
|
61
61
|
user_login: "user_login";
|
|
@@ -319,6 +319,7 @@ export declare const widgetContract: {
|
|
|
319
319
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
320
320
|
widgetMessage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
321
321
|
chat_id: import("zod").ZodString;
|
|
322
|
+
tab_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
322
323
|
command: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
323
324
|
type: import("zod").ZodLiteral<"chat/tell">;
|
|
324
325
|
request_id: import("zod").ZodString;
|
|
@@ -377,6 +378,10 @@ export declare const widgetContract: {
|
|
|
377
378
|
type: "chat/response";
|
|
378
379
|
request_id: string;
|
|
379
380
|
text: string;
|
|
381
|
+
} | {
|
|
382
|
+
type: "chat/delta";
|
|
383
|
+
request_id: string;
|
|
384
|
+
text: string;
|
|
380
385
|
} | {
|
|
381
386
|
type: "chat/error";
|
|
382
387
|
request_id: string;
|
|
@@ -405,6 +410,10 @@ export declare const widgetContract: {
|
|
|
405
410
|
type: "chat/response";
|
|
406
411
|
request_id: string;
|
|
407
412
|
text: string;
|
|
413
|
+
} | {
|
|
414
|
+
type: "chat/delta";
|
|
415
|
+
request_id: string;
|
|
416
|
+
text: string;
|
|
408
417
|
} | {
|
|
409
418
|
type: "chat/error";
|
|
410
419
|
request_id: string;
|
|
@@ -3,7 +3,7 @@ export declare const activityLogCreate: import("@orpc/contract").ContractProcedu
|
|
|
3
3
|
id: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
4
4
|
created_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
5
5
|
updated_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
6
|
-
workspace_id: z.ZodOptional<z.
|
|
6
|
+
workspace_id: z.ZodOptional<z.ZodNumber>;
|
|
7
7
|
user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
8
8
|
metadata: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
9
9
|
details: z.ZodOptional<z.ZodString>;
|
|
@@ -55,7 +55,7 @@ export declare const activityLogCreate: import("@orpc/contract").ContractProcedu
|
|
|
55
55
|
id: z.ZodOptional<z.ZodNumber>;
|
|
56
56
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
57
57
|
updated_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
58
|
-
workspace_id: z.
|
|
58
|
+
workspace_id: z.ZodNumber;
|
|
59
59
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
60
60
|
type: z.ZodEnum<{
|
|
61
61
|
user_login: "user_login";
|
|
@@ -142,7 +142,7 @@ export declare const activityLogSearch: import("@orpc/contract").ContractProcedu
|
|
|
142
142
|
id: z.ZodOptional<z.ZodNumber>;
|
|
143
143
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
144
144
|
updated_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
145
|
-
workspace_id: z.
|
|
145
|
+
workspace_id: z.ZodNumber;
|
|
146
146
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
147
147
|
type: z.ZodEnum<{
|
|
148
148
|
user_login: "user_login";
|
|
@@ -200,7 +200,7 @@ export declare const activityLogRoutes: {
|
|
|
200
200
|
id: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
201
201
|
created_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
202
202
|
updated_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
203
|
-
workspace_id: z.ZodOptional<z.
|
|
203
|
+
workspace_id: z.ZodOptional<z.ZodNumber>;
|
|
204
204
|
user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
205
205
|
metadata: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
206
206
|
details: z.ZodOptional<z.ZodString>;
|
|
@@ -252,7 +252,7 @@ export declare const activityLogRoutes: {
|
|
|
252
252
|
id: z.ZodOptional<z.ZodNumber>;
|
|
253
253
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
254
254
|
updated_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
255
|
-
workspace_id: z.
|
|
255
|
+
workspace_id: z.ZodNumber;
|
|
256
256
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
257
257
|
type: z.ZodEnum<{
|
|
258
258
|
user_login: "user_login";
|
|
@@ -339,7 +339,7 @@ export declare const activityLogRoutes: {
|
|
|
339
339
|
id: z.ZodOptional<z.ZodNumber>;
|
|
340
340
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
341
341
|
updated_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
342
|
-
workspace_id: z.
|
|
342
|
+
workspace_id: z.ZodNumber;
|
|
343
343
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
344
344
|
type: z.ZodEnum<{
|
|
345
345
|
user_login: "user_login";
|
|
@@ -533,7 +533,7 @@ export declare const ActivityLogEntitySchema: z.ZodObject<{
|
|
|
533
533
|
id: z.ZodOptional<z.ZodNumber>;
|
|
534
534
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
535
535
|
updated_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
536
|
-
workspace_id: z.
|
|
536
|
+
workspace_id: z.ZodNumber;
|
|
537
537
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
538
538
|
type: z.ZodEnum<{
|
|
539
539
|
user_login: "user_login";
|
|
@@ -587,7 +587,7 @@ export declare const ActivityLogCreateSchema: z.ZodObject<{
|
|
|
587
587
|
id: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
588
588
|
created_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
589
589
|
updated_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
590
|
-
workspace_id: z.ZodOptional<z.
|
|
590
|
+
workspace_id: z.ZodOptional<z.ZodNumber>;
|
|
591
591
|
user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
592
592
|
metadata: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
593
593
|
details: z.ZodOptional<z.ZodString>;
|
|
@@ -228,6 +228,10 @@ export declare const WidgetEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
228
228
|
type: z.ZodLiteral<"chat/response">;
|
|
229
229
|
request_id: z.ZodString;
|
|
230
230
|
text: z.ZodString;
|
|
231
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
232
|
+
type: z.ZodLiteral<"chat/delta">;
|
|
233
|
+
request_id: z.ZodString;
|
|
234
|
+
text: z.ZodString;
|
|
231
235
|
}, z.core.$strip>, z.ZodObject<{
|
|
232
236
|
type: z.ZodLiteral<"chat/error">;
|
|
233
237
|
request_id: z.ZodString;
|
|
@@ -708,6 +712,10 @@ export declare const widgetStream: import("@orpc/contract").ContractProcedureBui
|
|
|
708
712
|
type: "chat/response";
|
|
709
713
|
request_id: string;
|
|
710
714
|
text: string;
|
|
715
|
+
} | {
|
|
716
|
+
type: "chat/delta";
|
|
717
|
+
request_id: string;
|
|
718
|
+
text: string;
|
|
711
719
|
} | {
|
|
712
720
|
type: "chat/error";
|
|
713
721
|
request_id: string;
|
|
@@ -736,6 +744,10 @@ export declare const widgetStream: import("@orpc/contract").ContractProcedureBui
|
|
|
736
744
|
type: "chat/response";
|
|
737
745
|
request_id: string;
|
|
738
746
|
text: string;
|
|
747
|
+
} | {
|
|
748
|
+
type: "chat/delta";
|
|
749
|
+
request_id: string;
|
|
750
|
+
text: string;
|
|
739
751
|
} | {
|
|
740
752
|
type: "chat/error";
|
|
741
753
|
request_id: string;
|
|
@@ -757,6 +769,7 @@ export declare const widgetStream: import("@orpc/contract").ContractProcedureBui
|
|
|
757
769
|
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
758
770
|
export declare const widgetMessage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
759
771
|
chat_id: z.ZodString;
|
|
772
|
+
tab_id: z.ZodOptional<z.ZodString>;
|
|
760
773
|
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
761
774
|
type: z.ZodLiteral<"chat/tell">;
|
|
762
775
|
request_id: z.ZodString;
|
|
@@ -1210,6 +1223,10 @@ export declare const widgetRoutes: {
|
|
|
1210
1223
|
type: "chat/response";
|
|
1211
1224
|
request_id: string;
|
|
1212
1225
|
text: string;
|
|
1226
|
+
} | {
|
|
1227
|
+
type: "chat/delta";
|
|
1228
|
+
request_id: string;
|
|
1229
|
+
text: string;
|
|
1213
1230
|
} | {
|
|
1214
1231
|
type: "chat/error";
|
|
1215
1232
|
request_id: string;
|
|
@@ -1238,6 +1255,10 @@ export declare const widgetRoutes: {
|
|
|
1238
1255
|
type: "chat/response";
|
|
1239
1256
|
request_id: string;
|
|
1240
1257
|
text: string;
|
|
1258
|
+
} | {
|
|
1259
|
+
type: "chat/delta";
|
|
1260
|
+
request_id: string;
|
|
1261
|
+
text: string;
|
|
1241
1262
|
} | {
|
|
1242
1263
|
type: "chat/error";
|
|
1243
1264
|
request_id: string;
|
|
@@ -1259,6 +1280,7 @@ export declare const widgetRoutes: {
|
|
|
1259
1280
|
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
1260
1281
|
widgetMessage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1261
1282
|
chat_id: z.ZodString;
|
|
1283
|
+
tab_id: z.ZodOptional<z.ZodString>;
|
|
1262
1284
|
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1263
1285
|
type: z.ZodLiteral<"chat/tell">;
|
|
1264
1286
|
request_id: z.ZodString;
|
package/dist/src/sdk/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const sdk: {
|
|
|
8
8
|
id: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
9
9
|
created_at: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>>;
|
|
10
10
|
updated_at: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>>;
|
|
11
|
-
workspace_id: import("zod").ZodOptional<import("zod").
|
|
11
|
+
workspace_id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
12
12
|
user_id: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
13
13
|
metadata: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
|
|
14
14
|
details: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -60,7 +60,7 @@ export declare const sdk: {
|
|
|
60
60
|
id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
61
61
|
created_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
|
|
62
62
|
updated_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
|
|
63
|
-
workspace_id: import("zod").
|
|
63
|
+
workspace_id: import("zod").ZodNumber;
|
|
64
64
|
user_id: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
65
65
|
type: import("zod").ZodEnum<{
|
|
66
66
|
user_login: "user_login";
|
|
@@ -324,6 +324,7 @@ export declare const sdk: {
|
|
|
324
324
|
}, import("zod/v4/core").$strip>, Record<never, never>>;
|
|
325
325
|
widgetMessage: import("@orpc/contract").ContractProcedureClient<Record<never, never>, import("zod").ZodObject<{
|
|
326
326
|
chat_id: import("zod").ZodString;
|
|
327
|
+
tab_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
327
328
|
command: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
328
329
|
type: import("zod").ZodLiteral<"chat/tell">;
|
|
329
330
|
request_id: import("zod").ZodString;
|
|
@@ -382,6 +383,10 @@ export declare const sdk: {
|
|
|
382
383
|
type: "chat/response";
|
|
383
384
|
request_id: string;
|
|
384
385
|
text: string;
|
|
386
|
+
} | {
|
|
387
|
+
type: "chat/delta";
|
|
388
|
+
request_id: string;
|
|
389
|
+
text: string;
|
|
385
390
|
} | {
|
|
386
391
|
type: "chat/error";
|
|
387
392
|
request_id: string;
|
|
@@ -410,6 +415,10 @@ export declare const sdk: {
|
|
|
410
415
|
type: "chat/response";
|
|
411
416
|
request_id: string;
|
|
412
417
|
text: string;
|
|
418
|
+
} | {
|
|
419
|
+
type: "chat/delta";
|
|
420
|
+
request_id: string;
|
|
421
|
+
text: string;
|
|
413
422
|
} | {
|
|
414
423
|
type: "chat/error";
|
|
415
424
|
request_id: string;
|
|
@@ -55,6 +55,9 @@ export interface MessagePart {
|
|
|
55
55
|
browserToolName?: string;
|
|
56
56
|
hideIcon?: boolean;
|
|
57
57
|
textStyle?: 'default' | 'muted';
|
|
58
|
+
/** An in-flight streamed reply part — chat/delta fragments accumulate into it and the final
|
|
59
|
+
* chat/response replaces it. */
|
|
60
|
+
streaming?: boolean;
|
|
58
61
|
}
|
|
59
62
|
export type WidgetView = 'home' | 'chat';
|
|
60
63
|
export interface WidgetState {
|