@marketrix.ai/widget 3.8.464 → 3.8.466
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.
|
@@ -29,7 +29,7 @@ export declare const ApplicationUpdateSchema: z.ZodObject<{
|
|
|
29
29
|
url: z.ZodOptional<z.ZodString>;
|
|
30
30
|
password: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
31
31
|
username: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
32
|
-
allowed_domains: z.ZodOptional<z.
|
|
32
|
+
allowed_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
export type ApplicationUpdateData = z.infer<typeof ApplicationUpdateSchema>;
|
|
35
35
|
export declare const applicationCreate: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -263,7 +263,7 @@ export declare const applicationUpdate: import("@orpc/contract").ContractProcedu
|
|
|
263
263
|
url: z.ZodOptional<z.ZodString>;
|
|
264
264
|
password: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
265
265
|
username: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
266
|
-
allowed_domains: z.ZodOptional<z.
|
|
266
|
+
allowed_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
267
267
|
application_id: z.ZodCoercedNumber<unknown>;
|
|
268
268
|
}, z.core.$strip>, z.ZodObject<{
|
|
269
269
|
id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -517,7 +517,7 @@ export declare const applicationRoutes: {
|
|
|
517
517
|
url: z.ZodOptional<z.ZodString>;
|
|
518
518
|
password: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
519
519
|
username: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
520
|
-
allowed_domains: z.ZodOptional<z.
|
|
520
|
+
allowed_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
521
521
|
application_id: z.ZodCoercedNumber<unknown>;
|
|
522
522
|
}, z.core.$strip>, z.ZodObject<{
|
|
523
523
|
id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -31,6 +31,18 @@ export declare const PaginationSchema: z.ZodObject<{
|
|
|
31
31
|
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
32
32
|
offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
|
+
type StripDefault<T> = T extends z.ZodDefault<infer Inner> ? Inner : T;
|
|
35
|
+
/**
|
|
36
|
+
* The ONE way to build a PATCH schema from an entity/input schema. Zod's `.partial()` makes every
|
|
37
|
+
* field optional but does NOT stop a `.default(...)` field from being backfilled when omitted — an
|
|
38
|
+
* update caller who sends only `{ title }` gets `options: []`/`config: {}` re-applied by parsing, so a
|
|
39
|
+
* `field !== undefined` merge guard downstream never sees the omission and silently wipes the column.
|
|
40
|
+
* This strips each field's default before making it optional, so "not sent" really does parse to
|
|
41
|
+
* `undefined`.
|
|
42
|
+
*/
|
|
43
|
+
export declare function partialPatch<Shape extends z.ZodRawShape>(schema: z.ZodObject<Shape>): z.ZodObject<{
|
|
44
|
+
[K in keyof Shape]: z.ZodOptional<StripDefault<Shape[K]>>;
|
|
45
|
+
}>;
|
|
34
46
|
export declare const booleanQueryParam: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>, z.ZodTransform<boolean | undefined, string | boolean>>>;
|
|
35
47
|
export declare const paginatedListOf: <T extends z.ZodType>(schema: T) => z.ZodObject<{
|
|
36
48
|
items: z.ZodArray<T>;
|
|
@@ -115,3 +127,10 @@ export declare const GraphSchema: z.ZodObject<{
|
|
|
115
127
|
}, z.core.$loose>>;
|
|
116
128
|
}, z.core.$strip>;
|
|
117
129
|
export type GraphData = z.infer<typeof GraphSchema>;
|
|
130
|
+
export declare const NotificationResolvedReasonSchema: z.ZodEnum<{
|
|
131
|
+
answered: "answered";
|
|
132
|
+
dismissed: "dismissed";
|
|
133
|
+
cancelled: "cancelled";
|
|
134
|
+
}>;
|
|
135
|
+
export type NotificationResolvedReason = z.infer<typeof NotificationResolvedReasonSchema>;
|
|
136
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type WidgetCommand, type WidgetEvent } from '../sdk';
|
|
2
|
-
export type StreamStatus = 'disconnected' | 'connecting' | 'connected' | 'registered' | 'error';
|
|
3
2
|
/** The stream has stopped retrying, so nothing further will arrive for anything still in flight. */
|
|
4
3
|
export declare class StreamGaveUpError extends Error {
|
|
5
4
|
}
|
|
@@ -13,7 +12,7 @@ export declare class StreamClient {
|
|
|
13
12
|
private chatId;
|
|
14
13
|
private status;
|
|
15
14
|
private callbacks;
|
|
16
|
-
private
|
|
15
|
+
private reconnectSuppressed;
|
|
17
16
|
private reconnectAttempts;
|
|
18
17
|
private readonly maxReconnectAttempts;
|
|
19
18
|
private reconnectDelay;
|
|
@@ -27,8 +26,8 @@ export declare class StreamClient {
|
|
|
27
26
|
addCallbacks(callbacks: StreamClientCallbacks): void;
|
|
28
27
|
removeCallbacks(callbacks: StreamClientCallbacks): void;
|
|
29
28
|
isConnected(): boolean;
|
|
30
|
-
/** Whether a user-driven retry can achieve anything: there is a chat to rejoin and
|
|
31
|
-
*
|
|
29
|
+
/** Whether a user-driven retry can achieve anything: there is a chat to rejoin and nothing has
|
|
30
|
+
* suppressed reconnection. */
|
|
32
31
|
canReconnect(): boolean;
|
|
33
32
|
/** The user asked to retry. `scheduleReconnect` gives up permanently at `maxReconnectAttempts` and only
|
|
34
33
|
* `registered` resets the counters, so without this reset the widget's Retry button had nothing it
|