@quantabit/ticket-sdk
v1.0.2
Published
QuantaBit Ticket System SDK - User feedback tickets, workflow processing, SLA, and FAQ self-service
Downloads
452
Maintainers
Readme
@quantabit/ticket-sdk
QuantaBit Support/Ticket System SDK - User feedback tickets, FAQ, and SLA management features
📦 Installation
npm install @quantabit/ticket-sdk
# or
yarn add @quantabit/ticket-sdk🚀 Quick Start
1. Setup Provider
import { TicketProvider } from "@quantabit/ticket-sdk";
import "@quantabit/ticket-sdk/styles.css";
function App() {
return (
<TicketProvider
apiUrl="https://api.example.com/v1"
token="your-auth-token"
onSubmit={(ticket) => console.log("Ticket submitted:", ticket)}
>
<YourComponent />
</TicketProvider>
);
}2. Using Components
import { TicketList, TicketForm } from '@quantabit/ticket-sdk';
// Ticket list
<TicketList
onSelect={(ticket) => viewTicketDetail(ticket)}
onCreate={() => setShowForm(true)}
/>
// Create ticket form
<TicketForm
onSuccess={(ticket) => handleSuccess(ticket)}
onCancel={() => setShowForm(false)}
/>3. Using Hooks
import { useTicket } from "@quantabit/ticket-sdk";
function MyComponent() {
const {
tickets, // Ticket list
currentTicket, // Current ticket
messages, // Conversation messages
faqs, // FAQ
createTicket, // Create ticket
replyTicket, // Reply to ticket
loadFaqs, // Load FAQs
} = useTicket();
return <div>...</div>;
}📋 Ticket Types
- ❓ Question - Inquiry
- 🐛 Bug - Bug report
- 💡 Feature - Feature suggestion
- 😤 Complaint - Complaint
- 💰 Refund - Refund request
- 👤 Account - Account issue
📄 License
MIT License
🌐 Brand & Links
- Official Mainnet: QuantaBit Chain
- Developer Platform: Developer Platform
- Open Platform: Open Platform
- Payment Platform: Pay Platform
- Feedback: Feedback
