feat(finance): add financial disclosure publishing
This commit is contained in:
@@ -48,6 +48,9 @@ export const PERMISSION_CODES = {
|
||||
CONTENT_READ: 'content:read',
|
||||
CONTENT_MANAGE: 'content:manage',
|
||||
CONTENT_REVIEW: 'content:review',
|
||||
FINANCIAL_DISCLOSURES_READ: 'financial_disclosures:read',
|
||||
FINANCIAL_DISCLOSURES_MANAGE: 'financial_disclosures:manage',
|
||||
FINANCIAL_DISCLOSURES_PUBLISH: 'financial_disclosures:publish',
|
||||
NOTIFICATIONS_MANAGE: 'notifications:manage',
|
||||
STATISTICS_READ: 'statistics:read',
|
||||
EXPORTS_CREATE: 'exports:create',
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
export const FINANCIAL_DISCLOSURE_STATUSES = ['DRAFT', 'PUBLISHED', 'ARCHIVED'] as const;
|
||||
export type FinancialDisclosureStatus = (typeof FINANCIAL_DISCLOSURE_STATUSES)[number];
|
||||
|
||||
export const FINANCIAL_DISCLOSURE_STATUS_LABELS: Record<FinancialDisclosureStatus, string> = {
|
||||
DRAFT: '草稿',
|
||||
PUBLISHED: '已发布',
|
||||
ARCHIVED: '已归档',
|
||||
};
|
||||
|
||||
export interface FinancialDisclosureListItem {
|
||||
publicId: string;
|
||||
title: string;
|
||||
summary: string | null;
|
||||
status: FinancialDisclosureStatus;
|
||||
isPinned: boolean;
|
||||
sortOrder: number;
|
||||
revision: number;
|
||||
publishedAt: string | null;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface FinancialDisclosureDetail extends FinancialDisclosureListItem {
|
||||
richText: string;
|
||||
}
|
||||
|
||||
export interface PaginatedFinancialDisclosuresResponse {
|
||||
items: FinancialDisclosureListItem[];
|
||||
page: number;
|
||||
pageSize: number;
|
||||
total: number;
|
||||
}
|
||||
|
||||
export interface FinancialDisclosureDetailResponse {
|
||||
disclosure: FinancialDisclosureDetail;
|
||||
}
|
||||
export interface CreateFinancialDisclosureRequest {
|
||||
clientRequestId: string;
|
||||
title: string;
|
||||
summary?: string;
|
||||
richText: string;
|
||||
isPinned?: boolean;
|
||||
sortOrder?: number;
|
||||
}
|
||||
export interface UpdateFinancialDisclosureRequest {
|
||||
expectedRevision: number;
|
||||
title: string;
|
||||
summary?: string;
|
||||
richText: string;
|
||||
isPinned?: boolean;
|
||||
sortOrder?: number;
|
||||
}
|
||||
export interface TransitionFinancialDisclosureRequest {
|
||||
clientRequestId: string;
|
||||
targetStatus: 'PUBLISHED' | 'ARCHIVED';
|
||||
}
|
||||
@@ -27,6 +27,20 @@ export {
|
||||
SERVICE_CATEGORY_LABELS,
|
||||
} from './service-applications.js';
|
||||
export type { StatisticsOverview } from './statistics.js';
|
||||
export {
|
||||
FINANCIAL_DISCLOSURE_STATUSES,
|
||||
FINANCIAL_DISCLOSURE_STATUS_LABELS,
|
||||
} from './financial-disclosures.js';
|
||||
export type {
|
||||
FinancialDisclosureStatus,
|
||||
FinancialDisclosureListItem,
|
||||
FinancialDisclosureDetail,
|
||||
PaginatedFinancialDisclosuresResponse,
|
||||
FinancialDisclosureDetailResponse,
|
||||
CreateFinancialDisclosureRequest,
|
||||
UpdateFinancialDisclosureRequest,
|
||||
TransitionFinancialDisclosureRequest,
|
||||
} from './financial-disclosures.js';
|
||||
export {
|
||||
CONTENT_POST_STATUSES,
|
||||
CONTENT_POST_STATUS_LABELS,
|
||||
|
||||
Reference in New Issue
Block a user