refactor: move zod import from validation package to zod (#2111)

* refactor: move zod import from validation package to zod

* refactor: move missing zod imports
This commit is contained in:
Meier Lukas
2025-01-26 22:16:27 +01:00
committed by GitHub
parent 1146c59a41
commit c43a2f0488
91 changed files with 153 additions and 99 deletions

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const statsResponseSchema = z.object({
time_units: z.enum(["hours", "days"]),

View File

@@ -1,10 +1,10 @@
import type { Response } from "undici";
import { z } from "zod";
import { extractErrorMessage, removeTrailingSlash } from "@homarr/common";
import type { IntegrationSecretKind } from "@homarr/definitions";
import { logger } from "@homarr/log";
import type { TranslationObject } from "@homarr/translation";
import { z } from "@homarr/validation";
import { IntegrationTestConnectionError } from "./test-connection-error";
import type { IntegrationSecret } from "./types";

View File

@@ -1,5 +1,6 @@
import { z } from "zod";
import { FlattenError } from "@homarr/common";
import { z } from "@homarr/validation";
import type { TestConnectionError } from "./integration";

View File

@@ -3,9 +3,9 @@ import { humanFileSize } from "@homarr/common";
import "@homarr/redis";
import dayjs from "dayjs";
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { z } from "@homarr/validation";
import { createChannelEventHistory } from "../../../redis/src/lib/channel";
import { Integration } from "../base/integration";

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const queueSchema = z.object({
queue: z.object({

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const entityStateSchema = z.object({
attributes: z.record(

View File

@@ -1,5 +1,6 @@
import { z } from "zod";
import type { Integration } from "@homarr/db/schema";
import { z } from "@homarr/validation";
const usenetQueueState = ["downloading", "queued", "paused"] as const;
const usenetHistoryState = ["completed", "failed", "processing"] as const;

View File

@@ -1,6 +1,7 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log";
import { z } from "@homarr/validation";
import type { CalendarEvent } from "../../calendar-types";
import { MediaOrganizerIntegration } from "../media-organizer-integration";

View File

@@ -1,7 +1,8 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import type { AtLeastOneOf } from "@homarr/common/types";
import { logger } from "@homarr/log";
import { z } from "@homarr/validation";
import type { CalendarEvent } from "../../calendar-types";
import { radarrReleaseTypes } from "../../calendar-types";

View File

@@ -1,6 +1,7 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log";
import { z } from "@homarr/validation";
import type { CalendarEvent } from "../../calendar-types";
import { MediaOrganizerIntegration } from "../media-organizer-integration";

View File

@@ -1,6 +1,7 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log";
import { z } from "@homarr/validation";
import type { CalendarEvent } from "../../calendar-types";
import { MediaOrganizerIntegration } from "../media-organizer-integration";

View File

@@ -1,5 +1,6 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { z } from "@homarr/validation";
import { Integration } from "../base/integration";
import type { TdarrQueue } from "../interfaces/media-transcoding/queue";

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const getStatisticsSchema = z.object({
totalFileCount: z.number(),

View File

@@ -1,6 +1,7 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log";
import { z } from "@homarr/validation";
import { Integration } from "../base/integration";
import type { ISearchableIntegration } from "../base/searchable-integration";

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const summaryResponseSchema = z.object({
status: z.enum(["enabled", "disabled"]),

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const indexerResponseSchema = z.object({
id: z.number(),