[FEAT] update new archidata

This commit is contained in:
Edouard DUPIN 2025-02-10 19:14:12 +01:00
parent 80dfabcf48
commit 4d18438914
12 changed files with 25 additions and 33 deletions

View File

@ -8,7 +8,7 @@ import {ZodLocalDate} from "./local-date";
import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete"; import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete";
export const ZodAlbum = ZodGenericDataSoftDelete.extend({ export const ZodAlbum = ZodGenericDataSoftDelete.extend({
name: zod.string().max(256).optional(), name: zod.string().optional(),
description: zod.string().optional(), description: zod.string().optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers
@ -30,7 +30,7 @@ export function isAlbum(data: any): data is Album {
} }
} }
export const ZodAlbumWrite = ZodGenericDataSoftDeleteWrite.extend({ export const ZodAlbumWrite = ZodGenericDataSoftDeleteWrite.extend({
name: zod.string().max(256).nullable().optional(), name: zod.string().nullable().optional(),
description: zod.string().nullable().optional(), description: zod.string().nullable().optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers

View File

@ -8,14 +8,14 @@ import {ZodLocalDate} from "./local-date";
import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete"; import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete";
export const ZodArtist = ZodGenericDataSoftDelete.extend({ export const ZodArtist = ZodGenericDataSoftDelete.extend({
name: zod.string().max(256).optional(), name: zod.string().optional(),
description: zod.string().optional(), description: zod.string().optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers
*/ */
covers: zod.array(ZodObjectId).optional(), covers: zod.array(ZodObjectId).optional(),
firstName: zod.string().max(256).optional(), firstName: zod.string().optional(),
surname: zod.string().max(256).optional(), surname: zod.string().optional(),
birth: ZodLocalDate.optional(), birth: ZodLocalDate.optional(),
death: ZodLocalDate.optional(), death: ZodLocalDate.optional(),
@ -33,14 +33,14 @@ export function isArtist(data: any): data is Artist {
} }
} }
export const ZodArtistWrite = ZodGenericDataSoftDeleteWrite.extend({ export const ZodArtistWrite = ZodGenericDataSoftDeleteWrite.extend({
name: zod.string().max(256).nullable().optional(), name: zod.string().nullable().optional(),
description: zod.string().nullable().optional(), description: zod.string().nullable().optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers
*/ */
covers: zod.array(ZodObjectId).nullable().optional(), covers: zod.array(ZodObjectId).nullable().optional(),
firstName: zod.string().max(256).nullable().optional(), firstName: zod.string().nullable().optional(),
surname: zod.string().max(256).nullable().optional(), surname: zod.string().nullable().optional(),
birth: ZodLocalDate.nullable().optional(), birth: ZodLocalDate.nullable().optional(),
death: ZodLocalDate.nullable().optional(), death: ZodLocalDate.nullable().optional(),

View File

@ -7,7 +7,7 @@ import {ZodObjectId} from "./object-id";
import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete"; import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete";
export const ZodGender = ZodGenericDataSoftDelete.extend({ export const ZodGender = ZodGenericDataSoftDelete.extend({
name: zod.string().max(256).optional(), name: zod.string().optional(),
description: zod.string().optional(), description: zod.string().optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers
@ -28,7 +28,7 @@ export function isGender(data: any): data is Gender {
} }
} }
export const ZodGenderWrite = ZodGenericDataSoftDeleteWrite.extend({ export const ZodGenderWrite = ZodGenericDataSoftDeleteWrite.extend({
name: zod.string().max(256).nullable().optional(), name: zod.string().nullable().optional(),
description: zod.string().nullable().optional(), description: zod.string().nullable().optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers

View File

@ -24,9 +24,7 @@ export function isGenericDataSoftDelete(data: any): data is GenericDataSoftDelet
return false; return false;
} }
} }
export const ZodGenericDataSoftDeleteWrite = ZodGenericDataWrite.extend({ export const ZodGenericDataSoftDeleteWrite = ZodGenericDataWrite;
});
export type GenericDataSoftDeleteWrite = zod.infer<typeof ZodGenericDataSoftDeleteWrite>; export type GenericDataSoftDeleteWrite = zod.infer<typeof ZodGenericDataSoftDeleteWrite>;

View File

@ -25,9 +25,7 @@ export function isGenericData(data: any): data is GenericData {
return false; return false;
} }
} }
export const ZodGenericDataWrite = ZodGenericTimingWrite.extend({ export const ZodGenericDataWrite = ZodGenericTimingWrite;
});
export type GenericDataWrite = zod.infer<typeof ZodGenericDataWrite>; export type GenericDataWrite = zod.infer<typeof ZodGenericDataWrite>;

View File

@ -7,7 +7,7 @@ import {ZodObjectId} from "./object-id";
import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete"; import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete";
export const ZodPlaylist = ZodGenericDataSoftDelete.extend({ export const ZodPlaylist = ZodGenericDataSoftDelete.extend({
name: zod.string().max(256).optional(), name: zod.string().optional(),
description: zod.string().optional(), description: zod.string().optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers
@ -29,7 +29,7 @@ export function isPlaylist(data: any): data is Playlist {
} }
} }
export const ZodPlaylistWrite = ZodGenericDataSoftDeleteWrite.extend({ export const ZodPlaylistWrite = ZodGenericDataSoftDeleteWrite.extend({
name: zod.string().max(256).nullable().optional(), name: zod.string().nullable().optional(),
description: zod.string().nullable().optional(), description: zod.string().nullable().optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers

View File

@ -8,7 +8,7 @@ import {ZodLong} from "./long";
import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete"; import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete";
export const ZodTrack = ZodGenericDataSoftDelete.extend({ export const ZodTrack = ZodGenericDataSoftDelete.extend({
name: zod.string().max(256).optional(), name: zod.string().optional(),
description: zod.string().optional(), description: zod.string().optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers
@ -34,7 +34,7 @@ export function isTrack(data: any): data is Track {
} }
} }
export const ZodTrackWrite = ZodGenericDataSoftDeleteWrite.extend({ export const ZodTrackWrite = ZodGenericDataSoftDeleteWrite.extend({
name: zod.string().max(256).nullable().optional(), name: zod.string().nullable().optional(),
description: zod.string().nullable().optional(), description: zod.string().nullable().optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers

View File

@ -5,9 +5,7 @@ import { z as zod } from "zod";
import {ZodUser, ZodUserWrite } from "./user"; import {ZodUser, ZodUserWrite } from "./user";
export const ZodUserKarusic = ZodUser.extend({ export const ZodUserKarusic = ZodUser;
});
export type UserKarusic = zod.infer<typeof ZodUserKarusic>; export type UserKarusic = zod.infer<typeof ZodUserKarusic>;
@ -20,9 +18,7 @@ export function isUserKarusic(data: any): data is UserKarusic {
return false; return false;
} }
} }
export const ZodUserKarusicWrite = ZodUserWrite.extend({ export const ZodUserKarusicWrite = ZodUserWrite;
});
export type UserKarusicWrite = zod.infer<typeof ZodUserKarusicWrite>; export type UserKarusicWrite = zod.infer<typeof ZodUserKarusicWrite>;

View File

@ -8,7 +8,7 @@ import {ZodPartRight} from "./part-right";
export const ZodUserMe = zod.object({ export const ZodUserMe = zod.object({
id: ZodLong, id: ZodLong,
login: zod.string().max(255).optional(), login: zod.string().optional(),
/** /**
* Map<EntityName, Map<PartName, Right>> * Map<EntityName, Map<PartName, Right>>
*/ */

View File

@ -10,7 +10,7 @@ import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generi
export const ZodUser = ZodGenericDataSoftDelete.extend({ export const ZodUser = ZodGenericDataSoftDelete.extend({
login: zod.string().min(3).max(128), login: zod.string().min(3).max(128),
lastConnection: ZodTimestamp.optional(), lastConnection: ZodTimestamp.optional(),
blocked: zod.boolean(), blocked: zod.boolean().optional(),
blockedReason: zod.string().max(512).optional(), blockedReason: zod.string().max(512).optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers
@ -33,7 +33,7 @@ export function isUser(data: any): data is User {
export const ZodUserWrite = ZodGenericDataSoftDeleteWrite.extend({ export const ZodUserWrite = ZodGenericDataSoftDeleteWrite.extend({
login: zod.string().min(3).max(128).optional(), login: zod.string().min(3).max(128).optional(),
lastConnection: ZodTimestamp.nullable().optional(), lastConnection: ZodTimestamp.nullable().optional(),
blocked: zod.boolean(), blocked: zod.boolean().nullable().optional(),
blockedReason: zod.string().max(512).nullable().optional(), blockedReason: zod.string().max(512).nullable().optional(),
/** /**
* List of Id of the specific covers * List of Id of the specific covers

View File

@ -92,12 +92,12 @@ export const DragNdrop = ({
}; };
export type CenterIconProps = BoxProps & { export type CenterIconProps = BoxProps & {
icon: any; children: any;
sizeIcon?: string; sizeIcon?: string;
}; };
export const CenterIcon = ({ export const CenterIcon = ({
icon: IconEl, children,
sizeIcon = '15px', sizeIcon = '15px',
...rest ...rest
}: CenterIconProps) => { }: CenterIconProps) => {
@ -110,7 +110,7 @@ export const CenterIcon = ({
top="50%" top="50%"
left="50%" left="50%"
transform="translate(-50%, -50%)" transform="translate(-50%, -50%)"
>{IconEl}</Box> >{children}</Box>
</Box> </Box>
); );
}; };

View File

@ -98,7 +98,7 @@ export function requestSignIn(name?: string): void {
console.log( console.log(
`Request sign-in: '${environment.ssoSignIn}' + '${hashLocalData(name)}'` `Request sign-in: '${environment.ssoSignIn}' + '${hashLocalData(name)}'`
); );
window.location.href = environment.ssoSignIn + hashLocalData(name); window.location.href = environment.ssoSignIn + hashLocalData(name) + "/";
} }
/** /**
* Request SSO Disconnect * Request SSO Disconnect