feat(site): add document support

This commit is contained in:
Matthieu
2025-09-17 11:40:34 +02:00
parent 7671d4729d
commit 339f46ec24
30 changed files with 1044 additions and 508 deletions

View File

@@ -6,7 +6,11 @@ export declare class MachinesController {
create(createMachineDto: CreateMachineDto): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -27,10 +31,10 @@ export declare class MachinesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -38,6 +42,20 @@ export declare class MachinesController {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -59,9 +77,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -79,10 +97,10 @@ export declare class MachinesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -105,9 +123,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -148,19 +166,6 @@ export declare class MachinesController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -181,9 +186,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -200,7 +205,11 @@ export declare class MachinesController {
findAll(): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -221,10 +230,10 @@ export declare class MachinesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -232,6 +241,20 @@ export declare class MachinesController {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -253,9 +276,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -273,10 +296,10 @@ export declare class MachinesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -299,9 +322,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -349,9 +372,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -366,19 +389,6 @@ export declare class MachinesController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -399,9 +409,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -418,7 +428,11 @@ export declare class MachinesController {
findOne(id: string): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -439,10 +453,10 @@ export declare class MachinesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -450,6 +464,20 @@ export declare class MachinesController {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -471,9 +499,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -491,10 +519,10 @@ export declare class MachinesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -517,9 +545,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -567,9 +595,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -584,19 +612,6 @@ export declare class MachinesController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -617,9 +632,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -636,7 +651,11 @@ export declare class MachinesController {
update(id: string, updateMachineDto: UpdateMachineDto): Promise<{
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -657,10 +676,10 @@ export declare class MachinesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -668,6 +687,20 @@ export declare class MachinesController {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: {
name: string;
id: string;
@@ -684,10 +717,10 @@ export declare class MachinesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: {
name: string;
@@ -728,19 +761,6 @@ export declare class MachinesController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -761,9 +781,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -792,7 +812,11 @@ export declare class MachinesController {
addMissingCustomFields(id: string): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -813,10 +837,10 @@ export declare class MachinesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -824,6 +848,20 @@ export declare class MachinesController {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -845,9 +883,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -865,10 +903,10 @@ export declare class MachinesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -891,9 +929,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -941,9 +979,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -958,19 +996,6 @@ export declare class MachinesController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -991,9 +1016,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;