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.
- package/README.md +17 -180
- package/dist/constants/apiErrorCodes.d.ts +17 -0
- package/dist/constants/apiErrorCodes.js +26 -0
- package/dist/constants/apiErrorCodes.js.map +1 -0
- package/dist/constants/authStorage.d.ts +4 -0
- package/dist/constants/authStorage.js +5 -0
- package/dist/constants/authStorage.js.map +1 -0
- package/dist/functions/im/formatImChatConversationListTime.d.ts +1 -0
- package/dist/functions/im/formatImChatConversationListTime.js +19 -0
- package/dist/functions/im/formatImChatConversationListTime.js.map +1 -0
- package/dist/functions/image/getImageDimensions.js +15 -5
- package/dist/functions/image/getImageDimensions.js.map +1 -1
- package/dist/functions/storage/useDexieShortcuts.d.ts +28 -0
- package/dist/functions/storage/useDexieShortcuts.js +54 -0
- package/dist/functions/storage/useDexieShortcuts.js.map +1 -0
- package/dist/functions/storage/useLocalStorage.js +11 -12
- package/dist/functions/storage/useLocalStorage.js.map +1 -1
- package/dist/functions/storage/useSessionStorage.js +11 -12
- package/dist/functions/storage/useSessionStorage.js.map +1 -1
- package/dist/functions/storage/useStorageWithIndexedDB.js +4 -5
- package/dist/functions/storage/useStorageWithIndexedDB.js.map +1 -1
- package/dist/schemas/auth.schema.d.ts +4 -4
- package/dist/vue-hooks/browser/useBridgeMessage.js +7 -8
- package/dist/vue-hooks/browser/useBridgeMessage.js.map +1 -1
- package/package.json +25 -1
- package/types/address.d.ts +38 -0
- package/types/im-api.d.ts +118 -0
- package/types/im-chat.d.ts +49 -0
- package/types/notification.d.ts +37 -0
- package/types/oss.d.ts +26 -0
- package/types/page-config.d.ts +14 -0
- package/types/payment.d.ts +21 -0
- package/types/performance.d.ts +12 -0
- package/types/rbac.d.ts +24 -0
- package/types/report.d.ts +29 -0
- package/types/review.d.ts +13 -0
package/types/rbac.d.ts
ADDED
|
@@ -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
|
+
}
|