fix: синхронизации аудиторий

This commit is contained in:
2026-05-11 23:59:13 +03:00
parent 6824d7ce7d
commit 34334e9a8d
6 changed files with 255 additions and 41 deletions
+8
View File
@@ -9,6 +9,8 @@ import type {
LocationDto,
PagedResult,
ReviewDto,
SyncResultDto,
SyncScheduleRequest,
SyncStatusDto,
TagDto,
UserAchievementDto,
@@ -112,4 +114,10 @@ export const tagsApi = {
export const syncApi = {
status: () => apiRequest<SyncStatusDto>('/sync/status'),
schedule: (request: SyncScheduleRequest) =>
apiRequest<SyncResultDto>('/sync/schedule', {
method: 'POST',
body: JSON.stringify(request),
}),
rooms: () => apiRequest<SyncResultDto>('/sync/rooms', { method: 'POST' }),
}
+15 -6
View File
@@ -141,12 +141,21 @@ export interface TagDto {
export interface SyncStatusDto {
lastSyncAt?: string | null
status?: string | null
lastResult?: {
created: number
updated: number
skipped: number
error?: string | null
} | null
lastResult?: SyncResultDto | null
}
export interface SyncScheduleRequest {
specialtyCode?: string | null
timeMin?: string | null
timeMax?: string | null
typeId?: string | null
}
export interface SyncResultDto {
created: number
updated: number
skipped: number
error?: string | null
}
export interface UserAchievementDto {