🚨 fix: resolve linting type error
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import { AppError } from "../../../../helpers/error/instances/app";
|
||||
import { jwtDecode } from "../../../../helpers/http/jwt/decode";
|
||||
import { jwtEncode } from "../../../../helpers/http/jwt/encode";
|
||||
|
||||
export const tokenValidationService = (payload: string) => {
|
||||
try {
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import { Prisma } from "@prisma/client";
|
||||
import { getEpisodeReferenceAPI } from "../../../../config/apis/episode.reference";
|
||||
import { ErrorForwarder } from "../../../../helpers/error/instances/forwarder";
|
||||
import { MediaEpisodeInfoResponse } from "../../types/mediaEpisodeInfo.type";
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { SystemAccountId } from "../../../../config/account/system";
|
||||
import { getContentReferenceAPI } from "../../../../config/apis/media.reference";
|
||||
import { generateUUIDv7 } from "../../../../helpers/databases/uuidv7";
|
||||
import { ErrorForwarder } from "../../../../helpers/error/instances/forwarder";
|
||||
import { bulkInsertCharactersRepository } from "../../repositories/bulkInsertCharacters.repository";
|
||||
import { bulkInsertLangVARepository } from "../../repositories/bulkInsertLangVA.repository";
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { SystemAccountId } from "../../../../config/account/system";
|
||||
import { generateUUIDv7 } from "../../../../helpers/databases/uuidv7";
|
||||
import { ErrorForwarder } from "../../../../helpers/error/instances/forwarder";
|
||||
import { bulkInsertVoiceActorRepository } from "../../repositories/bulkInsertVoiceActor.repository";
|
||||
import { Person } from "../../types/mediaCharWithVAInfo";
|
||||
|
||||
@ -34,12 +34,12 @@ interface Data {
|
||||
year: number;
|
||||
broadcast: Broadcast;
|
||||
producers: Genre[];
|
||||
licensors: any[];
|
||||
licensors: unknown[];
|
||||
studios: Genre[];
|
||||
genres: Genre[];
|
||||
explicit_genres: any[];
|
||||
explicit_genres: unknown[];
|
||||
themes: Genre[];
|
||||
demographics: any[];
|
||||
demographics: unknown[];
|
||||
relations: Relation[];
|
||||
theme: Theme;
|
||||
external: External[];
|
||||
|
||||
@ -10,7 +10,7 @@ interface Data {
|
||||
name: string;
|
||||
given_name: null;
|
||||
family_name: null;
|
||||
alternate_names: any[];
|
||||
alternate_names: string[];
|
||||
birthday: Date;
|
||||
favorites: number;
|
||||
about: string;
|
||||
|
||||
@ -6,14 +6,17 @@ const includeOptions = ["preference", "assignedRoles"] as const;
|
||||
export const getUserOptionsSchema = z.object({
|
||||
verbosity: z.enum(
|
||||
["exists", "basic", "full"],
|
||||
"option: verbosity value must match with enum types"
|
||||
"option: verbosity value must match with enum types",
|
||||
),
|
||||
include: z
|
||||
.string()
|
||||
.optional()
|
||||
.transform((val) => val?.split(",") ?? [])
|
||||
.refine(
|
||||
(arr) => arr.every((val) => includeOptions.includes(val.trim() as any)),
|
||||
"option: include value didn't match with enum types"
|
||||
(arr) =>
|
||||
arr.every((val) =>
|
||||
includeOptions.includes(val.trim() as typeof includeOptions[number]),
|
||||
),
|
||||
"option: include value didn't match with enum types",
|
||||
),
|
||||
});
|
||||
|
||||
@ -2,26 +2,6 @@ import { Prisma } from "@prisma/client";
|
||||
import { ErrorForwarder } from "../../../helpers/error/instances/forwarder";
|
||||
import { userSessionModel } from "../userSession.model";
|
||||
|
||||
type CreateUserSessionResponse = Prisma.UserSessionGetPayload<{
|
||||
select: {
|
||||
id: true;
|
||||
deviceType: true;
|
||||
isAuthenticated: true;
|
||||
validUntil: true;
|
||||
user: {
|
||||
select: {
|
||||
id: true;
|
||||
name: true;
|
||||
email: true;
|
||||
username: true;
|
||||
avatar: true;
|
||||
birthDate: true;
|
||||
bioProfile: true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}>;
|
||||
|
||||
export const createUserSessionRepository = async (
|
||||
data: Prisma.UserSessionUncheckedCreateInput,
|
||||
) => {
|
||||
|
||||
Reference in New Issue
Block a user