[FEAT] update new archidata
This commit is contained in:
parent
80dfabcf48
commit
4d18438914
@ -8,7 +8,7 @@ import {ZodLocalDate} from "./local-date";
|
||||
import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete";
|
||||
|
||||
export const ZodAlbum = ZodGenericDataSoftDelete.extend({
|
||||
name: zod.string().max(256).optional(),
|
||||
name: zod.string().optional(),
|
||||
description: zod.string().optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
@ -30,7 +30,7 @@ export function isAlbum(data: any): data is Album {
|
||||
}
|
||||
}
|
||||
export const ZodAlbumWrite = ZodGenericDataSoftDeleteWrite.extend({
|
||||
name: zod.string().max(256).nullable().optional(),
|
||||
name: zod.string().nullable().optional(),
|
||||
description: zod.string().nullable().optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
|
@ -8,14 +8,14 @@ import {ZodLocalDate} from "./local-date";
|
||||
import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete";
|
||||
|
||||
export const ZodArtist = ZodGenericDataSoftDelete.extend({
|
||||
name: zod.string().max(256).optional(),
|
||||
name: zod.string().optional(),
|
||||
description: zod.string().optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
*/
|
||||
covers: zod.array(ZodObjectId).optional(),
|
||||
firstName: zod.string().max(256).optional(),
|
||||
surname: zod.string().max(256).optional(),
|
||||
firstName: zod.string().optional(),
|
||||
surname: zod.string().optional(),
|
||||
birth: ZodLocalDate.optional(),
|
||||
death: ZodLocalDate.optional(),
|
||||
|
||||
@ -33,14 +33,14 @@ export function isArtist(data: any): data is Artist {
|
||||
}
|
||||
}
|
||||
export const ZodArtistWrite = ZodGenericDataSoftDeleteWrite.extend({
|
||||
name: zod.string().max(256).nullable().optional(),
|
||||
name: zod.string().nullable().optional(),
|
||||
description: zod.string().nullable().optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
*/
|
||||
covers: zod.array(ZodObjectId).nullable().optional(),
|
||||
firstName: zod.string().max(256).nullable().optional(),
|
||||
surname: zod.string().max(256).nullable().optional(),
|
||||
firstName: zod.string().nullable().optional(),
|
||||
surname: zod.string().nullable().optional(),
|
||||
birth: ZodLocalDate.nullable().optional(),
|
||||
death: ZodLocalDate.nullable().optional(),
|
||||
|
||||
|
@ -7,7 +7,7 @@ import {ZodObjectId} from "./object-id";
|
||||
import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete";
|
||||
|
||||
export const ZodGender = ZodGenericDataSoftDelete.extend({
|
||||
name: zod.string().max(256).optional(),
|
||||
name: zod.string().optional(),
|
||||
description: zod.string().optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
@ -28,7 +28,7 @@ export function isGender(data: any): data is Gender {
|
||||
}
|
||||
}
|
||||
export const ZodGenderWrite = ZodGenericDataSoftDeleteWrite.extend({
|
||||
name: zod.string().max(256).nullable().optional(),
|
||||
name: zod.string().nullable().optional(),
|
||||
description: zod.string().nullable().optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
|
@ -24,9 +24,7 @@ export function isGenericDataSoftDelete(data: any): data is GenericDataSoftDelet
|
||||
return false;
|
||||
}
|
||||
}
|
||||
export const ZodGenericDataSoftDeleteWrite = ZodGenericDataWrite.extend({
|
||||
|
||||
});
|
||||
export const ZodGenericDataSoftDeleteWrite = ZodGenericDataWrite;
|
||||
|
||||
export type GenericDataSoftDeleteWrite = zod.infer<typeof ZodGenericDataSoftDeleteWrite>;
|
||||
|
||||
|
@ -25,9 +25,7 @@ export function isGenericData(data: any): data is GenericData {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
export const ZodGenericDataWrite = ZodGenericTimingWrite.extend({
|
||||
|
||||
});
|
||||
export const ZodGenericDataWrite = ZodGenericTimingWrite;
|
||||
|
||||
export type GenericDataWrite = zod.infer<typeof ZodGenericDataWrite>;
|
||||
|
||||
|
@ -7,7 +7,7 @@ import {ZodObjectId} from "./object-id";
|
||||
import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete";
|
||||
|
||||
export const ZodPlaylist = ZodGenericDataSoftDelete.extend({
|
||||
name: zod.string().max(256).optional(),
|
||||
name: zod.string().optional(),
|
||||
description: zod.string().optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
@ -29,7 +29,7 @@ export function isPlaylist(data: any): data is Playlist {
|
||||
}
|
||||
}
|
||||
export const ZodPlaylistWrite = ZodGenericDataSoftDeleteWrite.extend({
|
||||
name: zod.string().max(256).nullable().optional(),
|
||||
name: zod.string().nullable().optional(),
|
||||
description: zod.string().nullable().optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
|
@ -8,7 +8,7 @@ import {ZodLong} from "./long";
|
||||
import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generic-data-soft-delete";
|
||||
|
||||
export const ZodTrack = ZodGenericDataSoftDelete.extend({
|
||||
name: zod.string().max(256).optional(),
|
||||
name: zod.string().optional(),
|
||||
description: zod.string().optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
@ -34,7 +34,7 @@ export function isTrack(data: any): data is Track {
|
||||
}
|
||||
}
|
||||
export const ZodTrackWrite = ZodGenericDataSoftDeleteWrite.extend({
|
||||
name: zod.string().max(256).nullable().optional(),
|
||||
name: zod.string().nullable().optional(),
|
||||
description: zod.string().nullable().optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
|
@ -5,9 +5,7 @@ import { z as zod } from "zod";
|
||||
|
||||
import {ZodUser, ZodUserWrite } from "./user";
|
||||
|
||||
export const ZodUserKarusic = ZodUser.extend({
|
||||
|
||||
});
|
||||
export const ZodUserKarusic = ZodUser;
|
||||
|
||||
export type UserKarusic = zod.infer<typeof ZodUserKarusic>;
|
||||
|
||||
@ -20,9 +18,7 @@ export function isUserKarusic(data: any): data is UserKarusic {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
export const ZodUserKarusicWrite = ZodUserWrite.extend({
|
||||
|
||||
});
|
||||
export const ZodUserKarusicWrite = ZodUserWrite;
|
||||
|
||||
export type UserKarusicWrite = zod.infer<typeof ZodUserKarusicWrite>;
|
||||
|
||||
|
@ -8,7 +8,7 @@ import {ZodPartRight} from "./part-right";
|
||||
|
||||
export const ZodUserMe = zod.object({
|
||||
id: ZodLong,
|
||||
login: zod.string().max(255).optional(),
|
||||
login: zod.string().optional(),
|
||||
/**
|
||||
* Map<EntityName, Map<PartName, Right>>
|
||||
*/
|
||||
|
@ -10,7 +10,7 @@ import {ZodGenericDataSoftDelete, ZodGenericDataSoftDeleteWrite } from "./generi
|
||||
export const ZodUser = ZodGenericDataSoftDelete.extend({
|
||||
login: zod.string().min(3).max(128),
|
||||
lastConnection: ZodTimestamp.optional(),
|
||||
blocked: zod.boolean(),
|
||||
blocked: zod.boolean().optional(),
|
||||
blockedReason: zod.string().max(512).optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
@ -33,7 +33,7 @@ export function isUser(data: any): data is User {
|
||||
export const ZodUserWrite = ZodGenericDataSoftDeleteWrite.extend({
|
||||
login: zod.string().min(3).max(128).optional(),
|
||||
lastConnection: ZodTimestamp.nullable().optional(),
|
||||
blocked: zod.boolean(),
|
||||
blocked: zod.boolean().nullable().optional(),
|
||||
blockedReason: zod.string().max(512).nullable().optional(),
|
||||
/**
|
||||
* List of Id of the specific covers
|
||||
|
@ -92,12 +92,12 @@ export const DragNdrop = ({
|
||||
};
|
||||
|
||||
export type CenterIconProps = BoxProps & {
|
||||
icon: any;
|
||||
children: any;
|
||||
sizeIcon?: string;
|
||||
};
|
||||
|
||||
export const CenterIcon = ({
|
||||
icon: IconEl,
|
||||
children,
|
||||
sizeIcon = '15px',
|
||||
...rest
|
||||
}: CenterIconProps) => {
|
||||
@ -110,7 +110,7 @@ export const CenterIcon = ({
|
||||
top="50%"
|
||||
left="50%"
|
||||
transform="translate(-50%, -50%)"
|
||||
>{IconEl}</Box>
|
||||
>{children}</Box>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
@ -98,7 +98,7 @@ export function requestSignIn(name?: string): void {
|
||||
console.log(
|
||||
`Request sign-in: '${environment.ssoSignIn}' + '${hashLocalData(name)}'`
|
||||
);
|
||||
window.location.href = environment.ssoSignIn + hashLocalData(name);
|
||||
window.location.href = environment.ssoSignIn + hashLocalData(name) + "/";
|
||||
}
|
||||
/**
|
||||
* Request SSO Disconnect
|
||||
|
Loading…
x
Reference in New Issue
Block a user