bibot 1.0.58 → 1.0.60
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/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)
|