このコミットが含まれているのは:
@@ -7,6 +7,7 @@ import {
|
||||
|
||||
import type {
|
||||
Material,
|
||||
MaterialVersion,
|
||||
FetchMaterialsParams,
|
||||
MaterialFilter,
|
||||
MaterialSyncSuppression,
|
||||
@@ -28,6 +29,11 @@ export type MaterialSyncSuppressionResponse = {
|
||||
suppressions: MaterialSyncSuppression[]
|
||||
}
|
||||
|
||||
export type MaterialChangesResponse = {
|
||||
versions: MaterialVersion[]
|
||||
count: number
|
||||
}
|
||||
|
||||
const MATERIAL_FILTERS: MaterialFilter[] = ['present', 'missing', 'any']
|
||||
|
||||
|
||||
@@ -71,6 +77,22 @@ export const fetchMaterial = async (id: string): Promise<Material | null> => {
|
||||
}
|
||||
|
||||
|
||||
export const fetchMaterialChanges = async (
|
||||
{ materialId, tag, eventType, page, limit }: {
|
||||
materialId?: string
|
||||
tag?: string
|
||||
eventType?: string
|
||||
page: number
|
||||
limit: number
|
||||
}): Promise<MaterialChangesResponse> =>
|
||||
await apiGet ('/materials/versions', { params: {
|
||||
...(materialId && { material_id: materialId }),
|
||||
...(tag && { tag }),
|
||||
...(eventType && { event_type: eventType }),
|
||||
page,
|
||||
limit} })
|
||||
|
||||
|
||||
export const fetchMaterialTagTree = async (
|
||||
{ parentId, materialFilter }: FetchMaterialTreeParams): Promise<MaterialSidebarTag[]> =>
|
||||
await apiGet ('/tags/with-depth', { params: {
|
||||
|
||||
新しい課題から参照
ユーザをブロックする