384 lines
12 KiB
TypeScript
384 lines
12 KiB
TypeScript
import { PrismaService } from '../prisma/prisma.service';
|
|
import { CreateDocumentDto, UpdateDocumentDto } from '../shared/dto/document.dto';
|
|
export declare class DocumentsService {
|
|
private prisma;
|
|
constructor(prisma: PrismaService);
|
|
create(createDocumentDto: CreateDocumentDto): Promise<{
|
|
machine: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
siteId: string;
|
|
typeMachineId: string | null;
|
|
} | null;
|
|
composant: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
parentComposantId: string | null;
|
|
typeComposantId: string | null;
|
|
} | null;
|
|
piece: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
composantId: string | null;
|
|
typePieceId: string | null;
|
|
} | null;
|
|
} & {
|
|
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;
|
|
}>;
|
|
findAll(): Promise<({
|
|
machine: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
siteId: string;
|
|
typeMachineId: string | null;
|
|
} | null;
|
|
composant: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
parentComposantId: string | null;
|
|
typeComposantId: string | null;
|
|
} | null;
|
|
piece: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
composantId: string | null;
|
|
typePieceId: string | null;
|
|
} | null;
|
|
} & {
|
|
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;
|
|
})[]>;
|
|
findOne(id: string): Promise<({
|
|
machine: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
siteId: string;
|
|
typeMachineId: string | null;
|
|
} | null;
|
|
composant: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
parentComposantId: string | null;
|
|
typeComposantId: string | null;
|
|
} | null;
|
|
piece: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
composantId: string | null;
|
|
typePieceId: string | null;
|
|
} | null;
|
|
} & {
|
|
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;
|
|
}) | null>;
|
|
findByMachine(machineId: string): Promise<({
|
|
machine: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
siteId: string;
|
|
typeMachineId: string | null;
|
|
} | null;
|
|
composant: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
parentComposantId: string | null;
|
|
typeComposantId: string | null;
|
|
} | null;
|
|
piece: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
composantId: string | null;
|
|
typePieceId: string | null;
|
|
} | null;
|
|
} & {
|
|
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;
|
|
})[]>;
|
|
findByComposant(composantId: string): Promise<({
|
|
machine: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
siteId: string;
|
|
typeMachineId: string | null;
|
|
} | null;
|
|
composant: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
parentComposantId: string | null;
|
|
typeComposantId: string | null;
|
|
} | null;
|
|
piece: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
composantId: string | null;
|
|
typePieceId: string | null;
|
|
} | null;
|
|
} & {
|
|
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;
|
|
})[]>;
|
|
findByPiece(pieceId: string): Promise<({
|
|
machine: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
siteId: string;
|
|
typeMachineId: string | null;
|
|
} | null;
|
|
composant: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
parentComposantId: string | null;
|
|
typeComposantId: string | null;
|
|
} | null;
|
|
piece: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
composantId: string | null;
|
|
typePieceId: string | null;
|
|
} | null;
|
|
} & {
|
|
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;
|
|
})[]>;
|
|
update(id: string, updateDocumentDto: UpdateDocumentDto): Promise<{
|
|
machine: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
siteId: string;
|
|
typeMachineId: string | null;
|
|
} | null;
|
|
composant: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
parentComposantId: string | null;
|
|
typeComposantId: string | null;
|
|
} | null;
|
|
piece: {
|
|
name: string;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
reference: string | null;
|
|
constructeur: string | null;
|
|
prix: import("@prisma/client/runtime/library").Decimal | null;
|
|
emplacement: string | null;
|
|
machineId: string | null;
|
|
composantId: string | null;
|
|
typePieceId: string | null;
|
|
} | null;
|
|
} & {
|
|
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;
|
|
}>;
|
|
remove(id: string): Promise<{
|
|
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;
|
|
}>;
|
|
}
|