@chatsystem/client 1.0.10 → 1.0.12

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 CHANGED
@@ -1,7 +1,24 @@
1
- ### Env
1
+ # Use the client
2
2
 
3
- - Needed env variables are defined in `src/config/env.ts`
3
+ ## Use it as a react package
4
4
 
5
- ### Bug pour plus tard
5
+ - ```js
6
+ import { App } from "@chatsystem/client";
7
+ <App appToken="YOUR_TOKEN_ID" displayMode="chatbox" />;
8
+ ```
6
9
 
7
- - Si envie d'utiliser des alias pour les paths, i lfaut les mettre dans `ts-config.json` + `vite.config.ts` mais ça plante dans le build à cause de vite-dts (https://github.com/qmhc/vite-plugin-dts/issues/60) => il y a une config qui doit marcher, à fouiller si envie
10
+ ## Use it as a bundled JS script
11
+
12
+ - ```js
13
+ <script
14
+ type="text/javascript"
15
+ src="https://chatsystem.s3.eu-west-3.amazonaws.com/index.js"
16
+ data-appToken="YOUR_TOKEN_ID"
17
+ data-displayMode="chatbox"
18
+ ></script>
19
+ ```
20
+
21
+ ### Env variable
22
+
23
+ - appToken: your appToken, delivered on chatsystem.ai
24
+ - displayMode?: either `bubble` if you want the bubble to display, or `chatbox` if you want to see directly the chatbox. Css is overridable.
package/dist/index.d.ts CHANGED
@@ -4,9 +4,14 @@ export declare function App({ appToken, displayMode }: AppProps): JSX_2.Element;
4
4
 
5
5
  declare type AppProps = {
6
6
  appToken: string;
7
- displayMode?: DisplayModeTypes;
7
+ displayMode?: DisplayModesTypes;
8
8
  };
9
9
 
10
- declare type DisplayModeTypes = "bubble" | "chatbox";
10
+ declare enum DisplayModeEnum {
11
+ BUBBLE = "bubble",
12
+ CHATBOX = "chatbox"
13
+ }
14
+
15
+ declare type DisplayModesTypes = `${DisplayModeEnum}`;
11
16
 
12
17
  export { }