@dhatvibs/rider-chat-sdk
v1.0.3
Published
Rider help-center chatbot SDK for React Native
Maintainers
Readme
@dhatvibs/rider-chat-sdk
Plug-and-play support chatbot and help center for rider apps built with React Native.
Installation
npm install @dhatvibs/rider-chat-sdk
# peer deps (if not already installed)
npm install axios react-native-svgUsage
import RiderChatSDK from '@dhatvibs/rider-chat-sdk';
<RiderChatSDK
token={token} // Required: JWT from authentication
onClose={() => {}} // Optional: dismiss the SDK (e.g. close a modal)
/>Props
| Prop | Type | Required | Description |
|---|---|---|---|
| token | string | ✅ | JWT token used for authentication (contains userId) |
| onClose | () => void | ❌ | Called when user taps the close button |
Flow
RiderChatSDK
└─ OrderListScreen (Help & Support Center)
├─ Home View (Top 3 Orders, FAQ Categories)
├─ All Orders View
├─ FAQ Category View (List of questions)
├─ FAQ Answer View (Question and answer text)
└─ Tap order → startSession() → ChatScreen
├─ GUIDED mode
├─ FREE_CHAT mode
└─ RESOLVED modeAPI Endpoints Used
| Method | Endpoint |
|---|---|
| GET | /riderchatbot/chat/orders/recent |
| POST | /riderchatbot/chat/start |
| GET | /riderchatbot/faq/categories |
| GET | /riderchatbot/faq/questions/{category} |
| GET | /riderchatbot/faq/answer/{faqId} |
| POST | /riderchatbot/chat/resolve |
| GET | /riderchatbot/chat/history/{orderId} |
| POST | /riderchatbot/chat/message |
Publishing
npm login
npm publish --access public