diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts index e301c06e..bfd9e759 100644 --- a/frontend/src/types/index.ts +++ b/frontend/src/types/index.ts @@ -96,6 +96,7 @@ export type { export * from './scripts' export * from './script-builder' export * from './integrations' +export * from './tickets' export * from './notification' export type * from './public-templates' export * from './network-diagram' diff --git a/frontend/src/types/integrations.ts b/frontend/src/types/integrations.ts index 7758b574..bea0a901 100644 --- a/frontend/src/types/integrations.ts +++ b/frontend/src/types/integrations.ts @@ -48,6 +48,10 @@ export interface PSATicketInfo { board_name: string | null status_name: string | null priority_name: string | null + company_id: number | null + board_id: number | null + status_id: number | null + priority_id: number | null } export interface TicketLinkResponse { @@ -64,6 +68,10 @@ export interface PSATicketSearchResult { status_name: string | null priority_name: string | null closed: boolean + company_id: string | null + board_id: number | null + status_id: number | null + priority_id: number | null } export interface PSATicketStatusItem { diff --git a/frontend/src/types/tickets.ts b/frontend/src/types/tickets.ts new file mode 100644 index 00000000..0ba6d49b --- /dev/null +++ b/frontend/src/types/tickets.ts @@ -0,0 +1,78 @@ +import type { PSATicketSearchResult } from '@/types/integrations' + +export interface TicketFilters { + search: string + board_id: number | null + status_id: number | null + priority: string | null + company_id: number | null + assigned: 'me' | 'unassigned' | 'all' | number + include_closed: boolean +} + +export const DEFAULT_TICKET_FILTERS: TicketFilters = { + search: '', + board_id: null, + status_id: null, + priority: null, + company_id: null, + assigned: 'all', + include_closed: false, +} + +export interface TicketCreationPayload { + summary: string + company_id: number | null + board_id: number | null + status_id: number | null + priority_id: number | null + description: string + assigned_member_id: number | null +} + +export interface AiParseResponse { + summary: string | null + company_id: number | null + board_id: number | null + priority_id: number | null + status_id: number | null + assigned_member_id: number | null + description: string | null + missing_fields: string[] + warnings: string[] +} + +export interface PSAResource { + member_id: number + member_name: string + member_identifier: string + is_rf_user: boolean +} + +export interface PSATicketCreated { + id: number + summary: string + board_name: string + status_name: string + priority_name: string + company_name: string + resources: PSAResource[] +} + +export interface PSATicketStatusUpdate { + ticket_id: number + previous_status: string + new_status: string +} + +export interface TicketListResponse { + items: PSATicketSearchResult[] + total: number + page: number + page_size: number +} + +export interface PSAPriority { + id: number + name: string +}