feat: add profiles session API
This commit is contained in:
6
dist/app.module.js
vendored
6
dist/app.module.js
vendored
@@ -19,6 +19,9 @@ const pieces_module_1 = require("./pieces/pieces.module");
|
||||
const documents_module_1 = require("./documents/documents.module");
|
||||
const types_module_1 = require("./types/types.module");
|
||||
const custom_fields_module_1 = require("./custom-fields/custom-fields.module");
|
||||
const constructeurs_module_1 = require("./constructeurs/constructeurs.module");
|
||||
const profiles_module_1 = require("./profiles/profiles.module");
|
||||
const session_module_1 = require("./session/session.module");
|
||||
let AppModule = class AppModule {
|
||||
};
|
||||
exports.AppModule = AppModule;
|
||||
@@ -36,6 +39,9 @@ exports.AppModule = AppModule = __decorate([
|
||||
documents_module_1.DocumentsModule,
|
||||
types_module_1.TypesModule,
|
||||
custom_fields_module_1.CustomFieldsModule,
|
||||
constructeurs_module_1.ConstructeursModule,
|
||||
profiles_module_1.ProfilesModule,
|
||||
session_module_1.SessionModule,
|
||||
],
|
||||
controllers: [app_controller_1.AppController],
|
||||
providers: [app_service_1.AppService],
|
||||
|
||||
2
dist/app.module.js.map
vendored
2
dist/app.module.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,0DAAsD;AACtD,qDAAiD;AACjD,+CAA2C;AAC3C,uDAAmD;AACnD,gEAA4D;AAC5D,sEAAkE;AAClE,0DAAsD;AACtD,mEAA+D;AAC/D,uDAAmD;AACnD,+EAA0E;AAmBnE,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAjBrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,qBAAY,CAAC,OAAO,CAAC;gBACnB,QAAQ,EAAE,IAAI;aACf,CAAC;YACF,4BAAY;YACZ,0BAAW;YACX,gCAAc;YACd,oCAAgB;YAChB,4BAAY;YACZ,kCAAe;YACf,0BAAW;YACX,yCAAkB;SACnB;QACD,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;KACxB,CAAC;GACW,SAAS,CAAG"}
|
||||
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,0DAAsD;AACtD,qDAAiD;AACjD,+CAA2C;AAC3C,uDAAmD;AACnD,gEAA4D;AAC5D,sEAAkE;AAClE,0DAAsD;AACtD,mEAA+D;AAC/D,uDAAmD;AACnD,+EAA0E;AAC1E,+EAA2E;AAC3E,gEAA4D;AAC5D,6DAAyD;AAsBlD,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IApBrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,qBAAY,CAAC,OAAO,CAAC;gBACnB,QAAQ,EAAE,IAAI;aACf,CAAC;YACF,4BAAY;YACZ,0BAAW;YACX,gCAAc;YACd,oCAAgB;YAChB,4BAAY;YACZ,kCAAe;YACf,0BAAW;YACX,yCAAkB;YAClB,0CAAmB;YACnB,gCAAc;YACd,8BAAa;SACd;QACD,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;KACxB,CAAC;GACW,SAAS,CAAG"}
|
||||
458
dist/composants/composants.controller.d.ts
vendored
458
dist/composants/composants.controller.d.ts
vendored
File diff suppressed because it is too large
Load Diff
458
dist/composants/composants.service.d.ts
vendored
458
dist/composants/composants.service.d.ts
vendored
File diff suppressed because it is too large
Load Diff
22
dist/composants/composants.service.js
vendored
22
dist/composants/composants.service.js
vendored
@@ -24,6 +24,7 @@ let ComposantsService = class ComposantsService {
|
||||
machine: true,
|
||||
parentComposant: true,
|
||||
typeComposant: true,
|
||||
constructeur: true,
|
||||
sousComposants: {
|
||||
include: {
|
||||
typeComposant: true,
|
||||
@@ -41,6 +42,7 @@ let ComposantsService = class ComposantsService {
|
||||
machine: true,
|
||||
parentComposant: true,
|
||||
typeComposant: true,
|
||||
constructeur: true,
|
||||
customFieldValues: {
|
||||
include: {
|
||||
customField: true,
|
||||
@@ -61,8 +63,10 @@ let ComposantsService = class ComposantsService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
pieces: {
|
||||
@@ -72,6 +76,7 @@ let ComposantsService = class ComposantsService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
documents: true,
|
||||
@@ -85,6 +90,7 @@ let ComposantsService = class ComposantsService {
|
||||
machine: true,
|
||||
parentComposant: true,
|
||||
typeComposant: true,
|
||||
constructeur: true,
|
||||
customFieldValues: {
|
||||
include: {
|
||||
customField: true,
|
||||
@@ -105,8 +111,10 @@ let ComposantsService = class ComposantsService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
pieces: {
|
||||
@@ -116,6 +124,7 @@ let ComposantsService = class ComposantsService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
documents: true,
|
||||
@@ -129,10 +138,12 @@ let ComposantsService = class ComposantsService {
|
||||
machine: true,
|
||||
parentComposant: true,
|
||||
typeComposant: true,
|
||||
constructeur: true,
|
||||
sousComposants: {
|
||||
include: {
|
||||
typeComposant: true,
|
||||
pieces: true,
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
pieces: {
|
||||
@@ -142,6 +153,7 @@ let ComposantsService = class ComposantsService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
customFieldValues: {
|
||||
@@ -161,6 +173,7 @@ let ComposantsService = class ComposantsService {
|
||||
},
|
||||
include: {
|
||||
typeComposant: true,
|
||||
constructeur: true,
|
||||
customFieldValues: {
|
||||
include: {
|
||||
customField: true,
|
||||
@@ -169,6 +182,7 @@ let ComposantsService = class ComposantsService {
|
||||
sousComposants: {
|
||||
include: {
|
||||
typeComposant: true,
|
||||
constructeur: true,
|
||||
customFieldValues: {
|
||||
include: {
|
||||
customField: true,
|
||||
@@ -181,11 +195,13 @@ let ComposantsService = class ComposantsService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
sousComposants: {
|
||||
include: {
|
||||
typeComposant: true,
|
||||
constructeur: true,
|
||||
customFieldValues: {
|
||||
include: {
|
||||
customField: true,
|
||||
@@ -198,6 +214,7 @@ let ComposantsService = class ComposantsService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -211,6 +228,7 @@ let ComposantsService = class ComposantsService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -225,6 +243,7 @@ let ComposantsService = class ComposantsService {
|
||||
machine: true,
|
||||
parentComposant: true,
|
||||
typeComposant: true,
|
||||
constructeur: true,
|
||||
customFieldValues: {
|
||||
include: {
|
||||
customField: true,
|
||||
@@ -233,6 +252,7 @@ let ComposantsService = class ComposantsService {
|
||||
sousComposants: {
|
||||
include: {
|
||||
typeComposant: true,
|
||||
constructeur: true,
|
||||
customFieldValues: {
|
||||
include: {
|
||||
customField: true,
|
||||
@@ -245,6 +265,7 @@ let ComposantsService = class ComposantsService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -256,6 +277,7 @@ let ComposantsService = class ComposantsService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
documents: true,
|
||||
|
||||
2
dist/composants/composants.service.js.map
vendored
2
dist/composants/composants.service.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"composants.service.js","sourceRoot":"","sources":["../../src/composants/composants.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6DAAyD;AAIlD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACR;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C,KAAK,CAAC,MAAM,CAAC,kBAAsC;QACjD,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;YAClC,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,IAAI;gBACnB,cAAc,EAAE;oBACd,OAAO,EAAE;wBACP,aAAa,EAAE,IAAI;wBACnB,MAAM,EAAE,IAAI;qBACb;iBACF;gBACD,MAAM,EAAE,IAAI;gBACZ,SAAS,EAAE,IAAI;aAChB;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;YACpC,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,IAAI;gBACnB,iBAAiB,EAAE;oBACjB,OAAO,EAAE;wBACP,WAAW,EAAE,IAAI;qBAClB;iBACF;gBACD,cAAc,EAAE;oBACd,OAAO,EAAE;wBACP,aAAa,EAAE,IAAI;wBACnB,iBAAiB,EAAE;4BACjB,OAAO,EAAE;gCACP,WAAW,EAAE,IAAI;6BAClB;yBACF;wBACD,MAAM,EAAE;4BACN,OAAO,EAAE;gCACP,iBAAiB,EAAE;oCACjB,OAAO,EAAE;wCACP,WAAW,EAAE,IAAI;qCAClB;iCACF;6BACF;yBACF;qBACF;iBACF;gBACD,MAAM,EAAE;oBACN,OAAO,EAA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F;aACF;SACF,CAAC,CAAC;QAEH,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,kBAAsC;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;YAClC,KAAK,EAAE,EAAE,EAAE,EAAE;YACb,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,IAAI;gBACnB,iBAAiB,EAAE;oBACjB,OAAO,EAAE;wBACP,WAAW,EAAE,IAAI;qBAClB;iBACF;gBACD,cAAc,EAAE;oBACd,OAAO,EAAE;wBACP,aAAa,EAAE,IAAI;wBACnB,iBAAiB,EAAE;4BACjB,OAAO,EAAE;gCACP,WAAW,EAAE,IAAI;6BAClB;yBACF;wBACD,MAAM,EAAE;4BACN,OAAO,EAAE;gCACP,iBAAiB,EAAE;oCACjB,OAAO,EAAE;wCACP,WAAW,EAAE,IAAI;qCAClB;iCACF;6BACF;yBACF;qBACF;iBACF;gBACD,MAAM,EAAE;oBACN,OAAO,EAAE;wBACP,iBAAiB,EAAE;4BACjB,OAAO,EAAE;gCACP,WAAW,EAAE,IAAI;6BAClB;yBACF;qBACF;iBACF;gBACD,SAAS,EAAE,IAAI;aAChB;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;YAClC,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AArQY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAEiB,8BAAa;GAD9B,iBAAiB,CAqQ7B"}
|
||||
{"version":3,"file":"composants.service.js","sourceRoot":"","sources":["../../src/composants/composants.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C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E,IAAI;aAChB;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;YAClC,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA3RY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAEiB,8BAAa;GAD9B,iBAAiB,CA2R7B"}
|
||||
46
dist/constructeurs/constructeurs.controller.d.ts
vendored
Normal file
46
dist/constructeurs/constructeurs.controller.d.ts
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import { ConstructeursService } from './constructeurs.service';
|
||||
import { CreateConstructeurDto, UpdateConstructeurDto } from '../shared/dto/constructeur.dto';
|
||||
export declare class ConstructeursController {
|
||||
private readonly constructeursService;
|
||||
constructor(constructeursService: ConstructeursService);
|
||||
create(payload: CreateConstructeurDto): Promise<{
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
}>;
|
||||
findAll(search?: string): Promise<{
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
}[]>;
|
||||
findOne(id: string): Promise<{
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null>;
|
||||
update(id: string, payload: UpdateConstructeurDto): Promise<{
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
}>;
|
||||
remove(id: string): Promise<{
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
}>;
|
||||
}
|
||||
81
dist/constructeurs/constructeurs.controller.js
vendored
Normal file
81
dist/constructeurs/constructeurs.controller.js
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
"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.ConstructeursController = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const constructeurs_service_1 = require("./constructeurs.service");
|
||||
const constructeur_dto_1 = require("../shared/dto/constructeur.dto");
|
||||
let ConstructeursController = class ConstructeursController {
|
||||
constructeursService;
|
||||
constructor(constructeursService) {
|
||||
this.constructeursService = constructeursService;
|
||||
}
|
||||
create(payload) {
|
||||
return this.constructeursService.create(payload);
|
||||
}
|
||||
findAll(search) {
|
||||
return this.constructeursService.findAll(search);
|
||||
}
|
||||
findOne(id) {
|
||||
return this.constructeursService.findOne(id);
|
||||
}
|
||||
update(id, payload) {
|
||||
return this.constructeursService.update(id, payload);
|
||||
}
|
||||
remove(id) {
|
||||
return this.constructeursService.remove(id);
|
||||
}
|
||||
};
|
||||
exports.ConstructeursController = ConstructeursController;
|
||||
__decorate([
|
||||
(0, common_1.Post)(),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [constructeur_dto_1.CreateConstructeurDto]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], ConstructeursController.prototype, "create", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)(),
|
||||
__param(0, (0, common_1.Query)('search')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], ConstructeursController.prototype, "findAll", 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)
|
||||
], ConstructeursController.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, constructeur_dto_1.UpdateConstructeurDto]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], ConstructeursController.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)
|
||||
], ConstructeursController.prototype, "remove", null);
|
||||
exports.ConstructeursController = ConstructeursController = __decorate([
|
||||
(0, common_1.Controller)('constructeurs'),
|
||||
__metadata("design:paramtypes", [constructeurs_service_1.ConstructeursService])
|
||||
], ConstructeursController);
|
||||
//# sourceMappingURL=constructeurs.controller.js.map
|
||||
1
dist/constructeurs/constructeurs.controller.js.map
vendored
Normal file
1
dist/constructeurs/constructeurs.controller.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constructeurs.controller.js","sourceRoot":"","sources":["../../src/constructeurs/constructeurs.controller.ts"],"names":[],"mappings":";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AAC;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;qDAElB;kCA1BU,uBAAuB;IADnC,IAAA,mBAAU,EAAC,eAAe,CAAC;qCAEyB,4CAAoB;GAD5D,uBAAuB,CA2BnC"}
|
||||
2
dist/constructeurs/constructeurs.module.d.ts
vendored
Normal file
2
dist/constructeurs/constructeurs.module.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare class ConstructeursModule {
|
||||
}
|
||||
23
dist/constructeurs/constructeurs.module.js
vendored
Normal file
23
dist/constructeurs/constructeurs.module.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"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.ConstructeursModule = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const constructeurs_service_1 = require("./constructeurs.service");
|
||||
const constructeurs_controller_1 = require("./constructeurs.controller");
|
||||
let ConstructeursModule = class ConstructeursModule {
|
||||
};
|
||||
exports.ConstructeursModule = ConstructeursModule;
|
||||
exports.ConstructeursModule = ConstructeursModule = __decorate([
|
||||
(0, common_1.Module)({
|
||||
controllers: [constructeurs_controller_1.ConstructeursController],
|
||||
providers: [constructeurs_service_1.ConstructeursService],
|
||||
exports: [constructeurs_service_1.ConstructeursService],
|
||||
})
|
||||
], ConstructeursModule);
|
||||
//# sourceMappingURL=constructeurs.module.js.map
|
||||
1
dist/constructeurs/constructeurs.module.js.map
vendored
Normal file
1
dist/constructeurs/constructeurs.module.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constructeurs.module.js","sourceRoot":"","sources":["../../src/constructeurs/constructeurs.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAuC;AACvC,mEAA8D;AAC9D,yEAAoE;AAO7D,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAL/B,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,kDAAuB,CAAC;QACtC,SAAS,EAAE,CAAC,4CAAoB,CAAC;QACjC,OAAO,EAAE,CAAC,4CAAoB,CAAC;KAChC,CAAC;GACW,mBAAmB,CAAG"}
|
||||
47
dist/constructeurs/constructeurs.service.d.ts
vendored
Normal file
47
dist/constructeurs/constructeurs.service.d.ts
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
import { CreateConstructeurDto, UpdateConstructeurDto } from '../shared/dto/constructeur.dto';
|
||||
export declare class ConstructeursService {
|
||||
private prisma;
|
||||
constructor(prisma: PrismaService);
|
||||
private buildSearchWhere;
|
||||
create(data: CreateConstructeurDto): Promise<{
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
}>;
|
||||
findAll(search?: string): Promise<{
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
}[]>;
|
||||
findOne(id: string): Promise<{
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null>;
|
||||
update(id: string, data: UpdateConstructeurDto): Promise<{
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
}>;
|
||||
remove(id: string): Promise<{
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
}>;
|
||||
}
|
||||
77
dist/constructeurs/constructeurs.service.js
vendored
Normal file
77
dist/constructeurs/constructeurs.service.js
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
"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.ConstructeursService = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const prisma_service_1 = require("../prisma/prisma.service");
|
||||
let ConstructeursService = class ConstructeursService {
|
||||
prisma;
|
||||
constructor(prisma) {
|
||||
this.prisma = prisma;
|
||||
}
|
||||
buildSearchWhere(search) {
|
||||
if (!search)
|
||||
return {};
|
||||
const term = search.trim();
|
||||
if (!term)
|
||||
return {};
|
||||
return {
|
||||
OR: [
|
||||
{ name: { contains: term, mode: 'insensitive' } },
|
||||
{ email: { contains: term, mode: 'insensitive' } },
|
||||
{ phone: { contains: term, mode: 'insensitive' } },
|
||||
],
|
||||
};
|
||||
}
|
||||
async create(data) {
|
||||
return this.prisma.constructeur.create({
|
||||
data: {
|
||||
...data,
|
||||
name: data.name.trim(),
|
||||
email: data.email?.trim(),
|
||||
phone: data.phone?.trim(),
|
||||
},
|
||||
});
|
||||
}
|
||||
async findAll(search) {
|
||||
return this.prisma.constructeur.findMany({
|
||||
where: this.buildSearchWhere(search),
|
||||
orderBy: { name: 'asc' },
|
||||
});
|
||||
}
|
||||
async findOne(id) {
|
||||
return this.prisma.constructeur.findUnique({
|
||||
where: { id },
|
||||
});
|
||||
}
|
||||
async update(id, data) {
|
||||
return this.prisma.constructeur.update({
|
||||
where: { id },
|
||||
data: {
|
||||
...data,
|
||||
name: data.name?.trim(),
|
||||
email: data.email?.trim(),
|
||||
phone: data.phone?.trim(),
|
||||
},
|
||||
});
|
||||
}
|
||||
async remove(id) {
|
||||
return this.prisma.constructeur.delete({
|
||||
where: { id },
|
||||
});
|
||||
}
|
||||
};
|
||||
exports.ConstructeursService = ConstructeursService;
|
||||
exports.ConstructeursService = ConstructeursService = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [prisma_service_1.PrismaService])
|
||||
], ConstructeursService);
|
||||
//# sourceMappingURL=constructeurs.service.js.map
|
||||
1
dist/constructeurs/constructeurs.service.js.map
vendored
Normal file
1
dist/constructeurs/constructeurs.service.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constructeurs.service.js","sourceRoot":"","sources":["../../src/constructeurs/constructeurs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA2C;AAC3C,6DAAwD;AAKjD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACX;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAErC,gBAAgB,CAAC,MAAe;QACtC,IAAI,CAAC,MAAM;YAAE,OAAO,EAAE,CAAA;QACtB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,CAAA;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAA;QACpB,OAAO;YACL,EAAE,EAAE;gBACF,EAAE,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AE;gBACvB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;gBACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;aAC1B;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC;YACrC,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAzDY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAEiB,8BAAa;GAD9B,oBAAoB,CAyDhC"}
|
||||
44
dist/custom-fields/custom-fields.controller.d.ts
vendored
44
dist/custom-fields/custom-fields.controller.d.ts
vendored
@@ -10,22 +10,22 @@ export declare class CustomFieldsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
}>;
|
||||
findCustomFieldValuesByEntity(entityType: string, entityId: string): Promise<({
|
||||
customField: {
|
||||
@@ -34,22 +34,22 @@ export declare class CustomFieldsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
})[]>;
|
||||
findOneCustomFieldValue(id: string): Promise<({
|
||||
customField: {
|
||||
@@ -58,22 +58,22 @@ export declare class CustomFieldsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
}) | null>;
|
||||
updateCustomFieldValue(id: string, updateCustomFieldValueDto: UpdateCustomFieldValueDto): Promise<{
|
||||
customField: {
|
||||
@@ -82,32 +82,32 @@ export declare class CustomFieldsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
}>;
|
||||
removeCustomFieldValue(id: string): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
}>;
|
||||
upsertCustomFieldValue(body: {
|
||||
customFieldId: string;
|
||||
@@ -121,21 +121,21 @@ export declare class CustomFieldsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
44
dist/custom-fields/custom-fields.service.d.ts
vendored
44
dist/custom-fields/custom-fields.service.d.ts
vendored
@@ -10,22 +10,22 @@ export declare class CustomFieldsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
}>;
|
||||
findCustomFieldValuesByEntity(entityType: string, entityId: string): Promise<({
|
||||
customField: {
|
||||
@@ -34,22 +34,22 @@ export declare class CustomFieldsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
})[]>;
|
||||
findOneCustomFieldValue(id: string): Promise<({
|
||||
customField: {
|
||||
@@ -58,22 +58,22 @@ export declare class CustomFieldsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
}) | null>;
|
||||
updateCustomFieldValue(id: string, updateCustomFieldValueDto: UpdateCustomFieldValueDto): Promise<{
|
||||
customField: {
|
||||
@@ -82,32 +82,32 @@ export declare class CustomFieldsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
}>;
|
||||
removeCustomFieldValue(id: string): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
}>;
|
||||
upsertCustomFieldValue(customFieldId: string, entityType: string, entityId: string, value: string): Promise<{
|
||||
customField: {
|
||||
@@ -116,21 +116,21 @@ export declare class CustomFieldsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
value: string;
|
||||
customFieldId: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
82
dist/documents/documents.controller.d.ts
vendored
82
dist/documents/documents.controller.d.ts
vendored
@@ -21,11 +21,11 @@ export declare class DocumentsController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -33,12 +33,12 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -46,9 +46,9 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -61,11 +61,11 @@ export declare class DocumentsController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}>;
|
||||
findAll(): Promise<({
|
||||
site: {
|
||||
@@ -85,11 +85,11 @@ export declare class DocumentsController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -97,12 +97,12 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -110,9 +110,9 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -125,11 +125,11 @@ export declare class DocumentsController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
})[]>;
|
||||
findByMachine(machineId: string): Promise<({
|
||||
site: {
|
||||
@@ -149,11 +149,11 @@ export declare class DocumentsController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -161,12 +161,12 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -174,9 +174,9 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -189,11 +189,11 @@ export declare class DocumentsController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
})[]>;
|
||||
findByComposant(composantId: string): Promise<({
|
||||
site: {
|
||||
@@ -213,11 +213,11 @@ export declare class DocumentsController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -225,12 +225,12 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -238,9 +238,9 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -253,11 +253,11 @@ export declare class DocumentsController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
})[]>;
|
||||
findByPiece(pieceId: string): Promise<({
|
||||
site: {
|
||||
@@ -277,11 +277,11 @@ export declare class DocumentsController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -289,12 +289,12 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -302,9 +302,9 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -317,11 +317,11 @@ export declare class DocumentsController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
})[]>;
|
||||
findBySite(siteId: string): Promise<({
|
||||
site: {
|
||||
@@ -341,11 +341,11 @@ export declare class DocumentsController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -353,12 +353,12 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -366,9 +366,9 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -381,11 +381,11 @@ export declare class DocumentsController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
})[]>;
|
||||
findOne(id: string): Promise<({
|
||||
site: {
|
||||
@@ -405,11 +405,11 @@ export declare class DocumentsController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -417,12 +417,12 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -430,9 +430,9 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -445,11 +445,11 @@ export declare class DocumentsController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}) | null>;
|
||||
update(id: string, updateDocumentDto: UpdateDocumentDto): Promise<{
|
||||
site: {
|
||||
@@ -469,11 +469,11 @@ export declare class DocumentsController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -481,12 +481,12 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -494,9 +494,9 @@ export declare class DocumentsController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -509,11 +509,11 @@ export declare class DocumentsController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}>;
|
||||
remove(id: string): Promise<{
|
||||
name: string;
|
||||
@@ -523,10 +523,10 @@ export declare class DocumentsController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}>;
|
||||
}
|
||||
|
||||
82
dist/documents/documents.service.d.ts
vendored
82
dist/documents/documents.service.d.ts
vendored
@@ -21,11 +21,11 @@ export declare class DocumentsService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -33,12 +33,12 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -46,9 +46,9 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -61,11 +61,11 @@ export declare class DocumentsService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}>;
|
||||
findAll(): Promise<({
|
||||
site: {
|
||||
@@ -85,11 +85,11 @@ export declare class DocumentsService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -97,12 +97,12 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -110,9 +110,9 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -125,11 +125,11 @@ export declare class DocumentsService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
})[]>;
|
||||
findOne(id: string): Promise<({
|
||||
site: {
|
||||
@@ -149,11 +149,11 @@ export declare class DocumentsService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -161,12 +161,12 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -174,9 +174,9 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -189,11 +189,11 @@ export declare class DocumentsService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}) | null>;
|
||||
findByMachine(machineId: string): Promise<({
|
||||
site: {
|
||||
@@ -213,11 +213,11 @@ export declare class DocumentsService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -225,12 +225,12 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -238,9 +238,9 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -253,11 +253,11 @@ export declare class DocumentsService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
})[]>;
|
||||
findByComposant(composantId: string): Promise<({
|
||||
site: {
|
||||
@@ -277,11 +277,11 @@ export declare class DocumentsService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -289,12 +289,12 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -302,9 +302,9 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -317,11 +317,11 @@ export declare class DocumentsService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
})[]>;
|
||||
findByPiece(pieceId: string): Promise<({
|
||||
site: {
|
||||
@@ -341,11 +341,11 @@ export declare class DocumentsService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -353,12 +353,12 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -366,9 +366,9 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -381,11 +381,11 @@ export declare class DocumentsService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
})[]>;
|
||||
findBySite(siteId: string): Promise<({
|
||||
site: {
|
||||
@@ -405,11 +405,11 @@ export declare class DocumentsService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -417,12 +417,12 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -430,9 +430,9 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -445,11 +445,11 @@ export declare class DocumentsService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
})[]>;
|
||||
update(id: string, updateDocumentDto: UpdateDocumentDto): Promise<{
|
||||
site: {
|
||||
@@ -469,11 +469,11 @@ export declare class DocumentsService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -481,12 +481,12 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
piece: {
|
||||
name: string;
|
||||
@@ -494,9 +494,9 @@ export declare class DocumentsService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -509,11 +509,11 @@ export declare class DocumentsService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}>;
|
||||
remove(id: string): Promise<{
|
||||
name: string;
|
||||
@@ -523,10 +523,10 @@ export declare class DocumentsService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}>;
|
||||
}
|
||||
|
||||
448
dist/machines/machines.controller.d.ts
vendored
448
dist/machines/machines.controller.d.ts
vendored
File diff suppressed because it is too large
Load Diff
449
dist/machines/machines.service.d.ts
vendored
449
dist/machines/machines.service.d.ts
vendored
File diff suppressed because it is too large
Load Diff
63
dist/machines/machines.service.js
vendored
63
dist/machines/machines.service.js
vendored
@@ -33,6 +33,7 @@ let MachinesService = class MachinesService {
|
||||
include: {
|
||||
site: true,
|
||||
typeMachine: true,
|
||||
constructeur: true,
|
||||
},
|
||||
});
|
||||
const components = typeMachine.components;
|
||||
@@ -55,6 +56,7 @@ let MachinesService = class MachinesService {
|
||||
customFields: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
composants: {
|
||||
include: {
|
||||
typeComposant: true,
|
||||
@@ -66,8 +68,10 @@ let MachinesService = class MachinesService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
pieces: {
|
||||
@@ -77,6 +81,7 @@ let MachinesService = class MachinesService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
customFieldValues: {
|
||||
@@ -123,7 +128,7 @@ let MachinesService = class MachinesService {
|
||||
data: {
|
||||
name: component.name,
|
||||
reference: component.reference || '',
|
||||
constructeur: component.constructeur || '',
|
||||
constructeurId: await this.resolveConstructeurId(prisma, component.constructeur),
|
||||
emplacement: component.emplacement || '',
|
||||
prix: component.prix || null,
|
||||
machineId,
|
||||
@@ -180,7 +185,7 @@ let MachinesService = class MachinesService {
|
||||
data: {
|
||||
name: piece.name,
|
||||
reference: piece.reference || '',
|
||||
constructeur: piece.constructeur || '',
|
||||
constructeurId: await this.resolveConstructeurId(prisma, piece.constructeur),
|
||||
emplacement: piece.emplacement || '',
|
||||
prix: piece.prix || null,
|
||||
composantId: createdComposant.id,
|
||||
@@ -217,6 +222,7 @@ let MachinesService = class MachinesService {
|
||||
data: {
|
||||
name: piece.name,
|
||||
machineId,
|
||||
constructeurId: await this.resolveConstructeurId(prisma, piece.constructeur),
|
||||
},
|
||||
});
|
||||
if (piece.customFields && piece.customFields.length > 0) {
|
||||
@@ -274,6 +280,7 @@ let MachinesService = class MachinesService {
|
||||
customFields: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
composants: {
|
||||
include: {
|
||||
typeComposant: true,
|
||||
@@ -283,6 +290,7 @@ let MachinesService = class MachinesService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
pieces: {
|
||||
include: {
|
||||
customFieldValues: {
|
||||
@@ -290,6 +298,7 @@ let MachinesService = class MachinesService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -301,6 +310,7 @@ let MachinesService = class MachinesService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
customFieldValues: {
|
||||
@@ -322,6 +332,7 @@ let MachinesService = class MachinesService {
|
||||
customFields: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
composants: {
|
||||
include: {
|
||||
typeComposant: true,
|
||||
@@ -331,6 +342,7 @@ let MachinesService = class MachinesService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
pieces: {
|
||||
include: {
|
||||
customFieldValues: {
|
||||
@@ -338,6 +350,7 @@ let MachinesService = class MachinesService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -349,6 +362,7 @@ let MachinesService = class MachinesService {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
},
|
||||
},
|
||||
customFieldValues: {
|
||||
@@ -371,14 +385,34 @@ let MachinesService = class MachinesService {
|
||||
customFields: true,
|
||||
},
|
||||
},
|
||||
constructeur: true,
|
||||
composants: {
|
||||
include: {
|
||||
typeComposant: true,
|
||||
sousComposants: true,
|
||||
pieces: true,
|
||||
constructeur: true,
|
||||
pieces: {
|
||||
include: {
|
||||
constructeur: true,
|
||||
customFieldValues: {
|
||||
include: {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
pieces: {
|
||||
include: {
|
||||
constructeur: true,
|
||||
customFieldValues: {
|
||||
include: {
|
||||
customField: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
pieces: true,
|
||||
customFieldValues: {
|
||||
include: {
|
||||
customField: true,
|
||||
@@ -388,6 +422,27 @@ let MachinesService = class MachinesService {
|
||||
},
|
||||
});
|
||||
}
|
||||
async resolveConstructeurId(prisma, rawName) {
|
||||
if (!rawName)
|
||||
return null;
|
||||
const name = String(rawName).trim();
|
||||
if (!name)
|
||||
return null;
|
||||
const existing = await prisma.constructeur.findFirst({
|
||||
where: {
|
||||
name: {
|
||||
equals: name,
|
||||
mode: 'insensitive',
|
||||
},
|
||||
},
|
||||
});
|
||||
if (existing)
|
||||
return existing.id;
|
||||
const created = await prisma.constructeur.create({
|
||||
data: { name },
|
||||
});
|
||||
return created.id;
|
||||
}
|
||||
async remove(id) {
|
||||
const machine = await this.prisma.machine.findUnique({
|
||||
where: { id },
|
||||
|
||||
2
dist/machines/machines.service.js.map
vendored
2
dist/machines/machines.service.js.map
vendored
File diff suppressed because one or more lines are too long
12
dist/main.js
vendored
12
dist/main.js
vendored
@@ -2,9 +2,21 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core_1 = require("@nestjs/core");
|
||||
const common_1 = require("@nestjs/common");
|
||||
const session = require("express-session");
|
||||
const app_module_1 = require("./app.module");
|
||||
async function bootstrap() {
|
||||
const app = await core_1.NestFactory.create(app_module_1.AppModule);
|
||||
app.use(session({
|
||||
secret: process.env.SESSION_SECRET || 'change-me',
|
||||
resave: false,
|
||||
saveUninitialized: false,
|
||||
cookie: {
|
||||
httpOnly: true,
|
||||
sameSite: process.env.SESSION_SAME_SITE ?? 'lax',
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
maxAge: Number(process.env.SESSION_MAX_AGE ?? 1000 * 60 * 60 * 24 * 7),
|
||||
},
|
||||
}));
|
||||
const allowedOrigins = process.env.CORS_ORIGIN
|
||||
? process.env.CORS_ORIGIN.split(',').map(origin => origin.trim())
|
||||
: ['http://localhost:3001'];
|
||||
|
||||
2
dist/main.js.map
vendored
2
dist/main.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,2CAAgD;AAChD,6CAAyC;AAEzC,KAAK,UAAU,SAAS;IACtB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAC,sBAAS,CAAC,CAAC;IAGhD,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW;QAC5C,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACjE,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC;IAE9B,GAAG,CAAC,UAAU,CAAC;QACb,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE;YAE3B,IAAI,CAAC,MAAM,IAAI,cAAc,CAAC,QAAQ,CAAC,MAAM,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KAAK,MAAM;QAC9E,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,KAAK,MAAM;KACvD,CAAC,CAAC,CAAC;IAEJ,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,KAAK,CAAC;IAClD,GAAG,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IAE/B,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9C,MAAM,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACvB,OAAO,CAAC,GAAG,CAAC,+CAA+C,IAAI,EAAE,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,gBAAgB,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,EAAE,CAAC,CAAC;AACvE,CAAC;AAED,SAAS,EAAE,CAAC"}
|
||||
110
dist/pieces/pieces.controller.d.ts
vendored
110
dist/pieces/pieces.controller.d.ts
vendored
@@ -17,11 +17,11 @@ export declare class PiecesController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -29,12 +29,20 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -44,11 +52,11 @@ export declare class PiecesController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -56,9 +64,9 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -77,11 +85,11 @@ export declare class PiecesController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -89,12 +97,20 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -104,11 +120,11 @@ export declare class PiecesController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -116,9 +132,9 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -137,11 +153,11 @@ export declare class PiecesController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -149,12 +165,20 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -164,11 +188,11 @@ export declare class PiecesController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -176,9 +200,9 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -197,11 +221,11 @@ export declare class PiecesController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -209,12 +233,20 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -224,11 +256,11 @@ export declare class PiecesController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -236,9 +268,9 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -257,11 +289,11 @@ export declare class PiecesController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -269,12 +301,20 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -284,11 +324,11 @@ export declare class PiecesController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -296,9 +336,9 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -317,11 +357,11 @@ export declare class PiecesController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -329,12 +369,20 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -344,11 +392,11 @@ export declare class PiecesController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -356,9 +404,9 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -369,9 +417,9 @@ export declare class PiecesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
|
||||
110
dist/pieces/pieces.service.d.ts
vendored
110
dist/pieces/pieces.service.d.ts
vendored
@@ -17,11 +17,11 @@ export declare class PiecesService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -29,12 +29,20 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -44,11 +52,11 @@ export declare class PiecesService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -56,9 +64,9 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -77,11 +85,11 @@ export declare class PiecesService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -89,12 +97,20 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -104,11 +120,11 @@ export declare class PiecesService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -116,9 +132,9 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -137,11 +153,11 @@ export declare class PiecesService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -149,12 +165,20 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -164,11 +188,11 @@ export declare class PiecesService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -176,9 +200,9 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -197,11 +221,11 @@ export declare class PiecesService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -209,12 +233,20 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -224,11 +256,11 @@ export declare class PiecesService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -236,9 +268,9 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -257,11 +289,11 @@ export declare class PiecesService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -269,12 +301,20 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -284,11 +324,11 @@ export declare class PiecesService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -296,9 +336,9 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -317,11 +357,11 @@ export declare class PiecesService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
} | null;
|
||||
composant: {
|
||||
name: string;
|
||||
@@ -329,12 +369,20 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
} | null;
|
||||
constructeur: {
|
||||
name: string;
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
} | null;
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -344,11 +392,11 @@ export declare class PiecesService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -356,9 +404,9 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -369,9 +417,9 @@ export declare class PiecesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
|
||||
6
dist/pieces/pieces.service.js
vendored
6
dist/pieces/pieces.service.js
vendored
@@ -25,6 +25,7 @@ let PiecesService = class PiecesService {
|
||||
composant: true,
|
||||
typePiece: true,
|
||||
documents: true,
|
||||
constructeur: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -35,6 +36,7 @@ let PiecesService = class PiecesService {
|
||||
composant: true,
|
||||
typePiece: true,
|
||||
documents: true,
|
||||
constructeur: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -46,6 +48,7 @@ let PiecesService = class PiecesService {
|
||||
composant: true,
|
||||
typePiece: true,
|
||||
documents: true,
|
||||
constructeur: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -57,6 +60,7 @@ let PiecesService = class PiecesService {
|
||||
composant: true,
|
||||
typePiece: true,
|
||||
documents: true,
|
||||
constructeur: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -68,6 +72,7 @@ let PiecesService = class PiecesService {
|
||||
composant: true,
|
||||
typePiece: true,
|
||||
documents: true,
|
||||
constructeur: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -80,6 +85,7 @@ let PiecesService = class PiecesService {
|
||||
composant: true,
|
||||
typePiece: true,
|
||||
documents: true,
|
||||
constructeur: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
2
dist/pieces/pieces.service.js.map
vendored
2
dist/pieces/pieces.service.js.map
vendored
@@ -1 +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,cAA8B;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;YAC9B,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;aAChB;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;YAChC,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;gBACb,S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,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;YAC9B,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAhFY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAEiB,8BAAa;GAD9B,aAAa,CAgFzB"}
|
||||
{"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,cAA8B;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;YAC9B,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;gBACf,YAAY,EAAE,IAAI;aACnB;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;YAChC,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;gBACf,YAAY,EAAE,IAAI;aACnB;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC;YAClC,KAAK,EAAE,EAAE,EAAE,EAAE;YACb,OAAO,EAAE;gBACP,OAAO,EAAE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CAAC;IACL,CAAC;CACF,CAAA;AAtFY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAEiB,8BAAa;GAD9B,aAAa,CAsFzB"}
|
||||
29
dist/profiles/profiles.controller.d.ts
vendored
Normal file
29
dist/profiles/profiles.controller.d.ts
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import { ProfilesService } from './profiles.service';
|
||||
import { CreateProfileDto } from '../shared/dto/profile.dto';
|
||||
export declare class ProfilesController {
|
||||
private readonly profilesService;
|
||||
constructor(profilesService: ProfilesService);
|
||||
findAll(): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
}[]>;
|
||||
create(dto: CreateProfileDto): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
isActive: boolean;
|
||||
}>;
|
||||
delete(id: string): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
isActive: boolean;
|
||||
} | null>;
|
||||
}
|
||||
59
dist/profiles/profiles.controller.js
vendored
Normal file
59
dist/profiles/profiles.controller.js
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
"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.ProfilesController = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const profiles_service_1 = require("./profiles.service");
|
||||
const profile_dto_1 = require("../shared/dto/profile.dto");
|
||||
let ProfilesController = class ProfilesController {
|
||||
profilesService;
|
||||
constructor(profilesService) {
|
||||
this.profilesService = profilesService;
|
||||
}
|
||||
async findAll() {
|
||||
return this.profilesService.findAllActive();
|
||||
}
|
||||
async create(dto) {
|
||||
return this.profilesService.create(dto);
|
||||
}
|
||||
async delete(id) {
|
||||
return this.profilesService.deactivate(id);
|
||||
}
|
||||
};
|
||||
exports.ProfilesController = ProfilesController;
|
||||
__decorate([
|
||||
(0, common_1.Get)(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ProfilesController.prototype, "findAll", null);
|
||||
__decorate([
|
||||
(0, common_1.Post)(),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [profile_dto_1.CreateProfileDto]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ProfilesController.prototype, "create", 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", Promise)
|
||||
], ProfilesController.prototype, "delete", null);
|
||||
exports.ProfilesController = ProfilesController = __decorate([
|
||||
(0, common_1.Controller)('profiles'),
|
||||
__metadata("design:paramtypes", [profiles_service_1.ProfilesService])
|
||||
], ProfilesController);
|
||||
//# sourceMappingURL=profiles.controller.js.map
|
||||
1
dist/profiles/profiles.controller.js.map
vendored
Normal file
1
dist/profiles/profiles.controller.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"profiles.controller.js","sourceRoot":"","sources":["../../src/profiles/profiles.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2E;AAC3E,yDAAoD;AACpD,2DAA4D;AAGrD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IACA;IAA7B,YAA6B,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAG3D,AAAN,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAA;IAC7C,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,GAAqB;QACxC,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACzC,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAc,EAAU;QAClC,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;IAC5C,CAAC;CACF,CAAA;AAjBY,gDAAkB;AAIvB;IADL,IAAA,YAAG,GAAE;;;;iDAGL;AAGK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAM,8BAAgB;;gDAEzC;AAGK;IADL,IAAA,eAAM,EAAC,KAAK,CAAC;IACA,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;gDAExB;6BAhBU,kBAAkB;IAD9B,IAAA,mBAAU,EAAC,UAAU,CAAC;qCAEyB,kCAAe;GADlD,kBAAkB,CAiB9B"}
|
||||
2
dist/profiles/profiles.module.d.ts
vendored
Normal file
2
dist/profiles/profiles.module.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare class ProfilesModule {
|
||||
}
|
||||
23
dist/profiles/profiles.module.js
vendored
Normal file
23
dist/profiles/profiles.module.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"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.ProfilesModule = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const profiles_controller_1 = require("./profiles.controller");
|
||||
const profiles_service_1 = require("./profiles.service");
|
||||
let ProfilesModule = class ProfilesModule {
|
||||
};
|
||||
exports.ProfilesModule = ProfilesModule;
|
||||
exports.ProfilesModule = ProfilesModule = __decorate([
|
||||
(0, common_1.Module)({
|
||||
controllers: [profiles_controller_1.ProfilesController],
|
||||
providers: [profiles_service_1.ProfilesService],
|
||||
exports: [profiles_service_1.ProfilesService],
|
||||
})
|
||||
], ProfilesModule);
|
||||
//# sourceMappingURL=profiles.module.js.map
|
||||
1
dist/profiles/profiles.module.js.map
vendored
Normal file
1
dist/profiles/profiles.module.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"profiles.module.js","sourceRoot":"","sources":["../../src/profiles/profiles.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAuC;AACvC,+DAA0D;AAC1D,yDAAoD;AAO7C,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAL1B,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,wCAAkB,CAAC;QACjC,SAAS,EAAE,CAAC,kCAAe,CAAC;QAC5B,OAAO,EAAE,CAAC,kCAAe,CAAC;KAC3B,CAAC;GACW,cAAc,CAAG"}
|
||||
40
dist/profiles/profiles.service.d.ts
vendored
Normal file
40
dist/profiles/profiles.service.d.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import { OnModuleInit } from '@nestjs/common';
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
import { CreateProfileDto } from '../shared/dto/profile.dto';
|
||||
export declare class ProfilesService implements OnModuleInit {
|
||||
private readonly prisma;
|
||||
constructor(prisma: PrismaService);
|
||||
onModuleInit(): Promise<void>;
|
||||
findAllActive(): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
}[]>;
|
||||
findActiveById(profileId: string): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
isActive: boolean;
|
||||
} | null>;
|
||||
create(dto: CreateProfileDto): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
isActive: boolean;
|
||||
}>;
|
||||
deactivate(profileId: string): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
isActive: boolean;
|
||||
} | null>;
|
||||
private ensureDefaultProfile;
|
||||
}
|
||||
126
dist/profiles/profiles.service.js
vendored
Normal file
126
dist/profiles/profiles.service.js
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
"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.ProfilesService = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const prisma_service_1 = require("../prisma/prisma.service");
|
||||
let ProfilesService = class ProfilesService {
|
||||
prisma;
|
||||
constructor(prisma) {
|
||||
this.prisma = prisma;
|
||||
}
|
||||
async onModuleInit() {
|
||||
await this.ensureDefaultProfile();
|
||||
}
|
||||
async findAllActive() {
|
||||
return this.prisma.profile.findMany({
|
||||
where: { isActive: true },
|
||||
orderBy: { createdAt: 'asc' },
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
async findActiveById(profileId) {
|
||||
if (!profileId)
|
||||
return null;
|
||||
return this.prisma.profile.findFirst({
|
||||
where: {
|
||||
id: profileId,
|
||||
isActive: true,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
isActive: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
async create(dto) {
|
||||
const firstName = dto.firstName.trim();
|
||||
const lastName = dto.lastName.trim();
|
||||
if (!firstName || !lastName) {
|
||||
throw new common_1.BadRequestException('Le prénom et le nom sont obligatoires.');
|
||||
}
|
||||
return this.prisma.profile.create({
|
||||
data: {
|
||||
firstName,
|
||||
lastName,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
async deactivate(profileId) {
|
||||
const existing = await this.prisma.profile.findUnique({ where: { id: profileId } });
|
||||
if (!existing) {
|
||||
throw new common_1.NotFoundException('Profil introuvable');
|
||||
}
|
||||
if (!existing.isActive) {
|
||||
return this.prisma.profile.findUnique({
|
||||
where: { id: profileId },
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
return this.prisma.profile.update({
|
||||
where: { id: profileId },
|
||||
data: { isActive: false },
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
async ensureDefaultProfile() {
|
||||
const count = await this.prisma.profile.count({ where: { isActive: true } });
|
||||
if (count > 0)
|
||||
return;
|
||||
const firstName = process.env.DEFAULT_PROFILE_FIRST_NAME?.trim() || 'Admin';
|
||||
const lastName = process.env.DEFAULT_PROFILE_LAST_NAME?.trim() || 'Général';
|
||||
await this.prisma.profile.create({
|
||||
data: {
|
||||
firstName,
|
||||
lastName,
|
||||
isActive: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
exports.ProfilesService = ProfilesService;
|
||||
exports.ProfilesService = ProfilesService = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [prisma_service_1.PrismaService])
|
||||
], ProfilesService);
|
||||
//# sourceMappingURL=profiles.service.js.map
|
||||
1
dist/profiles/profiles.service.js.map
vendored
Normal file
1
dist/profiles/profiles.service.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"profiles.service.js","sourceRoot":"","sources":["../../src/profiles/profiles.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiG;AACjG,6DAAwD;AAIjD,IAAM,eAAe,GAArB,MAAM,eAAe;IACG;IAA7B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAEtD,KAAK,CAAC,YAAY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AAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;QAC5E,IAAI,KAAK,GAAG,CAAC;YAAE,OAAM;QAErB,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,IAAI,EAAE,IAAI,OAAO,CAAA;QAC3E,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,IAAI,EAAE,IAAI,SAAS,CAAA;QAE3E,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;YAC/B,IAAI,EAAE;gBACJ,SAAS;gBACT,QAAQ;gBACR,QAAQ,EAAE,IAAI;aACf;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAjHY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAE0B,8BAAa;GADvC,eAAe,CAiH3B"}
|
||||
24
dist/session/session.controller.d.ts
vendored
Normal file
24
dist/session/session.controller.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Request } from 'express';
|
||||
import { ProfilesService } from '../profiles/profiles.service';
|
||||
import { ActivateProfileDto } from '../shared/dto/profile.dto';
|
||||
export declare class ProfileSessionController {
|
||||
private readonly profilesService;
|
||||
constructor(profilesService: ProfilesService);
|
||||
getActiveProfile(req: Request): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
isActive: boolean;
|
||||
}>;
|
||||
activateProfile(req: Request, dto: ActivateProfileDto): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
isActive: boolean;
|
||||
}>;
|
||||
logout(req: Request): Promise<unknown>;
|
||||
}
|
||||
87
dist/session/session.controller.js
vendored
Normal file
87
dist/session/session.controller.js
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
"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.ProfileSessionController = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const profiles_service_1 = require("../profiles/profiles.service");
|
||||
const profile_dto_1 = require("../shared/dto/profile.dto");
|
||||
let ProfileSessionController = class ProfileSessionController {
|
||||
profilesService;
|
||||
constructor(profilesService) {
|
||||
this.profilesService = profilesService;
|
||||
}
|
||||
async getActiveProfile(req) {
|
||||
if (!req.session?.profileId) {
|
||||
throw new common_1.UnauthorizedException('Aucun profil actif.');
|
||||
}
|
||||
const profile = await this.profilesService.findActiveById(req.session.profileId);
|
||||
if (!profile) {
|
||||
req.session.profileId = undefined;
|
||||
throw new common_1.UnauthorizedException('Profil introuvable ou inactif.');
|
||||
}
|
||||
return profile;
|
||||
}
|
||||
async activateProfile(req, dto) {
|
||||
if (!dto.profileId) {
|
||||
throw new common_1.BadRequestException('profileId est requis.');
|
||||
}
|
||||
const profile = await this.profilesService.findActiveById(dto.profileId);
|
||||
if (!profile) {
|
||||
throw new common_1.UnauthorizedException('Profil introuvable ou inactif.');
|
||||
}
|
||||
req.session.profileId = profile.id;
|
||||
return profile;
|
||||
}
|
||||
async logout(req) {
|
||||
if (!req.session) {
|
||||
return { success: true };
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
req.session.destroy((err) => {
|
||||
if (err) {
|
||||
return reject(new common_1.BadRequestException('Impossible de déconnecter la session.'));
|
||||
}
|
||||
resolve({ success: true });
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
exports.ProfileSessionController = ProfileSessionController;
|
||||
__decorate([
|
||||
(0, common_1.Get)(),
|
||||
__param(0, (0, common_1.Req)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ProfileSessionController.prototype, "getActiveProfile", null);
|
||||
__decorate([
|
||||
(0, common_1.Post)(),
|
||||
__param(0, (0, common_1.Req)()),
|
||||
__param(1, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object, profile_dto_1.ActivateProfileDto]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ProfileSessionController.prototype, "activateProfile", null);
|
||||
__decorate([
|
||||
(0, common_1.Delete)(),
|
||||
__param(0, (0, common_1.Req)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ProfileSessionController.prototype, "logout", null);
|
||||
exports.ProfileSessionController = ProfileSessionController = __decorate([
|
||||
(0, common_1.Controller)('session/profile'),
|
||||
__metadata("design:paramtypes", [profiles_service_1.ProfilesService])
|
||||
], ProfileSessionController);
|
||||
//# sourceMappingURL=session.controller.js.map
|
||||
1
dist/session/session.controller.js.map
vendored
Normal file
1
dist/session/session.controller.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"session.controller.js","sourceRoot":"","sources":["../../src/session/session.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AA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;QAC1B,CAAC;QAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC1B,IAAI,GAAG,EAAE,CAAC;oBACR,OAAO,MAAM,CAAC,IAAI,4BAAmB,CAAC,uCAAuC,CAAC,CAAC,CAAA;gBACjF,CAAC;gBACD,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAA;YAC5B,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAhDY,4DAAwB;AAI7B;IADL,IAAA,YAAG,GAAE;IACkB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;gEAY5B;AAGK;IADL,IAAA,aAAI,GAAE;IACgB,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAM,gCAAkB;;+DAYzE;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,YAAG,GAAE,CAAA;;;;sDAalB;mCA/CU,wBAAwB;IADpC,IAAA,mBAAU,EAAC,iBAAiB,CAAC;qCAEkB,kCAAe;GADlD,wBAAwB,CAgDpC"}
|
||||
2
dist/session/session.module.d.ts
vendored
Normal file
2
dist/session/session.module.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare class SessionModule {
|
||||
}
|
||||
22
dist/session/session.module.js
vendored
Normal file
22
dist/session/session.module.js
vendored
Normal 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.SessionModule = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const session_controller_1 = require("./session.controller");
|
||||
const profiles_module_1 = require("../profiles/profiles.module");
|
||||
let SessionModule = class SessionModule {
|
||||
};
|
||||
exports.SessionModule = SessionModule;
|
||||
exports.SessionModule = SessionModule = __decorate([
|
||||
(0, common_1.Module)({
|
||||
imports: [profiles_module_1.ProfilesModule],
|
||||
controllers: [session_controller_1.ProfileSessionController],
|
||||
})
|
||||
], SessionModule);
|
||||
//# sourceMappingURL=session.module.js.map
|
||||
1
dist/session/session.module.js.map
vendored
Normal file
1
dist/session/session.module.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"session.module.js","sourceRoot":"","sources":["../../src/session/session.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAuC;AACvC,6DAA+D;AAC/D,iEAA4D;AAMrD,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAJzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,gCAAc,CAAC;QACzB,WAAW,EAAE,CAAC,6CAAwB,CAAC;KACxC,CAAC;GACW,aAAa,CAAG"}
|
||||
4
dist/shared/dto/composant.dto.d.ts
vendored
4
dist/shared/dto/composant.dto.d.ts
vendored
@@ -3,7 +3,7 @@ export declare class CreateComposantDto {
|
||||
machineId?: string;
|
||||
parentComposantId?: string;
|
||||
reference?: string;
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
prix?: number | null;
|
||||
emplacement?: string;
|
||||
typeComposantId?: string;
|
||||
@@ -11,7 +11,7 @@ export declare class CreateComposantDto {
|
||||
export declare class UpdateComposantDto {
|
||||
name?: string;
|
||||
reference?: string;
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
prix?: number | null;
|
||||
emplacement?: string;
|
||||
typeComposantId?: string;
|
||||
|
||||
8
dist/shared/dto/composant.dto.js
vendored
8
dist/shared/dto/composant.dto.js
vendored
@@ -17,7 +17,7 @@ class CreateComposantDto {
|
||||
machineId;
|
||||
parentComposantId;
|
||||
reference;
|
||||
constructeur;
|
||||
constructeurId;
|
||||
prix;
|
||||
emplacement;
|
||||
typeComposantId;
|
||||
@@ -46,7 +46,7 @@ __decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], CreateComposantDto.prototype, "constructeur", void 0);
|
||||
], CreateComposantDto.prototype, "constructeurId", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_transformer_1.Transform)(({ value }) => value === '' ? null : value),
|
||||
@@ -66,7 +66,7 @@ __decorate([
|
||||
class UpdateComposantDto {
|
||||
name;
|
||||
reference;
|
||||
constructeur;
|
||||
constructeurId;
|
||||
prix;
|
||||
emplacement;
|
||||
typeComposantId;
|
||||
@@ -86,7 +86,7 @@ __decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], UpdateComposantDto.prototype, "constructeur", void 0);
|
||||
], UpdateComposantDto.prototype, "constructeurId", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_transformer_1.Transform)(({ value }) => value === '' ? null : value),
|
||||
|
||||
2
dist/shared/dto/composant.dto.js.map
vendored
2
dist/shared/dto/composant.dto.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"composant.dto.js","sourceRoot":"","sources":["../../../src/shared/dto/composant.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AACjE,yDAA8C;AAE9C,MAAa,kBAAkB;IAE7B,IAAI,CAAS;IAIb,SAAS,CAAU;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AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uDACU;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2DACc;AAG3B,MAAa,kBAAkB;IAG7B,IAAI,CAAU;IAId,SAAS,CAAU;IAInB,cAAc,CAAU;IAKxB,IAAI,CAAiB;IAIrB,WAAW,CAAU;IAIrB,eAAe,CAAU;CAC1B;AAzBD,gDAyBC;AAtBC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;qDACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0DACa;AAKxB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACrD,IAAA,0BAAQ,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;;gDACpC;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uDACU;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2DACc"}
|
||||
10
dist/shared/dto/constructeur.dto.d.ts
vendored
Normal file
10
dist/shared/dto/constructeur.dto.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export declare class CreateConstructeurDto {
|
||||
name: string;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
}
|
||||
export declare class UpdateConstructeurDto {
|
||||
name?: string;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
}
|
||||
55
dist/shared/dto/constructeur.dto.js
vendored
Normal file
55
dist/shared/dto/constructeur.dto.js
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"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.UpdateConstructeurDto = exports.CreateConstructeurDto = void 0;
|
||||
const class_validator_1 = require("class-validator");
|
||||
class CreateConstructeurDto {
|
||||
name;
|
||||
email;
|
||||
phone;
|
||||
}
|
||||
exports.CreateConstructeurDto = CreateConstructeurDto;
|
||||
__decorate([
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], CreateConstructeurDto.prototype, "name", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsEmail)(),
|
||||
__metadata("design:type", String)
|
||||
], CreateConstructeurDto.prototype, "email", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], CreateConstructeurDto.prototype, "phone", void 0);
|
||||
class UpdateConstructeurDto {
|
||||
name;
|
||||
email;
|
||||
phone;
|
||||
}
|
||||
exports.UpdateConstructeurDto = UpdateConstructeurDto;
|
||||
__decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], UpdateConstructeurDto.prototype, "name", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsEmail)(),
|
||||
__metadata("design:type", String)
|
||||
], UpdateConstructeurDto.prototype, "email", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], UpdateConstructeurDto.prototype, "phone", void 0);
|
||||
//# sourceMappingURL=constructeur.dto.js.map
|
||||
1
dist/shared/dto/constructeur.dto.js.map
vendored
Normal file
1
dist/shared/dto/constructeur.dto.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constructeur.dto.js","sourceRoot":"","sources":["../../../src/shared/dto/constructeur.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,MAAa,qBAAqB;IAEhC,IAAI,CAAQ;IAIZ,KAAK,CAAS;IAId,KAAK,CAAS;CACf;AAXD,sDAWC;AATC;IADC,IAAA,0BAAQ,GAAE;;mDACC;AAIZ;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;oDACI;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oDACG;AAGhB,MAAa,qBAAqB;IAGhC,IAAI,CAAS;IAIb,KAAK,CAAS;IAId,KAAK,CAAS;CACf;AAZD,sDAYC;AATC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACE;AAIb;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;oDACI;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oDACG"}
|
||||
4
dist/shared/dto/machine.dto.d.ts
vendored
4
dist/shared/dto/machine.dto.d.ts
vendored
@@ -2,7 +2,7 @@ export declare class CreateMachineDto {
|
||||
name: string;
|
||||
siteId: string;
|
||||
reference?: string;
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
prix?: string;
|
||||
emplacement?: string;
|
||||
typeMachineId?: string;
|
||||
@@ -10,7 +10,7 @@ export declare class CreateMachineDto {
|
||||
export declare class UpdateMachineDto {
|
||||
name?: string;
|
||||
reference?: string;
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
prix?: string;
|
||||
emplacement?: string;
|
||||
typeMachineId?: string;
|
||||
|
||||
8
dist/shared/dto/machine.dto.js
vendored
8
dist/shared/dto/machine.dto.js
vendored
@@ -15,7 +15,7 @@ class CreateMachineDto {
|
||||
name;
|
||||
siteId;
|
||||
reference;
|
||||
constructeur;
|
||||
constructeurId;
|
||||
prix;
|
||||
emplacement;
|
||||
typeMachineId;
|
||||
@@ -38,7 +38,7 @@ __decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], CreateMachineDto.prototype, "constructeur", void 0);
|
||||
], CreateMachineDto.prototype, "constructeurId", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsDecimal)(),
|
||||
@@ -57,7 +57,7 @@ __decorate([
|
||||
class UpdateMachineDto {
|
||||
name;
|
||||
reference;
|
||||
constructeur;
|
||||
constructeurId;
|
||||
prix;
|
||||
emplacement;
|
||||
typeMachineId;
|
||||
@@ -77,7 +77,7 @@ __decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], UpdateMachineDto.prototype, "constructeur", void 0);
|
||||
], UpdateMachineDto.prototype, "constructeurId", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsDecimal)(),
|
||||
|
||||
2
dist/shared/dto/machine.dto.js.map
vendored
2
dist/shared/dto/machine.dto.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"machine.dto.js","sourceRoot":"","sources":["../../../src/shared/dto/machine.dto.ts"],"names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3,7 @@ export declare class CreatePieceDto {
|
||||
machineId?: string;
|
||||
composantId?: string;
|
||||
reference?: string;
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
prix?: number | null;
|
||||
emplacement?: string;
|
||||
typePieceId?: string;
|
||||
@@ -11,7 +11,7 @@ export declare class CreatePieceDto {
|
||||
export declare class UpdatePieceDto {
|
||||
name?: string;
|
||||
reference?: string;
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
prix?: number | null;
|
||||
emplacement?: string;
|
||||
typePieceId?: string;
|
||||
|
||||
8
dist/shared/dto/piece.dto.js
vendored
8
dist/shared/dto/piece.dto.js
vendored
@@ -17,7 +17,7 @@ class CreatePieceDto {
|
||||
machineId;
|
||||
composantId;
|
||||
reference;
|
||||
constructeur;
|
||||
constructeurId;
|
||||
prix;
|
||||
emplacement;
|
||||
typePieceId;
|
||||
@@ -46,7 +46,7 @@ __decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], CreatePieceDto.prototype, "constructeur", void 0);
|
||||
], CreatePieceDto.prototype, "constructeurId", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_transformer_1.Transform)(({ value }) => value === '' ? null : value),
|
||||
@@ -66,7 +66,7 @@ __decorate([
|
||||
class UpdatePieceDto {
|
||||
name;
|
||||
reference;
|
||||
constructeur;
|
||||
constructeurId;
|
||||
prix;
|
||||
emplacement;
|
||||
typePieceId;
|
||||
@@ -86,7 +86,7 @@ __decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], UpdatePieceDto.prototype, "constructeur", void 0);
|
||||
], UpdatePieceDto.prototype, "constructeurId", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_transformer_1.Transform)(({ value }) => value === '' ? null : value),
|
||||
|
||||
2
dist/shared/dto/piece.dto.js.map
vendored
2
dist/shared/dto/piece.dto.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"piece.dto.js","sourceRoot":"","sources":["../../../src/shared/dto/piece.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AACjE,yDAA8C;AAE9C,MAAa,cAAc;IAEzB,IAAI,CAAS;IAIb,SAAS,CAAU;IAInB,WAAW,CAAU;IAIrB,SAAS,CAAU;IAInB,YAAY,CAAU;IAKtB,IAAI,CAAiB;IAIrB,WAAW,CAAU;IAIrB,WAAW,CAAU;CACtB;AAhCD,wCAgCC;AA9BC;IADC,IAAA,0BAAQ,GAAE;;4CACE;AAIb;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iDACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACU;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iDACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oDACW;AAKtB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACrD,IAAA,0BAAQ,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;;4CACpC;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACU;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACU;AAGvB,MAAa,cAAc;IAGzB,IAAI,CAAU;IAId,SAAS,CAAU;IAInB,YAAY,CAAU;IAKtB,IAAI,CAAiB;IAIrB,WAAW,CAAU;IAIrB,WAAW,CAAU;CACtB;AAzBD,wC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Dto {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
}
|
||||
export declare class ActivateProfileDto {
|
||||
profileId: string;
|
||||
}
|
||||
40
dist/shared/dto/profile.dto.js
vendored
Normal file
40
dist/shared/dto/profile.dto.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"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.ActivateProfileDto = exports.CreateProfileDto = void 0;
|
||||
const class_validator_1 = require("class-validator");
|
||||
class CreateProfileDto {
|
||||
firstName;
|
||||
lastName;
|
||||
}
|
||||
exports.CreateProfileDto = CreateProfileDto;
|
||||
__decorate([
|
||||
(0, class_validator_1.IsString)(),
|
||||
(0, class_validator_1.IsNotEmpty)(),
|
||||
(0, class_validator_1.MaxLength)(100),
|
||||
__metadata("design:type", String)
|
||||
], CreateProfileDto.prototype, "firstName", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsString)(),
|
||||
(0, class_validator_1.IsNotEmpty)(),
|
||||
(0, class_validator_1.MaxLength)(100),
|
||||
__metadata("design:type", String)
|
||||
], CreateProfileDto.prototype, "lastName", void 0);
|
||||
class ActivateProfileDto {
|
||||
profileId;
|
||||
}
|
||||
exports.ActivateProfileDto = ActivateProfileDto;
|
||||
__decorate([
|
||||
(0, class_validator_1.IsString)(),
|
||||
(0, class_validator_1.IsNotEmpty)(),
|
||||
__metadata("design:type", String)
|
||||
], ActivateProfileDto.prototype, "profileId", void 0);
|
||||
//# sourceMappingURL=profile.dto.js.map
|
||||
1
dist/shared/dto/profile.dto.js.map
vendored
Normal file
1
dist/shared/dto/profile.dto.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"profile.dto.js","sourceRoot":"","sources":["../../../src/shared/dto/profile.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AAEjE,MAAa,gBAAgB;IAI3B,SAAS,CAAS;IAKlB,QAAQ,CAAS;CAClB;AAVD,4CAUC;AANC;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,GAAG,CAAC;;mDACG;AAKlB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,GAAG,CAAC;;kDACE;AAGnB,MAAa,kBAAkB;IAG7B,SAAS,CAAS;CACnB;AAJD,gDAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACK"}
|
||||
32
dist/sites/sites.controller.d.ts
vendored
32
dist/sites/sites.controller.d.ts
vendored
@@ -35,9 +35,9 @@ export declare class SitesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -56,9 +56,9 @@ export declare class SitesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -69,12 +69,12 @@ export declare class SitesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -82,12 +82,12 @@ export declare class SitesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
})[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -95,11 +95,11 @@ export declare class SitesController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
})[];
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -109,11 +109,11 @@ export declare class SitesController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -147,9 +147,9 @@ export declare class SitesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -168,9 +168,9 @@ export declare class SitesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -181,12 +181,12 @@ export declare class SitesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -194,12 +194,12 @@ export declare class SitesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
})[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -207,11 +207,11 @@ export declare class SitesController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
})[];
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -221,11 +221,11 @@ export declare class SitesController {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
|
||||
32
dist/sites/sites.service.d.ts
vendored
32
dist/sites/sites.service.d.ts
vendored
@@ -35,9 +35,9 @@ export declare class SitesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -56,9 +56,9 @@ export declare class SitesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -69,12 +69,12 @@ export declare class SitesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -82,12 +82,12 @@ export declare class SitesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
})[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -95,11 +95,11 @@ export declare class SitesService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
})[];
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -109,11 +109,11 @@ export declare class SitesService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -147,9 +147,9 @@ export declare class SitesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -168,9 +168,9 @@ export declare class SitesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -181,12 +181,12 @@ export declare class SitesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -194,12 +194,12 @@ export declare class SitesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
})[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -207,11 +207,11 @@ export declare class SitesService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
})[];
|
||||
documents: {
|
||||
name: string;
|
||||
@@ -221,11 +221,11 @@ export declare class SitesService {
|
||||
siteId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
pieceId: string | null;
|
||||
filename: string;
|
||||
path: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
pieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
|
||||
2
dist/tsconfig.build.tsbuildinfo
vendored
2
dist/tsconfig.build.tsbuildinfo
vendored
File diff suppressed because one or more lines are too long
64
dist/types/types.controller.d.ts
vendored
64
dist/types/types.controller.d.ts
vendored
@@ -10,12 +10,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -37,11 +37,11 @@ export declare class TypesController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
}[];
|
||||
customFields: {
|
||||
name: string;
|
||||
@@ -49,12 +49,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -76,11 +76,11 @@ export declare class TypesController {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
}[];
|
||||
customFields: {
|
||||
name: string;
|
||||
@@ -88,12 +88,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -115,12 +115,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -155,12 +155,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -176,12 +176,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
}[];
|
||||
customFields: {
|
||||
name: string;
|
||||
@@ -189,12 +189,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -210,12 +210,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
}[];
|
||||
customFields: {
|
||||
name: string;
|
||||
@@ -223,12 +223,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -244,12 +244,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -272,12 +272,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -293,9 +293,9 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -306,12 +306,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -327,9 +327,9 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -340,12 +340,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -361,12 +361,12 @@ export declare class TypesController {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
|
||||
64
dist/types/types.service.d.ts
vendored
64
dist/types/types.service.d.ts
vendored
@@ -10,12 +10,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -37,11 +37,11 @@ export declare class TypesService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
}[];
|
||||
customFields: {
|
||||
name: string;
|
||||
@@ -49,12 +49,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -76,11 +76,11 @@ export declare class TypesService {
|
||||
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;
|
||||
constructeurId: string | null;
|
||||
}[];
|
||||
customFields: {
|
||||
name: string;
|
||||
@@ -88,12 +88,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -115,12 +115,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -155,12 +155,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -176,12 +176,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
}[];
|
||||
customFields: {
|
||||
name: string;
|
||||
@@ -189,12 +189,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -210,12 +210,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
parentComposantId: string | null;
|
||||
typeComposantId: string | null;
|
||||
parentComposantId: string | null;
|
||||
}[];
|
||||
customFields: {
|
||||
name: string;
|
||||
@@ -223,12 +223,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -244,12 +244,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -272,12 +272,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -293,9 +293,9 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -306,12 +306,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -327,9 +327,9 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
reference: string | null;
|
||||
constructeur: string | null;
|
||||
prix: import("@prisma/client/runtime/library").Decimal | null;
|
||||
emplacement: string | null;
|
||||
constructeurId: string | null;
|
||||
machineId: string | null;
|
||||
composantId: string | null;
|
||||
typePieceId: string | null;
|
||||
@@ -340,12 +340,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
@@ -361,12 +361,12 @@ export declare class TypesService {
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
typeMachineId: string | null;
|
||||
typePieceId: string | null;
|
||||
typeComposantId: string | null;
|
||||
type: string;
|
||||
required: boolean;
|
||||
defaultValue: string | null;
|
||||
options: string[];
|
||||
typeComposantId: string | null;
|
||||
typePieceId: string | null;
|
||||
}[];
|
||||
} & {
|
||||
name: string;
|
||||
|
||||
@@ -11,6 +11,11 @@ CORS_ORIGIN=http://localhost:3001
|
||||
# Configuration de sécurité
|
||||
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
|
||||
JWT_EXPIRES_IN=7d
|
||||
SESSION_SECRET=change-this-session-secret
|
||||
SESSION_SAME_SITE=lax
|
||||
SESSION_MAX_AGE=604800000
|
||||
DEFAULT_PROFILE_FIRST_NAME=Admin
|
||||
DEFAULT_PROFILE_LAST_NAME=General
|
||||
|
||||
# Configuration de l'API
|
||||
API_PREFIX=api
|
||||
@@ -29,4 +34,4 @@ DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
DB_USERNAME=postgres
|
||||
DB_PASSWORD=password
|
||||
DB_NAME=inventory_db
|
||||
DB_NAME=inventory_db
|
||||
|
||||
82
package-lock.json
generated
82
package-lock.json
generated
@@ -17,6 +17,7 @@
|
||||
"@prisma/client": "^6.12.0",
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.14.2",
|
||||
"express-session": "^1.18.2",
|
||||
"pg": "^8.16.3",
|
||||
"prisma": "^6.12.0",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
@@ -32,6 +33,7 @@
|
||||
"@swc/cli": "^0.6.0",
|
||||
"@swc/core": "^1.10.7",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/express-session": "^1.18.2",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^22.16.5",
|
||||
"@types/supertest": "^6.0.2",
|
||||
@@ -3404,6 +3406,16 @@
|
||||
"@types/send": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/express-session": {
|
||||
"version": "1.18.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/express-session/-/express-session-1.18.2.tgz",
|
||||
"integrity": "sha512-k+I0BxwVXsnEU2hV77cCobC08kIsn4y44C3gC0b46uxZVMaXA04lSPgRLR/bSL2w0t0ShJiG8o4jPzRG/nscFg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/express": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/graceful-fs": {
|
||||
"version": "4.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",
|
||||
@@ -6300,6 +6312,46 @@
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/express-session": {
|
||||
"version": "1.18.2",
|
||||
"resolved": "https://registry.npmjs.org/express-session/-/express-session-1.18.2.tgz",
|
||||
"integrity": "sha512-SZjssGQC7TzTs9rpPDuUrR23GNZ9+2+IkA/+IJWmvQilTr5OSliEHGF+D9scbIpdC6yGtTI0/VhaHoVes2AN/A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cookie": "0.7.2",
|
||||
"cookie-signature": "1.0.7",
|
||||
"debug": "2.6.9",
|
||||
"depd": "~2.0.0",
|
||||
"on-headers": "~1.1.0",
|
||||
"parseurl": "~1.3.3",
|
||||
"safe-buffer": "5.2.1",
|
||||
"uid-safe": "~2.1.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/express-session/node_modules/cookie-signature": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
|
||||
"integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/express-session/node_modules/debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/express-session/node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/express/node_modules/content-disposition": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz",
|
||||
@@ -8987,6 +9039,15 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/on-headers": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
|
||||
"integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
@@ -9726,6 +9787,15 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/random-bytes": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
|
||||
"integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/randombytes": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
||||
@@ -11613,6 +11683,18 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/uid-safe": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
|
||||
"integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"random-bytes": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/uint8array-extras": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.4.0.tgz",
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"@prisma/client": "^6.12.0",
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.14.2",
|
||||
"express-session": "^1.18.2",
|
||||
"pg": "^8.16.3",
|
||||
"prisma": "^6.12.0",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
@@ -43,6 +44,7 @@
|
||||
"@swc/cli": "^0.6.0",
|
||||
"@swc/core": "^1.10.7",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/express-session": "^1.18.2",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^22.16.5",
|
||||
"@types/supertest": "^6.0.2",
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE "profiles" (
|
||||
"id" TEXT PRIMARY KEY,
|
||||
"firstName" TEXT NOT NULL,
|
||||
"lastName" TEXT NOT NULL,
|
||||
"isActive" BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
INSERT INTO "profiles" ("id", "firstName", "lastName")
|
||||
VALUES ('admin-default-profile', 'Admin', 'General')
|
||||
ON CONFLICT DO NOTHING;
|
||||
@@ -177,6 +177,17 @@ model Constructeur {
|
||||
@@map("constructeurs")
|
||||
}
|
||||
|
||||
model Profile {
|
||||
id String @id @default(cuid())
|
||||
firstName String
|
||||
lastName String
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@map("profiles")
|
||||
}
|
||||
|
||||
model Document {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
|
||||
@@ -11,6 +11,8 @@ import { DocumentsModule } from './documents/documents.module';
|
||||
import { TypesModule } from './types/types.module';
|
||||
import { CustomFieldsModule } from './custom-fields/custom-fields.module';
|
||||
import { ConstructeursModule } from './constructeurs/constructeurs.module';
|
||||
import { ProfilesModule } from './profiles/profiles.module';
|
||||
import { SessionModule } from './session/session.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@@ -26,6 +28,8 @@ import { ConstructeursModule } from './constructeurs/constructeurs.module';
|
||||
TypesModule,
|
||||
CustomFieldsModule,
|
||||
ConstructeursModule,
|
||||
ProfilesModule,
|
||||
SessionModule,
|
||||
],
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
|
||||
15
src/main.ts
15
src/main.ts
@@ -1,10 +1,25 @@
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import * as session from 'express-session';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
|
||||
app.use(
|
||||
session({
|
||||
secret: process.env.SESSION_SECRET || 'change-me',
|
||||
resave: false,
|
||||
saveUninitialized: false,
|
||||
cookie: {
|
||||
httpOnly: true,
|
||||
sameSite: (process.env.SESSION_SAME_SITE as 'strict' | 'lax' | 'none') ?? 'lax',
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
maxAge: Number(process.env.SESSION_MAX_AGE ?? 1000 * 60 * 60 * 24 * 7),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
// Récupérer les origines CORS depuis la variable d'environnement (séparées par des virgules)
|
||||
const allowedOrigins = process.env.CORS_ORIGIN
|
||||
? process.env.CORS_ORIGIN.split(',').map(origin => origin.trim())
|
||||
|
||||
23
src/profiles/profiles.controller.ts
Normal file
23
src/profiles/profiles.controller.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post } from '@nestjs/common'
|
||||
import { ProfilesService } from './profiles.service'
|
||||
import { CreateProfileDto } from '../shared/dto/profile.dto'
|
||||
|
||||
@Controller('profiles')
|
||||
export class ProfilesController {
|
||||
constructor(private readonly profilesService: ProfilesService) {}
|
||||
|
||||
@Get()
|
||||
async findAll() {
|
||||
return this.profilesService.findAllActive()
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Body() dto: CreateProfileDto) {
|
||||
return this.profilesService.create(dto)
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
async delete(@Param('id') id: string) {
|
||||
return this.profilesService.deactivate(id)
|
||||
}
|
||||
}
|
||||
10
src/profiles/profiles.module.ts
Normal file
10
src/profiles/profiles.module.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Module } from '@nestjs/common'
|
||||
import { ProfilesController } from './profiles.controller'
|
||||
import { ProfilesService } from './profiles.service'
|
||||
|
||||
@Module({
|
||||
controllers: [ProfilesController],
|
||||
providers: [ProfilesService],
|
||||
exports: [ProfilesService],
|
||||
})
|
||||
export class ProfilesModule {}
|
||||
119
src/profiles/profiles.service.ts
Normal file
119
src/profiles/profiles.service.ts
Normal file
@@ -0,0 +1,119 @@
|
||||
import { Injectable, NotFoundException, BadRequestException, OnModuleInit } from '@nestjs/common'
|
||||
import { PrismaService } from '../prisma/prisma.service'
|
||||
import { CreateProfileDto } from '../shared/dto/profile.dto'
|
||||
|
||||
@Injectable()
|
||||
export class ProfilesService implements OnModuleInit {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async onModuleInit() {
|
||||
await this.ensureDefaultProfile()
|
||||
}
|
||||
|
||||
async findAllActive() {
|
||||
return this.prisma.profile.findMany({
|
||||
where: { isActive: true },
|
||||
orderBy: { createdAt: 'asc' },
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
async findActiveById(profileId: string) {
|
||||
if (!profileId) return null
|
||||
|
||||
return this.prisma.profile.findFirst({
|
||||
where: {
|
||||
id: profileId,
|
||||
isActive: true,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
isActive: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
async create(dto: CreateProfileDto) {
|
||||
const firstName = dto.firstName.trim()
|
||||
const lastName = dto.lastName.trim()
|
||||
|
||||
if (!firstName || !lastName) {
|
||||
throw new BadRequestException('Le prénom et le nom sont obligatoires.')
|
||||
}
|
||||
|
||||
return this.prisma.profile.create({
|
||||
data: {
|
||||
firstName,
|
||||
lastName,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
async deactivate(profileId: string) {
|
||||
const existing = await this.prisma.profile.findUnique({ where: { id: profileId } })
|
||||
if (!existing) {
|
||||
throw new NotFoundException('Profil introuvable')
|
||||
}
|
||||
|
||||
if (!existing.isActive) {
|
||||
return this.prisma.profile.findUnique({
|
||||
where: { id: profileId },
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
return this.prisma.profile.update({
|
||||
where: { id: profileId },
|
||||
data: { isActive: false },
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
private async ensureDefaultProfile() {
|
||||
const count = await this.prisma.profile.count({ where: { isActive: true } })
|
||||
if (count > 0) return
|
||||
|
||||
const firstName = process.env.DEFAULT_PROFILE_FIRST_NAME?.trim() || 'Admin'
|
||||
const lastName = process.env.DEFAULT_PROFILE_LAST_NAME?.trim() || 'Général'
|
||||
|
||||
await this.prisma.profile.create({
|
||||
data: {
|
||||
firstName,
|
||||
lastName,
|
||||
isActive: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
64
src/session/session.controller.ts
Normal file
64
src/session/session.controller.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import {
|
||||
BadRequestException,
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
Post,
|
||||
Req,
|
||||
UnauthorizedException,
|
||||
} from '@nestjs/common'
|
||||
import { Request } from 'express'
|
||||
import { ProfilesService } from '../profiles/profiles.service'
|
||||
import { ActivateProfileDto } from '../shared/dto/profile.dto'
|
||||
|
||||
@Controller('session/profile')
|
||||
export class ProfileSessionController {
|
||||
constructor(private readonly profilesService: ProfilesService) {}
|
||||
|
||||
@Get()
|
||||
async getActiveProfile(@Req() req: Request) {
|
||||
if (!req.session?.profileId) {
|
||||
throw new UnauthorizedException('Aucun profil actif.')
|
||||
}
|
||||
|
||||
const profile = await this.profilesService.findActiveById(req.session.profileId)
|
||||
if (!profile) {
|
||||
req.session.profileId = undefined
|
||||
throw new UnauthorizedException('Profil introuvable ou inactif.')
|
||||
}
|
||||
|
||||
return profile
|
||||
}
|
||||
|
||||
@Post()
|
||||
async activateProfile(@Req() req: Request, @Body() dto: ActivateProfileDto) {
|
||||
if (!dto.profileId) {
|
||||
throw new BadRequestException('profileId est requis.')
|
||||
}
|
||||
|
||||
const profile = await this.profilesService.findActiveById(dto.profileId)
|
||||
if (!profile) {
|
||||
throw new UnauthorizedException('Profil introuvable ou inactif.')
|
||||
}
|
||||
|
||||
req.session.profileId = profile.id
|
||||
return profile
|
||||
}
|
||||
|
||||
@Delete()
|
||||
async logout(@Req() req: Request) {
|
||||
if (!req.session) {
|
||||
return { success: true }
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
req.session.destroy((err) => {
|
||||
if (err) {
|
||||
return reject(new BadRequestException('Impossible de déconnecter la session.'))
|
||||
}
|
||||
resolve({ success: true })
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
9
src/session/session.module.ts
Normal file
9
src/session/session.module.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common'
|
||||
import { ProfileSessionController } from './session.controller'
|
||||
import { ProfilesModule } from '../profiles/profiles.module'
|
||||
|
||||
@Module({
|
||||
imports: [ProfilesModule],
|
||||
controllers: [ProfileSessionController],
|
||||
})
|
||||
export class SessionModule {}
|
||||
19
src/shared/dto/profile.dto.ts
Normal file
19
src/shared/dto/profile.dto.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { IsNotEmpty, IsString, MaxLength } from 'class-validator'
|
||||
|
||||
export class CreateProfileDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(100)
|
||||
firstName!: string
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(100)
|
||||
lastName!: string
|
||||
}
|
||||
|
||||
export class ActivateProfileDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
profileId!: string
|
||||
}
|
||||
7
src/types/express-session.d.ts
vendored
Normal file
7
src/types/express-session.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import 'express-session'
|
||||
|
||||
declare module 'express-session' {
|
||||
interface SessionData {
|
||||
profileId?: string
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user