@marketrix.ai/widget 3.8.138 → 3.8.140
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/context/sseReducer.d.ts +1 -1
- package/dist/src/sdk/contract.d.ts +11 -8
- package/dist/src/sdk/contracts/activityLog.d.ts +6 -6
- package/dist/src/sdk/contracts/application.d.ts +0 -3
- package/dist/src/sdk/contracts/common.d.ts +0 -10
- package/dist/src/sdk/contracts/entities.d.ts +3 -40
- package/dist/src/sdk/contracts/widget.d.ts +22 -143
- package/dist/src/sdk/index.d.ts +11 -8
- package/dist/src/services/StreamClient.d.ts +1 -0
- package/dist/src/types/index.d.ts +3 -0
- package/dist/widget.mjs +1 -1
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -43,7 +43,7 @@ export declare function reduceToolDone(state: SseState, currentMode: Instruction
|
|
|
43
43
|
export declare function reduceStop(state: SseState, currentMode: InstructionType): SseState;
|
|
44
44
|
/**
|
|
45
45
|
* Pure reducer. Returns the next state plus any side effects the wiring must run.
|
|
46
|
-
* Unknown / non-stateful events (registered,
|
|
46
|
+
* Unknown / non-stateful events (registered, heartbeat) are ignored.
|
|
47
47
|
*/
|
|
48
48
|
export declare function reduceSse(state: SseState, event: WidgetEvent, currentMode: InstructionType): ReduceResult;
|
|
49
49
|
export {};
|
|
@@ -4,7 +4,7 @@ export declare const widgetContract: {
|
|
|
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
6
|
workspace_id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
7
|
-
user_id: import("zod").ZodOptional<import("zod").ZodNumber
|
|
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>;
|
|
10
10
|
id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -56,7 +56,7 @@ export declare const widgetContract: {
|
|
|
56
56
|
created_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
|
|
57
57
|
updated_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
|
|
58
58
|
workspace_id: import("zod").ZodNumber;
|
|
59
|
-
user_id: import("zod").ZodNumber
|
|
59
|
+
user_id: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
60
60
|
type: import("zod").ZodEnum<{
|
|
61
61
|
user_login: "user_login";
|
|
62
62
|
url_visit: "url_visit";
|
|
@@ -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;
|
|
@@ -341,8 +342,6 @@ export declare const widgetContract: {
|
|
|
341
342
|
data: import("zod").ZodOptional<import("zod").ZodString>;
|
|
342
343
|
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
343
344
|
state_version: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
344
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
345
|
-
type: import("zod").ZodLiteral<"ping">;
|
|
346
345
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
347
346
|
type: import("zod").ZodLiteral<"rrweb/metadata">;
|
|
348
347
|
rrweb_session_id: import("zod").ZodString;
|
|
@@ -373,14 +372,16 @@ export declare const widgetContract: {
|
|
|
373
372
|
type: "registered";
|
|
374
373
|
chat_id: string;
|
|
375
374
|
application_id?: number | undefined;
|
|
376
|
-
} | {
|
|
377
|
-
type: "pong";
|
|
378
375
|
} | {
|
|
379
376
|
type: "heartbeat";
|
|
380
377
|
} | {
|
|
381
378
|
type: "chat/response";
|
|
382
379
|
request_id: string;
|
|
383
380
|
text: string;
|
|
381
|
+
} | {
|
|
382
|
+
type: "chat/delta";
|
|
383
|
+
request_id: string;
|
|
384
|
+
text: string;
|
|
384
385
|
} | {
|
|
385
386
|
type: "chat/error";
|
|
386
387
|
request_id: string;
|
|
@@ -403,14 +404,16 @@ export declare const widgetContract: {
|
|
|
403
404
|
type: "registered";
|
|
404
405
|
chat_id: string;
|
|
405
406
|
application_id?: number | undefined;
|
|
406
|
-
} | {
|
|
407
|
-
type: "pong";
|
|
408
407
|
} | {
|
|
409
408
|
type: "heartbeat";
|
|
410
409
|
} | {
|
|
411
410
|
type: "chat/response";
|
|
412
411
|
request_id: string;
|
|
413
412
|
text: string;
|
|
413
|
+
} | {
|
|
414
|
+
type: "chat/delta";
|
|
415
|
+
request_id: string;
|
|
416
|
+
text: string;
|
|
414
417
|
} | {
|
|
415
418
|
type: "chat/error";
|
|
416
419
|
request_id: string;
|
|
@@ -4,7 +4,7 @@ export declare const activityLogCreate: import("@orpc/contract").ContractProcedu
|
|
|
4
4
|
created_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
5
5
|
updated_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
6
6
|
workspace_id: z.ZodOptional<z.ZodNumber>;
|
|
7
|
-
user_id: z.ZodOptional<z.ZodNumber
|
|
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>;
|
|
10
10
|
id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -56,7 +56,7 @@ export declare const activityLogCreate: import("@orpc/contract").ContractProcedu
|
|
|
56
56
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
57
57
|
updated_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
58
58
|
workspace_id: z.ZodNumber;
|
|
59
|
-
user_id: z.ZodNumber
|
|
59
|
+
user_id: z.ZodNullable<z.ZodNumber>;
|
|
60
60
|
type: z.ZodEnum<{
|
|
61
61
|
user_login: "user_login";
|
|
62
62
|
url_visit: "url_visit";
|
|
@@ -143,7 +143,7 @@ export declare const activityLogSearch: import("@orpc/contract").ContractProcedu
|
|
|
143
143
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
144
144
|
updated_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
145
145
|
workspace_id: z.ZodNumber;
|
|
146
|
-
user_id: z.ZodNumber
|
|
146
|
+
user_id: z.ZodNullable<z.ZodNumber>;
|
|
147
147
|
type: z.ZodEnum<{
|
|
148
148
|
user_login: "user_login";
|
|
149
149
|
url_visit: "url_visit";
|
|
@@ -201,7 +201,7 @@ export declare const activityLogRoutes: {
|
|
|
201
201
|
created_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
202
202
|
updated_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
203
203
|
workspace_id: z.ZodOptional<z.ZodNumber>;
|
|
204
|
-
user_id: z.ZodOptional<z.ZodNumber
|
|
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>;
|
|
207
207
|
id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -253,7 +253,7 @@ export declare const activityLogRoutes: {
|
|
|
253
253
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
254
254
|
updated_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
255
255
|
workspace_id: z.ZodNumber;
|
|
256
|
-
user_id: z.ZodNumber
|
|
256
|
+
user_id: z.ZodNullable<z.ZodNumber>;
|
|
257
257
|
type: z.ZodEnum<{
|
|
258
258
|
user_login: "user_login";
|
|
259
259
|
url_visit: "url_visit";
|
|
@@ -340,7 +340,7 @@ export declare const activityLogRoutes: {
|
|
|
340
340
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
341
341
|
updated_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
342
342
|
workspace_id: z.ZodNumber;
|
|
343
|
-
user_id: z.ZodNumber
|
|
343
|
+
user_id: z.ZodNullable<z.ZodNumber>;
|
|
344
344
|
type: z.ZodEnum<{
|
|
345
345
|
user_login: "user_login";
|
|
346
346
|
url_visit: "url_visit";
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const ApplicationFilterSchema: z.ZodObject<{
|
|
3
|
-
application_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
4
|
-
}, z.core.$strip>;
|
|
5
2
|
export declare const ApplicationCreateSchema: z.ZodObject<{
|
|
6
3
|
id: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
7
4
|
created_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
@@ -141,13 +141,3 @@ export declare const GraphSchema: z.ZodObject<{
|
|
|
141
141
|
}, z.core.$loose>>;
|
|
142
142
|
}, z.core.$strip>;
|
|
143
143
|
export type GraphData = z.infer<typeof GraphSchema>;
|
|
144
|
-
/**
|
|
145
|
-
* Skill invocation request — used by SimulationCreateSchema to launch a
|
|
146
|
-
* simulation against a specific skill. Lives in common so simulation.ts
|
|
147
|
-
* can import it without crossing domain boundaries.
|
|
148
|
-
*/
|
|
149
|
-
export declare const SkillInvocationRequestSchema: z.ZodObject<{
|
|
150
|
-
skill_id: z.ZodNumber;
|
|
151
|
-
params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
152
|
-
}, z.core.$strip>;
|
|
153
|
-
export type SkillInvocationRequest = z.infer<typeof SkillInvocationRequestSchema>;
|
|
@@ -5,7 +5,6 @@ export declare const WorkspacePackageSchema: z.ZodEnum<{
|
|
|
5
5
|
growth: "growth";
|
|
6
6
|
enterprise: "enterprise";
|
|
7
7
|
}>;
|
|
8
|
-
export type WorkspacePackage = z.infer<typeof WorkspacePackageSchema>;
|
|
9
8
|
export declare const KnowledgeTypeSchema: z.ZodEnum<{
|
|
10
9
|
document: "document";
|
|
11
10
|
video: "video";
|
|
@@ -15,7 +14,6 @@ export declare const KnowledgeSourceSchema: z.ZodEnum<{
|
|
|
15
14
|
user: "user";
|
|
16
15
|
research: "research";
|
|
17
16
|
}>;
|
|
18
|
-
export type KnowledgeSource = z.infer<typeof KnowledgeSourceSchema>;
|
|
19
17
|
export declare const SimulationStatusSchema: z.ZodEnum<{
|
|
20
18
|
queued: "queued";
|
|
21
19
|
running: "running";
|
|
@@ -28,8 +26,7 @@ export declare const SimulationStatusSchema: z.ZodEnum<{
|
|
|
28
26
|
export type SimulationStatus = z.infer<typeof SimulationStatusSchema>;
|
|
29
27
|
/**
|
|
30
28
|
* Graph generation lifecycle status on a simulation row. Values written by
|
|
31
|
-
* `graphDispatch.ts` and `simulationHooks.ts
|
|
32
|
-
* `simulation/graph-updated` app event.
|
|
29
|
+
* `graphDispatch.ts` and `simulationHooks.ts`.
|
|
33
30
|
*/
|
|
34
31
|
export declare const GraphStatusSchema: z.ZodEnum<{
|
|
35
32
|
completed: "completed";
|
|
@@ -52,15 +49,6 @@ export declare const InstructionTypeSchema: z.ZodEnum<{
|
|
|
52
49
|
do: "do";
|
|
53
50
|
}>;
|
|
54
51
|
export type InstructionType = z.infer<typeof InstructionTypeSchema>;
|
|
55
|
-
/**
|
|
56
|
-
* Authentication method schema
|
|
57
|
-
* password: Email/password authentication
|
|
58
|
-
* oauth: Social login (Google, Microsoft, Apple, etc.) or SSO
|
|
59
|
-
*/
|
|
60
|
-
export declare const AuthMethodSchema: z.ZodEnum<{
|
|
61
|
-
password: "password";
|
|
62
|
-
oauth: "oauth";
|
|
63
|
-
}>;
|
|
64
52
|
/**
|
|
65
53
|
* Complete user entity schema
|
|
66
54
|
* Note: Users don't have plans - plans belong to workspaces (via workspace_plan table)
|
|
@@ -89,30 +77,6 @@ export declare const UserEntitySchema: z.ZodObject<{
|
|
|
89
77
|
}>>>;
|
|
90
78
|
}, z.core.$strip>;
|
|
91
79
|
export type UserData = z.infer<typeof UserEntitySchema>;
|
|
92
|
-
export declare const UserCreateSchema: z.ZodObject<{
|
|
93
|
-
id: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
94
|
-
created_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
95
|
-
updated_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
96
|
-
is_super: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
98
|
-
created: "created";
|
|
99
|
-
active: "active";
|
|
100
|
-
suspended: "suspended";
|
|
101
|
-
pending_approval: "pending_approval";
|
|
102
|
-
}>>;
|
|
103
|
-
external_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
104
|
-
first_name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
105
|
-
last_name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
106
|
-
image_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
107
|
-
last_login_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>>;
|
|
108
|
-
auth_method: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
109
|
-
password: "password";
|
|
110
|
-
oauth: "oauth";
|
|
111
|
-
}>>>>;
|
|
112
|
-
email: z.ZodString;
|
|
113
|
-
password: z.ZodString;
|
|
114
|
-
}, z.core.$strip>;
|
|
115
|
-
export type UserCreateData = z.infer<typeof UserCreateSchema>;
|
|
116
80
|
/**
|
|
117
81
|
* Complete workspace entity schema
|
|
118
82
|
* Note: package and ending_date come from workspace_plan table (joined when fetching workspace data).
|
|
@@ -565,13 +529,12 @@ export declare const ActivityLogMetadataSchema: z.ZodObject<{
|
|
|
565
529
|
widget_type: z.ZodOptional<z.ZodString>;
|
|
566
530
|
created_by: z.ZodOptional<z.ZodNumber>;
|
|
567
531
|
}, z.core.$loose>;
|
|
568
|
-
export type ActivityLogMetadataData = z.infer<typeof ActivityLogMetadataSchema>;
|
|
569
532
|
export declare const ActivityLogEntitySchema: z.ZodObject<{
|
|
570
533
|
id: z.ZodOptional<z.ZodNumber>;
|
|
571
534
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
572
535
|
updated_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
573
536
|
workspace_id: z.ZodNumber;
|
|
574
|
-
user_id: z.ZodNumber
|
|
537
|
+
user_id: z.ZodNullable<z.ZodNumber>;
|
|
575
538
|
type: z.ZodEnum<{
|
|
576
539
|
user_login: "user_login";
|
|
577
540
|
url_visit: "url_visit";
|
|
@@ -625,7 +588,7 @@ export declare const ActivityLogCreateSchema: z.ZodObject<{
|
|
|
625
588
|
created_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
626
589
|
updated_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
627
590
|
workspace_id: z.ZodOptional<z.ZodNumber>;
|
|
628
|
-
user_id: z.ZodOptional<z.ZodNumber
|
|
591
|
+
user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
629
592
|
metadata: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
630
593
|
details: z.ZodOptional<z.ZodString>;
|
|
631
594
|
id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1,132 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { WidgetSettingsDataSchema } from './entities';
|
|
3
|
-
export declare const WidgetInfoSchema: z.ZodObject<{
|
|
4
|
-
id: z.ZodOptional<z.ZodNumber>;
|
|
5
|
-
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
6
|
-
updated_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
7
|
-
application_id: z.ZodNumber;
|
|
8
|
-
type: z.ZodEnum<{
|
|
9
|
-
widget: "widget";
|
|
10
|
-
}>;
|
|
11
|
-
settings: z.ZodObject<{
|
|
12
|
-
widget_enabled: z.ZodBoolean;
|
|
13
|
-
widget_appearance: z.ZodEnum<{
|
|
14
|
-
default: "default";
|
|
15
|
-
compact: "compact";
|
|
16
|
-
full: "full";
|
|
17
|
-
}>;
|
|
18
|
-
widget_position: z.ZodEnum<{
|
|
19
|
-
bottom_left: "bottom_left";
|
|
20
|
-
bottom_right: "bottom_right";
|
|
21
|
-
top_left: "top_left";
|
|
22
|
-
top_right: "top_right";
|
|
23
|
-
}>;
|
|
24
|
-
widget_device: z.ZodEnum<{
|
|
25
|
-
desktop: "desktop";
|
|
26
|
-
mobile: "mobile";
|
|
27
|
-
desktop_mobile: "desktop_mobile";
|
|
28
|
-
}>;
|
|
29
|
-
widget_header: z.ZodString;
|
|
30
|
-
widget_body: z.ZodString;
|
|
31
|
-
widget_greeting: z.ZodString;
|
|
32
|
-
widget_feature_tell: z.ZodBoolean;
|
|
33
|
-
widget_feature_show: z.ZodBoolean;
|
|
34
|
-
widget_feature_do: z.ZodBoolean;
|
|
35
|
-
widget_feature_human: z.ZodBoolean;
|
|
36
|
-
widget_background_color: z.ZodString;
|
|
37
|
-
widget_text_color: z.ZodString;
|
|
38
|
-
widget_border_color: z.ZodString;
|
|
39
|
-
widget_accent_color: z.ZodString;
|
|
40
|
-
widget_secondary_color: z.ZodString;
|
|
41
|
-
widget_border_radius: z.ZodString;
|
|
42
|
-
widget_font_size: z.ZodString;
|
|
43
|
-
widget_width: z.ZodString;
|
|
44
|
-
widget_height: z.ZodString;
|
|
45
|
-
widget_shadow: z.ZodString;
|
|
46
|
-
widget_animation_duration: z.ZodString;
|
|
47
|
-
widget_fade_duration: z.ZodString;
|
|
48
|
-
widget_bounce_effect: z.ZodBoolean;
|
|
49
|
-
widget_chips: z.ZodArray<z.ZodObject<{
|
|
50
|
-
chip_mode: z.ZodEnum<{
|
|
51
|
-
tell: "tell";
|
|
52
|
-
show: "show";
|
|
53
|
-
do: "do";
|
|
54
|
-
}>;
|
|
55
|
-
chip_text: z.ZodString;
|
|
56
|
-
}, z.core.$strip>>;
|
|
57
|
-
}, z.core.$strip>;
|
|
58
|
-
status: z.ZodEnum<{
|
|
59
|
-
created: "created";
|
|
60
|
-
active: "active";
|
|
61
|
-
suspended: "suspended";
|
|
62
|
-
pending_approval: "pending_approval";
|
|
63
|
-
}>;
|
|
64
|
-
marketrix_id: z.ZodString;
|
|
65
|
-
marketrix_key: z.ZodString;
|
|
66
|
-
snippet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
-
application: z.ZodObject<{
|
|
68
|
-
id: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
69
|
-
created_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
70
|
-
updated_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
71
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
72
|
-
type: z.ZodOptional<z.ZodEnum<{
|
|
73
|
-
app: "app";
|
|
74
|
-
website: "website";
|
|
75
|
-
}>>;
|
|
76
|
-
name: z.ZodOptional<z.ZodString>;
|
|
77
|
-
url: z.ZodOptional<z.ZodString>;
|
|
78
|
-
workspace_id: z.ZodOptional<z.ZodNumber>;
|
|
79
|
-
username: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
80
|
-
allowed_domains: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
81
|
-
}, z.core.$strip>;
|
|
82
|
-
workspace: z.ZodObject<{
|
|
83
|
-
id: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
84
|
-
created_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
85
|
-
updated_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
86
|
-
name: z.ZodOptional<z.ZodString>;
|
|
87
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
88
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
89
|
-
created: "created";
|
|
90
|
-
active: "active";
|
|
91
|
-
suspended: "suspended";
|
|
92
|
-
pending_approval: "pending_approval";
|
|
93
|
-
}>>;
|
|
94
|
-
package: z.ZodOptional<z.ZodEnum<{
|
|
95
|
-
free: "free";
|
|
96
|
-
startup: "startup";
|
|
97
|
-
growth: "growth";
|
|
98
|
-
enterprise: "enterprise";
|
|
99
|
-
}>>;
|
|
100
|
-
ending_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>>;
|
|
101
|
-
external_workspace_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
102
|
-
slack_webhook_configured: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
103
|
-
notify_all_members_on_question: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
104
|
-
}, z.core.$strip>;
|
|
105
|
-
user: z.ZodObject<{
|
|
106
|
-
id: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
107
|
-
created_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
108
|
-
updated_at: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
109
|
-
is_super: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
111
|
-
created: "created";
|
|
112
|
-
active: "active";
|
|
113
|
-
suspended: "suspended";
|
|
114
|
-
pending_approval: "pending_approval";
|
|
115
|
-
}>>;
|
|
116
|
-
email: z.ZodOptional<z.ZodString>;
|
|
117
|
-
external_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
118
|
-
first_name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
119
|
-
last_name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
120
|
-
password: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
121
|
-
image_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
122
|
-
last_login_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>>;
|
|
123
|
-
auth_method: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
124
|
-
password: "password";
|
|
125
|
-
oauth: "oauth";
|
|
126
|
-
}>>>>;
|
|
127
|
-
}, z.core.$strip>;
|
|
128
|
-
}, z.core.$strip>;
|
|
129
|
-
export type WidgetInfoData = z.infer<typeof WidgetInfoSchema>;
|
|
130
3
|
/**
|
|
131
4
|
* Application with widgets schema — matches API response structure
|
|
132
5
|
*/
|
|
@@ -349,14 +222,16 @@ export declare const WidgetEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
349
222
|
type: z.ZodLiteral<"registered">;
|
|
350
223
|
chat_id: z.ZodString;
|
|
351
224
|
application_id: z.ZodOptional<z.ZodNumber>;
|
|
352
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
353
|
-
type: z.ZodLiteral<"pong">;
|
|
354
225
|
}, z.core.$strip>, z.ZodObject<{
|
|
355
226
|
type: z.ZodLiteral<"heartbeat">;
|
|
356
227
|
}, z.core.$strip>, z.ZodObject<{
|
|
357
228
|
type: z.ZodLiteral<"chat/response">;
|
|
358
229
|
request_id: z.ZodString;
|
|
359
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;
|
|
360
235
|
}, z.core.$strip>, z.ZodObject<{
|
|
361
236
|
type: z.ZodLiteral<"chat/error">;
|
|
362
237
|
request_id: z.ZodString;
|
|
@@ -409,8 +284,6 @@ export declare const WidgetCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
409
284
|
data: z.ZodOptional<z.ZodString>;
|
|
410
285
|
error: z.ZodOptional<z.ZodString>;
|
|
411
286
|
state_version: z.ZodOptional<z.ZodNumber>;
|
|
412
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
413
|
-
type: z.ZodLiteral<"ping">;
|
|
414
287
|
}, z.core.$strip>, z.ZodObject<{
|
|
415
288
|
type: z.ZodLiteral<"rrweb/metadata">;
|
|
416
289
|
rrweb_session_id: z.ZodString;
|
|
@@ -833,14 +706,16 @@ export declare const widgetStream: import("@orpc/contract").ContractProcedureBui
|
|
|
833
706
|
type: "registered";
|
|
834
707
|
chat_id: string;
|
|
835
708
|
application_id?: number | undefined;
|
|
836
|
-
} | {
|
|
837
|
-
type: "pong";
|
|
838
709
|
} | {
|
|
839
710
|
type: "heartbeat";
|
|
840
711
|
} | {
|
|
841
712
|
type: "chat/response";
|
|
842
713
|
request_id: string;
|
|
843
714
|
text: string;
|
|
715
|
+
} | {
|
|
716
|
+
type: "chat/delta";
|
|
717
|
+
request_id: string;
|
|
718
|
+
text: string;
|
|
844
719
|
} | {
|
|
845
720
|
type: "chat/error";
|
|
846
721
|
request_id: string;
|
|
@@ -863,14 +738,16 @@ export declare const widgetStream: import("@orpc/contract").ContractProcedureBui
|
|
|
863
738
|
type: "registered";
|
|
864
739
|
chat_id: string;
|
|
865
740
|
application_id?: number | undefined;
|
|
866
|
-
} | {
|
|
867
|
-
type: "pong";
|
|
868
741
|
} | {
|
|
869
742
|
type: "heartbeat";
|
|
870
743
|
} | {
|
|
871
744
|
type: "chat/response";
|
|
872
745
|
request_id: string;
|
|
873
746
|
text: string;
|
|
747
|
+
} | {
|
|
748
|
+
type: "chat/delta";
|
|
749
|
+
request_id: string;
|
|
750
|
+
text: string;
|
|
874
751
|
} | {
|
|
875
752
|
type: "chat/error";
|
|
876
753
|
request_id: string;
|
|
@@ -892,6 +769,7 @@ export declare const widgetStream: import("@orpc/contract").ContractProcedureBui
|
|
|
892
769
|
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
893
770
|
export declare const widgetMessage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
894
771
|
chat_id: z.ZodString;
|
|
772
|
+
tab_id: z.ZodOptional<z.ZodString>;
|
|
895
773
|
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
896
774
|
type: z.ZodLiteral<"chat/tell">;
|
|
897
775
|
request_id: z.ZodString;
|
|
@@ -914,8 +792,6 @@ export declare const widgetMessage: import("@orpc/contract").ContractProcedureBu
|
|
|
914
792
|
data: z.ZodOptional<z.ZodString>;
|
|
915
793
|
error: z.ZodOptional<z.ZodString>;
|
|
916
794
|
state_version: z.ZodOptional<z.ZodNumber>;
|
|
917
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
918
|
-
type: z.ZodLiteral<"ping">;
|
|
919
795
|
}, z.core.$strip>, z.ZodObject<{
|
|
920
796
|
type: z.ZodLiteral<"rrweb/metadata">;
|
|
921
797
|
rrweb_session_id: z.ZodString;
|
|
@@ -1341,14 +1217,16 @@ export declare const widgetRoutes: {
|
|
|
1341
1217
|
type: "registered";
|
|
1342
1218
|
chat_id: string;
|
|
1343
1219
|
application_id?: number | undefined;
|
|
1344
|
-
} | {
|
|
1345
|
-
type: "pong";
|
|
1346
1220
|
} | {
|
|
1347
1221
|
type: "heartbeat";
|
|
1348
1222
|
} | {
|
|
1349
1223
|
type: "chat/response";
|
|
1350
1224
|
request_id: string;
|
|
1351
1225
|
text: string;
|
|
1226
|
+
} | {
|
|
1227
|
+
type: "chat/delta";
|
|
1228
|
+
request_id: string;
|
|
1229
|
+
text: string;
|
|
1352
1230
|
} | {
|
|
1353
1231
|
type: "chat/error";
|
|
1354
1232
|
request_id: string;
|
|
@@ -1371,14 +1249,16 @@ export declare const widgetRoutes: {
|
|
|
1371
1249
|
type: "registered";
|
|
1372
1250
|
chat_id: string;
|
|
1373
1251
|
application_id?: number | undefined;
|
|
1374
|
-
} | {
|
|
1375
|
-
type: "pong";
|
|
1376
1252
|
} | {
|
|
1377
1253
|
type: "heartbeat";
|
|
1378
1254
|
} | {
|
|
1379
1255
|
type: "chat/response";
|
|
1380
1256
|
request_id: string;
|
|
1381
1257
|
text: string;
|
|
1258
|
+
} | {
|
|
1259
|
+
type: "chat/delta";
|
|
1260
|
+
request_id: string;
|
|
1261
|
+
text: string;
|
|
1382
1262
|
} | {
|
|
1383
1263
|
type: "chat/error";
|
|
1384
1264
|
request_id: string;
|
|
@@ -1400,6 +1280,7 @@ export declare const widgetRoutes: {
|
|
|
1400
1280
|
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
1401
1281
|
widgetMessage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1402
1282
|
chat_id: z.ZodString;
|
|
1283
|
+
tab_id: z.ZodOptional<z.ZodString>;
|
|
1403
1284
|
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1404
1285
|
type: z.ZodLiteral<"chat/tell">;
|
|
1405
1286
|
request_id: z.ZodString;
|
|
@@ -1422,8 +1303,6 @@ export declare const widgetRoutes: {
|
|
|
1422
1303
|
data: z.ZodOptional<z.ZodString>;
|
|
1423
1304
|
error: z.ZodOptional<z.ZodString>;
|
|
1424
1305
|
state_version: z.ZodOptional<z.ZodNumber>;
|
|
1425
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1426
|
-
type: z.ZodLiteral<"ping">;
|
|
1427
1306
|
}, z.core.$strip>, z.ZodObject<{
|
|
1428
1307
|
type: z.ZodLiteral<"rrweb/metadata">;
|
|
1429
1308
|
rrweb_session_id: z.ZodString;
|
package/dist/src/sdk/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const sdk: {
|
|
|
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
11
|
workspace_id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
12
|
-
user_id: import("zod").ZodOptional<import("zod").ZodNumber
|
|
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>;
|
|
15
15
|
id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -61,7 +61,7 @@ export declare const sdk: {
|
|
|
61
61
|
created_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
|
|
62
62
|
updated_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
|
|
63
63
|
workspace_id: import("zod").ZodNumber;
|
|
64
|
-
user_id: import("zod").ZodNumber
|
|
64
|
+
user_id: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
65
65
|
type: import("zod").ZodEnum<{
|
|
66
66
|
user_login: "user_login";
|
|
67
67
|
url_visit: "url_visit";
|
|
@@ -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;
|
|
@@ -346,8 +347,6 @@ export declare const sdk: {
|
|
|
346
347
|
data: import("zod").ZodOptional<import("zod").ZodString>;
|
|
347
348
|
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
348
349
|
state_version: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
349
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
350
|
-
type: import("zod").ZodLiteral<"ping">;
|
|
351
350
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
352
351
|
type: import("zod").ZodLiteral<"rrweb/metadata">;
|
|
353
352
|
rrweb_session_id: import("zod").ZodString;
|
|
@@ -378,14 +377,16 @@ export declare const sdk: {
|
|
|
378
377
|
type: "registered";
|
|
379
378
|
chat_id: string;
|
|
380
379
|
application_id?: number | undefined;
|
|
381
|
-
} | {
|
|
382
|
-
type: "pong";
|
|
383
380
|
} | {
|
|
384
381
|
type: "heartbeat";
|
|
385
382
|
} | {
|
|
386
383
|
type: "chat/response";
|
|
387
384
|
request_id: string;
|
|
388
385
|
text: string;
|
|
386
|
+
} | {
|
|
387
|
+
type: "chat/delta";
|
|
388
|
+
request_id: string;
|
|
389
|
+
text: string;
|
|
389
390
|
} | {
|
|
390
391
|
type: "chat/error";
|
|
391
392
|
request_id: string;
|
|
@@ -408,14 +409,16 @@ export declare const sdk: {
|
|
|
408
409
|
type: "registered";
|
|
409
410
|
chat_id: string;
|
|
410
411
|
application_id?: number | undefined;
|
|
411
|
-
} | {
|
|
412
|
-
type: "pong";
|
|
413
412
|
} | {
|
|
414
413
|
type: "heartbeat";
|
|
415
414
|
} | {
|
|
416
415
|
type: "chat/response";
|
|
417
416
|
request_id: string;
|
|
418
417
|
text: string;
|
|
418
|
+
} | {
|
|
419
|
+
type: "chat/delta";
|
|
420
|
+
request_id: string;
|
|
421
|
+
text: string;
|
|
419
422
|
} | {
|
|
420
423
|
type: "chat/error";
|
|
421
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 {
|