bibot 1.0.58 → 1.0.61
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 +77 -3
- package/dist/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +6 -8
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
|
|
1
2
|
# bibot
|
|
2
3
|
|
|
3
|
-
>
|
|
4
|
+
> CloudSec LLC BiBot plugin for easy integration into your application
|
|
4
5
|
|
|
5
6
|
[](https://www.npmjs.com/package/bibot) [](https://standardjs.com)
|
|
6
7
|
|
|
@@ -10,7 +11,17 @@
|
|
|
10
11
|
npm install --save bibot
|
|
11
12
|
```
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
### `BiBot` Component Props
|
|
15
|
+
|
|
16
|
+
- **`clientId`** (string): **Required**. Your client ID for using the BiBot services.
|
|
17
|
+
- **`client_session_id`** (string): Optional. An optional session ID for tracking client sessions. This is provided if you do not provide.
|
|
18
|
+
- **`redirect_notice`** (boolean): Optional. If set to `true`, the bot will handle redirect notices to 3rd party integration if you have any such as slack.
|
|
19
|
+
- **`test`** (boolean): Optional. If set to `true`, the bot will use the test endpoint for making requests. Useful for initial testing.
|
|
20
|
+
- **`internalUserOnly`** (object): **Required**. Contains information for internal user access.
|
|
21
|
+
- **`internalUseOnly`** (boolean): **Required**. Indicates if the bot is for internal use only.
|
|
22
|
+
- **`jwt`** (string): **Required if `internalUseOnly` is `true`**. The JSON Web Token for authorizing internal users. This must include sub, username, given_name and family_name.
|
|
23
|
+
|
|
24
|
+
### Example with All Props
|
|
14
25
|
|
|
15
26
|
```tsx
|
|
16
27
|
import { BiBot } from 'bibot'
|
|
@@ -18,7 +29,13 @@ import { BiBot } from 'bibot'
|
|
|
18
29
|
function App() {
|
|
19
30
|
return (
|
|
20
31
|
<div className="App">
|
|
21
|
-
<BiBot
|
|
32
|
+
<BiBot
|
|
33
|
+
clientId='YOUR CLIENT ID HERE'
|
|
34
|
+
client_session_id='YOUR SESSION ID HERE'
|
|
35
|
+
redirect_notice={true}
|
|
36
|
+
test={false}
|
|
37
|
+
internalUserOnly={{ internalUseOnly: true, jwt: 'YOUR JWT HERE' }}
|
|
38
|
+
/>
|
|
22
39
|
</div>
|
|
23
40
|
);
|
|
24
41
|
}
|
|
@@ -26,6 +43,63 @@ function App() {
|
|
|
26
43
|
export default App;
|
|
27
44
|
```
|
|
28
45
|
|
|
46
|
+
### Error Handling
|
|
47
|
+
|
|
48
|
+
If `internalUseOnly` is set to `true` but `jwt` is not provided, the component will throw an error:
|
|
49
|
+
```
|
|
50
|
+
Error: Internal use only requires jwt. Please refer to documentation on https://www.npmjs.com/package/bibot
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Reporting Bugs
|
|
54
|
+
|
|
55
|
+
If you encounter any bugs or issues, please follow these steps to report them:
|
|
56
|
+
|
|
57
|
+
1. **Search for existing issues**: Before creating a new issue, please check the [Issues](https://github.com/chrisdjin/bibot_plugin/issues) page to see if the problem has already been reported.
|
|
58
|
+
|
|
59
|
+
2. **Create a new issue**: If your issue hasn't been reported yet, create a new issue with the following details:
|
|
60
|
+
- A clear and descriptive title.
|
|
61
|
+
- A detailed description of the problem, including steps to reproduce it.
|
|
62
|
+
- Any relevant screenshots or code snippets.
|
|
63
|
+
- Information about your environment (e.g., operating system, browser, Node.js version).
|
|
64
|
+
|
|
65
|
+
3. **Provide additional context**: If possible, provide additional context that might help us understand the issue, such as error messages or logs.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## Contributing
|
|
70
|
+
|
|
71
|
+
We welcome contributions from the community! To contribute, please follow these steps:
|
|
72
|
+
|
|
73
|
+
1. **Fork the repository**: Fork the [bibot repository](https://github.com/chrisdjin/bibot_plugin.git) to your GitHub account.
|
|
74
|
+
|
|
75
|
+
2. **Clone the repository**: Clone the forked repository to your local machine.
|
|
76
|
+
```bash
|
|
77
|
+
git clone https://github.com/chrisdjin/bibot_plugin.git
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
3. **Create a new branch**: Create a new branch for your feature or bug fix.
|
|
81
|
+
```bash
|
|
82
|
+
git checkout -b feature-or-bugfix-name
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
4. **Make your changes**: Make your changes to the codebase.
|
|
86
|
+
|
|
87
|
+
5. **Commit your changes**: Commit your changes with a clear and descriptive commit message.
|
|
88
|
+
```bash
|
|
89
|
+
git commit -m "Description of the feature or bug fix"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
6. **Push your changes**: Push your changes to your forked repository.
|
|
93
|
+
```bash
|
|
94
|
+
git push origin feature-or-bugfix-name
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
7. **Create a pull request**: Go to the original repository and create a pull request with a clear and detailed description of your changes.
|
|
98
|
+
|
|
99
|
+
8. **Review process**: Your pull request will be reviewed by the maintainers. Please address any feedback or changes requested during the review process.
|
|
100
|
+
|
|
101
|
+
Thank you for your contributions!
|
|
102
|
+
|
|
29
103
|
## License
|
|
30
104
|
|
|
31
105
|
ISC © [chrisdjin](https://github.com/chrisdjin)
|
package/dist/index.js
CHANGED
|
@@ -3830,12 +3830,12 @@ function SendMessageIcon(_ref) {
|
|
|
3830
3830
|
return React__default.createElement("svg", {
|
|
3831
3831
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
3832
3832
|
className: 'icon icon-tabler icon-tabler-send-2',
|
|
3833
|
-
width: '
|
|
3834
|
-
height: '
|
|
3833
|
+
width: '30',
|
|
3834
|
+
height: '30',
|
|
3835
3835
|
viewBox: '0 0 24 24',
|
|
3836
|
-
strokeWidth: '1
|
|
3836
|
+
strokeWidth: '1',
|
|
3837
3837
|
stroke: color,
|
|
3838
|
-
fill: '#
|
|
3838
|
+
fill: '#e8e8e8',
|
|
3839
3839
|
strokeLinecap: 'round',
|
|
3840
3840
|
strokeLinejoin: 'round'
|
|
3841
3841
|
}, React__default.createElement("path", {
|
|
@@ -4219,7 +4219,6 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
|
|
|
4219
4219
|
zIndex: 9999
|
|
4220
4220
|
}
|
|
4221
4221
|
}, chatIsOpen && React.createElement("div", {
|
|
4222
|
-
className: styles['chat-window'],
|
|
4223
4222
|
style: {
|
|
4224
4223
|
backgroundColor: '#fff',
|
|
4225
4224
|
position: 'absolute',
|
|
@@ -4237,14 +4236,13 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
|
|
|
4237
4236
|
className: styles['chat-header'],
|
|
4238
4237
|
style: {
|
|
4239
4238
|
backgroundColor: (_chatBubbleConfig$col = chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color) != null ? _chatBubbleConfig$col : '#dedede',
|
|
4240
|
-
height: 50,
|
|
4241
4239
|
borderTopLeftRadius: 8,
|
|
4242
4240
|
borderTopRightRadius: 8,
|
|
4243
4241
|
display: 'flex',
|
|
4244
4242
|
alignItems: 'center',
|
|
4245
4243
|
justifyContent: 'flex-start',
|
|
4246
4244
|
paddingInline: 15,
|
|
4247
|
-
paddingBlock:
|
|
4245
|
+
paddingBlock: 20
|
|
4248
4246
|
}
|
|
4249
4247
|
}, React.createElement("div", {
|
|
4250
4248
|
style: {
|
|
@@ -4393,7 +4391,7 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
|
|
|
4393
4391
|
return sendInputInquiry();
|
|
4394
4392
|
}
|
|
4395
4393
|
}, React.createElement(SendMessageIcon, {
|
|
4396
|
-
color: '#
|
|
4394
|
+
color: isLoading ? '#cdcdcd' : chatBubbleConfig.color
|
|
4397
4395
|
}))), React.createElement("div", {
|
|
4398
4396
|
style: {
|
|
4399
4397
|
backgroundColor: '#f9f9f9',
|