@marketrix.ai/widget 3.8.606 → 4.0.97

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.
@@ -1,207 +1,22 @@
1
1
  export declare const configureSdk: (apiUrl: string) => void;
2
2
  export declare const sdk: {
3
3
  activityLogCreate: import("@orpc/contract").ContractProcedureClient<Record<never, never>, import("zod").ZodObject<{
4
- id: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
5
- created_at: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>>;
6
- updated_at: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>>;
7
- workspace_id: import("zod").ZodOptional<import("zod").ZodNumber>;
8
- user_id: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
9
- metadata: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
10
- details: import("zod").ZodOptional<import("zod").ZodString>;
11
- id: import("zod").ZodOptional<import("zod").ZodNumber>;
12
- type: import("zod").ZodOptional<import("zod").ZodString>;
13
- name: import("zod").ZodOptional<import("zod").ZodString>;
14
- target_user_id: import("zod").ZodOptional<import("zod").ZodNumber>;
15
- target_user_email: import("zod").ZodOptional<import("zod").ZodString>;
16
- reason: import("zod").ZodOptional<import("zod").ZodString>;
17
- ip_address: import("zod").ZodOptional<import("zod").ZodString>;
18
- user_agent: import("zod").ZodOptional<import("zod").ZodString>;
19
- widget_type: import("zod").ZodOptional<import("zod").ZodString>;
20
- created_by: import("zod").ZodOptional<import("zod").ZodNumber>;
21
- }, import("zod/v4/core").$loose>>>;
22
- type: import("zod").ZodEnum<{
23
- user_login: "user_login";
24
- url_visit: "url_visit";
25
- update_workspace: "update_workspace";
26
- create_user: "create_user";
27
- update_user: "update_user";
28
- delete_user: "delete_user";
29
- create_application: "create_application";
30
- update_application: "update_application";
31
- delete_application: "delete_application";
32
- create_widget: "create_widget";
33
- update_widget: "update_widget";
34
- delete_widget: "delete_widget";
35
- create_knowledge: "create_knowledge";
36
- update_knowledge: "update_knowledge";
37
- delete_knowledge: "delete_knowledge";
38
- request_membership: "request_membership";
39
- invite_user: "invite_user";
40
- create_workspace: "create_workspace";
41
- trial_started: "trial_started";
42
- trial_ending_soon: "trial_ending_soon";
43
- trial_ended: "trial_ended";
44
- subscription_created: "subscription_created";
45
- subscription_canceled: "subscription_canceled";
46
- plan_changed: "plan_changed";
47
- payment_succeeded: "payment_succeeded";
48
- payment_failed: "payment_failed";
49
- widget_question: "widget_question";
50
- qa_run_started: "qa_run_started";
51
- start_simulation: "start_simulation";
52
- create_workflow: "create_workflow";
53
- update_workflow: "update_workflow";
54
- delete_workflow: "delete_workflow";
55
- toggle_workflow: "toggle_workflow";
56
- slack_command: "slack_command";
57
- create_form: "create_form";
58
- update_form: "update_form";
59
- delete_form: "delete_form";
60
- duplicate_form: "duplicate_form";
61
- publish_form: "publish_form";
62
- unpublish_form: "unpublish_form";
63
- archive_form: "archive_form";
64
- submit_form_response: "submit_form_response";
65
- delete_form_response: "delete_form_response";
66
- }>;
67
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
68
- id: import("zod").ZodOptional<import("zod").ZodNumber>;
69
- created_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
70
- updated_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
71
- workspace_id: import("zod").ZodNumber;
72
- user_id: import("zod").ZodNullable<import("zod").ZodNumber>;
73
- type: import("zod").ZodEnum<{
74
- user_login: "user_login";
75
- url_visit: "url_visit";
76
- update_workspace: "update_workspace";
77
- create_user: "create_user";
78
- update_user: "update_user";
79
- delete_user: "delete_user";
80
- create_application: "create_application";
81
- update_application: "update_application";
82
- delete_application: "delete_application";
83
- create_widget: "create_widget";
84
- update_widget: "update_widget";
85
- delete_widget: "delete_widget";
86
- create_knowledge: "create_knowledge";
87
- update_knowledge: "update_knowledge";
88
- delete_knowledge: "delete_knowledge";
89
- request_membership: "request_membership";
90
- invite_user: "invite_user";
91
- create_workspace: "create_workspace";
92
- trial_started: "trial_started";
93
- trial_ending_soon: "trial_ending_soon";
94
- trial_ended: "trial_ended";
95
- subscription_created: "subscription_created";
96
- subscription_canceled: "subscription_canceled";
97
- plan_changed: "plan_changed";
98
- payment_succeeded: "payment_succeeded";
99
- payment_failed: "payment_failed";
100
- widget_question: "widget_question";
101
- qa_run_started: "qa_run_started";
102
- start_simulation: "start_simulation";
103
- create_workflow: "create_workflow";
104
- update_workflow: "update_workflow";
105
- delete_workflow: "delete_workflow";
106
- toggle_workflow: "toggle_workflow";
107
- slack_command: "slack_command";
108
- create_form: "create_form";
109
- update_form: "update_form";
110
- delete_form: "delete_form";
111
- duplicate_form: "duplicate_form";
112
- publish_form: "publish_form";
113
- unpublish_form: "unpublish_form";
114
- archive_form: "archive_form";
115
- submit_form_response: "submit_form_response";
116
- delete_form_response: "delete_form_response";
117
- }>;
118
- metadata: import("zod").ZodOptional<import("zod").ZodObject<{
119
- details: import("zod").ZodOptional<import("zod").ZodString>;
120
- id: import("zod").ZodOptional<import("zod").ZodNumber>;
121
- type: import("zod").ZodOptional<import("zod").ZodString>;
122
- name: import("zod").ZodOptional<import("zod").ZodString>;
123
- target_user_id: import("zod").ZodOptional<import("zod").ZodNumber>;
124
- target_user_email: import("zod").ZodOptional<import("zod").ZodString>;
125
- reason: import("zod").ZodOptional<import("zod").ZodString>;
126
- ip_address: import("zod").ZodOptional<import("zod").ZodString>;
127
- user_agent: import("zod").ZodOptional<import("zod").ZodString>;
128
- widget_type: import("zod").ZodOptional<import("zod").ZodString>;
129
- created_by: import("zod").ZodOptional<import("zod").ZodNumber>;
130
- }, import("zod/v4/core").$loose>>;
131
- }, import("zod/v4/core").$strip>, Record<never, never>>;
132
- applicationGet: import("@orpc/contract").ContractProcedureClient<Record<never, never>, import("zod").ZodObject<{
133
- application_id: import("zod").ZodCoercedNumber<unknown>;
134
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
135
- id: import("zod").ZodOptional<import("zod").ZodNumber>;
136
- created_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
137
- updated_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
138
- slug: import("zod").ZodString;
139
- type: import("zod").ZodEnum<{
140
- app: "app";
141
- website: "website";
142
- }>;
143
- name: import("zod").ZodString;
144
- url: import("zod").ZodString;
145
- workspace_id: import("zod").ZodNumber;
146
- username: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
147
- allowed_domains: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
148
- widgets: import("zod").ZodArray<import("zod").ZodObject<{
149
- id: import("zod").ZodOptional<import("zod").ZodNumber>;
150
- created_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
151
- updated_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
152
- application_id: import("zod").ZodNumber;
153
- type: import("zod").ZodEnum<{
154
- widget: "widget";
155
- }>;
156
- settings: import("zod").ZodObject<{
157
- widget_enabled: import("zod").ZodBoolean;
158
- widget_appearance: import("zod").ZodEnum<{
159
- default: "default";
160
- hidden: "hidden";
161
- }>;
162
- widget_position: import("zod").ZodEnum<{
163
- bottom_left: "bottom_left";
164
- bottom_right: "bottom_right";
165
- top_left: "top_left";
166
- top_right: "top_right";
167
- }>;
168
- widget_header: import("zod").ZodString;
169
- widget_body: import("zod").ZodString;
170
- widget_greeting: import("zod").ZodString;
171
- widget_greeting_toast: import("zod").ZodBoolean;
172
- widget_recording: import("zod").ZodBoolean;
173
- widget_feature_tell: import("zod").ZodBoolean;
174
- widget_feature_show: import("zod").ZodBoolean;
175
- widget_feature_do: import("zod").ZodBoolean;
176
- widget_background_color: import("zod").ZodString;
177
- widget_text_color: import("zod").ZodString;
178
- widget_border_color: import("zod").ZodString;
179
- widget_accent_color: import("zod").ZodString;
180
- widget_secondary_color: import("zod").ZodString;
181
- widget_border_radius: import("zod").ZodString;
182
- widget_font_size: import("zod").ZodString;
183
- widget_width: import("zod").ZodString;
184
- widget_height: import("zod").ZodString;
185
- widget_animation_duration: import("zod").ZodString;
186
- widget_fade_duration: import("zod").ZodString;
187
- widget_chips: import("zod").ZodArray<import("zod").ZodObject<{
188
- chip_mode: import("zod").ZodEnum<{
189
- tell: "tell";
190
- show: "show";
191
- do: "do";
192
- }>;
193
- chip_text: import("zod").ZodString;
194
- }, import("zod/v4/core").$strip>>;
195
- }, import("zod/v4/core").$strip>;
196
- status: import("zod").ZodEnum<{
197
- created: "created";
198
- active: "active";
199
- suspended: "suspended";
4
+ type: import("zod").ZodLiteral<"widget_question">;
5
+ metadata: import("zod").ZodObject<{
6
+ question: import("zod").ZodString;
7
+ mode: import("zod").ZodEnum<{
8
+ tell: "tell";
9
+ show: "show";
10
+ do: "do";
200
11
  }>;
12
+ chat_id: import("zod").ZodString;
13
+ timestamp: import("zod").ZodString;
201
14
  marketrix_id: import("zod").ZodString;
202
15
  marketrix_key: import("zod").ZodString;
203
- snippet: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
204
- }, import("zod/v4/core").$strip>>;
16
+ user_id: import("zod").ZodOptional<import("zod").ZodNumber>;
17
+ }, import("zod/v4/core").$strict>;
18
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
19
+ success: import("zod").ZodLiteral<true>;
205
20
  }, import("zod/v4/core").$strip>, Record<never, never>>;
206
21
  chatCreate: import("@orpc/contract").ContractProcedureClient<Record<never, never>, import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodString, Record<never, never>>;
207
22
  widgetDefaultGet: import("@orpc/contract").ContractProcedureClient<Record<never, never>, import("zod").ZodObject<{
@@ -248,23 +63,18 @@ export declare const sdk: {
248
63
  chip_text: import("zod").ZodString;
249
64
  }, import("zod/v4/core").$strip>>;
250
65
  }, import("zod/v4/core").$strip>, Record<never, never>>;
251
- widgetSearch: import("@orpc/contract").ContractProcedureClient<Record<never, never>, import("zod").ZodObject<{
252
- type: import("zod").ZodOptional<import("zod").ZodEnum<{
253
- widget: "widget";
254
- }>>;
255
- application_id: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
256
- marketrix_id: import("zod").ZodOptional<import("zod").ZodString>;
257
- marketrix_key: import("zod").ZodOptional<import("zod").ZodString>;
66
+ widgetPublicSearch: import("@orpc/contract").ContractProcedureClient<Record<never, never>, import("zod").ZodObject<{
67
+ marketrix_id: import("zod").ZodString;
68
+ marketrix_key: import("zod").ZodString;
258
69
  limit: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
259
70
  offset: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
260
71
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
261
72
  items: import("zod").ZodArray<import("zod").ZodObject<{
262
- id: import("zod").ZodOptional<import("zod").ZodNumber>;
263
- created_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
264
- updated_at: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
265
73
  application_id: import("zod").ZodNumber;
266
- type: import("zod").ZodEnum<{
267
- widget: "widget";
74
+ status: import("zod").ZodEnum<{
75
+ created: "created";
76
+ active: "active";
77
+ suspended: "suspended";
268
78
  }>;
269
79
  settings: import("zod").ZodObject<{
270
80
  widget_enabled: import("zod").ZodBoolean;
@@ -306,14 +116,6 @@ export declare const sdk: {
306
116
  chip_text: import("zod").ZodString;
307
117
  }, import("zod/v4/core").$strip>>;
308
118
  }, import("zod/v4/core").$strip>;
309
- status: import("zod").ZodEnum<{
310
- created: "created";
311
- active: "active";
312
- suspended: "suspended";
313
- }>;
314
- marketrix_id: import("zod").ZodString;
315
- marketrix_key: import("zod").ZodString;
316
- snippet: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
317
119
  }, import("zod/v4/core").$strip>>;
318
120
  total: import("zod").ZodNumber;
319
121
  limit: import("zod").ZodNumber;
@@ -430,6 +232,6 @@ export declare const sdk: {
430
232
  };
431
233
  export { WidgetSettingsDataSchema } from './contracts/entities';
432
234
  export { WidgetEventSchema } from './contracts/widget';
433
- export type { InstructionType, WidgetData, WidgetSettingsData } from './contracts/entities';
235
+ export type { InstructionType, WidgetPublicData, WidgetSettingsData } from './contracts/entities';
434
236
  export type { WidgetCommand, WidgetEvent } from './contracts/widget';
435
237
  export type { widgetContract } from './contract';
@@ -14,5 +14,5 @@
14
14
  * `send` propagates to `ChatContext`, which renders the error turn.
15
15
  */
16
16
  import { type InstructionType } from '../sdk';
17
- import { type CredentialedConfig } from './StorageService';
17
+ import type { CredentialedConfig } from './StorageService';
18
18
  export declare function chatPost(config: CredentialedConfig, message: string, mode: InstructionType, requestId: string): Promise<void>;
@@ -13,7 +13,7 @@
13
13
  * the table honest — a field added api-side fails to compile here until guarded, one removed fails as an unknown
14
14
  * key — and `RENDER_CONSTANT_NAMES` mirrors api's `WIDGET_RENDER_CONSTANTS` by hand under the same check.
15
15
  *
16
- * `parseWidgetSettings` PICKS as well as validates: `widgetDefaultGet` returns the render constants too and the
16
+ * `parseWidgetSettings` PICKS as well as validates: a widget's settings arrive carrying the render constants and the
17
17
  * result is spread into the widget config, so unknown keys passing through would leak them where zod used to drop
18
18
  * them. Render constants stay guarded, since a legacy bundle's stored value must keep passing, but are dropped
19
19
  * from the picked result, since nothing renders them.