zcw-shared 2.1.0 → 2.4.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.
Files changed (36) hide show
  1. package/README.md +17 -180
  2. package/dist/constants/apiErrorCodes.d.ts +17 -0
  3. package/dist/constants/apiErrorCodes.js +26 -0
  4. package/dist/constants/apiErrorCodes.js.map +1 -0
  5. package/dist/constants/authStorage.d.ts +4 -0
  6. package/dist/constants/authStorage.js +5 -0
  7. package/dist/constants/authStorage.js.map +1 -0
  8. package/dist/functions/im/formatImChatConversationListTime.d.ts +1 -0
  9. package/dist/functions/im/formatImChatConversationListTime.js +19 -0
  10. package/dist/functions/im/formatImChatConversationListTime.js.map +1 -0
  11. package/dist/functions/image/getImageDimensions.js +15 -5
  12. package/dist/functions/image/getImageDimensions.js.map +1 -1
  13. package/dist/functions/storage/useDexieShortcuts.d.ts +28 -0
  14. package/dist/functions/storage/useDexieShortcuts.js +54 -0
  15. package/dist/functions/storage/useDexieShortcuts.js.map +1 -0
  16. package/dist/functions/storage/useLocalStorage.js +11 -12
  17. package/dist/functions/storage/useLocalStorage.js.map +1 -1
  18. package/dist/functions/storage/useSessionStorage.js +11 -12
  19. package/dist/functions/storage/useSessionStorage.js.map +1 -1
  20. package/dist/functions/storage/useStorageWithIndexedDB.js +4 -5
  21. package/dist/functions/storage/useStorageWithIndexedDB.js.map +1 -1
  22. package/dist/schemas/auth.schema.d.ts +4 -4
  23. package/dist/vue-hooks/browser/useBridgeMessage.js +7 -8
  24. package/dist/vue-hooks/browser/useBridgeMessage.js.map +1 -1
  25. package/package.json +25 -1
  26. package/types/address.d.ts +38 -0
  27. package/types/im-api.d.ts +118 -0
  28. package/types/im-chat.d.ts +49 -0
  29. package/types/notification.d.ts +37 -0
  30. package/types/oss.d.ts +26 -0
  31. package/types/page-config.d.ts +14 -0
  32. package/types/payment.d.ts +21 -0
  33. package/types/performance.d.ts +12 -0
  34. package/types/rbac.d.ts +24 -0
  35. package/types/report.d.ts +29 -0
  36. package/types/review.d.ts +13 -0
@@ -0,0 +1,12 @@
1
+ export interface PerformanceMetric {
2
+ type?: string
3
+ value?: number
4
+ timestamp?: number
5
+ [key: string]: unknown
6
+ }
7
+
8
+ export interface PerformanceMetricsResponse {
9
+ data?: PerformanceMetric[]
10
+ /** 或直接返回数组 */
11
+ [key: string]: unknown
12
+ }
@@ -0,0 +1,24 @@
1
+ export interface Role {
2
+ id: string
3
+ name: string
4
+ code: string
5
+ permissionCount: number
6
+ createdAt: string
7
+ }
8
+
9
+ export interface Permission {
10
+ id: string
11
+ code: string
12
+ name: string
13
+ module: string
14
+ description?: string
15
+ }
16
+
17
+ export interface AssignUserRolesPayload {
18
+ roleIds: string[]
19
+ }
20
+
21
+ export interface AssignRolePermissionsPayload {
22
+ permissionIds: string[]
23
+ }
24
+
@@ -0,0 +1,29 @@
1
+ /** 举报状态(与 api.zengchaowu.com 一致) */
2
+ export type ReportStatus = 'pending' | 'processing' | 'resolved' | 'rejected'
3
+
4
+ /** 举报目标类型 */
5
+ export type ReportTargetType = 'post' | 'comment' | 'product' | 'user'
6
+
7
+ export interface Report {
8
+ id: number
9
+ reporter_id?: string
10
+ target_type?: ReportTargetType
11
+ target_id?: string | number
12
+ reason?: string
13
+ description?: string
14
+ status?: ReportStatus
15
+ created_at?: string
16
+ updated_at?: string
17
+ }
18
+
19
+ export interface ReportListResponse {
20
+ data: Report[]
21
+ total: number
22
+ limit?: number
23
+ offset?: number
24
+ }
25
+
26
+ export interface ProcessReportPayload {
27
+ status: ReportStatus
28
+ remark?: string
29
+ }
@@ -0,0 +1,13 @@
1
+ export interface Review {
2
+ id: number
3
+ product_id?: number
4
+ user_id?: string
5
+ rating?: number
6
+ content?: string
7
+ created_at?: string
8
+ updated_at?: string
9
+ }
10
+
11
+ export interface ReviewListResponse {
12
+ data: Review[]
13
+ }