zcw-shared 2.26.0 → 2.27.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 (150) hide show
  1. package/dist/constants/agentAvatar3d.d.ts +15 -0
  2. package/dist/constants/agentAvatar3d.js +64 -0
  3. package/dist/constants/agentAvatar3d.js.map +1 -0
  4. package/dist/constants/agentAvatar3dModular.d.ts +34 -0
  5. package/dist/constants/agentAvatar3dModular.js +93 -0
  6. package/dist/constants/agentAvatar3dModular.js.map +1 -0
  7. package/dist/constants/agentPresence3dLabels.d.ts +11 -0
  8. package/dist/constants/agentPresence3dLabels.js +12 -0
  9. package/dist/constants/agentPresence3dLabels.js.map +1 -0
  10. package/dist/constants/aiApiRoutes.d.ts +8 -0
  11. package/dist/constants/aiApiRoutes.js +23 -0
  12. package/dist/constants/aiApiRoutes.js.map +1 -0
  13. package/dist/functions/ai/agentAvatar3dArkitMorph.d.ts +14 -0
  14. package/dist/functions/ai/agentAvatar3dArkitMorph.js +149 -0
  15. package/dist/functions/ai/agentAvatar3dArkitMorph.js.map +1 -0
  16. package/dist/functions/ai/agentAvatar3dCapabilities.d.ts +44 -0
  17. package/dist/functions/ai/agentAvatar3dCapabilities.js +121 -0
  18. package/dist/functions/ai/agentAvatar3dCapabilities.js.map +1 -0
  19. package/dist/functions/ai/agentAvatar3dFacePresets.d.ts +13 -0
  20. package/dist/functions/ai/agentAvatar3dFacePresets.js +79 -0
  21. package/dist/functions/ai/agentAvatar3dFacePresets.js.map +1 -0
  22. package/dist/functions/ai/agentAvatar3dMaterialTint.d.ts +7 -0
  23. package/dist/functions/ai/agentAvatar3dMaterialTint.js +45 -0
  24. package/dist/functions/ai/agentAvatar3dMaterialTint.js.map +1 -0
  25. package/dist/functions/ai/agentAvatar3dMorphCatalog.d.ts +18 -0
  26. package/dist/functions/ai/agentAvatar3dMorphCatalog.js +222 -0
  27. package/dist/functions/ai/agentAvatar3dMorphCatalog.js.map +1 -0
  28. package/dist/functions/ai/applyAiAgentAvatar3dFace.d.ts +23 -0
  29. package/dist/functions/ai/applyAiAgentAvatar3dFace.js +140 -0
  30. package/dist/functions/ai/applyAiAgentAvatar3dFace.js.map +1 -0
  31. package/dist/functions/ai/getEffectiveAvatar3dMorphWeights.d.ts +3 -0
  32. package/dist/functions/ai/getEffectiveAvatar3dMorphWeights.js +28 -0
  33. package/dist/functions/ai/getEffectiveAvatar3dMorphWeights.js.map +1 -0
  34. package/dist/functions/ai/normalizeAiAgentAvatar3d.d.ts +4 -0
  35. package/dist/functions/ai/normalizeAiAgentAvatar3d.js +57 -0
  36. package/dist/functions/ai/normalizeAiAgentAvatar3d.js.map +1 -0
  37. package/dist/functions/ai/normalizeAiAgentAvatar3dFace.d.ts +4 -0
  38. package/dist/functions/ai/normalizeAiAgentAvatar3dFace.js +84 -0
  39. package/dist/functions/ai/normalizeAiAgentAvatar3dFace.js.map +1 -0
  40. package/dist/functions/ai/normalizeAiAgentAvatar3dModular.d.ts +14 -0
  41. package/dist/functions/ai/normalizeAiAgentAvatar3dModular.js +92 -0
  42. package/dist/functions/ai/normalizeAiAgentAvatar3dModular.js.map +1 -0
  43. package/dist/functions/ai/proceduralHumanoidMorph.d.ts +5 -0
  44. package/dist/functions/ai/proceduralHumanoidMorph.js +9 -0
  45. package/dist/functions/ai/proceduralHumanoidMorph.js.map +1 -0
  46. package/dist/functions/ai/randomizeAgentAvatar3dAppearance.d.ts +9 -0
  47. package/dist/functions/ai/randomizeAgentAvatar3dAppearance.js +108 -0
  48. package/dist/functions/ai/randomizeAgentAvatar3dAppearance.js.map +1 -0
  49. package/dist/functions/ai/randomizeModularAvatar3dAppearance.d.ts +7 -0
  50. package/dist/functions/ai/randomizeModularAvatar3dAppearance.js +60 -0
  51. package/dist/functions/ai/randomizeModularAvatar3dAppearance.js.map +1 -0
  52. package/dist/functions/ai/resolveAvatar3dModular.d.ts +4 -0
  53. package/dist/functions/ai/resolveAvatar3dModular.js +22 -0
  54. package/dist/functions/ai/resolveAvatar3dModular.js.map +1 -0
  55. package/dist/functions/api/createApiClient.d.ts +1 -6
  56. package/dist/functions/api/createApiClient.js +1 -55
  57. package/dist/functions/api/createApiClient.js.map +1 -1
  58. package/dist/functions/api/createPublicAuthRequest.js +3 -1
  59. package/dist/functions/api/createPublicAuthRequest.js.map +1 -1
  60. package/dist/functions/browser/readBrowserHost.d.ts +3 -0
  61. package/dist/functions/browser/readBrowserHost.js +42 -5
  62. package/dist/functions/browser/readBrowserHost.js.map +1 -1
  63. package/dist/functions/browser/readBrowserImageCompressDeps.js +11 -5
  64. package/dist/functions/browser/readBrowserImageCompressDeps.js.map +1 -1
  65. package/dist/functions/browser/readBrowserLassoSelectionEnvironment.js +3 -3
  66. package/dist/functions/browser/readBrowserLassoSelectionEnvironment.js.map +1 -1
  67. package/dist/functions/browser/readBrowserVueHookDeps.js +22 -4
  68. package/dist/functions/browser/readBrowserVueHookDeps.js.map +1 -1
  69. package/dist/functions/chat/chatMorePageConfig.js +8 -0
  70. package/dist/functions/chat/chatMorePageConfig.js.map +1 -1
  71. package/dist/functions/chat/chatShellTabConfig.d.ts +4 -1
  72. package/dist/functions/chat/chatShellTabConfig.js +14 -2
  73. package/dist/functions/chat/chatShellTabConfig.js.map +1 -1
  74. package/dist/functions/chat/createBrowserChatRootFontSizeAccess.js +1 -2
  75. package/dist/functions/chat/createBrowserChatRootFontSizeAccess.js.map +1 -1
  76. package/dist/functions/cloudDisk/buildCloudDiskListTabResult.d.ts +2 -2
  77. package/dist/functions/cloudDisk/extractCloudDiskPrivateFolderData.d.ts +3 -3
  78. package/dist/functions/cloudDisk/extractCloudDiskPrivateFolderData.js.map +1 -1
  79. package/dist/functions/cloudDisk/mapCloudDiskFileToNode.d.ts +2 -2
  80. package/dist/functions/cloudDisk/mapCloudDiskFileToNode.js.map +1 -1
  81. package/dist/functions/cloudDisk/sortCloudDiskNodes.js +4 -4
  82. package/dist/functions/cloudDisk/sortCloudDiskNodes.js.map +1 -1
  83. package/dist/functions/dom/readBrowserDomDeps.js +9 -7
  84. package/dist/functions/dom/readBrowserDomDeps.js.map +1 -1
  85. package/dist/functions/im/forwardBundleItemToChatMessage.js +9 -7
  86. package/dist/functions/im/forwardBundleItemToChatMessage.js.map +1 -1
  87. package/dist/functions/im/imChatMessageCopyPlain.js +2 -2
  88. package/dist/functions/im/imChatMessageCopyPlain.js.map +1 -1
  89. package/dist/functions/im/imForwardBundleTitle.js +2 -2
  90. package/dist/functions/im/imForwardBundleTitle.js.map +1 -1
  91. package/dist/functions/im/imForwardSnapshot.js +2 -2
  92. package/dist/functions/im/imForwardSnapshot.js.map +1 -1
  93. package/dist/functions/im/imMessageNormalize.d.ts +2 -2
  94. package/dist/functions/im/imPlaceholderSnippet.d.ts +1 -1
  95. package/dist/functions/im/imPlaceholderSnippet.js +1 -1
  96. package/dist/functions/im/imPlaceholderSnippet.js.map +1 -1
  97. package/dist/functions/qiankun/bootstrapQiankunDomPatch.d.ts +1 -0
  98. package/dist/functions/qiankun/bootstrapQiankunDomPatch.js +165 -0
  99. package/dist/functions/qiankun/bootstrapQiankunDomPatch.js.map +1 -0
  100. package/dist/functions/qiankun/createQiankunVueApp.d.ts +2 -0
  101. package/dist/functions/qiankun/createQiankunVueApp.js +4 -1
  102. package/dist/functions/qiankun/createQiankunVueApp.js.map +1 -1
  103. package/dist/functions/vue-router/normalizeWebHistoryBase.d.ts +1 -0
  104. package/dist/functions/vue-router/normalizeWebHistoryBase.js +19 -0
  105. package/dist/functions/vue-router/normalizeWebHistoryBase.js.map +1 -0
  106. package/dist/functions/vue-router/pushInAppRoute.d.ts +6 -0
  107. package/dist/functions/vue-router/pushInAppRoute.js +13 -0
  108. package/dist/functions/vue-router/pushInAppRoute.js.map +1 -0
  109. package/dist/permissions/catalog.d.ts +2 -0
  110. package/dist/permissions/catalog.js +11 -0
  111. package/dist/permissions/catalog.js.map +1 -1
  112. package/dist/schemas/auth.schema.d.ts +11 -358
  113. package/dist/schemas/auth.schema.js +5 -35
  114. package/dist/schemas/auth.schema.js.map +1 -1
  115. package/dist/schemas/video.schema.d.ts +98 -156
  116. package/dist/schemas/video.schema.js +9 -13
  117. package/dist/schemas/video.schema.js.map +1 -1
  118. package/dist/vue-hooks/dom/useLassoSelection.js +4 -3
  119. package/dist/vue-hooks/dom/useLassoSelection.js.map +1 -1
  120. package/package.json +29 -3
  121. package/types/address.d.ts +4 -35
  122. package/types/ai-admin.d.ts +33 -0
  123. package/types/ai-agent.d.ts +43 -0
  124. package/types/ai-chat.d.ts +39 -23
  125. package/types/api-contract-helpers.d.ts +24 -0
  126. package/types/api-contract.d.ts +6 -0
  127. package/types/auth.d.ts +15 -27
  128. package/types/cloud-disk.d.ts +38 -50
  129. package/types/community.d.ts +7 -0
  130. package/types/im-ai-agent.d.ts +1 -1
  131. package/types/im-api.d.ts +12 -8
  132. package/types/im-call.d.ts +4 -3
  133. package/types/lowcode.d.ts +10 -47
  134. package/types/music.d.ts +4 -30
  135. package/types/notification.d.ts +4 -34
  136. package/types/openapi.d.ts +25040 -0
  137. package/types/order.d.ts +5 -57
  138. package/types/org.d.ts +13 -0
  139. package/types/oss.d.ts +4 -23
  140. package/types/page-config.d.ts +14 -14
  141. package/types/payment.d.ts +10 -20
  142. package/types/performance.d.ts +4 -11
  143. package/types/product.d.ts +5 -37
  144. package/types/rbac.d.ts +11 -32
  145. package/types/recharge.d.ts +11 -0
  146. package/types/report.d.ts +7 -25
  147. package/types/review.d.ts +11 -13
  148. package/types/sticker-pack.d.ts +10 -25
  149. package/types/user.d.ts +11 -33
  150. package/types/video.d.ts +15 -66
package/types/order.d.ts CHANGED
@@ -1,61 +1,9 @@
1
- export enum OrderStatus {
2
- PENDING = 'pending',
3
- PAID = 'paid',
4
- SHIPPED = 'shipped',
5
- DELIVERED = 'delivered',
6
- COMPLETED = 'completed',
7
- CANCELLED = 'cancelled',
8
- REFUNDED = 'refunded',
9
- }
1
+ import type { ApiSchema } from './api-contract'
10
2
 
11
- export interface OrderItem {
12
- id: number
13
- order_id: number
14
- product_id: number
15
- sku_id?: number
16
- quantity: number
17
- subtotal: number
18
- product_name?: string
19
- product_image?: string
20
- }
3
+ export type OrderStatus = ApiSchema['OrderSummary']['status']
21
4
 
22
- export interface Order {
23
- id: number
24
- user_id: string
25
- order_no: string
26
- status: OrderStatus
27
- total_amount: number
28
- address_id?: number
29
- remark?: string
30
- tracking_number?: string
31
- created_at?: string
32
- updated_at?: string
33
- items?: OrderItem[]
34
- }
5
+ export type Order = ApiSchema['OrderSummary']
35
6
 
36
- export interface OrderListResponse {
37
- data: Order[]
38
- pagination: {
39
- total: number
40
- page: number
41
- page_size: number
42
- total_pages: number
43
- }
44
- }
7
+ export type CreateOrderPayload = ApiSchema['CreateOrderRequest']
45
8
 
46
- export interface CreateOrderPayload {
47
- remark?: string
48
- address_id?: number
49
- items?: Array<{
50
- product_id: number
51
- quantity: number
52
- sku_id?: number
53
- }>
54
- status?: OrderStatus
55
- }
56
-
57
- export interface UpdateOrderPayload {
58
- status?: OrderStatus
59
- tracking_number?: string
60
- remark?: string
61
- }
9
+ export type UpdateOrderPayload = ApiSchema['UpdateOrderRequest']
package/types/org.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ import type { ApiSchema } from './api-contract'
2
+
3
+ export type OrgTeam = ApiSchema['OrgTeam']
4
+
5
+ export type OrgTeamNode = ApiSchema['OrgTeamNode']
6
+
7
+ export type OrgTeamMember = ApiSchema['OrgTeamMember']
8
+
9
+ export type CreateOrgTeamPayload = ApiSchema['CreateTeamRequest']
10
+
11
+ export type UpdateOrgTeamPayload = ApiSchema['UpdateTeamRequest']
12
+
13
+ export type AddOrgTeamMemberPayload = ApiSchema['AddTeamMemberRequest']
package/types/oss.d.ts CHANGED
@@ -1,26 +1,7 @@
1
- /** api.zengchaowu.com OSS listFiles 返回结构一致 */
2
- export interface OssFile {
3
- id?: string
4
- name: string
5
- updated_at?: string
6
- created_at?: string
7
- last_accessed_at?: string
8
- metadata?: Record<string, unknown>
9
- }
1
+ import type { ApiOpQuery, ApiSchema } from './api-contract'
10
2
 
11
- export interface OssListParams {
12
- bucket: string
13
- path?: string
14
- limit?: number
15
- offset?: number
16
- }
3
+ export type OssFile = ApiSchema['OssFileInfo']
17
4
 
18
- export interface OssListResponse {
19
- data: OssFile[]
20
- count: number
21
- }
5
+ export type OssListParams = ApiOpQuery<'Oss_listFiles'>
22
6
 
23
- export interface OssDeleteFilesPayload {
24
- bucket: string
25
- paths: string[]
26
- }
7
+ export type OssDeleteFilesPayload = ApiSchema['OssDeleteFilesRequest']
@@ -1,14 +1,14 @@
1
- /** api.zengchaowu.com GET /page-config 返回的 data 结构一致 */
2
- export interface PageConfig {
3
- appKey?: string
4
- version?: string
5
- tabBar?: unknown
6
- permissions?: unknown
7
- displays?: unknown
8
- [key: string]: unknown
9
- }
10
-
11
- export interface PageConfigResponse {
12
- code?: number
13
- data?: PageConfig
14
- }
1
+ import type { ApiSchema } from './api-contract'
2
+
3
+ /** 管理端整包页面配置(与 `AppConfig` 同构) */
4
+ export type PageConfig = ApiSchema['AppConfig']
5
+
6
+ export type UpsertPageConfigPayload = ApiSchema['UpsertAppConfigRequest']
7
+
8
+ export type TabBarConfig = ApiSchema['TabBarConfig']
9
+
10
+ export type PagePermission = ApiSchema['PagePermission']
11
+
12
+ export type PageDisplayConfig = ApiSchema['PageDisplayConfig']
13
+
14
+ export type DialogConfig = ApiSchema['DialogConfig']
@@ -1,21 +1,11 @@
1
- export interface Payment {
2
- id: number
3
- user_id?: string
4
- order_id?: number
5
- amount?: number
6
- status?: string
7
- payment_method?: string
8
- transaction_id?: string
9
- created_at?: string
10
- updated_at?: string
11
- }
1
+ import type { ApiSchema } from './api-contract'
12
2
 
13
- export interface PaymentListResponse {
14
- data: Payment[]
15
- pagination: {
16
- total: number
17
- page: number
18
- page_size: number
19
- total_pages: number
20
- }
21
- }
3
+ export type Payment = ApiSchema['PaymentSummary']
4
+
5
+ export type PaymentStatus = Payment['status']
6
+
7
+ export type PaymentMethod = NonNullable<Payment['payment_method']>
8
+
9
+ export type CreatePaymentPayload = ApiSchema['CreatePaymentRequest']
10
+
11
+ export type UpdatePaymentPayload = ApiSchema['UpdatePaymentRequest']
@@ -1,12 +1,5 @@
1
- export interface PerformanceMetric {
2
- type?: string
3
- value?: number
4
- timestamp?: number
5
- [key: string]: unknown
6
- }
1
+ import type { ApiSchema } from './api-contract'
7
2
 
8
- export interface PerformanceMetricsResponse {
9
- data?: PerformanceMetric[]
10
- /** 或直接返回数组 */
11
- [key: string]: unknown
12
- }
3
+ export type PerformanceMetric = ApiSchema['PerformanceMetric']
4
+
5
+ export type PerformanceStatsResponse = ApiSchema['PerformanceStatsResponse']
@@ -1,41 +1,9 @@
1
- export enum ProductStatus {
2
- DRAFT = 'draft',
3
- ACTIVE = 'active',
4
- INACTIVE = 'inactive',
5
- DELETED = 'deleted',
6
- }
1
+ import type { ApiSchema } from './api-contract'
7
2
 
8
- export interface Product {
9
- id: number
10
- name: string
11
- description?: string
12
- detail?: string
13
- price: number
14
- original_price?: number
15
- images?: string[]
16
- main_image?: string
17
- category_id?: number
18
- tags?: string[]
19
- stock?: number
20
- status?: ProductStatus
21
- sort_order?: number
22
- sales_count?: number
23
- created_at?: string
24
- updated_at?: string
25
- }
3
+ export type ProductStatus = ApiSchema['ProductSummary']['status']
26
4
 
27
- export interface ProductListResponse {
28
- data: Product[]
29
- pagination: {
30
- total: number
31
- page: number
32
- page_size: number
33
- total_pages: number
34
- }
35
- }
5
+ export type Product = ApiSchema['ProductSummary']
36
6
 
37
- export interface CreateProductPayload
38
- extends Omit<Product, 'id' | 'created_at' | 'updated_at'> {}
7
+ export type CreateProductPayload = ApiSchema['CreateProductRequest']
39
8
 
40
- export interface UpdateProductPayload
41
- extends Partial<Omit<Product, 'id' | 'created_at' | 'updated_at'>> {}
9
+ export type UpdateProductPayload = ApiSchema['UpdateProductRequest']
package/types/rbac.d.ts CHANGED
@@ -1,36 +1,15 @@
1
- export interface Role {
2
- id: string
3
- name: string
4
- code: string
5
- permissionCount: number
6
- createdAt: string
7
- }
1
+ import type { ApiSchema } from './api-contract'
8
2
 
9
- /** 权限目录项(来自 API 代码注册表,无 DB id) */
10
- export interface PermissionCatalogItem {
11
- code: string
12
- name: string
13
- module: string
14
- groupKey: string
15
- groupLabel: string
16
- description?: string
17
- }
3
+ export type Role = ApiSchema['RoleSummary']
18
4
 
19
- export interface PermissionGroupCatalog {
20
- key: string
21
- label: string
22
- module: string
23
- permissions: Array<{
24
- code: string
25
- name: string
26
- description?: string
27
- }>
28
- }
5
+ export type PermissionGroupCatalog = ApiSchema['PermissionGroup']
29
6
 
30
- export interface AssignUserRolesPayload {
31
- roleIds: string[]
32
- }
7
+ export type PermissionCatalogItem = ApiSchema['PermissionCatalogItem']
33
8
 
34
- export interface AssignRolePermissionsPayload {
35
- permissionCodes: string[]
36
- }
9
+ export type AssignUserRolesPayload = ApiSchema['AssignUserRolesRequest']
10
+
11
+ export type AssignRolePermissionsPayload = ApiSchema['AssignRolePermissionsRequest']
12
+
13
+ export type CreateRolePayload = ApiSchema['CreateRoleRequest']
14
+
15
+ export type UpdateRolePayload = ApiSchema['UpdateRoleRequest']
@@ -0,0 +1,11 @@
1
+ import type { ApiSchema } from './api-contract'
2
+
3
+ export type RechargeOrder = ApiSchema['RechargeOrder']
4
+
5
+ export type RechargeOrderStatus = ApiSchema['RechargeOrder']['status']
6
+
7
+ export type CompleteOfflineRechargePayload = ApiSchema['CompleteOfflineRechargeRequest']
8
+
9
+ export type RechargeOfflinePaymentMethod = CompleteOfflineRechargePayload['payment_method']
10
+
11
+ export type CreateRechargeOrderPayload = ApiSchema['CreateRechargeOrderRequest']
package/types/report.d.ts CHANGED
@@ -1,29 +1,11 @@
1
- /** 举报状态(与 api.zengchaowu.com 一致) */
2
- export type ReportStatus = 'pending' | 'processing' | 'resolved' | 'rejected'
1
+ import type { ApiOpQuery, ApiOpRequestBody, ApiSchema } from './api-contract'
3
2
 
4
- /** 举报目标类型 */
5
- export type ReportTargetType = 'post' | 'comment' | 'product' | 'user'
3
+ export type ReportStatus = NonNullable<ApiSchema['ReportSummary']['status']>
6
4
 
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
- }
5
+ export type ReportTargetType = ApiSchema['ReportSummary']['target_type']
18
6
 
19
- export interface ReportListResponse {
20
- data: Report[]
21
- total: number
22
- limit?: number
23
- offset?: number
24
- }
7
+ export type Report = ApiSchema['ReportSummary']
25
8
 
26
- export interface ProcessReportPayload {
27
- status: ReportStatus
28
- remark?: string
29
- }
9
+ export type ReportListParams = ApiOpQuery<'Reports_list'>
10
+
11
+ export type ProcessReportPayload = ApiOpRequestBody<'Reports_process'>
package/types/review.d.ts CHANGED
@@ -1,13 +1,11 @@
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
- }
1
+ import type { ApiSchema } from './api-contract'
2
+
3
+ export type Review = ApiSchema['ReviewSummary']
4
+
5
+ export type ReviewListPage = ApiSchema['ReviewListPage']
6
+
7
+ export type CreateReviewPayload = ApiSchema['CreateReviewRequest']
8
+
9
+ export type UpdateReviewPayload = ApiSchema['UpdateReviewRequest']
10
+
11
+ export type ProductReviewStats = ApiSchema['ProductReviewStats']
@@ -1,31 +1,16 @@
1
- /** 表情包(运营配置,客户端拉取展示) */
1
+ import type { ApiOpQuery, ApiOpRequestBody, ApiSchema } from './api-contract'
2
2
 
3
- export type StickerPackStatus = 'active' | 'inactive' | 'draft'
3
+ export type StickerPackStatus = NonNullable<ApiSchema['StickerPack']['status']>
4
4
 
5
- export interface StickerItem {
6
- id: number
7
- pack_id: number
8
- name?: string
9
- /** 表情图 URL(建议 OSS 公网或签名 URL) */
10
- url: string
11
- sort_order?: number
12
- status?: StickerPackStatus
13
- width?: number
14
- height?: number
15
- created_at?: string
16
- updated_at?: string
17
- }
5
+ export type StickerItem = ApiSchema['StickerItem']
18
6
 
19
- export interface StickerPack {
20
- id: number
21
- name: string
22
- cover_url?: string
23
- sort_order?: number
24
- status: StickerPackStatus
25
- stickers?: StickerItem[]
26
- created_at?: string
27
- updated_at?: string
28
- }
7
+ export type StickerPack = ApiSchema['StickerPack']
8
+
9
+ export type StickerPackListParams = ApiOpQuery<'StickerPacks_list'>
10
+
11
+ export type CreateStickerPackPayload = ApiOpRequestBody<'StickerPacks_create'>
12
+
13
+ export type UpdateStickerPackPayload = ApiOpRequestBody<'StickerPacks_update'>
29
14
 
30
15
  /** IM 消息 extra_data.sticker */
31
16
  export interface ImMessageStickerExtra {
package/types/user.d.ts CHANGED
@@ -1,37 +1,15 @@
1
- export interface User {
2
- id: string
3
- name?: string
4
- email?: string
5
- phone?: string
6
- wechat_openid?: string
7
- wechat_unionid?: string
8
- wechat_nickname?: string
9
- /** 用户头像 URL(微信登录等会写入微信头像) */
10
- avatar?: string
11
- created_at?: string
12
- updated_at?: string
13
- // 兼容旧字段名
14
- createdAt?: string
15
- updatedAt?: string
16
- }
1
+ import type { ApiSchema } from './api-contract'
17
2
 
18
- export interface UserListResponse {
19
- data: User[]
20
- count: number
21
- }
3
+ export type User = ApiSchema['UserSummary']
22
4
 
23
- export interface UserDetailResponse {
24
- data: User
25
- }
5
+ export type UserLookupResult = ApiSchema['UserLookupResult']
26
6
 
27
- export interface CreateUserPayload {
28
- name: string
29
- email: string
30
- }
7
+ export type CreateUserPayload = ApiSchema['CreateUserRequest']
31
8
 
32
- export interface UpdateUserPayload {
33
- name?: string
34
- email?: string
35
- phone?: string
36
- avatar?: string
37
- }
9
+ export type UpdateUserPayload = ApiSchema['UpdateUserRequest']
10
+
11
+ export type UserCryptoKeyPairItem = ApiSchema['UserCryptoKeyPairItem']
12
+
13
+ export type CreatedUserCryptoKeyPair = ApiSchema['CreatedUserCryptoKeyPair']
14
+
15
+ export type CreateUserCryptoKeyPairPayload = ApiSchema['CreateUserCryptoKeyPairRequest']
package/types/video.d.ts CHANGED
@@ -1,75 +1,24 @@
1
- export interface VideoCategory {
2
- id: string
3
- name: string
4
- description?: string
5
- sort_order?: number
6
- created_at?: string
7
- }
8
-
9
- export interface Video {
10
- id: string
11
- title: string
12
- description?: string
13
- cover_url: string
14
- video_url: string
15
- author_id?: string
16
- category_id?: string
17
- duration?: number
18
- views?: number
19
- like_count?: number
20
- comment_count?: number
21
- share_count?: number
22
- status?: string
23
- publish_time?: string
24
- created_at?: string
25
- updated_at?: string
26
- }
27
-
28
- export interface VideoComment {
29
- id: number
30
- video_id: string
31
- user_id: string
32
- content: string
33
- parent_id?: number | null
34
- like_count?: number
35
- created_at?: string
36
- updated_at?: string
37
- }
1
+ import type { ApiSchema, ApiOpData } from './api-contract'
38
2
 
39
- export interface VideoListResponse {
40
- data: Video[]
41
- total: number
42
- limit: number
43
- offset: number
44
- }
3
+ export type VideoCategory = ApiSchema['VideoCategory']
45
4
 
46
- export interface VideoDetailResponse {
47
- data: Video
48
- }
5
+ export type Video = ApiSchema['VideoSummary']
49
6
 
50
- export interface VideoCategoriesResponse {
51
- data: VideoCategory[]
7
+ /** 运行时 Zod 校验允许 string status(与历史 schema 一致) */
8
+ export type VideoRuntime = Omit<Video, 'status' | 'id'> & {
9
+ id: string | number
10
+ status?: Video['status'] | string
52
11
  }
53
12
 
54
- export interface VideoCommentsResponse {
55
- data: VideoComment[]
56
- total: number
57
- limit: number
58
- offset: number
59
- }
13
+ export type VideoComment = ApiSchema['VideoComment']
60
14
 
61
- export interface CreateVideoPayload
62
- extends Omit<Video, 'id' | 'created_at' | 'updated_at' | 'publish_time' | 'cover_url' | 'video_url' | 'author_id'> {
63
- cover_url: string
64
- video_url: string
65
- author_id: string
66
- }
15
+ export type CreateVideoPayload = ApiSchema['CreateVideoRequest']
67
16
 
68
- export interface UpdateVideoPayload
69
- extends Partial<Omit<Video, 'id' | 'created_at' | 'updated_at' | 'publish_time'>> {}
17
+ export type UpdateVideoPayload = ApiSchema['UpdateVideoRequest']
70
18
 
71
- export interface CreateCommentPayload {
72
- content: string
73
- parent_id?: number
74
- }
19
+ export type CreateCommentPayload = ApiSchema['CreateVideoCommentRequest']
75
20
 
21
+ /** unwrap 后的 API data 载荷(与 auth.schema 一致,非 envelope wrapper) */
22
+ export type VideoListBody = ApiOpData<'Videos_list'>
23
+ export type VideoCategoriesBody = ApiOpData<'Videos_listCategories'>
24
+ export type VideoCommentsBody = ApiOpData<'Videos_listComments'>