|
|
@@ -0,0 +1,30 @@
|
|
|
+import type { InferResponseType, InferRequestType } from 'hono/client';
|
|
|
+import { enterpriseOrderClient } from './enterpriseOrderClient';
|
|
|
+
|
|
|
+// 订单列表查询参数类型(企业专用)
|
|
|
+export type CompanyOrdersQueryParams = InferRequestType<typeof enterpriseOrderClient['company-orders']['$get']>['query'];
|
|
|
+
|
|
|
+// 分页响应类型
|
|
|
+export type PaginatedResponse<T> = {
|
|
|
+ data: T[];
|
|
|
+ total: number;
|
|
|
+};
|
|
|
+
|
|
|
+// 使用Hono类型推导
|
|
|
+export type OrderDetailResponse = InferResponseType<typeof enterpriseOrderClient.detail[':id']['$get'], 200>;
|
|
|
+export type OrderListResponse = InferResponseType<typeof enterpriseOrderClient['company-orders']['$get'], 200>;
|
|
|
+export type OrderData = InferResponseType<typeof enterpriseOrderClient['company-orders']['$get'], 200>['data'][0];
|
|
|
+
|
|
|
+
|
|
|
+// 企业专用扩展API
|
|
|
+export type CheckinStatisticsResponse = InferResponseType<typeof enterpriseOrderClient['checkin-statistics']['$get'], 200>;
|
|
|
+export type VideoStatisticsResponse = InferResponseType<typeof enterpriseOrderClient['video-statistics']['$get'], 200>;
|
|
|
+export type CompanyVideosResponse = InferResponseType<typeof enterpriseOrderClient['company-videos']['$get'], 200>;
|
|
|
+export type BatchDownloadRequest = InferRequestType<typeof enterpriseOrderClient['batch-download']['$post']>['json'];
|
|
|
+export type UpdateVideoStatusRequest = InferRequestType<typeof enterpriseOrderClient.videos[':id']['status']['$put']>['json'];
|
|
|
+
|
|
|
+// 查询参数类型
|
|
|
+export type CheckinStatisticsParams = InferRequestType<typeof enterpriseOrderClient['checkin-statistics']['$get']>['query'];
|
|
|
+export type VideoStatisticsParams = InferRequestType<typeof enterpriseOrderClient['video-statistics']['$get']>['query'];
|
|
|
+export type CompanyVideosParams = InferRequestType<typeof enterpriseOrderClient['company-videos']['$get']>['query'];
|
|
|
+export type BatchDownloadParams = InferRequestType<typeof enterpriseOrderClient['batch-download']['$post']>['json'];
|