@pixygon/chatbot-react 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +11 -12
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,13 +1,12 @@
1
1
  import * as react from 'react';
2
- import { Api } from '@reduxjs/toolkit/query';
3
2
 
4
- /** RTK Query Api generics are invariant a host's concrete baseApi
5
- * (with literal `reducerPath` and specific tag types) cannot fit into a
6
- * narrower-looking `Api<BFn, {}, string, string>`. We therefore accept
7
- * any concrete Api shape and rely on injectChatbotEndpoints to do the
8
- * runtime work. The host's hooks (returned by createChatbotComponents)
9
- * remain fully typed inside the package; the host doesn't need a cast. */
10
- type AnyApi$1 = Api<any, any, any, any>;
3
+ /** RTK Query's `Api<...>` type carries `unique symbol` brand fields that
4
+ * make even `Api<any, any, any, any>` reject concrete host APIs. We accept
5
+ * `any` for `apiSlice` on the public surface and rely on the runtime
6
+ * injection inside `injectChatbotEndpoints` to do the wiring. The host's
7
+ * hooks (returned by `createChatbotComponents`) stay fully typed inside
8
+ * pages only the input is loose. */
9
+ type AnyApi$1 = any;
11
10
  interface ChatbotBrand {
12
11
  /** Display name shown in the embed header, system prompt, etc. */
13
12
  name: string;
@@ -39,10 +38,10 @@ interface TenantWithCap {
39
38
  chatCostCapUsdMonthly?: number | null;
40
39
  }
41
40
 
42
- /** See `context.ts` — RTK Query's Api generics are invariant, so we accept
43
- * the host's concrete Api shape via `any` parameters. The runtime cast
44
- * inside the function preserves all internal logic. */
45
- type AnyApi = Api<any, any, any, any>;
41
+ /** See `context.ts` — `apiSlice` is `any` on the public surface to dodge
42
+ * RTK Query's `unique symbol` brands. Internal logic still uses the host's
43
+ * baseApi at runtime; only the input type is loose. */
44
+ type AnyApi = any;
46
45
  interface KnowledgeDocument {
47
46
  _id: string;
48
47
  tenantId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixygon/chatbot-react",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "React + MUI pages for the Pixygon chatbot: knowledge base admin, chat, analytics, embeddable widget.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",