build: Fichiers de build générés - Ajout des fichiers TypeScript compilés et des déclarations de types

This commit is contained in:
Matthieu
2025-07-29 21:04:35 +02:00
parent e145b2c1ff
commit 1dbbf2b8ec
103 changed files with 10936 additions and 0 deletions

373
dist/pieces/pieces.controller.d.ts vendored Normal file
View File

@@ -0,0 +1,373 @@
import { PiecesService } from './pieces.service';
import { CreatePieceDto, UpdatePieceDto } from '../shared/dto/piece.dto';
export declare class PiecesController {
private readonly piecesService;
constructor(piecesService: PiecesService);
create(createPieceDto: CreatePieceDto): Promise<{
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
}>;
findAll(): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
})[]>;
findByMachine(machineId: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
})[]>;
findByComposant(composantId: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
})[]>;
findOne(id: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
}) | null>;
update(id: string, updatePieceDto: UpdatePieceDto): Promise<{
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
}>;
remove(id: string): Promise<{
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
}>;
}

100
dist/pieces/pieces.controller.js vendored Normal file
View File

@@ -0,0 +1,100 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PiecesController = void 0;
const common_1 = require("@nestjs/common");
const pieces_service_1 = require("./pieces.service");
const piece_dto_1 = require("../shared/dto/piece.dto");
let PiecesController = class PiecesController {
piecesService;
constructor(piecesService) {
this.piecesService = piecesService;
}
create(createPieceDto) {
return this.piecesService.create(createPieceDto);
}
findAll() {
return this.piecesService.findAll();
}
findByMachine(machineId) {
return this.piecesService.findByMachine(machineId);
}
findByComposant(composantId) {
return this.piecesService.findByComposant(composantId);
}
findOne(id) {
return this.piecesService.findOne(id);
}
update(id, updatePieceDto) {
return this.piecesService.update(id, updatePieceDto);
}
remove(id) {
return this.piecesService.remove(id);
}
};
exports.PiecesController = PiecesController;
__decorate([
(0, common_1.Post)(),
__param(0, (0, common_1.Body)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [piece_dto_1.CreatePieceDto]),
__metadata("design:returntype", void 0)
], PiecesController.prototype, "create", null);
__decorate([
(0, common_1.Get)(),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], PiecesController.prototype, "findAll", null);
__decorate([
(0, common_1.Get)('machine/:machineId'),
__param(0, (0, common_1.Param)('machineId')),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], PiecesController.prototype, "findByMachine", null);
__decorate([
(0, common_1.Get)('composant/:composantId'),
__param(0, (0, common_1.Param)('composantId')),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], PiecesController.prototype, "findByComposant", null);
__decorate([
(0, common_1.Get)(':id'),
__param(0, (0, common_1.Param)('id')),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], PiecesController.prototype, "findOne", null);
__decorate([
(0, common_1.Patch)(':id'),
__param(0, (0, common_1.Param)('id')),
__param(1, (0, common_1.Body)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String, piece_dto_1.UpdatePieceDto]),
__metadata("design:returntype", void 0)
], PiecesController.prototype, "update", null);
__decorate([
(0, common_1.Delete)(':id'),
__param(0, (0, common_1.Param)('id')),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], PiecesController.prototype, "remove", null);
exports.PiecesController = PiecesController = __decorate([
(0, common_1.Controller)('pieces'),
__metadata("design:paramtypes", [pieces_service_1.PiecesService])
], PiecesController);
//# sourceMappingURL=pieces.controller.js.map

1
dist/pieces/pieces.controller.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"pieces.controller.js","sourceRoot":"","sources":["../../src/pieces/pieces.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAmF;AACnF,qDAAiD;AACjD,uDAAyE;AAGlE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACE;IAA7B,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAG7D,MAAM,CAAS,cAA8B;QAC3C,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACnD,CAAC;IAGD,OAAO;QACL,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;IACtC,CAAC;IAGD,aAAa,CAAqB,SAAiB;QACjD,OAAO,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;IAGD,eAAe,CAAuB,WAAmB;QACvD,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;IACzD,CAAC;IAGD,OAAO,CAAc,EAAU;QAC7B,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;IAGD,MAAM,CAAc,EAAU,EAAU,cAA8B;QACpE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;IACvD,CAAC;IAGD,MAAM,CAAc,EAAU;QAC5B,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;CACF,CAAA;AArCY,4CAAgB;AAI3B;IADC,IAAA,aAAI,GAAE;IACC,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAiB,0BAAc;;8CAE5C;AAGD;IADC,IAAA,YAAG,GAAE;;;;+CAGL;AAGD;IADC,IAAA,YAAG,EAAC,oBAAoB,CAAC;IACX,WAAA,IAAA,cAAK,EAAC,WAAW,CAAC,CAAA;;;;qDAEhC;AAGD;IADC,IAAA,YAAG,EAAC,wBAAwB,CAAC;IACb,WAAA,IAAA,cAAK,EAAC,aAAa,CAAC,CAAA;;;;uDAEpC;AAGD;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;IACF,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;+CAEnB;AAGD;IADC,IAAA,cAAK,EAAC,KAAK,CAAC;IACL,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAiB,0BAAc;;8CAErE;AAGD;IADC,IAAA,eAAM,EAAC,KAAK,CAAC;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;8CAElB;2BApCU,gBAAgB;IAD5B,IAAA,mBAAU,EAAC,QAAQ,CAAC;qCAEyB,8BAAa;GAD9C,gBAAgB,CAqC5B"}

2
dist/pieces/pieces.module.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare class PiecesModule {
}

22
dist/pieces/pieces.module.js vendored Normal file
View File

@@ -0,0 +1,22 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PiecesModule = void 0;
const common_1 = require("@nestjs/common");
const pieces_controller_1 = require("./pieces.controller");
const pieces_service_1 = require("./pieces.service");
let PiecesModule = class PiecesModule {
};
exports.PiecesModule = PiecesModule;
exports.PiecesModule = PiecesModule = __decorate([
(0, common_1.Module)({
controllers: [pieces_controller_1.PiecesController],
providers: [pieces_service_1.PiecesService]
})
], PiecesModule);
//# sourceMappingURL=pieces.module.js.map

1
dist/pieces/pieces.module.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"pieces.module.js","sourceRoot":"","sources":["../../src/pieces/pieces.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2DAAuD;AACvD,qDAAiD;AAM1C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAJxB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAC/B,SAAS,EAAE,CAAC,8BAAa,CAAC;KAC3B,CAAC;GACW,YAAY,CAAG"}

373
dist/pieces/pieces.service.d.ts vendored Normal file
View File

@@ -0,0 +1,373 @@
import { PrismaService } from '../prisma/prisma.service';
import { CreatePieceDto, UpdatePieceDto } from '../shared/dto/piece.dto';
export declare class PiecesService {
private prisma;
constructor(prisma: PrismaService);
create(createPieceDto: CreatePieceDto): Promise<{
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
}>;
findAll(): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
})[]>;
findOne(id: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
}) | null>;
findByMachine(machineId: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
})[]>;
findByComposant(composantId: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
})[]>;
update(id: string, updatePieceDto: UpdatePieceDto): Promise<{
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: 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;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
} | 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;
}[];
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
}>;
remove(id: string): Promise<{
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
prestataire: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
}>;
}

97
dist/pieces/pieces.service.js vendored Normal file
View File

@@ -0,0 +1,97 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PiecesService = void 0;
const common_1 = require("@nestjs/common");
const prisma_service_1 = require("../prisma/prisma.service");
let PiecesService = class PiecesService {
prisma;
constructor(prisma) {
this.prisma = prisma;
}
async create(createPieceDto) {
return this.prisma.piece.create({
data: createPieceDto,
include: {
machine: true,
composant: true,
typePiece: true,
documents: true,
},
});
}
async findAll() {
return this.prisma.piece.findMany({
include: {
machine: true,
composant: true,
typePiece: true,
documents: true,
},
});
}
async findOne(id) {
return this.prisma.piece.findUnique({
where: { id },
include: {
machine: true,
composant: true,
typePiece: true,
documents: true,
},
});
}
async findByMachine(machineId) {
return this.prisma.piece.findMany({
where: { machineId },
include: {
machine: true,
composant: true,
typePiece: true,
documents: true,
},
});
}
async findByComposant(composantId) {
return this.prisma.piece.findMany({
where: { composantId },
include: {
machine: true,
composant: true,
typePiece: true,
documents: true,
},
});
}
async update(id, updatePieceDto) {
return this.prisma.piece.update({
where: { id },
data: updatePieceDto,
include: {
machine: true,
composant: true,
typePiece: true,
documents: true,
},
});
}
async remove(id) {
return this.prisma.piece.delete({
where: { id },
});
}
};
exports.PiecesService = PiecesService;
exports.PiecesService = PiecesService = __decorate([
(0, common_1.Injectable)(),
__metadata("design:paramtypes", [prisma_service_1.PrismaService])
], PiecesService);
//# sourceMappingURL=pieces.service.js.map

1
dist/pieces/pieces.service.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"pieces.service.js","sourceRoot":"","sources":["../../src/pieces/pieces.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6DAAyD;AAIlD,IAAM,aAAa,GAAnB,MAAM,aAAa;IACJ;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C,KAAK,CAAC,MAAM,CAAC,c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