このコミットが含まれているのは:
2026-06-26 00:21:33 +09:00
コミット 8304909c8c
26個のファイルの変更1251行の追加33行の削除
+22
ファイルの表示
@@ -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: {