@marketrix.ai/widget 3.8.137 → 3.8.139
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/README.md +4 -4
- package/dist/src/context/sseReducer.d.ts +1 -1
- package/dist/src/sdk/contract.d.ts +6 -12
- package/dist/src/sdk/contracts/activityLog.d.ts +12 -12
- package/dist/src/sdk/contracts/application.d.ts +22 -25
- package/dist/src/sdk/contracts/common.d.ts +0 -10
- package/dist/src/sdk/contracts/entities.d.ts +24 -70
- package/dist/src/sdk/contracts/widget.d.ts +2 -146
- package/dist/src/sdk/index.d.ts +6 -12
- package/dist/widget.mjs +62 -62
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,133 +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.ZodOptional<z.ZodNullable<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.ZodOptional<z.ZodNullable<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
|
-
prompt_limit: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
123
|
-
last_login_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>>;
|
|
124
|
-
auth_method: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
125
|
-
password: "password";
|
|
126
|
-
oauth: "oauth";
|
|
127
|
-
}>>>>;
|
|
128
|
-
}, z.core.$strip>;
|
|
129
|
-
}, z.core.$strip>;
|
|
130
|
-
export type WidgetInfoData = z.infer<typeof WidgetInfoSchema>;
|
|
131
3
|
/**
|
|
132
4
|
* Application with widgets schema — matches API response structure
|
|
133
5
|
*/
|
|
@@ -141,10 +13,10 @@ export declare const ApplicationWithWidgetsSchema: z.ZodObject<{
|
|
|
141
13
|
website: "website";
|
|
142
14
|
}>;
|
|
143
15
|
name: z.ZodString;
|
|
144
|
-
url: z.
|
|
16
|
+
url: z.ZodString;
|
|
145
17
|
workspace_id: z.ZodNumber;
|
|
146
18
|
username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
147
|
-
allowed_domains: z.ZodDefault<z.
|
|
19
|
+
allowed_domains: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
148
20
|
widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
149
21
|
id: z.ZodOptional<z.ZodNumber>;
|
|
150
22
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -350,8 +222,6 @@ export declare const WidgetEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
350
222
|
type: z.ZodLiteral<"registered">;
|
|
351
223
|
chat_id: z.ZodString;
|
|
352
224
|
application_id: z.ZodOptional<z.ZodNumber>;
|
|
353
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
354
|
-
type: z.ZodLiteral<"pong">;
|
|
355
225
|
}, z.core.$strip>, z.ZodObject<{
|
|
356
226
|
type: z.ZodLiteral<"heartbeat">;
|
|
357
227
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -410,8 +280,6 @@ export declare const WidgetCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
410
280
|
data: z.ZodOptional<z.ZodString>;
|
|
411
281
|
error: z.ZodOptional<z.ZodString>;
|
|
412
282
|
state_version: z.ZodOptional<z.ZodNumber>;
|
|
413
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
414
|
-
type: z.ZodLiteral<"ping">;
|
|
415
283
|
}, z.core.$strip>, z.ZodObject<{
|
|
416
284
|
type: z.ZodLiteral<"rrweb/metadata">;
|
|
417
285
|
rrweb_session_id: z.ZodString;
|
|
@@ -834,8 +702,6 @@ export declare const widgetStream: import("@orpc/contract").ContractProcedureBui
|
|
|
834
702
|
type: "registered";
|
|
835
703
|
chat_id: string;
|
|
836
704
|
application_id?: number | undefined;
|
|
837
|
-
} | {
|
|
838
|
-
type: "pong";
|
|
839
705
|
} | {
|
|
840
706
|
type: "heartbeat";
|
|
841
707
|
} | {
|
|
@@ -864,8 +730,6 @@ export declare const widgetStream: import("@orpc/contract").ContractProcedureBui
|
|
|
864
730
|
type: "registered";
|
|
865
731
|
chat_id: string;
|
|
866
732
|
application_id?: number | undefined;
|
|
867
|
-
} | {
|
|
868
|
-
type: "pong";
|
|
869
733
|
} | {
|
|
870
734
|
type: "heartbeat";
|
|
871
735
|
} | {
|
|
@@ -915,8 +779,6 @@ export declare const widgetMessage: import("@orpc/contract").ContractProcedureBu
|
|
|
915
779
|
data: z.ZodOptional<z.ZodString>;
|
|
916
780
|
error: z.ZodOptional<z.ZodString>;
|
|
917
781
|
state_version: z.ZodOptional<z.ZodNumber>;
|
|
918
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
919
|
-
type: z.ZodLiteral<"ping">;
|
|
920
782
|
}, z.core.$strip>, z.ZodObject<{
|
|
921
783
|
type: z.ZodLiteral<"rrweb/metadata">;
|
|
922
784
|
rrweb_session_id: z.ZodString;
|
|
@@ -1342,8 +1204,6 @@ export declare const widgetRoutes: {
|
|
|
1342
1204
|
type: "registered";
|
|
1343
1205
|
chat_id: string;
|
|
1344
1206
|
application_id?: number | undefined;
|
|
1345
|
-
} | {
|
|
1346
|
-
type: "pong";
|
|
1347
1207
|
} | {
|
|
1348
1208
|
type: "heartbeat";
|
|
1349
1209
|
} | {
|
|
@@ -1372,8 +1232,6 @@ export declare const widgetRoutes: {
|
|
|
1372
1232
|
type: "registered";
|
|
1373
1233
|
chat_id: string;
|
|
1374
1234
|
application_id?: number | undefined;
|
|
1375
|
-
} | {
|
|
1376
|
-
type: "pong";
|
|
1377
1235
|
} | {
|
|
1378
1236
|
type: "heartbeat";
|
|
1379
1237
|
} | {
|
|
@@ -1423,8 +1281,6 @@ export declare const widgetRoutes: {
|
|
|
1423
1281
|
data: z.ZodOptional<z.ZodString>;
|
|
1424
1282
|
error: z.ZodOptional<z.ZodString>;
|
|
1425
1283
|
state_version: z.ZodOptional<z.ZodNumber>;
|
|
1426
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1427
|
-
type: z.ZodLiteral<"ping">;
|
|
1428
1284
|
}, z.core.$strip>, z.ZodObject<{
|
|
1429
1285
|
type: z.ZodLiteral<"rrweb/metadata">;
|
|
1430
1286
|
rrweb_session_id: z.ZodString;
|
package/dist/src/sdk/index.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ 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").ZodNumber
|
|
12
|
-
user_id: import("zod").ZodOptional<import("zod").ZodNumber
|
|
11
|
+
workspace_id: import("zod").ZodOptional<import("zod").ZodNullable<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>;
|
|
@@ -60,8 +60,8 @@ 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").ZodNumber
|
|
64
|
-
user_id: import("zod").ZodNumber
|
|
63
|
+
workspace_id: import("zod").ZodNullable<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";
|
|
@@ -121,10 +121,10 @@ export declare const sdk: {
|
|
|
121
121
|
website: "website";
|
|
122
122
|
}>;
|
|
123
123
|
name: import("zod").ZodString;
|
|
124
|
-
url: import("zod").
|
|
124
|
+
url: import("zod").ZodString;
|
|
125
125
|
workspace_id: import("zod").ZodNumber;
|
|
126
126
|
username: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
127
|
-
allowed_domains: import("zod").ZodDefault<import("zod").
|
|
127
|
+
allowed_domains: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
128
128
|
widgets: import("zod").ZodArray<import("zod").ZodObject<{
|
|
129
129
|
id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
130
130
|
created_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
|
|
@@ -346,8 +346,6 @@ export declare const sdk: {
|
|
|
346
346
|
data: import("zod").ZodOptional<import("zod").ZodString>;
|
|
347
347
|
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
348
348
|
state_version: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
349
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
350
|
-
type: import("zod").ZodLiteral<"ping">;
|
|
351
349
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
352
350
|
type: import("zod").ZodLiteral<"rrweb/metadata">;
|
|
353
351
|
rrweb_session_id: import("zod").ZodString;
|
|
@@ -378,8 +376,6 @@ export declare const sdk: {
|
|
|
378
376
|
type: "registered";
|
|
379
377
|
chat_id: string;
|
|
380
378
|
application_id?: number | undefined;
|
|
381
|
-
} | {
|
|
382
|
-
type: "pong";
|
|
383
379
|
} | {
|
|
384
380
|
type: "heartbeat";
|
|
385
381
|
} | {
|
|
@@ -408,8 +404,6 @@ export declare const sdk: {
|
|
|
408
404
|
type: "registered";
|
|
409
405
|
chat_id: string;
|
|
410
406
|
application_id?: number | undefined;
|
|
411
|
-
} | {
|
|
412
|
-
type: "pong";
|
|
413
407
|
} | {
|
|
414
408
|
type: "heartbeat";
|
|
415
409
|
} | {
|