1 parent
c0e815ae63
commit
0fe2c70848
5 files changed
+465
-44
No files matched your search
@@ -68,6 +68,12 @@ export interface DailyIssueStats {
|
||||
days: DailyIssueStat[]
|
||||
}
|
||||
|
||||
export interface CalendarIssues {
|
||||
list: Issue[]
|
||||
/** The range holds more issues than returned — narrow the filter */
|
||||
truncated: boolean
|
||||
}
|
||||
|
||||
// CLIENT REQUEST
|
||||
|
||||
export async function itemsList(params: {
|
||||
@@ -77,6 +83,7 @@ export async function itemsList(params: {
|
||||
status?: string | string[] | null
|
||||
assigneeId?: string | null
|
||||
projectId?: string | null
|
||||
hasDueDate?: boolean
|
||||
}) {
|
||||
const query = toQuery({
|
||||
page: params.page,
|
||||
@@ -85,10 +92,29 @@ export async function itemsList(params: {
|
||||
text: params.text,
|
||||
assigneeId: params.assigneeId,
|
||||
status: Array.isArray(params.status) ? params.status.join(',') : params.status,
|
||||
hasDueDate: params.hasDueDate === undefined ? undefined : String(params.hasDueDate),
|
||||
})
|
||||
return apiClient.get<{ list: Issue[]; meta: Meta }>(`/api/issues/list${query}`)
|
||||
}
|
||||
|
||||
/** Issues with dueDate in [from, to); from/to are ISO moments with an offset */
|
||||
export async function itemsCalendar(params: {
|
||||
from: string
|
||||
to: string
|
||||
projectId?: string | null
|
||||
assigneeId?: string | null
|
||||
status?: string[] | null
|
||||
}) {
|
||||
const query = toQuery({
|
||||
from: params.from,
|
||||
to: params.to,
|
||||
projectId: params.projectId,
|
||||
assigneeId: params.assigneeId,
|
||||
status: params.status?.join(','),
|
||||
})
|
||||
return apiClient.get<CalendarIssues>(`/api/issues/calendar${query}`)
|
||||
}
|
||||
|
||||
export async function itemGetByKey(ckey: string) {
|
||||
return apiClient.get<Issue>(`/api/issues/by-key/${ckey}`)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user