feat(tickets): add tickets types, expand PSATicketSearchResult/PSATicketInfo with IDs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -96,6 +96,7 @@ export type {
|
|||||||
export * from './scripts'
|
export * from './scripts'
|
||||||
export * from './script-builder'
|
export * from './script-builder'
|
||||||
export * from './integrations'
|
export * from './integrations'
|
||||||
|
export * from './tickets'
|
||||||
export * from './notification'
|
export * from './notification'
|
||||||
export type * from './public-templates'
|
export type * from './public-templates'
|
||||||
export * from './network-diagram'
|
export * from './network-diagram'
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ export interface PSATicketInfo {
|
|||||||
board_name: string | null
|
board_name: string | null
|
||||||
status_name: string | null
|
status_name: string | null
|
||||||
priority_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 {
|
export interface TicketLinkResponse {
|
||||||
@@ -64,6 +68,10 @@ export interface PSATicketSearchResult {
|
|||||||
status_name: string | null
|
status_name: string | null
|
||||||
priority_name: string | null
|
priority_name: string | null
|
||||||
closed: boolean
|
closed: boolean
|
||||||
|
company_id: string | null
|
||||||
|
board_id: number | null
|
||||||
|
status_id: number | null
|
||||||
|
priority_id: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PSATicketStatusItem {
|
export interface PSATicketStatusItem {
|
||||||
|
|||||||
78
frontend/src/types/tickets.ts
Normal file
78
frontend/src/types/tickets.ts
Normal file
@@ -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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user