init
This commit is contained in:
commit
932d4ad420
46 changed files with 5800 additions and 0 deletions
130
lib/bugzilla/types.ts
Normal file
130
lib/bugzilla/types.ts
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
// Bugzilla 5.0+ REST API type definitions
|
||||
|
||||
export interface BugzillaBug {
|
||||
id: number
|
||||
alias: string[]
|
||||
summary: string
|
||||
status: string
|
||||
resolution: string
|
||||
priority: string
|
||||
severity: string
|
||||
product: string
|
||||
component: string
|
||||
description?: string // comment 0 text (not always in bug response)
|
||||
creation_time: string
|
||||
last_change_time: string
|
||||
depends_on: number[]
|
||||
blocks: number[]
|
||||
url: string
|
||||
see_also: string[]
|
||||
assigned_to: string
|
||||
creator: string
|
||||
is_open: boolean
|
||||
}
|
||||
|
||||
export interface BugzillaComment {
|
||||
id: number
|
||||
bug_id: number
|
||||
text: string
|
||||
creator: string
|
||||
time: string
|
||||
count: number
|
||||
is_private: boolean
|
||||
tags: string[]
|
||||
}
|
||||
|
||||
export interface BugzillaSearchParams {
|
||||
product?: string
|
||||
component?: string
|
||||
status?: string | string[]
|
||||
id?: number | number[]
|
||||
alias?: string | string[]
|
||||
url?: string
|
||||
summary?: string
|
||||
limit?: number
|
||||
offset?: number
|
||||
last_change_time?: string
|
||||
}
|
||||
|
||||
export interface BugzillaCreatePayload {
|
||||
product: string
|
||||
component: string
|
||||
summary: string
|
||||
version?: string
|
||||
url?: string
|
||||
description?: string
|
||||
status?: string
|
||||
priority?: string
|
||||
severity?: string
|
||||
op_sys?: string
|
||||
rep_platform?: string
|
||||
depends_on?: number[]
|
||||
blocks?: number[]
|
||||
see_also?: string[]
|
||||
}
|
||||
|
||||
export interface BugzillaUpdatePayload {
|
||||
summary?: string
|
||||
status?: string
|
||||
resolution?: string
|
||||
priority?: string
|
||||
severity?: string
|
||||
depends_on?: { set: number[] }
|
||||
blocks?: { set: number[] }
|
||||
see_also?: { add?: string[]; remove?: string[] }
|
||||
}
|
||||
|
||||
export interface BugzillaSearchResponse {
|
||||
bugs: BugzillaBug[]
|
||||
}
|
||||
|
||||
export interface BugzillaCreateResponse {
|
||||
id: number
|
||||
}
|
||||
|
||||
export interface BugzillaUpdateResponse {
|
||||
bugs: Array<{
|
||||
id: number
|
||||
changes: Record<string, { removed: string; added: string }>
|
||||
}>
|
||||
}
|
||||
|
||||
export interface BugzillaCommentsResponse {
|
||||
bugs: Record<string, { comments: BugzillaComment[] }>
|
||||
}
|
||||
|
||||
// Product and component types
|
||||
|
||||
export interface BugzillaComponent {
|
||||
id: number
|
||||
name: string
|
||||
description: string
|
||||
default_assigned_to: string
|
||||
is_active: boolean
|
||||
}
|
||||
|
||||
export interface BugzillaProduct {
|
||||
id: number
|
||||
name: string
|
||||
description: string
|
||||
is_active: boolean
|
||||
components: BugzillaComponent[]
|
||||
}
|
||||
|
||||
export interface BugzillaProductResponse {
|
||||
products: BugzillaProduct[]
|
||||
}
|
||||
|
||||
export interface BugzillaCreateProductPayload {
|
||||
name: string
|
||||
description: string
|
||||
version: string
|
||||
is_open?: boolean
|
||||
}
|
||||
|
||||
export interface BugzillaCreateComponentPayload {
|
||||
product: string
|
||||
name: string
|
||||
description: string
|
||||
default_assignee: string
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue