@ensembleapp/client-sdk 0.0.34 → 0.0.35
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/index.d.ts +10 -4
- package/dist/index.js +1 -13
- package/dist/index.js.map +1 -1
- package/dist/widget/widget.global.js +1 -1
- package/dist/widget/widget.global.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -232,10 +232,10 @@ interface UIWidgetDefinition<TSchema extends FlexibleSchema = FlexibleSchema, TE
|
|
|
232
232
|
render(payload: InferSchema<TSchema>, enriched: TEnriched): unknown;
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
|
-
* Helper to create customer widgets
|
|
235
|
+
* Helper to create customer widgets.
|
|
236
236
|
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
237
|
+
* Note: Uses loose typing for schema to avoid "Type instantiation is excessively deep"
|
|
238
|
+
* errors with complex Zod schemas. Schema is validated at runtime, not compile time.
|
|
239
239
|
*
|
|
240
240
|
* @example
|
|
241
241
|
* ```typescript
|
|
@@ -254,7 +254,13 @@ interface UIWidgetDefinition<TSchema extends FlexibleSchema = FlexibleSchema, TE
|
|
|
254
254
|
* });
|
|
255
255
|
* ```
|
|
256
256
|
*/
|
|
257
|
-
declare const createWidget: <
|
|
257
|
+
declare const createWidget: <TEnriched extends EnrichedResults = EnrichedResults>(widget: {
|
|
258
|
+
widgetType: string;
|
|
259
|
+
schema: any;
|
|
260
|
+
enrich?: WidgetEnrichConfig;
|
|
261
|
+
reactDOM: CustomerReactDOM;
|
|
262
|
+
render(payload: any, enriched: TEnriched): unknown;
|
|
263
|
+
}) => UIWidgetDefinition<FlexibleSchema, TEnriched>;
|
|
258
264
|
|
|
259
265
|
type DisplayMode = 'full' | 'brief';
|
|
260
266
|
|
package/dist/index.js
CHANGED
|
@@ -25753,19 +25753,7 @@ function createSDKWidget(widget) {
|
|
|
25753
25753
|
[SDK_WIDGET_MARKER]: true
|
|
25754
25754
|
};
|
|
25755
25755
|
}
|
|
25756
|
-
var createWidget = (
|
|
25757
|
-
widgetType,
|
|
25758
|
-
schema,
|
|
25759
|
-
enrich,
|
|
25760
|
-
reactDOM,
|
|
25761
|
-
render
|
|
25762
|
-
}) => ({
|
|
25763
|
-
widgetType,
|
|
25764
|
-
schema,
|
|
25765
|
-
enrich,
|
|
25766
|
-
reactDOM,
|
|
25767
|
-
render
|
|
25768
|
-
});
|
|
25756
|
+
var createWidget = (widget) => widget;
|
|
25769
25757
|
|
|
25770
25758
|
// lib/chat/components/WidgetRenderer.tsx
|
|
25771
25759
|
import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|