@quantabit/report-sdk 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 QuantaBit Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,104 @@
1
+ # @quantabit/report-sdk
2
+
3
+ > QuantaBit Report & Review SDK - Content/behavior reporting and review workflow
4
+
5
+ ## 📦 Installation
6
+
7
+ ```bash
8
+ npm install @quantabit/report-sdk
9
+ # or
10
+ yarn add @quantabit/report-sdk
11
+ ```
12
+
13
+ ## 🚀 Quick Start
14
+
15
+ ### 1. Setup Provider
16
+
17
+ ```jsx
18
+ import { ReportProvider } from "@quantabit/report-sdk";
19
+ import "@quantabit/report-sdk/styles.css";
20
+
21
+ function App() {
22
+ return (
23
+ <ReportProvider
24
+ apiUrl="https://api.example.com/v1"
25
+ token="your-auth-token"
26
+ language="en"
27
+ onSubmit={(result) => console.log("Report submitted:", result)}
28
+ >
29
+ <YourComponent />
30
+ </ReportProvider>
31
+ );
32
+ }
33
+ ```
34
+
35
+ ### 2. Using Components
36
+
37
+ ```jsx
38
+ import { ReportButton, ReportForm } from '@quantabit/report-sdk';
39
+
40
+ // Report button (with built-in dialog)
41
+ <ReportButton
42
+ targetType="post"
43
+ targetId="12345"
44
+ onSuccess={(result) => console.log('Report submitted')}
45
+ />
46
+
47
+ // Report form (standalone)
48
+ <ReportForm
49
+ targetType="comment"
50
+ targetId="67890"
51
+ onSuccess={(result) => handleSuccess(result)}
52
+ onCancel={() => setShowForm(false)}
53
+ />
54
+ ```
55
+
56
+ ### 3. Using Hooks
57
+
58
+ ```jsx
59
+ import { useReport } from "@quantabit/report-sdk";
60
+
61
+ function MyComponent() {
62
+ const {
63
+ myReports, // My reports
64
+ pendingReports, // Pending review (admin side)
65
+ submit, // Submit report
66
+ handleReport, // Process report
67
+ } = useReport();
68
+
69
+ return <div>...</div>;
70
+ }
71
+ ```
72
+
73
+ ## 📖 Report Types
74
+
75
+ ```javascript
76
+ import { ReportType, TargetType } from "@quantabit/report-sdk";
77
+
78
+ // Report types
79
+ ReportType.SPAM; // Spam
80
+ ReportType.FRAUD; // Fraud
81
+ ReportType.HARASSMENT; // Harassment
82
+ ReportType.VIOLENCE; // Violent content
83
+ ReportType.PORN; // Pornographic content
84
+
85
+ // Target types
86
+ TargetType.POST; // Post
87
+ TargetType.COMMENT; // Comment
88
+ TargetType.USER; // User
89
+ ```
90
+
91
+ ## 📄 License
92
+
93
+ MIT License
94
+
95
+
96
+
97
+ ---
98
+
99
+ ## 🌐 Brand & Links
100
+ - Official Mainnet: [QuantaBit Chain](https://qbitchain.io/)
101
+ - Developer Platform: [Developer Platform](https://developer.quantabit.io/)
102
+ - Open Platform: [Open Platform](https://open.quantabit.io/)
103
+ - Payment Platform: [Pay Platform](https://pay.qbitwallet.io/)
104
+ - Feedback: [Feedback](https://xwin.live/qbit)